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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1775013003: Implement -webkit-box-reflect as a filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make msvc dbg happy 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/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 9a833b488ea0c1837e14b31b9a1f301865e6d40d..67503343f4d4f9c05e7ac004f6fd5f101c1a8173 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -717,10 +717,15 @@ public:
bool hasMask() const { return style() && style()->hasMask(); }
bool hasClipPath() const { return style() && style()->clipPath(); }
bool hasHiddenBackface() const { return style() && style()->backfaceVisibility() == BackfaceVisibilityHidden; }
-
- bool hasFilter() const { return style() && style()->hasFilter(); }
bool hasBackdropFilter() const { return style() && style()->hasBackdropFilter(); }
+ // Returns |true| if any property that renders using filter operations is
+ // used (including, but not limited to, 'filter').
+ bool hasFilterInducingProperty() const
+ {
+ return (style() && style()->hasFilter()) || (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && hasReflection());
+ }
+
bool hasShapeOutside() const { return style() && style()->shapeOutside(); }
inline bool preservesNewline() const;
@@ -1267,7 +1272,7 @@ public:
bool shouldUseTransformFromContainer(const LayoutObject* container) const;
void getTransformFromContainer(const LayoutObject* container, const LayoutSize& offsetInContainer, TransformationMatrix&) const;
- bool createsGroup() const { return isTransparent() || hasMask() || hasFilter() || style()->hasBlendMode(); }
+ bool createsGroup() const { return isTransparent() || hasMask() || hasFilterInducingProperty() || style()->hasBlendMode(); }
// Collects rectangles that the outline of this object would be drawing along the outside of,
// even if the object isn't styled with a outline for now. The rects also cover continuations.
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698