mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: Cache the <iframe>
list per-Document (#34702)
This change creates a new struct `IFrameCollection` that is used to cache the list of `<iframe>`s in a `Document` as long as the `Document`'s DOM has not changed. This prevent constantly iterating the entire DOM during *update the rendering*, which runs up to 60 times per second as well as for other operations. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
adfee3daa5
commit
a5c461146f
7 changed files with 225 additions and 107 deletions
|
@ -804,7 +804,7 @@ impl VirtualMethods for HTMLIFrameElement {
|
|||
);
|
||||
let exited_window = exited_document.window();
|
||||
exited_window.discard_browsing_context();
|
||||
for exited_iframe in exited_document.iter_iframes() {
|
||||
for exited_iframe in exited_document.iframes().iter() {
|
||||
debug!("Discarding nested browsing context");
|
||||
exited_iframe.destroy_nested_browsing_context();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue