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
Stop using LocalClip::RoundedRect #20214
Stop using LocalClip::RoundedRect #20214
Conversation
Heads up! This PR modifies the following files:
|
@bors-servo try |
…ct, r=<try> Stop using LocalClip::RoundedRect We would like to remove this functionality from WebRender, so convert its use to clip scroll nodes. This change also removes the redundant BlocBlockStackingContextType in favor of Option<StackingContextType>, which is just as expressive. This simplifies the code a bit. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./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 - [x] These changes do not require tests because they should not change behavior. <!-- 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/20214) <!-- 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 |
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 after the minor fix mentioned.
@@ -236,10 +237,16 @@ impl StackingContextCollectionState { | |||
), | |||
}; | |||
|
|||
let mut stacking_context_info = FnvHashMap::default(); |
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.
Consider using the FastHashMap
that WR uses here - I found Fnv to be significantly slower than the WR implementation. (not necessary in this PR)
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.
Okay. That sounds like a good idea.
} | ||
|
||
fn add_clip_scroll_node(&mut self, clip_scroll_node: ClipScrollNode) -> ClipScrollNodeIndex { | ||
// We want the scroll root to be defined before any possible item that could use it, | ||
// so we make sure that it is added to the beginning of the parent "real" (non-pseudo) | ||
// stacking context. This ensures that item reordering will not result in an item using | ||
// the scroll root before it is defined. | ||
println!("context id: {:?}", self.current_real_stacking_context_id); |
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.
Stray println
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.
Whoops! I've eliminated this.
We would like to remove this functionality from WebRender, so convert its use to clip scroll nodes. This change also removes the redundant BlocBlockStackingContextType in favor of Option<StackingContextType>, which is just as expressive. This simplifies the code a bit.
14a27df
to
e100a72
Compare
@bors-servo r+ Thanks! |
📌 Commit e100a72 has been approved by |
…ct, r=glennw Stop using LocalClip::RoundedRect We would like to remove this functionality from WebRender, so convert its use to clip scroll nodes. This change also removes the redundant BlocBlockStackingContextType in favor of Option<StackingContextType>, which is just as expressive. This simplifies the code a bit. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./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 - [x] These changes do not require tests because they should not change behavior. <!-- 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/20214) <!-- 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 |
We would like to remove this functionality from WebRender, so convert
its use to clip scroll nodes. This change also removes the redundant
BlocBlockStackingContextType in favor of Option,
which is just as expressive. This simplifies the code a bit.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is