Bug 308017
| Summary: | SVG patternTransform.baseVal.clear() should cause patternTransform to be ignored | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | SVG | Assignee: | Karl Dubost <karlcow> |
| Status: | NEW | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://wpt.live/svg/pservers/scripted/pattern-transform-clear.svg | ||
| Bug Depends on: | 309642 | ||
| Bug Blocks: | |||
Karl Dubost
http://wpt.fyi/svg/pservers/scripted/pattern-transform-clear.svg
Go to http://wpt.live/svg/pservers/scripted/pattern-transform-clear.svg
PASS in Firefox and Chrome
FAIL in Safari
The markup is
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
<title>SVG Paint Servers: Clear should cause patternTransform to be ignored.</title>
<metadata>
<h:link rel="help" href="https://svgwg.org/svg2-draft/pservers.html#PatternElementPatternTransformAttribute"/>
<h:link rel="match" href="../reftests/reference/green-100x100.svg"/>
</metadata>
<pattern id="p1" patternTransform="scale(2)"/>
<pattern id="p" href="#p1" viewBox="0 0 50 50" patternTransform="scale(1)" width="100%" height="100%">
<rect fill="red" width="50" height="50"/>
<rect fill="green" width="25" height="25"/>
</pattern>
<rect fill="url(#p)" width="100" height="100"/>
<script><![CDATA[
document.getElementById("p").patternTransform.baseVal.clear();
]]></script>
</svg>
SVGTransformList is defined as
https://w3c.github.io/svgwg/svg2-draft/coords.html#InterfaceSVGTransformList
[Exposed=Window]
interface SVGTransformList {
readonly attribute unsigned long length;
readonly attribute unsigned long numberOfItems;
undefined clear();
SVGTransform initialize(SVGTransform newItem);
getter SVGTransform getItem(unsigned long index);
SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index);
SVGTransform replaceItem(SVGTransform newItem, unsigned long index);
SVGTransform removeItem(unsigned long index);
SVGTransform appendItem(SVGTransform newItem);
setter undefined (unsigned long index, SVGTransform newItem);
// Additional methods not common to other list interfaces.
SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
SVGTransform? consolidate();
};
The clear() method is defined as:
https://w3c.github.io/svgwg/svg2-draft/types.html#__svg__SVGNameList__clear
> The clear method is used to remove all items in the list. When clear() is called, the following steps are run:
>
> 1. If the list is read only, then throw a NoModificationAllowedError.
> 2. Detach and then remove all elements in the list.
> 3. If the list reflects an attribute, or represents the base value of an object that reflects an attribute, then reserialize the reflected attribute.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
This is also failing with LBSE. http://wpt.live/svg/pservers/scripted/pattern-transform-clear.svg
Radar WebKit Bug Importer
<rdar://problem/170518953>
Karl Dubost
Pull request: https://github.com/WebKit/WebKit/pull/58833