Bug 1567585 [wpt PR 17927] - [CSS] Treat viewport-relative units as computationally independent, a=testonly

Automatic update from web-platform-tests
[CSS] Treat viewport-relative units as computationally independent

According to spec (*):

"A property value is computationally independent if it can be converted
into a computed value using only the value of the property on the
element, and 'global' information that cannot be changed by CSS."

Therefore, viewport-relative length units should be treated as
computationally independent. This patch fixes the implementation to
comply to that.

(*) https://drafts.css-houdini.org/css-properties-values-api-1/#computationally-independent

Change-Id: Ib75a1981aa4083ee68cef8ba0bbc58d557cd663c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710090
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679183}

--

wpt-commits: 6792d16f8eb649aacee0c7b0447649e3d4bc2771
wpt-pr: 17927
This commit is contained in:
Xiaocheng Hu 2019-07-30 17:34:06 +00:00 коммит произвёл moz-wptsync-bot
Родитель ef30f82795
Коммит a8514df3cf
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -54,6 +54,8 @@ assert_valid("<percentage>", "-9.3e3%");
assert_valid("<length-percentage>", "-54%");
assert_valid("<length-percentage>", "0");
assert_valid("<length-percentage>", "calc(-11px + 10.4%)");
assert_valid("<length>", "10vmin");
assert_valid("<percentage> | <length>+", "calc(100vh - 10px) 30px");
assert_valid("<number>", "-109");
assert_valid("<number>", "2.3e4");
@ -183,14 +185,12 @@ assert_invalid("<length>", "10%");
assert_invalid("<length>", "calc(5px + 10%)");
assert_invalid("<length>", "calc(5px * 3px / 6px)");
assert_invalid("<length>", "10em");
assert_invalid("<length>", "10vmin");
assert_invalid("<length>", "calc(4px + 3em)");
assert_invalid("<length>", "calc(4px + calc(8 * 2em))");
assert_invalid("<length>+", "calc(2ex + 16px)");
assert_invalid("<length>+", "10px calc(20px + 4rem)");
assert_invalid("<length>+", "");
assert_invalid("<length>#", "");
assert_invalid("<percentage> | <length>+", "calc(100vh - 10px) 30px");
assert_invalid("<length>", "10px;");
assert_invalid("<length-percentage>", "calc(2px + 10% + 7ex)");
assert_invalid("<percentage>", "0");