mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #10519 - frewsxcv:links, r=KiChjang
Update 'Extensions to the HTMLElement Interface' CSSOM spec links. <!-- 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/10519) <!-- Reviewable:end -->
This commit is contained in:
commit
6939ff53c4
1 changed files with 5 additions and 5 deletions
|
@ -233,7 +233,7 @@ impl HTMLElementMethods for HTMLElement {
|
|||
document.commit_focus_transaction(FocusType::Element);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetparent
|
||||
fn GetOffsetParent(&self) -> Option<Root<Element>> {
|
||||
if self.is::<HTMLBodyElement>() || self.is::<HTMLHtmlElement>() {
|
||||
return None;
|
||||
|
@ -246,7 +246,7 @@ impl HTMLElementMethods for HTMLElement {
|
|||
element
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsettop
|
||||
fn OffsetTop(&self) -> i32 {
|
||||
if self.is::<HTMLBodyElement>() {
|
||||
return 0;
|
||||
|
@ -259,7 +259,7 @@ impl HTMLElementMethods for HTMLElement {
|
|||
rect.origin.y.to_nearest_px()
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetleft
|
||||
fn OffsetLeft(&self) -> i32 {
|
||||
if self.is::<HTMLBodyElement>() {
|
||||
return 0;
|
||||
|
@ -272,7 +272,7 @@ impl HTMLElementMethods for HTMLElement {
|
|||
rect.origin.x.to_nearest_px()
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetwidth
|
||||
fn OffsetWidth(&self) -> i32 {
|
||||
let node = self.upcast::<Node>();
|
||||
let window = window_from_node(self);
|
||||
|
@ -281,7 +281,7 @@ impl HTMLElementMethods for HTMLElement {
|
|||
rect.size.width.to_nearest_px()
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetheight
|
||||
fn OffsetHeight(&self) -> i32 {
|
||||
let node = self.upcast::<Node>();
|
||||
let window = window_from_node(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue