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

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 23472005: div with overflow:hidden scrolls when dragging in a text box (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: div with overflow:hidden scrolls when dragging in a text box Created 7 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
« no previous file with comments | « LayoutTests/fast/events/autoscroll-upwards-propagation-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 957df9c1bf388fec56c0767215b5535b1c098bbc..3395e61cbaa20995f573baca2864da587f1ee776 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1360,9 +1360,9 @@ RenderLayer* RenderLayer::enclosingPositionedAncestor() const
RenderLayer* RenderLayer::enclosingScrollableLayer() const
{
- for (RenderObject* nextRenderer = renderer()->parent(); nextRenderer; nextRenderer = nextRenderer->parent()) {
- if (nextRenderer->isBox() && toRenderBox(nextRenderer)->canBeScrolledAndHasScrollableArea())
- return nextRenderer->enclosingLayer();
+ for (RenderLayer* nextLayer = parent(); nextLayer; nextLayer = nextLayer->parent()) {
+ if (nextLayer->renderer()->isBox() && toRenderBox(nextLayer->renderer())->canBeScrolledAndHasScrollableArea())
+ return nextLayer;
}
return 0;
@@ -2292,6 +2292,9 @@ void RenderLayer::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignm
}
}
+ if (renderer()->frame()->page()->autoscrollInProgress())
+ parentLayer = enclosingScrollableLayer();
+
if (parentLayer)
parentLayer->scrollRectToVisible(newRect, alignX, alignY);
« no previous file with comments | « LayoutTests/fast/events/autoscroll-upwards-propagation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698