Skip to content

Commit 6e594fc

Browse files
committed
[css-paint-api] Make it required that UAs draw an image for a paint() function.
1 parent 6223b55 commit 6e594fc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

css-paint-api/Overview.bs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ interface Geometry {
136136

137137
Issue: Create a new interface which uses IDL mixins to share methods with CanvasRenderingContext2d.
138138

139-
When the user agent wants to draw an image of a <<paint()>> for a <var>fragment</var> into its appropriate stacking level (as defined by the property the CSS property it's associated with) it <em>must</em> run the following steps:
139+
If a <<paint()>> function for a fragment is <a>paint-invalid</a> and the fragment is within the visual viewport,
140+
then user agent <em>must</em> <a>draw an image</a> for the current frame.
141+
142+
Note: The user agent may choose to <a>draw an image</a> for <<paint()>> functions not within the visual viewport.
143+
144+
When the user agent wants to <dfn>draw an image</dfn> of a <<paint()>> for a <var>fragment</var> into its appropriate stacking level (as defined by the property the CSS property it's associated with) it <em>must</em> run the following steps:
140145
1. If the <b>paint valid flag</b> for the <<paint()>> function on the |fragment| is <a>paint-valid</a> the user agent <em>may</em> use the drawn image from the previous invocation.
141146
If so it can abort all these steps.
142147

@@ -200,9 +205,6 @@ Note: The user agent should consider long running paint functions similar to lon
200205
For example, they should how a "unresponsive script" dialog or similar.
201206
In addition user agents should provide tooling within their debugging tools to show authors how expensive their paint classes are.
202207

203-
Note: The user agent doesn't have produce the image output for a <<paint()>> function on the current frame if it's <b>paint valid flag</b> is <a>paint-invalid</a>.
204-
For example the fragment may be outside the visible viewport, and not required for display on the output device.
205-
206208
Note: The contents of the image are not designed to be accessible. Authors should communicate any useful information through the standard accessibility APIs.
207209

208210
Issue(w3c/css-houdini-drafts#24): Determine how to side-load images or other data.

0 commit comments

Comments
 (0)