mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Remove the now-useless dirty
field from the layout context.
At this point the only thing it does is to try to avoid adding display items that are outside the root scrollable area, which is both wrong (since it's incompatible with having scrollable areas outside the root) and is useless (because we have displayports now).
This commit is contained in:
parent
c079c1cf6d
commit
11822f3eb1
3 changed files with 1 additions and 19 deletions
|
@ -109,9 +109,6 @@ pub struct SharedLayoutContext {
|
|||
/// The URL.
|
||||
pub url: Url,
|
||||
|
||||
/// The dirty rectangle, used during display list building.
|
||||
pub dirty: Rect<Au>,
|
||||
|
||||
/// Starts at zero, and increased by one every time a layout completes.
|
||||
/// This can be used to easily check for invalid stale data.
|
||||
pub generation: u32,
|
||||
|
|
|
@ -900,11 +900,9 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
relative_containing_block_mode,
|
||||
CoordinateSystem::Own);
|
||||
|
||||
debug!("Fragment::build_display_list at rel={:?}, abs={:?}, dirty={:?}, flow origin={:?}: \
|
||||
{:?}",
|
||||
debug!("Fragment::build_display_list at rel={:?}, abs={:?}, flow origin={:?}: {:?}",
|
||||
self.border_box,
|
||||
stacking_relative_border_box,
|
||||
layout_context.shared.dirty,
|
||||
stacking_relative_flow_origin,
|
||||
self);
|
||||
|
||||
|
@ -913,11 +911,6 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
return
|
||||
}
|
||||
|
||||
if !stacking_relative_border_box.intersects(&layout_context.shared.dirty) {
|
||||
debug!("Fragment::build_display_list: Did not intersect...");
|
||||
return
|
||||
}
|
||||
|
||||
// Calculate the clip rect. If there's nothing to render at all, don't even construct
|
||||
// display list items.
|
||||
let clip = self.calculate_style_specified_clip(clip, &stacking_relative_border_box);
|
||||
|
|
|
@ -119,9 +119,6 @@ pub struct LayoutTaskData {
|
|||
/// The workers that we use for parallel operation.
|
||||
pub parallel_traversal: Option<WorkQueue<SharedLayoutContext, WorkQueueData>>,
|
||||
|
||||
/// The dirty rect. Used during display list construction.
|
||||
pub dirty: Rect<Au>,
|
||||
|
||||
/// Starts at zero, and increased by one every time a layout completes.
|
||||
/// This can be used to easily check for invalid stale data.
|
||||
pub generation: u32,
|
||||
|
@ -377,7 +374,6 @@ impl LayoutTask {
|
|||
stacking_context: None,
|
||||
stylist: stylist,
|
||||
parallel_traversal: parallel_traversal,
|
||||
dirty: Rect::zero(),
|
||||
generation: 0,
|
||||
content_box_response: Rect::zero(),
|
||||
content_boxes_response: Vec::new(),
|
||||
|
@ -421,7 +417,6 @@ impl LayoutTask {
|
|||
stylist: &*rw_data.stylist,
|
||||
url: (*url).clone(),
|
||||
reflow_root: reflow_root.map(|node| node.opaque()),
|
||||
dirty: Rect::zero(),
|
||||
visible_rects: rw_data.visible_rects.clone(),
|
||||
generation: rw_data.generation,
|
||||
new_animations_sender: rw_data.new_animations_sender.clone(),
|
||||
|
@ -1005,9 +1000,6 @@ impl LayoutTask {
|
|||
self.profiler_metadata(),
|
||||
self.time_profiler_chan.clone(),
|
||||
|| {
|
||||
shared_layout_context.dirty =
|
||||
flow::base(&**layout_root).position.to_physical(writing_mode,
|
||||
rw_data.screen_size);
|
||||
flow::mut_base(&mut **layout_root).stacking_relative_position =
|
||||
LogicalPoint::zero(writing_mode).to_physical(writing_mode,
|
||||
rw_data.screen_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue