Commit c6f1bfac authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Change the default appearance of text controls and input[type=range] to 'auto'

This doesn't change rendering behavior, but changes
|getComputedStyle(element)['appearance']| results. The new behavior
matches to Firefox.

Bug: 965432
Change-Id: Ia3d495a362381a6b057ec0df2b8d38e6765e1e66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2546395
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829010}
parent bfc447d5
......@@ -424,7 +424,7 @@ input[type="hidden" i] {
}
input {
-webkit-appearance: textfield; /* AutoAppearanceFor() should match to this. */
appearance: auto;
padding: 1px;
background-color: -internal-light-dark(white, black);
border: 2px inset;
......@@ -433,7 +433,7 @@ input {
}
input[type="search" i] {
-webkit-appearance: searchfield; /* AutoAppearanceFor() should match to this. */
appearance: auto;
box-sizing: border-box;
}
......@@ -500,7 +500,7 @@ select {
}
textarea {
-webkit-appearance: textarea; /* AutoAppearanceFor() should match to this. */
appearance: auto;
background-color: -internal-light-dark(white, black);
border: 1px solid;
column-count: initial !important;
......@@ -633,7 +633,7 @@ input[type="button" i], input[type="submit" i], input[type="reset" i], input[typ
}
input[type="range" i] {
-webkit-appearance: slider-horizontal; /* AutoAppearanceFor() should match to this. */
appearance: auto; /* AutoAppearanceFor() should match to this. */
padding: initial;
border: initial;
margin: 2px;
......
This is a testharness.js-based test.
FAIL <input> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="text"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="TEXT"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="search"> assert_equals: -webkit-appearance expected "auto" but got "searchfield"
FAIL <input type="tel"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="url"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="email"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="password"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="date"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="month"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="week"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="time"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="datetime-local"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="number"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
FAIL <input type="range"> assert_equals: -webkit-appearance expected "auto" but got "slider-horizontal"
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">
FAIL <input type="unknowntype"> assert_equals: -webkit-appearance expected "auto" but got "textfield"
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>
FAIL <textarea> assert_equals: -webkit-appearance expected "auto" but got "textarea"
PASS <textarea>
PASS <meter>
PASS <progress>
PASS <input type="hidden">
......
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