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

Document layout dirtiness flags, restyle hints, etc. #8450

Closed
Ms2ger opened this issue Nov 10, 2015 · 3 comments
Closed

Document layout dirtiness flags, restyle hints, etc. #8450

Ms2ger opened this issue Nov 10, 2015 · 3 comments

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Nov 10, 2015

All this code seems amazingly complex and brittle. We should clearly document the exact constraints and invariants, and how we ensure they hold.

CC @pcwalton @bholley

@bholley
Copy link
Contributor

@bholley bholley commented Nov 10, 2015

Restyle hints are pretty well-documented (see the comments in restyle_hints.rs).

The |dirty| flag is not well-documented, possibly because its semantics are somewhat ill-defined and need improvement. At the moment, |dirty| is basically a union indicating that at least one of the following is true:

  • If element-valued, we need to re-run selector matching on it.
  • We need to regenerate style structs (see #8438 for how this case differs from the above)
  • We need to reflow/repaint the node (if, say, the text content changed)

There may be others (I'm figuring this out as I go along). All this code could certainly benefit from additional cleanup.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Nov 11, 2015

I probably didn't help, by highjacking dirtiness for DOM versioning and cache invalidation of HTMLCollection objects. A tidy up would help.

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

These are documented now, AFAICT.

@nox nox closed this Sep 30, 2017
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
4 participants
You can’t perform that action at this time.