mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Upgrade Stylo to 2024-03-01 (#32089)
* Upgrade Stylo to 2024-03-01 * Fixup for https://bugzil.la/1882754 * Update test expectations
This commit is contained in:
parent
0678136b17
commit
f5bdfdfe94
33 changed files with 290 additions and 302 deletions
|
@ -7,7 +7,7 @@ use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
|
|||
use js::rust::HandleObject;
|
||||
use servo_atoms::Atom;
|
||||
use style::attr::AttrValue;
|
||||
use style::color::parsing::RgbaLegacy;
|
||||
use style::color::AbsoluteColor;
|
||||
use style::str::{read_numbers, HTML_SPACE_CHARACTERS};
|
||||
|
||||
use crate::dom::attr::Attr;
|
||||
|
@ -107,13 +107,13 @@ impl VirtualMethods for HTMLFontElement {
|
|||
}
|
||||
|
||||
pub trait HTMLFontElementLayoutHelpers {
|
||||
fn get_color(self) -> Option<RgbaLegacy>;
|
||||
fn get_color(self) -> Option<AbsoluteColor>;
|
||||
fn get_face(self) -> Option<Atom>;
|
||||
fn get_size(self) -> Option<u32>;
|
||||
}
|
||||
|
||||
impl HTMLFontElementLayoutHelpers for LayoutDom<'_, HTMLFontElement> {
|
||||
fn get_color(self) -> Option<RgbaLegacy> {
|
||||
fn get_color(self) -> Option<AbsoluteColor> {
|
||||
self.upcast::<Element>()
|
||||
.get_attr_for_layout(&ns!(), &local_name!("color"))
|
||||
.and_then(AttrValue::as_color)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue