Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2654843004: Fix shouldPaint issue when a composited floating iframe becomes non-self-painting (Closed)
Patch Set: Rename setAncestorShouldPaintFloatingObject to updateAncestorShouldPaintFloatingObject Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
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();
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698