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: Split collected @font-face / @counter-style rules per origin. #18037
Conversation
Heads up! This PR modifies the following files:
|
r? @emilio |
0b466db
to
3dabe90
Compare
Untested, but doing a try run now: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9909fc82c51ab3f4b3173fe0bc9b570fd3ca1f5b |
@bors-servo try |
style: Split collected @font-face / @counter-style rules per origin. <!-- Please describe your changes on the following line: --> More refactoring in preparation for rebuilding sheets only from the origin that changed. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/18037) <!-- Reviewable:end -->
💔 Test failed - linux-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me. You need to fix the servo build, but looks trivial.
Please file a followup for the PerOrigin<T>
stuff (or do it here directly if you prefer).
components/style/stylist.rs
Outdated
user: PerOriginExtraStyleData, | ||
} | ||
|
||
/// ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing.
@@ -506,11 +545,15 @@ impl Stylist { | |||
} | |||
#[cfg(feature = "gecko")] | |||
CssRule::FontFace(ref rule) => { | |||
_extra_data.add_font_face(&rule, origin); | |||
_extra_data | |||
.borrow_mut_for_origin(&origin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can move to the outer loop I guess, not sure if worth, given you'd need to cfg
it somehow.
} | ||
|
||
#[cfg(feature = "gecko")] | ||
impl<'a> Iterator for ExtraStyleDataIter<'a> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect it's going to be nicer to have a PerOrigin<T>
that abstracts all this stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interests of time I'll leave this for later.
3dabe90
to
5762200
Compare
@bors-servo r=emilio |
📌 Commit 5762200 has been approved by |
style: Split collected @font-face / @counter-style rules per origin. <!-- Please describe your changes on the following line: --> More refactoring in preparation for rebuilding sheets only from the origin that changed. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/18037) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
More refactoring in preparation for rebuilding sheets only from the origin that changed.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is