diff options
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/display_list/builder.rs | 14 | ||||
-rw-r--r-- | components/layout/display_list/items.rs | 1 | ||||
-rw-r--r-- | components/layout/display_list/mod.rs | 2 | ||||
-rw-r--r-- | components/layout/display_list/webrender_helpers.rs | 3 | ||||
-rw-r--r-- | components/layout/sequential.rs | 8 |
5 files changed, 16 insertions, 12 deletions
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index e4d20d48de7..3efb254cd32 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -70,7 +70,7 @@ use style_traits::ToCss; use webrender_api::units::{LayoutRect, LayoutTransform, LayoutVector2D}; use webrender_api::{self, BorderDetails, BorderRadius, BorderSide, BoxShadowClipMode, ColorF}; use webrender_api::{ColorU, ExternalScrollId, FilterOp, GlyphInstance, ImageRendering, LineStyle}; -use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder}; +use webrender_api::{NinePatchBorder, NinePatchBorderSource, NormalBorder, PropertyBinding}; use webrender_api::{ScrollSensitivity, StickyOffsetBounds}; static THREAD_TINT_COLORS: [ColorF; 8] = [ @@ -721,8 +721,9 @@ impl Fragment { state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { - color: background_color.to_layout(), + color: PropertyBinding::Value(background_color.to_layout()), common: items::empty_common_item_properties(), + bounds: bounds.to_layout(), }, ))); }); @@ -1468,7 +1469,8 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { common: items::empty_common_item_properties(), - color: background_color.to_layout(), + color: PropertyBinding::Value(background_color.to_layout()), + bounds: stacking_relative_border_box.to_layout(), }, ))); } @@ -1514,7 +1516,8 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { common: items::empty_common_item_properties(), - color: self.style().get_inherited_text().color.to_layout(), + color: PropertyBinding::Value(self.style().get_inherited_text().color.to_layout()), + bounds: insertion_point_bounds.to_layout(), }, ))); } @@ -1697,7 +1700,8 @@ impl Fragment { base, webrender_api::RectangleDisplayItem { common: items::empty_common_item_properties(), - color: ColorF::TRANSPARENT, + color: PropertyBinding::Value(ColorF::TRANSPARENT), + bounds: content_size.to_layout(), }, ))); } diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs index 62924fa6c2f..58ec79cb0fa 100644 --- a/components/layout/display_list/items.rs +++ b/components/layout/display_list/items.rs @@ -455,7 +455,6 @@ pub fn empty_common_item_properties() -> CommonItemProperties { spatial_id: SpatialId::root_scroll_node(wr::PipelineId::dummy()), hit_info: None, flags: PrimitiveFlags::empty(), - item_key: None, } } diff --git a/components/layout/display_list/mod.rs b/components/layout/display_list/mod.rs index 257d9eb6ddc..0ac0f81e7ee 100644 --- a/components/layout/display_list/mod.rs +++ b/components/layout/display_list/mod.rs @@ -12,7 +12,7 @@ pub use self::conversions::ToLayout; mod background; mod border; mod builder; -mod conversions; +pub(crate) mod conversions; mod gradient; pub mod items; mod webrender_helpers; diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs index cc0e70a77ec..de6ffc0e4fe 100644 --- a/components/layout/display_list/webrender_helpers.rs +++ b/components/layout/display_list/webrender_helpers.rs @@ -277,7 +277,6 @@ impl DisplayItem { }, item_rect, node.clip.complex.clone(), - None, ); state.spatial_ids[item.node_index.to_index()] = Some(parent_spatial_id); @@ -293,7 +292,6 @@ impl DisplayItem { node.content_rect, node.clip.main, node.clip.complex.clone(), - None, scroll_sensitivity, webrender_api::units::LayoutVector2D::zero(), ); @@ -341,6 +339,5 @@ fn build_common_item_properties( // TODO(gw): Make use of the WR backface visibility functionality. flags: PrimitiveFlags::default(), hit_info: tag, - item_key: None, } } diff --git a/components/layout/sequential.rs b/components/layout/sequential.rs index 8a113f39bb0..59df7de2bbf 100644 --- a/components/layout/sequential.rs +++ b/components/layout/sequential.rs @@ -5,6 +5,7 @@ //! Implements sequential traversals over the DOM and flow trees. use crate::context::LayoutContext; +use crate::display_list::conversions::ToLayout; use crate::display_list::items::{self, CommonDisplayItem, DisplayItem, DisplayListSection}; use crate::display_list::{DisplayListBuildState, StackingContextCollectionState}; use crate::floats::SpeculatedFloatPlacement; @@ -19,6 +20,7 @@ use euclid::default::{Point2D, Rect, Size2D, Vector2D}; use servo_config::opts; use style::servo::restyle_damage::ServoRestyleDamage; use webrender_api::units::LayoutPoint; +use webrender_api::PropertyBinding; pub fn resolve_generated_content(root: &mut dyn Flow, layout_context: &LayoutContext) { ResolveGeneratedContent::new(&layout_context).traverse(root, 0); @@ -83,8 +85,9 @@ pub fn build_display_list_for_subtree<'a>( // Create a base rectangle for the page background based on the root // background color. + let bounds = Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size); let base = state.create_base_display_item( - Rect::new(Point2D::new(Au::new(0), Au::new(0)), client_size), + bounds, flow_root.as_block().fragment.node, None, DisplayListSection::BackgroundAndBorders, @@ -92,8 +95,9 @@ pub fn build_display_list_for_subtree<'a>( state.add_display_item(DisplayItem::Rectangle(CommonDisplayItem::new( base, webrender_api::RectangleDisplayItem { - color: background_color, + color: PropertyBinding::Value(background_color), common: items::empty_common_item_properties(), + bounds: bounds.to_layout(), }, ))); |