aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-03-12 05:00:17 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-03-12 05:00:17 +0530
commitd330ecdafcdb2556a8ab028436ec87aa6b6db6fe (patch)
treed77a0b29986be93a6ea4aa20a275e4de7ccbf048 /components/layout/layout_thread.rs
parent71b1122e97303c51bac73d03d8af617069a75d21 (diff)
parentae5cfc31e3a84ebc36bd405ebb65b4616f66ff18 (diff)
downloadservo-d330ecdafcdb2556a8ab028436ec87aa6b6db6fe.tar.gz
servo-d330ecdafcdb2556a8ab028436ec87aa6b6db6fe.zip
Auto merge of #9964 - mbrubeck:incremental-damage, r=pcwalton
Compute damage even when incremental layout is disabled This fixes traversals that use the damage flags to decide which nodes to process, such as `resolve_generated_content`, which was broken in non-incremental mode. r? @pcwalton <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9964) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r--components/layout/layout_thread.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs
index 5c6afdbcfff..e31d9f236e1 100644
--- a/components/layout/layout_thread.rs
+++ b/components/layout/layout_thread.rs
@@ -1302,9 +1302,11 @@ impl LayoutThread {
self.profiler_metadata(),
self.time_profiler_chan.clone(),
|| {
- if opts::get().nonincremental_layout ||
- flow_ref::deref_mut(&mut root_flow).compute_layout_damage()
- .contains(REFLOW_ENTIRE_DOCUMENT) {
+ // Call `compute_layout_damage` even in non-incremental mode, because it sets flags
+ // that are needed in both incremental and non-incremental traversals.
+ let damage = flow_ref::deref_mut(&mut root_flow).compute_layout_damage();
+
+ if opts::get().nonincremental_layout || damage.contains(REFLOW_ENTIRE_DOCUMENT) {
flow_ref::deref_mut(&mut root_flow).reflow_entire_document()
}
});