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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1775013003: Implement -webkit-box-reflect as a filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 years, 9 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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 215e0e023d6fafa9a0c9ee9a6dcd8b491c6ca25b..26c095ba728c5d6a1ac8a715e8357732f1f625b7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1347,7 +1347,7 @@ static bool isCandidateForOpaquenessTest(const LayoutBox& childBox)
// FIXME: Deal with z-index.
if (!childStyle.hasAutoZIndex())
return false;
- if (childLayer->hasTransformRelatedProperty() || childLayer->isTransparent() || childLayer->hasFilter())
+ if (childLayer->hasTransformRelatedProperty() || childLayer->isTransparent() || childLayer->hasFilterInducingProperty())
return false;
if (childBox.hasOverflowClip() && childStyle.hasBorderRadius())
return false;
@@ -2017,10 +2017,10 @@ bool LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance
void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& paintInvalidationRect) const
{
- if (hasReflection())
+ if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && hasReflection())
paintInvalidationRect.unite(reflectedRect(paintInvalidationRect));
- if (layer() && layer()->hasFilter())
+ if (layer() && layer()->hasFilterInducingProperty())
paintInvalidationRect.expand(layer()->filterOutsets());
}
@@ -3868,7 +3868,7 @@ PaintInvalidationReason LayoutBox::getPaintInvalidationReason(const LayoutBoxMod
if (hasNonCompositedScrollbars())
return PaintInvalidationBorderBoxChange;
- if (style()->hasVisualOverflowingEffect() || style()->hasAppearance() || style()->hasFilter() || style()->resize() != RESIZE_NONE)
+ if (style()->hasVisualOverflowingEffect() || style()->hasAppearance() || style()->hasFilterInducingProperty() || style()->resize() != RESIZE_NONE)
return PaintInvalidationBorderBoxChange;
if (style()->hasBorderRadius()) {

Powered by Google App Engine
This is Rietveld 408576698