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 look for viewport units in stylesheets. #18267

Merged
merged 1 commit into from Aug 28, 2017

Conversation

@emilio
Copy link
Member

emilio commented Aug 28, 2017

Use whether we've computed any viewport unit instead.

This is more accurate (we avoid restyling unnecessarily if we've found anything
ever on the stylesheet, but that hasn't matched).

This has the benefit of also matching Gecko, and simplify some code and
fishyness around, and also hopefully speeding up stylesheet parsing.


This change is Reviewable

@highfive
Copy link

highfive commented Aug 28, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/servo/media_queries.rs, components/style/stylesheets/stylesheet.rs
  • @canaltinova: components/style/servo/media_queries.rs, components/style/stylesheets/stylesheet.rs
  • @fitzgen: components/script/dom/htmlmetaelement.rs, components/script/stylesheet_loader.rs
  • @KiChjang: components/script/dom/htmlmetaelement.rs, components/script/stylesheet_loader.rs
@highfive
Copy link

highfive commented Aug 28, 2017

warning Warning warning

  • These commits modify style and script code, but no tests are modified. Please consider adding a test!
@emilio
Copy link
Member Author

emilio commented Aug 28, 2017

@highfive highfive assigned SimonSapin and unassigned metajack Aug 28, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

Trying commit 3e49a34 with merge b7e28fb...

bors-servo added a commit that referenced this pull request Aug 28, 2017
style: Don't look for viewport units in stylesheets.

Use whether we've computed any viewport unit instead.

This is more accurate (we avoid restyling unnecessarily if we've found anything
ever on the stylesheet, but that hasn't matched).

This has the benefit of also matching Gecko, and simplify some code and
fishyness around, and also hopefully speeding up stylesheet parsing.
@emilio
Copy link
Member Author

emilio commented Aug 28, 2017

After this land we can remove support for the look_for_viewport_percentages on cssparser.

bors-servo added a commit that referenced this pull request Aug 28, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
@@ -48,21 +48,27 @@ pub struct Device {
/// by using rem units.
#[ignore_heap_size_of = "Pure stack type"]
used_root_font_size: AtomicBool,
/// Whether any styles computed in the document relied on the root font-size
/// by using rem units.

This comment has been minimized.

@emilio

emilio Aug 28, 2017

Author Member

Err, this comment needs to change :)

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

💔 Test failed - linux-dev

Use whether we've computed any viewport unit instead.

This is more accurate (we avoid restyling unnecessarily if we've found anything
ever on the stylesheet, but that hasn't matched).

This has the benefit of also matching Gecko, and simplify some code and
fishyness around, and also hopefully speeding up stylesheet parsing.
@emilio emilio force-pushed the emilio:dirty-on-viewport-size-change branch from 3e49a34 to 15e71c5 Aug 28, 2017
@emilio
Copy link
Member Author

emilio commented Aug 28, 2017

@bors-servo try

  • Unit tests
bors-servo added a commit that referenced this pull request Aug 28, 2017
style: Don't look for viewport units in stylesheets.

Use whether we've computed any viewport unit instead.

This is more accurate (we avoid restyling unnecessarily if we've found anything
ever on the stylesheet, but that hasn't matched).

This has the benefit of also matching Gecko, and simplify some code and
fishyness around, and also hopefully speeding up stylesheet parsing.

<!-- 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/18267)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

Trying commit 15e71c5 with merge ce6500c...

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

@SimonSapin
Copy link
Member

SimonSapin commented Aug 28, 2017

@bors-servo r+ p=1


Reviewed 4 of 5 files at r1, 6 of 6 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

📌 Commit 15e71c5 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

💡 This pull request was already approved, no need to approve it again.

  • There's another pull request that is currently being tested, blocking this pull request: #18261
@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

📌 Commit 15e71c5 has been approved by SimonSapin

bors-servo added a commit that referenced this pull request Aug 28, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
emilio added a commit to servo/rust-cssparser that referenced this pull request Aug 28, 2017
The only user of it is going away in servo/servo#18267.
bors-servo added a commit to servo/rust-cssparser that referenced this pull request Aug 28, 2017
…monSapin

parser: Remove ability to look for viewport percentages.

The only user of it is going away in servo/servo#18267.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/187)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Aug 28, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

Testing commit 15e71c5 with merge 96b4e06...

bors-servo added a commit that referenced this pull request Aug 28, 2017
…apin

style: Don't look for viewport units in stylesheets.

Use whether we've computed any viewport unit instead.

This is more accurate (we avoid restyling unnecessarily if we've found anything
ever on the stylesheet, but that hasn't matched).

This has the benefit of also matching Gecko, and simplify some code and
fishyness around, and also hopefully speeding up stylesheet parsing.

<!-- 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/18267)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2017

@bors-servo bors-servo merged commit 15e71c5 into servo:master Aug 28, 2017
3 checks passed
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
bors-servo added a commit that referenced this pull request Aug 29, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Aug 29, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Aug 29, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Aug 29, 2017
style: Recascade the document instead of using the dirty_on_viewport_size_change bit

This allows us to simplify a lot of code.

On top of #18267.

<!-- 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/18268)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.