Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLElement::Offset{Parent,Left,Right} should call is_the_html_body_element. #13659

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Return `null` from `offsetParent` if root element.

  • Loading branch information
frewsxcv committed Dec 4, 2016
commit b1095466ea7baca3ff68a7489adf4af226c0fbab
@@ -272,7 +272,7 @@ impl HTMLElementMethods for HTMLElement {

// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetparent
fn GetOffsetParent(&self) -> Option<Root<Element>> {
if self.is::<HTMLHtmlElement>() {
if self.is::<HTMLHtmlElement>() || self.upcast::<Element>().is_root() {
return None;
}
match self.downcast::<HTMLBodyElement>() {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.