Skip to content

Commit 2cbb6d5

Browse files
committed
[css-paint-api] s/Geometry/PaintSize
1 parent 7054e77 commit 2cbb6d5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

css-paint-api/Overview.bs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ Introduction {#intro}
4545
=====================
4646

4747
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.
4949

5050
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.
5252

5353
Note: In a future version of the spec, support may be added for defining the clip, global alpha,
5454
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.
6262
Each <<paint()>> function for a box has an associated <dfn>paint valid flag</dfn>. It may be either
6363
<dfn>paint-valid</dfn> or <dfn>paint-invalid</dfn>. It is initially set to <a>paint-invalid</a>.
6464

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
6666
valid flag</a> should be set to <a>paint-invalid</a>.
6767

6868
When the computed style for an |box| changes, the user agent must run the following steps:
@@ -114,7 +114,7 @@ interface PaintWorkletGlobalScope : WorkletGlobalScope {
114114
<pre class='idl'>
115115
callback interface PaintClass {
116116
readonly attribute sequence&lt;DOMString&gt; inputProperties;
117-
void paint(PaintRenderingContext2D ctx, Geometry geom, StylePropertyMap inputProperties);
117+
void paint(PaintRenderingContext2D ctx, PaintSize geom, StylePropertyMap inputProperties);
118118
};
119119
</pre>
120120
</div>
@@ -212,7 +212,7 @@ Note: The list of input properties should only be looked up once, the class does
212212
Note: In a future version of the spec, the author may be able to set an option to receive a
213213
different type of RenderingContext. In particular the author may want a WebGL rendering context
214214
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.
216216

217217
Paint Notation {#paint-notation}
218218
================================
@@ -316,14 +316,14 @@ For the purposes of the <a>object size negotiation</a> algorithm, the paint imag
316316
Note: In a future version of the spec, the author may be able to specify the <a>intrinsic
317317
dimensions</a> of the paint image. This will probably be exposed as a callback allowing the
318318
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.
320320

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
322322
the <a>concrete object size</a> given by the user agent.
323323

324324
<pre class='idl'>
325325
[Exposed=PaintWorklet]
326-
interface Geometry {
326+
interface PaintSize {
327327
readonly attribute double width;
328328
readonly attribute double height;
329329
};
@@ -397,11 +397,11 @@ following steps:
397397
invoke methods on it, but this will have no effect on the current image, or subsequent
398398
images.
399399

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
401401
|concreteObjectSize|.
402402

403403
11. Perform <a>Invoke</a>(O=|paintInstance|, P="paint", Arguments=[|renderingContext|,
404-
|geometry|, |styleMap|).
404+
|paintSize|, |styleMap|).
405405

406406
12. The image output is to be produced from the |renderingContext| given to the method.
407407

@@ -514,8 +514,8 @@ Example 3: Conic-gradient {#example-3}
514514

515515
Issue: Add conic-gradient as a use case once we have function arguments.
516516

517-
Example 4: Different color based on geometry {#example-4}
518-
---------------------------------------------------------
517+
Example 4: Different color based on size {#example-4}
518+
-----------------------------------------------------
519519

520520
<pre class='lang-markup'>
521521
&lt;h1&gt;

0 commit comments

Comments
 (0)