Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(953)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
index 2467adc81320e3bb9245478003b9fe66205258e8..692405b565c959b3e7e2174f9a66f840418d43fa 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
@@ -213,15 +213,18 @@ void ScrollableArea::userScrollHelper(const DoublePoint& position, ScrollBehavio
{
cancelProgrammaticScrollAnimation();
+ double x = userInputScrollable(HorizontalScrollbar) ? position.x() : scrollAnimator()->currentPosition().x();
+ double y = userInputScrollable(VerticalScrollbar) ? position.y() : scrollAnimator()->currentPosition().y();
+
// Smooth user scrolls (keyboard, wheel clicks) are handled via the userScroll method.
// TODO(bokan): The userScroll method should probably be modified to call this method
// and ScrollAnimator to have a simpler animateToOffset method like the
// ProgrammaticScrollAnimator.
ASSERT(scrollBehavior == ScrollBehaviorInstant);
- scrollAnimator()->scrollToOffsetWithoutAnimation(toFloatPoint(position));
+ scrollAnimator()->scrollToOffsetWithoutAnimation(FloatPoint(x, y));
}
-LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
+LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, const ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType)
{
// TODO(bokan): This should really be implemented here but ScrollAlignment is in Core which is a dependency violation.
ASSERT_NOT_REACHED();
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | third_party/WebKit/Source/web/TextFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698