From ac5e7ec035c15dff66b07c03297f531a6ab31f5a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 3 Aug 2015 15:35:39 -0700 Subject: [PATCH] construct: When repairing styles for incremental reflow, only repair styles of nodes that represent the dirty node. Fixes jumpiness on many pages; e.g. the WPT results pages. For some reason, this would not reproduce with an automated test. --- components/layout/construct.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 89e88847a22..1bc3dfea922 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1272,6 +1272,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