New issue
Advanced search Search tips

Issue 747752 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 30
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 580628

Blocking:
issue 651762



Sign in to add a comment

<input type=foo> and <input type=text> should have identical appearance

Project Member Reported by tkent@chromium.org, Jul 24 2017

Issue description

Chrome Version: 62 Canary
OS: All but macOS and iOS

What steps will reproduce the problem?
(1) Open the following URL
  data:text/html,<!DOCTYPE html><div><input type=text></div><div><input type=foo></div>

What is the expected result?
These two text fields should have identical size.

What happens instead?
The second one is slightly wider than the first one.

Please use labels and text to provide additional information.

WPT: html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html

 

Comment 1 by phistuck@gmail.com, Jul 24 2017

So is it basically a matter of adding all of the known types to a not() selector?

The current user agent style sheet contains -
input:not([type]), input[type="email" i], input[type="number" i], input[type="password" i], input[type="tel" i], input[type="url" i], input[type="text" i] {
    padding: 1px 0px;
}

Comment 2 by tkent@chromium.org, Jul 24 2017

> So is it basically a matter of adding all of the known types to a not() selector?

Right.  However, it seems Blink doesn't support complex selectors in :not(). :not(-webkit-any([type="button"], [type="reset"], ....)) doesn't work.

WebKit works well.  https://webkit.org/blog/3615/css-selectors-inside-selectors-discover-matches-not-and-nth-child/

Comment 3 by phistuck@gmail.com, Jul 24 2017

Yes, I know WebKit support complex :not and other goodies. :(
I miscalculated that it was needed in this case.
The negation of this can be achieved using -webkit-any (:() -
input
{
 padding: 0 1px;
}
::webkit-any(input[type=range i], input[type=button i])
{
 padding: 0;
}

Though it would obviously be better to just implement the goodies (any plans?). :)

Comment 4 by tkent@chromium.org, Jul 24 2017

Blockedon: 580628
#3, Yeah, complex :not isn't requirement, but it's nice to have to fix this issue.

Complex :not(): Issue 580628
Unprefixed matches: Issue 568705

Comment 5 by tkent@chromium.org, Jul 26 2017

Blocking: 651762
Owner: tkent@chromium.org
Status: Started (was: Available)
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380

commit e0a4dcd89f7adbbaa8dc685f609fe02c94c84380
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Jul 26 13:27:40 2018

<input>: INPUT element with unknown type attribute value should be rendered same as <input type=text>.

Non-macOS and macOS have different default padding for text-field <input>.
html.css specifies padding for macOS, and themeWin.css specified padding for
non-macOS only for specific input types, and unknown input types, which are
fell back to type=text, were not covered by themeWin.css.

Bug:  747752 
Change-Id: I2165380868acf54eeb42dfa3109a989418a62c83
Reviewed-on: https://chromium-review.googlesource.com/1150940
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578281}
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/external/wpt/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/platform/linux/fast/forms/input-appearance-height-expected.png
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/platform/linux/fast/forms/input-appearance-height-expected.txt
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.png
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/WebKit/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.txt
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/blink/renderer/core/css/themeWin.css
[modify] https://crrev.com/e0a4dcd89f7adbbaa8dc685f609fe02c94c84380/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css

Labels: Target-70
Status: Fixed (was: Started)

Sign in to add a comment