style: Implement the body text color quirk in a more straight-forward way.

This avoids grabbing the document when values that inherit from the body,
whatever that means, aren't under the body.

In that case we'll get a semi-random value, but that's also mishandled by Gecko
anyways (and probably Blink, though haven't tested), and doesn't really make
much sense.
This commit is contained in:
Emilio Cobos Álvarez 2017-09-15 10:09:19 +02:00
parent 920585bd74
commit bd314747da
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 76 additions and 22 deletions

View file

@ -727,6 +727,10 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
override_lang: Option<Option<AttrValue>>,
value: &PseudoClassStringArg
) -> bool;
/// Returns whether this element is the main body element of the HTML
/// document it is on.
fn is_html_document_body_element(&self) -> bool;
}
/// TNode and TElement aren't Send because we want to be careful and explicit