layout: Turn on synthetic small-caps for layout 2020 (#31435)

Synthetic small caps is supported by the font subsystem, but this is
disabled in Layout 2020. We can turn this on to bring support to parity
with the old layout system.

In addition to turning on synthetic small-caps this change also improves
the way that they work. Before, synthetic small caps meant that every
character was a small version of capitalized character. After this
change, capital letters are larger than small caps versions of small
letters -- matching other browsers and the common expectation of how
small caps works.
This commit is contained in:
Martin Robinson 2024-02-28 16:09:26 +01:00 committed by GitHub
parent 98bd306816
commit 5ba29c20ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 214 additions and 176 deletions

26
Cargo.lock generated
View file

@ -1208,7 +1208,7 @@ dependencies = [
[[package]] [[package]]
name = "derive_common" name = "derive_common"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
@ -3460,7 +3460,7 @@ dependencies = [
[[package]] [[package]]
name = "malloc_size_of" name = "malloc_size_of"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"accountable-refcell", "accountable-refcell",
"app_units", "app_units",
@ -5072,7 +5072,7 @@ dependencies = [
[[package]] [[package]]
name = "selectors" name = "selectors"
version = "0.24.0" version = "0.24.0"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"cssparser", "cssparser",
@ -5360,7 +5360,7 @@ dependencies = [
[[package]] [[package]]
name = "servo_arc" name = "servo_arc"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"nodrop", "nodrop",
"serde", "serde",
@ -5370,7 +5370,7 @@ dependencies = [
[[package]] [[package]]
name = "servo_atoms" name = "servo_atoms"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"string_cache", "string_cache",
"string_cache_codegen", "string_cache_codegen",
@ -5575,7 +5575,7 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]] [[package]]
name = "size_of_test" name = "size_of_test"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"static_assertions", "static_assertions",
] ]
@ -5701,7 +5701,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]] [[package]]
name = "static_prefs" name = "static_prefs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
[[package]] [[package]]
name = "str-buf" name = "str-buf"
@ -5744,7 +5744,7 @@ dependencies = [
[[package]] [[package]]
name = "style" name = "style"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"app_units", "app_units",
"arrayvec", "arrayvec",
@ -5801,7 +5801,7 @@ dependencies = [
[[package]] [[package]]
name = "style_config" name = "style_config"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
] ]
@ -5809,7 +5809,7 @@ dependencies = [
[[package]] [[package]]
name = "style_derive" name = "style_derive"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"darling", "darling",
"derive_common", "derive_common",
@ -5840,7 +5840,7 @@ dependencies = [
[[package]] [[package]]
name = "style_traits" name = "style_traits"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"app_units", "app_units",
"bitflags 1.3.2", "bitflags 1.3.2",
@ -6183,7 +6183,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "to_shmem" name = "to_shmem"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"cssparser", "cssparser",
"servo_arc", "servo_arc",
@ -6196,7 +6196,7 @@ dependencies = [
[[package]] [[package]]
name = "to_shmem_derive" name = "to_shmem_derive"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#9d04df286684bbe1b05858ed1b337b006784bf36" source = "git+https://github.com/servo/stylo.git?branch=2023-06-14#a11671a8886bd535001335b6f2a1746262d02478"
dependencies = [ dependencies = [
"darling", "darling",
"derive_common", "derive_common",

View file

@ -169,19 +169,23 @@ pub struct Font {
pub handle: FontHandle, pub handle: FontHandle,
pub metrics: FontMetrics, pub metrics: FontMetrics,
pub descriptor: FontDescriptor, pub descriptor: FontDescriptor,
pub actual_pt_size: Au,
shaper: Option<Shaper>, shaper: Option<Shaper>,
shape_cache: RefCell<HashMap<ShapeCacheEntry, Arc<GlyphStore>>>, shape_cache: RefCell<HashMap<ShapeCacheEntry, Arc<GlyphStore>>>,
glyph_advance_cache: RefCell<HashMap<u32, FractionalPixel>>, glyph_advance_cache: RefCell<HashMap<u32, FractionalPixel>>,
pub font_key: FontInstanceKey, pub font_key: FontInstanceKey,
/// If this is a synthesized small caps font, then this font reference is for
/// the version of the font used to replace lowercase ASCII letters. It's up
/// to the consumer of this font to properly use this reference.
pub synthesized_small_caps: Option<FontRef>,
} }
impl Font { impl Font {
pub fn new( pub fn new(
handle: FontHandle, handle: FontHandle,
descriptor: FontDescriptor, descriptor: FontDescriptor,
actual_pt_size: Au,
font_key: FontInstanceKey, font_key: FontInstanceKey,
synthesized_small_caps: Option<FontRef>,
) -> Font { ) -> Font {
let metrics = handle.metrics(); let metrics = handle.metrics();
@ -189,11 +193,11 @@ impl Font {
handle: handle, handle: handle,
shaper: None, shaper: None,
descriptor, descriptor,
actual_pt_size,
metrics, metrics,
shape_cache: RefCell::new(HashMap::new()), shape_cache: RefCell::new(HashMap::new()),
glyph_advance_cache: RefCell::new(HashMap::new()), glyph_advance_cache: RefCell::new(HashMap::new()),
font_key, font_key,
synthesized_small_caps,
} }
} }
@ -351,7 +355,7 @@ impl Font {
#[inline] #[inline]
pub fn glyph_index(&self, codepoint: char) -> Option<GlyphId> { pub fn glyph_index(&self, codepoint: char) -> Option<GlyphId> {
let codepoint = match self.descriptor.variant { let codepoint = match self.descriptor.variant {
font_variant_caps::T::SmallCaps => codepoint.to_uppercase().next().unwrap(), //FIXME: #5938 font_variant_caps::T::SmallCaps => codepoint.to_ascii_uppercase(),
font_variant_caps::T::Normal => codepoint, font_variant_caps::T::Normal => codepoint,
}; };
self.handle.glyph_index(codepoint) self.handle.glyph_index(codepoint)
@ -418,23 +422,33 @@ impl FontGroup {
mut font_context: &mut FontContext<S>, mut font_context: &mut FontContext<S>,
codepoint: char, codepoint: char,
) -> Option<FontRef> { ) -> Option<FontRef> {
let should_look_for_small_caps = self.descriptor.variant == font_variant_caps::T::SmallCaps &&
codepoint.is_ascii_lowercase();
let font_or_synthesized_small_caps = |font: FontRef| {
if should_look_for_small_caps {
let font = font.borrow();
if font.synthesized_small_caps.is_some() {
return font.synthesized_small_caps.clone();
}
}
Some(font)
};
let has_glyph = |font: &FontRef| font.borrow().has_glyph_for(codepoint); let has_glyph = |font: &FontRef| font.borrow().has_glyph_for(codepoint);
let font = self.find(&mut font_context, |font| has_glyph(font)); if let Some(font) = self.find(&mut font_context, |font| has_glyph(font)) {
if font.is_some() { return font_or_synthesized_small_caps(font);
return font;
} }
if let Some(ref fallback) = self.last_matching_fallback { if let Some(ref last_matching_fallback) = self.last_matching_fallback {
if has_glyph(&fallback) { if has_glyph(&last_matching_fallback) {
return self.last_matching_fallback.clone(); return font_or_synthesized_small_caps(last_matching_fallback.clone());
} }
} }
let font = self.find_fallback(&mut font_context, Some(codepoint), has_glyph); if let Some(font) = self.find_fallback(&mut font_context, Some(codepoint), has_glyph) {
if font.is_some() { self.last_matching_fallback = Some(font.clone());
self.last_matching_fallback = font.clone(); return font_or_synthesized_small_caps(font);
return font;
} }
self.first(&mut font_context) self.first(&mut font_context)

View file

@ -115,6 +115,36 @@ impl<S: FontSource> FontContext<S> {
font_descriptor: &FontDescriptor, font_descriptor: &FontDescriptor,
family_descriptor: &FontFamilyDescriptor, family_descriptor: &FontFamilyDescriptor,
) -> Option<FontRef> { ) -> Option<FontRef> {
self.get_font_maybe_synthesizing_small_caps(
font_descriptor,
family_descriptor,
true, /* synthesize_small_caps */
)
}
fn get_font_maybe_synthesizing_small_caps(
&mut self,
font_descriptor: &FontDescriptor,
family_descriptor: &FontFamilyDescriptor,
synthesize_small_caps: bool,
) -> Option<FontRef> {
// TODO: (Bug #3463): Currently we only support fake small-caps
// painting. We should also support true small-caps (where the
// font supports it) in the future.
let synthesized_small_caps_font =
if font_descriptor.variant == FontVariantCaps::SmallCaps && synthesize_small_caps {
let mut small_caps_descriptor = font_descriptor.clone();
small_caps_descriptor.pt_size =
font_descriptor.pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR);
self.get_font_maybe_synthesizing_small_caps(
&small_caps_descriptor,
family_descriptor,
false, /* synthesize_small_caps */
)
} else {
None
};
let cache_key = FontCacheKey { let cache_key = FontCacheKey {
font_descriptor: font_descriptor.clone(), font_descriptor: font_descriptor.clone(),
family_descriptor: family_descriptor.clone(), family_descriptor: family_descriptor.clone(),
@ -132,8 +162,12 @@ impl<S: FontSource> FontContext<S> {
let font = self let font = self
.font_template(&font_descriptor.template_descriptor, family_descriptor) .font_template(&font_descriptor.template_descriptor, family_descriptor)
.and_then(|template_info| { .and_then(|template_info| {
self.create_font(template_info, font_descriptor.to_owned()) self.create_font(
.ok() template_info,
font_descriptor.to_owned(),
synthesized_small_caps_font,
)
.ok()
}) })
.map(|font| Rc::new(RefCell::new(font))); .map(|font| Rc::new(RefCell::new(font)));
@ -175,29 +209,22 @@ impl<S: FontSource> FontContext<S> {
&mut self, &mut self,
info: FontTemplateInfo, info: FontTemplateInfo,
descriptor: FontDescriptor, descriptor: FontDescriptor,
synthesized_small_caps: Option<FontRef>,
) -> Result<Font, ()> { ) -> Result<Font, ()> {
// TODO: (Bug #3463): Currently we only support fake small-caps
// painting. We should also support true small-caps (where the
// font supports it) in the future.
let actual_pt_size = match descriptor.variant {
FontVariantCaps::SmallCaps => descriptor.pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR),
FontVariantCaps::Normal => descriptor.pt_size,
};
let handle = FontHandle::new_from_template( let handle = FontHandle::new_from_template(
&self.platform_handle, &self.platform_handle,
info.font_template, info.font_template,
Some(actual_pt_size), Some(descriptor.pt_size),
)?; )?;
let font_instance_key = self let font_instance_key = self
.font_source .font_source
.get_font_instance(info.font_key, actual_pt_size); .get_font_instance(info.font_key, descriptor.pt_size);
Ok(Font::new( Ok(Font::new(
handle, handle,
descriptor, descriptor,
actual_pt_size,
font_instance_key, font_instance_key,
synthesized_small_caps,
)) ))
} }
} }

View file

@ -245,8 +245,8 @@ fn test_font_template_is_cached() {
let font2 = context.font(&font_descriptor, &family_descriptor).unwrap(); let font2 = context.font(&font_descriptor, &family_descriptor).unwrap();
assert_ne!( assert_ne!(
font1.borrow().actual_pt_size, font1.borrow().descriptor.pt_size,
font2.borrow().actual_pt_size, font2.borrow().descriptor.pt_size,
"the same font should not have been returned" "the same font should not have been returned"
); );

View file

@ -146,7 +146,7 @@ impl Shaper {
let hb_font: *mut hb_font_t = hb_font_create(hb_face); let hb_font: *mut hb_font_t = hb_font_create(hb_face);
// Set points-per-em. if zero, performs no hinting in that direction. // Set points-per-em. if zero, performs no hinting in that direction.
let pt_size = (*font).actual_pt_size.to_f64_px(); let pt_size = (*font).descriptor.pt_size.to_f64_px();
hb_font_set_ppem(hb_font, pt_size as c_uint, pt_size as c_uint); hb_font_set_ppem(hb_font, pt_size as c_uint, pt_size as c_uint);
// Set scaling. Note that this takes 16.16 fixed point. // Set scaling. Note that this takes 16.16 fixed point.

View file

@ -31,7 +31,7 @@ pub struct TextRun {
/// The UTF-8 string represented by this text run. /// The UTF-8 string represented by this text run.
pub text: Arc<String>, pub text: Arc<String>,
pub font_template: Arc<FontTemplateData>, pub font_template: Arc<FontTemplateData>,
pub actual_pt_size: Au, pub pt_size: Au,
pub font_metrics: FontMetrics, pub font_metrics: FontMetrics,
pub font_key: FontInstanceKey, pub font_key: FontInstanceKey,
/// The glyph runs that make up this text run. /// The glyph runs that make up this text run.
@ -195,7 +195,7 @@ impl<'a> TextRun {
font_metrics: font.metrics.clone(), font_metrics: font.metrics.clone(),
font_template: font.handle.template(), font_template: font.handle.template(),
font_key: font.font_key, font_key: font.font_key,
actual_pt_size: font.actual_pt_size, pt_size: font.descriptor.pt_size,
glyphs: Arc::new(glyphs), glyphs: Arc::new(glyphs),
bidi_level: bidi_level, bidi_level: bidi_level,
extra_word_spacing: Au(0), extra_word_spacing: Au(0),

View file

@ -664,11 +664,14 @@ impl RunInfo {
} }
fn has_font(&self, font: &Option<FontRef>) -> bool { fn has_font(&self, font: &Option<FontRef>) -> bool {
fn identifier(font: &Option<FontRef>) -> Option<Atom> { fn identifier_and_pt_size(font: &Option<FontRef>) -> Option<(Atom, Au)> {
font.as_ref().map(|f| f.borrow().identifier()) font.as_ref().map(|font| {
let font = font.borrow();
(font.identifier(), font.descriptor.pt_size)
})
} }
identifier(&self.font) == identifier(font) identifier_and_pt_size(&self.font) == identifier_and_pt_size(font)
} }
} }

View file

@ -70,7 +70,7 @@ pub(crate) struct InlineFormattingContext {
#[derive(Debug, Serialize)] #[derive(Debug, Serialize)]
pub(crate) struct FontKeyAndMetrics { pub(crate) struct FontKeyAndMetrics {
pub key: FontInstanceKey, pub key: FontInstanceKey,
pub actual_pt_size: Au, pub pt_size: Au,
pub metrics: FontMetrics, pub metrics: FontMetrics,
} }

View file

@ -122,7 +122,7 @@ impl TextRunSegment {
let current_font_key_and_metrics = &fonts[self.font_index]; let current_font_key_and_metrics = &fonts[self.font_index];
let new_font = font.borrow(); let new_font = font.borrow();
if new_font.font_key != current_font_key_and_metrics.key || if new_font.font_key != current_font_key_and_metrics.key ||
new_font.actual_pt_size != current_font_key_and_metrics.actual_pt_size new_font.descriptor.pt_size != current_font_key_and_metrics.pt_size
{ {
return false; return false;
} }
@ -489,15 +489,14 @@ fn char_does_not_change_font(character: char) -> bool {
pub(super) fn add_or_get_font(font: &FontRef, ifc_fonts: &mut Vec<FontKeyAndMetrics>) -> usize { pub(super) fn add_or_get_font(font: &FontRef, ifc_fonts: &mut Vec<FontKeyAndMetrics>) -> usize {
let font = font.borrow(); let font = font.borrow();
for (index, ifc_font_info) in ifc_fonts.iter().enumerate() { for (index, ifc_font_info) in ifc_fonts.iter().enumerate() {
if ifc_font_info.key == font.font_key && ifc_font_info.actual_pt_size == font.actual_pt_size if ifc_font_info.key == font.font_key && ifc_font_info.pt_size == font.descriptor.pt_size {
{
return index; return index;
} }
} }
ifc_fonts.push(FontKeyAndMetrics { ifc_fonts.push(FontKeyAndMetrics {
metrics: font.metrics.clone(), metrics: font.metrics.clone(),
key: font.font_key, key: font.font_key,
actual_pt_size: font.actual_pt_size, pt_size: font.descriptor.pt_size,
}); });
ifc_fonts.len() - 1 ifc_fonts.len() - 1
} }

View file

@ -1,3 +0,0 @@
[font-011.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-012.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-013.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-014.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-015.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-016.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-029.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-030.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-031.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-032.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-042.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-043.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-applies-to-001.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-applies-to-017.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-variant-applies-to-001.xht]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[font-variant-applies-to-017.xht]
type: reftest
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-003.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-011.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-012.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-013.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-014.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-015.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-016.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-029.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-030.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-031.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-032.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-042.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-043.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-applies-to-001.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[font-applies-to-017.xht]
expected: FAIL

View file

@ -1,2 +1,2 @@
[font-weight-applies-to-005.xht] [font-weight-applies-to-005.xht]
expected: FAIL expected: FAIL

View file

@ -1,5 +1,4 @@
[system-fonts.html] [system-fonts.html]
expected: ERROR
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (-2) should be [italic\] for <font-style>] [CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (-2) should be [italic\] for <font-style>]
expected: FAIL expected: FAIL
@ -1763,3 +1762,111 @@
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (1.5) should be [serif\] for <font-family>] [Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (1.5) should be [serif\] for <font-family>]
expected: FAIL expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [caption\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [icon\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [icon\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [icon\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [icon\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [icon\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [icon\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [menu\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [menu\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [menu\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [menu\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [menu\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [menu\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [message-box\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [message-box\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [message-box\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [message-box\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [message-box\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [message-box\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [small-caption\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [small-caption\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [small-caption\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [small-caption\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [small-caption\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [small-caption\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[CSS Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (0.6) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (1) should be [normal\] for <font-variant>]
expected: FAIL
[Web Animations: property <font> from [italic 100 small-caps ultra-expanded 100px / 100px Ahem\] to [status-bar\] at (1.5) should be [normal\] for <font-variant>]
expected: FAIL

View file

@ -1,25 +1,4 @@
[font-shorthand-serialization-prevention.html] [font-shorthand-serialization-prevention.html]
[Setting font-variant to initial should not prevent the font shorthand from serializing in computed style]
expected: FAIL
[Setting font-variant to inherit should not prevent the font shorthand from serializing in computed style]
expected: FAIL
[Setting font-variant to unset should not prevent the font shorthand from serializing in computed style]
expected: FAIL
[Setting font-variant to revert should not prevent the font shorthand from serializing in computed style]
expected: FAIL
[Setting font-variant to revert-layer should prevent the font shorthand from serializing in specified style]
expected: FAIL
[Setting font-variant to revert-layer should not prevent the font shorthand from serializing in computed style]
expected: FAIL
[Setting font-variant to normal should not prevent the font shorthand from serializing in computed style]
expected: FAIL
[Setting font-variant to none should prevent the font shorthand from serializing in specified style] [Setting font-variant to none should prevent the font shorthand from serializing in specified style]
expected: FAIL expected: FAIL
@ -34,3 +13,6 @@
[Setting font-variant-caps to all-small-caps should prevent the font shorthand from serializing in computed style] [Setting font-variant-caps to all-small-caps should prevent the font shorthand from serializing in computed style]
expected: FAIL expected: FAIL
[Setting font-variant to none should prevent the font shorthand from serializing in computed style]
expected: FAIL

View file

@ -0,0 +1,2 @@
[font-synthesis-07.html]
expected: FAIL

View file

@ -35,9 +35,6 @@
[Property font-synthesis inherits] [Property font-synthesis inherits]
expected: FAIL expected: FAIL
[Property font-variant has initial value normal]
expected: FAIL
[Property font-variant inherits] [Property font-variant inherits]
expected: FAIL expected: FAIL

View file

@ -1,7 +1,4 @@
[font-variant-valid.html] [font-variant-valid.html]
[e.style['font-variant'\] = "normal" should set the property value]
expected: FAIL
[e.style['font-variant'\] = "none" should set the property value] [e.style['font-variant'\] = "none" should set the property value]
expected: FAIL expected: FAIL
@ -29,9 +26,6 @@
[e.style['font-variant'\] = "no-contextual" should set the property value] [e.style['font-variant'\] = "no-contextual" should set the property value]
expected: FAIL expected: FAIL
[e.style['font-variant'\] = "small-caps" should set the property value]
expected: FAIL
[e.style['font-variant'\] = "all-small-caps" should set the property value] [e.style['font-variant'\] = "all-small-caps" should set the property value]
expected: FAIL expected: FAIL

View file

@ -1,12 +1,12 @@
[font-variant-shorthand-serialization.html] [font-variant-shorthand-serialization.html]
[font-variant: normal serialization]
expected: FAIL
[font-variant: none serialization] [font-variant: none serialization]
expected: FAIL expected: FAIL
[CSS-wide keyword in one longhand] [CSS-wide keyword in one longhand]
expected: FAIL expected: FAIL
[CSS-wide keyword in shorthand] [font-variant-ligatures: none serialization with non-default value for another longhand]
expected: FAIL
[font: menu serialization]
expected: FAIL expected: FAIL

View file

@ -119,15 +119,6 @@
[empty-cells: inherit] [empty-cells: inherit]
expected: FAIL expected: FAIL
[font-variant: normal]
expected: FAIL
[font-variant: small-caps]
expected: FAIL
[font-variant: inherit]
expected: FAIL
[list-style-position: inside] [list-style-position: inside]
expected: FAIL expected: FAIL