diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-01-25 15:01:53 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-01-26 16:37:23 -0500 |
commit | 7eca462c5a5fa613e54a09df6c5c5215b4b9762e (patch) | |
tree | 28a83ecd977dfd5ff9e94d8af52a0234d9ea7ee5 /components/script/dom/htmliframeelement.rs | |
parent | e5a1af5b7ae276a3a47c4b6c5a85b210ab7753a1 (diff) | |
download | servo-7eca462c5a5fa613e54a09df6c5c5215b4b9762e.tar.gz servo-7eca462c5a5fa613e54a09df6c5c5215b4b9762e.zip |
Make iframe's load event trigger a reflow of the enclosing window. Add a catch-all reflow for all same-origin pages sharing an event loop.a
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 65cfd32fa17..fd8788480a6 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -23,9 +23,10 @@ use dom::htmlelement::HTMLElement; use dom::node::{Node, UnbindContext, window_from_node}; use dom::urlhelper::UrlHelper; use dom::virtualmethods::VirtualMethods; -use dom::window::Window; +use dom::window::{ReflowReason, Window}; use js::jsapi::{JSAutoCompartment, JSAutoRequest, RootedValue, JSContext, MutableHandleValue}; use js::jsval::{UndefinedValue, NullValue}; +use layout_interface::ReflowQueryType; use msg::constellation_msg::{ConstellationChan}; use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId}; use page::IterablePage; @@ -34,6 +35,7 @@ use script_traits::{IFrameLoadInfo, MozBrowserEvent, ScriptMsg as ConstellationM use std::ascii::AsciiExt; use std::cell::Cell; use string_cache::Atom; +use style::context::ReflowGoal; use url::Url; use util::prefs; use util::str::{DOMString, LengthOrPercentageOrAuto}; @@ -211,6 +213,10 @@ impl HTMLIFrameElement { let window = window_from_node(self); self.upcast::<EventTarget>().fire_simple_event("load", GlobalRef::Window(window.r())); // TODO Step 5 - unset child document `mut iframe load` flag + + window.reflow(ReflowGoal::ForDisplay, + ReflowQueryType::NoQuery, + ReflowReason::IFrameLoadEvent); } } |