mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Remove note_rendering_opportunity
and rendering_opportunity
(#34575)
A rendering opportunity is now unconditionally triggered by handling IPC messages in the `ScriptThread`, unless animations are running in which case it's driven by the compositor. We can now remove calls to `note_rendering_opportunity` and `rendering_opportunity`. There is one tricky case, which is when a promise completion during a microtask checkpoint dirties the page again. In this case we need to trigger a new rendering opportunity, unless animations are running. In a followup change, when not driven by the compositor, rendering opportunities will be driven by a timed task, meaning we can remove this workaround. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
7fcde1f7a3
commit
2bcee38e52
6 changed files with 63 additions and 66 deletions
|
@ -2129,8 +2129,6 @@ impl Node {
|
|||
MutationObserver::queue_a_mutation_record(parent, mutation);
|
||||
}
|
||||
node.owner_doc().remove_script_and_layout_blocker();
|
||||
|
||||
ScriptThread::note_rendering_opportunity(window_from_node(parent).pipeline_id());
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-replace-all>
|
||||
|
@ -2254,7 +2252,6 @@ impl Node {
|
|||
MutationObserver::queue_a_mutation_record(parent, mutation);
|
||||
}
|
||||
parent.owner_doc().remove_script_and_layout_blocker();
|
||||
ScriptThread::note_rendering_opportunity(window_from_node(parent).pipeline_id());
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-clone>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue