Changeset 265157 in webkit
- Timestamp:
- Jul 31, 2020 1:19:02 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r265153 r265157 1 2020-07-31 Aditya Keerthi <akeerthi@apple.com> 2 3 [macOS] Date/time input types should have a textfield appearance 4 https://bugs.webkit.org/show_bug.cgi?id=214978 5 6 Reviewed by Wenson Hsieh. 7 8 Rebaselined tests for updated appearance. 9 10 * platform/mac-wk2/fast/forms/date/date-input-rendering-basic-expected.txt: 11 * platform/mac-wk2/fast/forms/time/time-input-rendering-basic-expected.txt: 12 * platform/mac-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: 13 1 14 2020-07-31 Hector Lopez <hector_i_lopez@apple.com> 2 15 -
trunk/LayoutTests/platform/mac-wk2/fast/forms/date/date-input-rendering-basic-expected.txt
r264044 r265157 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 5 RenderBody {BODY} at (8,8) size 784x584 6 RenderText {#text} at (110, 2) size 4x187 text run at (110, 2) width 4: " "6 RenderText {#text} at (110,3) size 4x18 7 text run at (110,3) width 4: " " 8 8 RenderText {#text} at (0,0) size 0x0 9 layer at (8,10) size 110x 19 clip at (10,12) size 106x1510 RenderFlexibleBox {INPUT} at (0,2) size 110x 19[bgcolor=#FFFFFF] [border: (2px inset #000000)]11 RenderBlock {DIV} at ( 6,3) size 59x139 layer at (8,10) size 110x21 clip at (10,12) size 106x17 10 RenderFlexibleBox {INPUT} at (0,2) size 110x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)] 11 RenderBlock {DIV} at (7,4) size 59x13 12 12 RenderText {#text} at (0,0) size 59x13 13 13 text run at (0,0) width 59: "Apr 1, 1976" 14 layer at (122,10) size 110x 19 clip at (124,12) size 106x1515 RenderFlexibleBox {INPUT} at (114,2) size 110x 19[bgcolor=#FFFFFF] [border: (2px inset #000000)]16 RenderBlock {DIV} at (2 5,3) size 59x1314 layer at (122,10) size 110x21 clip at (124,12) size 106x17 15 RenderFlexibleBox {INPUT} at (114,2) size 110x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)] 16 RenderBlock {DIV} at (24,4) size 59x13 17 17 RenderText {#text} at (0,0) size 59x13 18 18 text run at (0,0) width 59: "Apr 1, 1976" -
trunk/LayoutTests/platform/mac-wk2/fast/forms/time/time-input-rendering-basic-expected.txt
r264044 r265157 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 5 RenderBody {BODY} at (8,8) size 784x584 6 RenderText {#text} at (110, 2) size 4x187 text run at (110, 2) width 4: " "6 RenderText {#text} at (110,3) size 4x18 7 text run at (110,3) width 4: " " 8 8 RenderText {#text} at (0,0) size 0x0 9 layer at (8,10) size 110x 19 clip at (10,12) size 106x1510 RenderFlexibleBox {INPUT} at (0,2) size 110x 19[bgcolor=#FFFFFF] [border: (2px inset #000000)]11 RenderBlock {DIV} at ( 6,3) size 43x139 layer at (8,10) size 110x21 clip at (10,12) size 106x17 10 RenderFlexibleBox {INPUT} at (0,2) size 110x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)] 11 RenderBlock {DIV} at (7,4) size 43x13 12 12 RenderText {#text} at (0,0) size 43x13 13 13 text run at (0,0) width 43: "9:41 AM" 14 layer at (122,10) size 110x 19 clip at (124,12) size 106x1515 RenderFlexibleBox {INPUT} at (114,2) size 110x 19[bgcolor=#FFFFFF] [border: (2px inset #000000)]16 RenderBlock {DIV} at (4 1,3) size 43x1314 layer at (122,10) size 110x21 clip at (124,12) size 106x17 15 RenderFlexibleBox {INPUT} at (114,2) size 110x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)] 16 RenderBlock {DIV} at (40,4) size 43x13 17 17 RenderText {#text} at (0,0) size 43x13 18 18 text run at (0,0) width 18: "AM" -
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt
r264044 r265157 8 8 FAIL <input type="email"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 9 9 FAIL <input type="password"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 10 FAIL <input type="date"> assert_equals: -webkit-appearance expected "auto" but got " menulist-button"11 FAIL <input type="month"> assert_equals: -webkit-appearance expected "auto" but got " menulist-button"12 FAIL <input type="week"> assert_equals: -webkit-appearance expected "auto" but got " menulist-button"13 FAIL <input type="time"> assert_equals: -webkit-appearance expected "auto" but got " menulist-button"14 FAIL <input type="datetime-local"> assert_equals: -webkit-appearance expected "auto" but got " menulist-button"10 FAIL <input type="date"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 11 FAIL <input type="month"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 12 FAIL <input type="week"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 13 FAIL <input type="time"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 14 FAIL <input type="datetime-local"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 15 15 FAIL <input type="number"> assert_equals: -webkit-appearance expected "auto" but got "textfield" 16 16 FAIL <input type="range"> assert_equals: -webkit-appearance expected "auto" but got "slider-horizontal" -
trunk/Source/WebCore/ChangeLog
r265156 r265157 1 2020-07-31 Aditya Keerthi <akeerthi@apple.com> 2 3 [macOS] Date/time input types should have a textfield appearance 4 https://bugs.webkit.org/show_bug.cgi?id=214978 5 6 Reviewed by Wenson Hsieh. 7 8 On iOS, date/time input types have a menulist-button appearance. However, this appearance 9 does not match the style of native date controls on macOS. The textfield appearance 10 with no focus ring brings us closer to a natively styled control. 11 12 * rendering/RenderTheme.h: 13 * rendering/RenderThemeMac.h: 14 * rendering/RenderThemeMac.mm: 15 (WebCore::RenderThemeMac::dateInputStyleSheet const): 16 (WebCore::RenderThemeMac::dateTimeLocalInputStyleSheet const): 17 (WebCore::RenderThemeMac::monthInputStyleSheet const): 18 (WebCore::RenderThemeMac::timeInputStyleSheet const): 19 (WebCore::RenderThemeMac::weekInputStyleSheet const): 20 1 21 2020-07-31 Brady Eidson <beidson@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderTheme.h
r264525 r265157 103 103 #endif 104 104 #if ENABLE(INPUT_TYPE_DATE) 105 String dateInputStyleSheet() const;105 virtual String dateInputStyleSheet() const; 106 106 #endif 107 107 #if ENABLE(INPUT_TYPE_DATETIMELOCAL) 108 String dateTimeLocalInputStyleSheet() const;108 virtual String dateTimeLocalInputStyleSheet() const; 109 109 #endif 110 110 #if ENABLE(INPUT_TYPE_MONTH) 111 String monthInputStyleSheet() const;111 virtual String monthInputStyleSheet() const; 112 112 #endif 113 113 #if ENABLE(INPUT_TYPE_TIME) 114 String timeInputStyleSheet() const;114 virtual String timeInputStyleSheet() const; 115 115 #endif 116 116 #if ENABLE(INPUT_TYPE_WEEK) 117 String weekInputStyleSheet() const;117 virtual String weekInputStyleSheet() const; 118 118 #endif 119 119 -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r264525 r265157 110 110 #endif 111 111 112 #if ENABLE(INPUT_TYPE_DATE) 113 String dateInputStyleSheet() const final; 114 #endif 115 #if ENABLE(INPUT_TYPE_DATETIMELOCAL) 116 String dateTimeLocalInputStyleSheet() const final; 117 #endif 118 #if ENABLE(INPUT_TYPE_MONTH) 119 String monthInputStyleSheet() const final; 120 #endif 121 #if ENABLE(INPUT_TYPE_TIME) 122 String timeInputStyleSheet() const final; 123 #endif 124 #if ENABLE(INPUT_TYPE_WEEK) 125 String weekInputStyleSheet() const final; 126 #endif 127 112 128 #if ENABLE(SERVICE_CONTROLS) 113 129 String imageControlsStyleSheet() const final; -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r264584 r265157 359 359 return [[NSData dataWithContentsOfFile:[bundle pathForResource:iconName ofType:iconType inDirectory:directory]] base64EncodedStringWithOptions:0]; 360 360 } 361 362 #if ENABLE(INPUT_TYPE_DATE) 363 364 String RenderThemeMac::dateInputStyleSheet() const 365 { 366 return "input[type=\"date\"] { -webkit-appearance: textfield; align-items: center; display: -webkit-inline-flex; overflow: hidden; width: 10em; outline: none; } "_s; 367 } 368 369 #endif 370 371 #if ENABLE(INPUT_TYPE_DATETIMELOCAL) 372 373 String RenderThemeMac::dateTimeLocalInputStyleSheet() const 374 { 375 return "input[type=\"datetime-local\"] { -webkit-appearance: textfield; align-items: center; display: -webkit-inline-flex; overflow: hidden; width: 10em; outline: none; } "_s; 376 } 377 378 #endif 379 380 #if ENABLE(INPUT_TYPE_MONTH) 381 382 String RenderThemeMac::monthInputStyleSheet() const 383 { 384 return "input[type=\"month\"] { -webkit-appearance: textfield; align-items: center; display: -webkit-inline-flex; overflow: hidden; width: 10em; outline: none; } "_s; 385 } 386 387 #endif 388 389 #if ENABLE(INPUT_TYPE_TIME) 390 391 String RenderThemeMac::timeInputStyleSheet() const 392 { 393 return "input[type=\"time\"] { -webkit-appearance: textfield; align-items: center; display: -webkit-inline-flex; overflow: hidden; width: 10em; outline: none; } "_s; 394 } 395 396 #endif 397 398 #if ENABLE(INPUT_TYPE_WEEK) 399 400 String RenderThemeMac::weekInputStyleSheet() const 401 { 402 return "input[type=\"week\"] { -webkit-appearance: textfield; align-items: center; display: -webkit-inline-flex; overflow: hidden; width: 10em; outline: none; } "_s; 403 } 404 405 #endif 361 406 362 407 #if ENABLE(SERVICE_CONTROLS)
Note: See TracChangeset
for help on using the changeset viewer.