Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upstyle: Don't look for viewport units in stylesheets. #18267
Conversation
highfive
commented
Aug 28, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Aug 28, 2017
|
r? @SimonSapin @bors-servo try |
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.
|
After this land we can remove support for the |
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.
This comment has been minimized.
|
|
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.
3e49a34
to
15e71c5
|
@bors-servo try
|
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 r+ p=1 Reviewed 4 of 5 files at r1, 6 of 6 files at r2. Comments from Reviewable |
|
|
|
|
|
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 -->
The only user of it is going away in servo/servo#18267.
…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 -->
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 -->
…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 -->
|
|
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 -->
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 -->
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 -->
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 commentedAug 28, 2017
•
edited by Manishearth
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