mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
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.
This commit is contained in:
parent
72a52e23e0
commit
f4b95dd00b
6 changed files with 0 additions and 59 deletions
|
@ -64,7 +64,6 @@ use style::properties::ComputedValues;
|
|||
use style::values::computed::{LengthOrNone, LengthOrPercentageOrNone};
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||
use util::geometry::MAX_RECT;
|
||||
use util::opts;
|
||||
use util::print_tree::PrintTree;
|
||||
|
||||
/// Information specific to floated blocks.
|
||||
|
@ -2122,9 +2121,6 @@ impl Flow for BlockFlow {
|
|||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||
self.build_display_list_for_block(state, BorderPaintingMode::Separate);
|
||||
self.fragment.restyle_damage.remove(REPAINT);
|
||||
if opts::get().validate_display_list_geometry {
|
||||
self.base.validate_display_list_geometry();
|
||||
}
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &Arc<ComputedValues>) {
|
||||
|
|
|
@ -1853,10 +1853,6 @@ impl InlineFlowDisplayListBuilding for InlineFlow {
|
|||
self.base.build_display_items_for_debugging_tint(state,
|
||||
self.fragments.fragments[0].node);
|
||||
}
|
||||
|
||||
if opts::get().validate_display_list_geometry {
|
||||
self.base.validate_display_list_geometry();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ use style::logical_geometry::LogicalSize;
|
|||
use style::properties::ComputedValues;
|
||||
use style::properties::style_structs;
|
||||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use util::opts;
|
||||
|
||||
// A mode describes which logical axis a flex axis is parallel with.
|
||||
// The logical axises are inline and block, the flex axises are main and cross.
|
||||
|
@ -422,10 +421,6 @@ impl Flow for FlexFlow {
|
|||
|
||||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||
self.build_display_list_for_flex(state);
|
||||
|
||||
if opts::get().validate_display_list_geometry {
|
||||
self.block_flow.base.validate_display_list_geometry();
|
||||
}
|
||||
}
|
||||
|
||||
fn collect_stacking_contexts(&mut self,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ use style::computed_values::{list_style_type, position};
|
|||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::ComputedValues;
|
||||
use text;
|
||||
use util::opts;
|
||||
|
||||
/// A block with the CSS `display` property equal to `list-item`.
|
||||
#[derive(Debug)]
|
||||
|
@ -144,9 +143,6 @@ impl Flow for ListItemFlow {
|
|||
|
||||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||
self.build_display_list_for_list_item(state);
|
||||
if opts::get().validate_display_list_geometry {
|
||||
self.block_flow.base.validate_display_list_geometry();
|
||||
}
|
||||
}
|
||||
|
||||
fn collect_stacking_contexts(&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue