Fix #7268 - getComputedStyle should take Element, not HTMLElement

This commit is contained in:
Mahdi Dibaiee 2015-08-20 00:53:46 +04:30
parent 70b9922eb0
commit b7d25159d3
7 changed files with 40 additions and 13 deletions

View file

@ -24,7 +24,6 @@ use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration};
use dom::document::{Document, DocumentHelpers};
use dom::element::Element;
use dom::eventtarget::{EventTarget, EventTargetHelpers, EventTargetTypeId};
use dom::htmlelement::HTMLElement;
use dom::location::Location;
use dom::navigator::Navigator;
use dom::node::{window_from_node, TrustedNodeAddress, NodeHelpers, from_untrusted_node_address};
@ -576,7 +575,7 @@ impl<'a> WindowMethods for &'a Window {
// https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle
fn GetComputedStyle(self,
element: &HTMLElement,
element: &Element,
pseudo: Option<DOMString>) -> Root<CSSStyleDeclaration> {
// Steps 1-4.
let pseudo = match pseudo.map(|s| s.to_ascii_lowercase()) {