aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/fragment_tree/box_fragment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/fragment_tree/box_fragment.rs')
-rw-r--r--components/layout/fragment_tree/box_fragment.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/layout/fragment_tree/box_fragment.rs b/components/layout/fragment_tree/box_fragment.rs
index 65ad1c4aa93..4cd8f278498 100644
--- a/components/layout/fragment_tree/box_fragment.rs
+++ b/components/layout/fragment_tree/box_fragment.rs
@@ -17,6 +17,7 @@ use style::properties::ComputedValues;
use style::values::specified::box_::DisplayOutside;
use super::{BaseFragment, BaseFragmentInfo, CollapsedBlockMargins, Fragment};
+use crate::ArcRefCell;
use crate::display_list::ToWebRender;
use crate::formatting_contexts::Baselines;
use crate::geom::{
@@ -40,10 +41,14 @@ pub(crate) enum BackgroundMode {
Normal,
}
+#[derive(Debug, MallocSizeOf)]
+pub(crate) struct BackgroundStyle(#[conditional_malloc_size_of] pub ServoArc<ComputedValues>);
+
+pub(crate) type SharedBackgroundStyle = ArcRefCell<BackgroundStyle>;
+
#[derive(MallocSizeOf)]
pub(crate) struct ExtraBackground {
- #[conditional_malloc_size_of]
- pub style: ServoArc<ComputedValues>,
+ pub style: SharedBackgroundStyle,
pub rect: PhysicalRect<Au>,
}