mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove PseudoDisplayItemClass
Now that content box queries are made against the flow tree, we can remove PseudoDisplayItems from the display list.
This commit is contained in:
parent
d8a5199ba8
commit
2e8f1c08fa
2 changed files with 1 additions and 19 deletions
|
@ -420,13 +420,6 @@ pub enum DisplayItem {
|
||||||
BorderDisplayItemClass(Box<BorderDisplayItem>),
|
BorderDisplayItemClass(Box<BorderDisplayItem>),
|
||||||
GradientDisplayItemClass(Box<GradientDisplayItem>),
|
GradientDisplayItemClass(Box<GradientDisplayItem>),
|
||||||
LineDisplayItemClass(Box<LineDisplayItem>),
|
LineDisplayItemClass(Box<LineDisplayItem>),
|
||||||
|
|
||||||
/// A pseudo-display item that exists only so that queries like `ContentBoxQuery` and
|
|
||||||
/// `ContentBoxesQuery` can be answered.
|
|
||||||
///
|
|
||||||
/// FIXME(pcwalton): This is really bogus. Those queries should not consult the display list
|
|
||||||
/// but should instead consult the flow/box tree.
|
|
||||||
PseudoDisplayItemClass(Box<BaseDisplayItem>),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Information common to all display items.
|
/// Information common to all display items.
|
||||||
|
@ -639,8 +632,6 @@ impl DisplayItem {
|
||||||
line.color,
|
line.color,
|
||||||
line.style)
|
line.style)
|
||||||
}
|
}
|
||||||
|
|
||||||
PseudoDisplayItemClass(_) => {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +643,6 @@ impl DisplayItem {
|
||||||
BorderDisplayItemClass(ref border) => &border.base,
|
BorderDisplayItemClass(ref border) => &border.base,
|
||||||
GradientDisplayItemClass(ref gradient) => &gradient.base,
|
GradientDisplayItemClass(ref gradient) => &gradient.base,
|
||||||
LineDisplayItemClass(ref line) => &line.base,
|
LineDisplayItemClass(ref line) => &line.base,
|
||||||
PseudoDisplayItemClass(ref base) => &**base,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,7 +654,6 @@ impl DisplayItem {
|
||||||
BorderDisplayItemClass(ref mut border) => &mut border.base,
|
BorderDisplayItemClass(ref mut border) => &mut border.base,
|
||||||
GradientDisplayItemClass(ref mut gradient) => &mut gradient.base,
|
GradientDisplayItemClass(ref mut gradient) => &mut gradient.base,
|
||||||
LineDisplayItemClass(ref mut line) => &mut line.base,
|
LineDisplayItemClass(ref mut line) => &mut line.base,
|
||||||
PseudoDisplayItemClass(ref mut base) => &mut **base,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -691,7 +680,6 @@ impl fmt::Show for DisplayItem {
|
||||||
BorderDisplayItemClass(_) => "Border",
|
BorderDisplayItemClass(_) => "Border",
|
||||||
GradientDisplayItemClass(_) => "Gradient",
|
GradientDisplayItemClass(_) => "Gradient",
|
||||||
LineDisplayItemClass(_) => "Line",
|
LineDisplayItemClass(_) => "Line",
|
||||||
PseudoDisplayItemClass(_) => "Pseudo",
|
|
||||||
},
|
},
|
||||||
self.base().bounds,
|
self.base().bounds,
|
||||||
self.base().node.id()
|
self.base().node.id()
|
||||||
|
|
|
@ -27,7 +27,7 @@ use gfx::color;
|
||||||
use gfx::display_list::{BaseDisplayItem, BorderDisplayItem, BorderDisplayItemClass, DisplayItem};
|
use gfx::display_list::{BaseDisplayItem, BorderDisplayItem, BorderDisplayItemClass, DisplayItem};
|
||||||
use gfx::display_list::{DisplayList, GradientDisplayItem, GradientDisplayItemClass, GradientStop};
|
use gfx::display_list::{DisplayList, GradientDisplayItem, GradientDisplayItemClass, GradientStop};
|
||||||
use gfx::display_list::{ImageDisplayItem, ImageDisplayItemClass, LineDisplayItem, BorderRadii};
|
use gfx::display_list::{ImageDisplayItem, ImageDisplayItemClass, LineDisplayItem, BorderRadii};
|
||||||
use gfx::display_list::{LineDisplayItemClass, PseudoDisplayItemClass, SidewaysLeft, SidewaysRight};
|
use gfx::display_list::{LineDisplayItemClass, SidewaysLeft, SidewaysRight};
|
||||||
use gfx::display_list::{SolidColorDisplayItem, SolidColorDisplayItemClass, StackingContext};
|
use gfx::display_list::{SolidColorDisplayItem, SolidColorDisplayItemClass, StackingContext};
|
||||||
use gfx::display_list::{TextDisplayItem, TextDisplayItemClass, Upright};
|
use gfx::display_list::{TextDisplayItem, TextDisplayItemClass, Upright};
|
||||||
use gfx::paint_task::PaintLayer;
|
use gfx::paint_task::PaintLayer;
|
||||||
|
@ -550,12 +550,6 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
let level =
|
let level =
|
||||||
StackingLevel::from_background_and_border_level(background_and_border_level);
|
StackingLevel::from_background_and_border_level(background_and_border_level);
|
||||||
|
|
||||||
// Add a pseudo-display item for content box queries. This is a very bogus thing to do.
|
|
||||||
let base_display_item = box BaseDisplayItem::new(absolute_fragment_bounds,
|
|
||||||
self.node,
|
|
||||||
*clip_rect);
|
|
||||||
display_list.push(PseudoDisplayItemClass(base_display_item), level);
|
|
||||||
|
|
||||||
// Add the background to the list, if applicable.
|
// Add the background to the list, if applicable.
|
||||||
match self.inline_context {
|
match self.inline_context {
|
||||||
Some(ref inline_context) => {
|
Some(ref inline_context) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue