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

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

Issue 204843002: Reduce invalidation on children-needs-layout containers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated patch after Levi's comment + the bots failures 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
Index: Source/core/rendering/LayoutRepainter.cpp
diff --git a/Source/core/rendering/LayoutRepainter.cpp b/Source/core/rendering/LayoutRepainter.cpp
index 0e1f7791ce75f65c0d9aed0d2a2077bdb2f42991..a7bfd3143cd5454a80955b308d4a079a19df806c 100644
--- a/Source/core/rendering/LayoutRepainter.cpp
+++ b/Source/core/rendering/LayoutRepainter.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "core/rendering/LayoutRepainter.h"
+#include "core/rendering/RenderBlock.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderObject.h"
@@ -55,6 +56,15 @@ bool LayoutRepainter::repaintAfterLayout()
if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
return false;
+ if (!m_object.needsLayoutBecauseOfChildren()) {
+ // FIXME: We disable the optimization for SVG renderers for now.
leviw_travelin_and_unemployed 2014/03/20 21:12:13 Looking at this and seeing a FIXME about an optimi
Julien - ping for review 2014/03/20 22:25:33 Done, named it skipInvalidationWhenLayingOutChildr
+ // RenderBlock with line boxes are responsible to repaint them so we can't ignore them.
+ bool rendererDisallowOptimization = m_object.isSVG() || (m_object.isRenderBlock() && toRenderBlock(&m_object)->firstLineBox());
+ bool hasEffectVisualOverflow = m_object.style()->hasVisualOverflowingEffect() || m_object.style()->hasOutline();
+ if (!rendererDisallowOptimization && !hasEffectVisualOverflow && !m_object.style()->hasBorder() && !m_object.style()->hasBackground())
+ return false;
+ }
+
// Hits in compositing/video/video-controls-layer-creation.html
DisableCompositingQueryAsserts disabler;

Powered by Google App Engine
This is Rietveld 408576698