aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-11-08 11:45:11 -0500
committerCorey Farwell <coreyf@rwell.org>2015-11-08 18:34:27 -0500
commitee0800abe9a00b089d703a28b3a58b13529bfdbd (patch)
tree425707ffb013bf9a1a6b3ff5f607dc63824dc19c /components/script/dom/element.rs
parent9bcae9a866b85a90b75b9cbfcb9058287c1c0871 (diff)
downloadservo-ee0800abe9a00b089d703a28b3a58b13529bfdbd.tar.gz
servo-ee0800abe9a00b089d703a28b3a58b13529bfdbd.zip
Implement <hr> 'color' attribute
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index d420e9b5405..9b5fb30c1c6 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -40,6 +40,7 @@ use dom::htmlbodyelement::HTMLBodyElement;
use dom::htmlcollection::HTMLCollection;
use dom::htmlfieldsetelement::HTMLFieldSetElement;
use dom::htmlfontelement::HTMLFontElement;
+use dom::htmlhrelement::{HTMLHRElement, HTMLHRLayoutHelpers};
use dom::htmliframeelement::HTMLIFrameElement;
use dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
use dom::htmllabelelement::HTMLLabelElement;
@@ -309,6 +310,9 @@ impl LayoutElementHelpers for LayoutJS<Element> {
} else if let Some(this) = self.downcast::<HTMLBodyElement>() {
// https://html.spec.whatwg.org/multipage/#the-page:the-body-element-20
(*this.unsafe_get()).get_color()
+ } else if let Some(this) = self.downcast::<HTMLHRElement>() {
+ // https://html.spec.whatwg.org/multipage/#the-hr-element-2:presentational-hints-5
+ this.get_color()
} else {
None
};