Skip to content

Commit

Permalink
::-webkit-textfield-decoration-container should not accept writing-mo…
Browse files Browse the repository at this point in the history
…de changes

https://bugs.webkit.org/show_bug.cgi?id=265111

Reviewed by Tim Nguyen.

Merge: https://chromium-review.googlesource.com/c/chromium/src/+/2509409

Specifying a 'writing-mode' value different from the host INPUT to its
::-webkit-textfield-decoration-container broke many things, and it was
not helpful because inner-editor always has the 'writing-mode' value
same as the host INPUT.  This patch prohibits authors to specify
'writing-mode' to ::-webkit-textfield-decoration-container.

* Source/WebCore/css/html.css:
(input::-webkit-textfield-decoration-container): Updated
* LayoutTests/fast/forms/number/number-broken-by-container-style-expected.html: Add Test Case
* LayoutTests/fast/forms/number/number-broken-by-container-style.html: Add Test Case Expectation
* LayoutTests/fast/forms/search/search-broken-by-container-style.html: Add Test Case
* LayoutTests/fast/forms/search/search-broken-by-container-style-expected.html: Add Test Case Expectation

Canonical link: https://commits.webkit.org/270953@main
  • Loading branch information
Ahmad-S792 authored and nt1m committed Nov 19, 2023
1 parent 34925ea commit b3dced5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<input type=number placeholder="foo">
<input type=number value="123456">
<script>
document.querySelectorAll('input')[1].focus();
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<style>
input::-webkit-textfield-decoration-container {
writing-mode: vertical-rl;
}
</style>
<input type=number placeholder="foo">
<input type=number value="123456">
<script>
document.querySelectorAll('input')[1].focus();
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<input type=search placeholder="foo">
<input type=search value="query">
<script>
document.querySelectorAll('input')[1].focus();
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<style>
input::-webkit-textfield-decoration-container {
writing-mode: vertical-rl;
}
</style>
<input type=search placeholder="foo">
<input type=search value="query">
<script>
document.querySelectorAll('input')[1].focus();
</script>
1 change: 1 addition & 0 deletions Source/WebCore/css/html.css
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ input::-webkit-textfield-decoration-container {
display: flex;
align-items: center;
content: none !important;
writing-mode: inherit !important;
}

input[type="search"]::-webkit-search-cancel-button,
Expand Down

0 comments on commit b3dced5

Please sign in to comment.