Changeset 271218 in webkit
- Timestamp:
- Jan 6, 2021, 3:45:44 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/select-empty-size-expected.html (added)
-
LayoutTests/fast/forms/select-empty-size.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/html.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271209 r271218 1 2021-01-06 Aditya Keerthi <akeerthi@apple.com> 2 3 [macOS] Text inside form controls is off center on burton.com 4 https://bugs.webkit.org/show_bug.cgi?id=220376 5 <rdar://problem/72833977> 6 7 Reviewed by Devin Rousso. 8 9 Added a test to verify that the appearance of a <select> element with 10 an empty size attribute is the same as one without a size attribute. 11 12 * fast/forms/select-empty-size-expected.html: Added. 13 * fast/forms/select-empty-size.html: Added. 14 1 15 2021-01-06 Ryan Haddad <ryanhaddad@apple.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r271216 r271218 1 2021-01-06 Aditya Keerthi <akeerthi@apple.com> 2 3 [macOS] Text inside form controls is off center on burton.com 4 https://bugs.webkit.org/show_bug.cgi?id=220376 5 <rdar://problem/72833977> 6 7 Reviewed by Devin Rousso. 8 9 <select> elements on burton.com specify an empty size attribute. This 10 results in the "select:matches([size], [multiple]), select[size][multiple]" 11 ruleset being applied, which adds the rule "align-items: flex-start". That 12 rules causes the text within the element to be aligned to the top. 13 14 This rule is necessary for <select multiple> and <select> elements with 15 a size attribute greater than or equal to 2, which both have a listbox 16 appearance (a popup menu is not shown when clicking the element). 17 However, <select> elements with a size attribute less than or equal to 1 18 have a menulist appearance and display a popup when clicked. 19 20 <select size> also displays a popup when clicked, and like other browsers 21 it should have vertically centered text. WebKit already has an additional 22 ruleset for size="0" and size="1" to preserve the menulist appearance. 23 Consequently, we can augment the ruleset to include size="", removing the 24 "align-items: flex-start" rule for <select size> and ensuring the text is 25 vertically centered. 26 27 Test: fast/forms/select-empty-size.html 28 29 * css/html.css: 30 (select:is([size], [multiple]), select[size][multiple]): 31 32 Update ruleset to use :is(), instead of the obsolete :matches(). 33 34 (select:is([size=""], [size="0"], [size="1"])): 35 36 Add [size=""] to the list of matching attributes, since <select size> 37 should not have a listbox appearance. The new appearance matches 38 Chrome and Firefox. 39 1 40 2021-01-06 Devin Rousso <drousso@apple.com> 2 41 -
trunk/Source/WebCore/css/html.css
r270784 r271218 1007 1007 1008 1008 #if !(defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY) 1009 select: matches([size], [multiple]), select[size][multiple] {1009 select:is([size], [multiple]), select[size][multiple] { 1010 1010 -webkit-appearance: listbox; 1011 1011 align-items: flex-start; … … 1015 1015 } 1016 1016 1017 select: matches([size="0"], [size="1"]) {1017 select:is([size=""], [size="0"], [size="1"]) { 1018 1018 -webkit-appearance: menulist; 1019 1019 align-items: center;
Note:
See TracChangeset
for help on using the changeset viewer.