diff options
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index ec3bc5b1b34..c460472ac13 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -17,6 +17,7 @@ //! a page runs its course and the script thread returns to processing events in the main event //! loop. +use bluetooth_traits::BluetoothMethodMsg; use devtools; use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo}; use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId}; @@ -73,7 +74,6 @@ use layout_wrapper::ServoLayoutNode; use mem::heap_size_of_self_and_children; use msg::constellation_msg::{FrameType, PipelineId, PipelineNamespace, ReferrerPolicy}; use net_traits::{CoreResourceMsg, IpcSend, Metadata, ResourceThreads}; -use net_traits::bluetooth_thread::BluetoothMethodMsg; use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheResult, ImageCacheThread}; use net_traits::request::{CredentialsMode, Destination, RequestInit}; use network_listener::NetworkListener; @@ -1937,7 +1937,7 @@ impl ScriptThread { .filter_map(Root::downcast::<HTMLAnchorElement>) .next() { let status = anchor.upcast::<Element>() - .get_attribute(&ns!(), &atom!("href")) + .get_attribute(&ns!(), &local_name!("href")) .and_then(|href| { let value = href.value(); let url = document.url(); @@ -2099,6 +2099,11 @@ impl ScriptThread { 0i32); uievent.upcast::<Event>().fire(window.upcast()); } + + // https://html.spec.whatwg.org/multipage/#event-loop-processing-model + // Step 7.7 - evaluate media queries and report changes + // Since we have resized, we need to re-evaluate MQLs + window.evaluate_media_queries_and_report_changes(); } /// Initiate a non-blocking fetch for a specified resource. Stores the InProgressLoad |