mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #14418 - pcwalton:infinite-reflows, r=notriddle
layout: Fix some particularly bad cases of spurious reflows leading to script thread unresponsiveness. See commits for details. This improves nytimes.com quite a bit. r? @notriddle <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14418) <!-- Reviewable:end -->
This commit is contained in:
commit
d2d62267a1
6 changed files with 86 additions and 34 deletions
|
@ -1093,7 +1093,7 @@ impl LayoutThread {
|
|||
}
|
||||
|
||||
let restyles = document.drain_pending_restyles();
|
||||
debug!("Draining restyles: {}", restyles.len());
|
||||
debug!("Draining restyles: {} (needs dirtying? {:?})", restyles.len(), needs_dirtying);
|
||||
if !needs_dirtying {
|
||||
for (el, restyle) in restyles {
|
||||
// Propagate the descendant bit up the ancestors. Do this before
|
||||
|
@ -1284,6 +1284,10 @@ impl LayoutThread {
|
|||
}
|
||||
|
||||
fn tick_animations(&mut self, rw_data: &mut LayoutThreadData) {
|
||||
if opts::get().relayout_event {
|
||||
println!("**** pipeline={}\tForDisplay\tSpecial\tAnimationTick", self.id);
|
||||
}
|
||||
|
||||
let reflow_info = Reflow {
|
||||
goal: ReflowGoal::ForDisplay,
|
||||
page_clip_rect: max_rect(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue