Unreviewed, rolling out r145462.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 03:00:16 +0000 (03:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 03:00:16 +0000 (03:00 +0000)
http://trac.webkit.org/changeset/145462
https://bugs.webkit.org/show_bug.cgi?id=112097

Compilation failure in PluginView.cpp (Requested by jamesr_ on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-11

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::]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/bindings/objc/DOM.mm
Source/WebCore/bindings/v8/V8LazyEventListener.cpp
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/FormatBlockCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/history/CachedPage.cpp
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/HTMLTableRowsCollection.cpp
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/plugins/PluginView.cpp
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderMedia.cpp
Source/WebCore/rendering/RenderSearchField.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp
Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
Source/WebKit/chromium/src/DOMUtilitiesPrivate.cpp
Source/WebKit/chromium/src/WebSearchableFormData.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm

index 481e522..f4d7979 100644 (file)
@@ -1,3 +1,65 @@
+2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r145462.
+        http://trac.webkit.org/changeset/145462
+        https://bugs.webkit.org/show_bug.cgi?id=112097
+
+        Compilation failure in PluginView.cpp (Requested by jamesr_ on
+        #webkit).
+
+        * 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):
+
 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
 
         Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository
index 6a49e7d..78f44ab 100644 (file)
@@ -92,7 +92,7 @@ bool AccessibilityMenuList::canSetFocusAttribute() const
     if (!node())
         return false;
 
-    return toElement(node())->isEnabledFormControl();
+    return static_cast<Element*>(node())->isEnabledFormControl();
 }
 
 void AccessibilityMenuList::didUpdateActiveOption(int optionIndex)
index dc6a849..f227868 100644 (file)
@@ -295,7 +295,7 @@ Class kitClass(WebCore::Node* impl)
     switch (impl->nodeType()) {
         case WebCore::Node::ELEMENT_NODE:
             if (impl->isHTMLElement())
-                return WebCore::elementClass(toHTMLElement(impl)->tagQName(), [DOMHTMLElement class]);
+                return WebCore::elementClass(static_cast<WebCore::HTMLElement*>(impl)->tagQName(), [DOMHTMLElement class]);
 #if ENABLE(SVG_DOM_OBJC_BINDINGS)
             if (impl->isSVGElement())
                 return WebCore::elementClass(static_cast<WebCore::SVGElement*>(impl)->tagQName(), [DOMSVGElement class]);
index a74e5b0..7748227 100644 (file)
@@ -177,7 +177,7 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
 
     HTMLFormElement* formElement = 0;
     if (m_node && m_node->isHTMLElement())
-        formElement = toHTMLElement(m_node)->form();
+        formElement = static_cast<HTMLElement*>(m_node)->form();
 
     v8::Handle<v8::Object> nodeWrapper = toObjectWrapper<Node>(m_node, isolate);
     v8::Handle<v8::Object> formWrapper = toObjectWrapper<HTMLFormElement>(formElement, isolate);
index cb3837e..eaf03e3 100644 (file)
@@ -656,7 +656,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
                     break;
 #if ENABLE(PROGRESS_ELEMENT)
                 if (element->hasTagName(progressTag)) {
-                    HTMLProgressElement* progress = toHTMLProgressElement(element);
+                    HTMLProgressElement* progress = static_cast<HTMLProgressElement*>(element);
                     if (progress && !progress->isDeterminate())
                         return true;
                     break;
index e3e83d4..cf6848d 100644 (file)
@@ -67,7 +67,7 @@ bool isLegacyAppleStyleSpan(const Node *node)
     if (!node || !node->isHTMLElement())
         return false;
 
-    const HTMLElement* elem = toHTMLElement(node);
+    const HTMLElement* elem = static_cast<const HTMLElement*>(node);
     return elem->hasLocalName(spanAttr) && elem->getAttribute(classAttr) == styleSpanClassString();
 }
 
@@ -106,7 +106,7 @@ bool isEmptyFontTag(const Element* element, ShouldStyleAttributeBeEmpty shouldSt
     if (!element || !element->hasTagName(fontTag))
         return false;
 
-    return hasNoAttributeOrOnlyStyleAttribute(toHTMLElement(element), shouldStyleAttributeBeEmpty);
+    return hasNoAttributeOrOnlyStyleAttribute(static_cast<const HTMLElement*>(element), shouldStyleAttributeBeEmpty);
 }
 
 static PassRefPtr<Element> createFontElement(Document* document)
@@ -290,8 +290,8 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style)
         nextParagraphStart = endOfParagraph(paragraphStart).next();
     }
     
-    startRange = TextIterator::rangeFromLocationAndLength(toElement(scope), startIndex, 0, true);
-    endRange = TextIterator::rangeFromLocationAndLength(toElement(scope), endIndex, 0, true);
+    startRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), startIndex, 0, true);
+    endRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), endIndex, 0, true);
     if (startRange && endRange)
         updateStartEnd(startRange->startPosition(), endRange->startPosition());
 }
index 5a8bf6f..edf3aa5 100644 (file)
@@ -42,7 +42,7 @@ static Node* enclosingBlockToSplitTreeTo(Node* startNode);
 static bool isElementForFormatBlock(const QualifiedName& tagName);
 static inline bool isElementForFormatBlock(Node* node)
 {
-    return node->isElementNode() && isElementForFormatBlock(toElement(node)->tagQName());
+    return node->isElementNode() && isElementForFormatBlock(static_cast<Element*>(node)->tagQName());
 }
 
 FormatBlockCommand::FormatBlockCommand(Document* document, const QualifiedName& tagName) 
index 8f5e3ad..f104e02 100644 (file)
@@ -426,7 +426,7 @@ bool ReplaceSelectionCommand::shouldMergeEnd(bool selectionEndWasEndOfParagraph)
 
 static bool isMailPasteAsQuotationNode(const Node* node)
 {
-    return node && node->hasTagName(blockquoteTag) && node->isElementNode() && toElement(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
+    return node && node->hasTagName(blockquoteTag) && node->isElementNode() && static_cast<const Element*>(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
 }
 
 static bool isHeaderElement(const Node* a)
@@ -444,7 +444,7 @@ static bool isHeaderElement(const Node* a)
 
 static bool haveSameTagName(Node* a, Node* b)
 {
-    return a && b && a->isElementNode() && b->isElementNode() && toElement(a)->tagName() == static_cast<Element*>(b)->tagName();
+    return a && b && a->isElementNode() && b->isElementNode() && static_cast<Element*>(a)->tagName() == static_cast<Element*>(b)->tagName();
 }
 
 bool ReplaceSelectionCommand::shouldMerge(const VisiblePosition& source, const VisiblePosition& destination)
@@ -486,7 +486,7 @@ void ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(Insert
         if (inlineStyle) {
             if (element->isHTMLElement()) {
                 Vector<QualifiedName> attributes;
-                HTMLElement* htmlElement = toHTMLElement(element);
+                HTMLElement* htmlElement = static_cast<HTMLElement*>(element);
 
                 if (newInlineStyle->conflictsWithImplicitStyleOfElement(htmlElement)) {
                     // e.g. <b style="font-weight: normal;"> is converted to <span style="font-weight: normal;">
@@ -625,8 +625,8 @@ void ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuild
         if (!node->isHTMLElement())
             continue;
 
-        if (isProhibitedParagraphChild(toHTMLElement(node.get())->localName())) {
-            if (HTMLElement* paragraphElement = toHTMLElement(enclosingNodeWithTag(positionInParentBeforeNode(node.get()), pTag)))
+        if (isProhibitedParagraphChild(static_cast<const HTMLElement*>(node.get())->localName())) {
+            if (HTMLElement* paragraphElement = static_cast<HTMLElement*>(enclosingNodeWithTag(positionInParentBeforeNode(node.get()), pTag)))
                 moveNodeOutOfAncestor(node, paragraphElement);
         }
 
index d8f0ac4..3ddb8ea 100644 (file)
@@ -83,7 +83,7 @@ void CachedPage::restore(Page* page)
     Document* focusedDocument = page->focusController()->focusedOrMainFrame()->document();
     if (Node* node = focusedDocument->focusedNode()) {
         if (node->isElementNode())
-            toElement(node)->updateFocusAppearance(true);
+            static_cast<Element*>(node)->updateFocusAppearance(true);
     }
 
     if (m_needStyleRecalcForVisitedLinks) {
index 7bc9d0c..f214777 100644 (file)
@@ -233,7 +233,7 @@ Vector<Color> ColorInputType::suggestions() const
     HTMLDataListElement* dataList = element()->dataList();
     if (dataList) {
         RefPtr<HTMLCollection> options = dataList->options();
-        for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); i++) {
+        for (unsigned i = 0; HTMLOptionElement* option = static_cast<HTMLOptionElement*>(options->item(i)); i++) {
             if (!element()->isValidValue(option->value()))
                 continue;
             Color color(option->value());
index 52cb0ec..55fb9c2 100644 (file)
@@ -39,17 +39,17 @@ using namespace HTMLNames;
 
 static bool isInHead(Element* row)
 {
-    return row->parentNode() && toElement(row->parentNode())->hasLocalName(theadTag);
+    return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(theadTag);
 }
 
 static bool isInBody(Element* row)
 {
-    return row->parentNode() && toElement(row->parentNode())->hasLocalName(tbodyTag);
+    return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(tbodyTag);
 }
 
 static bool isInFoot(Element* row)
 {
-    return row->parentNode() && toElement(row->parentNode())->hasLocalName(tfootTag);
+    return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(tfootTag);
 }
 
 HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table, HTMLTableRowElement* previous)
index 3dadc28..f1d098f 100644 (file)
@@ -170,8 +170,8 @@ bool DOMPatchSupport::innerPatchNode(Digest* oldDigest, Digest* newDigest, Excep
         return true;
 
     // Patch attributes
-    Element* oldElement = toElement(oldNode);
-    Element* newElement = toElement(newNode);
+    Element* oldElement = static_cast<Element*>(oldNode);
+    Element* newElement = static_cast<Element*>(newNode);
     if (oldDigest->m_attrsSHA1 != newDigest->m_attrsSHA1) {
         // FIXME: Create a function in Element for removing all properties. Take in account whether did/willModifyAttribute are important.
         if (oldElement->hasAttributesWithoutUpdate()) {
index aab9dd8..5557b67 100644 (file)
@@ -150,7 +150,7 @@ void SerializerMarkupAccumulator::appendCustomAttributes(StringBuilder& out, Ele
     if (!element->isFrameOwnerElement())
         return;
 
-    HTMLFrameOwnerElement* frameOwner = toFrameOwnerElement(element);
+    HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element);
     Frame* frame = frameOwner->contentFrame();
     if (!frame)
         return;
index 3668e8c..37cd00b 100644 (file)
@@ -1374,7 +1374,7 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
         NPObject* pluginScriptObject = 0;
 
         if (m_element->hasTagName(appletTag) || m_element->hasTagName(embedTag) || m_element->hasTagName(objectTag))
-            pluginScriptObject = toHTMLPlugInElement(m_element)->getNPObject();
+            pluginScriptObject = static_cast<HTMLPlugInElement*>(m_element)->getNPObject();
 
         // Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
         if (pluginScriptObject)
index a90d524..aabe76c 100644 (file)
@@ -171,11 +171,11 @@ void RenderEmbeddedObject::paintSnapshotImage(PaintInfo& paintInfo, const Layout
 
 void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
-    Element* element = toElement(node());
+    Element* element = static_cast<Element*>(node());
     if (!element || !element->isPluginElement())
         return;
 
-    HTMLPlugInElement* plugInElement = toHTMLPlugInElement(element);
+    HTMLPlugInElement* plugInElement = static_cast<HTMLPlugInElement*>(element);
     if (plugInElement->displayState() > HTMLPlugInElement::DisplayingSnapshot) {
         RenderPart::paintContents(paintInfo, paintOffset);
         return;
@@ -184,7 +184,7 @@ void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint
     if (!plugInElement->isPlugInImageElement())
         return;
 
-    Image* snapshot = toHTMLPlugInImageElement(plugInElement)->snapshotImage();
+    Image* snapshot = static_cast<HTMLPlugInImageElement*>(plugInElement)->snapshotImage();
     if (snapshot)
         paintSnapshotImage(paintInfo, paintOffset, snapshot);
 }
@@ -417,7 +417,7 @@ void RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent(Event* event)
         return;
     
     MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
-    HTMLPlugInElement* element = toHTMLPlugInElement(node());
+    HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(node());
     if (event->type() == eventNames().mousedownEvent && static_cast<MouseEvent*>(event)->button() == LeftButton) {
         m_mouseDownWasInUnavailablePluginIndicator = isInUnavailablePluginIndicator(mouseEvent);
         if (m_mouseDownWasInUnavailablePluginIndicator) {
index 9845f27..ff3b472 100644 (file)
@@ -276,11 +276,11 @@ String RenderLayer::name() const
     if (Node* node = renderer()->node()) {
         if (node->isElementNode()) {
             name.append(' ');
-            name.append(toElement(node)->tagName());
+            name.append(static_cast<Element*>(node)->tagName());
         }
         if (node->hasID()) {
             name.appendLiteral(" id=\'");
-            name.append(toElement(node)->getIdAttribute());
+            name.append(static_cast<Element*>(node)->getIdAttribute());
             name.append('\'');
         }
 
index d8f1e85..caa47e2 100644 (file)
@@ -53,7 +53,7 @@ RenderMedia::~RenderMedia()
 
 HTMLMediaElement* RenderMedia::mediaElement() const
 { 
-    return toMediaElement(node()); 
+    return static_cast<HTMLMediaElement*>(node()); 
 }
 
 void RenderMedia::layout()
index ca0228c..735fdc5 100644 (file)
@@ -199,7 +199,7 @@ EVisibility RenderSearchField::visibilityForCancelButton() const
 
 const AtomicString& RenderSearchField::autosaveName() const
 {
-    return toElement(node())->getAttribute(autosaveAttr);
+    return static_cast<Element*>(node())->getAttribute(autosaveAttr);
 }
 
 // PopupMenuClient methods
index 1c95541..bed41dc 100644 (file)
@@ -48,7 +48,7 @@ RenderTextControl::~RenderTextControl()
 
 HTMLTextFormControlElement* RenderTextControl::textFormControlElement() const
 {
-    return toHTMLTextFormControlElement(node());
+    return static_cast<HTMLTextFormControlElement*>(node());
 }
 
 HTMLElement* RenderTextControl::innerTextElement() const
@@ -80,9 +80,9 @@ static inline bool updateUserModifyProperty(Node* node, RenderStyle* style)
     bool isReadOnlyControl = false;
 
     if (node->isElementNode()) {
-        Element* element = toElement(node);
+        Element* element = static_cast<Element*>(node);
         isEnabled = element->isEnabledFormControl();
-        isReadOnlyControl = element->isTextFormControl() && toHTMLTextFormControlElement(element)->readOnly();
+        isReadOnlyControl = element->isTextFormControl() && static_cast<HTMLTextFormControlElement*>(element)->readOnly();
     }
 
     style->setUserModify((isReadOnlyControl || !isEnabled) ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY);
index c408aad..9640ad5 100644 (file)
@@ -55,7 +55,7 @@ RenderMathMLFenced::RenderMathMLFenced(Element* element)
 
 void RenderMathMLFenced::updateFromElement()
 {
-    Element* fenced = toElement(node());
+    Element* fenced = static_cast<Element*>(node());
  
     // FIXME: Handle open/close values with more than one character (they should be treated like text).
     AtomicString openValue = fenced->getAttribute(MathMLNames::openAttr);
index 05a3ef6..5603eb5 100644 (file)
@@ -63,7 +63,7 @@ void RenderMathMLFraction::updateFromElement()
     if (isEmpty()) 
         return;
     
-    Element* fraction = toElement(node());
+    Element* fraction = static_cast<Element*>(node());
     
     RenderObject* numeratorWrapper = firstChild();
     RenderObject* denominatorWrapper = numeratorWrapper->nextSibling();
index e5bd223..1bd0f0c 100644 (file)
@@ -599,7 +599,7 @@ XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parent
         ContainerNode* n = parentElement->parentNode();
         if (!n || !n->isElementNode())
             break;
-        parentElement = toElement(n);
+        parentElement = static_cast<Element*>(n);
     }
 
     if (elemStack.isEmpty())
@@ -863,7 +863,7 @@ void XMLDocumentParser::endElementNs()
     if (hackAroundLibXMLEntityParsingBug() && context()->depth <= depthTriggeringEntityExpansion())
         setDepthTriggeringEntityExpansion(-1);
 
-    if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(toElement(n.get()))) {
+    if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(static_cast<Element*>(n.get()))) {
         popCurrentNode();
         n->remove(IGNORE_EXCEPTION);
         return;
@@ -874,7 +874,7 @@ void XMLDocumentParser::endElementNs()
         return;
     }
 
-    Element* element = toElement(n.get());
+    Element* element = static_cast<Element*>(n.get());
 
     // The element's parent may have already been removed from document.
     // Parsing continues in this case, but scripts aren't executed.
index 10eb46d..2f82b68 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r145462.
+        http://trac.webkit.org/changeset/145462
+        https://bugs.webkit.org/show_bug.cgi?id=112097
+
+        Compilation failure in PluginView.cpp (Requested by jamesr_ on
+        #webkit).
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::focusedNodeChanged):
+        * src/ContextMenuClientImpl.cpp:
+        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+        * src/DOMUtilitiesPrivate.cpp:
+        (WebCore::toHTMLElement):
+        * src/WebSearchableFormData.cpp:
+        (HTMLNames::IsSelectInDefaultState):
+
 2013-03-11  Abhishek Arya  <inferno@chromium.org>
 
         Replace static_casts with to* functions.
index 348c873..b110893 100644 (file)
@@ -231,7 +231,7 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
         // WebCore::Node.
         HitTestResult hitTest(IntPoint(0, 0));
         // This cast must be valid because of the isLink() check.
-        hitTest.setURLElement(toElement(node));
+        hitTest.setURLElement(static_cast<Element*>(node));
         if (hitTest.isLiveLink())
             focusURL = hitTest.absoluteLinkURL();
     }
index e77764a..df21f42 100644 (file)
@@ -226,7 +226,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
         // We know that if absoluteMediaURL() is not empty, then this
         // is a media element.
         HTMLMediaElement* mediaElement =
-            toMediaElement(r.innerNonSharedNode());
+            static_cast<HTMLMediaElement*>(r.innerNonSharedNode());
         if (mediaElement->hasTagName(HTMLNames::videoTag))
             data.mediaType = WebContextMenuData::MediaTypeVideo;
         else if (mediaElement->hasTagName(HTMLNames::audioTag))
@@ -266,7 +266,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
                 if (plugin->plugin()->supportsPaginatedPrint())
                     data.mediaFlags |= WebContextMenuData::MediaCanPrint;
 
-                HTMLPlugInImageElement* pluginElement = toHTMLPlugInImageElement(r.innerNonSharedNode());
+                HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(r.innerNonSharedNode());
                 data.srcURL = pluginElement->document()->completeURL(pluginElement->url());
                 data.mediaFlags |= WebContextMenuData::MediaCanSave;
 
index 275e5fe..e688bfa 100644 (file)
@@ -47,7 +47,7 @@ template <class HTMLNodeType>
 HTMLNodeType* toHTMLElement(Node* node, const QualifiedName& name)
 {
     if (node->isHTMLElement()
-        && toHTMLElement(node)->hasTagName(name)) {
+        && static_cast<HTMLElement*>(node)->hasTagName(name)) {
         return static_cast<HTMLNodeType*>(node);
     }
     return 0;
index c385291..be66af8 100644 (file)
@@ -106,7 +106,7 @@ bool IsSelectInDefaultState(HTMLSelectElement* select)
         for (Vector<HTMLElement*>::const_iterator i(listItems.begin()); i != listItems.end(); ++i) {
             if (!(*i)->hasLocalName(HTMLNames::optionTag))
                 continue;
-            HTMLOptionElement* optionElement = toHTMLOptionElement(*i);
+            HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(*i);
             if (optionElement->selected() != optionElement->hasAttribute(selectedAttr))
                 return false;
         }
@@ -119,7 +119,7 @@ bool IsSelectInDefaultState(HTMLSelectElement* select)
     for (Vector<HTMLElement*>::const_iterator i(listItems.begin()); i != listItems.end(); ++i) {
         if (!(*i)->hasLocalName(HTMLNames::optionTag))
             continue;
-        HTMLOptionElement* optionElement = toHTMLOptionElement(*i);
+        HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(*i);
         if (optionElement->hasAttribute(selectedAttr)) {
             // The page specified the option to select.
             initialSelected = optionElement;
index 7fd1a94..107d349 100644 (file)
@@ -1,3 +1,15 @@
+2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r145462.
+        http://trac.webkit.org/changeset/145462
+        https://bugs.webkit.org/show_bug.cgi?id=112097
+
+        Compilation failure in PluginView.cpp (Requested by jamesr_ on
+        #webkit).
+
+        * WebView/WebView.mm:
+        (-[WebView _enterFullscreenForNode:WebCore::]):
+
 2013-03-11  Abhishek Arya  <inferno@chromium.org>
 
         Replace static_casts with to* functions.
index 657f920..766f9d4 100644 (file)
@@ -6466,7 +6466,7 @@ bool LayerFlushController::flushLayers()
 - (void)_enterFullscreenForNode:(WebCore::Node*)node
 {
     ASSERT(node->hasTagName(WebCore::HTMLNames::videoTag));
-    HTMLMediaElement* videoElement = toMediaElement(node);
+    HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
 
     if (_private->fullscreenController) {
         if ([_private->fullscreenController mediaElement] == videoElement) {