auto merge of #4884 : glennw/servo/iframe-load, r=jdm

This commit is contained in:
bors-servo 2015-02-11 03:51:47 -07:00
commit fcfa00f4df
16 changed files with 34 additions and 51 deletions

View file

@ -31,7 +31,7 @@ use dom::htmlelement::HTMLElementTypeId;
use dom::htmliframeelement::HTMLIFrameElement;
use dom::keyboardevent::KeyboardEvent;
use dom::mouseevent::MouseEvent;
use dom::node::{self, Node, NodeHelpers, NodeDamage, NodeTypeId};
use dom::node::{self, Node, NodeHelpers, NodeDamage, NodeTypeId, window_from_node};
use dom::window::{Window, WindowHelpers, ScriptHelpers};
use dom::worker::{Worker, TrustedWorkerAddress};
use parse::html::{HTMLInput, parse_html};
@ -1432,6 +1432,20 @@ impl DocumentProgressHandler {
let doctarget: JSRef<EventTarget> = EventTargetCast::from_ref(document.r());
event.r().set_trusted(true);
let _ = wintarget.dispatch_event_with_target(doctarget, event.r());
let window_ref = window.r();
let browser_context = window_ref.browser_context();
let browser_context = browser_context.as_ref().unwrap();
browser_context.frame_element().map(|frame_element| {
let frame_element = frame_element.root();
let frame_window = window_from_node(frame_element.r()).root();
let event = Event::new(GlobalRef::Window(frame_window.r()), "load".to_owned(),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable).root();
let target: JSRef<EventTarget> = EventTargetCast::from_ref(frame_element.r());
event.r().fire(target);
});
}
}

View file

@ -1,3 +1,4 @@
[send-entity-body-document.htm]
type: testharness
expected: TIMEOUT
[XMLHttpRequest: send() - Document]
expected: FAIL

View file

@ -1,6 +0,0 @@
[Document-URL.sub.html]
type: testharness
expected: TIMEOUT
[Document.URL with redirect]
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[Element-matches.html]
type: testharness
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[Node-parentNode.html]
type: testharness
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[ParentNode-querySelector-All.html]
type: testharness
expected: TIMEOUT

View file

@ -1,12 +1,11 @@
[load-text-plain.html]
type: testharness
expected: TIMEOUT
[Checking document metadata for text file]
expected: NOTRUN
expected: FAIL
[Checking DOM for text file]
expected: NOTRUN
expected: FAIL
[Checking contents for text file]
expected: NOTRUN
expected: FAIL

View file

@ -1,3 +1,12 @@
[named-objects.html]
type: testharness
expected: TIMEOUT
[Check if the first nested browsing context is returned by window[\'c\'\]]
expected: FAIL
[Check if window[\'a\'\] contains all a, applet, area, embed, form, img, and object elements, and their order]
expected: FAIL
[Check if window[\'fs\'\] return the frameset element with name=\'fs\']
expected: FAIL
[Check if window[\'b\'\] returns the elements with the id=\'b\']
expected: FAIL
[Check if window[\'d\'\] returns the element with id=\'d\']
expected: FAIL

View file

@ -1,6 +1,5 @@
[base_multiple.html]
type: testharness
expected: TIMEOUT
[The attributes of the a element must be affected by the first base element]
expected: NOTRUN
expected: FAIL

View file

@ -1,3 +0,0 @@
[move_iframe_in_dom_03.html]
type: testharness
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[001.html]
type: testharness
expected: TIMEOUT
[async XMLHttpRequest in dedicated worker]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[002.html]
type: testharness
expected: TIMEOUT
[sync XMLHttpRequest in dedicated worker]
expected: NOTRUN

View file

@ -1,6 +1,5 @@
[003.html]
type: testharness
expected: TIMEOUT
[async XMLHttpRequest in shared worker]
expected: NOTRUN
expected: FAIL

View file

@ -1,6 +1,5 @@
[004.html]
type: testharness
expected: TIMEOUT
[sync XMLHttpRequest in shared worker]
expected: NOTRUN
expected: FAIL

View file

@ -1,6 +0,0 @@
[005.html]
type: testharness
expected: TIMEOUT
[base url, dedicated worker]
expected: NOTRUN

View file

@ -1,6 +1,5 @@
[006.html]
type: testharness
expected: TIMEOUT
[base url, shared worker]
expected: NOTRUN
expected: FAIL