mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
layout: Keep track of whether we've deferred the painting of the document due to
a script query. This will, rather unfortunately, mean that we might repaint two times if we've deferred a paint, then get an out-of-band reflow. Still seemed better than not suppressing paints at all. Fixes #13131
This commit is contained in:
parent
1fcc447941
commit
fd9cd2f103
6 changed files with 106 additions and 52 deletions
|
@ -1200,9 +1200,11 @@ impl Window {
|
|||
if !for_display || self.Document().needs_reflow() {
|
||||
issued_reflow = self.force_reflow(goal, query_type, reason);
|
||||
|
||||
// If window_size is `None`, we don't reflow, so the document stays dirty.
|
||||
// Otherwise, we shouldn't need a reflow immediately after a reflow.
|
||||
// If window_size is `None`, we don't reflow, so the document stays
|
||||
// dirty. Otherwise, we shouldn't need a reflow immediately after a
|
||||
// reflow, except if we're waiting for a deferred paint.
|
||||
assert!(!self.Document().needs_reflow() ||
|
||||
(!for_display && self.Document().needs_paint()) ||
|
||||
self.window_size.get().is_none() ||
|
||||
self.suppress_reflow.get());
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue