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.
This commit is contained in:
Patrick Walton 2015-08-03 15:35:39 -07:00
parent 86476804ca
commit ac5e7ec035

View file

@ -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