Chromium Code Reviews| Index: Source/core/rendering/LayoutRepainter.cpp |
| diff --git a/Source/core/rendering/LayoutRepainter.cpp b/Source/core/rendering/LayoutRepainter.cpp |
| index 0e1f7791ce75f65c0d9aed0d2a2077bdb2f42991..14d59aff3494348cbdefa1c83561364ca4c5e03d 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" |
| @@ -50,11 +51,27 @@ LayoutRepainter::LayoutRepainter(RenderObject& object, bool checkForRepaint) |
| } |
| } |
| +bool LayoutRepainter::skipInvalidationWhenLayingOutChildren() const |
|
eseidel
2014/03/21 00:37:09
I would have pushed this check onto the RenderObje
Julien - ping for review
2014/03/24 18:00:01
That wouldn't work currently as changing size trig
|
| +{ |
| + if (!m_object.needsLayoutBecauseOfChildren()) |
| + return false; |
| + |
| + // FIXME: We don't skip invalidations for SVG renderers for now. |
|
pdr.
2014/03/21 00:25:06
This is fine, we'll never need this.
Julien - ping for review
2014/03/24 18:00:01
Done.
|
| + // RenderBlock with line boxes are responsible to invalidate them so we can't ignore them. |
| + if (m_object.isSVG() || (m_object.isRenderBlock() && toRenderBlock(&m_object)->firstLineBox())) |
| + return false; |
| + |
| + return !m_object.style()->hasVisualOverflowingEffect() && !m_object.style()->hasBorder() && !m_object.style()->hasBackground(); |
| +} |
| + |
| bool LayoutRepainter::repaintAfterLayout() |
| { |
| if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| return false; |
| + if (skipInvalidationWhenLayingOutChildren()) |
| + return false; |
| + |
| // Hits in compositing/video/video-controls-layer-creation.html |
| DisableCompositingQueryAsserts disabler; |