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

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

Issue 2651253003: Revert of Fix shouldPaint issue when a composited floating iframe becomes non-self-painting (Closed)
Patch Set: 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 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();
« 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