@@ -4085,6 +4085,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
4085
4085
<ul class="brief">
4086
4086
<li><dfn data-x-href="https://drafts.fxtf.org/filter-effects/#typedef-filter-value-list"><filter-value-list></dfn></li>
4087
4087
<li><dfn data-x-href="https://drafts.fxtf.org/filter-effects/#filter-primitive-attributes">filter primitive attribute</dfn></li>
4088
+ <li><dfn data-x-href="https://drafts.fxtf.org/filter-effects/#FilterProperty">filter
4089
+ property</dfn></li>
4088
4090
</ul>
4089
4091
</dd>
4090
4092
@@ -60970,7 +60972,7 @@ typedef record<DOMString, any> <dfn>CanvasFilterInput</dfn>;
60970
60972
60971
60973
[Exposed=(Window,Worker,PaintWorkletGlobalScope)]
60972
60974
interface <dfn interface>CanvasFilter</dfn> {
60973
- <span data-x="dom-CanvasFilter">constructor</span>((<code>CanvasFilterInput</code> or sequence<<code>CanvasFilterInput</code>>) filters);
60975
+ <span data-x="dom-CanvasFilter">constructor</span>(optional (<code>CanvasFilterInput</code> or sequence<<code>CanvasFilterInput</code>>) filters);
60974
60976
};
60975
60977
60976
60978
interface mixin <dfn interface>CanvasRect</dfn> {
@@ -66041,12 +66043,11 @@ console.log(pixels.data[2]);
66041
66043
data-x="dom-context-2d-filter">filter</code></dfn> attribute.</p>
66042
66044
66043
66045
<p>Such objects have an associated <dfn data-x="concept-canvas-current-filter">current
66044
- filter</dfn>, which is either "<code data-x="">none</code>", a
66045
- <span><filter-value-list></span>, or a <code>CanvasFilter</code>. Initially the <span
66046
- data-x="concept-canvas-current-filter">current filter</span> is set to "<code
66046
+ filter</dfn>, which is either a string or a <code>CanvasFilter</code>. Initially the <span
66047
+ data-x="concept-canvas-current-filter">current filter</span> is set to the string "<code
66047
66048
data-x="">none</code>". Whenever the value of the <span
66048
66049
data-x="concept-canvas-current-filter">current filter</span> is the string "<code
66049
- data-x="">none</code>", filters will be disabled for the context.</p>
66050
+ data-x="">none</code>" filters will be disabled for the context.</p>
66050
66051
66051
66052
<p>A <span><filter-value-list></span> consists of a sequence of one or more filter
66052
66053
functions or references to SVG filters. The input to the filter is used as the input to the first
@@ -66074,14 +66075,15 @@ console.log(pixels.data[2]);
66074
66075
data-x="concept-canvas-current-filter">current filter</span> to "<code data-x="">none</code>"
66075
66076
and return.</p></li>
66076
66077
66077
- <li><p>Let <var>parsedValue</var> be the result of parsing the given values as a
66078
- <span><filter-value-list></span>. If any property-independent style sheet syntax like
66079
- 'inherit' or 'initial' is present, then this parsing must return failure.</p></li>
66078
+ <li><p>Let <var>parsedValue</var> be the result of <span data-x="parse something according to
66079
+ a CSS grammar">parsing</span> the given values as a <span><filter-value-list></span>. If
66080
+ any property-independent style sheet syntax like 'inherit' or 'initial' is present, then this
66081
+ parsing must return failure.</p></li>
66080
66082
66081
66083
<li><p>If <var>parsedValue</var> is failure, then return.</p></li>
66082
66084
66083
66085
<li><p>Set <span>this</span>'s <span data-x="concept-canvas-current-filter">current
66084
- filter</span> to <var>parsedValue</var> .</p></li>
66086
+ filter</span> to the given value .</p></li>
66085
66087
</ol>
66086
66088
</li>
66087
66089
@@ -66122,15 +66124,18 @@ console.log(pixels.data[2]);
66122
66124
following steps:</p>
66123
66125
66124
66126
<ol>
66125
- <li><p>If <var>attrName </var> is of type "<code data-x="">false | true</code>", then return
66126
- <code data-x="idl-boolean">boolean</code>. </p></li>
66127
+ <li><p>Let <var>type </var> be the type listed for <var>attrName</var> in Filters. <ref
66128
+ spec=FILTERS> </p></li>
66127
66129
66128
- <li><p>If <var>attrName </var> is of type "<code data-x="">list of <number>s </code>", then
66129
- return <code data-x="">sequence<long long> </code>.</p></li>
66130
+ <li><p><var>type </var> is "<code data-x="">false | true </code>", then return <code
66131
+ data-x="idl-boolean">boolean </code>.</p></li>
66130
66132
66131
- <li><p>If <var>attrName</var> is of type <code
66132
- data-x="">"<number-optional-number></code>", "<code data-x=""><number></code>", or
66133
- "<code data-x=""><integer></code>", then return <code data-x="">long long</code>.</p></li>
66133
+ <li><p><var>type</var> is "<code data-x="">list of <number>s</code>", then return <code
66134
+ data-x="">sequence<long long></code>.</p></li>
66135
+
66136
+ <li><p><var>type</var> is <code data-x="">"<number-optional-number></code>", "<code
66137
+ data-x=""><number></code>", or "<code data-x=""><integer></code>", then return
66138
+ <code data-x="">long long</code>.</p></li>
66134
66139
66135
66140
<li><p>Return <code data-x="idl-DOMString">DOMString</code>.</p></li>
66136
66141
</ol>
@@ -66205,8 +66210,8 @@ console.log(pixels.data[2]);
66205
66210
66206
66211
<li><p><var>key</var> is a <span>filter primitive attribute</span></p></li>
66207
66212
66208
- <li><p><var>key</var> is "<code data-x="">class </code>", "<code data-x="">style</ code>",
66209
- "<code data-x="">in</code>", or "<code data-x="">filter</code>"</p></li>
66213
+ <li><p><var>key</var> is "<code data-x="">in </code>", or "< code
66214
+ data-x="">filter</code>"</p></li>
66210
66215
</ul>
66211
66216
66212
66217
<p>then <span>continue</span>.</p>
@@ -66307,40 +66312,40 @@ console.log(pixels.data[2]);
66307
66312
graphs are a planned expansion of this feature.</p>
66308
66313
66309
66314
<p>Coordinates used in the value of the <span data-x="concept-canvas-current-filter">current
66310
- filter</span> attribute are interpreted such that one pixel is equivalent to one SVG user space
66311
- unit and to one canvas coordinate space unit. Filter coordinates are not affected by the <span
66315
+ filter</span> are interpreted such that one pixel is equivalent to one SVG user space unit and to
66316
+ one canvas coordinate space unit. Filter coordinates are not affected by the <span
66312
66317
data-x="dom-context-2d-transformation">current transformation matrix</span>. The current
66313
66318
transformation matrix affects only the input to the filter. Filters are applied in the
66314
66319
<span>output bitmap</span>'s coordinate space.</p>
66315
66320
66316
- <p>When the value of the <span data-x="concept-canvas-current-filter">current filter</span>
66317
- attribute is a <span><filter-value-list></span> which defines lengths using percentages or
66318
- using <span>'em'</span> or <span>'ex'</span> units, these must be interpreted relative to the
66319
- <span>computed value</span> of the <span>'font-size'</span> property of the <span>font style
66320
- source object</span> at the time that the attribute is set. If the <span
66321
+ <p>When the value of the <span data-x="concept-canvas-current-filter">current filter</span> is a
66322
+ string parsable as a <span><filter-value-list></span> which defines lengths using
66323
+ percentages or using <span>'em'</span> or <span>'ex'</span> units, these must be interpreted
66324
+ relative to the <span>computed value</span> of the <span>'font-size'</span> property of the
66325
+ <span>font style source object</span> at the time that the attribute is set. If the <span
66321
66326
data-x="computed value">computed values</span> are undefined for a particular case (e.g. because
66322
66327
the <span>font style source object</span> is not an element or is not <span>being
66323
66328
rendered</span>), then the relative keywords must be interpreted relative to the default value of
66324
66329
the <code data-x="dom-context-2d-font">font</code> attribute. The 'larger' and 'smaller' keywords
66325
66330
are not supported.</p>
66326
66331
66327
- <p>If the value of the <span data-x="concept-canvas-current-filter">current filter</span>
66328
- attribute is a <span><filter-value-list></span> with a reference to an SVG filter in the
66329
- same document, and this SVG filter changes, then the changed filter is used for the next draw
66332
+ <p>If the value of the <span data-x="concept-canvas-current-filter">current filter</span> is a
66333
+ string parseable as a <span><filter-value-list></span> with a reference to an SVG filter in
66334
+ the same document, and this SVG filter changes, then the changed filter is used for the next draw
66330
66335
operation.</p>
66331
66336
66332
- <p>If the value of the <span data-x="concept-canvas-current-filter">current filter</span>
66333
- attribute is a <span><filter-value-list></span> with a reference to an SVG filter in an
66334
- external resource document and that document is not loaded when a drawing operation is invoked,
66335
- then the drawing operation must proceed with no filtering.</p>
66337
+ <p>If the value of the <span data-x="concept-canvas-current-filter">current filter</span> is a
66338
+ string parseable as a <span><filter-value-list></span> with a reference to an SVG filter in
66339
+ an external resource document and that document is not loaded when a drawing operation is
66340
+ invoked, then the drawing operation must proceed with no filtering.</p>
66336
66341
66337
66342
</div>
66338
66343
66339
66344
<h6>Working with externally-defined SVG filters</h6>
66340
66345
66341
66346
<!-- NON-NORMATIVE SECTION -->
66342
66347
66343
- <p>Since drawing is performed using filter value "<code data-x="">none</code>"" until an
66348
+ <p>Since drawing is performed using filter value "<code data-x="">none</code>" until an
66344
66349
externally-defined filter has finished loading, authors might wish to determine whether such a
66345
66350
filter has finished loading before proceeding with a drawing operation. One way to accomplish
66346
66351
this is to load the externally-defined filter elsewhere within the same page in some element that
@@ -66365,12 +66370,12 @@ console.log(pixels.data[2]);
66365
66370
other than "<code data-x="">none</code>" and all the externally-defined filters it references,
66366
66371
if any, are in documents that are currently loaded, then use image <var>A</var> as the input to
66367
66372
the <span data-x="concept-canvas-current-filter">current filter</span>, creating image
66368
- <var>B</var>. If the <span data-x="concept-canvas-current-filter">current filter</span> is a
66369
- <span><filter-value-list></span>, then draw using the <span
66373
+ <var>B</var>. If the <span data-x="concept-canvas-current-filter">current filter</span> is a
66374
+ string parseable as a <span><filter-value-list></span>, then draw using the <span
66370
66375
data-x="concept-canvas-current-filter">current filter</span> in the same manner as SVG. If the
66371
66376
<span data-x="concept-canvas-current-filter">current filter</span> is a
66372
66377
<code>CanvasFilter</code>, draw using the equivalent SVG for the XML structure stored in the
66373
- <span data-x="concept-canvas-current-filter">current filter</span>'s associated <span
66378
+ <span data-x="concept-canvas-current-filter">current filter</span>'s by mapping each <span>filter property</span> of the <span
66374
66379
data-x="concept-concept-canvasfilter-xml-filter-list">XML filter list</span>.</p>
66375
66380
66376
66381
<p>Otherwise, let <var>B</var> be an alias for <var>A</var>.</p>
0 commit comments