aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-07-07 10:28:04 -0600
committerbors-servo <metajack+bors@gmail.com>2015-07-07 10:28:04 -0600
commitbbcd42773342a587a8515f34bdc3ca69a380c0a8 (patch)
treef0f6d43b0fce997eae29af45eef4f6e51991921a /components/layout/construct.rs
parentc04b7bbf6e5efe2e5217b69c9680e4e91bbd6ecd (diff)
parent54b9aa2cb45ead6667889bd33184125fb8db39ae (diff)
downloadservo-bbcd42773342a587a8515f34bdc3ca69a380c0a8.tar.gz
servo-bbcd42773342a587a8515f34bdc3ca69a380c0a8.zip
Auto merge of #6492 - pcwalton:even-more-jumpiness, r=mbrubeck
layout: Modify styles for replaced content as appropriate during incremental flow construction. Fixes jumpiness on lots of Web sites. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6492) <!-- Reviewable:end -->
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
}
}
}