Skip to content
Permalink
Browse files
2010-07-22 MORITA Hajime <morrita@google.com>
        Reviewed by Ojan Vafai.

        Autoscroll on selection should take scrollbars into account as outside of the content.
        https://bugs.webkit.org/show_bug.cgi?id=40403

        ScrollView's scroll-bar was considered as a part of content rect,
        that prevents autoscroll to happen when the pointer is over the
        scroll-bar.  This change excluded scroll-bar region from scrolling
        delta calculation.

        Test: WebCore/manual-tests/autoscroll-over-scrollbar.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):

Canonical link: https://commits.webkit.org/54776@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
omo committed Jul 23, 2010
1 parent 3342cbc commit 95c655d7db60f88170d47ab6e0079c9ff3fce67f
Showing with 26 additions and 1 deletion.
  1. +17 −0 WebCore/ChangeLog
  2. +8 −0 WebCore/manual-tests/autoscroll-over-scrollbar.html
  3. +1 −1 WebCore/rendering/RenderLayer.cpp
@@ -1,3 +1,20 @@
2010-07-22 MORITA Hajime <morrita@google.com>

Reviewed by Ojan Vafai.

Autoscroll on selection should take scrollbars into account as outside of the content.
https://bugs.webkit.org/show_bug.cgi?id=40403

ScrollView's scroll-bar was considered as a part of content rect,
that prevents autoscroll to happen when the pointer is over the
scroll-bar. This change excluded scroll-bar region from scrolling
delta calculation.

Test: WebCore/manual-tests/autoscroll-over-scrollbar.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):

2010-07-22 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Adler.
@@ -0,0 +1,8 @@
<html>
<body>
<h1><a href="https://bugs.webkit.org/show_bug.cgi?id=40403">Bug 40403</a></h1>
<p>Click down somewhere in this text, then move the pointer over the scrollbar at the bottom of the window, stop there, holding the mouse button down.</p>
<div style="height:3000px; width:3000px;"></div>
<p>If the bug occurs, then this text won't be selected until you move the mouse slightly. If the bug does not occur, this text should be selected.</p>
</body>
</html>
@@ -1437,7 +1437,7 @@ void RenderLayer::scrollRectToVisible(const IntRect& rect, bool scrollToAnchor,
newRect.setX(rect.x() - frameView->scrollX() + frameView->x());
newRect.setY(rect.y() - frameView->scrollY() + frameView->y());
} else {
IntRect viewRect = frameView->visibleContentRect(true);
IntRect viewRect = frameView->visibleContentRect();
IntRect r = getRectToExpose(viewRect, rect, alignX, alignY);

frameView->setScrollPosition(r.location());

0 comments on commit 95c655d

Please sign in to comment.