mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
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:
parent
04e1f599d8
commit
8c3c56909e
8 changed files with 76 additions and 22 deletions
|
@ -92,6 +92,13 @@ impl Device {
|
|||
self.root_font_size.store(size.0 as isize, Ordering::Relaxed)
|
||||
}
|
||||
|
||||
/// Sets the body text color for the "inherit color from body" quirk.
|
||||
///
|
||||
/// https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk
|
||||
pub fn set_body_text_color(&self, _color: RGBA) {
|
||||
// Servo doesn't implement this quirk (yet)
|
||||
}
|
||||
|
||||
/// Returns whether we ever looked up the root font size of the Device.
|
||||
pub fn used_root_font_size(&self) -> bool {
|
||||
self.used_root_font_size.load(Ordering::Relaxed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue