Commit 1d35df38 authored by Kent Tamura's avatar Kent Tamura Committed by Chromium LUCI CQ

Apply 'appearance: auto' for elements of which appearance value is

'menulist' and 'listbox'

Also, this CL replaces the remaining '-webkit-appearance' usages with
'appearance'.

The new behavior matches to Firefox.

Bug: 965432
Change-Id: Ic091a0825beb437d634bdfe4959b9e364666cf92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2634882
Auto-Submit: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845520}
parent d320cf97
...@@ -56,7 +56,7 @@ input[type="month" i], ...@@ -56,7 +56,7 @@ input[type="month" i],
input[type="time" i], input[type="time" i],
input[type="week" i] { input[type="week" i] {
align-items: center; align-items: center;
-webkit-appearance: menulist; /* AutoAppearanceFor() should match to this. */ appearance: auto;
background-color: ButtonFace; background-color: ButtonFace;
border: 1px solid #a9a9a9; border: 1px solid #a9a9a9;
display: -webkit-inline-flex; display: -webkit-inline-flex;
......
...@@ -583,7 +583,7 @@ input[type="password" i]::-internal-input-suggested { ...@@ -583,7 +583,7 @@ input[type="password" i]::-internal-input-suggested {
} }
input[type="hidden" i], input[type="image" i], input[type="file" i] { input[type="hidden" i], input[type="image" i], input[type="file" i] {
-webkit-appearance: initial; /* AutoAppearanceFor() should match to this. */ appearance: none;
padding: initial; padding: initial;
background-color: initial; background-color: initial;
border: initial; border: initial;
...@@ -608,7 +608,7 @@ input[type="image" i] { ...@@ -608,7 +608,7 @@ input[type="image" i] {
input:-internal-autofill-previewed, input:-internal-autofill-previewed,
textarea:-internal-autofill-previewed, textarea:-internal-autofill-previewed,
select:-internal-autofill-previewed { select:-internal-autofill-previewed {
-webkit-appearance:menulist-button; appearance: menulist-button;
background-color: #E8F0FE !important; background-color: #E8F0FE !important;
background-image:none !important; background-image:none !important;
color: -internal-light-dark(black, white) !important; color: -internal-light-dark(black, white) !important;
...@@ -617,7 +617,7 @@ select:-internal-autofill-previewed { ...@@ -617,7 +617,7 @@ select:-internal-autofill-previewed {
input:-internal-autofill-selected, input:-internal-autofill-selected,
textarea:-internal-autofill-selected, textarea:-internal-autofill-selected,
select:-internal-autofill-selected { select:-internal-autofill-selected {
-webkit-appearance:menulist-button; appearance: menulist-button;
background-color: #E8F0FE !important; background-color: #E8F0FE !important;
background-image:none !important; background-image:none !important;
color: -internal-light-dark(black, white) !important; color: -internal-light-dark(black, white) !important;
...@@ -659,7 +659,7 @@ input[type="button" i], input[type="submit" i], input[type="reset" i], input[typ ...@@ -659,7 +659,7 @@ input[type="button" i], input[type="submit" i], input[type="reset" i], input[typ
} }
input[type="range" i] { input[type="range" i] {
appearance: auto; /* AutoAppearanceFor() should match to this. */ appearance: auto;
padding: initial; padding: initial;
border: initial; border: initial;
margin: 2px; margin: 2px;
...@@ -781,7 +781,7 @@ input[type="color" i]::-webkit-color-swatch { ...@@ -781,7 +781,7 @@ input[type="color" i]::-webkit-color-swatch {
} }
input[type="color" i][list] { input[type="color" i][list] {
-webkit-appearance: menulist; /* AutoAppearanceFor() should match to this. */ appearance: auto;
width: 88px; width: 88px;
height: 23px height: 23px
} }
...@@ -838,7 +838,7 @@ input[readonly]::-webkit-calendar-picker-indicator { ...@@ -838,7 +838,7 @@ input[readonly]::-webkit-calendar-picker-indicator {
} }
select { select {
-webkit-appearance: menulist; /* AutoAppearanceFor() should match to this. */ appearance: auto;
box-sizing: border-box; box-sizing: border-box;
align-items: center; align-items: center;
border: 1px solid; border: 1px solid;
...@@ -854,7 +854,7 @@ select:not(:-internal-list-box) { ...@@ -854,7 +854,7 @@ select:not(:-internal-list-box) {
} }
select:-internal-list-box { select:-internal-list-box {
-webkit-appearance: listbox; /* AutoAppearanceFor() should match to this. */ appearance: auto;
align-items: flex-start; align-items: flex-start;
border: 1px inset gray; border: 1px inset gray;
border-radius: initial; border-radius: initial;
......
This is a testharness.js-based test.
PASS <input>
PASS <input type="text">
PASS <input type="TEXT">
PASS <input type="search">
PASS <input type="tel">
PASS <input type="url">
PASS <input type="email">
PASS <input type="password">
PASS <input type="date">
PASS <input type="month">
PASS <input type="week">
PASS <input type="time">
PASS <input type="datetime-local">
PASS <input type="number">
PASS <input type="range">
PASS <input type="color">
PASS <input type="checkbox">
PASS <input type="radio">
PASS <input type="submit">
PASS <input type="reset">
PASS <input type="button">
PASS <input type="unknowntype">
FAIL <select> assert_equals: -webkit-appearance expected "auto" but got "menulist"
FAIL <select multiple=""> assert_equals: -webkit-appearance expected "auto" but got "listbox"
FAIL <select size="2"> assert_equals: -webkit-appearance expected "auto" but got "listbox"
PASS <button>
PASS <textarea>
PASS <meter>
PASS <progress>
PASS <input type="hidden">
PASS <input type="HIDDEN">
PASS <input type="file">
PASS <input type="image">
PASS <div>
PASS <details>
PASS <summary>
PASS <video>
PASS <video controls="">
PASS <menuitem>
PASS <marquee>
PASS <keygen>
PASS <input> (namespace: null)
PASS <input> (namespace: http://www.w3.org/2000/svg)
PASS The html element
PASS The body element
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment