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

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

Issue 456963002: Delete RenderLayer::setHasVisibleContent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline inspector test Created 6 years, 4 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/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 5c355e72175f2df2b85557ac3c216690e29c6ab3..339e9f7e028b2a33a822662d242eb8bdf79ff9d7 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -593,23 +593,6 @@ LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderO
return rect;
}
-void RenderLayer::setHasVisibleContent()
-{
- if (m_hasVisibleContent && !m_visibleContentStatusDirty) {
- ASSERT(!parent() || parent()->m_visibleDescendantStatusDirty || parent()->hasVisibleDescendant());
- return;
- }
-
- m_hasVisibleContent = true;
- m_visibleContentStatusDirty = false;
-
- setNeedsCompositingInputsUpdate();
- m_renderer->setPreviousPaintInvalidationRect(m_renderer->boundsRectForPaintInvalidation(m_renderer->containerForPaintInvalidation()));
-
- if (parent())
- parent()->dirtyAncestorChainVisibleDescendantStatus();
-}
-
void RenderLayer::dirtyVisibleContentStatus()
{
m_visibleContentStatusDirty = true;
@@ -745,10 +728,14 @@ void RenderLayer::updateDescendantDependentFlags()
}
m_visibleContentStatusDirty = false;
- // FIXME: We can remove this code once we remove the recursive tree
- // walk inside updateGraphicsLayerGeometry.
- if (hasVisibleContent() != previouslyHasVisibleContent)
+ if (hasVisibleContent() != previouslyHasVisibleContent) {
setNeedsCompositingInputsUpdate();
+ // We need to tell m_renderer to recheck its rect because we
+ // pretend that invisible RenderObjects have 0x0 rects. Changing
+ // visibility therefore changes our rect and we need to visit
+ // this RenderObject during the invalidateTreeIfNeeded walk.
+ m_renderer->setMayNeedPaintInvalidation(true);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698