Bug 1635195 [wpt PR 23387] - Let 'revert' keyword restore native appearance, a=testonly
authorAnders Hartvoll Ruud <andruud@chromium.org>
Wed, 13 May 2020 09:45:35 +0000
changeset 531122 32a8bc27a071addb08078a33705e5aaa91538955
parent 531121 2caad7825718d42aed047e4e568b97f1873877b0
child 531123 bbff8a3ac01236bd57bde28f8f842e81e8e2cc48
push id37435
push userapavel@mozilla.com
push dateWed, 20 May 2020 15:28:23 +0000
treeherdermozilla-central@5415da14ec9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1635195, 23387, 579788, 1061846, 2178891, 766307
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1635195 [wpt PR 23387] - Let 'revert' keyword restore native appearance, a=testonly Automatic update from web-platform-tests Let 'revert' keyword restore native appearance Recently, we changed our behavior w.r.t. auto-disabling of native appearance on UI elements: we now disable the appearance if any author declaration is seen for background/border, even if those declarations match the UA-specified style. Technically, an author-level 'revert' is still an author declaration, so blindly following the above rules would still disable the native appearance. However, it would not match the author expectation for 'revert'. It is natural that e.g. 'all:revert' on UI elements restore exactly the style the element would have had without author styles. This CL adds kBorder/kBackground flags, and a mechanism for collecting all CSSProperty::Flags seen for the kAuthor origin. Those flags are then used at the end of the Apply process to provide values for SetHasAuthorBorder/Background. Also fix test with commented out subtests, and add bonus test for css-logical. Bug: 579788, 1061846 Change-Id: Ie88d666597f6aa8b38657d9c20fe3006ed5a8e39 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2178891 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#766307} -- wpt-commits: 15d5f975f5ee447a470e1cb69a678202cffe7406 wpt-pr: 23387
testing/web-platform/tests/css/css-ui/appearance-revert-001.tentative.html
testing/web-platform/tests/css/css-ui/appearance-revert-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/appearance-revert-001.tentative.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4777#issuecomment-597755164">
+<link rel="match" href="appearance-revert-ref.html">
+<style>
+  div > * {
+    background-color: red;
+    border-color: red;
+    all: revert;
+  }
+</style>
+<div><input type="text" value="input-text"></div>
+<div><input type="search" value="input-search"></div>
+<div><textarea>textarea</textarea></div>
+<div><input type="button" value="input-button"></div>
+<div><input type="submit" value="input-submit"></div>
+<div><input type="reset" value="input-reset"></div>
+<div><input type="range"></div>
+<div><input type="checkbox"></div>
+<div><input type="radio"></div>
+<div><input type="color"></div>
+<div><select><option>select</option></select></div>
+<div><select multiple><option>select-multiple</option></select></div>
+<div><meter value=0.5></meter></div>
+<div><progress value=0.5></progress></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/appearance-revert-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<div><input type="text" value="input-text"></div>
+<div><input type="search" value="input-search"></div>
+<div><textarea>textarea</textarea></div>
+<div><input type="button" value="input-button"></div>
+<div><input type="submit" value="input-submit"></div>
+<div><input type="reset" value="input-reset"></div>
+<div><input type="range"></div>
+<div><input type="checkbox"></div>
+<div><input type="radio"></div>
+<div><input type="color"></div>
+<div><select><option>select</option></select></div>
+<div><select multiple><option>select-multiple</option></select></div>
+<div><meter value=0.5></meter></div>
+<div><progress value=0.5></progress></div>