Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| index 168383e4077bc5da12b3a5d8b84841d30bb4efcc..8ee0fafbe65b04147ab57d4ca81000c3a39a88f5 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| @@ -157,6 +157,7 @@ PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject) |
| m_hasNonIsolatedDescendantWithBlendMode(false), |
| m_hasAncestorWithClipPath(false), |
| m_hasRootScrollerAsDescendant(false), |
| + m_selfPaintingStatusChanged(false), |
| m_layoutObject(layoutObject), |
| m_parent(0), |
| m_previous(0), |
| @@ -1516,15 +1517,7 @@ LayoutPoint PaintLayer::visualOffsetFromAncestor( |
| } |
| void PaintLayer::didUpdateNeedsCompositedScrolling() { |
| - bool wasSelfPaintingLayer = isSelfPaintingLayer(); |
| updateSelfPaintingLayer(); |
| - |
| - // If the floating object becomes non-self-painting, so some ancestor should |
| - // paint it; if it becomes self-painting, it should paint itself and no |
| - // ancestor should paint it. |
| - if (wasSelfPaintingLayer != isSelfPaintingLayer() && |
| - m_layoutObject->isFloating()) |
| - LayoutBlockFlow::setAncestorShouldPaintFloatingObject(*layoutBox()); |
|
Xianzhu
2017/01/25 17:44:28
This logic is moved into CompositingInputsUpdater.
|
| } |
| void PaintLayer::updateStackingNode() { |
| @@ -2793,22 +2786,14 @@ bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect( |
| return false; |
| } |
| -bool PaintLayer::isSelfPaintingLayerForIntrinsicOrScrollingReasons() const { |
| - return layoutObject()->layerTypeRequired() == NormalPaintLayer || |
| - (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) || |
| - needsCompositedScrolling(); |
| -} |
| - |
| bool PaintLayer::shouldBeSelfPaintingLayer() const { |
| if (layoutObject()->isLayoutPart() && |
| toLayoutPart(layoutObject())->requiresAcceleratedCompositing()) |
| return true; |
| - return isSelfPaintingLayerForIntrinsicOrScrollingReasons(); |
| -} |
| -bool PaintLayer::isSelfPaintingOnlyBecauseIsCompositedPart() const { |
| - return shouldBeSelfPaintingLayer() && |
| - !isSelfPaintingLayerForIntrinsicOrScrollingReasons(); |
| + return layoutObject()->layerTypeRequired() == NormalPaintLayer || |
| + (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) || |
| + needsCompositedScrolling(); |
| } |
| void PaintLayer::updateSelfPaintingLayer() { |
| @@ -2817,6 +2802,7 @@ void PaintLayer::updateSelfPaintingLayer() { |
| return; |
| m_isSelfPaintingLayer = isSelfPaintingLayer; |
| + m_selfPaintingStatusChanged = true; |
| if (PaintLayer* parent = this->parent()) { |
| parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |