mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
script: Stop rebuilding every flow in the document when an image
finishes loading.
This commit is contained in:
parent
fda3791487
commit
2c22467d53
1 changed files with 5 additions and 1 deletions
|
@ -1212,7 +1212,11 @@ impl ScriptTask {
|
||||||
fn handle_reflow_event(&self, pipeline_id: PipelineId) {
|
fn handle_reflow_event(&self, pipeline_id: PipelineId) {
|
||||||
debug!("script got reflow event");
|
debug!("script got reflow event");
|
||||||
let page = get_page(&self.root_page(), pipeline_id);
|
let page = get_page(&self.root_page(), pipeline_id);
|
||||||
self.force_reflow(&*page, ReflowReason::ReceivedReflowEvent);
|
let document = page.document().root();
|
||||||
|
let window = window_from_node(document.r()).root();
|
||||||
|
window.r().reflow(ReflowGoal::ForDisplay,
|
||||||
|
ReflowQueryType::NoQuery,
|
||||||
|
ReflowReason::ReceivedReflowEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initiate a non-blocking fetch for a specified resource. Stores the InProgressLoad
|
/// Initiate a non-blocking fetch for a specified resource. Stores the InProgressLoad
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue