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

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

Issue 2482353002: Revert of Tracking filter mutation via SVGElementProxy (Closed)
Patch Set: 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 ccb4b0496792004ba6ec5b3f747668aa34155b87..77b99c825d2df639ed17b430763d369a932dd3b8 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 @@
Filter* FilterEffectBuilder::buildReferenceFilter(
const ReferenceFilterOperation& referenceOperation,
FilterEffect* previousEffect) const {
- DCHECK(m_targetContext);
- Element* filterElement = referenceOperation.elementProxy().findElement(
- m_targetContext->treeScope());
- if (!isSVGFilterElement(filterElement))
+ DCHECK(m_targetContext && m_targetContext->isElementNode());
+ SVGFilterElement* filterElement =
+ ReferenceFilterBuilder::resolveFilterReference(
+ referenceOperation, toElement(*m_targetContext));
+ if (!filterElement)
return nullptr;
- return buildReferenceFilter(toSVGFilterElement(*filterElement),
- previousEffect);
+ return buildReferenceFilter(*filterElement, previousEffect);
}
Filter* FilterEffectBuilder::buildReferenceFilter(

Powered by Google App Engine
This is Rietveld 408576698