Commit ff75200e authored by tony@chromium.org's avatar tony@chromium.org

REGRESSION(r103245): can't scroll left/up using scrollbar controls of overflowing elements

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

Reviewed by Darin Adler.

Source/WebCore:

Test: scrollbars/scroll-rtl-or-bt-layer.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Call scrollToOffsetWithoutAnimation since we're always
scrolling to the just computed offset.

LayoutTests:

* platform/win/Skipped:
* scrollbars/scroll-rtl-or-bt-layer-expected.txt: Added.
* scrollbars/scroll-rtl-or-bt-layer.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3395fe9e
2012-01-24 Tony Chang <tony@chromium.org>
REGRESSION(r103245): can't scroll left/up using scrollbar controls of overflowing elements
https://bugs.webkit.org/show_bug.cgi?id=76317
Reviewed by Darin Adler.
* platform/win/Skipped:
* scrollbars/scroll-rtl-or-bt-layer-expected.txt: Added.
* scrollbars/scroll-rtl-or-bt-layer.html: Added.
2012-01-24 David Levin <levin@chromium.org>
Change reference of revokeObjectURL in worker-apply-blob-url-to-xhr.html to use webkitURL.
......@@ -970,6 +970,7 @@ fast/events/continuous-platform-wheelevent-in-scrolling-div.html
fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
scrollbars/scrollevent-iframe-no-scrolling-wheel.html
scrollbars/scroll-rtl-or-bt-layer.html
# Windows port doesn't yet support rendering of non-BMP characters even though there's a font available.
fast/text/international/plane2.html
......
This test requires DumpRenderTree. To test manually, try to scroll the blue div to the left and the red div up using the scrollbar arrows or the mouse wheel. The test passes if the divs scroll.
rtl: PASS
bt: PASS
<html>
<body>
<p>This test requires DumpRenderTree. To test manually, try to scroll the
blue div to the left and the red div up using the scrollbar arrows or the
mouse wheel. The test passes if the divs scroll.</p>
<div id='rtl' style="direction: rtl; width: 100px; overflow: auto; border: 1px solid blue;">
01234567890123456789
</div>
<div id='bt' style="-webkit-writing-mode: horizontal-bt; height: 100px; overflow: auto; border: 1 px solid red;">
aaa<br>
bbb<br>
ccc<br>
ddd<br>
eee<br>
fff<br>
ggg<br>
hhh<br>
iii<br>
jjj<br>
kkk
</div>
<div id="console"></div>
<script>
function log(message)
{
document.getElementById("console").innerHTML += message + "<br>";
}
function centerMouseOn(elementId)
{
var element = document.getElementById(elementId);
eventSender.mouseMoveTo(element.offsetLeft + element.offsetWidth / 2,
element.offsetTop + element.offsetHeight / 2);
}
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (!window.eventSender || !window.eventSender.mouseScrollBy) {
log("This test requires DumpRenderTree with eventSender.mouseScrollBy.");
return;
}
centerMouseOn("rtl");
var offsetBefore = document.getElementById("rtl").scrollLeft;
eventSender.mouseScrollBy(1, 0);
var offsetAfter = document.getElementById("rtl").scrollLeft;
if (offsetBefore > offsetAfter)
log("rtl: PASS");
else {
log("rtl: FAIL");
log("scrollLeft before: " + offsetBefore);
log("scrollLeft after: " + offsetAfter);
}
centerMouseOn("bt");
offsetBefore = document.getElementById("bt").scrollTop;
eventSender.mouseScrollBy(0, 1);
offsetAfter = document.getElementById("bt").scrollTop;
if (offsetBefore > offsetAfter)
log("bt: PASS");
else {
log("bt: FAIL");
log("scrollTop before: " + offsetBefore);
log("scrollTop after: " + offsetAfter);
}
document.body.removeChild(document.getElementById("rtl"));
document.body.removeChild(document.getElementById("bt"));
}
test();
</script>
</body>
</html>
2012-01-24 Tony Chang <tony@chromium.org>
REGRESSION(r103245): can't scroll left/up using scrollbar controls of overflowing elements
https://bugs.webkit.org/show_bug.cgi?id=76317
Reviewed by Darin Adler.
Test: scrollbars/scroll-rtl-or-bt-layer.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Call scrollToOffsetWithoutAnimation since we're always
scrolling to the just computed offset.
2012-01-24 Mark Rowe <mrowe@apple.com>
Fix all of the builds after r105812.
......@@ -2292,6 +2292,7 @@ void RenderLayer::updateScrollInfoAfterLayout()
return;
m_scrollDimensionsDirty = true;
IntSize scrollOffsetOriginal(scrollXOffset(), scrollYOffset());
bool horizontalOverflow, verticalOverflow;
computeScrollDimensions(&horizontalOverflow, &verticalOverflow);
......@@ -2374,8 +2375,9 @@ void RenderLayer::updateScrollInfoAfterLayout()
m_vBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_vBar->setProportion(clientHeight, m_scrollSize.height());
}
scrollToOffset(scrollXOffset(), scrollYOffset());
if (scrollOffsetOriginal != scrollOffset())
scrollToOffsetWithoutAnimation(LayoutPoint(scrollXOffset(), scrollYOffset()));
if (renderer()->node() && renderer()->document()->hasListenerType(Document::OVERFLOWCHANGED_LISTENER))
updateOverflowStatus(horizontalOverflow, verticalOverflow);
......
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