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); |