Skip to content

Commit

Permalink
2010-07-22 MORITA Hajime <morrita@google.com>
Browse files Browse the repository at this point in the history
        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 95c655d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
17 changes: 17 additions & 0 deletions WebCore/ChangeLog
@@ -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.
Expand Down
8 changes: 8 additions & 0 deletions WebCore/manual-tests/autoscroll-over-scrollbar.html
@@ -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>
2 changes: 1 addition & 1 deletion WebCore/rendering/RenderLayer.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 95c655d

Please sign in to comment.