mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
merge from master
This commit is contained in:
commit
6e774ea6eb
1044 changed files with 46059 additions and 1506 deletions
|
@ -37,7 +37,7 @@ use network_listener::{NetworkListener, PreInvoke};
|
|||
use script_task::ScriptTaskEventCategory::ScriptEvent;
|
||||
use script_task::{CommonScriptMsg, Runnable, ScriptChan};
|
||||
use std::ascii::AsciiExt;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use url::{Url, UrlParser};
|
||||
|
@ -65,7 +65,7 @@ pub struct HTMLScriptElement {
|
|||
parser_document: JS<Document>,
|
||||
|
||||
/// The source this script was loaded from
|
||||
load: RefCell<Option<ScriptOrigin>>,
|
||||
load: DOMRefCell<Option<ScriptOrigin>>,
|
||||
|
||||
#[ignore_heap_size_of = "Defined in rust-encoding"]
|
||||
/// https://html.spec.whatwg.org/multipage/#concept-script-encoding
|
||||
|
@ -83,7 +83,7 @@ impl HTMLScriptElement {
|
|||
non_blocking: Cell::new(creator != ElementCreator::ParserCreated),
|
||||
ready_to_be_parser_executed: Cell::new(false),
|
||||
parser_document: JS::from_ref(document),
|
||||
load: RefCell::new(None),
|
||||
load: DOMRefCell::new(None),
|
||||
block_character_encoding: DOMRefCell::new(UTF_8 as EncodingRef),
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ impl HTMLScriptElement {
|
|||
|
||||
// Step 1.
|
||||
let doc = document_from_node(self);
|
||||
if self.parser_inserted.get() && doc.r() != self.parser_document.root().r() {
|
||||
if self.parser_inserted.get() && &*doc != &*self.parser_document {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -562,8 +562,8 @@ impl VirtualMethods for HTMLScriptElement {
|
|||
|
||||
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
|
||||
self.super_type().unwrap().attribute_mutated(attr, mutation);
|
||||
match attr.local_name() {
|
||||
&atom!("src") => {
|
||||
match *attr.local_name() {
|
||||
atom!("src") => {
|
||||
if let AttributeMutation::Set(_) = mutation {
|
||||
if !self.parser_inserted.get() && self.upcast::<Node>().is_in_doc() {
|
||||
self.prepare();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue