HTMLTextFormControlElement::subtreeHasChanged should be called before updating selection
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Feb 2014 00:36:36 +0000 (00:36 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Feb 2014 00:36:36 +0000 (00:36 +0000)
commit9c46dbea0f631e595946cf8e541b8c8d4f79555e
tree60912c80607dda47b9b923ac524f0087901216bc
parentc47d8590eee607667b5767cde1e43d185dd4cbfd
HTMLTextFormControlElement::subtreeHasChanged should be called before updating selection
https://bugs.webkit.org/show_bug.cgi?id=128870

Reviewed by Darin Adler.

Extracted HTMLTextFormControlElement::didEditInnerTextValue out of HTMLTextFormControlElement::defaultEventHandler
and called it in appliedEditing, unappliedEditing, and reappliedEditing before updating selection.

* editing/Editor.cpp:
(WebCore::notifyTextFromControls): Added.
(WebCore::Editor::appliedEditing): Update text form control's internal states before updating selection.
(WebCore::Editor::unappliedEditing): Ditto.
(WebCore::Editor::reappliedEditing): Ditto.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::subtreeHasChanged): Removed a stale assertion from the time we used to do
everything in the render tree.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/TextFieldInputType.cpp