Chromium Code Reviews| Index: Source/core/rendering/PaintInvalidationState.cpp |
| diff --git a/Source/core/rendering/PaintInvalidationState.cpp b/Source/core/rendering/PaintInvalidationState.cpp |
| index 65ad3d5be60264465f36bffbd354e1f6daf576b2..0a7f60cad22f3e6a5da6b532c953b40cef17888c 100644 |
| --- a/Source/core/rendering/PaintInvalidationState.cpp |
| +++ b/Source/core/rendering/PaintInvalidationState.cpp |
| @@ -16,6 +16,7 @@ namespace blink { |
| PaintInvalidationState::PaintInvalidationState(RenderObject& renderer) |
| : m_clipped(false) |
| , m_cachedOffsetsEnabled(true) |
| + , m_forceCheckForPaintInvalidation(false) |
| , m_paintInvalidationContainer(*renderer.containerForPaintInvalidation()) |
| , m_renderer(renderer) |
| { |
| @@ -43,6 +44,7 @@ PaintInvalidationState::PaintInvalidationState(RenderObject& renderer) |
| PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& next, RenderSVGModelObject& renderer, const RenderLayerModelObject& paintInvalidationContainer) |
| : m_clipped(next.m_clipped) |
| , m_cachedOffsetsEnabled(next.m_cachedOffsetsEnabled) |
| + , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation) |
| , m_paintInvalidationContainer(paintInvalidationContainer) |
| , m_renderer(renderer) |
| { |
| @@ -53,11 +55,14 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex |
| PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& next, RenderInline& renderer, const RenderLayerModelObject& paintInvalidationContainer) |
| : m_clipped(false) |
| , m_cachedOffsetsEnabled(true) |
| + , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation) |
| , m_paintInvalidationContainer(paintInvalidationContainer) |
| , m_renderer(renderer) |
| { |
| bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer; |
| - if (!establishesPaintInvalidationContainer) { |
| + if (establishesPaintInvalidationContainer) { |
| + m_forceCheckForPaintInvalidation = false; |
|
Julien - ping for review
2014/08/01 21:20:01
Let's add a comment about why we clear the flag as
abarth-chromium
2014/08/01 21:22:51
Ok.
|
| + } else { |
| if (!renderer.supportsLayoutStateCachedOffsets() || !next.m_cachedOffsetsEnabled) { |
| m_cachedOffsetsEnabled = false; |
| } else if (m_cachedOffsetsEnabled) { |
| @@ -78,13 +83,16 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex |
| PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& next, RenderBox& renderer, const RenderLayerModelObject& paintInvalidationContainer) |
| : m_clipped(false) |
| , m_cachedOffsetsEnabled(true) |
| + , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation) |
| , m_paintInvalidationContainer(paintInvalidationContainer) |
| , m_renderer(renderer) |
| { |
| bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer; |
| bool fixed = m_renderer.isOutOfFlowPositioned() && m_renderer.style()->position() == FixedPosition; |
| - if (!establishesPaintInvalidationContainer) { |
| + if (establishesPaintInvalidationContainer) { |
| + m_forceCheckForPaintInvalidation = false; |
|
Julien - ping for review
2014/08/01 21:20:01
Ditto.
|
| + } else { |
| if (!renderer.supportsLayoutStateCachedOffsets() || !next.m_cachedOffsetsEnabled) { |
| m_cachedOffsetsEnabled = false; |
| } else { |