Commit 06f0b6be authored by vollick@chromium.org's avatar vollick@chromium.org

Fix bug in scrollParent

We were early'ing out, but not calling cache->setScrollParent. The result: the
cache thought it was dirty, but it wasn't. This CL fixes that.

BUG=TBD

Review URL: https://codereview.chromium.org/209663007

git-svn-id: svn://svn.chromium.org/blink/trunk@169870 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 19d9b93a
...@@ -1752,14 +1752,19 @@ RenderLayer* RenderLayer::scrollParent() const ...@@ -1752,14 +1752,19 @@ RenderLayer* RenderLayer::scrollParent() const
return m_ancestorDependentPropertyCache->scrollParent(); return m_ancestorDependentPropertyCache->scrollParent();
RenderLayer* scrollParent = ancestorCompositedScrollingLayer(); RenderLayer* scrollParent = ancestorCompositedScrollingLayer();
if (!scrollParent || scrollParent->stackingNode()->isStackingContainer()) if (!scrollParent || scrollParent->stackingNode()->isStackingContainer()) {
if (m_ancestorDependentPropertyCache)
m_ancestorDependentPropertyCache->setScrollParent(0);
return 0; return 0;
}
// If we hit a stacking context on our way up to the ancestor scrolling layer, it will already // 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. // be composited due to an overflow scrolling parent, so we don't need to.
for (RenderLayer* ancestor = parent(); ancestor && ancestor != scrollParent; ancestor = ancestor->parent()) { for (RenderLayer* ancestor = parent(); ancestor && ancestor != scrollParent; ancestor = ancestor->parent()) {
if (ancestor->stackingNode()->isStackingContainer()) if (ancestor->stackingNode()->isStackingContainer()) {
return 0; scrollParent = 0;
break;
}
if (!isInCompositingUpdate()) if (!isInCompositingUpdate())
continue; continue;
if (AncestorDependentPropertyCache* ancestorCache = ancestor->m_ancestorDependentPropertyCache.get()) { if (AncestorDependentPropertyCache* ancestorCache = ancestor->m_ancestorDependentPropertyCache.get()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment