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

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

Issue 2265813002: Add a hack to set shouldPaint to true for force-composited iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new test to SPv2 expectations. Created 4 years, 4 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 e5e5c68cd33972c9ed798ab93c685111967bfc0b..482e8858307dc5a3f2c89cc72580da1e4756efed 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2443,15 +2443,25 @@ bool PaintLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
return false;
}
-bool PaintLayer::shouldBeSelfPaintingLayer() const
+bool PaintLayer::isSelfPaintingLayerForIntrinsicOrScrollingReasons() const
{
- if (layoutObject()->isLayoutPart() && toLayoutPart(layoutObject())->requiresAcceleratedCompositing())
- return true;
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();
+}
+
void PaintLayer::updateSelfPaintingLayer()
{
bool isSelfPaintingLayer = shouldBeSelfPaintingLayer();
« 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