Changeset 280927 in webkit
- Timestamp:
- Aug 11, 2021, 1:19:33 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/caps-lock-indicator-width-expected.txt (added)
-
LayoutTests/fast/forms/caps-lock-indicator-width.html (added)
-
LayoutTests/platform/ios-wk1/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/html.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280923 r280927 1 2021-08-11 Aditya Keerthi <akeerthi@apple.com> 2 3 REGRESSION (r273072): Caps lock indicator in password field is too large 4 https://bugs.webkit.org/show_bug.cgi?id=228970 5 rdar://81546781 6 7 Reviewed by Wenson Hsieh. 8 9 Added a layout test to verify that the width of the caps lock indicator 10 adapts to the height of the password field, but does not exceed a 11 maximum width. 12 13 The added test is skipped on WK1, since DumpRenderTree does not support 14 toggling caps lock state. Implementing the testing hook in DRT is made 15 difficult by the fact that, in WK1, the caps lock state is queried 16 directly from the OS, using GetCurrentKeyModifiers. 17 18 * fast/forms/caps-lock-indicator-width-expected.txt: Added. 19 * fast/forms/caps-lock-indicator-width.html: Added. 20 * platform/ios-wk1/TestExpectations: 21 * platform/mac-wk1/TestExpectations: 22 1 23 2021-08-11 Ayumi Kojima <ayumi_kojima@apple.com> 2 24 -
trunk/LayoutTests/platform/ios-wk1/TestExpectations
r278498 r280927 1296 1296 fast/text/international/system-language [ Skip ] 1297 1297 1298 # DumpRenderTree doesn't support toggling caps lock key state. WK1 reads caps lock key state directly from the OS. 1299 fast/forms/caps-lock-indicator-width.html [ Skip ] 1300 1298 1301 # Imported Blink tests. 1299 1302 imported/blink/compositing/layer-creation/iframe-clip-removed.html [ ImageOnlyFailure ] -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r280766 r280927 322 322 # DumpRenderTree doesn't support logging calls to runOpenPanel. 323 323 fast/forms/file/open-file-panel.html [ Skip ] 324 325 # DumpRenderTree doesn't support toggling caps lock key state. WK1 reads caps lock key state directly from the OS. 326 fast/forms/caps-lock-indicator-width.html [ Skip ] 324 327 325 328 # WK1 and WK2 mousemove events are subtly different in ways that break this test on WK1. -
trunk/Source/WebCore/ChangeLog
r280924 r280927 1 2021-08-11 Aditya Keerthi <akeerthi@apple.com> 2 3 REGRESSION (r273072): Caps lock indicator in password field is too large 4 https://bugs.webkit.org/show_bug.cgi?id=228970 5 rdar://81546781 6 7 Reviewed by Wenson Hsieh. 8 9 r273072 made it so that flex items with an intrinsic size will honor 10 their aspect ratio when computing their content size. Prior to the 11 change, in taller password fields, the flex item representing the caps 12 lock indicator would be tall and narrow. The height would stretch to 13 fill the container, but the width would maintain its intrinsic width of 14 17px. Now that aspect ratio is accounted for, the width increases to 15 match the height, resulting in a much larger indicator in taller password 16 fields. 17 18 However, while r273072 regressed the appearance of the caps lock 19 indicator, it merely exposed an issue with the styling of the indicator. 20 21 Consider the following test case, which is a reduced version how the 22 caps lock indicator is styled: 23 24 <div style="display: flex; height: 100px"> 25 <div style="content: url(17_x_17_blue_square.svg); align-self: stretch;"></div> 26 </div> 27 28 Prior to r273072, this displayed a 17x17 blue square (inside a 17x100 29 flex item). However, in Chrome, Firefox, and WebKit after r273072, this 30 shows a 100x100 blue square (inside a 100x100 flex item). This is the 31 expected behavior now that aspect ratio is accounted for. 32 33 Consequently, to fix the issue, the width of the indicator must be 34 limited to a maximum value. 17px was chosen to be the max-width, as the 35 indicator's width would not exceed 17px prior to r273072. 36 37 Test: fast/forms/caps-lock-indicator-width.html 38 39 * css/html.css: 40 (input::-webkit-caps-lock-indicator): 41 1 42 2021-08-11 Chris Dumez <cdumez@apple.com> 2 43 -
trunk/Source/WebCore/css/html.css
r280581 r280927 689 689 -webkit-appearance: caps-lock-indicator; 690 690 content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17"><path fill="black" fill-opacity="0.4" d="M12.5 0.5A 4 4 0 0 1 16.5 4.5L 16.5 12.5A 4 4 0 0 1 12.5 16.5L 4.5 16.5A 4 4 0 0 1 0.5 12.5L 0.5 4.5A 4 4 0 0 1 4.5 0.5L 12.5 0.5M 8.5 2L 4 7L 6.25 7L 6.25 10.25L 10.75 10.25L 10.75 7L 13 7L 8.5 2M 10.75 12L 6.25 12L 6.25 14.25L 10.75 14.25L 10.75 12"/></svg>'); 691 max-width: 17px; 691 692 align-self: stretch; 692 693 flex: none;
Note:
See TracChangeset
for help on using the changeset viewer.