RESOLVED FIXED215409
getPropertyValue for url path doesn't return the "#" character
https://bugs.webkit.org/show_bug.cgi?id=215409
Summary getPropertyValue for url path doesn't return the "#" character
Thien
Reported 2020-08-12 03:59:09 PDT
When calling getPropertyValue of a property that is a url(...) pointing to another element (common in SVG), the result is returned without the "#" part. For example, the CSS: ``` marker-mid: url(#dot) ``` The returned string in: - Firefox 79: "url(#dot)" - Chrome 84: "url(#dot)" - Safari 13: "url(dot)" Demo: https://codesandbox.io/s/modest-moon-z98tr?file=/index.html
Attachments
Patch (3.13 KB, patch)
2021-05-01 06:06 PDT, Rob Buis
no flags
Patch (6.85 KB, patch)
2021-05-02 04:00 PDT, Rob Buis
no flags
Patch (2.55 KB, patch)
2021-05-03 00:59 PDT, Rob Buis
ews-feeder: commit-queue-
Radar WebKit Bug Importer
Comment 1 2020-08-12 11:00:12 PDT
Rob Buis
Comment 2 2021-05-01 06:06:28 PDT
Rob Buis
Comment 3 2021-05-02 04:00:32 PDT
EWS
Comment 4 2021-05-02 12:08:40 PDT
Committed r276888 (237234@main): <https://commits.webkit.org/237234@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427523 [details].
Darin Adler
Comment 5 2021-05-02 17:52:46 PDT
Comment on attachment 427523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427523&action=review > Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:125 > + return CSSPrimitiveValue::create(makeString('#', svgStyle.maskerResource()), CSSUnitType::CSS_URI); More efficient because it uses '#'. > Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:139 > + return CSSPrimitiveValue::create(makeString("#", svgStyle.markerEndResource()), CSSUnitType::CSS_URI); Slightly less efficient because it uses "#". Should be consistent.
Rob Buis
Comment 6 2021-05-03 00:59:52 PDT
Reopening to attach new patch.
Rob Buis
Comment 7 2021-05-03 00:59:55 PDT
Rob Buis
Comment 8 2021-05-03 02:07:13 PDT
Comment on attachment 427523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427523&action=review >> Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:125 >> + return CSSPrimitiveValue::create(makeString('#', svgStyle.maskerResource()), CSSUnitType::CSS_URI); > > More efficient because it uses '#'. I see. >> Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:139 >> + return CSSPrimitiveValue::create(makeString("#", svgStyle.markerEndResource()), CSSUnitType::CSS_URI); > > Slightly less efficient because it uses "#". Should be consistent. I intended to at least be consistent but failed there, so I made a fix-up patch.
EWS
Comment 9 2021-05-03 02:24:43 PDT
Committed r276894 (237240@main): <https://commits.webkit.org/237240@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427542 [details].
Note You need to log in before you can comment on or make changes to this bug.