mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #5804 - jdm:docloader, r=Ms2ger
This implements a simple load-tracking system and tracks stylesheet loads as an example of how it fits together. This is a simplified and rebased version of #3714; I do not believe that the main thrust of hsivonen's comments (related to tracking navigation in browsing contexts) affect this part of the work. r? @Ms2ger <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5804) <!-- Reviewable:end -->
This commit is contained in:
commit
2baa69595e
22 changed files with 459 additions and 144 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
//! The core DOM types. Defines the basic DOM hierarchy as well as all the HTML elements.
|
||||
|
||||
use document_loader::DocumentLoader;
|
||||
use dom::attr::{Attr, AttrHelpers};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
|
@ -1708,9 +1709,10 @@ impl Node {
|
|||
false => IsHTMLDocument::NonHTMLDocument,
|
||||
};
|
||||
let window = document.window().root();
|
||||
let loader = DocumentLoader::new(&*document.loader());
|
||||
let document = Document::new(window.r(), Some(document.url()),
|
||||
is_html_doc, None,
|
||||
None, DocumentSource::NotFromParser);
|
||||
None, DocumentSource::NotFromParser, loader);
|
||||
NodeCast::from_temporary(document)
|
||||
},
|
||||
NodeTypeId::Element(..) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue