Changeset 131421 in webkit
- Timestamp:
- Oct 15, 2012 11:54:46 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r131420 r131421 1 2012-10-15 Kent Tamura <tkent@chromium.org> 2 3 Fix some appearance glitches of multiple fields input elements 4 https://bugs.webkit.org/show_bug.cgi?id=99412 5 6 Reviewed by Kentaro Hara. 7 8 All of rendering tests for multiple fields inputs need rebaseline 9 because of the padding change. 10 11 * fast/forms/time-multiple-fields/time-multiple-fields-appearance-style-expected.txt: 12 * fast/forms/time-multiple-fields/time-multiple-fields-appearance-style.html: 13 Add a fixed height case. 14 * platform/chromium-mac/fast/forms/date-multiple-fields/date-multiple-fields-appearance-style-expected.png: 15 * platform/chromium-mac/fast/forms/time-multiple-fields/time-multiple-fields-appearance-style-expected.png: 16 * platform/chromium/TestExpectations: 17 1 18 2012-10-16 Keishi Hattori <keishi@webkit.org> 2 19 -
trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-appearance-style-expected.txt
r127396 r131421 4 4 font-size: 5 5 font-size with fixed input width: 6 Fixed input height: -
trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-appearance-style.html
r127396 r131421 7 7 <li>font-size: <input type="time" value="12:34" style="font-size: 20pt"></li> 8 8 <li>font-size with fixed input width: <input type="time" value="12:34" style="font-size: 20pt; width: 10em;"></li> 9 <li>Fixed input height: <input type="time" value="12:34" style="height: 4em;"></li> 9 10 </ul> 11 <script> 12 if (window.testRunner) 13 testRunner.dumpAsText(true); 14 </script> 10 15 </body> 11 <script>12 if (window.testRunner) {13 testRunner.dumpAsText(true);14 }15 </script>16 16 </html> -
trunk/LayoutTests/platform/chromium/TestExpectations
r131420 r131421 3893 3893 webkit.org/b/99421 platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance.html [ Pass ImageOnlyFailure ] 3894 3894 3895 webkit.org/b/99412 fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ] 3896 webkit.org/b/99412 fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements.html [ Pass ImageOnlyFailure ] 3897 webkit.org/b/99412 fast/forms/date-multiple-fields/date-multiple-fields-appearance-style.html [ Pass ImageOnlyFailure ] 3898 webkit.org/b/99412 fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ] 3899 webkit.org/b/99412 fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html [ Pass ImageOnlyFailure ] 3900 webkit.org/b/99412 fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html [ Pass ImageOnlyFailure ] 3901 webkit.org/b/99412 fast/forms/time-multiple-fields/time-multiple-fields-appearance-disabled-readonly.html [ Pass ImageOnlyFailure ] 3902 webkit.org/b/99412 fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ] 3903 webkit.org/b/99412 fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements.html [ Pass ImageOnlyFailure ] 3904 webkit.org/b/99412 fast/forms/time-multiple-fields/time-multiple-fields-appearance-style.html [ Pass ImageOnlyFailure ] 3905 webkit.org/b/99412 fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes.html [ Pass ImageOnlyFailure ] 3906 webkit.org/b/99412 fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html [ Pass ImageOnlyFailure ] 3907 webkit.org/b/99412 fast/forms/week-multiple-fields/week-multiple-fields-appearance-style.html [ Pass ImageOnlyFailure ] 3908 webkit.org/b/99412 [ Mac Linux Win ] platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar.html [ Pass ImageOnlyFailure ] 3909 webkit.org/b/99412 [ Mac Linux Win ] platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar.html [ Pass ImageOnlyFailure ] 3910 webkit.org/b/99412 [ Mac Linux Win ] platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-appearance.html [ Pass ImageOnlyFailure ] 3911 3895 3912 webkit.org/b/96549 [ Mac Android ] platform/chromium/virtual/gpu/fast/hidpi/focus-rings.html [ ImageOnlyFailure ] 3896 3913 webkit.org/b/96549 [ Mac ] platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r131419 r131421 1 2012-10-15 Kent Tamura <tkent@chromium.org> 2 3 Fix some appearance glitches of multiple fields input elements 4 https://bugs.webkit.org/show_bug.cgi?id=99412 5 6 Reviewed by Kentaro Hara. 7 8 1. If CSS-specified width is wider than the intrinsic width of an input, 9 the spin button and the picker indicator triangle should be put at the 10 right side of the content area. 11 12 2. Remove top, right, and bottom paddings to match input[type=number] 13 appearance as possible. 14 15 3. Remove unnecessary position:relative for spin buttons. 16 17 4. Center content vertically if the height is taller than the intrinsic height. 18 19 Tests: Update all of rendering tests for input element with multiple fields UI. 20 21 * css/html.css: 22 (input[type="date"]): 23 - Specify display:-webkit-inline-flex and -webkit-align-items:stretch to center contents. 24 - Remove top/right/bottom paddings. 25 (input[type="datetime"]): Ditto. 26 (input[type="datetime-local"]): Ditto. 27 (input[type="month"]): Ditto. 28 (input[type="time"]): Ditto. 29 (input[type="week"]): Ditto. 30 (input::-webkit-datetime-edit): 31 - Switch to the starndard flexible box from the legacy one. 32 - Add white-space:pre to avoid to collapse white spaces. 33 (input::-webkit-datetime-edit-gap): 34 Added. This element is added to push a spin button to the right side. 35 (input::-webkit-date-and-time-container): 36 Add -webkit-flex:1 for the input flexible box. 37 Sort properties. 38 (input[type="week"]::-webkit-inner-spin-button): 39 - Use this in date, datetime, datetime-local, and week types. 40 - Add display:inline-block because other elements in -webkit-datetime-edit is inilne. 41 - Add position:static to cancel position:relative below. 42 43 * html/shadow/DateTimeEditElement.cpp: 44 (WebCore::DateTimeEditElement::layout): 45 Add an element with -webkit-datetime-edit-gap before a spin button. 46 1 47 2012-10-15 Yury Semikhatsky <yurys@chromium.org> 2 48 -
trunk/Source/WebCore/css/html.css
r131378 r131421 480 480 #if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE 481 481 input[type="date"] { 482 -webkit-align-items: stretch; 483 display: -webkit-inline-flex; 482 484 font-family: monospace; 485 padding: 0 0 0 1px; 483 486 } 484 487 #endif 485 488 #if defined(ENABLE_INPUT_TYPE_DATETIME) && ENABLE_INPUT_TYPE_DATETIME 486 489 input[type="datetime"] { 490 -webkit-align-items: stretch; 491 display: -webkit-inline-flex; 487 492 font-family: monospace; 493 padding: 0 0 0 1px; 488 494 } 489 495 #endif 490 496 #if defined(ENABLE_INPUT_TYPE_DATETIMELOCAL) && ENABLE_INPUT_TYPE_DATETIMELOCAL 491 497 input[type="datetime-local"] { 498 -webkit-align-items: stretch; 499 display: -webkit-inline-flex; 492 500 font-family: monospace; 501 padding: 0 0 0 1px; 493 502 } 494 503 #endif 495 504 #if defined(ENABLE_INPUT_TYPE_MONTH) && ENABLE_INPUT_TYPE_MONTH 496 505 input[type="month"] { 506 -webkit-align-items: stretch; 507 display: -webkit-inline-flex; 497 508 font-family: monospace; 509 padding: 0 0 0 1px; 498 510 } 499 511 #endif 500 512 #if defined(ENABLE_INPUT_TYPE_TIME) && ENABLE_INPUT_TYPE_TIME 501 513 input[type="time"] { 514 -webkit-align-items: stretch; 515 display: -webkit-inline-flex; 502 516 font-family: monospace; 517 padding: 0 0 0 1px; 503 518 } 504 519 #endif 505 520 #if defined(ENABLE_INPUT_TYPE_WEEK) && ENABLE_INPUT_TYPE_WEEK 506 521 input[type="week"] { 522 -webkit-align-items: stretch; 523 display: -webkit-inline-flex; 507 524 font-family: monospace; 525 padding: 0 0 0 1px; 508 526 } 509 527 #endif 510 528 511 529 input::-webkit-datetime-edit { 512 -webkit-user-modify: read-only !important; 513 display: -webkit-box; 514 -webkit-box-align: center; 530 -webkit-align-items: center; 531 -webkit-flex: 1; 532 -webkit-user-modify: read-only !important; 533 display: -webkit-flex; 534 white-space: pre; 515 535 } 516 536 … … 592 612 } 593 613 614 input::-webkit-datetime-edit-gap { 615 -webkit-flex: 1; 616 -webkit-user-modify: read-only !important; 617 display: inline-block; 618 } 619 594 620 input::-webkit-date-and-time-container { 621 -webkit-align-items: center; 622 -webkit-flex: 1; 595 623 display: -webkit-flex; 596 -webkit-align-items: center;597 624 } 598 625 … … 617 644 } 618 645 646 input[type="date"]::-webkit-inner-spin-button, 647 input[type="datetime"]::-webkit-inner-spin-button, 648 input[type="datetime-local"]::-webkit-inner-spin-button, 619 649 input[type="month"]::-webkit-inner-spin-button, 620 input[type="time"]::-webkit-inner-spin-button { 650 input[type="time"]::-webkit-inner-spin-button, 651 input[type="week"]::-webkit-inner-spin-button { 652 display: inline-block; 621 653 margin-left: 0.2em; 654 position: static; 622 655 } 623 656 #endif -
trunk/Source/WebCore/html/shadow/DateTimeEditElement.cpp
r130848 r131421 397 397 } 398 398 399 DEFINE_STATIC_LOCAL(AtomicString, gapPseudoId, ("-webkit-datetime-edit-gap", AtomicString::ConstructFromLiteral)); 400 RefPtr<HTMLDivElement> gapElement = HTMLDivElement::create(document()); 401 gapElement->setShadowPseudoId(gapPseudoId); 402 appendChild(gapElement); 399 403 RefPtr<SpinButtonElement> spinButton = SpinButtonElement::create(document(), *this); 400 404 m_spinButton = spinButton.get();
Note: See TracChangeset
for help on using the changeset viewer.