[CherryPick] Refactoring: Move the content of HTMLInputElement::subtreeHasChanged...
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2012 00:38:30 +0000 (00:38 +0000)
committerjinwoo jeong <jw00.jeong@samsung.com>
Thu, 28 Mar 2013 03:52:38 +0000 (12:52 +0900)
commit16c7b769eb0594ddbfe1e22854469d30c69d7877
tree026f62a7aa0aabc65f85746abcf5a98c1d080f9c
parent662f276e61d216b11c0b5b1f8bfbc207f69350c5
[CherryPick] Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType

[Title] Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType
[Issues] N_SE-28998
[Problem] Input type number not showing any error message in Jquery mobile single page application
[Solution] Cherry picked.
[Cherry-Picker] Jinwoo Jeong <jw00.jeong@samsung.com>

Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=103195

Reviewed by Kentaro Hara.

HTMLInputElement::subtreeHasChanged is called only if the input is
a text field. The code should be moved to TextFieldInputType.

No new tests. This should not change any behavior.

* html/HTMLInputElement.cpp:
- Remove unnecessary NumberInputType.h inclusion.
- Remove convertFromVisibleValue. It was used only by subtreeHasChanged.
(WebCore::HTMLInputElement::subtreeHasChanged):
Move the code to TextFieldInputType::subtreeHasChanged except
calculateAndAdjustDirectionality, which is a protected member of
HTMLElement.
* html/HTMLInputElement.h:
(HTMLInputElement): Remove convertFromVisibleValue.

* html/InputType.cpp:
Move convertFromVisibleValue to TextFieldInputType.
(WebCore::InputType::subtreeHasChanged):
Add ASSERT_NOT_REACHED.
* html/InputType.h:
(InputType): Remove convertFromVisibleValue.

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::convertFromVisibleValue):
Moved from InputType.
(WebCore::TextFieldInputType::subtreeHasChanged):
Moved from HTMLInputElement. A latter part is moved to
didSetValueByUserEdit to be hooked by SearchInputType.
(WebCore::TextFieldInputType::didSetValueByUserEdit):
Moved from HTMLInputElement::subtreeHasChanged, and clean up the code.
* html/TextFieldInputType.h:
(TextFieldInputType):
- Move convertFromVisibleValue from InputType.
- Add didSetValueByUserEdit and subtreeHasChanged.

* html/SearchInputType.cpp:
(WebCore::SearchInputType::didSetValueByUserEdit):
Renamed from subtreeHasChanged, and calls TextFieldInputType::didSetValueByUserEdit.
* html/SearchInputType.h:
(SearchInputType): Rename subtreeHasChanged to didSetValueByUserEdit.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135675 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:

Source/WebCore/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/SearchInputType.cpp
Source/WebCore/html/SearchInputType.h
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/TextFieldInputType.h