Add checked casts for ScriptExecutionContext.
<https://webkit.org/b/128874>

Generate casting helpers for casting from ScriptExecutionContext to
Document and WorkerGlobalScope. Apply heartily.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@164183 268f45cc-cd09-0410-ab3c-d52691b4dbfc