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

Unified Diff: third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.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/css/resolver/FilterOperationResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp b/third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp
index 6ac699796981b0e6edd8f111ba41b2c62cdfb1a5..041f1914cd3145754a62c46196089ce2942d2042 100644
--- a/third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/FilterOperationResolver.cpp
@@ -36,6 +36,8 @@
#include "core/css/CSSURIValue.h"
#include "core/css/resolver/StyleResolverState.h"
#include "core/frame/UseCounter.h"
+#include "core/layout/svg/ReferenceFilterBuilder.h"
+#include "core/svg/SVGURIReference.h"
namespace blink {
@@ -133,10 +135,19 @@
countFilterUse(FilterOperation::REFERENCE, state.document());
const CSSURIValue& urlValue = toCSSURIValue(*currValue);
- SVGElementProxy& elementProxy =
- state.elementStyleResources().cachedOrPendingFromValue(urlValue);
- operations.operations().append(
- ReferenceFilterOperation::create(urlValue.value(), elementProxy));
+ SVGURLReferenceResolver resolver(urlValue.value(), state.document());
+ ReferenceFilterOperation* operation = ReferenceFilterOperation::create(
+ urlValue.value(), resolver.fragmentIdentifier());
+ if (!resolver.isLocal()) {
+ if (!urlValue.loadRequested())
+ state.elementStyleResources().addPendingSVGDocument(operation,
+ &urlValue);
+ else if (urlValue.cachedDocument())
+ ReferenceFilterBuilder::setDocumentResourceReference(
+ operation,
+ new DocumentResourceReference(urlValue.cachedDocument()));
+ }
+ operations.operations().append(operation);
continue;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698