Commit 8ddf4282 authored by weinig@apple.com's avatar weinig@apple.com

Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area

https://bugs.webkit.org/show_bug.cgi?id=53048

Reviewed by David Hyatt.

Source/WebCore: 

Test: fast/overflow/overflow-rtl-vertical-origin.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
Take the scroll origin into account when calculating scrollbars in more places.

LayoutTests: 

* fast/overflow/overflow-rtl-vertical-origin-expected.txt: Added.
* fast/overflow/overflow-rtl-vertical-origin.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6b7df945
2011-01-25 Sam Weinig <sam@webkit.org>
Reviewed by David Hyatt.
Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area
https://bugs.webkit.org/show_bug.cgi?id=53048
* fast/overflow/overflow-rtl-vertical-origin-expected.txt: Added.
* fast/overflow/overflow-rtl-vertical-origin.html: Added.
2011-01-25 Kent Tamura <tkent@chromium.org>
Unreviewed, test expectation update.
......
This tests that the scroll origin for boxes with -webkit-writing-mode:vertical-rl; direction:rtl; overflow:scroll is correct.
PASS: test.scrollTop is correct.
<body>
<p>This tests that the scroll origin for boxes with -webkit-writing-mode:vertical-rl; direction:rtl; overflow:scroll is correct.</p>
<div id="test" style="-webkit-writing-mode:vertical-rl; direction:rtl; overflow:scroll; width: 200px; height: 200px">
<div style="height: 300px; width: 100px;"></div>
</div>
<pre id="console"></pre>
<script>
function log(msg)
{
document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
}
if (window.layoutTestController)
layoutTestController.dumpAsText();
var t = document.getElementById("test");
if (t.scrollTop == 115)
log("PASS: test.scrollTop is correct.")
else
log("FAIL: test.scrollTop is incorrect. It is " + t.scrollTop + " but should be 115.");
</script>
</body>
2011-01-25 Sam Weinig <sam@webkit.org>
Reviewed by David Hyatt.
Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area
https://bugs.webkit.org/show_bug.cgi?id=53048
Test: fast/overflow/overflow-rtl-vertical-origin.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollPosition):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
Take the scroll origin into account when calculating scrollbars in more places.
2011-01-25 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
......@@ -1665,7 +1665,7 @@ int RenderLayer::scrollPosition(Scrollbar* scrollbar) const
if (scrollbar->orientation() == HorizontalScrollbar)
return scrollXOffset();
if (scrollbar->orientation() == VerticalScrollbar)
return m_scrollY;
return scrollYOffset();
return 0;
}
......@@ -2033,8 +2033,8 @@ void RenderLayer::updateScrollInfoAfterLayout()
// Layout may cause us to be in an invalid scroll position. In this case we need
// to pull our scroll offsets back to the max (or push them up to the min).
int newX = max(0, min(scrollXOffset(), scrollWidth() - box->clientWidth()));
int newY = max(0, min(m_scrollY, scrollHeight() - box->clientHeight()));
if (newX != scrollXOffset() || newY != m_scrollY) {
int newY = max(0, min(scrollYOffset(), scrollHeight() - box->clientHeight()));
if (newX != scrollXOffset() || newY != scrollYOffset()) {
RenderView* view = renderer()->view();
ASSERT(view);
// scrollToOffset() may call updateLayerPositions(), which doesn't work
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment