is<HTMLTextFormControlElement> reports the input type.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Dec 2017 04:05:33 +0000 (04:05 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Dec 2017 04:05:33 +0000 (04:05 +0000)
commit96a89422d4ca6d2cdb39c5334c92578754cffdad
tree5e86936480a7071352cda26369668f0d8c68e73a
parent5948dae9d01c9ef125f9ac716081ffaf9e348809
is<HTMLTextFormControlElement> reports the input type.
https://bugs.webkit.org/show_bug.cgi?id=180721
<rdar://problem/36005123>

Reviewed by Ryosuke Niwa.

This patch ensures that is<HTMLTextFormControlElement> consistently returns true even
when the input type changes from text to non-text (checkbox etc).

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectText):
* dom/Element.h:
(WebCore::Element::isTextFormControlElement const):
(WebCore::Element::isTextField const):
(WebCore::Element::isTextFormControl const): Deleted.
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::setBaseWritingDirection):
(WebCore::findFirstMarkable):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
* html/FormController.cpp:
(WebCore::FormController::formElementsCharacterCount const):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::directionality const):
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
(WebCore::HTMLTextFormControlElement::selectedText const):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::selectionStart const):
(WebCore::HTMLTextFormControlElement::computeSelectionStart const):
(WebCore::HTMLTextFormControlElement::selectionEnd const):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd const):
(WebCore::HTMLTextFormControlElement::selectionDirection const):
(WebCore::HTMLTextFormControlElement::computeSelectionDirection const):
(WebCore::HTMLTextFormControlElement::selection const):
(WebCore::HTMLTextFormControlElement::selectionChanged):
(WebCore::HTMLTextFormControlElement::lastChangeWasUserEdit const):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
(WebCore::enclosingTextFormControl):
* html/HTMLTextFormControlElement.h:
(isType):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isOverTextInsideFormControlElement const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/cssjit/SelectorCompiler.cpp
Source/WebCore/dom/Element.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/html/FormController.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/rendering/HitTestResult.cpp