-
Notifications
You must be signed in to change notification settings - Fork 143
[css-paint-api] scope of paint-valid flag being box (not box+use/size) seems wrong #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Though I'd also note that maybe refactoring the invalidation logic around sizes is a good idea anyway, given that the above case does not require any invalidation if the element's size changes, since the concrete object size does not change, since the (I'm going to be lazy and leave that as part of this issue rather than filing a separate one... at least for now.) |
…gents to cache. Fixes #326. I realized that explicitly placing an invalidation based on size here was wrong, e.g. if a box changes size it has to run the "object size negotiation" algorithm, which makes invalidating the paint() function off size redundant. Additionally allows user-agents to cache results from previous invocations, and re-use. This allows UAs to re-use images between instances if they have the same input style, concrete object size, and input arguments.
The CSS Working Group just discussed Issue 326. The full IRC log of that discussion
|
After looking more closely at #390, I think the changes there are good, modulo one wording nit. |
#390) * [css-paint-api] Removes invalidation based on size, and allows user-agents to cache. Fixes #326. I realized that explicitly placing an invalidation based on size here was wrong, e.g. if a box changes size it has to run the "object size negotiation" algorithm, which makes invalidating the paint() function off size redundant. Additionally allows user-agents to cache results from previous invocations, and re-use. This allows UAs to re-use images between instances if they have the same input style, concrete object size, and input arguments.
In the section on Paint Invalidation and the section on 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:
In particular, if a style sheet has something like:
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.
There are similar problems for two uses of the same
paint()
function in different properties on the same element.(I got here via w3ctag/design-reviews#140 .)
The text was updated successfully, but these errors were encountered: