layout_2020: Add initial support for getComputedStyle

This implementation is more-or-less on par with the one from layout_2013
and in some cases better. There are still some cases where we don't
return the correct "resolved value," but this is enough to test
animations and transitions.
This commit is contained in:
Martin Robinson 2020-05-09 10:59:55 +02:00
parent 4d541e8e38
commit 9c7b1ae715
188 changed files with 16312 additions and 15198 deletions

View file

@ -5,9 +5,6 @@
[getComputedStyle(elem) for url() listStyle uses the resolved URL and elem.style uses the original URL]
expected: FAIL
[getComputedStyle(elem) for url() backgroundImage uses the resolved URL and elem.style uses the original URL]
expected: FAIL
[getComputedStyle(elem) and elem.style for url() listStyleImage correctly return "none"]
expected: FAIL
@ -20,12 +17,3 @@
[getComputedStyle(elem) for url() listStyleImage uses the resolved URL and elem.style uses the original URL]
expected: FAIL
[getComputedStyle(elem) for url() background uses the resolved URL and elem.style uses the original URL]
expected: FAIL
[getComputedStyle(elem) and elem.style for url() background correctly return "none"]
expected: FAIL
[getComputedStyle(elem) and elem.style for url() backgroundImage correctly return "none"]
expected: FAIL

View file

@ -1,4 +0,0 @@
[media_bogus_query_sequence.html]
[Media query with a bogus query doesn't turn the whole media query list invalid]
expected: FAIL

View file

@ -1,70 +0,0 @@
[test_variable_legal_values.html]
[number]
expected: FAIL
[CDO_not_at_top_level_value_unused]
expected: FAIL
[unbalanced_close_bracket_at_toplevel]
expected: FAIL
[braces]
expected: FAIL
[at_keyword_unknown_and_block]
expected: FAIL
[brackets]
expected: FAIL
[unbalanced_close_paren_at_toplevel]
expected: FAIL
[CDC_at_top_level]
expected: FAIL
[percentage]
expected: FAIL
[unbalanced_close_paren_in_something_balanced]
expected: FAIL
[function]
expected: FAIL
[nested_function]
expected: FAIL
[at_keyword_unknown]
expected: FAIL
[CDO_at_top_level]
expected: FAIL
[unbalanced_close_brace_in_something_balanced]
expected: FAIL
[at_keyword_known_and_block]
expected: FAIL
[semicolon_not_at_top_level_value_unused]
expected: FAIL
[parentheses]
expected: FAIL
[unbalanced_close_bracket_in_something_balanced]
expected: FAIL
[CDC_not_at_top_level_value_unused]
expected: FAIL
[length]
expected: FAIL
[time]
expected: FAIL
[at_keyword_known]
expected: FAIL

View file

@ -2,90 +2,3 @@
[subtest #23 with `counter-reset: var(--a)red; --a:orange;`]
expected: FAIL
[subtest #24 with `--a: var(--b)var(--c); --c:[c\]; --b:('ab`]
expected: FAIL
[subtest #28 with `--a: "`]
expected: FAIL
[subtest #25 with `--a: '`]
expected: FAIL
[subtest #26 with `--a: '\\`]
expected: FAIL
[subtest #19 with `--a: var(--b)red; --b:orange;`]
expected: FAIL
[subtest #37 with `--a: url("http://example.org/\\`]
expected: FAIL
[subtest #30 with `--a: /* abc `]
expected: FAIL
[subtest #20 with `--a: var(--b)var(--c); --b:orange; --c:red;`]
expected: FAIL
[subtest #33 with `--a: url(http://example.org/\\`]
expected: FAIL
[subtest #11 with `--a: var(--b); --b: 1px`]
expected: FAIL
[subtest #17 with `--a: a var(--b) c; --b:b`]
expected: FAIL
[subtest #0 with ``]
expected: FAIL
[subtest #8 with `--a: 1px`]
expected: FAIL
[subtest #1 with `--a: `]
expected: FAIL
[subtest #27 with `--a: \\`]
expected: FAIL
[subtest #22 with `--a: var(--b,orange)var(--c); --c:red;`]
expected: FAIL
[subtest #35 with `--a: url('http://example.org/\\`]
expected: FAIL
[subtest #12 with `--a: var(--b, 1px)`]
expected: FAIL
[subtest #15 with `--a: something 3px url(whereever) calc(var(--b,1em) + 1px)`]
expected: FAIL
[subtest #5 with `--z: inherit`]
expected: FAIL
[subtest #32 with `--a: url(http://example.org/`]
expected: FAIL
[subtest #18 with `--a: a var(--b,b var(--c) d) e; --c:c`]
expected: FAIL
[subtest #31 with `--a: /* abc *`]
expected: FAIL
[subtest #16 with `--a: var(--b, var(--c, var(--d, Black)))`]
expected: FAIL
[subtest #36 with `--a: url("http://example.org/`]
expected: FAIL
[subtest #34 with `--a: url('http://example.org/`]
expected: FAIL
[subtest #29 with `--a: "\\`]
expected: FAIL
[subtest #21 with `--a: var(--b)var(--c,red); --b:orange;`]
expected: FAIL
[subtest #7 with `--z: unset`]
expected: FAIL

View file

@ -2,114 +2,36 @@
[calc for column-gap]
expected: FAIL
[calc for word-spacing]
expected: FAIL
[calc for z-index]
expected: FAIL
[calc(5 * (20px / 2 + 7 * (3em + 12px/4 + (8 - 2) * 2rem)))]
expected: FAIL
[calc()]
expected: FAIL
[calc for column-count]
expected: FAIL
[calc for outline-width]
expected: FAIL
[calc(10px + 10em)]
expected: FAIL
[calc(10px + 10px)]
expected: FAIL
[calc for border-top-width]
expected: FAIL
[calc(5px+5px)]
expected: FAIL
[calc for transition-duration]
expected: FAIL
[calc((2 - 1) * 10px)]
expected: FAIL
[calc for border-bottom-width]
expected: FAIL
[calc for text-indent]
expected: FAIL
[calc(10px - 5px)]
expected: FAIL
[calc for perspective]
expected: FAIL
[calc(((3 - 1) * (8 + 4)) * 10px)]
expected: FAIL
[calc for counter-increment]
expected: FAIL
[calc for order]
expected: FAIL
[calc for opacity]
expected: FAIL
[calc(10px*2)]
expected: FAIL
[calc for transition-delay]
expected: FAIL
[calc for letter-spacing]
expected: FAIL
[calc for vertical-align]
expected: FAIL
[calc(20px/2)]
expected: FAIL
[calc for border-spacing]
expected: FAIL
[calc(10px / 2)]
expected: FAIL
[calc(10px)]
expected: FAIL
[calc(2 * 10px)]
expected: FAIL
[calc for border-right-width]
expected: FAIL
[calc for column-width]
expected: FAIL
[calc(96px + 72pt + 6pc + 1in + 2.54cm + 25.4mm)]
expected: FAIL
[calc for border-left-width]
expected: FAIL
[calc for outline-offset]
expected: FAIL
[calc(0ch + 0px + 0pt + 0pc + 0in + 0cm + 0mm + 0rem + 0em + 0ex + 0% + 0vw + 0vh + 0vmin + 0vmax)]
expected: FAIL
[calc(10px-10px)]
expected: FAIL
[calc(10px + 10em - 10px)]
expected: FAIL

View file

@ -1,4 +0,0 @@
[element_getcomputedstyle.html]
[getComputedStyle should work on non-HTML elements]
expected: FAIL

View file

@ -1,10 +1,4 @@
[getComputedStyle.html]
[Element's resolved values]
expected: FAIL
[Existing :before pseudoelement]
expected: FAIL
[getComputedStyle work for elements not in a document]
expected: FAIL

View file

@ -1,4 +0,0 @@
[out-of-order-stylesheet-loads-and-imports.html]
[out-of-order stylesheet loads for the same element happen correctly, even with imports]
expected: FAIL

View file

@ -1,4 +0,0 @@
[out-of-order-stylesheet-loads.html]
[out-of-order stylesheet loads for the same element happen correctly]
expected: FAIL

View file

@ -1,4 +0,0 @@
[css_variables_setProperty_recompute.html]
[Calling setProperty on a custom property should recompute its value inherited by children]
expected: FAIL