aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domrect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/domrect.rs')
-rw-r--r--components/script/dom/domrect.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/domrect.rs b/components/script/dom/domrect.rs
index c1870c18cc9..8d54301e39e 100644
--- a/components/script/dom/domrect.rs
+++ b/components/script/dom/domrect.rs
@@ -41,27 +41,33 @@ impl DOMRect {
}
impl<'a> DOMRectMethods for &'a DOMRect {
+ // https://drafts.fxtf.org/geometry/#dom-domrectreadonly-top
fn Top(self) -> Finite<f32> {
Finite::wrap(self.top)
}
+ // https://drafts.fxtf.org/geometry/#dom-domrectreadonly-bottom
fn Bottom(self) -> Finite<f32> {
Finite::wrap(self.bottom)
}
+ // https://drafts.fxtf.org/geometry/#dom-domrectreadonly-left
fn Left(self) -> Finite<f32> {
Finite::wrap(self.left)
}
+ // https://drafts.fxtf.org/geometry/#dom-domrectreadonly-right
fn Right(self) -> Finite<f32> {
Finite::wrap(self.right)
}
+ // https://drafts.fxtf.org/geometry/#dom-domrectreadonly-width
fn Width(self) -> Finite<f32> {
let result = (self.right - self.left).abs();
Finite::wrap(result)
}
+ // https://drafts.fxtf.org/geometry/#dom-domrectreadonly-height
fn Height(self) -> Finite<f32> {
let result = (self.bottom - self.top).abs();
Finite::wrap(result)