Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(13)

Issue 12159003: Merge 141195 (Closed)

Created:
8 years, 1 month ago by tkent
Modified:
8 years, 1 month ago
Reviewers:
tkent
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Visibility:
Public.

Description

Merge 141195 > INPUT_MULTIPLE_FIELDS_UI: The content should not overflow the <input> boundary > https://bugs.webkit.org/show_bug.cgi?id=108069 > > Reviewed by Hajime Morita. > > Source/WebCore: > > To avoid the overflow, we do: > A) Specify overflow:hidden to <input>. > > However, we need to make sub-fields and buttons workable even if the > width is smaller than the intrinsic size. So, we do: > B) Make DateTimeEditElement shrinkable, and > C) Make the sub-fields scrollable horizontally like input[type=text]. > > To achieve B, we need to remove -webkit-date-and-time-container (D) > because width property for <input> can shrink only the direct child > elements. > > Tests: fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll.html > and new test cases in fast/forms/date/date-appearance-basic.html. > > * css/html.css: > (input[type="date"]): > Change -webkit-align-items value. (D) > Specify overflow:hidden. (A) > (input[type="datetime"]): Ditto. > (input[type="datetime-local"]): Ditto. > (input[type="month"]): Ditto. > (input[type="time"]): Ditto. > (input[type="week"]): Ditto. > (input::-webkit-datetime-edit): > Add min-width:0 (B), and overflow:hidden. (C) > Remove unnecessary white-space:pre because of white-space:nowrap below. > (input::-webkit-datetime-edit-fields-wrapper): > Added. This is the child of -webkit-datetime-edit, and contains > sub-fields. (C) > * html/BaseMultipleFieldsDateAndTimeInputType.cpp: > (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): > Remove -webkit-date-and-time-container, and append DateTimeEditElement, > spin button, and picker indicator element to the ShadowRoot. (D) > (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldApplyLocaleDirection): > <input> for multiple fields UI should have the direction of the browser > locale. This is a replacement of the code for dir attribute in > updateInnerTextValue below. (D) > (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): > Remove the code to set dir= to -webkit-date-and-time-container. > * html/BaseMultipleFieldsDateAndTimeInputType.h: > (BaseMultipleFieldsDateAndTimeInputType): > Declare shouldApplyLocaleDirection. (D) > * html/HTMLInputElement.cpp: > (WebCore::HTMLInputElement::HTMLInputElement): > Calls setHasCustomCallbacks for customStyleForRenderer. (D) > (WebCore::HTMLInputElement::customStyleForRenderer): > Set direction to RenderStyle if shouldApplyLocaleDirection is true. This > is a replacement of the dir setting code in > BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue. (D) > * html/HTMLInputElement.h: > (HTMLInputElement): Declare customStyleForRenderer. (D) > * html/InputType.cpp: > (WebCore::InputType::shouldApplyLocaleDirection): > Add default implmentation of shouldApplyLocaleDirection. (D) > * html/InputType.h: > (InputType): Declare shouldApplyLocaleDirection. (D) > > * html/shadow/DateTimeEditElement.cpp: > (WebCore::DateTimeEditBuilder::visitLiteral): > Add elements to -webkit-datetime-edit-fields-wrapper element. (C) > (WebCore::DateTimeEditElement::fieldsWrapperElement): > A helper to get -webkit-datetime-edit-fields-wrapper element. (C) > (WebCore::DateTimeEditElement::addField): > Add elements to -webkit-datetime-edit-fields-wrapper element. (C) > (WebCore::DateTimeEditElement::customStyleForRenderer): > - Iterate over children of -webkit-datetime-edit-fields-wrapper element. (C) > - Set width property instead of min-width. (B) > (WebCore::DateTimeEditElement::layout): > - Prepare -webkit-datetime-edit-fields-wrapper element. (C) > - Handle children of -webkit-datetime-edit-fields-wrapper element. (C) > - Need to do style recalc because child structure is changed. (C) > * html/shadow/DateTimeEditElement.h: > (DateTimeEditElement): Declare fieldsWrapperElement. (C) > > LayoutTests: > > * fast/forms/date/date-appearance-basic-expected.txt: > * fast/forms/date/date-appearance-basic.html: > Add test cases for small width and small height. > * fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html: > Update the code because of shadow tree structure change. > * fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll.html: > Added. > * fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll-expected.txt: > Added. > * platform/chromium-mac/fast/forms/date/date-appearance-basic-expected.png: > * platform/chromium/TestExpectations: > - date-appearance-basic.html: New test cases are added. > - *-appearance-pseudo-element.html: :before :after position is slightly > changed because of the -webkit-align-items change. > - suggestion-picker/*.html: RTL behavior is changed. The direction of > suggestion pickers matches to the direction of the input content > (browser locale). TBR=tkent@chromium.org BUG=crbug.com/172029 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=141526

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -33 lines) Patch
M LayoutTests/fast/forms/date/date-appearance-basic.html View 1 chunk +4 lines, -2 lines 0 comments Download
M LayoutTests/fast/forms/date/date-appearance-basic-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html View 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/platform/chromium/TestExpectations View 1 chunk +20 lines, -0 lines 0 comments Download
M Source/WebCore/css/html.css View 3 chunks +21 lines, -13 lines 0 comments Download
M Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp View 3 chunks +6 lines, -9 lines 0 comments Download
M Source/WebCore/html/HTMLInputElement.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLInputElement.cpp View 4 chunks +20 lines, -0 lines 0 comments Download
M Source/WebCore/html/InputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/InputType.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeEditElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeEditElement.cpp View 6 chunks +23 lines, -8 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
tkent
8 years, 1 month ago (2013-02-01 03:26:11 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698