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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1299323005: blink: Add backdrop-filter support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed some todos Created 5 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
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index 28c61e1fc62b67b095b35bab84d089161fb73d33..699300108431bdbe4f8b794f0a5fb9faa0395217 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1700,6 +1700,13 @@ StyleDifference LayoutObject::adjustStyleDifference(StyleDifference diff) const
diff.setNeedsPaintInvalidationLayer();
}
+ // If backdrop filter changed, and the layer does not paint into its own separate backing or it paints with filters, then we need to invalidate paints.
+ if (diff.backdropFilterChanged() && hasLayer()) {
+ DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
+ if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paintsWithBackdropFilters())
+ diff.setNeedsPaintInvalidationLayer();
+ }
+
if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
if (style()->hasBorder() || style()->hasOutline()
|| (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace()))

Powered by Google App Engine
This is Rietveld 408576698