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

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

Issue 2318243002: Promote opaque fixed position elements. (Closed)
Patch Set: Use ScopedRuntimeEnabledFeatureForTest. Created 4 years, 3 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
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 0f1dcb765cacd224c61f36b898d72c3dbcca6389..adc426661d34494263d97a0b7c86df47ea099c77 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2448,7 +2448,12 @@ bool PaintLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
return false;
// FIXME: Handle simple transforms.
- if (paintsWithTransform(GlobalPaintNormalPhase))
+ if (transform() && compositingState() != PaintsIntoOwnBacking)
+ return false;
+
+ if (!RuntimeEnabledFeatures::compositeOpaqueFixedPositionEnabled()
+ && layoutObject()->style()->position() == FixedPosition
+ && compositingState() != PaintsIntoOwnBacking)
return false;
// This function should not be called when layer-lists are dirty.

Powered by Google App Engine
This is Rietveld 408576698