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

stylo: Avoid restyling the whole document when adding stylesheets. #17078

Merged
merged 8 commits into from May 29, 2017

Conversation

Projects
None yet
5 participants
@emilio
Copy link
Member

commented May 29, 2017

This is for bug 1357583.


This change is Reviewable

@highfive

This comment has been minimized.

Copy link

commented May 29, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/gecko/data.rs, components/style/invalidation/mod.rs, components/style/data.rs, components/style/stylesheets.rs, components/style/lib.rs and 3 more
@highfive

This comment has been minimized.

Copy link

commented May 29, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • 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 May 29, 2017

@bors-servo r=heycam p=10

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

📌 Commit 691d87b has been approved by heycam

@highfive highfive assigned heycam and unassigned mbrubeck May 29, 2017

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

⌛️ Testing commit 691d87b with merge 62c13d1...

bors-servo added a commit that referenced this pull request May 29, 2017

Auto merge of #17078 - emilio:stylesheet-invalidation-scopes, r=heycam
stylo: Avoid restyling the whole document when adding stylesheets.

This is for bug 1357583.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17078)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

💔 Test failed - mac-dev-unit

@emilio emilio force-pushed the emilio:stylesheet-invalidation-scopes branch from 691d87b to b71af12 May 29, 2017

@emilio

This comment has been minimized.

Copy link
Member Author

commented May 29, 2017

@bors-servo r=heycam

  • Fixed unit tests
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

📌 Commit b71af12 has been approved by heycam

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

⌛️ Testing commit b71af12 with merge 587dc59...

bors-servo added a commit that referenced this pull request May 29, 2017

Auto merge of #17078 - emilio:stylesheet-invalidation-scopes, r=heycam
stylo: Avoid restyling the whole document when adding stylesheets.

This is for bug 1357583.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17078)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

💔 Test failed - linux-dev

@emilio emilio force-pushed the emilio:stylesheet-invalidation-scopes branch from 26040b8 to 7df5b3d May 29, 2017

emilio added some commits May 25, 2017

Bug 1357583: Ensure we send the document element to Servo when flushi…
…ng stylesheets. r=heycam

We'll use it to invalidate stuff.

MozReview-Commit-ID: Il3wO5JQh1Y
Bug 1357583: style: Add an initial version of the stylesheet invalida…
…tion code. r=heycam

MozReview-Commit-ID: 4jLxPYNF07U
Bug 1357583: style: Hook up the invalidator in the StyleSheetSet. r=h…
…eycam

MozReview-Commit-ID: IhgKAovTJMX
Bug 1357583: Add a bunch of logging, shortcuts, and look also at the …
…rightmost selector while invalidating sheets. r=heycam

MozReview-Commit-ID: 2XGcOCTa7MV
Bug 1357583: style: Recurse into @import rules when looking at the ad…
…ded rules. r=heycam

Apparently my whole conception of how the list of sheets in the styleset looked
like was flawled, and we only ever get one append_sheet for the topmost
stylesheet, instead of one for each.

MozReview-Commit-ID: FMClygMJkTc
Bug 1357583: style: Make effective_rules return an iterator, stop ref…
…counting the Device. r=heycam

This makes the code cleaner, and also documents the fact that effective_rules
recurses into imports.

No we're not adding the imported stylesheets twice, and we share code with the
invalidation analysis.

MozReview-Commit-ID: DOF2AViTlmR
Bug 1357583: Avoid unconditionally popping under RulesIterator. r=heycam
Not sure it's worth it, really, but seemed like it could be.

Feel free to r- if it doesn't feel like it.

MozReview-Commit-ID: HTsBNfEqQy4

@emilio emilio force-pushed the emilio:stylesheet-invalidation-scopes branch from 7df5b3d to 9c77dd8 May 29, 2017

@emilio

This comment has been minimized.

Copy link
Member Author

commented May 29, 2017

@bors-servo r=heycam

  • Updated bindings
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

📌 Commit 9c77dd8 has been approved by heycam

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

⌛️ Testing commit 9c77dd8 with merge 939716a...

bors-servo added a commit that referenced this pull request May 29, 2017

Auto merge of #17078 - emilio:stylesheet-invalidation-scopes, r=heycam
stylo: Avoid restyling the whole document when adding stylesheets.

This is for bug 1357583.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17078)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented May 29, 2017

@bors-servo bors-servo merged commit 9c77dd8 into servo:master May 29, 2017

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
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.