| 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 8ee0fafbe65b04147ab57d4ca81000c3a39a88f5..168383e4077bc5da12b3a5d8b84841d30bb4efcc 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
|
| @@ -157,7 +157,6 @@
|
| m_hasNonIsolatedDescendantWithBlendMode(false),
|
| m_hasAncestorWithClipPath(false),
|
| m_hasRootScrollerAsDescendant(false),
|
| - m_selfPaintingStatusChanged(false),
|
| m_layoutObject(layoutObject),
|
| m_parent(0),
|
| m_previous(0),
|
| @@ -1517,7 +1516,15 @@
|
| }
|
|
|
| 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());
|
| }
|
|
|
| void PaintLayer::updateStackingNode() {
|
| @@ -2786,14 +2793,22 @@
|
| 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 layoutObject()->layerTypeRequired() == NormalPaintLayer ||
|
| - (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) ||
|
| - needsCompositedScrolling();
|
| + return isSelfPaintingLayerForIntrinsicOrScrollingReasons();
|
| +}
|
| +
|
| +bool PaintLayer::isSelfPaintingOnlyBecauseIsCompositedPart() const {
|
| + return shouldBeSelfPaintingLayer() &&
|
| + !isSelfPaintingLayerForIntrinsicOrScrollingReasons();
|
| }
|
|
|
| void PaintLayer::updateSelfPaintingLayer() {
|
| @@ -2802,7 +2817,6 @@
|
| return;
|
|
|
| m_isSelfPaintingLayer = isSelfPaintingLayer;
|
| - m_selfPaintingStatusChanged = true;
|
|
|
| if (PaintLayer* parent = this->parent()) {
|
| parent->dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
|
|
|