Skip to content

Commit 5f1a931

Browse files
committed
[css-paint-api] Added/updated a bunch of issues.
1 parent 8aca941 commit 5f1a931

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

css-paint-api/Overview.bs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,18 @@ PaintCallback
141141

142142
Note: The litmus test used for deciding above was: methods should become no-ops if they can, otherwise throw an error if they'd require an IDL change.
143143

144-
Issue: We should probably create a new interface for CanvasRenderingContext2d and use IDL mixins (like CanvasPathMethods) to share common interfaces.
144+
Issue: Instead of saying how CanvasRenderingContext2d changes in a paint execution context.
145+
Create a new interface which uses IDL mixins to share methods with CanvasRenderingContext2d.
146+
147+
Issue: What happens when the paint function throws an exception after writing some partial commands to the rendering context?
148+
Should it output the partial image, or output an empty image?
145149

146150
: <dfn argument for=PaintCallback>geometry</dfn>
147151
:: The geometry information for the callback.
148152

149153
Issue: Decide what is needed here (in level 1). Obviously we need the width/height of the fragment.
150-
If we are going down the fragment route do we need continuation data? I.e. what edge is shared etc.
151-
Do we need children position data?
154+
For slicing images, we would need all the fragment information (size, position) for the parent element.
155+
Do we also need continuation data? I.e. what is the continuing edge.
152156
Should make sure we don't rabbit hole too much on this, provide what we think is useful for v1, iterate in v2.
153157

154158
: <dfn argument for=PaintCallback>inputProperties</dfn>
@@ -159,6 +163,13 @@ Issue: No way for image data to appear here yet. Everything string based.
159163
I think the answer to this is to provide this information in the Typed CSS Value OM.
160164
Will need access to a loaded bit, width, height, and a way to render into rendering context.
161165

166+
Issue: Should this be blocked on a typed style OM? Instead of everything being string based?
167+
168+
Issue: What information should we provide for read-modify-write use-cases?
169+
Are read-modify-write use-cases important for v1?
170+
For example, if you are sliding the previous paint output out?
171+
For providing the previous paint output we should provide an ImageBitmap if you ask.
172+
162173
Issue: Should VisualOverflowRectDict just be based on longs instead? Do floats make sense?
163174

164175
Using Custom Paint {#using-custom-paint}
@@ -182,11 +193,13 @@ Issue: Word-smith this better.
182193

183194
Issue: Change 'background-image', 'border-image' and 'content' to accept <<image-or-paint>> or <<paint()>>.
184195

196+
Issue: How do we do things like conic-gradient? I.e. paint functions which accept arguments as inputs?
197+
185198
Examples {#examples}
186199
====================
187200

188201
Example 1: A colored circle. {#example-1}
189-
----------------------------------------
202+
-----------------------------------------
190203

191204
<pre class='lang-javascript'>
192205
// Inside PaintGlobalScope.
@@ -224,4 +237,8 @@ this.registerPaint({
224237
&lt;/style&gt;
225238
</pre>
226239

227-
Issue: How to do conic-gradient as a use-case?
240+
Issue: Add conic-gradient as a use case.
241+
242+
Issue: Add image with placeholder as a use case. E.g. mountainy-thingy.
243+
244+
Issue: Add image url with var() input to custom paint as a use case.

0 commit comments

Comments
 (0)