aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorPyfisch <pyfisch@gmail.com>2018-01-17 23:17:39 +0100
committerPyfisch <pyfisch@gmail.com>2018-01-17 23:29:57 +0100
commitaf52233ae57af8c05eab1f60f208cf5b42a832bd (patch)
treea63d1f9a157595244252aff28e06319539e3e025 /components/script/dom/window.rs
parent8c7c5f6e79c4709807d254a6367fb546f6f8e186 (diff)
downloadservo-af52233ae57af8c05eab1f60f208cf5b42a832bd.tar.gz
servo-af52233ae57af8c05eab1f60f208cf5b42a832bd.zip
Introduce MaxRect trait
It is implemented for LayoutRect and Rect<Au>. Replaces the max_rect() function from servo_geometry.
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 71d13e8e8f7..21713696f82 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -84,7 +84,7 @@ use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
use selectors::attr::CaseSensitivity;
use servo_config::opts;
use servo_config::prefs::PREFS;
-use servo_geometry::{f32_rect_to_au_rect, max_rect};
+use servo_geometry::{f32_rect_to_au_rect, MaxRect};
use servo_url::{Host, MutableOrigin, ImmutableOrigin, ServoUrl};
use std::borrow::ToOwned;
use std::cell::Cell;
@@ -1606,7 +1606,7 @@ impl Window {
return false;
}
- let had_clip_rect = clip_rect != max_rect();
+ let had_clip_rect = clip_rect != MaxRect::max_rect();
if had_clip_rect && !should_move_clip_rect(clip_rect, viewport) {
return false;
}
@@ -1614,7 +1614,7 @@ impl Window {
self.page_clip_rect.set(proposed_clip_rect);
// If we didn't have a clip rect, the previous display doesn't need rebuilding
- // because it was built for infinite clip (max_rect()).
+ // because it was built for infinite clip (MaxRect::amax_rect()).
had_clip_rect
}
@@ -1835,7 +1835,7 @@ impl Window {
js_runtime: DomRefCell::new(Some(runtime.clone())),
bluetooth_thread,
bluetooth_extra_permission_data: BluetoothExtraPermissionData::new(),
- page_clip_rect: Cell::new(max_rect()),
+ page_clip_rect: Cell::new(MaxRect::max_rect()),
resize_event: Default::default(),
layout_chan,
layout_rpc,