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

input[type=file]: Ignore the 'overflow' property

For a historical reason, some form controls always clip the content,
and should ignore the 'overflow' property. File upload control NG had
a regression that it accepts overflow:visible.  This CL disables it
again. The new behavior is compatible with Safari and Firefox.

Bug: 1139629
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng_disabled
Change-Id: I6b0b5a715a2c859f195bbf2473ead67cd22bd14d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2528812Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825813}
parent e604a70e
...@@ -567,7 +567,7 @@ input[type="hidden" i], input[type="image" i], input[type="file" i] { ...@@ -567,7 +567,7 @@ input[type="hidden" i], input[type="image" i], input[type="file" i] {
input[type="file" i] { input[type="file" i] {
align-items: baseline; align-items: baseline;
color: inherit; color: inherit;
overflow: hidden; overflow: hidden !important;
text-align: start !important; text-align: start !important;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: pre; white-space: pre;
......
...@@ -71,4 +71,15 @@ Styling ::-webkit-file-upload-button: ...@@ -71,4 +71,15 @@ Styling ::-webkit-file-upload-button:
<input type=file class="button-shadow"> <input type=file class="button-shadow">
<div> <div>
<div>
<style>
.overflow {
overflow: visible;
width: 10px;
}
</style>
'overflow: visible' should not work:
<input type=file class=overflow>
</div>
</body> </body>
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