Skip to content

Commit

Permalink
Ignore font-feature-settings in autofill preview state
Browse files Browse the repository at this point in the history
Fixed: 1378719
Change-Id: If569345ad861dd5c0f9aaabae34a72121648391b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4012999
Reviewed-by: Mason Freed <masonf@chromium.org>
Auto-Submit: Dominic Battré <battre@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1069096}
  • Loading branch information
Dominic Battre authored and Chromium LUCI CQ committed Nov 9, 2022
1 parent a5e4856 commit c27ecc5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
9 changes: 6 additions & 3 deletions third_party/blink/renderer/core/html/resources/html.css
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,14 @@ input::-internal-input-suggested {
text-overflow: inherit;
white-space: nowrap;
overflow: hidden;
}
}

input::-internal-input-suggested,
textarea::-internal-input-suggested {
input::-internal-input-suggested,
textarea::-internal-input-suggested {
font: -webkit-small-control !important;
/* -webkit-small-control does not pin the font-feature-settings and we want
previews to look consistent. */
font-feature-settings: normal !important;
/* Prevent that overflow affects the scrollable area. Without this,
LayoutBox::*Scroll{Height,Width}() may determine the scroll width/height
from the scrollable area instead of from the overrides in
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<input id="input" style="width: 99px;" >
<script>
internals.setSuggestedValue(input, 'Hello');
internals.setAutofilled(input, true);
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<style>
/* These should be ignored when in autofilled state. */
input {
font-feature-settings: "case", "ss01", "ss02", "ss03";
}
</style>
<input id="input" style="width: 99px;" >
<script>
internals.setSuggestedValue(input, 'Hello');
internals.setAutofilled(input, true);
</script>

0 comments on commit c27ecc5

Please sign in to comment.