Remove a TODO from the implementation of getComputedStyle

The spec is now clear that disconnected elements shouldn't return a
style.

Closes #6860.
This commit is contained in:
Martin Robinson 2020-05-10 11:05:01 +02:00
parent 75fce11335
commit 4b4ea6483a

View file

@ -242,8 +242,6 @@ impl CSSStyleDeclaration {
CSSStyleOwner::Element(ref el) => { CSSStyleOwner::Element(ref el) => {
let node = el.upcast::<Node>(); let node = el.upcast::<Node>();
if !node.is_connected() { if !node.is_connected() {
// TODO: Node should be matched against the style rules of this window.
// Firefox is currently the only browser to implement this.
return DOMString::new(); return DOMString::new();
} }
let addr = node.to_trusted_node_address(); let addr = node.to_trusted_node_address();