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

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

Issue 209663007: Fix bug in scrollParent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | 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 412d4c5733a6563737763f5bef9ad6837af969c8..20f618d211c61b254a05595db9ba40aaa1bb68a3 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1752,14 +1752,19 @@ RenderLayer* RenderLayer::scrollParent() const
return m_ancestorDependentPropertyCache->scrollParent();
RenderLayer* scrollParent = ancestorCompositedScrollingLayer();
- if (!scrollParent || scrollParent->stackingNode()->isStackingContainer())
+ if (!scrollParent || scrollParent->stackingNode()->isStackingContainer()) {
+ if (m_ancestorDependentPropertyCache)
+ m_ancestorDependentPropertyCache->setScrollParent(0);
return 0;
+ }
// If we hit a stacking context on our way up to the ancestor scrolling layer, it will already
// be composited due to an overflow scrolling parent, so we don't need to.
for (RenderLayer* ancestor = parent(); ancestor && ancestor != scrollParent; ancestor = ancestor->parent()) {
- if (ancestor->stackingNode()->isStackingContainer())
- return 0;
+ if (ancestor->stackingNode()->isStackingContainer()) {
+ scrollParent = 0;
+ break;
+ }
if (!isInCompositingUpdate())
continue;
if (AncestorDependentPropertyCache* ancestorCache = ancestor->m_ancestorDependentPropertyCache.get()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698