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

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

Issue 2336013002: ScrollRectToVisible should bubble up through its layout container. (Closed)
Patch Set: Modify the test for Mac Created 4 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/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index f3710f0d20314c96e033feab385d84e7201682cc..02651493bd02da8ba2ce629dce3a5d8ba00629f5 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1413,8 +1413,11 @@ LayoutRect PaintLayerScrollableArea::scrollIntoView(const LayoutRect& rect, cons
LayoutRect r = ScrollAlignment::getRectToExpose(layerBounds, localExposeRect, alignX, alignY);
DoublePoint clampedScrollPosition = clampScrollPosition(scrollPositionDouble() + roundedIntSize(r.location()));
- if (clampedScrollPosition == scrollPositionDouble())
+ if (clampedScrollPosition == scrollPositionDouble()) {
+ if (scrollPositionDouble() + roundedIntSize(r.location()) != scrollPositionDouble())
bokan 2016/09/13 14:38:46 There's no need to get this far. Just check at the
+ return rect;
return LayoutRect(box().localToAbsoluteQuad(FloatQuad(FloatRect(intersection(layerBounds, localExposeRect))), UseTransforms).boundingBox());
+ }
DoubleSize oldScrollOffset = adjustedScrollOffset();
scrollToPosition(clampedScrollPosition, ScrollOffsetUnclamped, ScrollBehaviorInstant, scrollType);

Powered by Google App Engine
This is Rietveld 408576698