aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_box_base.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/layout_box_base.rs')
-rw-r--r--components/layout/layout_box_base.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/layout/layout_box_base.rs b/components/layout/layout_box_base.rs
index 71fbfdeced1..161aee0f9bb 100644
--- a/components/layout/layout_box_base.rs
+++ b/components/layout/layout_box_base.rs
@@ -27,7 +27,6 @@ use crate::{ConstraintSpace, ContainingBlockSize};
#[derive(MallocSizeOf)]
pub(crate) struct LayoutBoxBase {
pub base_fragment_info: BaseFragmentInfo,
- #[conditional_malloc_size_of]
pub style: Arc<ComputedValues>,
pub cached_inline_content_size:
AtomicRefCell<Option<Box<(SizeConstraint, InlineContentSizesResult)>>>,
@@ -90,6 +89,13 @@ impl LayoutBoxBase {
pub(crate) fn clear_fragments(&self) {
self.fragments.borrow_mut().clear();
}
+
+ pub(crate) fn repair_style(&mut self, new_style: &Arc<ComputedValues>) {
+ self.style = new_style.clone();
+ for fragment in self.fragments.borrow_mut().iter_mut() {
+ fragment.repair_style(new_style);
+ }
+ }
}
impl Debug for LayoutBoxBase {