@@ -45,10 +45,10 @@ Introduction {#intro}
45
45
=====================
46
46
47
47
The paint stage of CSS is responsible for painting the background, content and highlight of a
48
- box based on that box's geometry (as generated by the layout stage) and computed style.
48
+ box based on that box's size (as generated by the layout stage) and computed style.
49
49
50
50
This specification describes an API which allows developers to paint a part of an box in
51
- response to geometry / computed style changes with an additional <<image>> function.
51
+ response to size / computed style changes with an additional <<image>> function.
52
52
53
53
Note: In a future version of the spec, support may be added for defining the clip, global alpha,
54
54
filter on a portion of an box (for example on the background layers).
@@ -62,7 +62,7 @@ empty and is populated when {{registerPaint(name, paintCtor)}} is called.
62
62
Each <<paint()>> function for a box has an associated <dfn>paint valid flag</dfn> . It may be either
63
63
<dfn>paint-valid</dfn> or <dfn>paint-invalid</dfn> . It is initially set to <a>paint-invalid</a> .
64
64
65
- When the geometry (as determined by layout) of a |box| changes, each <<paint()>> function's <a>paint
65
+ When the size (as determined by layout) of a |box| changes, each <<paint()>> function's <a>paint
66
66
valid flag</a> should be set to <a>paint-invalid</a> .
67
67
68
68
When the computed style for an |box| changes, the user agent must run the following steps:
@@ -114,7 +114,7 @@ interface PaintWorkletGlobalScope : WorkletGlobalScope {
114
114
<pre class='idl'>
115
115
callback interface PaintClass {
116
116
readonly attribute sequence<DOMString> inputProperties;
117
- void paint(PaintRenderingContext2D ctx, Geometry geom, StylePropertyMap inputProperties);
117
+ void paint(PaintRenderingContext2D ctx, PaintSize geom, StylePropertyMap inputProperties);
118
118
};
119
119
</pre>
120
120
</div>
@@ -212,7 +212,7 @@ Note: The list of input properties should only be looked up once, the class does
212
212
Note: In a future version of the spec, the author may be able to set an option to receive a
213
213
different type of RenderingContext. In particular the author may want a WebGL rendering context
214
214
to render 3D effects. There are complexities in setting up a WebGL rendering context to take the
215
- {{Geometry }} and {{StylePropertyMap}} as inputs.
215
+ {{PaintSize }} and {{StylePropertyMap}} as inputs.
216
216
217
217
Paint Notation {#paint-notation}
218
218
================================
@@ -316,14 +316,14 @@ For the purposes of the <a>object size negotiation</a> algorithm, the paint imag
316
316
Note: In a future version of the spec, the author may be able to specify the <a>intrinsic
317
317
dimensions</a> of the paint image. This will probably be exposed as a callback allowing the
318
318
author to define static <a>intrinsic dimensions</a> or dynamically updating the <a>intrinsic
319
- dimensions</a> based on computed style and geometry changes.
319
+ dimensions</a> based on computed style and size changes.
320
320
321
- The {{Geometry }} object represents the geometry of the image that the author should draw. This is
321
+ The {{PaintSize }} object represents the size of the image that the author should draw. This is
322
322
the <a>concrete object size</a> given by the user agent.
323
323
324
324
<pre class='idl'>
325
325
[Exposed=PaintWorklet]
326
- interface Geometry {
326
+ interface PaintSize {
327
327
readonly attribute double width;
328
328
readonly attribute double height;
329
329
};
@@ -397,11 +397,11 @@ following steps:
397
397
invoke methods on it, but this will have no effect on the current image, or subsequent
398
398
images.
399
399
400
- 10. Let |geometry | be a new {{Geometry }} initialized to the width and height defined by
400
+ 10. Let |paintSize | be a new {{PaintSize }} initialized to the width and height defined by
401
401
|concreteObjectSize|.
402
402
403
403
11. Perform <a>Invoke</a> (O=|paintInstance|, P="paint", Arguments=[|renderingContext|,
404
- |geometry |, |styleMap|).
404
+ |paintSize |, |styleMap|).
405
405
406
406
12. The image output is to be produced from the |renderingContext| given to the method.
407
407
@@ -514,8 +514,8 @@ Example 3: Conic-gradient {#example-3}
514
514
515
515
Issue: Add conic-gradient as a use case once we have function arguments.
516
516
517
- Example 4: Different color based on geometry {#example-4}
518
- ---------------------------------------------------------
517
+ Example 4: Different color based on size {#example-4}
518
+ -----------------------------------------------------
519
519
520
520
<pre class='lang-markup'>
521
521
<h1>
0 commit comments