Changeset 152218 in webkit


Ignore:
Timestamp:
Jul 1, 2013 3:43:48 AM (11 years ago)
Author:
kangil.han@samsung.com
Message:

Adopt toHTMLTextAreaElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118226

Reviewed by Andreas Kling.

To enhance readability, this patch adopts toHTMLTextAreaElement.
This also helps out to reduce duplicated use of static_cast.

Source/WebCore:

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::text):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setValue):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::appendText):

  • html/HTMLFormControlElement.cpp:

(WebCore::shouldAutofocus):

  • html/HTMLTextAreaElement.h:

(WebCore::toHTMLTextAreaElement):

  • page/FocusController.cpp:

(WebCore::clearSelectionIfNeeded):

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::isContentEditable):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::sizesLogicalWidthToFitContent):

  • rendering/RenderTextControlMultiLine.cpp:

(WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):

  • testing/Internals.cpp:

(WebCore::Internals::wasLastChangeUserEdit):

Source/WebKit/blackberry:

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):

  • WebKitSupport/DOMSupport.cpp:

(BlackBerry::WebKit::DOMSupport::isTextInputElement):
(BlackBerry::WebKit::DOMSupport::inputElementText):

  • WebKitSupport/InputHandler.cpp:

(BlackBerry::WebKit::InputHandler::elementType):
(BlackBerry::WebKit::InputHandler::boundingBoxForInputField):

Source/WebKit/mac:

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::textDidChangeInTextArea):

Source/WebKit/win:

  • DOMCoreClasses.cpp:

(DOMElement::createInstance):

  • DOMHTMLClasses.cpp:

(DOMHTMLTextAreaElement::form):
(DOMHTMLTextAreaElement::value):
(DOMHTMLTextAreaElement::setValue):
(DOMHTMLTextAreaElement::select):
(DOMHTMLTextAreaElement::isUserEdited):

Source/WebKit2:

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):

  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

(WebKit::PDFPluginTextAnnotation::createAnnotationElement):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::textDidChangeInTextArea):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::containsAnyFormControls):

Location:
trunk/Source
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152217 r152218  
     12013-07-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        Adopt toHTMLTextAreaElement for code cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=118226
     5
     6        Reviewed by Andreas Kling.
     7
     8        To enhance readability, this patch adopts toHTMLTextAreaElement.
     9        This also helps out to reduce duplicated use of static_cast.
     10
     11        * accessibility/AccessibilityNodeObject.cpp:
     12        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
     13        (WebCore::AccessibilityNodeObject::isNativeTextControl):
     14        (WebCore::AccessibilityNodeObject::isReadOnly):
     15        (WebCore::AccessibilityNodeObject::text):
     16        * accessibility/AccessibilityRenderObject.cpp:
     17        (WebCore::AccessibilityRenderObject::setValue):
     18        * css/StyleResolver.cpp:
     19        (WebCore::StyleResolver::adjustRenderStyle):
     20        * editing/markup.cpp:
     21        (WebCore::StyledMarkupAccumulator::appendText):
     22        * html/HTMLFormControlElement.cpp:
     23        (WebCore::shouldAutofocus):
     24        * html/HTMLTextAreaElement.h:
     25        (WebCore::toHTMLTextAreaElement):
     26        * page/FocusController.cpp:
     27        (WebCore::clearSelectionIfNeeded):
     28        * rendering/HitTestResult.cpp:
     29        (WebCore::HitTestResult::isContentEditable):
     30        * rendering/RenderBox.cpp:
     31        (WebCore::RenderBox::sizesLogicalWidthToFitContent):
     32        * rendering/RenderTextControlMultiLine.cpp:
     33        (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
     34        (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
     35        (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
     36        * testing/Internals.cpp:
     37        (WebCore::Internals::wasLastChangeUserEdit):
     38
    1392013-07-01  Kwang Yul Seo  <skyul@company100.net>
    240
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r152203 r152218  
    306306        return selectElement->multiple() ? ListBoxRole : PopUpButtonRole;
    307307    }
    308     if (node()->hasTagName(textareaTag))
     308    if (isHTMLTextAreaElement(node()))
    309309        return TextAreaRole;
    310310    if (headingLevel())
     
    442442        return false;
    443443
    444     if (node->hasTagName(textareaTag))
     444    if (isHTMLTextAreaElement(node))
    445445        return true;
    446446
     
    695695        return true;
    696696
    697     if (node->hasTagName(textareaTag))
     697    if (isHTMLTextAreaElement(node))
    698698        return toHTMLFormControlElement(node)->isReadOnly();
    699699
     
    16441644        return String();
    16451645
    1646     if (isNativeTextControl() && (node->hasTagName(textareaTag) || isHTMLInputElement(node)))
     1646    if (isNativeTextControl() && (isHTMLTextAreaElement(node) || isHTMLInputElement(node)))
    16471647        return toHTMLTextFormControlElement(node)->value();
    16481648
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r152208 r152218  
    16451645    } else if (renderer->isTextArea()) {
    16461646        // FIXME: This is not safe!  Other elements could have a TextArea renderer.
    1647         static_cast<HTMLTextAreaElement*>(element)->setValue(string);
     1647        toHTMLTextAreaElement(element)->setValue(string);
    16481648    }
    16491649}
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r152211 r152218  
    14821482
    14831483    // Textarea considers overflow visible as auto.
    1484     if (e && e->hasTagName(textareaTag)) {
     1484    if (e && isHTMLTextAreaElement(e)) {
    14851485        style->setOverflowX(style->overflowX() == OVISIBLE ? OAUTO : style->overflowX());
    14861486        style->setOverflowY(style->overflowY() == OVISIBLE ? OAUTO : style->overflowY());
  • trunk/Source/WebCore/editing/markup.cpp

    r151947 r152218  
    4848#include "HTMLElement.h"
    4949#include "HTMLNames.h"
     50#include "HTMLTextAreaElement.h"
    5051#include "HTMLTextFormControlElement.h"
    5152#include "KURL.h"
     
    216217void StyledMarkupAccumulator::appendText(StringBuilder& out, Text* text)
    217218{   
    218     const bool parentIsTextarea = text->parentElement() && text->parentElement()->tagQName() == textareaTag;
     219    const bool parentIsTextarea = text->parentElement() && isHTMLTextAreaElement(text->parentElement());
    219220    const bool wrappingSpan = shouldApplyWrappingStyle(text) && !parentIsTextarea;
    220221    if (wrappingSpan) {
  • trunk/Source/WebCore/html/HTMLFormControlElement.cpp

    r152149 r152218  
    3737#include "HTMLInputElement.h"
    3838#include "HTMLLegendElement.h"
     39#include "HTMLTextAreaElement.h"
    3940#include "RenderBox.h"
    4041#include "RenderTheme.h"
     
    197198    if (element->hasTagName(buttonTag))
    198199        return true;
    199     if (element->hasTagName(textareaTag))
     200    if (isHTMLTextAreaElement(element))
    200201        return true;
    201202
  • trunk/Source/WebCore/html/HTMLTextAreaElement.h

    r151572 r152218  
    133133}
    134134
     135inline HTMLTextAreaElement* toHTMLTextAreaElement(Node* node)
     136{
     137    ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextAreaElement(node));
     138    return static_cast<HTMLTextAreaElement*>(node);
     139}
     140
    135141} //namespace
    136142
  • trunk/Source/WebCore/page/FocusController.cpp

    r152149 r152218  
    4747#include "HTMLInputElement.h"
    4848#include "HTMLNames.h"
     49#include "HTMLTextAreaElement.h"
    4950#include "HitTestResult.h"
    5051#include "KeyboardEvent.h"
     
    585586
    586587            if (Node* shadowAncestorNode = root->deprecatedShadowAncestorNode()) {
    587                 if (!isHTMLInputElement(shadowAncestorNode) && !shadowAncestorNode->hasTagName(textareaTag))
     588                if (!isHTMLInputElement(shadowAncestorNode) && !isHTMLTextAreaElement(shadowAncestorNode))
    588589                    return;
    589590            }
  • trunk/Source/WebCore/rendering/HitTestResult.cpp

    r152203 r152218  
    3838#include "HTMLParserIdioms.h"
    3939#include "HTMLPlugInImageElement.h"
     40#include "HTMLTextAreaElement.h"
    4041#include "HTMLVideoElement.h"
    4142#include "HitTestLocation.h"
     
    569570        return false;
    570571
    571     if (m_innerNonSharedNode->hasTagName(textareaTag))
     572    if (isHTMLTextAreaElement(m_innerNonSharedNode.get()))
    572573        return true;
    573574
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r152212 r152218  
    2929#include "ChromeClient.h"
    3030#include "Document.h"
     31#include "FloatQuad.h"
     32#include "Frame.h"
    3133#include "FrameView.h"
    3234#include "GraphicsContext.h"
    33 #include "HitTestResult.h"
    34 #include "htmlediting.h"
    3535#include "HTMLElement.h"
    3636#include "HTMLFrameOwnerElement.h"
    3737#include "HTMLInputElement.h"
    3838#include "HTMLNames.h"
    39 #include "FloatQuad.h"
    40 #include "Frame.h"
     39#include "HTMLTextAreaElement.h"
     40#include "HitTestResult.h"
    4141#include "Page.h"
    4242#include "PaintInfo.h"
     
    5353#include "RenderView.h"
    5454#include "TransformState.h"
     55#include "htmlediting.h"
    5556#include <algorithm>
    5657#include <math.h>
     
    23062307    // FIXME: Think about block-flow here.
    23072308    // https://bugs.webkit.org/show_bug.cgi?id=46473
    2308     if (logicalWidth.type() == Auto && !isStretchingColumnFlexItem(this) && node() && (isHTMLInputElement(node()) || node()->hasTagName(selectTag) || node()->hasTagName(buttonTag) || node()->hasTagName(textareaTag) || node()->hasTagName(legendTag)))
     2309    if (logicalWidth.type() == Auto && !isStretchingColumnFlexItem(this) && node() && (isHTMLInputElement(node()) || node()->hasTagName(selectTag) || node()->hasTagName(buttonTag) || isHTMLTextAreaElement(node()) || node()->hasTagName(legendTag)))
    23092310        return true;
    23102311
  • trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp

    r145391 r152218  
    4141{
    4242    if (node() && node()->inDocument())
    43         static_cast<HTMLTextAreaElement*>(node())->rendererWillBeDestroyed();
     43        toHTMLTextAreaElement(node())->rendererWillBeDestroyed();
    4444}
    4545
     
    6868LayoutUnit RenderTextControlMultiLine::preferredContentLogicalWidth(float charWidth) const
    6969{
    70     int factor = static_cast<HTMLTextAreaElement*>(node())->cols();
     70    int factor = toHTMLTextAreaElement(node())->cols();
    7171    return static_cast<LayoutUnit>(ceilf(charWidth * factor)) + scrollbarThickness();
    7272}
     
    7474LayoutUnit RenderTextControlMultiLine::computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const
    7575{
    76     return lineHeight * static_cast<HTMLTextAreaElement*>(node())->rows() + nonContentHeight;
     76    return lineHeight * toHTMLTextAreaElement(node())->rows() + nonContentHeight;
    7777}
    7878
  • trunk/Source/WebCore/testing/Internals.cpp

    r152149 r152218  
    935935    // FIXME: We should be using hasTagName instead but Windows port doesn't link QualifiedNames properly.
    936936    if (textField->tagName() == "TEXTAREA")
    937         return static_cast<HTMLTextAreaElement*>(textField)->lastChangeWasUserEdit();
     937        return toHTMLTextAreaElement(textField)->lastChangeWasUserEdit();
    938938
    939939    ec = INVALID_NODE_TYPE_ERR;
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r152203 r152218  
    6969#include "HTMLNames.h"
    7070#include "HTMLParserIdioms.h"
     71#include "HTMLTextAreaElement.h"
    7172#include "HTTPParsers.h"
    7273#include "HistoryItem.h"
     
    28322833    double blockExpansionRatio = 5.0 * blockToPageRatio * blockToPageRatio;
    28332834
    2834     if (!isHTMLImageElement(tnode) && !isHTMLInputElement(tnode) && !tnode->hasTagName(HTMLNames::textareaTag)) {
     2835    if (!isHTMLImageElement(tnode) && !isHTMLInputElement(tnode) && !isHTMLTextAreaElement(tnode)) {
    28352836        while ((tnode = tnode->parentNode())) {
    28362837            ASSERT(tnode);
  • trunk/Source/WebKit/blackberry/ChangeLog

    r152211 r152218  
     12013-07-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        Adopt toHTMLTextAreaElement for code cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=118226
     5
     6        Reviewed by Andreas Kling.
     7
     8        To enhance readability, this patch adopts toHTMLTextAreaElement.
     9        This also helps out to reduce duplicated use of static_cast.
     10
     11        * Api/WebPage.cpp:
     12        (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
     13        * WebKitSupport/DOMSupport.cpp:
     14        (BlackBerry::WebKit::DOMSupport::isTextInputElement):
     15        (BlackBerry::WebKit::DOMSupport::inputElementText):
     16        * WebKitSupport/InputHandler.cpp:
     17        (BlackBerry::WebKit::InputHandler::elementType):
     18        (BlackBerry::WebKit::InputHandler::boundingBoxForInputField):
     19
    1202013-06-29  Kangil Han  <kangil.han@samsung.com>
    221
  • trunk/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp

    r152149 r152218  
    104104{
    105105    return element->isTextFormControl()
    106         || element->hasTagName(HTMLNames::textareaTag)
     106        || isHTMLTextAreaElement(element)
    107107        || element->isContentEditable();
    108108}
     
    123123        const HTMLInputElement* inputElement = toHTMLInputElement(element);
    124124        elementText = inputElement->value();
    125     } else if (element->hasTagName(HTMLNames::textareaTag)) {
    126         const HTMLTextAreaElement* inputElement = static_cast<const HTMLTextAreaElement*>(element);
     125    } else if (isHTMLTextAreaElement(element)) {
     126        const HTMLTextAreaElement* inputElement = toHTMLTextAreaElement(element);
    127127        elementText = inputElement->value();
    128128    } else if (element->isContentEditable()) {
  • trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp

    r152211 r152218  
    414414        return convertInputType(inputElement);
    415415
    416     if (element->hasTagName(HTMLNames::textareaTag))
     416    if (isHTMLTextAreaElement(element))
    417417        return InputTypeTextArea;
    418418
     
    13551355    }
    13561356
    1357     if (m_currentFocusElement->hasTagName(HTMLNames::textareaTag))
     1357    if (isHTMLTextAreaElement(m_currentFocusElement))
    13581358        return m_currentFocusElement->renderer()->absoluteBoundingBoxRect();
    13591359
  • trunk/Source/WebKit/mac/ChangeLog

    r152149 r152218  
     12013-07-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        Adopt toHTMLTextAreaElement for code cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=118226
     5
     6        Reviewed by Andreas Kling.
     7
     8        To enhance readability, this patch adopts toHTMLTextAreaElement.
     9        This also helps out to reduce duplicated use of static_cast.
     10
     11        * WebCoreSupport/WebEditorClient.mm:
     12        (WebEditorClient::textDidChangeInTextArea):
     13
    1142013-06-27  Kangil Han  <kangil.han@samsung.com>
    215
  • trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

    r152149 r152218  
    712712void WebEditorClient::textDidChangeInTextArea(Element* element)
    713713{
    714     if (!element->hasTagName(textareaTag))
     714    if (!isHTMLTextAreaElement(element))
    715715        return;
    716716
    717     DOMHTMLTextAreaElement* textAreaElement = kit(static_cast<HTMLTextAreaElement*>(element));
     717    DOMHTMLTextAreaElement* textAreaElement = kit(toHTMLTextAreaElement(element));
    718718    FormDelegateLog(textAreaElement);
    719719    CallFormDelegate(m_webView, @selector(textDidChangeInTextArea:inFrame:), textAreaElement, kit(element->document()->frame()));
  • trunk/Source/WebKit/win/ChangeLog

    r152208 r152218  
     12013-07-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        Adopt toHTMLTextAreaElement for code cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=118226
     5
     6        Reviewed by Andreas Kling.
     7
     8        To enhance readability, this patch adopts toHTMLTextAreaElement.
     9        This also helps out to reduce duplicated use of static_cast.
     10
     11        * DOMCoreClasses.cpp:
     12        (DOMElement::createInstance):
     13        * DOMHTMLClasses.cpp:
     14        (DOMHTMLTextAreaElement::form):
     15        (DOMHTMLTextAreaElement::value):
     16        (DOMHTMLTextAreaElement::setValue):
     17        (DOMHTMLTextAreaElement::select):
     18        (DOMHTMLTextAreaElement::isUserEdited):
     19
    1202013-06-29  Kangil Han  <kangil.han@samsung.com>
    221
  • trunk/Source/WebKit/win/DOMCoreClasses.cpp

    r152208 r152218  
    15101510        DOMHTMLSelectElement* newElement = new DOMHTMLSelectElement(e);
    15111511        hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
    1512     } else if (e->hasTagName(textareaTag)) {
     1512    } else if (isHTMLTextAreaElement(e)) {
    15131513        DOMHTMLTextAreaElement* newElement = new DOMHTMLTextAreaElement(e);
    15141514        hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
  • trunk/Source/WebKit/win/DOMHTMLClasses.cpp

    r152208 r152218  
    14311431        return E_POINTER;
    14321432    *result = 0;
    1433     ASSERT(m_element && m_element->hasTagName(textareaTag));
    1434     HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
     1433    ASSERT(m_element && isHTMLTextAreaElement(m_element));
     1434    HTMLTextAreaElement* textareaElement = toHTMLTextAreaElement(m_element);
    14351435    COMPtr<IDOMElement> domElement;
    14361436    domElement.adoptRef(DOMHTMLElement::createInstance(textareaElement->form()));
     
    15481548        /* [retval][out] */ BSTR* result)
    15491549{
    1550     ASSERT(m_element && m_element->hasTagName(textareaTag));
    1551     HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
     1550    ASSERT(m_element && isHTMLTextAreaElement(m_element));
     1551    HTMLTextAreaElement* textareaElement = toHTMLTextAreaElement(m_element);
    15521552    WTF::String valueString = textareaElement->value();
    15531553    *result = BString(valueString.characters(), valueString.length()).release();
     
    15601560        /* [in] */ BSTR value)
    15611561{
    1562     ASSERT(m_element && m_element->hasTagName(textareaTag));
    1563     HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
     1562    ASSERT(m_element && isHTMLTextAreaElement(m_element));
     1563    HTMLTextAreaElement* textareaElement = toHTMLTextAreaElement(m_element);
    15641564    textareaElement->setValue(String((UChar*) value, SysStringLen(value)));
    15651565    return S_OK;
     
    15681568HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::select( void)
    15691569{
    1570     ASSERT(m_element && m_element->hasTagName(textareaTag));
    1571     HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element);
     1570    ASSERT(m_element && isHTMLTextAreaElement(m_element));
     1571    HTMLTextAreaElement* textareaElement = toHTMLTextAreaElement(m_element);
    15721572    textareaElement->select();
    15731573    return S_OK;
     
    15831583
    15841584    *result = FALSE;
    1585     ASSERT(m_element && m_element->hasTagName(textareaTag));
    1586     if (static_cast<HTMLTextAreaElement*>(m_element)->lastChangeWasUserEdit())
     1585    ASSERT(m_element && isHTMLTextAreaElement(m_element));
     1586    if (toHTMLTextAreaElement(m_element)->lastChangeWasUserEdit())
    15871587        *result = TRUE;
    15881588    return S_OK;
  • trunk/Source/WebKit2/ChangeLog

    r152205 r152218  
     12013-07-01  Kangil Han  <kangil.han@samsung.com>
     2
     3        Adopt toHTMLTextAreaElement for code cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=118226
     5
     6        Reviewed by Andreas Kling.
     7
     8        To enhance readability, this patch adopts toHTMLTextAreaElement.
     9        This also helps out to reduce duplicated use of static_cast.
     10
     11        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
     12        (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
     13        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
     14        (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
     15        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
     16        (WebKit::WebEditorClient::textDidChangeInTextArea):
     17        * WebProcess/WebPage/WebFrame.cpp:
     18        (WebKit::WebFrame::containsAnyFormControls):
     19
    1202013-06-28  Andreas Kling  <akling@apple.com>
    221
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp

    r152149 r152218  
    213213bool InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit()
    214214{
    215     if (!m_node->hasTagName(textareaTag))
     215    if (!isHTMLTextAreaElement(m_node.get()))
    216216        return false;
    217217
    218     return static_cast<HTMLTextAreaElement*>(m_node.get())->lastChangeWasUserEdit();
     218    return toHTMLTextAreaElement(m_node.get())->lastChangeWasUserEdit();
    219219}
    220220
  • trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm

    r152149 r152218  
    106106
    107107    if (isMultiline)
    108         static_cast<HTMLTextAreaElement*>(styledElement)->setValue(textAnnotation.stringValue);
     108        toHTMLTextAreaElement(styledElement)->setValue(textAnnotation.stringValue);
    109109    else
    110110        toHTMLInputElement(styledElement)->setValue(textAnnotation.stringValue);
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp

    r152149 r152218  
    356356void WebEditorClient::textDidChangeInTextArea(Element* element)
    357357{
    358     if (!element->hasTagName(textareaTag))
     358    if (!isHTMLTextAreaElement(element))
    359359        return;
    360360
     
    363363    ASSERT(webFrame);
    364364
    365     m_page->injectedBundleFormClient().textDidChangeInTextArea(m_page, static_cast<HTMLTextAreaElement*>(element), webFrame);
     365    m_page->injectedBundleFormClient().textDidChangeInTextArea(m_page, toHTMLTextAreaElement(element), webFrame);
    366366}
    367367
  • trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

    r152149 r152218  
    5353#include <WebCore/HTMLInputElement.h>
    5454#include <WebCore/HTMLNames.h>
     55#include <WebCore/HTMLTextAreaElement.h>
    5556#include <WebCore/JSCSSStyleDeclaration.h>
    5657#include <WebCore/JSElement.h>
     
    618619        if (!node->isElementNode())
    619620            continue;
    620         if (isHTMLInputElement(node) || toElement(node)->hasTagName(HTMLNames::selectTag) || toElement(node)->hasTagName(HTMLNames::textareaTag))
     621        if (isHTMLInputElement(node) || toElement(node)->hasTagName(HTMLNames::selectTag) || isHTMLTextAreaElement(node))
    621622            return true;
    622623    }
Note: See TracChangeset for help on using the changeset viewer.