Auto merge of #7288 - mdibaiee:computedstyle-element, r=Ms2ger

Fix #7268 - getComputedStyle should take `Element`, not `HTMLElement`

This is my first patch, I hope I'm doing it right.

About the test, do you think this is enough and reliable?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7288)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-08-22 20:43:45 -06:00
commit 6e06cae44a
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()) {