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

style: Don't skip computation of pseudo-elements of display: none elements #17867

Merged
merged 1 commit into from Jul 26, 2017

Conversation

@emilio
Copy link
Member

commented Jul 26, 2017

We have optimizations to avoid doing selector-matching when the style attribute
changes, so, given you can toggle the display property and the pseudo-elements
will suddenly become effective, we can't really skip them.

Furthermore, we assume that if an element has an ElementStyles, they're
up-to-date and we can use them for getComputedStyle, so it's pretty easy to
prove that we do the wrong thing when calling getComputedStyle with a
pseudo-element on a display: none root.

Bug: 1384065
Reviewed-by: heycam
MozReview-Commit-ID: BIOqevGZyrm


This change is Reviewable

style: Don't skip computation of pseudo-elements of display: none ele…
…ments.

We have optimizations to avoid doing selector-matching when the style attribute
changes, so, given you can toggle the display property and the pseudo-elements
will suddenly become effective, we can't really skip them.

Furthermore, we assume that if an element has an ElementStyles, they're
up-to-date and we can use them for getComputedStyle, so it's pretty easy to
prove that we do the wrong thing when calling getComputedStyle with a
pseudo-element on a display: none root.

Bug: 1384065
Reviewed-by: heycam
MozReview-Commit-ID: BIOqevGZyrm
@highfive

This comment has been minimized.

Copy link

commented Jul 26, 2017

Heads up! This PR modifies the following files:

@highfive

This comment has been minimized.

Copy link

commented Jul 26, 2017

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
@emilio

This comment has been minimized.

Copy link
Member Author

commented Jul 26, 2017

@bors-servo r=heycam p=1

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2017

📌 Commit 43278ed has been approved by heycam

@highfive highfive assigned heycam and unassigned jdm Jul 26, 2017

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2017

⌛️ Testing commit 43278ed with merge f61528d...

bors-servo added a commit that referenced this pull request Jul 26, 2017
Auto merge of #17867 - emilio:pseudo-display-none, r=heycam
style: Don't skip computation of pseudo-elements of display: none elements

We have optimizations to avoid doing selector-matching when the style attribute
changes, so, given you can toggle the display property and the pseudo-elements
will suddenly become effective, we can't really skip them.

Furthermore, we assume that if an element has an ElementStyles, they're
up-to-date and we can use them for getComputedStyle, so it's pretty easy to
prove that we do the wrong thing when calling getComputedStyle with a
pseudo-element on a display: none root.

Bug: 1384065
Reviewed-by: heycam
MozReview-Commit-ID: BIOqevGZyrm
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2017

@bors-servo bors-servo merged commit 43278ed into servo:master Jul 26, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.