Truly independent web browser
LibWeb: Use interoperable font-size keyword mappings
Andreas Klingd3f268e60ce3
diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cppindex 6c568936398..ee53429e1b3 100644--- a/Libraries/LibWeb/CSS/StyleComputer.cpp+++ b/Libraries/LibWeb/CSS/StyleComputer.cpp@@ -1886,6 +1886,22 @@ CSSPixels StyleComputer::absolute_size_mapping(AbsoluteSize absolute_size, CSSPi{// An <absolute-size> keyword refers to an entry in a table of font sizes computed and kept by the user agent. See// § 2.5.1 Absolute Size Keyword Mapping Table.+ // INTEROP: Other browsers share this keyword table for integral default sizes from 9px through 16px, so we use+ // it instead of the ratios from the spec's guideline table.+ static constexpr Array<Array<u8, 8>, 8> font_size_table { {+ { 9, 9, 9, 9, 11, 14, 18, 27 },+ { 9, 9, 9, 10, 12, 15, 20, 30 },+ { 9, 9, 10, 11, 13, 17, 22, 33 },+ { 9, 9, 10, 12, 14, 18, 24, 36 },+ { 9, 10, 12, 13, 16, 20, 26, 39 },+ { 9, 10, 12, 14, 17, 21, 28, 42 },+ { 9, 10, 13, 15, 18, 23, 30, 45 },+ { 9, 10, 13, 16, 18, 24, 32, 48 },+ } };+ auto default_size = default_font_size.to_int();+ if (default_size >= 9 && default_size <= 16 && default_font_size == CSSPixels(default_size))+ return CSSPixels(font_size_table[default_size - 9][to_underlying(absolute_size)]);+switch (absolute_size) {case AbsoluteSize::XxSmall:return default_font_size * CSSPixels(3) / 5;diff --git a/Libraries/LibWeb/Rust/src/css/style_compute.rs b/Libraries/LibWeb/Rust/src/css/style_compute.rsindex 22745997bc5..dcc95513ec6 100644--- a/Libraries/LibWeb/Rust/src/css/style_compute.rs+++ b/Libraries/LibWeb/Rust/src/css/style_compute.rs@@ -608,6 +608,7 @@ pub extern "C" fn rust_compute_font_width(absolutized_value: &StyleValueData) ->compute_font_width(absolutized_value)}+/// https://drafts.csswg.org/css-fonts-4/#absolute-size-mapping/// An <absolute-size> keyword refers to an entry in a table of font sizes computed and kept by/// the user agent. See 2.5.1 Absolute Size Keyword Mapping Table.fn absolute_size_font_mapping(keyword: u16, default_font_size: CssPixels) -> Option<CssPixels> {@@ -617,6 +618,35 @@ fn absolute_size_font_mapping(keyword: u16, default_font_size: CssPixels) -> Opt.div_as_fraction(CssPixels::from_integer(denominator)),)};+ // INTEROP: Other browsers share this keyword table for integral default sizes from 9px through 16px, so we use+ // it instead of the ratios from the spec's guideline table.+ let column = match keyword {+ keyword::XX_SMALL => 0,+ keyword::X_SMALL => 1,+ keyword::SMALL => 2,+ keyword::MEDIUM => 3,+ keyword::LARGE => 4,+ keyword::X_LARGE => 5,+ keyword::XX_LARGE => 6,+ keyword::XXX_LARGE => 7,+ _ => return None,+ };+ const FONT_SIZE_TABLE: [[i64; 8]; 8] = [+ [9, 9, 9, 9, 11, 14, 18, 27],+ [9, 9, 9, 10, 12, 15, 20, 30],+ [9, 9, 10, 11, 13, 17, 22, 33],+ [9, 9, 10, 12, 14, 18, 24, 36],+ [9, 10, 12, 13, 16, 20, 26, 39],+ [9, 10, 12, 14, 17, 21, 28, 42],+ [9, 10, 13, 15, 18, 23, 30, 45],+ [9, 10, 13, 16, 18, 24, 32, 48],+ ];+ let default_size = default_font_size.to_int();+ if (9..=16).contains(&default_size) && default_font_size == CssPixels::from_integer(i64::from(default_size)) {+ return Some(CssPixels::from_integer(+ FONT_SIZE_TABLE[(default_size - 9) as usize][column],+ ));+ }match keyword {keyword::XX_SMALL => entry(3, 5),keyword::X_SMALL => entry(3, 4),@@ -640,8 +670,8 @@ fn relative_size_font_mapping(keyword: u16, inherited_font_size: CssPixels) -> O)};match keyword {- keyword::SMALLER => entry(4, 5),- keyword::LARGER => entry(5, 4),+ keyword::SMALLER => entry(5, 6),+ keyword::LARGER => entry(6, 5),_ => None,}}@@ -657,6 +687,7 @@ fn compute_font_size(inherited_font_size: CssPixels,inherited_math_depth: i32,default_font_size: CssPixels,+ default_font_size_scale: f64,) -> FfiComputedNumber {let computed = |px: f64| FfiComputedNumber {handled: true,@@ -677,7 +708,7 @@ fn compute_font_size(StyleValueData::Percentage { value } => computed(inherited_font_size.to_double() * (value / 100.0)),StyleValueData::Keyword { keyword } => {if let Some(px) = absolute_size_font_mapping(*keyword, default_font_size) {- return computed(px.to_double());+ return computed(px.scaled(default_font_size_scale).to_double());}if let Some(px) = relative_size_font_mapping(*keyword, inherited_font_size) {return computed(px.to_double());@@ -756,6 +787,7 @@ pub extern "C" fn rust_compute_font_size(CssPixels::from_raw(inherited_font_size_raw),inherited_math_depth,CssPixels::from_raw(default_font_size_raw),+ 1.0,)}@@ -875,8 +907,8 @@ pub(crate) fn recascade_font_size_batch<'a>(if *keyword == keyword::INHERIT {continue;}- if let Some(px) = absolute_size_font_mapping(*keyword, zoomed_default_size) {- current_size = px;+ if let Some(px) = absolute_size_font_mapping(*keyword, default_size) {+ current_size = px.scaled(length_zoom);depends_on_viewport_metrics = false;continue;}@@ -4295,7 +4327,8 @@ pub(crate) unsafe fn drive_property_computation(computed_math_depth,inherited_font_size,inherited_math_depth,- CssPixels::from_raw(default_font_size_raw).scaled(zoom.length_effective_zoom()),+ CssPixels::from_raw(default_font_size_raw),+ zoom.length_effective_zoom(),);if result.handled {if result.unchanged {@@ -8826,6 +8859,7 @@ mod tests {sixteen,0,sixteen,+ 1.0,);assert_eq!(medium.value, 16.0);let large = compute_font_size(@@ -8836,9 +8870,17 @@ mod tests {sixteen,0,sixteen,+ 1.0,+ );+ assert_eq!(large.value, 18.0);+ let percent = compute_font_size(+ &StyleValueData::Percentage { value: 150.0 },+ 0,+ sixteen,+ 0,+ sixteen,+ 1.0,);- assert_eq!(large.value, 19.1875); // 16 * 6 / 5 in 6-bit fixed point- let percent = compute_font_size(&StyleValueData::Percentage { value: 150.0 }, 0, sixteen, 0, sixteen);assert_eq!(percent.value, 24.0);let math = compute_font_size(&StyleValueData::Keyword { keyword: keyword::MATH },@@ -8846,6 +8888,7 @@ mod tests {sixteen,0,sixteen,+ 1.0,);assert_eq!(math.value, CssPixels::from_integer(16).scaled(0.71).to_double());let math_two_levels = compute_font_size(@@ -8854,6 +8897,7 @@ mod tests {sixteen,0,sixteen,+ 1.0,);assert_eq!(math_two_levels.value,diff --git a/Tests/LibWeb/Layout/expected/font-size-legacy.txt b/Tests/LibWeb/Layout/expected/font-size-legacy.txtindex 2f90e82f8c2..b2dd6c4244f 100644--- a/Tests/LibWeb/Layout/expected/font-size-legacy.txt+++ b/Tests/LibWeb/Layout/expected/font-size-legacy.txt@@ -1,8 +1,8 @@Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inlineBlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 32 0+0+0] [BFC] children: not-inlineBlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 16 0+0+8] children: inline- InlineNode <font> at [8,11] [0+0+0 24.109375 0+0+0] [0+0+0 12 0+0+0]- frag 0 from TextNode start: 0, length: 4, rect: [8,11 24.109375x12] baseline: 9.59375+ InlineNode <font> at [8,12] [0+0+0 20.078125 0+0+0] [0+0+0 10 0+0+0]+ frag 0 from TextNode start: 0, length: 4, rect: [8,12 20.078125x10] baseline: 8"text"TextNode <#text> (not painted)diff --git a/Tests/LibWeb/Text/expected/css/animation-relative-font-keyframes.txt b/Tests/LibWeb/Text/expected/css/animation-relative-font-keyframes.txtindex c1c26d7fc08..001aa9ef97d 100644--- a/Tests/LibWeb/Text/expected/css/animation-relative-font-keyframes.txt+++ b/Tests/LibWeb/Text/expected/css/animation-relative-font-keyframes.txt@@ -1,3 +1,3 @@percentage font size: 60px-larger font size: 37.5px+larger font size: 36pxbolder font weight: 700diff --git a/Tests/LibWeb/Text/expected/css/style-engine/monospace-font-size-quirk-engine-computed.txt b/Tests/LibWeb/Text/expected/css/style-engine/monospace-font-size-quirk-engine-computed.txtindex 008202027b5..79624d4d4ae 100644--- a/Tests/LibWeb/Text/expected/css/style-engine/monospace-font-size-quirk-engine-computed.txt+++ b/Tests/LibWeb/Text/expected/css/style-engine/monospace-font-size-quirk-engine-computed.txt@@ -2,7 +2,7 @@ outer: 20pxown-size: 40pxmono-parent: 13pxinherits-mono: 26px-keyword: 19.1875px-mono-under-keyword: 15.59375px-recoloured mono-under-keyword: 15.59375px+keyword: 18px+mono-under-keyword: 16px+recoloured mono-under-keyword: 16pxC++ recomputations: 0diff --git a/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-font-relative-ancestor.txt b/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-font-relative-ancestor.txtindex 114116c3391..913b7bb227a 100644--- a/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-font-relative-ancestor.txt+++ b/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-font-relative-ancestor.txt@@ -1,3 +1,3 @@under-ex is smaller than the 13px default: trueunder-lh: 20px-pseudo: 15.59375px+pseudo: 16pxdiff --git a/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-over-viewport-and-calc-sizes.txt b/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-over-viewport-and-calc-sizes.txtindex 205ba6fe061..319b03f77d0 100644--- a/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-over-viewport-and-calc-sizes.txt+++ b/Tests/LibWeb/Text/expected/css/style-engine/monospace-recascade-over-viewport-and-calc-sizes.txt@@ -1,2 +1,2 @@-under-viewport: 15.59375px+under-viewport: 16pxunder-calc: 13pxdiff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-size-composition.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-size-composition.txtindex 1293f497e45..2f9b92a5a3b 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-size-composition.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-size-composition.txt@@ -2,8 +2,7 @@ Harness status: OKFound 70 tests-34 Pass-36 Fail+70 PassPass Compositing CSS Animations: property <font-size> underlying [50px] from add [100px] to add [200px] at (-0.3) should be [120px]Pass Compositing CSS Animations: property <font-size> underlying [50px] from add [100px] to add [200px] at (0) should be [150px]Pass Compositing CSS Animations: property <font-size> underlying [50px] from add [100px] to add [200px] at (0.25) should be [175px]@@ -18,34 +17,34 @@ Pass Compositing Web Animations: property <font-size> underlying [50px] from addPass Compositing Web Animations: property <font-size> underlying [50px] from add [100px] to add [200px] at (0.75) should be [225px]Pass Compositing Web Animations: property <font-size> underlying [50px] from add [100px] to add [200px] at (1) should be [250px]Pass Compositing Web Animations: property <font-size> underlying [50px] from add [100px] to add [200px] at (1.5) should be [300px]-Fail Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (-0.5) should be [106px]+Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (-0.5) should be [106px]Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0) should be [110px]-Fail Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.25) should be [112px]-Fail Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.5) should be [114px]-Fail Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.75) should be [116px]-Fail Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1) should be [118px]-Fail Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1.5) should be [122px]-Fail Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (-0.5) should be [106px]+Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.25) should be [112px]+Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.5) should be [114px]+Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.75) should be [116px]+Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1) should be [118px]+Pass Compositing CSS Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1.5) should be [122px]+Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (-0.5) should be [106px]Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0) should be [110px]-Fail Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.25) should be [112px]-Fail Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.5) should be [114px]-Fail Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.75) should be [116px]-Fail Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1) should be [118px]-Fail Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1.5) should be [122px]-Fail Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (-0.3) should be [20.9px]-Fail Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0) should be [23px]-Fail Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.25) should be [24.75px]-Fail Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.5) should be [26.5px]-Fail Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.75) should be [28.25px]+Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.25) should be [112px]+Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.5) should be [114px]+Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (0.75) should be [116px]+Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1) should be [118px]+Pass Compositing Web Animations: property <font-size> underlying [100px] from add [10px] to add [large] at (1.5) should be [122px]+Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (-0.3) should be [20.9px]+Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0) should be [23px]+Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.25) should be [24.75px]+Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.5) should be [26.5px]+Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.75) should be [28.25px]Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (1) should be [30px]-Fail Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (1.5) should be [33.5px]-Fail Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (-0.3) should be [20.9px]-Fail Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0) should be [23px]-Fail Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.25) should be [24.75px]-Fail Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.5) should be [26.5px]-Fail Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.75) should be [28.25px]+Pass Compositing CSS Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (1.5) should be [33.5px]+Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (-0.3) should be [20.9px]+Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0) should be [23px]+Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.25) should be [24.75px]+Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.5) should be [26.5px]+Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (0.75) should be [28.25px]Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (1) should be [30px]-Fail Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (1.5) should be [33.5px]+Pass Compositing Web Animations: property <font-size> underlying [50%] from add [small] to add [20px] at (1.5) should be [33.5px]Pass Compositing CSS Animations: property <font-size> underlying [20%] from add [10rem] to replace [5em] at (-0.3) should be [365.2px]Pass Compositing CSS Animations: property <font-size> underlying [20%] from add [10rem] to replace [5em] at (0) should be [304px]Pass Compositing CSS Animations: property <font-size> underlying [20%] from add [10rem] to replace [5em] at (0.25) should be [253px]@@ -60,17 +59,17 @@ Pass Compositing Web Animations: property <font-size> underlying [20%] from addPass Compositing Web Animations: property <font-size> underlying [20%] from add [10rem] to replace [5em] at (0.75) should be [151px]Pass Compositing Web Animations: property <font-size> underlying [20%] from add [10rem] to replace [5em] at (1) should be [100px]Pass Compositing Web Animations: property <font-size> underlying [20%] from add [10rem] to replace [5em] at (1.5) should be [0px]-Fail Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (-0.3) should be [9.7px]+Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (-0.3) should be [9.7px]Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0) should be [16px]-Fail Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.25) should be [21.25px]-Fail Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.5) should be [26.5px]-Fail Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.75) should be [31.75px]-Fail Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1) should be [37px]-Fail Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1.5) should be [47.5px]-Fail Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (-0.3) should be [9.7px]+Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.25) should be [21.25px]+Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.5) should be [26.5px]+Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.75) should be [31.75px]+Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1) should be [37px]+Pass Compositing CSS Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1.5) should be [47.5px]+Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (-0.3) should be [9.7px]Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0) should be [16px]-Fail Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.25) should be [21.25px]-Fail Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.5) should be [26.5px]-Fail Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.75) should be [31.75px]-Fail Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1) should be [37px]-Fail Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1.5) should be [47.5px]\ No newline at end of file+Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.25) should be [21.25px]+Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.5) should be [26.5px]+Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (0.75) should be [31.75px]+Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1) should be [37px]+Pass Compositing Web Animations: property <font-size> underlying [small] from replace [medium] to add [larger] at (1.5) should be [47.5px]\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/font-size-computed-keyword.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/font-size-computed-keyword.txtindex 5212dc2cfee..76a557e8662 100644--- a/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/font-size-computed-keyword.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/font-size-computed-keyword.txt@@ -2,19 +2,18 @@ Harness status: OKFound 16 tests-10 Pass-6 Fail+16 PassPass medium is 16pxPass initial value of font size is medium-Fail font size large+Pass font size largePass font size x-largePass font size xx-largePass font size xxx-large-Fail font size small-Fail font size x-small-Fail font size xx-small-Fail font size larger-Fail font size smaller+Pass font size small+Pass font size x-small+Pass font size xx-small+Pass font size larger+Pass font size smallerPass font size large cascaded by initialPass font size large cascaded by inheritPass font size large cascaded by unsetdiff --git a/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected] b/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]index 90a5255e7d4..21c783ce9c1 100644--- a/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]+++ b/Tests/LibWeb/Text/expected/wpt-import/editing/run/[email protected]@@ -2,8 +2,8 @@ Harness status: OKFound 1000 tests-971 Pass-29 Fail+975 Pass+25 FailPass [["stylewithcss","false"],["fontsize","4"]] "<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>" queryCommandValue("fontsize") beforePass [["stylewithcss","false"],["fontsize","4"]] "<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>" queryCommandIndeterm("fontsize") afterPass [["stylewithcss","false"],["fontsize","4"]] "<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>" queryCommandState("fontsize") after@@ -897,7 +897,7 @@ Pass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" quePass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("stylewithcss") afterPass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandIndeterm("fontsize") beforePass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandState("fontsize") before-Fail [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("fontsize") before+Pass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("fontsize") beforePass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandIndeterm("fontsize") afterPass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandState("fontsize") afterPass [["stylewithcss","true"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("fontsize") after@@ -913,7 +913,7 @@ Pass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" quPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("stylewithcss") afterPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandIndeterm("fontsize") beforePass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandState("fontsize") before-Fail [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("fontsize") before+Pass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("fontsize") beforePass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandIndeterm("fontsize") afterPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandState("fontsize") afterPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>[bar]</small>baz" queryCommandValue("fontsize") after@@ -929,7 +929,7 @@ Pass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" quePass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("stylewithcss") afterPass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandIndeterm("fontsize") beforePass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandState("fontsize") before-Fail [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("fontsize") before+Pass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("fontsize") beforePass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandIndeterm("fontsize") afterPass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandState("fontsize") afterPass [["stylewithcss","true"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("fontsize") after@@ -945,7 +945,7 @@ Pass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" quPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("stylewithcss") afterPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandIndeterm("fontsize") beforePass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandState("fontsize") before-Fail [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("fontsize") before+Pass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("fontsize") beforePass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandIndeterm("fontsize") afterPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandState("fontsize") afterPass [["stylewithcss","false"],["fontsize","3"]] "foo<small>b[a]r</small>baz" queryCommandValue("fontsize") after