aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-04-22 14:25:51 -0700
committerbors-servo <lbergstrom+bors@mozilla.com>2016-04-22 14:25:51 -0700
commit47a0f58f98e1a6ddcf5db24347fc6bf890d4a7d6 (patch)
tree996fe771cd42d716f721943a8aa0f51213daae9a /components/script/dom/window.rs
parent0a3a50a1293e4e8f3e04161014d03802765140c7 (diff)
parent7940b22158d892293641aa25df7720316db7e573 (diff)
downloadservo-47a0f58f98e1a6ddcf5db24347fc6bf890d4a7d6.tar.gz
servo-47a0f58f98e1a6ddcf5db24347fc6bf890d4a7d6.zip
Auto merge of #10654 - notriddle:no_resize_on_initial_load, r=asajeffrey
compositing/script: Do not dispatch the resize event when initially l… …oading. No bug report corresponds to this, but I noticed it while trying to reduce #10593 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10654) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 82bfee7e279..d5abbfbcc3a 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -43,7 +43,8 @@ use js::rust::Runtime;
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ResolvedStyleResponse, ScriptReflow};
use layout_interface::{LayoutChan, LayoutRPC, Msg, Reflow, ReflowQueryType, MarginStyleResponse};
use libc;
-use msg::constellation_msg::{ConstellationChan, LoadData, PipelineId, SubpageId, WindowSizeData};
+use msg::constellation_msg::{ConstellationChan, LoadData, PipelineId, SubpageId};
+use msg::constellation_msg::{WindowSizeData, WindowSizeType};
use msg::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
use net_traits::ResourceThread;
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread};
@@ -181,7 +182,7 @@ pub struct Window {
next_subpage_id: Cell<SubpageId>,
/// Pending resize event, if any.
- resize_event: Cell<Option<WindowSizeData>>,
+ resize_event: Cell<Option<(WindowSizeData, WindowSizeType)>>,
/// Pipeline id associated with this page.
id: PipelineId,
@@ -1280,11 +1281,11 @@ impl Window {
self.pending_reflow_count.set(self.pending_reflow_count.get() + 1);
}
- pub fn set_resize_event(&self, event: WindowSizeData) {
- self.resize_event.set(Some(event));
+ pub fn set_resize_event(&self, event: WindowSizeData, event_type: WindowSizeType) {
+ self.resize_event.set(Some((event, event_type)));
}
- pub fn steal_resize_event(&self) -> Option<WindowSizeData> {
+ pub fn steal_resize_event(&self) -> Option<(WindowSizeData, WindowSizeType)> {
let event = self.resize_event.get();
self.resize_event.set(None);
event