From bd7348949aad21d28a19ffb991a5f4d945f2fb28 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Tue, 9 Sep 2025 10:05:21 +0100 Subject: [PATCH] LibWeb: Make word-spacing and letter-spacing default value compute to 0 --- Libraries/LibWeb/CSS/StyleComputer.cpp | 5 + ...upported-properties-and-default-values.txt | 4 +- .../css/getComputedStyle-print-all.txt | 2 +- .../letter-spacing-interpolation.txt | 149 ++++++++++++++++++ .../animations/word-spacing-interpolation.txt | 149 ++++++++++++++++++ .../parsing/word-spacing-computed.txt | 14 ++ .../letter-spacing-interpolation.html | 107 +++++++++++++ .../word-spacing-interpolation.html | 104 ++++++++++++ .../parsing/word-spacing-computed.html | 33 ++++ 9 files changed, 564 insertions(+), 3 deletions(-) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/letter-spacing-interpolation.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/word-spacing-interpolation.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/word-spacing-computed.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/letter-spacing-interpolation.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/word-spacing-interpolation.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/word-spacing-computed.html diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cpp index 94207111ad4..e83a71d31d0 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -3136,6 +3136,11 @@ NonnullRefPtr StyleComputer::compute_value_of_property(Propert return compute_border_or_outline_width(specified_value, get_property_specified_value(PropertyID::BorderTopStyle), computation_context); case PropertyID::OutlineWidth: return compute_border_or_outline_width(specified_value, get_property_specified_value(PropertyID::OutlineStyle), computation_context); + case PropertyID::LetterSpacing: + case PropertyID::WordSpacing: + if (specified_value->to_keyword() == Keyword::Normal) + return LengthStyleValue::create(Length::make_px(0)); + return specified_value; case PropertyID::FillOpacity: case PropertyID::FloodOpacity: case PropertyID::Opacity: diff --git a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt index 178b85b8114..80d013c26d1 100644 --- a/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt +++ b/Tests/LibWeb/Text/expected/css/CSSStyleProperties-all-supported-properties-and-default-values.txt @@ -735,8 +735,8 @@ All supported properties and their default values exposed from CSSStylePropertie 'will-change': 'auto' 'wordBreak': 'normal' 'word-break': 'normal' -'wordSpacing': 'normal' -'word-spacing': 'normal' +'wordSpacing': '0px' +'word-spacing': '0px' 'wordWrap': 'normal' 'word-wrap': 'normal' 'writingMode': 'horizontal-tb' diff --git a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt index ada0f74f2d5..55039f01459 100644 --- a/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt +++ b/Tests/LibWeb/Text/expected/css/getComputedStyle-print-all.txt @@ -65,7 +65,7 @@ text-wrap-style: auto visibility: visible white-space-collapse: collapse word-break: normal -word-spacing: normal +word-spacing: 0px word-wrap: normal writing-mode: horizontal-tb align-content: normal diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/letter-spacing-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/letter-spacing-interpolation.txt new file mode 100644 index 00000000000..e611b8e396c --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/letter-spacing-interpolation.txt @@ -0,0 +1,149 @@ +Harness status: OK + +Found 144 tests + +144 Pass +Pass CSS Transitions: property from neutral to [20px] at (-0.3) should be [33px] +Pass CSS Transitions: property from neutral to [20px] at (0) should be [30px] +Pass CSS Transitions: property from neutral to [20px] at (0.3) should be [27px] +Pass CSS Transitions: property from neutral to [20px] at (0.6) should be [24px] +Pass CSS Transitions: property from neutral to [20px] at (1) should be [20px] +Pass CSS Transitions: property from neutral to [20px] at (1.5) should be [15px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (-0.3) should be [33px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (0) should be [30px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (0.3) should be [27px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (0.6) should be [24px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (1.5) should be [15px] +Pass CSS Animations: property from neutral to [20px] at (-0.3) should be [33px] +Pass CSS Animations: property from neutral to [20px] at (0) should be [30px] +Pass CSS Animations: property from neutral to [20px] at (0.3) should be [27px] +Pass CSS Animations: property from neutral to [20px] at (0.6) should be [24px] +Pass CSS Animations: property from neutral to [20px] at (1) should be [20px] +Pass CSS Animations: property from neutral to [20px] at (1.5) should be [15px] +Pass Web Animations: property from neutral to [20px] at (-0.3) should be [33px] +Pass Web Animations: property from neutral to [20px] at (0) should be [30px] +Pass Web Animations: property from neutral to [20px] at (0.3) should be [27px] +Pass Web Animations: property from neutral to [20px] at (0.6) should be [24px] +Pass Web Animations: property from neutral to [20px] at (1) should be [20px] +Pass Web Animations: property from neutral to [20px] at (1.5) should be [15px] +Pass CSS Transitions: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass CSS Transitions: property from [initial] to [20px] at (0) should be [normal] +Pass CSS Transitions: property from [initial] to [20px] at (0.3) should be [6px] +Pass CSS Transitions: property from [initial] to [20px] at (0.6) should be [12px] +Pass CSS Transitions: property from [initial] to [20px] at (1) should be [20px] +Pass CSS Transitions: property from [initial] to [20px] at (1.5) should be [30px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (0) should be [normal] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (0.3) should be [6px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (0.6) should be [12px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (1.5) should be [30px] +Pass CSS Animations: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass CSS Animations: property from [initial] to [20px] at (0) should be [normal] +Pass CSS Animations: property from [initial] to [20px] at (0.3) should be [6px] +Pass CSS Animations: property from [initial] to [20px] at (0.6) should be [12px] +Pass CSS Animations: property from [initial] to [20px] at (1) should be [20px] +Pass CSS Animations: property from [initial] to [20px] at (1.5) should be [30px] +Pass Web Animations: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass Web Animations: property from [initial] to [20px] at (0) should be [normal] +Pass Web Animations: property from [initial] to [20px] at (0.3) should be [6px] +Pass Web Animations: property from [initial] to [20px] at (0.6) should be [12px] +Pass Web Animations: property from [initial] to [20px] at (1) should be [20px] +Pass Web Animations: property from [initial] to [20px] at (1.5) should be [30px] +Pass CSS Transitions: property from [inherit] to [20px] at (-0.3) should be [-3.4px] +Pass CSS Transitions: property from [inherit] to [20px] at (0) should be [2px] +Pass CSS Transitions: property from [inherit] to [20px] at (0.3) should be [7.4px] +Pass CSS Transitions: property from [inherit] to [20px] at (0.6) should be [12.8px] +Pass CSS Transitions: property from [inherit] to [20px] at (1) should be [20px] +Pass CSS Transitions: property from [inherit] to [20px] at (1.5) should be [29px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (-0.3) should be [-3.4px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (0) should be [2px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (0.3) should be [7.4px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (0.6) should be [12.8px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (1.5) should be [29px] +Pass CSS Animations: property from [inherit] to [20px] at (-0.3) should be [-3.4px] +Pass CSS Animations: property from [inherit] to [20px] at (0) should be [2px] +Pass CSS Animations: property from [inherit] to [20px] at (0.3) should be [7.4px] +Pass CSS Animations: property from [inherit] to [20px] at (0.6) should be [12.8px] +Pass CSS Animations: property from [inherit] to [20px] at (1) should be [20px] +Pass CSS Animations: property from [inherit] to [20px] at (1.5) should be [29px] +Pass Web Animations: property from [inherit] to [20px] at (-0.3) should be [-3.4px] +Pass Web Animations: property from [inherit] to [20px] at (0) should be [2px] +Pass Web Animations: property from [inherit] to [20px] at (0.3) should be [7.4px] +Pass Web Animations: property from [inherit] to [20px] at (0.6) should be [12.8px] +Pass Web Animations: property from [inherit] to [20px] at (1) should be [20px] +Pass Web Animations: property from [inherit] to [20px] at (1.5) should be [29px] +Pass CSS Transitions: property from [unset] to [20px] at (-0.3) should be [-3.4px] +Pass CSS Transitions: property from [unset] to [20px] at (0) should be [2px] +Pass CSS Transitions: property from [unset] to [20px] at (0.3) should be [7.4px] +Pass CSS Transitions: property from [unset] to [20px] at (0.6) should be [12.8px] +Pass CSS Transitions: property from [unset] to [20px] at (1) should be [20px] +Pass CSS Transitions: property from [unset] to [20px] at (1.5) should be [29px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (-0.3) should be [-3.4px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (0) should be [2px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (0.3) should be [7.4px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (0.6) should be [12.8px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (1.5) should be [29px] +Pass CSS Animations: property from [unset] to [20px] at (-0.3) should be [-3.4px] +Pass CSS Animations: property from [unset] to [20px] at (0) should be [2px] +Pass CSS Animations: property from [unset] to [20px] at (0.3) should be [7.4px] +Pass CSS Animations: property from [unset] to [20px] at (0.6) should be [12.8px] +Pass CSS Animations: property from [unset] to [20px] at (1) should be [20px] +Pass CSS Animations: property from [unset] to [20px] at (1.5) should be [29px] +Pass Web Animations: property from [unset] to [20px] at (-0.3) should be [-3.4px] +Pass Web Animations: property from [unset] to [20px] at (0) should be [2px] +Pass Web Animations: property from [unset] to [20px] at (0.3) should be [7.4px] +Pass Web Animations: property from [unset] to [20px] at (0.6) should be [12.8px] +Pass Web Animations: property from [unset] to [20px] at (1) should be [20px] +Pass Web Animations: property from [unset] to [20px] at (1.5) should be [29px] +Pass CSS Transitions: property from [-10px] to [10px] at (-0.3) should be [-16px] +Pass CSS Transitions: property from [-10px] to [10px] at (0) should be [-10px] +Pass CSS Transitions: property from [-10px] to [10px] at (0.3) should be [-4px] +Pass CSS Transitions: property from [-10px] to [10px] at (0.6) should be [2px] +Pass CSS Transitions: property from [-10px] to [10px] at (1) should be [10px] +Pass CSS Transitions: property from [-10px] to [10px] at (1.5) should be [20px] +Pass CSS Transitions with transition: all: property from [-10px] to [10px] at (-0.3) should be [-16px] +Pass CSS Transitions with transition: all: property from [-10px] to [10px] at (0) should be [-10px] +Pass CSS Transitions with transition: all: property from [-10px] to [10px] at (0.3) should be [-4px] +Pass CSS Transitions with transition: all: property from [-10px] to [10px] at (0.6) should be [2px] +Pass CSS Transitions with transition: all: property from [-10px] to [10px] at (1) should be [10px] +Pass CSS Transitions with transition: all: property from [-10px] to [10px] at (1.5) should be [20px] +Pass CSS Animations: property from [-10px] to [10px] at (-0.3) should be [-16px] +Pass CSS Animations: property from [-10px] to [10px] at (0) should be [-10px] +Pass CSS Animations: property from [-10px] to [10px] at (0.3) should be [-4px] +Pass CSS Animations: property from [-10px] to [10px] at (0.6) should be [2px] +Pass CSS Animations: property from [-10px] to [10px] at (1) should be [10px] +Pass CSS Animations: property from [-10px] to [10px] at (1.5) should be [20px] +Pass Web Animations: property from [-10px] to [10px] at (-0.3) should be [-16px] +Pass Web Animations: property from [-10px] to [10px] at (0) should be [-10px] +Pass Web Animations: property from [-10px] to [10px] at (0.3) should be [-4px] +Pass Web Animations: property from [-10px] to [10px] at (0.6) should be [2px] +Pass Web Animations: property from [-10px] to [10px] at (1) should be [10px] +Pass Web Animations: property from [-10px] to [10px] at (1.5) should be [20px] +Pass CSS Transitions: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass CSS Transitions: property from [normal] to [10px] at (0) should be [normal] +Pass CSS Transitions: property from [normal] to [10px] at (0.3) should be [3px] +Pass CSS Transitions: property from [normal] to [10px] at (0.6) should be [6px] +Pass CSS Transitions: property from [normal] to [10px] at (1) should be [10px] +Pass CSS Transitions: property from [normal] to [10px] at (1.5) should be [15px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (0) should be [normal] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (0.3) should be [3px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (0.6) should be [6px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (1) should be [10px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (1.5) should be [15px] +Pass CSS Animations: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass CSS Animations: property from [normal] to [10px] at (0) should be [normal] +Pass CSS Animations: property from [normal] to [10px] at (0.3) should be [3px] +Pass CSS Animations: property from [normal] to [10px] at (0.6) should be [6px] +Pass CSS Animations: property from [normal] to [10px] at (1) should be [10px] +Pass CSS Animations: property from [normal] to [10px] at (1.5) should be [15px] +Pass Web Animations: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass Web Animations: property from [normal] to [10px] at (0) should be [normal] +Pass Web Animations: property from [normal] to [10px] at (0.3) should be [3px] +Pass Web Animations: property from [normal] to [10px] at (0.6) should be [6px] +Pass Web Animations: property from [normal] to [10px] at (1) should be [10px] +Pass Web Animations: property from [normal] to [10px] at (1.5) should be [15px] \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/word-spacing-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/word-spacing-interpolation.txt new file mode 100644 index 00000000000..768525a72c0 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/animations/word-spacing-interpolation.txt @@ -0,0 +1,149 @@ +Harness status: OK + +Found 144 tests + +144 Pass +Pass CSS Transitions: property from neutral to [20px] at (-0.3) should be [7px] +Pass CSS Transitions: property from neutral to [20px] at (0) should be [10px] +Pass CSS Transitions: property from neutral to [20px] at (0.3) should be [13px] +Pass CSS Transitions: property from neutral to [20px] at (0.6) should be [16px] +Pass CSS Transitions: property from neutral to [20px] at (1) should be [20px] +Pass CSS Transitions: property from neutral to [20px] at (1.5) should be [25px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (-0.3) should be [7px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (0) should be [10px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (0.3) should be [13px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (0.6) should be [16px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from neutral to [20px] at (1.5) should be [25px] +Pass CSS Animations: property from neutral to [20px] at (-0.3) should be [7px] +Pass CSS Animations: property from neutral to [20px] at (0) should be [10px] +Pass CSS Animations: property from neutral to [20px] at (0.3) should be [13px] +Pass CSS Animations: property from neutral to [20px] at (0.6) should be [16px] +Pass CSS Animations: property from neutral to [20px] at (1) should be [20px] +Pass CSS Animations: property from neutral to [20px] at (1.5) should be [25px] +Pass Web Animations: property from neutral to [20px] at (-0.3) should be [7px] +Pass Web Animations: property from neutral to [20px] at (0) should be [10px] +Pass Web Animations: property from neutral to [20px] at (0.3) should be [13px] +Pass Web Animations: property from neutral to [20px] at (0.6) should be [16px] +Pass Web Animations: property from neutral to [20px] at (1) should be [20px] +Pass Web Animations: property from neutral to [20px] at (1.5) should be [25px] +Pass CSS Transitions: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass CSS Transitions: property from [initial] to [20px] at (0) should be [0px] +Pass CSS Transitions: property from [initial] to [20px] at (0.3) should be [6px] +Pass CSS Transitions: property from [initial] to [20px] at (0.6) should be [12px] +Pass CSS Transitions: property from [initial] to [20px] at (1) should be [20px] +Pass CSS Transitions: property from [initial] to [20px] at (1.5) should be [30px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (0) should be [0px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (0.3) should be [6px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (0.6) should be [12px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from [initial] to [20px] at (1.5) should be [30px] +Pass CSS Animations: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass CSS Animations: property from [initial] to [20px] at (0) should be [0px] +Pass CSS Animations: property from [initial] to [20px] at (0.3) should be [6px] +Pass CSS Animations: property from [initial] to [20px] at (0.6) should be [12px] +Pass CSS Animations: property from [initial] to [20px] at (1) should be [20px] +Pass CSS Animations: property from [initial] to [20px] at (1.5) should be [30px] +Pass Web Animations: property from [initial] to [20px] at (-0.3) should be [-6px] +Pass Web Animations: property from [initial] to [20px] at (0) should be [0px] +Pass Web Animations: property from [initial] to [20px] at (0.3) should be [6px] +Pass Web Animations: property from [initial] to [20px] at (0.6) should be [12px] +Pass Web Animations: property from [initial] to [20px] at (1) should be [20px] +Pass Web Animations: property from [initial] to [20px] at (1.5) should be [30px] +Pass CSS Transitions: property from [inherit] to [20px] at (-0.3) should be [33px] +Pass CSS Transitions: property from [inherit] to [20px] at (0) should be [30px] +Pass CSS Transitions: property from [inherit] to [20px] at (0.3) should be [27px] +Pass CSS Transitions: property from [inherit] to [20px] at (0.6) should be [24px] +Pass CSS Transitions: property from [inherit] to [20px] at (1) should be [20px] +Pass CSS Transitions: property from [inherit] to [20px] at (1.5) should be [15px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (-0.3) should be [33px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (0) should be [30px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (0.3) should be [27px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (0.6) should be [24px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from [inherit] to [20px] at (1.5) should be [15px] +Pass CSS Animations: property from [inherit] to [20px] at (-0.3) should be [33px] +Pass CSS Animations: property from [inherit] to [20px] at (0) should be [30px] +Pass CSS Animations: property from [inherit] to [20px] at (0.3) should be [27px] +Pass CSS Animations: property from [inherit] to [20px] at (0.6) should be [24px] +Pass CSS Animations: property from [inherit] to [20px] at (1) should be [20px] +Pass CSS Animations: property from [inherit] to [20px] at (1.5) should be [15px] +Pass Web Animations: property from [inherit] to [20px] at (-0.3) should be [33px] +Pass Web Animations: property from [inherit] to [20px] at (0) should be [30px] +Pass Web Animations: property from [inherit] to [20px] at (0.3) should be [27px] +Pass Web Animations: property from [inherit] to [20px] at (0.6) should be [24px] +Pass Web Animations: property from [inherit] to [20px] at (1) should be [20px] +Pass Web Animations: property from [inherit] to [20px] at (1.5) should be [15px] +Pass CSS Transitions: property from [unset] to [20px] at (-0.3) should be [33px] +Pass CSS Transitions: property from [unset] to [20px] at (0) should be [30px] +Pass CSS Transitions: property from [unset] to [20px] at (0.3) should be [27px] +Pass CSS Transitions: property from [unset] to [20px] at (0.6) should be [24px] +Pass CSS Transitions: property from [unset] to [20px] at (1) should be [20px] +Pass CSS Transitions: property from [unset] to [20px] at (1.5) should be [15px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (-0.3) should be [33px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (0) should be [30px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (0.3) should be [27px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (0.6) should be [24px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (1) should be [20px] +Pass CSS Transitions with transition: all: property from [unset] to [20px] at (1.5) should be [15px] +Pass CSS Animations: property from [unset] to [20px] at (-0.3) should be [33px] +Pass CSS Animations: property from [unset] to [20px] at (0) should be [30px] +Pass CSS Animations: property from [unset] to [20px] at (0.3) should be [27px] +Pass CSS Animations: property from [unset] to [20px] at (0.6) should be [24px] +Pass CSS Animations: property from [unset] to [20px] at (1) should be [20px] +Pass CSS Animations: property from [unset] to [20px] at (1.5) should be [15px] +Pass Web Animations: property from [unset] to [20px] at (-0.3) should be [33px] +Pass Web Animations: property from [unset] to [20px] at (0) should be [30px] +Pass Web Animations: property from [unset] to [20px] at (0.3) should be [27px] +Pass Web Animations: property from [unset] to [20px] at (0.6) should be [24px] +Pass Web Animations: property from [unset] to [20px] at (1) should be [20px] +Pass Web Animations: property from [unset] to [20px] at (1.5) should be [15px] +Pass CSS Transitions: property from [-10px] to [40px] at (-0.3) should be [-25px] +Pass CSS Transitions: property from [-10px] to [40px] at (0) should be [-10px] +Pass CSS Transitions: property from [-10px] to [40px] at (0.3) should be [5px] +Pass CSS Transitions: property from [-10px] to [40px] at (0.6) should be [20px] +Pass CSS Transitions: property from [-10px] to [40px] at (1) should be [40px] +Pass CSS Transitions: property from [-10px] to [40px] at (1.5) should be [65px] +Pass CSS Transitions with transition: all: property from [-10px] to [40px] at (-0.3) should be [-25px] +Pass CSS Transitions with transition: all: property from [-10px] to [40px] at (0) should be [-10px] +Pass CSS Transitions with transition: all: property from [-10px] to [40px] at (0.3) should be [5px] +Pass CSS Transitions with transition: all: property from [-10px] to [40px] at (0.6) should be [20px] +Pass CSS Transitions with transition: all: property from [-10px] to [40px] at (1) should be [40px] +Pass CSS Transitions with transition: all: property from [-10px] to [40px] at (1.5) should be [65px] +Pass CSS Animations: property from [-10px] to [40px] at (-0.3) should be [-25px] +Pass CSS Animations: property from [-10px] to [40px] at (0) should be [-10px] +Pass CSS Animations: property from [-10px] to [40px] at (0.3) should be [5px] +Pass CSS Animations: property from [-10px] to [40px] at (0.6) should be [20px] +Pass CSS Animations: property from [-10px] to [40px] at (1) should be [40px] +Pass CSS Animations: property from [-10px] to [40px] at (1.5) should be [65px] +Pass Web Animations: property from [-10px] to [40px] at (-0.3) should be [-25px] +Pass Web Animations: property from [-10px] to [40px] at (0) should be [-10px] +Pass Web Animations: property from [-10px] to [40px] at (0.3) should be [5px] +Pass Web Animations: property from [-10px] to [40px] at (0.6) should be [20px] +Pass Web Animations: property from [-10px] to [40px] at (1) should be [40px] +Pass Web Animations: property from [-10px] to [40px] at (1.5) should be [65px] +Pass CSS Transitions: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass CSS Transitions: property from [normal] to [10px] at (0) should be [0px] +Pass CSS Transitions: property from [normal] to [10px] at (0.3) should be [3px] +Pass CSS Transitions: property from [normal] to [10px] at (0.6) should be [6px] +Pass CSS Transitions: property from [normal] to [10px] at (1) should be [10px] +Pass CSS Transitions: property from [normal] to [10px] at (1.5) should be [15px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (0) should be [0px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (0.3) should be [3px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (0.6) should be [6px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (1) should be [10px] +Pass CSS Transitions with transition: all: property from [normal] to [10px] at (1.5) should be [15px] +Pass CSS Animations: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass CSS Animations: property from [normal] to [10px] at (0) should be [0px] +Pass CSS Animations: property from [normal] to [10px] at (0.3) should be [3px] +Pass CSS Animations: property from [normal] to [10px] at (0.6) should be [6px] +Pass CSS Animations: property from [normal] to [10px] at (1) should be [10px] +Pass CSS Animations: property from [normal] to [10px] at (1.5) should be [15px] +Pass Web Animations: property from [normal] to [10px] at (-0.3) should be [-3px] +Pass Web Animations: property from [normal] to [10px] at (0) should be [0px] +Pass Web Animations: property from [normal] to [10px] at (0.3) should be [3px] +Pass Web Animations: property from [normal] to [10px] at (0.6) should be [6px] +Pass Web Animations: property from [normal] to [10px] at (1) should be [10px] +Pass Web Animations: property from [normal] to [10px] at (1.5) should be [15px] \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/word-spacing-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/word-spacing-computed.txt new file mode 100644 index 00000000000..9ac93b9bea3 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-text/parsing/word-spacing-computed.txt @@ -0,0 +1,14 @@ +Harness status: OK + +Found 9 tests + +9 Pass +Pass Property word-spacing value 'normal' +Pass Property word-spacing value '0' +Pass Property word-spacing value '10px' +Pass Property word-spacing value '-20px' +Pass Property word-spacing value 'calc(10px - 0.5em)' +Pass Property word-spacing value '110%' +Pass Property word-spacing value '-5%' +Pass Property word-spacing value 'calc(10% - 20%)' +Pass Property word-spacing value 'calc(10px - (5% + 10%)' \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/letter-spacing-interpolation.html b/Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/letter-spacing-interpolation.html new file mode 100644 index 00000000000..941ae2943cb --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/letter-spacing-interpolation.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/word-spacing-interpolation.html b/Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/word-spacing-interpolation.html new file mode 100644 index 00000000000..de294089705 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-text/animations/word-spacing-interpolation.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/word-spacing-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/word-spacing-computed.html new file mode 100644 index 00000000000..56c24aa2519 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-text/parsing/word-spacing-computed.html @@ -0,0 +1,33 @@ + + + + +CSS Text: getComputedStyle().wordSpacing + + + + + + + + + +
+ + +