aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-06-26 17:01:08 -0700
committerPatrick Walton <pcwalton@mimiga.net>2015-07-07 15:00:52 -0700
commit24f10df436fdd1b6fdf197f76feb89135b72f25d (patch)
treea87f20b3c9432193903c68a681b56c2b67d401ee /components/layout/construct.rs
parentd64f91863af6c22b3af6d5ea5ebfd671f4e83aaa (diff)
downloadservo-24f10df436fdd1b6fdf197f76feb89135b72f25d.tar.gz
servo-24f10df436fdd1b6fdf197f76feb89135b72f25d.zip
layout: Modify styles for replaced content as appropriate during
incremental flow construction. Fixes jumpiness on lots of Web sites.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r--components/layout/construct.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 12eb258f8f5..cc67cc6c300 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -1249,7 +1249,7 @@ impl<'a> FlowConstructor<'a> {
let mut layout_data_ref = node.mutate_layout_data();
let layout_data = layout_data_ref.as_mut().expect("no layout data");
- let style = (*node.get_style(&layout_data)).clone();
+ let mut style = (*node.get_style(&layout_data)).clone();
let damage = layout_data.data.restyle_damage;
match node.construction_result_mut(layout_data) {
&mut ConstructionResult::None => true,
@@ -1297,8 +1297,10 @@ impl<'a> FlowConstructor<'a> {
.repair_style_and_bubble_inline_sizes(&style);
}
_ => {
+ if node.is_replaced_content() {
+ properties::modify_style_for_replaced_content(&mut style);
+ }
fragment.repair_style(&style);
- return true
}
}
}