servo: Merge #8714 - Implement attribute 'fgColor' on 'document' (from frewsxcv:body-fgcolor); r=Ms2ger

The 'text' attribute was implemented on `<body>` in #7841

Source-Repo: https://github.com/servo/servo
Source-Revision: 65108348aa543774ade163b25836018fa8f6c00f
This commit is contained in:
Corey Farwell 2015-12-01 21:11:58 +05:01
Родитель 127620000d
Коммит cec8d31e5c
2 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -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)]

Просмотреть файл

@ -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;