aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/rpc.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-11-06 15:55:11 -0500
committerJosh Matthews <josh@joshmatthews.net>2019-11-06 16:13:55 -0500
commitfd260f78c80a070727ba88d7b5f7cc40eb7efb5a (patch)
treee5d20c19d3a8e3a79f88e9ceff0e8b8f772568a9 /components/script_layout_interface/rpc.rs
parent38e4ae0833fbc15c8579d40bca7fc87e9d37cb03 (diff)
downloadservo-fd260f78c80a070727ba88d7b5f7cc40eb7efb5a.tar.gz
servo-fd260f78c80a070727ba88d7b5f7cc40eb7efb5a.zip
dom: Calculate the viewport size of iframes when they are first added to the tree.
Diffstat (limited to 'components/script_layout_interface/rpc.rs')
-rw-r--r--components/script_layout_interface/rpc.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script_layout_interface/rpc.rs b/components/script_layout_interface/rpc.rs
index 95d25082ed8..19da8fa6afc 100644
--- a/components/script_layout_interface/rpc.rs
+++ b/components/script_layout_interface/rpc.rs
@@ -4,9 +4,11 @@
use app_units::Au;
use euclid::default::Rect;
+use euclid::Size2D;
use script_traits::UntrustedNodeAddress;
use servo_arc::Arc;
use style::properties::ComputedValues;
+use style_traits::CSSPixel;
use webrender_api::ExternalScrollId;
/// Synchronous messages that script can send to layout.
@@ -39,6 +41,8 @@ pub trait LayoutRPC {
fn nodes_from_point_response(&self) -> Vec<UntrustedNodeAddress>;
/// Query layout to get the inner text for a given element.
fn element_inner_text(&self) -> String;
+ /// Get the dimensions of an iframe's inner window.
+ fn inner_window_dimensions(&self) -> Option<Size2D<f32, CSSPixel>>;
}
pub struct ContentBoxResponse(pub Option<Rect<Au>>);