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

Unified Diff: Source/core/style/StyleRareNonInheritedData.cpp

Issue 1299323005: blink: Add backdrop-filter support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: one more 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/style/StyleRareNonInheritedData.cpp
diff --git a/Source/core/style/StyleRareNonInheritedData.cpp b/Source/core/style/StyleRareNonInheritedData.cpp
index 460563c08ac9ea35480462c6c48aa04ccb3a08e5..0d775e5b37259240199425c25de55d7ff8f3bf02 100644
--- a/Source/core/style/StyleRareNonInheritedData.cpp
+++ b/Source/core/style/StyleRareNonInheritedData.cpp
@@ -41,7 +41,7 @@ public:
LineClampValue lineClamps;
DraggableRegionMode draggableRegions;
- void* dataRefs[9];
+ void* dataRefs[10];
void* ownPtrs[4];
#if ENABLE(OILPAN)
Persistent<void*> persistentHandles[2];
@@ -109,9 +109,11 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
, m_hasCurrentOpacityAnimation(false)
, m_hasCurrentTransformAnimation(false)
, m_hasCurrentFilterAnimation(false)
+ , m_hasCurrentBackdropFilterAnimation(false)
, m_runningOpacityAnimationOnCompositor(false)
, m_runningTransformAnimationOnCompositor(false)
, m_runningFilterAnimationOnCompositor(false)
+ , m_runningBackdropFilterAnimationOnCompositor(false)
, m_effectiveBlendMode(ComputedStyle::initialBlendMode())
, m_touchAction(ComputedStyle::initialTouchAction())
, m_objectFit(ComputedStyle::initialObjectFit())
@@ -142,6 +144,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
, m_transform(o.m_transform)
, m_willChange(o.m_willChange)
, m_filter(o.m_filter)
+ , m_backdropFilter(o.m_backdropFilter)
, m_grid(o.m_grid)
, m_gridItem(o.m_gridItem)
, m_scrollSnap(o.m_scrollSnap)
@@ -185,9 +188,11 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
, m_hasCurrentOpacityAnimation(o.m_hasCurrentOpacityAnimation)
, m_hasCurrentTransformAnimation(o.m_hasCurrentTransformAnimation)
, m_hasCurrentFilterAnimation(o.m_hasCurrentFilterAnimation)
+ , m_hasCurrentBackdropFilterAnimation(o.m_hasCurrentBackdropFilterAnimation)
, m_runningOpacityAnimationOnCompositor(o.m_runningOpacityAnimationOnCompositor)
, m_runningTransformAnimationOnCompositor(o.m_runningTransformAnimationOnCompositor)
, m_runningFilterAnimationOnCompositor(o.m_runningFilterAnimationOnCompositor)
+ , m_runningBackdropFilterAnimationOnCompositor(o.m_runningBackdropFilterAnimationOnCompositor)
, m_effectiveBlendMode(o.m_effectiveBlendMode)
, m_touchAction(o.m_touchAction)
, m_objectFit(o.m_objectFit)
@@ -206,6 +211,10 @@ StyleRareNonInheritedData::~StyleRareNonInheritedData()
const FilterOperations& filterOperations = m_filter->m_operations;
for (unsigned i = 0; i < filterOperations.size(); ++i)
ReferenceFilterBuilder::clearDocumentResourceReference(filterOperations.at(i));
+
+ const FilterOperations& backdropFilterOperations = m_backdropFilter->m_operations;
+ for (unsigned i = 0; i < backdropFilterOperations.size(); ++i)
+ ReferenceFilterBuilder::clearDocumentResourceReference(backdropFilterOperations.at(i));
}
bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) const
@@ -224,6 +233,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
&& m_transform == o.m_transform
&& m_willChange == o.m_willChange
&& m_filter == o.m_filter
+ && m_backdropFilter == o.m_backdropFilter
&& m_grid == o.m_grid
&& m_gridItem == o.m_gridItem
&& m_scrollSnap == o.m_scrollSnap
@@ -268,6 +278,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
&& m_hasCurrentOpacityAnimation == o.m_hasCurrentOpacityAnimation
&& m_hasCurrentTransformAnimation == o.m_hasCurrentTransformAnimation
&& m_hasCurrentFilterAnimation == o.m_hasCurrentFilterAnimation
+ && m_hasCurrentBackdropFilterAnimation == o.m_hasCurrentBackdropFilterAnimation
&& m_effectiveBlendMode == o.m_effectiveBlendMode
&& m_touchAction == o.m_touchAction
&& m_objectFit == o.m_objectFit
@@ -331,6 +342,11 @@ bool StyleRareNonInheritedData::hasFilters() const
return m_filter.get() && !m_filter->m_operations.isEmpty();
}
+bool StyleRareNonInheritedData::hasBackdropFilters() const
+{
+ return m_backdropFilter.get() && !m_backdropFilter->m_operations.isEmpty();
+}
+
bool StyleRareNonInheritedData::shapeOutsideDataEquivalent(const StyleRareNonInheritedData& o) const
{
return dataEquivalent(m_shapeOutside, o.m_shapeOutside);

Powered by Google App Engine
This is Rietveld 408576698