From 74d9fec9cf8269857aac38ef4b7c04154907b380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Tue, 3 Mar 2020 16:47:39 +0100 Subject: [PATCH 01/15] Enable text-decoration tests --- tests/wpt/include-layout-2020.ini | 2 + .../css/css-text-decor/inheritance.html.ini | 55 +++++ .../text-decoration-color-computed.html.ini | 10 + .../text-decoration-color-valid.html.ini | 10 + .../parsing/text-decoration-computed.html.ini | 37 ++++ .../text-decoration-line-computed.html.ini | 55 +++++ .../text-decoration-line-valid.html.ini | 202 ++++++++++++++++++ .../text-decoration-shorthand.html.ini | 13 ++ ...text-decoration-skip-ink-computed.html.ini | 7 + .../text-decoration-skip-ink-valid.html.ini | 7 + .../text-decoration-style-computed.html.ini | 16 ++ .../text-decoration-style-valid.html.ini | 16 ++ .../parsing/text-decoration-valid.html.ini | 46 ++++ .../parsing/text-shadow-computed.html.ini | 22 ++ .../parsing/text-shadow-valid.html.ini | 31 +++ .../text-underline-position-computed.html.ini | 16 ++ .../text-underline-position-valid.html.ini | 19 ++ .../text-decoration-color.html.ini | 2 + ...ecoration-serialization.tentative.html.ini | 4 + .../text-decoration-skip-ink-001.html.ini | 2 + .../text-decoration-skip-ink-003.html.ini | 2 + .../text-decoration-skip-ink-004.html.ini | 2 + .../text-decoration-skip-ink-005.html.ini | 2 + ...ecoration-skip-ink-sidewayslr-001.html.ini | 2 + ...ecoration-skip-ink-sidewaysrl-001.html.ini | 2 + ...t-decoration-skip-ink-upright-001.html.ini | 2 + ...t-decoration-skip-ink-upright-002.html.ini | 2 + ...-decoration-skip-ink-vertical-001.html.ini | 2 + ...-decoration-skip-ink-vertical-002.html.ini | 2 + .../text-decoration-skip-ink.html.ini | 7 + .../text-decoration-subelements-001.html.ini | 2 + .../text-decoration-subelements-002.html.ini | 2 + .../text-decoration-thickness-001.html.ini | 2 + ...ext-decoration-thickness-computed.html.ini | 10 + ...text-decoration-thickness-initial.html.ini | 4 + ...oration-thickness-linethrough-001.html.ini | 2 + ...decoration-thickness-overline-001.html.ini | 2 + ...t-decoration-thickness-scroll-001.html.ini | 2 + ...ecoration-thickness-underline-001.html.ini | 2 + .../text-decoration-thickness-valid.html.ini | 25 +++ ...decoration-thickness-vertical-001.html.ini | 2 + ...decoration-thickness-vertical-002.html.ini | 2 + .../text-emphasis-color-001.xht.ini | 2 + ...t-emphasis-position-above-left-001.xht.ini | 2 + ...t-emphasis-position-above-left-002.xht.ini | 2 + ...-emphasis-position-above-right-001.xht.ini | 2 + ...-emphasis-position-above-right-002.xht.ini | 2 + ...t-emphasis-position-below-left-002.xht.ini | 2 + ...-emphasis-position-below-right-002.xht.ini | 2 + .../text-emphasis-style-002.html.ini | 2 + .../text-emphasis-style-006.html.ini | 2 + .../text-emphasis-style-007.html.ini | 2 + .../text-emphasis-style-008.html.ini | 2 + .../text-emphasis-style-010.html.ini | 2 + .../text-emphasis-style-012.html.ini | 2 + .../text-emphasis-style-021.html.ini | 2 + .../text-emphasis-style-filled-001.xht.ini | 2 + .../text-emphasis-style-none-001.xht.ini | 2 + .../text-emphasis-style-open-001.xht.ini | 2 + .../text-emphasis-style-shape-001.xht.ini | 2 + .../text-emphasis-style-string-001.xht.ini | 2 + .../text-underline-offset-001.html.ini | 2 + .../text-underline-offset-computed.html.ini | 7 + .../text-underline-offset-initial.html.ini | 4 + .../text-underline-offset-scroll-001.html.ini | 2 + .../text-underline-offset-valid.html.ini | 22 ++ 66 files changed, 729 insertions(+) create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/inheritance.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-shorthand.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-color.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-serialization.tentative.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-003.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-004.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-005.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewayslr-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewaysrl-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-002.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-002.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-002.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-initial.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-linethrough-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-overline-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-scroll-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-underline-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-002.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-color-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-002.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-002.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-006.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-007.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-008.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-010.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-012.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-021.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-filled-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-open-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-shape-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-string-001.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-computed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-initial.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-scroll-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-valid.html.ini diff --git a/tests/wpt/include-layout-2020.ini b/tests/wpt/include-layout-2020.ini index a1ac1c24332..b67d13102c3 100644 --- a/tests/wpt/include-layout-2020.ini +++ b/tests/wpt/include-layout-2020.ini @@ -15,6 +15,8 @@ skip: true skip: false [css-color] skip: false + [css-text-decor] + skip: false [css-transforms] skip: false [filter-effects] diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/inheritance.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/inheritance.html.ini new file mode 100644 index 00000000000..17b0640d5a3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/inheritance.html.ini @@ -0,0 +1,55 @@ +[inheritance.html] + [Property text-emphasis-style inherits] + expected: FAIL + + [Property text-emphasis-style has initial value none] + expected: FAIL + + [Property text-decoration-style has initial value solid] + expected: FAIL + + [Property text-underline-position has initial value auto] + expected: FAIL + + [Property text-decoration-line has initial value none] + expected: FAIL + + [Property text-emphasis-color has initial value rgba(2, 3, 4, 0.5)] + expected: FAIL + + [Property text-shadow has initial value none] + expected: FAIL + + [Property text-decoration-color has initial value rgba(2, 3, 4, 0.5)] + expected: FAIL + + [Property text-decoration-skip-ink inherits] + expected: FAIL + + [Property text-decoration-skip-ink has initial value auto] + expected: FAIL + + [Property text-decoration-line does not inherit] + expected: FAIL + + [Property text-underline-position inherits] + expected: FAIL + + [Property text-emphasis-position inherits] + expected: FAIL + + [Property text-decoration-color does not inherit] + expected: FAIL + + [Property text-emphasis-position has initial value over right] + expected: FAIL + + [Property text-decoration-style does not inherit] + expected: FAIL + + [Property text-shadow inherits] + expected: FAIL + + [Property text-emphasis-color inherits] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-computed.html.ini new file mode 100644 index 00000000000..73fb2ff2b6b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-computed.html.ini @@ -0,0 +1,10 @@ +[text-decoration-color-computed.html] + [Property text-decoration-color value 'inherit'] + expected: FAIL + + [Property text-decoration-color value 'rgb(0, 0, 255)'] + expected: FAIL + + [Property text-decoration-color value 'currentcolor'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini new file mode 100644 index 00000000000..030a804ef83 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini @@ -0,0 +1,10 @@ +[text-decoration-color-valid.html] + [e.style['text-decoration-color'\] = "currentcolor" should set the property value] + expected: FAIL + + [e.style['text-decoration-color'\] = "red" should set the property value] + expected: FAIL + + [e.style['text-decoration-color'\] = "rgba(10, 20, 30, 0.4)" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-computed.html.ini new file mode 100644 index 00000000000..92e91411409 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-computed.html.ini @@ -0,0 +1,37 @@ +[text-decoration-computed.html] + [Property text-decoration value 'auto'] + expected: FAIL + + [Property text-decoration value 'currentcolor'] + expected: FAIL + + [Property text-decoration value 'double overline underline'] + expected: FAIL + + [Property text-decoration value 'line-through'] + expected: FAIL + + [Property text-decoration value 'underline dashed rgb(0, 255, 0)'] + expected: FAIL + + [Property text-decoration value 'underline overline line-through red'] + expected: FAIL + + [Property text-decoration value 'rgba(10, 20, 30, 0.4) dotted'] + expected: FAIL + + [Property text-decoration value 'none'] + expected: FAIL + + [Property text-decoration value '10px'] + expected: FAIL + + [Property text-decoration value 'underline red from-font'] + expected: FAIL + + [Property text-decoration value 'solid'] + expected: FAIL + + [Property text-decoration value 'from-font'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-computed.html.ini new file mode 100644 index 00000000000..43755cb6113 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-computed.html.ini @@ -0,0 +1,55 @@ +[text-decoration-line-computed.html] + [Property text-decoration-line value 'underline overline'] + expected: FAIL + + [Property text-decoration-line value 'overline blink'] + expected: FAIL + + [Property text-decoration-line value 'underline line-through blink'] + expected: FAIL + + [Property text-decoration-line value 'underline overline blink'] + expected: FAIL + + [Property text-decoration-line value 'blink'] + expected: FAIL + + [Property text-decoration-line value 'line-through blink'] + expected: FAIL + + [Property text-decoration-line value 'underline'] + expected: FAIL + + [Property text-decoration-line value 'underline line-through'] + expected: FAIL + + [Property text-decoration-line value 'overline line-through blink'] + expected: FAIL + + [Property text-decoration-line value 'line-through'] + expected: FAIL + + [Property text-decoration-line value 'underline blink'] + expected: FAIL + + [Property text-decoration-line value 'overline line-through'] + expected: FAIL + + [Property text-decoration-line value 'spelling-error'] + expected: FAIL + + [Property text-decoration-line value 'underline overline line-through'] + expected: FAIL + + [Property text-decoration-line value 'none'] + expected: FAIL + + [Property text-decoration-line value 'grammar-error'] + expected: FAIL + + [Property text-decoration-line value 'underline overline line-through blink'] + expected: FAIL + + [Property text-decoration-line value 'overline'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini new file mode 100644 index 00000000000..3b22624996d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini @@ -0,0 +1,202 @@ +[text-decoration-line-valid.html] + [e.style['text-decoration-line'\] = "underline overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through blink underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline blink underline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline blink line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through overline underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink line-through underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline underline line-through blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink underline overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through blink underline overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline blink line-through overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through underline overline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through blink overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink underline overline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline line-through blink underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline line-through blink overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline underline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through overline blink underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline line-through overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through blink overline underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink overline underline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline blink overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through underline blink overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline overline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline blink line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline overline blink line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline line-through overline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline line-through blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through overline underline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline underline blink line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline line-through blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline line-through underline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink overline underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through underline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline blink underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through underline overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink line-through underline overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline line-through underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "spelling-error" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink overline line-through underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink line-through overline underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline overline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "none" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline blink line-through underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink overline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline blink overline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink underline line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "grammar-error" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "overline underline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink underline line-through overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "line-through overline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "blink line-through overline" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline blink" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "underline overline line-through blink" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-shorthand.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-shorthand.html.ini new file mode 100644 index 00000000000..add13e507a6 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-shorthand.html.ini @@ -0,0 +1,13 @@ +[text-decoration-shorthand.html] + [e.style['text-decoration'\] = "overline dotted green" should set text-decoration-line] + expected: FAIL + + [e.style['text-decoration'\] = "overline dotted green" should set text-decoration-style] + expected: FAIL + + [e.style['text-decoration'\] = "overline dotted green" should set text-decoration-color] + expected: FAIL + + [e.style['text-decoration'\] = "overline dotted green" should not set unrelated longhands] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-computed.html.ini new file mode 100644 index 00000000000..f07afed67d3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-computed.html.ini @@ -0,0 +1,7 @@ +[text-decoration-skip-ink-computed.html] + [Property text-decoration-skip-ink value 'none'] + expected: FAIL + + [Property text-decoration-skip-ink value 'auto'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-valid.html.ini new file mode 100644 index 00000000000..646f1363e92 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-skip-ink-valid.html.ini @@ -0,0 +1,7 @@ +[text-decoration-skip-ink-valid.html] + [e.style['text-decoration-skip-ink'\] = "none" should set the property value] + expected: FAIL + + [e.style['text-decoration-skip-ink'\] = "auto" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-computed.html.ini new file mode 100644 index 00000000000..42bd6e53c63 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-computed.html.ini @@ -0,0 +1,16 @@ +[text-decoration-style-computed.html] + [Property text-decoration-style value 'wavy'] + expected: FAIL + + [Property text-decoration-style value 'dashed'] + expected: FAIL + + [Property text-decoration-style value 'dotted'] + expected: FAIL + + [Property text-decoration-style value 'double'] + expected: FAIL + + [Property text-decoration-style value 'solid'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini new file mode 100644 index 00000000000..d9e928983c7 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini @@ -0,0 +1,16 @@ +[text-decoration-style-valid.html] + [e.style['text-decoration-style'\] = "wavy" should set the property value] + expected: FAIL + + [e.style['text-decoration-style'\] = "dashed" should set the property value] + expected: FAIL + + [e.style['text-decoration-style'\] = "solid" should set the property value] + expected: FAIL + + [e.style['text-decoration-style'\] = "dotted" should set the property value] + expected: FAIL + + [e.style['text-decoration-style'\] = "double" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini new file mode 100644 index 00000000000..5e22f329f4c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini @@ -0,0 +1,46 @@ +[text-decoration-valid.html] + [e.style['text-decoration'\] = "underline auto" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "none" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "auto" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "underline dashed green" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "10px" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "double overline underline" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "line-through" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "rgba(10, 20, 30, 0.4) dotted" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "solid" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "line-through 20px" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "underline overline line-through red" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "overline 3em" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "currentcolor" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "from-font" should set the property value] + expected: FAIL + + [e.style['text-decoration'\] = "overline green from-font" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-computed.html.ini new file mode 100644 index 00000000000..53a1e2c5050 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-computed.html.ini @@ -0,0 +1,22 @@ +[text-shadow-computed.html] + [Property text-shadow value 'calc(0.5em + 10px) calc(0.5em + 10px) calc(0.5em + 10px)'] + expected: FAIL + + [Property text-shadow value '10px 20px, 30px 40px'] + expected: FAIL + + [Property text-shadow value 'lime 10px 20px 30px, red 40px 50px'] + expected: FAIL + + [Property text-shadow value 'calc(-0.5em + 10px) calc(-0.5em + 10px) calc(-0.5em + 10px)'] + expected: FAIL + + [Property text-shadow value 'red 10px 20px 30px'] + expected: FAIL + + [Property text-shadow value 'none'] + expected: FAIL + + [Property text-shadow value '10px 20px'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-valid.html.ini new file mode 100644 index 00000000000..b5aa4ec7421 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-shadow-valid.html.ini @@ -0,0 +1,31 @@ +[text-shadow-valid.html] + [e.style['text-shadow'\] = "rgb(255, 0, 0) 10px 20px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "lime 10px 20px 30px, blue 40px 50px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "10px 20px 30px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "10px -20px 30px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "-10px 20px 30px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "10px 20px 30px lime" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "10px 20px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "none" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "10px 20px, 30px 40px" should set the property value] + expected: FAIL + + [e.style['text-shadow'\] = "calc(1em + 2px) calc(3em + 4px) calc(5em + 6px)" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-computed.html.ini new file mode 100644 index 00000000000..75fc7dd1634 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-computed.html.ini @@ -0,0 +1,16 @@ +[text-underline-position-computed.html] + [Property text-underline-position value 'under left'] + expected: FAIL + + [Property text-underline-position value 'left'] + expected: FAIL + + [Property text-underline-position value 'under'] + expected: FAIL + + [Property text-underline-position value 'right'] + expected: FAIL + + [Property text-underline-position value 'auto'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-valid.html.ini new file mode 100644 index 00000000000..421e11a73b2 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-underline-position-valid.html.ini @@ -0,0 +1,19 @@ +[text-underline-position-valid.html] + [e.style['text-underline-position'\] = "right under" should set the property value] + expected: FAIL + + [e.style['text-underline-position'\] = "under left" should set the property value] + expected: FAIL + + [e.style['text-underline-position'\] = "auto" should set the property value] + expected: FAIL + + [e.style['text-underline-position'\] = "left" should set the property value] + expected: FAIL + + [e.style['text-underline-position'\] = "right" should set the property value] + expected: FAIL + + [e.style['text-underline-position'\] = "under" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-color.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-color.html.ini new file mode 100644 index 00000000000..81c110041f6 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-color.html.ini @@ -0,0 +1,2 @@ +[text-decoration-color.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-serialization.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-serialization.tentative.html.ini new file mode 100644 index 00000000000..501b9848c78 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-serialization.tentative.html.ini @@ -0,0 +1,4 @@ +[text-decoration-serialization.tentative.html] + [text-decoration shorthand serialization] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-001.html.ini new file mode 100644 index 00000000000..06e7dc44afb --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-003.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-003.html.ini new file mode 100644 index 00000000000..e680841f72d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-003.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-003.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-004.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-004.html.ini new file mode 100644 index 00000000000..368d9d865f0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-004.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-004.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-005.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-005.html.ini new file mode 100644 index 00000000000..9cedd2f8ed3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-005.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-005.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewayslr-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewayslr-001.html.ini new file mode 100644 index 00000000000..48c0a1db13f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewayslr-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-sidewayslr-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewaysrl-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewaysrl-001.html.ini new file mode 100644 index 00000000000..32ca831d030 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-sidewaysrl-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-sidewaysrl-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-001.html.ini new file mode 100644 index 00000000000..139a151b6f4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-upright-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-002.html.ini new file mode 100644 index 00000000000..1b8d015c86e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-upright-002.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-upright-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-001.html.ini new file mode 100644 index 00000000000..7533f547d68 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-vertical-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-002.html.ini new file mode 100644 index 00000000000..33bb585bbb4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink-vertical-002.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-vertical-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink.html.ini new file mode 100644 index 00000000000..15d18defd6e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-skip-ink.html.ini @@ -0,0 +1,7 @@ +[text-decoration-skip-ink.html] + [Body must have text-decoration-skip-ink auto by default.] + expected: FAIL + + [Property text-decoration-skip-ink must support values auto, none and all.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-001.html.ini new file mode 100644 index 00000000000..e1bbdb7fc9d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-subelements-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-002.html.ini new file mode 100644 index 00000000000..e35013fc45e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-subelements-002.html.ini @@ -0,0 +1,2 @@ +[text-decoration-subelements-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-001.html.ini new file mode 100644 index 00000000000..5450301361b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-computed.html.ini new file mode 100644 index 00000000000..ac8d8c84473 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-computed.html.ini @@ -0,0 +1,10 @@ +[text-decoration-thickness-computed.html] + [Property text-decoration-thickness value 'auto'] + expected: FAIL + + [Property text-decoration-thickness value 'from-font'] + expected: FAIL + + [Property text-decoration-thickness value 'calc(10px - 8px)'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-initial.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-initial.html.ini new file mode 100644 index 00000000000..fe8a17fb543 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-initial.html.ini @@ -0,0 +1,4 @@ +[text-decoration-thickness-initial.html] + [Initial value of text-decoration-thickness should be auto] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-linethrough-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-linethrough-001.html.ini new file mode 100644 index 00000000000..10ec51bb16d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-linethrough-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-linethrough-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-overline-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-overline-001.html.ini new file mode 100644 index 00000000000..3b81932352b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-overline-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-overline-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-scroll-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-scroll-001.html.ini new file mode 100644 index 00000000000..84bbbf7b288 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-scroll-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-scroll-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-underline-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-underline-001.html.ini new file mode 100644 index 00000000000..e68d54c347d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-underline-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-underline-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-valid.html.ini new file mode 100644 index 00000000000..e89dadce620 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-valid.html.ini @@ -0,0 +1,25 @@ +[text-decoration-thickness-valid.html] + [e.style['text-decoration-thickness'\] = "from-font" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "2001em" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "-49em" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "auto" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "calc(-50em + 13px)" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "53px" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "calc(40em - 10px)" should set the property value] + expected: FAIL + + [e.style['text-decoration-thickness'\] = "-10px" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-001.html.ini new file mode 100644 index 00000000000..2f48fe751b2 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-vertical-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-002.html.ini new file mode 100644 index 00000000000..1bfad2cf8e8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-vertical-002.html.ini @@ -0,0 +1,2 @@ +[text-decoration-thickness-vertical-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-color-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-color-001.xht.ini new file mode 100644 index 00000000000..fb3630a1996 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-color-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-color-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-001.xht.ini new file mode 100644 index 00000000000..a8cb2188641 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-above-left-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-002.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-002.xht.ini new file mode 100644 index 00000000000..c3439fc6967 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-left-002.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-above-left-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-001.xht.ini new file mode 100644 index 00000000000..7f42f4ceb79 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-above-right-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-002.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-002.xht.ini new file mode 100644 index 00000000000..34b55a1f36e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-above-right-002.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-above-right-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-002.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-002.xht.ini new file mode 100644 index 00000000000..804e236085b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-002.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-below-left-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-002.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-002.xht.ini new file mode 100644 index 00000000000..ecaad11fabd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-002.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-below-right-002.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-002.html.ini new file mode 100644 index 00000000000..af257bbcb45 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-002.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-006.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-006.html.ini new file mode 100644 index 00000000000..ee0a0b0765e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-006.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-006.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-007.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-007.html.ini new file mode 100644 index 00000000000..d40a756fab8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-007.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-007.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-008.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-008.html.ini new file mode 100644 index 00000000000..c7ced0f7d45 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-008.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-008.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-010.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-010.html.ini new file mode 100644 index 00000000000..0aab3f471f4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-010.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-010.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-012.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-012.html.ini new file mode 100644 index 00000000000..62c8d5e86e4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-012.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-012.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-021.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-021.html.ini new file mode 100644 index 00000000000..bbabc0eaafa --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-021.html.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-021.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-filled-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-filled-001.xht.ini new file mode 100644 index 00000000000..6b4ba6e0f2d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-filled-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-filled-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini new file mode 100644 index 00000000000..c6d3f7a8a5c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-none-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-open-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-open-001.xht.ini new file mode 100644 index 00000000000..be3ba8e36c4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-open-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-open-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-shape-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-shape-001.xht.ini new file mode 100644 index 00000000000..ff082e0dfa5 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-shape-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-shape-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-string-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-string-001.xht.ini new file mode 100644 index 00000000000..fa5f16d5983 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-string-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-style-string-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-001.html.ini new file mode 100644 index 00000000000..d6c9b16bea3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-001.html.ini @@ -0,0 +1,2 @@ +[text-underline-offset-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-computed.html.ini new file mode 100644 index 00000000000..bbb179bf26e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-computed.html.ini @@ -0,0 +1,7 @@ +[text-underline-offset-computed.html] + [Property text-underline-offset value 'auto'] + expected: FAIL + + [Property text-underline-offset value 'calc(10px - 8px)'] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-initial.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-initial.html.ini new file mode 100644 index 00000000000..60f2676fa34 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-initial.html.ini @@ -0,0 +1,4 @@ +[text-underline-offset-initial.html] + [Initial value of text-underline-offset] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-scroll-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-scroll-001.html.ini new file mode 100644 index 00000000000..d7d7cb93d2e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-scroll-001.html.ini @@ -0,0 +1,2 @@ +[text-underline-offset-scroll-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-valid.html.ini new file mode 100644 index 00000000000..e7c2e8ec1c8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-underline-offset-valid.html.ini @@ -0,0 +1,22 @@ +[text-underline-offset-valid.html] + [e.style['text-underline-offset'\] = "53px" should set the property value] + expected: FAIL + + [e.style['text-underline-offset'\] = "calc(-13em + 50px)" should set the property value] + expected: FAIL + + [e.style['text-underline-offset'\] = "2001em" should set the property value] + expected: FAIL + + [e.style['text-underline-offset'\] = "auto" should set the property value] + expected: FAIL + + [e.style['text-underline-offset'\] = "-10px" should set the property value] + expected: FAIL + + [e.style['text-underline-offset'\] = "calc(40em - 10px)" should set the property value] + expected: FAIL + + [e.style['text-underline-offset'\] = "-49em" should set the property value] + expected: FAIL + From e3c8597ccb4e230568aed90edc245347c1ab64ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Mon, 2 Mar 2020 15:56:51 +0100 Subject: [PATCH 02/15] Store required font metrics on TextFragment --- components/layout_2020/display_list/mod.rs | 2 +- components/layout_2020/flow/inline.rs | 15 +++++-------- components/layout_2020/fragments.rs | 26 +++++++++++++++++++++- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index e8361ce5e9f..56c9e9610ce 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -87,7 +87,7 @@ impl Fragment { .to_physical(t.parent_style.writing_mode, containing_block) .translate(containing_block.origin.to_vector()); let mut baseline_origin = rect.origin.clone(); - baseline_origin.y += t.ascent; + baseline_origin.y += t.font_metrics.ascent; let glyphs = glyphs(&t.glyphs, baseline_origin); if glyphs.is_empty() { return; diff --git a/components/layout_2020/flow/inline.rs b/components/layout_2020/flow/inline.rs index 9f98174e2cd..05e16457fcb 100644 --- a/components/layout_2020/flow/inline.rs +++ b/components/layout_2020/flow/inline.rs @@ -9,7 +9,7 @@ use crate::flow::FlowLayout; use crate::formatting_contexts::IndependentFormattingContext; use crate::fragments::{ AbsoluteOrFixedPositionedFragment, AnonymousFragment, BoxFragment, CollapsedBlockMargins, - DebugId, Fragment, TextFragment, + DebugId, FontMetrics, Fragment, TextFragment, }; use crate::geom::flow_relative::{Rect, Sides, Vec2}; use crate::positioned::{ @@ -631,8 +631,7 @@ fn layout_atomic( } struct BreakAndShapeResult { - font_ascent: Au, - font_line_gap: Au, + font_metrics: FontMetrics, font_key: FontInstanceKey, runs: Vec, break_at_start: bool, @@ -699,8 +698,7 @@ impl TextRun { ); BreakAndShapeResult { - font_ascent: font.metrics.ascent, - font_line_gap: font.metrics.line_gap, + font_metrics: (&font.metrics).into(), font_key: font.font_key, runs, break_at_start, @@ -712,8 +710,7 @@ impl TextRun { use style::values::generics::text::LineHeight; let BreakAndShapeResult { - font_ascent, - font_line_gap, + font_metrics, font_key, runs, break_at_start: _, @@ -750,7 +747,7 @@ impl TextRun { } } let line_height = match self.parent_style.get_inherited_text().line_height { - LineHeight::Normal => font_line_gap.into(), + LineHeight::Normal => font_metrics.line_gap, LineHeight::Number(n) => font_size * n.0, LineHeight::Length(l) => l.0, }; @@ -775,7 +772,7 @@ impl TextRun { debug_id: DebugId::new(), parent_style: self.parent_style.clone(), rect, - ascent: font_ascent.into(), + font_metrics, font_key, glyphs, })); diff --git a/components/layout_2020/fragments.rs b/components/layout_2020/fragments.rs index 3be702bbf84..5a2a59c8b53 100644 --- a/components/layout_2020/fragments.rs +++ b/components/layout_2020/fragments.rs @@ -7,6 +7,7 @@ use crate::geom::{PhysicalPoint, PhysicalRect}; #[cfg(debug_assertions)] use crate::layout_debug; use crate::positioned::HoistedFragmentId; +use gfx::font::FontMetrics as GfxFontMetrics; use gfx::text::glyph::GlyphStore; use gfx_traits::print_tree::PrintTree; #[cfg(not(debug_assertions))] @@ -86,6 +87,29 @@ pub(crate) struct AnonymousFragment { pub scrollable_overflow: PhysicalRect, } +#[derive(Clone, Copy, Serialize)] +pub(crate) struct FontMetrics { + pub ascent: Length, + pub line_gap: Length, + pub underline_offset: Length, + pub underline_size: Length, + pub strikeout_offset: Length, + pub strikeout_size: Length, +} + +impl From<&GfxFontMetrics> for FontMetrics { + fn from(metrics: &GfxFontMetrics) -> FontMetrics { + FontMetrics { + ascent: metrics.ascent.into(), + line_gap: metrics.line_gap.into(), + underline_offset: metrics.underline_offset.into(), + underline_size: metrics.underline_size.into(), + strikeout_offset: metrics.strikeout_offset.into(), + strikeout_size: metrics.strikeout_size.into(), + } + } +} + #[derive(Serialize)] pub(crate) struct TextFragment { pub debug_id: DebugId, @@ -93,7 +117,7 @@ pub(crate) struct TextFragment { #[serde(skip_serializing)] pub parent_style: ServoArc, pub rect: Rect, - pub ascent: Length, + pub font_metrics: FontMetrics, #[serde(skip_serializing)] pub font_key: FontInstanceKey, pub glyphs: Vec>, From e3b97730feb80d2974f6454ac32fce7df0fdf360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Mon, 2 Mar 2020 18:26:52 +0100 Subject: [PATCH 03/15] Enable text-decoration on layout 2020 --- components/style/properties/longhands/text.mako.rs | 1 - components/style/properties/shorthands/text.mako.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/style/properties/longhands/text.mako.rs b/components/style/properties/longhands/text.mako.rs index b77e17dd6b7..d80ee1eb10a 100644 --- a/components/style/properties/longhands/text.mako.rs +++ b/components/style/properties/longhands/text.mako.rs @@ -32,7 +32,6 @@ ${helpers.predefined_type( "TextDecorationLine", "specified::TextDecorationLine::none()", engines="gecko servo-2013 servo-2020", - servo_2020_pref="layout.2020.unimplemented", initial_specified_value="specified::TextDecorationLine::none()", animation_value_type="discrete", spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line", diff --git a/components/style/properties/shorthands/text.mako.rs b/components/style/properties/shorthands/text.mako.rs index 79f7f33d850..defbfaaf3c0 100644 --- a/components/style/properties/shorthands/text.mako.rs +++ b/components/style/properties/shorthands/text.mako.rs @@ -5,7 +5,7 @@ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="text-decoration" - engines="gecko servo-2013" + engines="gecko servo-2013 servo-2020" flags="SHORTHAND_IN_GETCS" sub_properties="text-decoration-line ${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}" From 48517bd61a07c0fe3ff5fbbed15a30e3aa4d965e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Mon, 2 Mar 2020 18:00:40 +0100 Subject: [PATCH 04/15] Render text-decoration: underline on layout 2020 --- components/layout_2020/display_list/mod.rs | 90 ++++++++++++++++------ 1 file changed, 65 insertions(+), 25 deletions(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 56c9e9610ce..30ff68e3e1a 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -4,7 +4,7 @@ use crate::context::LayoutContext; use crate::display_list::conversions::ToWebRender; -use crate::fragments::{BoxFragment, Fragment}; +use crate::fragments::{BoxFragment, Fragment, TextFragment}; use crate::geom::{PhysicalPoint, PhysicalRect}; use crate::replaced::IntrinsicSizes; use embedder_traits::Cursor; @@ -80,30 +80,6 @@ impl Fragment { Fragment::Box(b) => BuilderForBoxFragment::new(b, containing_block).build(builder), Fragment::AbsoluteOrFixedPositioned(_) => {}, Fragment::Anonymous(_) => {}, - Fragment::Text(t) => { - builder.is_contentful = true; - let rect = t - .rect - .to_physical(t.parent_style.writing_mode, containing_block) - .translate(containing_block.origin.to_vector()); - let mut baseline_origin = rect.origin.clone(); - baseline_origin.y += t.font_metrics.ascent; - let glyphs = glyphs(&t.glyphs, baseline_origin); - if glyphs.is_empty() { - return; - } - let mut common = builder.common_properties(rect.clone().to_webrender()); - common.hit_info = hit_info(&t.parent_style, t.tag, Cursor::Text); - let color = t.parent_style.clone_color(); - builder.wr.push_text( - &common, - rect.to_webrender(), - &glyphs, - t.font_key, - rgba(color), - None, - ); - }, Fragment::Image(i) => { builder.is_contentful = true; let rect = i @@ -120,8 +96,72 @@ impl Fragment { wr::ColorF::WHITE, ); }, + Fragment::Text(t) => { + self.build_display_list_for_text_fragment(t, builder, containing_block) + }, } } + + fn build_display_list_for_text_fragment( + &self, + fragment: &TextFragment, + builder: &mut DisplayListBuilder, + containing_block: &PhysicalRect, + ) { + // NB: The order of painting text components (CSS Text Decoration Module Level 3) is: + // shadows, underline, overline, text, text-emphasis, and then line-through. + + builder.is_contentful = true; + + let rect = fragment + .rect + .to_physical(fragment.parent_style.writing_mode, containing_block) + .translate(containing_block.origin.to_vector()); + let mut baseline_origin = rect.origin.clone(); + baseline_origin.y += fragment.font_metrics.ascent; + let glyphs = glyphs(&fragment.glyphs, baseline_origin); + if glyphs.is_empty() { + return; + } + + let mut common = builder.common_properties(rect.clone().to_webrender()); + common.hit_info = hit_info(&fragment.parent_style, fragment.tag, Cursor::Text); + + let color = fragment.parent_style.clone_color(); + + let text_decorations = fragment + .parent_style + .get_inherited_text() + .text_decorations_in_effect; + let font_metrics = &fragment.font_metrics; + + // Underline. + if text_decorations.underline { + let mut rect = rect; + rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.underline_offset; + rect.size.height = font_metrics.underline_size; + let rect = rect.to_webrender(); + let wavy_line_thickness = (0.33 * rect.size.height).ceil(); + builder.wr.push_line( + &common, + &rect, + wavy_line_thickness, + wr::LineOrientation::Horizontal, + &rgba(color), + wr::LineStyle::Solid, + ); + } + + // Text. + builder.wr.push_text( + &common, + rect.to_webrender(), + &glyphs, + fragment.font_key, + rgba(color), + None, + ); + } } struct BuilderForBoxFragment<'a> { From 4fd5484e1a914a9a3d2efbb5218d56b50f087c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Tue, 3 Mar 2020 11:19:38 +0100 Subject: [PATCH 05/15] Render text-decoration: overline on layout 2020 --- components/layout_2020/display_list/mod.rs | 36 ++++++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 30ff68e3e1a..49d6f4f1643 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -140,16 +140,14 @@ impl Fragment { let mut rect = rect; rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.underline_offset; rect.size.height = font_metrics.underline_size; - let rect = rect.to_webrender(); - let wavy_line_thickness = (0.33 * rect.size.height).ceil(); - builder.wr.push_line( - &common, - &rect, - wavy_line_thickness, - wr::LineOrientation::Horizontal, - &rgba(color), - wr::LineStyle::Solid, - ); + self.build_display_list_for_text_decoration(builder, &rect, color); + } + + // Overline. + if text_decorations.overline { + let mut rect = rect; + rect.size.height = font_metrics.underline_size; + self.build_display_list_for_text_decoration(builder, &rect, color); } // Text. @@ -162,6 +160,24 @@ impl Fragment { None, ); } + + fn build_display_list_for_text_decoration( + &self, + builder: &mut DisplayListBuilder, + rect: &PhysicalRect, + color: cssparser::RGBA, + ) { + let rect = rect.to_webrender(); + let wavy_line_thickness = (0.33 * rect.size.height).ceil(); + builder.wr.push_line( + &builder.common_properties(rect), + &rect, + wavy_line_thickness, + wr::LineOrientation::Horizontal, + &rgba(color), + wr::LineStyle::Solid, + ); + } } struct BuilderForBoxFragment<'a> { From c87a4dd788b46daf04589c903e1b2afe45b72831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Tue, 3 Mar 2020 11:27:35 +0100 Subject: [PATCH 06/15] Remove unnecessary fragment rect clone --- components/layout_2020/display_list/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 49d6f4f1643..871f23de19a 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -124,7 +124,7 @@ impl Fragment { return; } - let mut common = builder.common_properties(rect.clone().to_webrender()); + let mut common = builder.common_properties(rect.to_webrender()); common.hit_info = hit_info(&fragment.parent_style, fragment.tag, Cursor::Text); let color = fragment.parent_style.clone_color(); From 107af9e769d977bddfa7896b3f5c5074e44b5bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Tue, 3 Mar 2020 12:12:10 +0100 Subject: [PATCH 07/15] Render text-decoration: line-through on layout 2020 --- components/layout_2020/display_list/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 871f23de19a..404d09ddeec 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -159,6 +159,15 @@ impl Fragment { rgba(color), None, ); + + // Line-through. + if text_decorations.line_through { + let mut rect = rect; + rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.strikeout_offset; + // XXX(ferjm) This does not work on MacOS #942 + rect.size.height = font_metrics.strikeout_size; + self.build_display_list_for_text_decoration(builder, &rect, color); + } } fn build_display_list_for_text_decoration( From 928bd0d1d280abf058057ce28b28b0c71033d538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Wed, 4 Mar 2020 11:33:07 +0100 Subject: [PATCH 08/15] Add support for text-decoration-color --- components/layout_2020/display_list/mod.rs | 14 +++++++++----- components/style/properties/longhands/text.mako.rs | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index 404d09ddeec..a6d18bcb8ff 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -128,7 +128,6 @@ impl Fragment { common.hit_info = hit_info(&fragment.parent_style, fragment.tag, Cursor::Text); let color = fragment.parent_style.clone_color(); - let text_decorations = fragment .parent_style .get_inherited_text() @@ -140,14 +139,14 @@ impl Fragment { let mut rect = rect; rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.underline_offset; rect.size.height = font_metrics.underline_size; - self.build_display_list_for_text_decoration(builder, &rect, color); + self.build_display_list_for_text_decoration(fragment, builder, &rect, color); } // Overline. if text_decorations.overline { let mut rect = rect; rect.size.height = font_metrics.underline_size; - self.build_display_list_for_text_decoration(builder, &rect, color); + self.build_display_list_for_text_decoration(fragment, builder, &rect, color); } // Text. @@ -166,24 +165,29 @@ impl Fragment { rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.strikeout_offset; // XXX(ferjm) This does not work on MacOS #942 rect.size.height = font_metrics.strikeout_size; - self.build_display_list_for_text_decoration(builder, &rect, color); + self.build_display_list_for_text_decoration(fragment, builder, &rect, color); } } fn build_display_list_for_text_decoration( &self, + fragment: &TextFragment, builder: &mut DisplayListBuilder, rect: &PhysicalRect, color: cssparser::RGBA, ) { let rect = rect.to_webrender(); let wavy_line_thickness = (0.33 * rect.size.height).ceil(); + let text_decoration_color = fragment + .parent_style + .clone_text_decoration_color() + .to_rgba(color); builder.wr.push_line( &builder.common_properties(rect), &rect, wavy_line_thickness, wr::LineOrientation::Horizontal, - &rgba(color), + &rgba(text_decoration_color), wr::LineStyle::Solid, ); } diff --git a/components/style/properties/longhands/text.mako.rs b/components/style/properties/longhands/text.mako.rs index d80ee1eb10a..80b62b5478a 100644 --- a/components/style/properties/longhands/text.mako.rs +++ b/components/style/properties/longhands/text.mako.rs @@ -50,7 +50,7 @@ ${helpers.predefined_type( "text-decoration-color", "Color", "computed_value::T::currentcolor()", - engines="gecko", + engines="gecko servo-2020", initial_specified_value="specified::Color::currentcolor()", animation_value_type="AnimatedColor", ignored_when_colors_disabled=True, From 689b413bdebc0d09b105c0b254171f1b1520f449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Wed, 4 Mar 2020 12:35:47 +0100 Subject: [PATCH 09/15] Add support for text-decoration-style --- components/layout_2020/display_list/conversions.rs | 14 ++++++++++++++ components/layout_2020/display_list/mod.rs | 9 +++++++-- components/style/properties/longhands/text.mako.rs | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/components/layout_2020/display_list/conversions.rs b/components/layout_2020/display_list/conversions.rs index 410797796dd..0b6dff8506c 100644 --- a/components/layout_2020/display_list/conversions.rs +++ b/components/layout_2020/display_list/conversions.rs @@ -4,6 +4,7 @@ use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize}; use style::computed_values::mix_blend_mode::T as ComputedMixBlendMode; +use style::computed_values::text_decoration_style::T as ComputedTextDecorationStyle; use style::computed_values::transform_style::T as ComputedTransformStyle; use style::values::computed::Filter as ComputedFilter; use style::values::computed::Length; @@ -100,3 +101,16 @@ impl ToWebRender for PhysicalSides { ) } } + +impl ToWebRender for ComputedTextDecorationStyle { + type Type = webrender_api::LineStyle; + fn to_webrender(&self) -> Self::Type { + match *self { + ComputedTextDecorationStyle::Solid => wr::LineStyle::Solid, + ComputedTextDecorationStyle::Dotted => wr::LineStyle::Dotted, + ComputedTextDecorationStyle::Dashed => wr::LineStyle::Dashed, + ComputedTextDecorationStyle::Wavy => wr::LineStyle::Wavy, + _ => wr::LineStyle::Solid, + } + } +} diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index a6d18bcb8ff..f85d0308d72 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -13,9 +13,9 @@ use gfx::text::glyph::GlyphStore; use mitochondria::OnceCell; use net_traits::image_cache::UsePlaceholder; use std::sync::Arc; +use style::computed_values::text_decoration_style::T as ComputedTextDecorationStyle; use style::dom::OpaqueNode; use style::properties::ComputedValues; - use style::values::computed::{BorderStyle, Length, LengthPercentage}; use style::values::specified::ui::CursorKind; use webrender_api::{self as wr, units}; @@ -182,14 +182,19 @@ impl Fragment { .parent_style .clone_text_decoration_color() .to_rgba(color); + let text_decoration_style = fragment.parent_style.clone_text_decoration_style(); + if text_decoration_style == ComputedTextDecorationStyle::MozNone { + return; + } builder.wr.push_line( &builder.common_properties(rect), &rect, wavy_line_thickness, wr::LineOrientation::Horizontal, &rgba(text_decoration_color), - wr::LineStyle::Solid, + text_decoration_style.to_webrender(), ); + // XXX(ferjm) support text-decoration-style: double } } diff --git a/components/style/properties/longhands/text.mako.rs b/components/style/properties/longhands/text.mako.rs index 80b62b5478a..1912bc28e3b 100644 --- a/components/style/properties/longhands/text.mako.rs +++ b/components/style/properties/longhands/text.mako.rs @@ -41,7 +41,7 @@ ${helpers.predefined_type( ${helpers.single_keyword( "text-decoration-style", "solid double dotted dashed wavy -moz-none", - engines="gecko", + engines="gecko servo-2020", animation_value_type="discrete", spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style", )} From 83fc9943d319105664ca8845ca9db7f47e105854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Wed, 4 Mar 2020 16:52:49 +0100 Subject: [PATCH 10/15] Do not use buggy text_decorations_in_effect --- components/layout_2020/display_list/mod.rs | 20 +++++++++++++------- components/layout_2020/flow/inline.rs | 14 ++++++++++++++ components/layout_2020/fragments.rs | 20 ++++++++++++++++++++ components/style/values/specified/text.rs | 2 +- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index f85d0308d72..ebdfd07a4fa 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -17,6 +17,7 @@ use style::computed_values::text_decoration_style::T as ComputedTextDecorationSt use style::dom::OpaqueNode; use style::properties::ComputedValues; use style::values::computed::{BorderStyle, Length, LengthPercentage}; +use style::values::specified::text::TextDecorationLine; use style::values::specified::ui::CursorKind; use webrender_api::{self as wr, units}; @@ -128,14 +129,13 @@ impl Fragment { common.hit_info = hit_info(&fragment.parent_style, fragment.tag, Cursor::Text); let color = fragment.parent_style.clone_color(); - let text_decorations = fragment - .parent_style - .get_inherited_text() - .text_decorations_in_effect; let font_metrics = &fragment.font_metrics; // Underline. - if text_decorations.underline { + if fragment + .text_decorations_in_effect + .contains(TextDecorationLine::UNDERLINE) + { let mut rect = rect; rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.underline_offset; rect.size.height = font_metrics.underline_size; @@ -143,7 +143,10 @@ impl Fragment { } // Overline. - if text_decorations.overline { + if fragment + .text_decorations_in_effect + .contains(TextDecorationLine::OVERLINE) + { let mut rect = rect; rect.size.height = font_metrics.underline_size; self.build_display_list_for_text_decoration(fragment, builder, &rect, color); @@ -160,7 +163,10 @@ impl Fragment { ); // Line-through. - if text_decorations.line_through { + if fragment + .text_decorations_in_effect + .contains(TextDecorationLine::LINE_THROUGH) + { let mut rect = rect; rect.origin.y = rect.origin.y + font_metrics.ascent - font_metrics.strikeout_offset; // XXX(ferjm) This does not work on MacOS #942 diff --git a/components/layout_2020/flow/inline.rs b/components/layout_2020/flow/inline.rs index 05e16457fcb..acd6795d639 100644 --- a/components/layout_2020/flow/inline.rs +++ b/components/layout_2020/flow/inline.rs @@ -26,6 +26,7 @@ use style::dom::OpaqueNode; use style::properties::ComputedValues; use style::values::computed::{Length, LengthPercentage, Percentage}; use style::values::specified::text::TextAlignKeyword; +use style::values::specified::text::TextDecorationLine; use style::Zero; use webrender_api::FontInstanceKey; @@ -385,6 +386,18 @@ impl Lines { block: line_block_size, }; self.next_line_block_position += size.block; + + // From https://drafts.csswg.org/css-text-decor/#line-decoration + // "When specified on or propagated to an inline box, + // that box becomes a decorating box for that decoration, + // applying the decoration to all its fragments..." + let text_decoration_line = containing_block.style.clone_text_decoration_line(); + if text_decoration_line != TextDecorationLine::NONE { + for fragment in &mut line_contents { + fragment.set_text_decorations_in_effect(text_decoration_line); + } + } + self.fragments .push(Fragment::Anonymous(AnonymousFragment::new( Rect { start_corner, size }, @@ -775,6 +788,7 @@ impl TextRun { font_metrics, font_key, glyphs, + text_decorations_in_effect: TextDecorationLine::NONE, })); if runs.is_empty() { break; diff --git a/components/layout_2020/fragments.rs b/components/layout_2020/fragments.rs index 5a2a59c8b53..cfe2a913847 100644 --- a/components/layout_2020/fragments.rs +++ b/components/layout_2020/fragments.rs @@ -19,6 +19,7 @@ use style::dom::OpaqueNode; use style::logical_geometry::WritingMode; use style::properties::ComputedValues; use style::values::computed::Length; +use style::values::specified::text::TextDecorationLine; use style::Zero; use webrender_api::{FontInstanceKey, ImageKey}; @@ -121,6 +122,8 @@ pub(crate) struct TextFragment { #[serde(skip_serializing)] pub font_key: FontInstanceKey, pub glyphs: Vec>, + /// A flag that represents the _used_ value of the text-decoration property. + pub text_decorations_in_effect: TextDecorationLine, } #[derive(Serialize)] @@ -192,6 +195,23 @@ impl AbsoluteOrFixedPositionedFragment { pub fn print(&self, tree: &mut PrintTree) { tree.add_item(format!("AbsoluteOrFixedPositionedFragment({:?})", self.0)); } + + pub fn set_text_decorations_in_effect(&mut self, text_decorations: TextDecorationLine) { + match self { + Fragment::Text(fragment) => fragment.text_decorations_in_effect = text_decorations, + Fragment::Box(fragment) => { + for child in &mut fragment.children { + child.set_text_decorations_in_effect(text_decorations); + } + }, + Fragment::Anonymous(fragment) => { + for child in &mut fragment.children { + child.set_text_decorations_in_effect(text_decorations); + } + }, + _ => (), + } + } } impl AnonymousFragment { diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs index 438b926802f..e54fbeeb2fb 100644 --- a/components/style/values/specified/text.rs +++ b/components/style/values/specified/text.rs @@ -217,7 +217,7 @@ impl ToComputedValue for TextOverflow { } bitflags! { - #[derive(MallocSizeOf, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)] + #[derive(MallocSizeOf, Serialize, SpecifiedValueInfo, ToComputedValue, ToResolvedValue, ToShmem)] #[value_info(other_values = "none,underline,overline,line-through,blink")] #[repr(C)] /// Specified keyword values for the text-decoration-line property. From 17948f3b3936b58528b1e101481cee5df52374f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Wed, 11 Mar 2020 17:11:05 +0100 Subject: [PATCH 11/15] Propagate text decoration where needed --- components/layout_2020/display_list/mod.rs | 6 +-- components/layout_2020/flow/construct.rs | 42 +++++++++++++++---- components/layout_2020/flow/float.rs | 3 ++ components/layout_2020/flow/inline.rs | 31 ++++++++------ components/layout_2020/flow/root.rs | 2 + components/layout_2020/formatting_contexts.rs | 3 ++ components/layout_2020/fragments.rs | 19 +-------- components/layout_2020/positioned.rs | 3 ++ components/style/values/specified/text.rs | 6 +++ 9 files changed, 75 insertions(+), 40 deletions(-) diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index ebdfd07a4fa..46c31934831 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -133,7 +133,7 @@ impl Fragment { // Underline. if fragment - .text_decorations_in_effect + .text_decoration_line .contains(TextDecorationLine::UNDERLINE) { let mut rect = rect; @@ -144,7 +144,7 @@ impl Fragment { // Overline. if fragment - .text_decorations_in_effect + .text_decoration_line .contains(TextDecorationLine::OVERLINE) { let mut rect = rect; @@ -164,7 +164,7 @@ impl Fragment { // Line-through. if fragment - .text_decorations_in_effect + .text_decoration_line .contains(TextDecorationLine::LINE_THROUGH) { let mut rect = rect; diff --git a/components/layout_2020/flow/construct.rs b/components/layout_2020/flow/construct.rs index 0bf0b5c83ad..fe9465f775e 100644 --- a/components/layout_2020/flow/construct.rs +++ b/components/layout_2020/flow/construct.rs @@ -19,6 +19,7 @@ use servo_arc::Arc; use std::convert::{TryFrom, TryInto}; use style::properties::ComputedValues; use style::selector_parser::PseudoElement; +use style::values::specified::text::TextDecorationLine; impl BlockFormattingContext { pub fn construct<'dom>( @@ -27,9 +28,16 @@ impl BlockFormattingContext { style: &Arc, contents: NonReplacedContents, content_sizes: ContentSizesRequest, + propagated_text_decoration_line: TextDecorationLine, ) -> (Self, BoxContentSizes) { - let (contents, contains_floats, inline_content_sizes) = - BlockContainer::construct(context, node, style, contents, content_sizes); + let (contents, contains_floats, inline_content_sizes) = BlockContainer::construct( + context, + node, + style, + contents, + content_sizes, + propagated_text_decoration_line, + ); // FIXME: add contribution to `inline_content_sizes` of floats in this formatting context // https://dbaron.org/css/intrinsic/#intrinsic let bfc = Self { @@ -52,6 +60,7 @@ enum BlockLevelCreator { Independent { display_inside: DisplayInside, contents: Contents, + propagated_text_decoration_line: TextDecorationLine, }, OutOfFlowAbsolutelyPositionedBox { display_inside: DisplayInside, @@ -72,7 +81,7 @@ enum BlockLevelCreator { /// Deferring allows using rayon’s `into_par_iter`. enum IntermediateBlockContainer { InlineFormattingContext(InlineFormattingContext), - Deferred(NonReplacedContents), + Deferred(NonReplacedContents, TextDecorationLine), } /// A builder for a block container. @@ -140,13 +149,16 @@ impl BlockContainer { block_container_style: &Arc, contents: NonReplacedContents, content_sizes: ContentSizesRequest, + propagated_text_decoration_line: TextDecorationLine, ) -> (BlockContainer, ContainsFloats, BoxContentSizes) { + let text_decoration_line = + propagated_text_decoration_line | block_container_style.clone_text_decoration_line(); let mut builder = BlockContainerBuilder { context, root, block_container_style, block_level_boxes: Vec::new(), - ongoing_inline_formatting_context: InlineFormattingContext::default(), + ongoing_inline_formatting_context: InlineFormattingContext::new(text_decoration_line), ongoing_inline_boxes_stack: Vec::new(), anonymous_style: None, contains_floats: ContainsFloats::No, @@ -439,6 +451,8 @@ where display_inside, contents, ContentSizesRequest::inline_if(!style.inline_size_is_length()), + // Text decorations are not propagated to atomic inline-level descendants. + TextDecorationLine::NONE, ), )) }; @@ -494,6 +508,9 @@ where .push(ArcRefCell::new(fragmented_inline)); } + let propagated_text_decoration_line = + self.ongoing_inline_formatting_context.text_decoration_line; + // We found a block level element, so the ongoing inline formatting // context needs to be ended. self.end_ongoing_inline_formatting_context(); @@ -501,11 +518,12 @@ where let kind = match contents.try_into() { Ok(contents) => match display_inside { DisplayInside::Flow => BlockLevelCreator::SameFormattingContextBlock( - IntermediateBlockContainer::Deferred(contents), + IntermediateBlockContainer::Deferred(contents, propagated_text_decoration_line), ), _ => BlockLevelCreator::Independent { display_inside, contents: contents.into(), + propagated_text_decoration_line, }, }, Err(contents) => { @@ -513,6 +531,7 @@ where BlockLevelCreator::Independent { display_inside, contents, + propagated_text_decoration_line, } }, }; @@ -680,6 +699,7 @@ where BlockLevelCreator::Independent { display_inside, contents, + propagated_text_decoration_line, } => { let content_sizes = ContentSizesRequest::inline_if( max_assign_in_flow_outer_content_sizes_to.is_some() && @@ -692,6 +712,7 @@ where display_inside, contents, content_sizes, + propagated_text_decoration_line, ); if let Some(to) = max_assign_in_flow_outer_content_sizes_to { to.max_assign(&contents.content_sizes.outer_inline(&contents.style)) @@ -742,8 +763,15 @@ impl IntermediateBlockContainer { content_sizes: ContentSizesRequest, ) -> (BlockContainer, ContainsFloats, BoxContentSizes) { match self { - IntermediateBlockContainer::Deferred(contents) => { - BlockContainer::construct(context, node, style, contents, content_sizes) + IntermediateBlockContainer::Deferred(contents, propagated_text_decoration_line) => { + BlockContainer::construct( + context, + node, + style, + contents, + content_sizes, + propagated_text_decoration_line, + ) }, IntermediateBlockContainer::InlineFormattingContext(ifc) => { let content_sizes = content_sizes.compute(|| ifc.inline_content_sizes(context)); diff --git a/components/layout_2020/flow/float.rs b/components/layout_2020/flow/float.rs index 5b34392ac8c..4a647f23071 100644 --- a/components/layout_2020/flow/float.rs +++ b/components/layout_2020/flow/float.rs @@ -9,6 +9,7 @@ use crate::sizing::ContentSizesRequest; use crate::style_ext::{ComputedValuesExt, DisplayInside}; use servo_arc::Arc; use style::properties::ComputedValues; +use style::values::specified::text::TextDecorationLine; #[derive(Debug, Serialize)] pub(crate) struct FloatBox { @@ -43,6 +44,8 @@ impl FloatBox { display_inside, contents, content_sizes, + // Text decorations are not propagated to any out-of-flow descendants + TextDecorationLine::NONE, ), } } diff --git a/components/layout_2020/flow/inline.rs b/components/layout_2020/flow/inline.rs index acd6795d639..6b4faceea75 100644 --- a/components/layout_2020/flow/inline.rs +++ b/components/layout_2020/flow/inline.rs @@ -33,6 +33,7 @@ use webrender_api::FontInstanceKey; #[derive(Debug, Default, Serialize)] pub(crate) struct InlineFormattingContext { pub(super) inline_level_boxes: Vec>, + pub(super) text_decoration_line: TextDecorationLine, } #[derive(Debug, Serialize)] @@ -69,6 +70,11 @@ struct InlineNestingLevelState<'box_tree> { inline_start: Length, max_block_size_of_fragments_so_far: Length, positioning_context: Option, + /// Indicates whether this nesting level have text decorations in effect. + /// From https://drafts.csswg.org/css-text-decor/#line-decoration + // "When specified on or propagated to a block container that establishes + // an IFC..." + text_decoration_line: TextDecorationLine, } struct PartialInlineBoxFragment<'box_tree> { @@ -123,6 +129,13 @@ struct Lines { } impl InlineFormattingContext { + pub(super) fn new(text_decoration_line: TextDecorationLine) -> InlineFormattingContext { + InlineFormattingContext { + inline_level_boxes: Default::default(), + text_decoration_line, + } + } + // This works on an already-constructed `InlineFormattingContext`, // Which would have to change if/when // `BlockContainer::construct` parallelize their construction. @@ -257,8 +270,10 @@ impl InlineFormattingContext { inline_start: Length::zero(), max_block_size_of_fragments_so_far: Length::zero(), positioning_context: None, + text_decoration_line: self.text_decoration_line, }, }; + loop { if let Some(child) = ifc.current_nesting_level.remaining_boxes.next() { match &*child.borrow() { @@ -387,17 +402,6 @@ impl Lines { }; self.next_line_block_position += size.block; - // From https://drafts.csswg.org/css-text-decor/#line-decoration - // "When specified on or propagated to an inline box, - // that box becomes a decorating box for that decoration, - // applying the decoration to all its fragments..." - let text_decoration_line = containing_block.style.clone_text_decoration_line(); - if text_decoration_line != TextDecorationLine::NONE { - for fragment in &mut line_contents { - fragment.set_text_decorations_in_effect(text_decoration_line); - } - } - self.fragments .push(Fragment::Anonymous(AnonymousFragment::new( Rect { start_corner, size }, @@ -436,6 +440,8 @@ impl InlineBox { start_corner += &relative_adjustement(&style, ifc.containing_block) } let positioning_context = PositioningContext::new_for_style(&style); + let text_decoration_line = + ifc.current_nesting_level.text_decoration_line | style.clone_text_decoration_line(); PartialInlineBoxFragment { tag: self.tag, style, @@ -454,6 +460,7 @@ impl InlineBox { inline_start: ifc.inline_position, max_block_size_of_fragments_so_far: Length::zero(), positioning_context, + text_decoration_line: text_decoration_line, }, ), } @@ -788,7 +795,7 @@ impl TextRun { font_metrics, font_key, glyphs, - text_decorations_in_effect: TextDecorationLine::NONE, + text_decoration_line: ifc.current_nesting_level.text_decoration_line, })); if runs.is_empty() { break; diff --git a/components/layout_2020/flow/root.rs b/components/layout_2020/flow/root.rs index 6a8be578630..23f63647977 100644 --- a/components/layout_2020/flow/root.rs +++ b/components/layout_2020/flow/root.rs @@ -104,6 +104,7 @@ fn construct_for_root_element<'dom>( ))], ) } else { + let propagated_text_decoration_line = style.clone_text_decoration_line(); ( ContainsFloats::No, vec![ArcRefCell::new(BlockLevelBox::Independent( @@ -114,6 +115,7 @@ fn construct_for_root_element<'dom>( display_inside, contents, ContentSizesRequest::None, + propagated_text_decoration_line, ), ))], ) diff --git a/components/layout_2020/formatting_contexts.rs b/components/layout_2020/formatting_contexts.rs index 100ef4a7c4b..9e73a17891e 100644 --- a/components/layout_2020/formatting_contexts.rs +++ b/components/layout_2020/formatting_contexts.rs @@ -16,6 +16,7 @@ use std::convert::TryInto; use style::dom::OpaqueNode; use style::properties::ComputedValues; use style::values::computed::Length; +use style::values::specified::text::TextDecorationLine; /// https://drafts.csswg.org/css-display/#independent-formatting-context #[derive(Debug, Serialize)] @@ -62,6 +63,7 @@ impl IndependentFormattingContext { display_inside: DisplayInside, contents: Contents, content_sizes: ContentSizesRequest, + propagated_text_decoration_line: TextDecorationLine, ) -> Self { match contents.try_into() { Ok(non_replaced) => match display_inside { @@ -72,6 +74,7 @@ impl IndependentFormattingContext { &style, non_replaced, content_sizes, + propagated_text_decoration_line, ); Self { tag: node.as_opaque(), diff --git a/components/layout_2020/fragments.rs b/components/layout_2020/fragments.rs index cfe2a913847..a42aa5c0c17 100644 --- a/components/layout_2020/fragments.rs +++ b/components/layout_2020/fragments.rs @@ -123,7 +123,7 @@ pub(crate) struct TextFragment { pub font_key: FontInstanceKey, pub glyphs: Vec>, /// A flag that represents the _used_ value of the text-decoration property. - pub text_decorations_in_effect: TextDecorationLine, + pub text_decoration_line: TextDecorationLine, } #[derive(Serialize)] @@ -195,23 +195,6 @@ impl AbsoluteOrFixedPositionedFragment { pub fn print(&self, tree: &mut PrintTree) { tree.add_item(format!("AbsoluteOrFixedPositionedFragment({:?})", self.0)); } - - pub fn set_text_decorations_in_effect(&mut self, text_decorations: TextDecorationLine) { - match self { - Fragment::Text(fragment) => fragment.text_decorations_in_effect = text_decorations, - Fragment::Box(fragment) => { - for child in &mut fragment.children { - child.set_text_decorations_in_effect(text_decorations); - } - }, - Fragment::Anonymous(fragment) => { - for child in &mut fragment.children { - child.set_text_decorations_in_effect(text_decorations); - } - }, - _ => (), - } - } } impl AnonymousFragment { diff --git a/components/layout_2020/positioned.rs b/components/layout_2020/positioned.rs index a0216ec296c..4bedd12925d 100644 --- a/components/layout_2020/positioned.rs +++ b/components/layout_2020/positioned.rs @@ -17,6 +17,7 @@ use std::sync::atomic::{AtomicUsize, Ordering}; use style::computed_values::position::T as Position; use style::properties::ComputedValues; use style::values::computed::{Length, LengthOrAuto, LengthPercentage, LengthPercentageOrAuto}; +use style::values::specified::text::TextDecorationLine; use style::Zero; static HOISTED_FRAGMENT_ID_COUNTER: AtomicUsize = AtomicUsize::new(0); @@ -104,6 +105,8 @@ impl AbsolutelyPositionedBox { display_inside, contents, content_sizes, + // Text decorations are not propagated to any out-of-flow descendants. + TextDecorationLine::NONE, ), } } diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs index e54fbeeb2fb..0228d5123ce 100644 --- a/components/style/values/specified/text.rs +++ b/components/style/values/specified/text.rs @@ -244,6 +244,12 @@ bitflags! { } } +impl Default for TextDecorationLine { + fn default() -> Self { + TextDecorationLine::NONE + } +} + impl Parse for TextDecorationLine { /// none | [ underline || overline || line-through || blink ] fn parse<'i, 't>( From eea7eb4e4f54b62878c3b7ce12095bb569762561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Jim=C3=A9nez=20Moreno?= Date: Fri, 13 Mar 2020 21:34:11 +0100 Subject: [PATCH 12/15] Update test expectations with text-decoration support --- .../generated-content/content-070.xht.ini | 2 + .../generated-content/content-082.xht.ini | 2 + .../text-decoration-color-valid.html.ini | 10 - .../text-decoration-line-valid.html.ini | 195 ------------------ .../text-decoration-style-valid.html.ini | 16 -- .../parsing/text-decoration-valid.html.ini | 6 - ...on-underline-position-vertical-ja.html.ini | 2 + ...ation-underline-position-vertical.html.ini | 2 + .../text-emphasis-style-none-001.xht.ini | 2 - .../css/text_decoration_smoke_a.html.ini | 2 - ...text_decoration_underline_subpx_a.html.ini | 2 - .../mozilla/localeCompare.html.ini | 3 - 12 files changed, 8 insertions(+), 236 deletions(-) create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-070.xht.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-082.xht.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical-ja.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini delete mode 100644 tests/wpt/mozilla/meta-layout-2020/css/text_decoration_smoke_a.html.ini delete mode 100644 tests/wpt/mozilla/meta-layout-2020/css/text_decoration_underline_subpx_a.html.ini diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-070.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-070.xht.ini new file mode 100644 index 00000000000..397ef880c7e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-070.xht.ini @@ -0,0 +1,2 @@ +[content-070.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-082.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-082.xht.ini new file mode 100644 index 00000000000..b7fe80a3612 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/generated-content/content-082.xht.ini @@ -0,0 +1,2 @@ +[content-082.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini deleted file mode 100644 index 030a804ef83..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-color-valid.html.ini +++ /dev/null @@ -1,10 +0,0 @@ -[text-decoration-color-valid.html] - [e.style['text-decoration-color'\] = "currentcolor" should set the property value] - expected: FAIL - - [e.style['text-decoration-color'\] = "red" should set the property value] - expected: FAIL - - [e.style['text-decoration-color'\] = "rgba(10, 20, 30, 0.4)" should set the property value] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini index 3b22624996d..bb50604b3df 100644 --- a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-line-valid.html.ini @@ -1,202 +1,7 @@ [text-decoration-line-valid.html] - [e.style['text-decoration-line'\] = "underline overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through blink underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline blink underline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline blink line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through overline underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink line-through underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline underline line-through blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink underline overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through blink underline overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline blink line-through overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through underline overline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through blink overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink underline overline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline line-through blink underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline line-through blink overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline underline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through overline blink underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline line-through overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through blink overline underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink overline underline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline blink overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through underline blink overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline overline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline blink line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline overline blink line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline line-through overline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline line-through blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through overline underline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline underline blink line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline line-through blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline line-through underline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink overline underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through underline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline blink underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through underline overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink line-through underline overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline line-through underline" should set the property value] - expected: FAIL - [e.style['text-decoration-line'\] = "spelling-error" should set the property value] expected: FAIL - [e.style['text-decoration-line'\] = "blink overline line-through underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink line-through overline underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline overline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "none" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline blink line-through underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink overline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline blink overline line-through" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink underline line-through" should set the property value] - expected: FAIL - [e.style['text-decoration-line'\] = "grammar-error" should set the property value] expected: FAIL - [e.style['text-decoration-line'\] = "underline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "overline underline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink underline line-through overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "line-through overline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "blink line-through overline" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline blink" should set the property value] - expected: FAIL - - [e.style['text-decoration-line'\] = "underline overline line-through blink" should set the property value] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini deleted file mode 100644 index d9e928983c7..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-style-valid.html.ini +++ /dev/null @@ -1,16 +0,0 @@ -[text-decoration-style-valid.html] - [e.style['text-decoration-style'\] = "wavy" should set the property value] - expected: FAIL - - [e.style['text-decoration-style'\] = "dashed" should set the property value] - expected: FAIL - - [e.style['text-decoration-style'\] = "solid" should set the property value] - expected: FAIL - - [e.style['text-decoration-style'\] = "dotted" should set the property value] - expected: FAIL - - [e.style['text-decoration-style'\] = "double" should set the property value] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini index 5e22f329f4c..68e08cee990 100644 --- a/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/parsing/text-decoration-valid.html.ini @@ -2,9 +2,6 @@ [e.style['text-decoration'\] = "underline auto" should set the property value] expected: FAIL - [e.style['text-decoration'\] = "none" should set the property value] - expected: FAIL - [e.style['text-decoration'\] = "auto" should set the property value] expected: FAIL @@ -17,9 +14,6 @@ [e.style['text-decoration'\] = "double overline underline" should set the property value] expected: FAIL - [e.style['text-decoration'\] = "line-through" should set the property value] - expected: FAIL - [e.style['text-decoration'\] = "rgba(10, 20, 30, 0.4) dotted" should set the property value] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical-ja.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical-ja.html.ini new file mode 100644 index 00000000000..2c69ffca92c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical-ja.html.ini @@ -0,0 +1,2 @@ +[text-decoration-underline-position-vertical-ja.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical.html.ini new file mode 100644 index 00000000000..cfdff6ecde1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-underline-position-vertical.html.ini @@ -0,0 +1,2 @@ +[text-decoration-underline-position-vertical.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini deleted file mode 100644 index c6d3f7a8a5c..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-style-none-001.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[text-emphasis-style-none-001.xht] - expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/text_decoration_smoke_a.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/text_decoration_smoke_a.html.ini deleted file mode 100644 index bb5acb7b6b6..00000000000 --- a/tests/wpt/mozilla/meta-layout-2020/css/text_decoration_smoke_a.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[text_decoration_smoke_a.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/css/text_decoration_underline_subpx_a.html.ini b/tests/wpt/mozilla/meta-layout-2020/css/text_decoration_underline_subpx_a.html.ini deleted file mode 100644 index 194f21cfa26..00000000000 --- a/tests/wpt/mozilla/meta-layout-2020/css/text_decoration_underline_subpx_a.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[text_decoration_underline_subpx_a.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini b/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini index 8bb28daf16c..3fe82b2eb0b 100644 --- a/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini +++ b/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini @@ -1,5 +1,2 @@ [localeCompare.html] bug: https://github.com/servo/servo/issues/25802 - [localeCompare should return the same as other browsers, even though it's implementation-dependent] - expected: FAIL - From 1035d2f8d57c24d7044c6e76d0f9b6f5e4c93eb2 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 23 Mar 2020 11:15:02 -0400 Subject: [PATCH 13/15] Revert incorrect test result change. --- .../wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini b/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini index 3fe82b2eb0b..cd00e6e41a4 100644 --- a/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini +++ b/tests/wpt/mozilla/meta-layout-2020/mozilla/localeCompare.html.ini @@ -1,2 +1,4 @@ [localeCompare.html] bug: https://github.com/servo/servo/issues/25802 + [localeCompare should return the same as other browsers, even though it's implementation-dependent] + expected: FAIL From b1a0c52f9c0a729c3e85d83a18c194b81802b2f9 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 23 Mar 2020 11:16:27 -0400 Subject: [PATCH 14/15] Add missing test result. --- .../text-emphasis-position-below-left-001.xht.ini | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-001.xht.ini diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-001.xht.ini new file mode 100644 index 00000000000..00ecd6b2105 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-left-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-below-left-001.xht] + expected: FAIL From 132cee59fe25316bbf78d570a0e14be7c52844a7 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 23 Mar 2020 11:16:46 -0400 Subject: [PATCH 15/15] Add missing test result. --- .../text-emphasis-position-below-right-001.xht.ini | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-001.xht.ini diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-001.xht.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-001.xht.ini new file mode 100644 index 00000000000..6a434748be4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-emphasis-position-below-right-001.xht.ini @@ -0,0 +1,2 @@ +[text-emphasis-position-below-right-001.xht] + expected: FAIL