Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Issue 11557024: Merge 136808 (Closed)

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

Description

Merge 136808 > INPUT_MULTIPLE_FIELDS_UI doesn't show digits well in RTL locales > https://bugs.webkit.org/show_bug.cgi?id=103869 > > Reviewed by Hajime Morita. > > Source/WebCore: > > We need to use display:inline elements to wrap sub-fields and static > text in DateTimeEditElement children to apply the Unicode Bidi > Algorithm. > > Because we can't use display:inline-block for them, we can't specify > min-width CSS property for them. We stop using customStyleForRenderer of > sub-fields to specify each of their widths, and use > customStyleForRenderer of DateTimeEditElement to specify the total > required width. A sub-field width shrink and grow so that the width fits > to the field value, and a DateTimeEditElement doesn't. > > No new tests. Coverred by existing tests, especially > fast/forms/datetime/datetime-appearance-l10n.html shows "23:59" > correctly. > > * css/html.css: > (input::-webkit-datetime-edit-year-field): > - Make this display:inline to apply the Unicode Bidi Algorithm. > - Use padding instead of margin because of ease of width computation. > Also, the focus apparance gets better by padding. > - Don't allow to specify font property here because of ease of width > computation. > - Remove text-align:center. It doesn't work for display:inline. > (input::-webkit-datetime-edit-text): > - Make this display:inline to apply the Unicode Bidi Algorithm. > - Don't allow to specify font property here because of ease of width > computation. > > * html/shadow/DateTimeEditElement.h: > (DateTimeEditElement): Declare customStyleForRenderer. > * html/shadow/DateTimeEditElement.cpp: > (WebCore::DateTimeEditElement::DateTimeEditElement): > Enable customStyleForRenderer. > (WebCore::DateTimeEditElement::customStyleForRenderer): > Compute required width with a font for this element and child maximum > widths, and set it to min-width style. > The resultant width value can be inaccurate if a page author specifies > padding, border, margin, etc. to ::-webkit-datetime-edit-*-field or > ::-webkit-datetime-edit-text. In such case, the page author should specify > wider width to <input>. > > * dom/Element.h: > (Element): Add isDateTimeFieldElement to do static_cast<DateTimeFieldElement> safely. > * dom/Element.cpp: > (WebCore::Element::isDateTimeFieldElement): Added. > > * html/shadow/DateTimeFieldElement.h: > (DateTimeFieldElement): Declare isDateTimeFieldElement and maximumWidth. > * html/shadow/DateTimeFieldElement.cpp: > (WebCore::DateTimeFieldElement::isDateTimeFieldElement): > Added. Returns true. > (WebCore::DateTimeFieldElement::maximumWidth): > Added. Returns padding width. > > * html/shadow/DateTimeSymbolicFieldElement.h: > (DateTimeSymbolicFieldElement): > Remove customStyleForRenderer, and declare maximumWidth. > * html/shadow/DateTimeSymbolicFieldElement.cpp: > (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement): > Disable customStyleForRenderer. > (WebCore::DateTimeSymbolicFieldElement::maximumWidth): > Added. Returns the expected maximum width with the specified font. > > * html/shadow/DateTimeNumericFieldElement.h: > (DateTimeNumericFieldElement): > Remove customStyleForRenderer, declare maximumWidth, and make m_placeholder > non-const because it is updated in the constructor. > * html/shadow/DateTimeNumericFieldElement.cpp: > (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): > Disable customStyleForRenderer. > If a numeric value for this field is LTR and the whole direction is RTL, > wrap the placeholder string with left-to-right-mark and > right-to-left-mark so that it is handled as LTR. Without this, > sub-fields order would be changed when the content of a field is changed > from a placeholder to a numeric value. > (WebCore::DateTimeNumericFieldElement::maximumWidth): > Added. Returns the expected maximum width with the specified font. > > LayoutTests: > > - Year fields and month fields are shrunk because we stop specifying > min-width. > - Focus rectangle for sub-fields get larger. > > * fast/forms/date-multiple-fields/date-multiple-fields-mouse-events.html: > Need to update mouse click positions because we have some position/width > changes in sub-fields. > * fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html: > Ditto. > * fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html: > Ditto. > * platform/chromium-mac/fast/forms/date/date-appearance-basic-expected.png: > * platform/chromium-mac/fast/forms/datetime/datetime-l10n-expected.png: > * platform/chromium-mac/fast/forms/month/month-appearance-basic-expected.png: > * platform/chromium-mac/fast/forms/time/time-appearance-basic-expected.png: > * platform/chromium-mac/fast/forms/week/week-appearance-basic-expected.png: > * platform/chromium/TestExpectations: TBR=tkent@chromium.org BUG=crbug.com/163108 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=137541

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -37 lines) Patch
M LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-mouse-events.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/chromium/TestExpectations View 1 chunk +28 lines, -0 lines 0 comments Download
M Source/WebCore/css/html.css View 3 chunks +9 lines, -4 lines 0 comments Download
M Source/WebCore/dom/Element.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebCore/dom/Element.cpp View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeEditElement.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeEditElement.cpp View 3 chunks +29 lines, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeFieldElement.h View 3 chunks +3 lines, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeFieldElement.cpp View 2 chunks +11 lines, -0 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeNumericFieldElement.h View 2 chunks +2 lines, -4 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp View 3 chunks +21 lines, -14 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp View 2 chunks +5 lines, -13 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
tkent
8 years ago (2012-12-13 01:25:10 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698