aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/wrapper_traits.rs
diff options
context:
space:
mode:
authorpaavininanda <paavininanda@gmail.com>2018-09-03 19:46:15 +0530
committerpaavininanda <paavininanda@gmail.com>2018-09-13 00:23:09 +0530
commit25027e476c89ce438a85a631d66f5f4c261be895 (patch)
tree741c24f4e5e23d5b713fb72658d7d00da5374f90 /components/script_layout_interface/wrapper_traits.rs
parent9a83ab6297ddb62937fc54521b7fd4d19017e6b1 (diff)
downloadservo-25027e476c89ce438a85a631d66f5f4c261be895.tar.gz
servo-25027e476c89ce438a85a631d66f5f4c261be895.zip
Current-pixel-density tests passing
Diffstat (limited to 'components/script_layout_interface/wrapper_traits.rs')
-rw-r--r--components/script_layout_interface/wrapper_traits.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs
index a23a417cb6d..23f9ff4a3b8 100644
--- a/components/script_layout_interface/wrapper_traits.rs
+++ b/components/script_layout_interface/wrapper_traits.rs
@@ -249,6 +249,9 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Debug + GetLayoutData + NodeInfo
/// If this is an image element, returns its URL. If this is not an image element, fails.
fn image_url(&self) -> Option<ServoUrl>;
+ /// If this is an image element, returns its current-pixel-density. If this is not an image element, fails.
+ fn image_density(&self) -> Option<f64>;
+
fn canvas_data(&self) -> Option<HTMLCanvasData>;
fn svg_data(&self) -> Option<SVGSVGData>;