[webkit-changes] [WebKit/WebKit] d8d729: Web Platform Tests for CSS shorthands have a few m...

Darin Adler noreply at github.com
Thu Dec 15 17:30:44 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d8d729c265469a5a48003a3e972b986e1dfa6e8b
      https://github.com/WebKit/WebKit/commit/d8d729c265469a5a48003a3e972b986e1dfa6e8b
  Author: Darin Adler <darin at apple.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M LayoutTests/cssom/cssvalue-comparison-expected.txt
    M LayoutTests/cssom/cssvalue-comparison.html
    M LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt
    M LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize.html
    M LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt
    M LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html
    M LayoutTests/fast/css/background-clip-text-expected.txt
    M LayoutTests/fast/css/background-clip-text.html
    M LayoutTests/fast/css/border-shorthand-initialize-longhands-expected.txt
    M LayoutTests/fast/css/border-shorthand-initialize-longhands.html
    M LayoutTests/fast/css/cssText-shorthand-expected.txt
    M LayoutTests/fast/css/cssText-shorthand.html
    M LayoutTests/fast/css/font-shorthand-from-longhands-expected.txt
    M LayoutTests/fast/css/font-shorthand-from-longhands.html
    M LayoutTests/fast/css/getPropertyValue-border.html
    M LayoutTests/fast/css/longhand-overrides-shorthand-prefixing-expected.txt
    M LayoutTests/fast/css/longhand-overrides-shorthand-prefixing.html
    M LayoutTests/fast/css/parsing-text-emphasis-expected.txt
    M LayoutTests/fast/css/parsing-text-emphasis.html
    M LayoutTests/fast/css/shorthand-mismatched-list-crash-expected.txt
    M LayoutTests/fast/css/shorthand-mismatched-list-crash.html
    M LayoutTests/fast/dom/background-shorthand-csstext-expected.txt
    M LayoutTests/fast/dom/background-shorthand-csstext.html
    M LayoutTests/fast/masking/parsing-mask-expected.txt
    M LayoutTests/fast/masking/parsing-mask.html
    M LayoutTests/fast/masking/parsing-webkit-mask-expected.txt
    M LayoutTests/fast/masking/parsing-webkit-mask.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-valid.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-position-valid-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-position-valid.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cssText-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cssText.html
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-values-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-values.html
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-values-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-values.html
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt

  Log Message:
  -----------
  Web Platform Tests for CSS shorthands have a few mistakes I noticed when fixing shorthand bugs
https://bugs.webkit.org/show_bug.cgi?id=249388
rdar://problem/103399812

Reviewed by Tim Nguyen.

These tests are corrected to expect the correct behavior. The expected results, however, still
reflect the behavior of the current WebKit code. A future pull request will progress these tests.
I came up with these changes by testing with those improvements and studying what these tests
expect, and changing the tests in the cases where it was the tests that were wrong.

* LayoutTests/cssom/cssvalue-comparison-expected.txt: Updated.
* LayoutTests/cssom/cssvalue-comparison.html: Reworked test so it no longer depends on reading
back shorthands, since that gives false negatives.

* LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: Updated.
* LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize.html: Expect just
border-box instead of border-box border-box.

* LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: Updated.
* LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html: Expect initial
values to be omitted. Also updated one case that expected the initial identifier but should get the
initial value instead.

* LayoutTests/fast/css/background-clip-text-expected.txt: Updated.
* LayoutTests/fast/css/background-clip-text.html: Expect border-box instead of initial.

* LayoutTests/fast/css/border-shorthand-initialize-longhands-expected.txt: Updated.
* LayoutTests/fast/css/border-shorthand-initialize-longhands.html: Expect initial values instead of
the initial identifier.

* LayoutTests/fast/css/cssText-shorthand-expected.txt: Updated.
* LayoutTests/fast/css/cssText-shorthand.html: Removed most of what is tested here since this test
was mostly imported into Web Platform Tests long ago. All that remains are WebKit-specific bits.

* LayoutTests/fast/css/font-shorthand-from-longhands-expected.txt: Updated.
* LayoutTests/fast/css/font-shorthand-from-longhands.html: Expect correct behavior from font
shorthand where it will not serialize unless all the longhands are set.

* LayoutTests/fast/css/getPropertyValue-border.html: Expect initial value instead of the initial
identifier.

* LayoutTests/fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Updated.
* LayoutTests/fast/css/longhand-overrides-shorthand-prefixing.html: Expect initial values to be
omitted from the animation shorthand.

* LayoutTests/fast/css/parsing-text-emphasis-expected.txt: Updated.
* LayoutTests/fast/css/parsing-text-emphasis.html: Expect initial value instead of the initial
identifier.

* LayoutTests/fast/css/shorthand-mismatched-list-crash-expected.txt: Updated.
* LayoutTests/fast/css/shorthand-mismatched-list-crash.html: Expect initial values to be omitted
from the -webkit-transition shorthand.

* LayoutTests/fast/dom/background-shorthand-csstext-expected.txt: Updated.
* LayoutTests/fast/dom/background-shorthand-csstext.html: Updated test so we can see the results
rather than just that there was a failure. Updated expectations to not expect serialized none and
scroll, which are the initial values.

* LayoutTests/fast/masking/parsing-mask-expected.txt: Updated.
* LayoutTests/fast/masking/parsing-mask.html: Expect initial values to be omitted from shorthands.

* LayoutTests/fast/masking/parsing-webkit-mask-expected.txt: Updated.
* LayoutTests/fast/masking/parsing-webkit-mask.html: Expect initial values to be omitted from
shorthands.

* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/parsing/animation-valid.html:
Expect either 0s or none for animation shorthand when everything is set to the default, since
animation-duration is the first longhand. Allow initial values to be omitted in the layered
test case at the end of this test.

* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-position-valid-expected.txt:
Updated.
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-position-valid.html:
Expect center to be omitted when it can be without changing the meaning.

* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt:
Updated.
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub.html: Expect
to correctly not serialize none for the mask-reference since it's the initial value, and some
other cases here that had incorrect expectations.

* LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cssText-expected.txt:
Updated.
* LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cssText.html: Expect a
single space before "!important". The specification explicitly calls for a single space, not two
spaces, so I didn't bother to tolerate both formats.

* LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-values-expected.txt: Updated.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-values.html: Added an exceptions
list for all the cases where "center" must be omitted for minimal serialization.

* LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-values-expected.txt: Updated.
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-values.html: Corrected
expectations. This test was expecting incorrect behavior for some tricky cases, including some
that are out of date since the specifiation now says that the border shorthand sets all the
longhands of the the border-image shorthand to their initial values.

* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt:
Updated.

Canonical link: https://commits.webkit.org/257966@main




More information about the webkit-changes mailing list