-
Notifications
You must be signed in to change notification settings - Fork 719
[css-highlight-api] triggering restyling/repainting #4596
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
I was discussing this with some other Edge folks interested in this API. It doesn't seem like any of these would need to trigger a synchronous repaint, and that modifications to these would be similar to CSS OM modifications, or changes to As a sidenote, I guess the fifth bullet no longer applies since the spec no longer has that |
@dandclark That seems reasonable to me. From your point of view, would you say the text in https://drafts.csswg.org/css-highlight-api-1/#repaint already achieves that, or would you like to see an explicit statement like:
@megangardner, @sanketj any thoughts on that? |
I think it's probably a good idea to include a note like this, just so it's super clear that user agents don't need to do any synchronous work. |
I agree that highlight modifications should not trigger sync repaints. The implementation we're working on in Chromium will always paint async. I think it would be good to add some explicit text mandating this, because if other UAs end up doing sync painting, we may see unexpected interop differences. |
Here's a PR adding the line suggested by @frivoal above: #6987 |
The CSS Working Group just discussed The full IRC log of that discussion |
Uh oh!
There was an error while loading. Please reload this page.
The properties controlled by the
::highlight()
pseudo cannot affect layout, so there's not going to be a full reflow when something change, but they can still cause visual changes, so we need to be clear about when a re-computation of styles and a repaint happen.In addition to DOM changes that would cause a restyling anyway, the following can cause a need for restyling/repainting:
Changing the style property of a HighlightRangeGroup in CSS.highlightsAre any or all of things things synchronously triggering a restyle/repaint? Probably not, but what should the spec say?
The text was updated successfully, but these errors were encountered: