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

Unified Diff: third_party/WebKit/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typos Created 5 years, 3 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/core/paint/DeprecatedPaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
index 7f23aa54fe791c3f63dc5aa6d0b9e115c2104ec2..6834201353db7a0925adc3b324ffa84987e3b4f1 100644
--- a/third_party/WebKit/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
@@ -639,13 +639,13 @@ void DeprecatedPaintLayerScrollableArea::computeScrollDimensions()
setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
}
-void DeprecatedPaintLayerScrollableArea::scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClamping clamp, ScrollBehavior scrollBehavior)
+void DeprecatedPaintLayerScrollableArea::scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClamping clamp, ScrollBehavior scrollBehavior, ScrollType scrollType)
{
cancelProgrammaticScrollAnimation();
DoublePoint newScrollPosition = clamp == ScrollOffsetClamped ? clampScrollPosition(scrollPosition) : scrollPosition;
if (newScrollPosition != scrollPositionDouble())
- ScrollableArea::setScrollPosition(newScrollPosition, ProgrammaticScroll, scrollBehavior);
+ ScrollableArea::setScrollPosition(newScrollPosition, scrollType, scrollBehavior);
}
void DeprecatedPaintLayerScrollableArea::updateScrollDimensions(DoubleSize& scrollOffset, bool& autoHorizontalScrollBarChanged, bool& autoVerticalScrollBarChanged)
@@ -1377,7 +1377,7 @@ void DeprecatedPaintLayerScrollableArea::resize(const PlatformEvent& evt, const
// FIXME (Radar 4118564): We should also autoscroll the window as necessary to keep the point under the cursor in view.
}
-LayoutRect DeprecatedPaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY)
+LayoutRect DeprecatedPaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, const ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType scrollType)
{
LayoutRect localExposeRect(box().absoluteToLocalQuad(FloatQuad(FloatRect(rect)), UseTransforms).boundingBox());
localExposeRect.move(-box().borderLeft(), -box().borderTop());
@@ -1389,7 +1389,7 @@ LayoutRect DeprecatedPaintLayerScrollableArea::scrollIntoView(const LayoutRect&
return rect;
DoubleSize oldScrollOffset = adjustedScrollOffset();
- scrollToPosition(clampedScrollPosition);
+ scrollToPosition(clampedScrollPosition, ScrollOffsetUnclamped, ScrollBehaviorInstant, scrollType);
DoubleSize scrollOffsetDifference = adjustedScrollOffset() - oldScrollOffset;
localExposeRect.move(-LayoutSize(scrollOffsetDifference));
return LayoutRect(box().localToAbsoluteQuad(FloatQuad(FloatRect(localExposeRect)), UseTransforms).boundingBox());

Powered by Google App Engine
This is Rietveld 408576698