[css-houdini-drafts] [css-paint-api] scope of paint-valid flag being box (not box+use/size) seems wrong

dbaron has just created a new issue for 
https://github.com/w3c/css-houdini-drafts:

== [css-paint-api] scope of paint-valid flag being box (not 
box+use/size) seems wrong ==
In the [section on Paint 
Invalidation](https://drafts.css-houdini.org/css-paint-api/#paint-invalidation)
 and the [section on Drawing an 
Image](https://drafts.css-houdini.org/css-paint-api/#drawing-an-image),
 the Painting API specification describes the concept of a paint-valid
 vs. paint-invalid flag.

It seems to describe this flag as being per-box, whereas I think it 
should either be:
- both per-box and per-use, or
- both per-box and per-concrete object size

In particular, if a style sheet has something like:
```
  background-image: paint(foo), paint(foo);
  background-size: 50px 50px, 100px 100px;
  background-position: top left, top right;
```
then the two images need to be painted separately, since they're 
different sizes, and the paint function would expect to be called 
separately for each size.  But if they were the same size, the 
implementation could presumably call the paint function only once 
(which is why I suggest per-concrete object size rather than per-use).
  Though making it per-concrete object size requires changing a bit of
 the invalidation logic in the [section on Paint 
Invalidation](https://drafts.css-houdini.org/css-paint-api/#paint-invalidation).

There are similar problems for two uses of the same 
<code>paint()</code> function in different properties on the same 
element.

(I got here via https://github.com/w3ctag/spec-reviews/issues/140 .)

Please view or discuss this issue at 
https://github.com/w3c/css-houdini-drafts/issues/326 using your GitHub
 account

Received on Wednesday, 26 October 2016 01:18:23 UTC