diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2015-08-03 15:35:39 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2015-08-03 15:35:39 -0700 |
commit | ac5e7ec035c15dff66b07c03297f531a6ab31f5a (patch) | |
tree | 35a839ed505b8cdb66c1f8b3fb6938beb51f6c68 /components/layout/construct.rs | |
parent | 86476804cac668133b6964c8f551918163aa66d7 (diff) | |
download | servo-ac5e7ec035c15dff66b07c03297f531a6ab31f5a.tar.gz servo-ac5e7ec035c15dff66b07c03297f531a6ab31f5a.zip |
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.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 |