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 upRecompute styles on viewport size change if they contain viewport percentages #9876
Conversation
highfive
commented
Mar 4, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Mar 4, 2016
| @@ -73,6 +73,7 @@ impl HTMLMetaElement { | |||
| rules: vec![CSSRule::Viewport(translated_rule)], | |||
| origin: Origin::Author, | |||
| media: None, | |||
| depends_on_viewport_size: true, | |||
This comment has been minimized.
This comment has been minimized.
mbrubeck
Mar 4, 2016
Author
Contributor
On second thought, maybe this stylesheet (one that contains a generated @viewport rule) should have the flag set to false, since viewport constraints are already recalculated on resize and shouldn't require the whole page to be recomputed.
070b1fd
to
88d9b65
|
The And the To sum up, I think that this PR is correct but that we can do better (possibly later in follow ups) to avoid no-op work. Maybe tracking which elements (rather than which stylesheets) are affected by Reviewed 3 of 3 files at r2. components/style/selector_matching.rs, line 228 [r2] (raw file): Comments from the review on Reviewable.io |
88d9b65
to
7cc42c3
Yes, I agree. Review status: 2 of 3 files reviewed at latest revision, 2 unresolved discussions. components/style/selector_matching.rs, line 228 [r2] (raw file): Comments from the review on Reviewable.io |
|
r=me, pending servo/rust-cssparser#99 Reviewed 1 of 1 files at r3. Comments from the review on Reviewable.io |
d3d424d
to
f4598fc
|
@bors-servo r=SimonSapin |
|
|
Recompute styles on viewport size change if they contain viewport percentages Fixes #8754. Depends on servo/rust-cssparser#99. r? @SimonSapin <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9876) <!-- Reviewable:end -->
|
|
|
f4598fc
to
25c1bce
|
@bors-servo r=SimonSapin fixed the unit test error |
|
|
Recompute styles on viewport size change if they contain viewport percentages Fixes #8754. Depends on servo/rust-cssparser#99. r? @SimonSapin <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9876) <!-- Reviewable:end -->
|
|
This is a follow-up to servo#9876. It avoids clearing and rebuilding SelectorMaps when vh and vw units need to be recomputed. Instead it just dirties all nodes, to force elements to be re-cascaded. Filed servo#10104 for later follow-up work to dirty only affected nodes.
Don't re-add stylesheets to recompute vw/vh lengths This is a follow-up to #9876. It avoids clearing and rebuilding SelectorMaps when vh and vw units need to be recomputed. Instead it just dirties all nodes, to force elements to be re-cascaded. Filed #10104 for later follow-up work to dirty only affected nodes. r? @SimonSapin <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10105) <!-- Reviewable:end -->
This is a follow-up to servo#9876. It avoids clearing and rebuilding SelectorMaps when vh and vw units need to be recomputed. Instead it just dirties all nodes, to force elements to be re-cascaded. Filed servo#10104 for later follow-up work to dirty only affected nodes.
mbrubeck commentedMar 4, 2016
Fixes #8754. Depends on servo/rust-cssparser#99. r? @SimonSapin