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

Issue 11420032: Merge 134239 - Refactoring: set read-only values on layout in DateTimeEditElement (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/1312/
Visibility:
Public.

Description

Merge 134239 - Refactoring: set read-only values on layout in DateTimeEditElement https://bugs.webkit.org/show_bug.cgi?id=101916 Reviewed by Kentaro Hara. We have always updated read-only values when we set an empty value or DateTimeFieldsState. It has wasted CPU time because such read-only values are never updated after layout() essentially. So, we set read-only values in DateTimeEditBuilder used by layout(), and remove dateForReadOnlyField arguments of setEmptyValue and setValueAsDateTimeFieldsState. No new tests. This should not make behavior changes. * html/BaseMultipleFieldsDateAndTimeInputType.cpp: (WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState): We removed dateForReadOnlyField argument because read-only values are already set in DateTimeFieldElement::layout(). * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditBuilder::visitField): Set a value to a read-only minute/second/millisecond field while building UI elements. Also, changed variable types for millisecond and second fields to RefPtr<DateTimeNumericFieldElement> because we'd like to call setValueAsDate, which is private in DateTimeMillisecondFieldElement and DateTimeSecondFieldElement (WebCore::DateTimeEditElement::setValueAsDateTimeFieldsState): We removed dateForReadOnlyField argument because read-only values are already set in DateTimeFieldElement::layout(). (WebCore::DateTimeEditElement::setEmptyValue): Ditto. * html/shadow/DateTimeEditElement.h: (DateTimeEditElement): Removed dateForReadOnlyField argument for setValueAsDateTimeFieldsState. * html/shadow/DateTimeFieldElement.cpp: (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): We removed dateForReadOnlyField argument because read-only values are already set in DateTimeFieldElement::layout(). * html/shadow/DateTimeFieldElement.h: (DateTimeFieldElement): Ditto. * html/shadow/DateTimeFieldElements.cpp: Ditto. * html/shadow/DateTimeFieldElements.h: Ditto. * html/shadow/DateTimeNumericFieldElement.cpp: (WebCore::DateTimeNumericFieldElement::setEmptyValue): It should do nothing if it is read-only because a read-only value was already set just after construction. * html/shadow/DateTimeNumericFieldElement.h: (DateTimeNumericFieldElement): Removed dateForReadOnlyField argument of setEmptyValue. * html/shadow/DateTimeSymbolicFieldElement.cpp: (WebCore::DateTimeSymbolicFieldElement::setEmptyValue): Ditto. * html/shadow/DateTimeSymbolicFieldElement.h: (DateTimeSymbolicFieldElement): Ditto. TBR=tkent@chromium.org BUG=crbug.com/160501 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=134891

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -61 lines) Patch
M Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeEditElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/html/shadow/DateTimeEditElement.cpp View 4 chunks +14 lines, -8 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeFieldElement.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeFieldElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/html/shadow/DateTimeFieldElements.h View 10 chunks +10 lines, -10 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeFieldElements.cpp View 14 chunks +29 lines, -29 lines 0 comments Download
M Source/WebCore/html/shadow/DateTimeNumericFieldElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp View 1 chunk +2 lines, -4 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 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
tkent
8 years, 1 month ago (2012-11-16 05:42:39 UTC) #1
tkent
8 years, 1 month ago (2012-11-16 05:54:49 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698