Chromium Code Reviews| Index: Source/core/layout/LayoutObject.cpp |
| diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
| index 28c61e1fc62b67b095b35bab84d089161fb73d33..9dec2ec3829943faaf8fe6984d0f91e2192282b4 100644 |
| --- a/Source/core/layout/LayoutObject.cpp |
| +++ b/Source/core/layout/LayoutObject.cpp |
| @@ -675,7 +675,7 @@ LayoutFlowThread* LayoutObject::locateFlowThreadContainingBlock() const |
| bool LayoutObject::skipInvalidationWhenLaidOutChildren() const |
| { |
| - if (!neededLayoutBecauseOfChildren()) |
| + if (!m_bitfields.neededLayoutBecauseOfChildren()) |
| return false; |
| // SVG layoutObjects need to be invalidated when their children are laid out. |
| @@ -1281,6 +1281,7 @@ void LayoutObject::setPreviousSelectionRectForPaintInvalidation(const LayoutRect |
| selectionPaintInvalidationMap->set(this, selectionRect); |
| } |
| +// TODO(wangxianzhu): Remove this for slimming paint v2 because we don't care about paint invalidation rects. |
|
leviw_travelin_and_unemployed
2015/08/21 18:35:55
s/don't/won't/?
Xianzhu
2015/08/21 19:40:01
Done.
|
| inline void LayoutObject::invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason invalidationReason) |
| { |
| // Update selection rect when we are doing full invalidation (in case that the object is moved, composite status changed, etc.) |
| @@ -3133,16 +3134,7 @@ static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason(con |
| inline void LayoutObject::markContainerChainForPaintInvalidation() |
| { |
| for (LayoutObject* container = this->containerCrossingFrameBoundaries(); container && !container->shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); container = container->containerCrossingFrameBoundaries()) |
| - container->setSelfMayNeedPaintInvalidation(); |
| -} |
| - |
| -void LayoutObject::setLayoutDidGetCalledSinceLastFrame() |
| -{ |
| - m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); |
| - |
| - // Make sure our parent is marked as needing invalidation. |
| - // This would be unneeded if we allowed sub-tree invalidation (akin to sub-tree layouts). |
| - markContainerChainForPaintInvalidation(); |
| + container->m_bitfields.setChildShouldCheckForPaintInvalidation(true); |
| } |
| void LayoutObject::setShouldInvalidateSelection() |
| @@ -3179,32 +3171,21 @@ void LayoutObject::setMayNeedPaintInvalidation() |
| if (mayNeedPaintInvalidation()) |
| return; |
| m_bitfields.setMayNeedPaintInvalidation(true); |
| - // Make sure our parent is marked as needing invalidation. |
| markContainerChainForPaintInvalidation(); |
| frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). |
| } |
| -void LayoutObject::clearMayNeedPaintInvalidation() |
| -{ |
| - m_bitfields.setMayNeedPaintInvalidation(false); |
| -} |
| - |
| -void LayoutObject::setSelfMayNeedPaintInvalidation() |
| -{ |
| - m_bitfields.setMayNeedPaintInvalidation(true); |
| -} |
| - |
| void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState) |
| { |
| // paintInvalidationStateIsDirty should be kept in sync with the |
| // booleans that are cleared below. |
| ASSERT(paintInvalidationState.ancestorHadPaintInvalidationForLocationChange() || paintInvalidationStateIsDirty()); |
| clearShouldDoFullPaintInvalidation(); |
| - setNeededLayoutBecauseOfChildren(false); |
| - setShouldInvalidateOverflowForPaint(false); |
| - clearLayoutDidGetCalledSinceLastFrame(); |
| - clearMayNeedPaintInvalidation(); |
| - clearShouldInvalidateSelection(); |
| + m_bitfields.setChildShouldCheckForPaintInvalidation(false); |
| + m_bitfields.setNeededLayoutBecauseOfChildren(false); |
| + m_bitfields.setShouldInvalidateOverflowForPaint(false); |
| + m_bitfields.setMayNeedPaintInvalidation(false); |
| + m_bitfields.setShouldInvalidateSelection(false); |
| } |
| bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) |