aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/layout/construct.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 519046b5533..9ab1dfc6675 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -1295,6 +1295,11 @@ impl<'a> FlowConstructor<'a> {
for fragment in inline_fragments_construction_result.fragments
.fragments
.iter_mut() {
+ // Only mutate the styles of fragments that represent the dirty node.
+ if fragment.node != node.opaque() {
+ continue
+ }
+
match fragment.specific {
SpecificFragmentInfo::InlineBlock(ref mut inline_block_fragment) => {
flow::mut_base(&mut *inline_block_fragment.flow_ref).restyle_damage