diff options
author | Josh Matthews <josh@joshmatthews.net> | 2020-04-27 14:53:28 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2020-05-11 17:41:56 -0400 |
commit | 884225003358b3a4cdacc802e4b429e44f28d16f (patch) | |
tree | 10c77d981f8e6c19dc6565ce66467826371c776e /components/layout/sequential.rs | |
parent | 41367b01bbb0e43a1d7f57f63cbd3099610f2544 (diff) | |
download | servo-884225003358b3a4cdacc802e4b429e44f28d16f.tar.gz servo-884225003358b3a4cdacc802e4b429e44f28d16f.zip |
Update webrender.
Diffstat (limited to 'components/layout/sequential.rs')
-rw-r--r-- | components/layout/sequential.rs | 8 |
1 files changed, 6 insertions, 2 deletions
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(), }, ))); |