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

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

Issue 662483002: Ensure positioned descendants are invalidated if needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index a5c14bc68a7a298d72b03c404ea0cf6eec51ab31..942bac8670d2c90e727d2ecdd0c14bfccf2f5594 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -375,20 +375,13 @@ void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRenderObject(this);
}
-void RenderBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
+void RenderBlock::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState)
{
- // Note, we don't want to early out here using shouldCheckForInvalidationAfterLayout as
- // we have to make sure we go through any positioned objects as they won't be seen in
dsinclair 2014/10/16 13:32:37 Since we no longer override invalidateTreeIfNeeded
Xianzhu 2014/10/16 17:37:14 The previous logic walks 1 extra level into the po
- // the normal tree walk.
-
- RenderBox::invalidateTreeIfNeeded(paintInvalidationState);
+ RenderBox::invalidatePaintOfSubtreesIfNeeded(childPaintInvalidationState);
// Take care of positioned objects. This is required as PaintInvalidationState keeps a single clip rect.
if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects()) {
TrackedRendererListHashSet::iterator end = positionedObjects->end();
- bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer();
- const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer());
- PaintInvalidationState childPaintInvalidationState(paintInvalidationState, *this, newPaintInvalidationContainer);
for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(); it != end; ++it) {
RenderBox* box = *it;
@@ -399,7 +392,7 @@ void RenderBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintInva
// If it's a new paint invalidation container, we won't have properly accumulated the offset into the
// PaintInvalidationState.
// FIXME: Teach PaintInvalidationState to handle this case. crbug.com/371485
- if (&paintInvalidationContainerForChild != newPaintInvalidationContainer) {
+ if (paintInvalidationContainerForChild != childPaintInvalidationState.paintInvalidationContainer()) {
ForceHorriblySlowRectMapping slowRectMapping(&childPaintInvalidationState);
PaintInvalidationState disabledPaintInvalidationState(childPaintInvalidationState, *this, paintInvalidationContainerForChild);
box->invalidateTreeIfNeeded(disabledPaintInvalidationState);

Powered by Google App Engine
This is Rietveld 408576698