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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp

Issue 2065593002: Unprefix the CSS 'filter' property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove disabler. Try different DCHECK expressions. Created 4 years, 6 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/svg/SVGLayoutTreeAsText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
index 8fbbbcade8507a67a2784665b489e5ebeb50e85a..e63300200822c780f5e2a3d558abc1d615746e2c 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
@@ -46,6 +46,7 @@
#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/layout/svg/line/SVGInlineTextBox.h"
#include "core/layout/svg/line/SVGRootInlineBox.h"
+#include "core/paint/PaintLayer.h"
#include "core/svg/LinearGradientAttributes.h"
#include "core/svg/PatternAttributes.h"
#include "core/svg/RadialGradientAttributes.h"
@@ -659,14 +660,22 @@ void writeResources(TextStream& ts, const LayoutObject& object, int indent)
ts << " " << clipper->resourceBoundingBox(&layoutObject) << "\n";
}
}
- if (!svgStyle.filterResource().isEmpty()) {
- if (LayoutSVGResourceFilter* filter = getLayoutSVGResourceById<LayoutSVGResourceFilter>(object.document(), svgStyle.filterResource())) {
- writeIndent(ts, indent);
- ts << " ";
- writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource());
- ts << " ";
- writeStandardPrefix(ts, *filter, 0);
- ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n";
+ if (style.hasFilter()) {
+ const FilterOperations& filterOperations = style.filter();
+ if (filterOperations.size() == 1) {
+ const FilterOperation& filterOperation = *filterOperations.at(0);
+ if (filterOperation.type() == FilterOperation::REFERENCE) {
+ const auto& referenceFilterOperation = toReferenceFilterOperation(filterOperation);
+ AtomicString id = SVGURIReference::fragmentIdentifierFromIRIString(referenceFilterOperation.url(), object.document());
+ if (LayoutSVGResourceFilter* filter = getLayoutSVGResourceById<LayoutSVGResourceFilter>(object.document(), id)) {
+ writeIndent(ts, indent);
+ ts << " ";
+ writeNameAndQuotedValue(ts, "filter", id);
+ ts << " ";
+ writeStandardPrefix(ts, *filter, 0);
+ ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n";
+ }
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698