mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Auto merge of #18462 - mrobinson:cleanup-building-state, r=emilio
Do some minor cleanups in display list building <!-- 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/18462) <!-- Reviewable:end -->
This commit is contained in:
commit
b2df99cb65
17 changed files with 258 additions and 198 deletions
|
@ -9,8 +9,8 @@
|
|||
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Vector2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx::display_list::{BorderDetails, BorderRadii, BoxShadowClipMode, ClippingRegion};
|
||||
use gfx::display_list::{DisplayItem, DisplayList, DisplayListTraversal, ScrollRootType};
|
||||
use gfx::display_list::{BorderDetails, BorderRadii, BoxShadowClipMode, ClipScrollNodeType};
|
||||
use gfx::display_list::{ClippingRegion, DisplayItem, DisplayList, DisplayListTraversal};
|
||||
use gfx::display_list::StackingContextType;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use style::computed_values::{image_rendering, mix_blend_mode, transform_style};
|
||||
|
@ -491,27 +491,27 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
stacking_context.filters.to_filter_ops());
|
||||
}
|
||||
DisplayItem::PopStackingContext(_) => builder.pop_stacking_context(),
|
||||
DisplayItem::DefineClip(ref item) => {
|
||||
builder.push_clip_id(item.scroll_root.parent_id);
|
||||
DisplayItem::DefineClipScrollNode(ref item) => {
|
||||
builder.push_clip_id(item.node.parent_id);
|
||||
|
||||
let our_id = item.scroll_root.id;
|
||||
let item_rect = item.scroll_root.clip.main.to_rectf();
|
||||
let webrender_id = match item.scroll_root.root_type {
|
||||
ScrollRootType::Clip => {
|
||||
let our_id = item.node.id;
|
||||
let item_rect = item.node.clip.main.to_rectf();
|
||||
let webrender_id = match item.node.node_type {
|
||||
ClipScrollNodeType::Clip => {
|
||||
builder.define_clip(Some(our_id),
|
||||
item_rect,
|
||||
item.scroll_root.clip.get_complex_clips(),
|
||||
item.node.clip.get_complex_clips(),
|
||||
None)
|
||||
}
|
||||
ScrollRootType::ScrollFrame(scroll_sensitivity) => {
|
||||
ClipScrollNodeType::ScrollFrame(scroll_sensitivity) => {
|
||||
builder.define_scroll_frame(Some(our_id),
|
||||
item.scroll_root.content_rect.to_rectf(),
|
||||
item.scroll_root.clip.main.to_rectf(),
|
||||
item.scroll_root.clip.get_complex_clips(),
|
||||
item.node.content_rect.to_rectf(),
|
||||
item.node.clip.main.to_rectf(),
|
||||
item.node.clip.get_complex_clips(),
|
||||
None,
|
||||
scroll_sensitivity)
|
||||
}
|
||||
ScrollRootType::StickyFrame(sticky_frame_info) => {
|
||||
ClipScrollNodeType::StickyFrame(sticky_frame_info) => {
|
||||
builder.define_sticky_frame(Some(our_id), item_rect, sticky_frame_info)
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue