diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-01 21:40:58 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-01 21:40:58 +0530 |
commit | 65108348aa543774ade163b25836018fa8f6c00f (patch) | |
tree | 0f3034394753fb6332d0772fa12f9a860f063f83 /components/script/dom | |
parent | b4906aa008325963348b6cc13bbcf8d2a4c9d694 (diff) | |
parent | 320263199fbcc3aa60587f11bb757d6237e0e0aa (diff) | |
download | servo-65108348aa543774ade163b25836018fa8f6c00f.tar.gz servo-65108348aa543774ade163b25836018fa8f6c00f.zip |
Auto merge of #8714 - frewsxcv:body-fgcolor, r=Ms2ger
Implement attribute 'fgColor' on 'document'
The 'text' attribute was implemented on `<body>` in #7841
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8714)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/document.rs | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/Document.webidl | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 92942012def..a30e923cee8 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -2289,6 +2289,16 @@ impl DocumentMethods for Document { self.set_body_attribute(&atom!("bgcolor"), value) } + // https://html.spec.whatwg.org/multipage/#dom-document-fgcolor + fn FgColor(&self) -> DOMString { + self.get_body_attribute(&atom!("text")) + } + + // https://html.spec.whatwg.org/multipage/#dom-document-fgcolor + fn SetFgColor(&self, value: DOMString) { + self.set_body_attribute(&atom!("text"), value) + } + // https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString, found: &mut bool) -> *mut JSObject { #[derive(JSTraceable, HeapSizeOf)] diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 863824338ed..69cb136749f 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -141,7 +141,7 @@ Document implements GlobalEventHandlers; // https://html.spec.whatwg.org/multipage/#Document-partial partial interface Document { - // [TreatNullAs=EmptyString] attribute DOMString fgColor; + [TreatNullAs=EmptyString] attribute DOMString fgColor; // https://github.com/servo/servo/issues/8715 // [TreatNullAs=EmptyString] attribute DOMString linkColor; |