Skip to content
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

Introduce a fast path for restyling when the style attribute is changed #9860

Open
pcwalton opened this issue Mar 3, 2016 · 3 comments
Open

Introduce a fast path for restyling when the style attribute is changed #9860

pcwalton opened this issue Mar 3, 2016 · 3 comments

Comments

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Mar 3, 2016

The only things that can override the <style> attribute are user and author !important rules, I believe. Let's introduce a fast path that checks to see whether !important rules apply to rules that changed and skip the cascade, just as we do for CSS transitions.

Note that I believe our CSS transitions are not spec compliant because we need to perform that check also.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Mar 21, 2016

Most of the CSS used in browser.html is applied via node.style.*. Especially in animations.

I would very much like to see if this could improve the performance of our animations.

See #10050

Bumping this to bhtml/P2

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Apr 5, 2016

@pcwalton if you think this is not going to happen by June or the benefit is not worth the effort just yet, feel free to remove the P2 flag.

@notriddle
Copy link
Contributor

@notriddle notriddle commented Apr 5, 2016

Just to make sure I'm understanding this right, the idea is basically to avoid doing the dom traversal, not the entirety of reflow? Or is it even more fine-grained than that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.