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

Fix slotted invalidation. #9162

Merged
merged 1 commit into from Jan 23, 2018

Conversation

Projects
None yet
3 participants
@jgraham
Copy link
Contributor

jgraham commented Jan 23, 2018

This is a partial revert of
servo/servo@ce1d8cd

If you're in a shadow tree, you may not be slotted but you still need to look at
the slotted rules, since a could be a descendant of yours.

Just use the same invalidation map everywhere, and remove complexity.

This means that we can do some extra work while trying to gather invalidation
if there are slotted rules, but I don't think it's a problem.

The test is ported from https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/css/invalidation/slotted.html?l=1&rcl=58d68fdf783d7edde1c82a642e037464861f2787

Curiously, Blink fails the test as written, presumably because they don't flush
styles from getComputedStyle correctly (in their test they do via
updateStyleAndReturnAffectedElementCount), due to s not being in the flat
tree in their implementation.

MozReview-Commit-ID: 6b7BQ6bGMgd

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1429846 [ci skip]


This change is Reviewable

Fix slotted invalidation.
This is a partial revert of
servo/servo@ce1d8cd

If you're in a shadow tree, you may not be slotted but you still need to look at
the slotted rules, since a <slot> could be a descendant of yours.

Just use the same invalidation map everywhere, and remove complexity.

This means that we can do some extra work while trying to gather invalidation
if there are slotted rules, but I don't think it's a problem.

The test is ported from https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/css/invalidation/slotted.html?l=1&rcl=58d68fdf783d7edde1c82a642e037464861f2787

Curiously, Blink fails the test as written, presumably because they don't flush
styles from getComputedStyle correctly (in their test they do via
updateStyleAndReturnAffectedElementCount), due to <slot>s not being in the flat
tree in their implementation.

MozReview-Commit-ID: 6b7BQ6bGMgd

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1429846 [ci skip]
@jgraham

This comment has been minimized.

Copy link
Contributor Author

jgraham commented Jan 23, 2018

Code reviewed upstream.

@jgraham jgraham merged commit 070555b into master Jan 23, 2018

@jgraham jgraham deleted the sync_72f8f50aa1b630e27793680455e54608ec21816a branch Jan 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.