Changeset 145462 in webkit


Ignore:
Timestamp:
Mar 11, 2013 6:59:09 PM (11 years ago)
Author:
inferno@chromium.org
Message:

Replace static_casts with to* functions.
https://bugs.webkit.org/show_bug.cgi?id=112072

Reviewed by Philip Rogers.

to* functions are preferred over static_cast calls since they
help to catch bad casts easily on the testing infrastructure.

Source/WebCore:

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::canSetFocusAttribute):

  • bindings/objc/DOM.mm:

(kitClass):

  • bindings/v8/V8LazyEventListener.cpp:

(WebCore::V8LazyEventListener::prepareListenerObject):

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne):

  • editing/ApplyStyleCommand.cpp:

(WebCore::isLegacyAppleStyleSpan):
(WebCore::isEmptyFontTag):
(WebCore::ApplyStyleCommand::applyBlockStyle):

  • editing/FormatBlockCommand.cpp:

(WebCore::isElementForFormatBlock):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::isMailPasteAsQuotationNode):
(WebCore::haveSameTagName):
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):

  • history/CachedPage.cpp:

(WebCore::CachedPage::restore):

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::suggestions):

  • html/HTMLTableRowsCollection.cpp:

(WebCore::isInHead):
(WebCore::isInBody):
(WebCore::isInFoot):

  • inspector/DOMPatchSupport.cpp:

(WebCore::DOMPatchSupport::innerPatchNode):

  • page/PageSerializer.cpp:

(WebCore::SerializerMarkupAccumulator::appendCustomAttributes):

  • plugins/PluginView.cpp:

(WebCore::PluginView::getValue):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::name):

  • rendering/RenderMedia.cpp:

(WebCore::RenderMedia::mediaElement):

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::autosaveName):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::textFormControlElement):
(WebCore::updateUserModifyProperty):

  • rendering/mathml/RenderMathMLFenced.cpp:

(WebCore::RenderMathMLFenced::updateFromElement):

  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::updateFromElement):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::endElementNs):

Source/WebKit/chromium:

  • src/ChromeClientImpl.cpp:

(WebKit::ChromeClientImpl::focusedNodeChanged):

  • src/ContextMenuClientImpl.cpp:

(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):

  • src/DOMUtilitiesPrivate.cpp:

(WebCore::toHTMLElement):

  • src/WebSearchableFormData.cpp:

(HTMLNames::IsSelectInDefaultState):

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _enterFullscreenForNode:WebCore::]):

Location:
trunk/Source
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r145459 r145462  
     12013-03-11  Abhishek Arya  <inferno@chromium.org>
     2
     3        Replace static_casts with to* functions.
     4        https://bugs.webkit.org/show_bug.cgi?id=112072
     5
     6        Reviewed by Philip Rogers.
     7
     8        to* functions are preferred over static_cast calls since they
     9        help to catch bad casts easily on the testing infrastructure.
     10
     11        * accessibility/AccessibilityMenuList.cpp:
     12        (WebCore::AccessibilityMenuList::canSetFocusAttribute):
     13        * bindings/objc/DOM.mm:
     14        (kitClass):
     15        * bindings/v8/V8LazyEventListener.cpp:
     16        (WebCore::V8LazyEventListener::prepareListenerObject):
     17        * css/SelectorChecker.cpp:
     18        (WebCore::SelectorChecker::checkOne):
     19        * editing/ApplyStyleCommand.cpp:
     20        (WebCore::isLegacyAppleStyleSpan):
     21        (WebCore::isEmptyFontTag):
     22        (WebCore::ApplyStyleCommand::applyBlockStyle):
     23        * editing/FormatBlockCommand.cpp:
     24        (WebCore::isElementForFormatBlock):
     25        * editing/ReplaceSelectionCommand.cpp:
     26        (WebCore::isMailPasteAsQuotationNode):
     27        (WebCore::haveSameTagName):
     28        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
     29        (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
     30        * history/CachedPage.cpp:
     31        (WebCore::CachedPage::restore):
     32        * html/ColorInputType.cpp:
     33        (WebCore::ColorInputType::suggestions):
     34        * html/HTMLTableRowsCollection.cpp:
     35        (WebCore::isInHead):
     36        (WebCore::isInBody):
     37        (WebCore::isInFoot):
     38        * inspector/DOMPatchSupport.cpp:
     39        (WebCore::DOMPatchSupport::innerPatchNode):
     40        * page/PageSerializer.cpp:
     41        (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
     42        * plugins/PluginView.cpp:
     43        (WebCore::PluginView::getValue):
     44        * rendering/RenderEmbeddedObject.cpp:
     45        (WebCore::RenderEmbeddedObject::paintContents):
     46        (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
     47        * rendering/RenderLayer.cpp:
     48        (WebCore::RenderLayer::name):
     49        * rendering/RenderMedia.cpp:
     50        (WebCore::RenderMedia::mediaElement):
     51        * rendering/RenderSearchField.cpp:
     52        (WebCore::RenderSearchField::autosaveName):
     53        * rendering/RenderTextControl.cpp:
     54        (WebCore::RenderTextControl::textFormControlElement):
     55        (WebCore::updateUserModifyProperty):
     56        * rendering/mathml/RenderMathMLFenced.cpp:
     57        (WebCore::RenderMathMLFenced::updateFromElement):
     58        * rendering/mathml/RenderMathMLFraction.cpp:
     59        (WebCore::RenderMathMLFraction::updateFromElement):
     60        * xml/parser/XMLDocumentParserLibxml2.cpp:
     61        (WebCore::XMLDocumentParser::XMLDocumentParser):
     62        (WebCore::XMLDocumentParser::endElementNs):
     63
    1642013-03-11  Philip Rogers  <pdr@google.com>
    265
  • trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp

    r140658 r145462  
    9393        return false;
    9494
    95     return static_cast<Element*>(node())->isEnabledFormControl();
     95    return toElement(node())->isEnabledFormControl();
    9696}
    9797
  • trunk/Source/WebCore/bindings/objc/DOM.mm

    r144568 r145462  
    296296        case WebCore::Node::ELEMENT_NODE:
    297297            if (impl->isHTMLElement())
    298                 return WebCore::elementClass(static_cast<WebCore::HTMLElement*>(impl)->tagQName(), [DOMHTMLElement class]);
     298                return WebCore::elementClass(toHTMLElement(impl)->tagQName(), [DOMHTMLElement class]);
    299299#if ENABLE(SVG_DOM_OBJC_BINDINGS)
    300300            if (impl->isSVGElement())
  • trunk/Source/WebCore/bindings/v8/V8LazyEventListener.cpp

    r142250 r145462  
    178178    HTMLFormElement* formElement = 0;
    179179    if (m_node && m_node->isHTMLElement())
    180         formElement = static_cast<HTMLElement*>(m_node)->form();
     180        formElement = toHTMLElement(m_node)->form();
    181181
    182182    v8::Handle<v8::Object> nodeWrapper = toObjectWrapper<Node>(m_node, isolate);
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r143858 r145462  
    657657#if ENABLE(PROGRESS_ELEMENT)
    658658                if (element->hasTagName(progressTag)) {
    659                     HTMLProgressElement* progress = static_cast<HTMLProgressElement*>(element);
     659                    HTMLProgressElement* progress = toHTMLProgressElement(element);
    660660                    if (progress && !progress->isDeterminate())
    661661                        return true;
  • trunk/Source/WebCore/editing/ApplyStyleCommand.cpp

    r144911 r145462  
    6868        return false;
    6969
    70     const HTMLElement* elem = static_cast<const HTMLElement*>(node);
     70    const HTMLElement* elem = toHTMLElement(node);
    7171    return elem->hasLocalName(spanAttr) && elem->getAttribute(classAttr) == styleSpanClassString();
    7272}
     
    107107        return false;
    108108
    109     return hasNoAttributeOrOnlyStyleAttribute(static_cast<const HTMLElement*>(element), shouldStyleAttributeBeEmpty);
     109    return hasNoAttributeOrOnlyStyleAttribute(toHTMLElement(element), shouldStyleAttributeBeEmpty);
    110110}
    111111
     
    291291    }
    292292   
    293     startRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), startIndex, 0, true);
    294     endRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), endIndex, 0, true);
     293    startRange = TextIterator::rangeFromLocationAndLength(toElement(scope), startIndex, 0, true);
     294    endRange = TextIterator::rangeFromLocationAndLength(toElement(scope), endIndex, 0, true);
    295295    if (startRange && endRange)
    296296        updateStartEnd(startRange->startPosition(), endRange->startPosition());
  • trunk/Source/WebCore/editing/FormatBlockCommand.cpp

    r144911 r145462  
    4343static inline bool isElementForFormatBlock(Node* node)
    4444{
    45     return node->isElementNode() && isElementForFormatBlock(static_cast<Element*>(node)->tagQName());
     45    return node->isElementNode() && isElementForFormatBlock(toElement(node)->tagQName());
    4646}
    4747
  • trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp

    r145253 r145462  
    427427static bool isMailPasteAsQuotationNode(const Node* node)
    428428{
    429     return node && node->hasTagName(blockquoteTag) && node->isElementNode() && static_cast<const Element*>(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
     429    return node && node->hasTagName(blockquoteTag) && node->isElementNode() && toElement(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
    430430}
    431431
     
    445445static bool haveSameTagName(Node* a, Node* b)
    446446{
    447     return a && b && a->isElementNode() && b->isElementNode() && static_cast<Element*>(a)->tagName() == static_cast<Element*>(b)->tagName();
     447    return a && b && a->isElementNode() && b->isElementNode() && toElement(a)->tagName() == static_cast<Element*>(b)->tagName();
    448448}
    449449
     
    487487            if (element->isHTMLElement()) {
    488488                Vector<QualifiedName> attributes;
    489                 HTMLElement* htmlElement = static_cast<HTMLElement*>(element);
     489                HTMLElement* htmlElement = toHTMLElement(element);
    490490
    491491                if (newInlineStyle->conflictsWithImplicitStyleOfElement(htmlElement)) {
     
    626626            continue;
    627627
    628         if (isProhibitedParagraphChild(static_cast<const HTMLElement*>(node.get())->localName())) {
    629             if (HTMLElement* paragraphElement = static_cast<HTMLElement*>(enclosingNodeWithTag(positionInParentBeforeNode(node.get()), pTag)))
     628        if (isProhibitedParagraphChild(toHTMLElement(node.get())->localName())) {
     629            if (HTMLElement* paragraphElement = toHTMLElement(enclosingNodeWithTag(positionInParentBeforeNode(node.get()), pTag)))
    630630                moveNodeOutOfAncestor(node, paragraphElement);
    631631        }
  • trunk/Source/WebCore/history/CachedPage.cpp

    r138515 r145462  
    8484    if (Node* node = focusedDocument->focusedNode()) {
    8585        if (node->isElementNode())
    86             static_cast<Element*>(node)->updateFocusAppearance(true);
     86            toElement(node)->updateFocusAppearance(true);
    8787    }
    8888
  • trunk/Source/WebCore/html/ColorInputType.cpp

    r142248 r145462  
    234234    if (dataList) {
    235235        RefPtr<HTMLCollection> options = dataList->options();
    236         for (unsigned i = 0; HTMLOptionElement* option = static_cast<HTMLOptionElement*>(options->item(i)); i++) {
     236        for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); i++) {
    237237            if (!element()->isValidValue(option->value()))
    238238                continue;
  • trunk/Source/WebCore/html/HTMLTableRowsCollection.cpp

    r136850 r145462  
    4040static bool isInHead(Element* row)
    4141{
    42     return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(theadTag);
     42    return row->parentNode() && toElement(row->parentNode())->hasLocalName(theadTag);
    4343}
    4444
    4545static bool isInBody(Element* row)
    4646{
    47     return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(tbodyTag);
     47    return row->parentNode() && toElement(row->parentNode())->hasLocalName(tbodyTag);
    4848}
    4949
    5050static bool isInFoot(Element* row)
    5151{
    52     return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(tfootTag);
     52    return row->parentNode() && toElement(row->parentNode())->hasLocalName(tfootTag);
    5353}
    5454
  • trunk/Source/WebCore/inspector/DOMPatchSupport.cpp

    r142375 r145462  
    171171
    172172    // Patch attributes
    173     Element* oldElement = static_cast<Element*>(oldNode);
    174     Element* newElement = static_cast<Element*>(newNode);
     173    Element* oldElement = toElement(oldNode);
     174    Element* newElement = toElement(newNode);
    175175    if (oldDigest->m_attrsSHA1 != newDigest->m_attrsSHA1) {
    176176        // FIXME: Create a function in Element for removing all properties. Take in account whether did/willModifyAttribute are important.
  • trunk/Source/WebCore/page/PageSerializer.cpp

    r143926 r145462  
    151151        return;
    152152
    153     HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element);
     153    HTMLFrameOwnerElement* frameOwner = toFrameOwnerElement(element);
    154154    Frame* frame = frameOwner->contentFrame();
    155155    if (!frame)
  • trunk/Source/WebCore/plugins/PluginView.cpp

    r144568 r145462  
    13751375
    13761376        if (m_element->hasTagName(appletTag) || m_element->hasTagName(embedTag) || m_element->hasTagName(objectTag))
    1377             pluginScriptObject = static_cast<HTMLPlugInElement*>(m_element)->getNPObject();
     1377            pluginScriptObject = toHTMLPlugInElement(m_element)->getNPObject();
    13781378
    13791379        // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r144565 r145462  
    172172void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
    173173{
    174     Element* element = static_cast<Element*>(node());
     174    Element* element = toElement(node());
    175175    if (!element || !element->isPluginElement())
    176176        return;
    177177
    178     HTMLPlugInElement* plugInElement = static_cast<HTMLPlugInElement*>(element);
     178    HTMLPlugInElement* plugInElement = toHTMLPlugInElement(element);
    179179    if (plugInElement->displayState() > HTMLPlugInElement::DisplayingSnapshot) {
    180180        RenderPart::paintContents(paintInfo, paintOffset);
     
    185185        return;
    186186
    187     Image* snapshot = static_cast<HTMLPlugInImageElement*>(plugInElement)->snapshotImage();
     187    Image* snapshot = toHTMLPlugInImageElement(plugInElement)->snapshotImage();
    188188    if (snapshot)
    189189        paintSnapshotImage(paintInfo, paintOffset, snapshot);
     
    418418   
    419419    MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
    420     HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(node());
     420    HTMLPlugInElement* element = toHTMLPlugInElement(node());
    421421    if (event->type() == eventNames().mousedownEvent && static_cast<MouseEvent*>(event)->button() == LeftButton) {
    422422        m_mouseDownWasInUnavailablePluginIndicator = isInUnavailablePluginIndicator(mouseEvent);
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r145422 r145462  
    277277        if (node->isElementNode()) {
    278278            name.append(' ');
    279             name.append(static_cast<Element*>(node)->tagName());
     279            name.append(toElement(node)->tagName());
    280280        }
    281281        if (node->hasID()) {
    282282            name.appendLiteral(" id=\'");
    283             name.append(static_cast<Element*>(node)->getIdAttribute());
     283            name.append(toElement(node)->getIdAttribute());
    284284            name.append('\'');
    285285        }
  • trunk/Source/WebCore/rendering/RenderMedia.cpp

    r144497 r145462  
    5454HTMLMediaElement* RenderMedia::mediaElement() const
    5555{
    56     return static_cast<HTMLMediaElement*>(node());
     56    return toMediaElement(node());
    5757}
    5858
  • trunk/Source/WebCore/rendering/RenderSearchField.cpp

    r145406 r145462  
    200200const AtomicString& RenderSearchField::autosaveName() const
    201201{
    202     return static_cast<Element*>(node())->getAttribute(autosaveAttr);
     202    return toElement(node())->getAttribute(autosaveAttr);
    203203}
    204204
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r145391 r145462  
    4949HTMLTextFormControlElement* RenderTextControl::textFormControlElement() const
    5050{
    51     return static_cast<HTMLTextFormControlElement*>(node());
     51    return toHTMLTextFormControlElement(node());
    5252}
    5353
     
    8181
    8282    if (node->isElementNode()) {
    83         Element* element = static_cast<Element*>(node);
     83        Element* element = toElement(node);
    8484        isEnabled = element->isEnabledFormControl();
    85         isReadOnlyControl = element->isTextFormControl() && static_cast<HTMLTextFormControlElement*>(element)->readOnly();
     85        isReadOnlyControl = element->isTextFormControl() && toHTMLTextFormControlElement(element)->readOnly();
    8686    }
    8787
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp

    r140923 r145462  
    5656void RenderMathMLFenced::updateFromElement()
    5757{
    58     Element* fenced = static_cast<Element*>(node());
     58    Element* fenced = toElement(node());
    5959 
    6060    // FIXME: Handle open/close values with more than one character (they should be treated like text).
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp

    r132735 r145462  
    6464        return;
    6565   
    66     Element* fraction = static_cast<Element*>(node());
     66    Element* fraction = toElement(node());
    6767   
    6868    RenderObject* numeratorWrapper = firstChild();
  • trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp

    r144565 r145462  
    600600        if (!n || !n->isElementNode())
    601601            break;
    602         parentElement = static_cast<Element*>(n);
     602        parentElement = toElement(n);
    603603    }
    604604
     
    864864        setDepthTriggeringEntityExpansion(-1);
    865865
    866     if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(static_cast<Element*>(n.get()))) {
     866    if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(toElement(n.get()))) {
    867867        popCurrentNode();
    868868        n->remove(IGNORE_EXCEPTION);
     
    875875    }
    876876
    877     Element* element = static_cast<Element*>(n.get());
     877    Element* element = toElement(n.get());
    878878
    879879    // The element's parent may have already been removed from document.
  • trunk/Source/WebKit/chromium/ChangeLog

    r145461 r145462  
     12013-03-11  Abhishek Arya  <inferno@chromium.org>
     2
     3        Replace static_casts with to* functions.
     4        https://bugs.webkit.org/show_bug.cgi?id=112072
     5
     6        Reviewed by Philip Rogers.
     7
     8        to* functions are preferred over static_cast calls since they
     9        help to catch bad casts easily on the testing infrastructure.
     10
     11        * src/ChromeClientImpl.cpp:
     12        (WebKit::ChromeClientImpl::focusedNodeChanged):
     13        * src/ContextMenuClientImpl.cpp:
     14        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
     15        * src/DOMUtilitiesPrivate.cpp:
     16        (WebCore::toHTMLElement):
     17        * src/WebSearchableFormData.cpp:
     18        (HTMLNames::IsSelectInDefaultState):
     19
    1202013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
    221
  • trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp

    r143803 r145462  
    232232        HitTestResult hitTest(IntPoint(0, 0));
    233233        // This cast must be valid because of the isLink() check.
    234         hitTest.setURLElement(static_cast<Element*>(node));
     234        hitTest.setURLElement(toElement(node));
    235235        if (hitTest.isLiveLink())
    236236            focusURL = hitTest.absoluteLinkURL();
  • trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp

    r143470 r145462  
    227227        // is a media element.
    228228        HTMLMediaElement* mediaElement =
    229             static_cast<HTMLMediaElement*>(r.innerNonSharedNode());
     229            toMediaElement(r.innerNonSharedNode());
    230230        if (mediaElement->hasTagName(HTMLNames::videoTag))
    231231            data.mediaType = WebContextMenuData::MediaTypeVideo;
     
    267267                    data.mediaFlags |= WebContextMenuData::MediaCanPrint;
    268268
    269                 HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(r.innerNonSharedNode());
     269                HTMLPlugInImageElement* pluginElement = toHTMLPlugInImageElement(r.innerNonSharedNode());
    270270                data.srcURL = pluginElement->document()->completeURL(pluginElement->url());
    271271                data.mediaFlags |= WebContextMenuData::MediaCanSave;
  • trunk/Source/WebKit/chromium/src/DOMUtilitiesPrivate.cpp

    r95901 r145462  
    4848{
    4949    if (node->isHTMLElement()
    50         && static_cast<HTMLElement*>(node)->hasTagName(name)) {
     50        && toHTMLElement(node)->hasTagName(name)) {
    5151        return static_cast<HTMLNodeType*>(node);
    5252    }
  • trunk/Source/WebKit/chromium/src/WebSearchableFormData.cpp

    r98053 r145462  
    107107            if (!(*i)->hasLocalName(HTMLNames::optionTag))
    108108                continue;
    109             HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(*i);
     109            HTMLOptionElement* optionElement = toHTMLOptionElement(*i);
    110110            if (optionElement->selected() != optionElement->hasAttribute(selectedAttr))
    111111                return false;
     
    120120        if (!(*i)->hasLocalName(HTMLNames::optionTag))
    121121            continue;
    122         HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(*i);
     122        HTMLOptionElement* optionElement = toHTMLOptionElement(*i);
    123123        if (optionElement->hasAttribute(selectedAttr)) {
    124124            // The page specified the option to select.
  • trunk/Source/WebKit/mac/ChangeLog

    r145453 r145462  
     12013-03-11  Abhishek Arya  <inferno@chromium.org>
     2
     3        Replace static_casts with to* functions.
     4        https://bugs.webkit.org/show_bug.cgi?id=112072
     5
     6        Reviewed by Philip Rogers.
     7
     8        to* functions are preferred over static_cast calls since they
     9        help to catch bad casts easily on the testing infrastructure.
     10
     11        * WebView/WebView.mm:
     12        (-[WebView _enterFullscreenForNode:WebCore::]):
     13
    1142013-03-11  Jochen Eisinger  <jochen@chromium.org>
    215
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r144953 r145462  
    64676467{
    64686468    ASSERT(node->hasTagName(WebCore::HTMLNames::videoTag));
    6469     HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
     6469    HTMLMediaElement* videoElement = toMediaElement(node);
    64706470
    64716471    if (_private->fullscreenController) {
Note: See TracChangeset for help on using the changeset viewer.