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

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

Issue 8520027: Merge 99752 - REGRESSION (r93614): Content remains despite parent element being scrolled off page... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 1 month 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 | « Source/WebCore/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderLayer.cpp
===================================================================
--- Source/WebCore/rendering/RenderLayer.cpp (revision 100350)
+++ Source/WebCore/rendering/RenderLayer.cpp (working copy)
@@ -156,6 +156,7 @@
, m_mustOverlapCompositedLayers(false)
#endif
, m_containsDirtyOverlayScrollbars(false)
+ , m_canSkipRepaintRectsUpdateOnScroll(renderer->isTableCell())
, m_renderer(renderer)
, m_parent(0)
, m_previous(0)
@@ -423,7 +424,7 @@
m_outlineBox = IntRect();
}
-void RenderLayer::updateLayerPositionsAfterScroll(bool fixed)
+void RenderLayer::updateLayerPositionsAfterScroll(UpdateLayerPositionsAfterScrollFlags flags)
{
ASSERT(!m_visibleContentStatusDirty);
@@ -435,19 +436,26 @@
updateLayerPosition();
- if (fixed || renderer()->style()->position() == FixedPosition) {
+ if ((flags & HasSeenFixedPositionedAncestor) || renderer()->style()->position() == FixedPosition) {
// FIXME: Is it worth passing the offsetFromRoot around like in updateLayerPositions?
computeRepaintRects();
- fixed = true;
+ flags |= HasSeenFixedPositionedAncestor;
} else if (renderer()->hasTransform() && !renderer()->isRenderView()) {
// Transforms act as fixed position containers, so nothing inside a
// transformed element can be fixed relative to the viewport if the
// transformed element is not fixed itself or child of a fixed element.
return;
+ } else if ((flags & HasSeenAncestorWithOverflowClip) && !m_canSkipRepaintRectsUpdateOnScroll) {
+ // If we have seen an overflow clip, we should update our repaint rects as clippedOverflowRectForRepaint
+ // intersects it with our ancestor overflow clip that may have moved.
+ computeRepaintRects();
}
+ if (renderer()->hasOverflowClip())
+ flags |= HasSeenAncestorWithOverflowClip;
+
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
- child->updateLayerPositionsAfterScroll(fixed);
+ child->updateLayerPositionsAfterScroll(flags);
// We don't update our reflection as scrolling is a translation which does not change the size()
// of an object, thus RenderReplica will still repaint itself properly as the layer position was
« no previous file with comments | « Source/WebCore/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698