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

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

Issue 2401343002: Tracking filter mutation via SVGElementProxy (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/FilterEffectBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp b/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp
index 77b99c825d2df639ed17b430763d369a932dd3b8..ccb4b0496792004ba6ec5b3f747668aa34155b87 100644
--- a/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp
@@ -26,8 +26,8 @@
#include "core/paint/FilterEffectBuilder.h"
-#include "core/layout/svg/ReferenceFilterBuilder.h"
#include "core/style/FilterOperations.h"
+#include "core/svg/SVGElementProxy.h"
#include "core/svg/SVGFilterElement.h"
#include "core/svg/SVGLengthContext.h"
#include "core/svg/graphics/filters/SVGFilterBuilder.h"
@@ -404,13 +404,13 @@ CompositorFilterOperations FilterEffectBuilder::buildFilterOperations(
Filter* FilterEffectBuilder::buildReferenceFilter(
const ReferenceFilterOperation& referenceOperation,
FilterEffect* previousEffect) const {
- DCHECK(m_targetContext && m_targetContext->isElementNode());
- SVGFilterElement* filterElement =
- ReferenceFilterBuilder::resolveFilterReference(
- referenceOperation, toElement(*m_targetContext));
- if (!filterElement)
+ DCHECK(m_targetContext);
+ Element* filterElement = referenceOperation.elementProxy().findElement(
+ m_targetContext->treeScope());
+ if (!isSVGFilterElement(filterElement))
return nullptr;
- return buildReferenceFilter(*filterElement, previousEffect);
+ return buildReferenceFilter(toSVGFilterElement(*filterElement),
+ previousEffect);
}
Filter* FilterEffectBuilder::buildReferenceFilter(

Powered by Google App Engine
This is Rietveld 408576698