diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2016-03-02 15:34:33 -0800 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2016-03-03 13:09:55 -0800 |
commit | f4b95dd00b00c0b43a424712b74b28577f139d79 (patch) | |
tree | f69d511294b806bf3dd0fb312cbe4acf618c6208 /components/layout/flow.rs | |
parent | 72a52e23e052ec1461ebf5d4e8e6fd7ab8019e8d (diff) | |
download | servo-f4b95dd00b00c0b43a424712b74b28577f139d79.tar.gz servo-f4b95dd00b00c0b43a424712b74b28577f139d79.zip |
layout: Remove the `validate_display_list_geometry` debugging tool.
I don't think anyone was using it, and it's incompatible with taking
display lists out of flows.
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r-- | components/layout/flow.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs index a02b718d8cd..def1f7bf8a7 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -1167,37 +1167,6 @@ impl BaseFlow { p as usize } - /// Ensures that all display list items generated by this flow are within the flow's overflow - /// rect. This should only be used for debugging. - pub fn validate_display_list_geometry(&self) { - // FIXME(pcwalton, #2795): Get the real container size. - let container_size = Size2D::zero(); - let position_with_overflow = self.position - .to_physical(self.writing_mode, container_size) - .union(&self.overflow.paint); - let bounds = Rect::new(self.stacking_relative_position, position_with_overflow.size); - - let items = match self.display_list_building_result { - Some(ref items) => items, - None => return, - }; - - for item in items.iter() { - let base_item = item.item.base(); - let mut paint_bounds = base_item.clip.clone(); - paint_bounds.intersect_rect(&base_item.bounds); - if !paint_bounds.might_be_nonempty() { - continue; - } - - if bounds.union(&paint_bounds.bounding_rect()) != bounds { - error!("DisplayList item {:?} outside of Flow overflow ({:?})", - item.item, - paint_bounds); - } - } - } - pub fn flow_id(&self) -> usize { return self as *const BaseFlow as usize; } |