Title: [173895] trunk/Source
Revision
173895
Author
cdu...@apple.com
Date
2014-09-23 15:27:38 -0700 (Tue, 23 Sep 2014)

Log Message

Unreviewed build fix after r173893.

Partial revert of r173893 to fix debug builds.

Source/WebCore:

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::text):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::isPlaceholderShown):
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateName):
(WebCore::Element::updateId):
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::findFirstMarkable):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::matchesReadWritePseudoClass):
(WebCore::HTMLElement::directionality):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
* html/HTMLPlugInImageElement.cpp:
(WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
* html/HTMLTextFormControlElement.cpp:
(WebCore::enclosingTextFormControl):
* page/FrameView.cpp:
(WebCore::FrameView::addEmbeddedObjectToUpdate):
(WebCore::FrameView::updateEmbeddedObject):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absolutePDFURL):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::plugInImageElement):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textFormControlElement):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder):

Source/WebKit/win:

* DOMHTMLClasses.cpp:
(DOMHTMLDocument::URL):
(DOMHTMLDocument::body):
(DOMHTMLDocument::forms):

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::value):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173894 => 173895)


--- trunk/Source/WebCore/ChangeLog	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/ChangeLog	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1,3 +1,62 @@
+2014-09-23  Christophe Dumez  <cdu...@apple.com>
+
+        Unreviewed build fix after r173893.
+
+        Partial revert of r173893 to fix debug builds.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::text):
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::namedItemGetter):
+        (WebCore::JSDOMWindow::getOwnPropertySlot):
+        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOne):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
+        (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
+        (WebCore::SelectorCompiler::isPlaceholderShown):
+        * dom/Document.cpp:
+        (WebCore::Document::processHttpEquiv):
+        * dom/Element.cpp:
+        (WebCore::Element::insertedInto):
+        (WebCore::Element::removedFrom):
+        (WebCore::Element::updateName):
+        (WebCore::Element::updateId):
+        * editing/Editor.cpp:
+        (WebCore::Editor::selectionForCommand):
+        (WebCore::findFirstMarkable):
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::selectAll):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::matchesReadWritePseudoClass):
+        (WebCore::HTMLElement::directionality):
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::parseAttribute):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::updateDocNamedItem):
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::enclosingTextFormControl):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::addEmbeddedObjectToUpdate):
+        (WebCore::FrameView::updateEmbeddedObject):
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::absolutePDFURL):
+        * rendering/RenderEmbeddedObject.cpp:
+        (WebCore::RenderEmbeddedObject::paintContents):
+        (WebCore::RenderEmbeddedObject::layout):
+        * rendering/RenderSnapshottedPlugIn.cpp:
+        (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::textFormControlElement):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
+        (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
+        * testing/Internals.cpp:
+        (WebCore::Internals::visiblePlaceholder):
+
 2014-09-22  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Implement snapping behavior for Mac overflow scrolling

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (173894 => 173895)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1752,7 +1752,7 @@
         return String();
 
     if (isNativeTextControl() && isHTMLTextFormControlElement(*node))
-        return downcast<HTMLTextFormControlElement>(*node).value();
+        return toHTMLTextFormControlElement(*node).value();
 
     if (!node->isElementNode())
         return String();

Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (173894 => 173895)


--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -83,16 +83,16 @@
     ASSERT(document->isHTMLDocument());
 
     AtomicStringImpl* atomicPropertyName = propertyName.publicName();
-    if (!atomicPropertyName || !downcast<HTMLDocument>(*document).hasWindowNamedItem(*atomicPropertyName))
+    if (!atomicPropertyName || !toHTMLDocument(*document).hasWindowNamedItem(*atomicPropertyName))
         return JSValue::encode(jsUndefined());
 
-    if (UNLIKELY(downcast<HTMLDocument>(*document).windowNamedItemContainsMultipleElements(*atomicPropertyName))) {
+    if (UNLIKELY(toHTMLDocument(*document).windowNamedItemContainsMultipleElements(*atomicPropertyName))) {
         RefPtr<HTMLCollection> collection = document->windowNamedItems(atomicPropertyName);
         ASSERT(collection->length() > 1);
         return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));
     }
 
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), downcast<HTMLDocument>(*document).windowNamedItem(*atomicPropertyName)));
+    return JSValue::encode(toJS(exec, thisObj->globalObject(), toHTMLDocument(*document).windowNamedItem(*atomicPropertyName)));
 }
 
 #if ENABLE(USER_MESSAGE_HANDLERS)
@@ -246,7 +246,7 @@
     Document* document = thisObject->impl().frame()->document();
     if (document->isHTMLDocument()) {
         AtomicStringImpl* atomicPropertyName = propertyName.publicName();
-        if (atomicPropertyName && downcast<HTMLDocument>(*document).hasWindowNamedItem(*atomicPropertyName)) {
+        if (atomicPropertyName && toHTMLDocument(*document).hasWindowNamedItem(*atomicPropertyName)) {
             slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, namedItemGetter);
             return true;
         }
@@ -323,7 +323,7 @@
     Document* document = thisObject->impl().frame()->document();
     if (document->isHTMLDocument()) {
         AtomicStringImpl* atomicPropertyName = propertyName.publicName();
-        if (atomicPropertyName && downcast<HTMLDocument>(*document).hasWindowNamedItem(*atomicPropertyName)) {
+        if (atomicPropertyName && toHTMLDocument(*document).hasWindowNamedItem(*atomicPropertyName)) {
             slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, namedItemGetter);
             return true;
         }

Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (173894 => 173895)


--- trunk/Source/WebCore/css/SelectorChecker.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -655,7 +655,7 @@
                     if (RenderStyle* style = context.elementStyle ? context.elementStyle : element->renderStyle())
                         style->setUnique();
                 }
-                return downcast<HTMLTextFormControlElement>(*element).isPlaceholderVisible();
+                return toHTMLTextFormControlElement(*element).isPlaceholderVisible();
             }
             return false;
 #endif

Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (173894 => 173895)


--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -2785,7 +2785,7 @@
     if (isHTMLTextFormControlElement(*element)) {
         if (checkingContext->resolvingMode == SelectorChecker::Mode::ResolvingStyle)
             checkingContext->elementStyle->setUnique();
-        return downcast<HTMLTextFormControlElement>(*element).isPlaceholderVisible();
+        return toHTMLTextFormControlElement(*element).isPlaceholderVisible();
     }
     return false;
 }
@@ -2797,14 +2797,14 @@
             if (RenderStyle* style = element->renderStyle())
                 style->setUnique();
         }
-        return downcast<HTMLTextFormControlElement>(*element).isPlaceholderVisible();
+        return toHTMLTextFormControlElement(*element).isPlaceholderVisible();
     }
     return false;
 }
 
 static bool isPlaceholderShown(Element* element)
 {
-    return isHTMLTextFormControlElement(*element) && downcast<HTMLTextFormControlElement>(*element).isPlaceholderVisible();
+    return isHTMLTextFormControlElement(*element) && toHTMLTextFormControlElement(*element).isPlaceholderVisible();
 }
 
 void SelectorCodeGenerator::generateElementHasPlaceholderShown(Assembler::JumpList& failureCases, const SelectorFragment& fragment)

Modified: trunk/Source/WebCore/dom/Document.cpp (173894 => 173895)


--- trunk/Source/WebCore/dom/Document.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/dom/Document.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -2881,7 +2881,7 @@
         // FIXME: make setCookie work on XML documents too; e.g. in case of <html:meta .....>
         if (isHTMLDocument()) {
             // Exception (for sandboxed documents) ignored.
-            downcast<HTMLDocument>(*this).setCookie(content, IGNORE_EXCEPTION);
+            toHTMLDocument(*this).setCookie(content, IGNORE_EXCEPTION);
         }
         break;
 

Modified: trunk/Source/WebCore/dom/Element.cpp (173894 => 173895)


--- trunk/Source/WebCore/dom/Element.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/dom/Element.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1338,7 +1338,7 @@
         elementRareData()->clearClassListValueForQuirksMode();
 
     TreeScope* newScope = &insertionPoint.treeScope();
-    HTMLDocument* newDocument = !wasInDocument && inDocument() && newScope->documentScope().isHTMLDocument() ? downcast<HTMLDocument>(&newScope->documentScope()) : nullptr;
+    HTMLDocument* newDocument = !wasInDocument && inDocument() && newScope->documentScope().isHTMLDocument() ? toHTMLDocument(&newScope->documentScope()) : nullptr;
     if (newScope != &treeScope())
         newScope = nullptr;
 
@@ -1381,7 +1381,7 @@
 
     if (insertionPoint.isInTreeScope()) {
         TreeScope* oldScope = &insertionPoint.treeScope();
-        HTMLDocument* oldDocument = inDocument() && oldScope->documentScope().isHTMLDocument() ? downcast<HTMLDocument>(&oldScope->documentScope()) : nullptr;
+        HTMLDocument* oldDocument = inDocument() && oldScope->documentScope().isHTMLDocument() ? toHTMLDocument(&oldScope->documentScope()) : nullptr;
         if (oldScope != &treeScope() || !isInTreeScope())
             oldScope = nullptr;
 
@@ -2590,7 +2590,7 @@
         return;
     if (!document().isHTMLDocument())
         return;
-    updateNameForDocument(downcast<HTMLDocument>(document()), oldName, newName);
+    updateNameForDocument(toHTMLDocument(document()), oldName, newName);
 }
 
 void Element::updateNameForTreeScope(TreeScope& scope, const AtomicString& oldName, const AtomicString& newName)
@@ -2638,7 +2638,7 @@
         return;
     if (!document().isHTMLDocument())
         return;
-    updateIdForDocument(downcast<HTMLDocument>(document()), oldId, newId, UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute);
+    updateIdForDocument(toHTMLDocument(document()), oldId, newId, UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute);
 }
 
 void Element::updateIdForTreeScope(TreeScope& scope, const AtomicString& oldId, const AtomicString& newId)

Modified: trunk/Source/WebCore/editing/Editor.cpp (173894 => 173895)


--- trunk/Source/WebCore/editing/Editor.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/editing/Editor.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -209,7 +209,7 @@
     // If the target is a text control, and the current selection is outside of its shadow tree,
     // then use the saved selection for that text control.
     HTMLTextFormControlElement* textFormControlOfSelectionStart = enclosingTextFormControl(selection.start());
-    HTMLTextFormControlElement* textFromControlOfTarget = isHTMLTextFormControlElement(*event->target()->toNode()) ? downcast<HTMLTextFormControlElement>(event->target()->toNode()) : nullptr;
+    HTMLTextFormControlElement* textFromControlOfTarget = isHTMLTextFormControlElement(*event->target()->toNode()) ? toHTMLTextFormControlElement(event->target()->toNode()) : nullptr;
     if (textFromControlOfTarget && (selection.start().isNull() || textFromControlOfTarget != textFormControlOfSelectionStart)) {
         if (RefPtr<Range> range = textFromControlOfTarget->selection())
             return VisibleSelection(range.get(), DOWNSTREAM, selection.isDirectional());
@@ -3537,7 +3537,7 @@
         if (node->renderer()->isTextOrLineBreak())
             return node;
         if (isHTMLTextFormControlElement(*node))
-            node = downcast<HTMLTextFormControlElement>(*node).visiblePositionForIndex(1).deepEquivalent().deprecatedNode();
+            node = toHTMLTextFormControlElement(*node).visiblePositionForIndex(1).deepEquivalent().deprecatedNode();
         else if (node->firstChild())
             node = node->firstChild();
         else

Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (173894 => 173895)


--- trunk/Source/WebCore/editing/FrameSelection.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1689,7 +1689,7 @@
     } else {
         if (m_selection.isNone() && focusedElement) {
             if (focusedElement->isTextFormControl()) {
-                downcast<HTMLTextFormControlElement>(*focusedElement).select();
+                toHTMLTextFormControlElement(*focusedElement).select();
                 return;
             }
             root = focusedElement->nonBoundaryShadowTreeRootNode();

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (173894 => 173895)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -379,7 +379,7 @@
 
     const Document& document = this->document();
     if (document.isHTMLDocument()) {
-        const HTMLDocument& htmlDocument = downcast<HTMLDocument>(document);
+        const HTMLDocument& htmlDocument = toHTMLDocument(document);
         return htmlDocument.inDesignMode();
     }
     return false;
@@ -920,7 +920,7 @@
 TextDirection HTMLElement::directionality(Node** strongDirectionalityTextNode) const
 {
     if (isHTMLTextFormControlElement(*this)) {
-        HTMLTextFormControlElement& textElement = downcast<HTMLTextFormControlElement>(const_cast<HTMLElement&>(*this));
+        HTMLTextFormControlElement& textElement = toHTMLTextFormControlElement(const_cast<HTMLElement&>(*this));
         bool hasStrongDirectionality;
         UCharDirection textDirection = textElement.value().defaultWritingDirection(&hasStrongDirectionality);
         if (strongDirectionalityTextNode)

Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (173894 => 173895)


--- trunk/Source/WebCore/html/HTMLImageElement.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -183,7 +183,7 @@
         if (name == nameAttr) {
             bool willHaveName = !value.isNull();
             if (hasName() != willHaveName && inDocument() && document().isHTMLDocument()) {
-                HTMLDocument& document = downcast<HTMLDocument>(this->document());
+                HTMLDocument& document = toHTMLDocument(this->document());
                 const AtomicString& id = getIdAttribute();
                 if (!id.isEmpty() && id != getNameAttribute()) {
                     if (willHaveName)

Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (173894 => 173895)


--- trunk/Source/WebCore/html/HTMLObjectElement.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -436,7 +436,7 @@
         child = child->nextSibling();
     }
     if (isNamedItem != wasNamedItem && inDocument() && document().isHTMLDocument()) {
-        HTMLDocument& document = downcast<HTMLDocument>(this->document());
+        HTMLDocument& document = toHTMLDocument(this->document());
 
         const AtomicString& id = getIdAttribute();
         if (!id.isEmpty()) {

Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (173894 => 173895)


--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -417,7 +417,7 @@
         if (node->isPluginElement()) {
             HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
             if (plugInElement->isPlugInImageElement()) {
-                HTMLPlugInImageElement& plugInImageElement = downcast<HTMLPlugInImageElement>(*node);
+                HTMLPlugInImageElement& plugInImageElement = toHTMLPlugInImageElement(*node);
                 const URL& loadedURL = plugInImageElement.loadedUrl();
                 String otherMimeType = plugInImageElement.loadedMimeType();
                 if (plugInOrigin == loadedURL.host() && mimeType == otherMimeType)

Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (173894 => 173895)


--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -717,7 +717,7 @@
     if (!container)
         return nullptr;
     Element* ancestor = container->shadowHost();
-    return ancestor && isHTMLTextFormControlElement(*ancestor) ? downcast<HTMLTextFormControlElement>(ancestor) : nullptr;
+    return ancestor && isHTMLTextFormControlElement(*ancestor) ? toHTMLTextFormControlElement(ancestor) : nullptr;
 }
 
 static const Element* parentHTMLElement(const Element* element)

Modified: trunk/Source/WebCore/page/FrameView.cpp (173894 => 173895)


--- trunk/Source/WebCore/page/FrameView.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/page/FrameView.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1416,7 +1416,7 @@
     HTMLFrameOwnerElement& element = embeddedObject.frameOwnerElement();
     if (isHTMLObjectElement(element) || isHTMLEmbedElement(element)) {
         // Tell the DOM element that it needs a widget update.
-        HTMLPlugInImageElement& pluginElement = downcast<HTMLPlugInImageElement>(element);
+        HTMLPlugInImageElement& pluginElement = toHTMLPlugInImageElement(element);
         if (!pluginElement.needsCheckForSizeChange())
             pluginElement.setNeedsWidgetUpdate(true);
     }
@@ -2789,7 +2789,7 @@
 
     if (embeddedObject.isSnapshottedPlugIn()) {
         if (isHTMLObjectElement(element) || isHTMLEmbedElement(element)) {
-            HTMLPlugInImageElement& pluginElement = downcast<HTMLPlugInImageElement>(element);
+            HTMLPlugInImageElement& pluginElement = toHTMLPlugInImageElement(element);
             pluginElement.checkSnapshotStatus();
         }
         return;
@@ -2800,7 +2800,7 @@
     // FIXME: This could turn into a real virtual dispatch if we defined
     // updateWidget(PluginCreationOption) on HTMLElement.
     if (isHTMLObjectElement(element) || isHTMLEmbedElement(element) || isHTMLAppletElement(element)) {
-        HTMLPlugInImageElement& pluginElement = downcast<HTMLPlugInImageElement>(element);
+        HTMLPlugInImageElement& pluginElement = toHTMLPlugInImageElement(element);
         if (pluginElement.needsCheckForSizeChange()) {
             pluginElement.checkSnapshotStatus();
             return;

Modified: trunk/Source/WebCore/rendering/HitTestResult.cpp (173894 => 173895)


--- trunk/Source/WebCore/rendering/HitTestResult.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/rendering/HitTestResult.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -339,7 +339,7 @@
     if (!isHTMLEmbedElement(*m_innerNonSharedNode) && !isHTMLObjectElement(*m_innerNonSharedNode))
         return URL();
 
-    HTMLPlugInImageElement& element = downcast<HTMLPlugInImageElement>(*m_innerNonSharedNode);
+    HTMLPlugInImageElement& element = toHTMLPlugInImageElement(*m_innerNonSharedNode);
     URL url = ""
     if (!url.isValid())
         return URL();

Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (173894 => 173895)


--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -238,7 +238,7 @@
     if (!plugInElement.isPlugInImageElement())
         return;
 
-    if (Image* snapshot = downcast<HTMLPlugInImageElement>(plugInElement).snapshotImage())
+    if (Image* snapshot = toHTMLPlugInImageElement(plugInElement).snapshotImage())
         paintSnapshotImage(paintInfo, paintOffset, snapshot);
 }
 
@@ -494,7 +494,7 @@
     if (!wasMissingWidget && newSize.width() >= oldSize.width() && newSize.height() >= oldSize.height()) {
         HTMLFrameOwnerElement& element = frameOwnerElement();
         if (element.isPluginElement() && toHTMLPlugInElement(element).isPlugInImageElement()) {
-            HTMLPlugInImageElement& plugInImageElement = downcast<HTMLPlugInImageElement>(element);
+            HTMLPlugInImageElement& plugInImageElement = toHTMLPlugInImageElement(element);
             if (plugInImageElement.displayState() > HTMLPlugInElement::DisplayingSnapshot && plugInImageElement.snapshotDecision() == HTMLPlugInImageElement::MaySnapshotWhenResized) {
                 plugInImageElement.setNeedsCheckForSizeChange();
                 view().frameView().addEmbeddedObjectToUpdate(*this);

Modified: trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp (173894 => 173895)


--- trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -64,7 +64,7 @@
 
 HTMLPlugInImageElement& RenderSnapshottedPlugIn::plugInImageElement() const
 {
-    return downcast<HTMLPlugInImageElement>(RenderEmbeddedObject::frameOwnerElement());
+    return toHTMLPlugInImageElement(RenderEmbeddedObject::frameOwnerElement());
 }
 
 void RenderSnapshottedPlugIn::layout()

Modified: trunk/Source/WebCore/rendering/RenderTextControl.cpp (173894 => 173895)


--- trunk/Source/WebCore/rendering/RenderTextControl.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/rendering/RenderTextControl.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -48,7 +48,7 @@
 
 HTMLTextFormControlElement& RenderTextControl::textFormControlElement() const
 {
-    return downcast<HTMLTextFormControlElement>(nodeForNonAnonymous());
+    return toHTMLTextFormControlElement(nodeForNonAnonymous());
 }
 
 TextControlInnerTextElement* RenderTextControl::innerTextElement() const

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (173894 => 173895)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1678,7 +1678,7 @@
 
     NSSearchFieldCell* search = this->search();
 
-    if (!input->isDisabledFormControl() && (input->isTextFormControl() && !downcast<HTMLTextFormControlElement>(*input).isReadOnly()))
+    if (!input->isDisabledFormControl() && (input->isTextFormControl() && !toHTMLTextFormControlElement(*input).isReadOnly()))
         updatePressedState([search cancelButtonCell], o);
     else if ([[search cancelButtonCell] isHighlighted])
         [[search cancelButtonCell] setHighlighted:NO];
@@ -1861,7 +1861,7 @@
     if (!plugInElement->isPlugInImageElement())
         return true;
 
-    HTMLPlugInImageElement& plugInImageElement = downcast<HTMLPlugInImageElement>(*plugInElement);
+    HTMLPlugInImageElement& plugInImageElement = toHTMLPlugInImageElement(*plugInElement);
 
     Image* snapshot = plugInImageElement.snapshotImage();
     if (!snapshot)

Modified: trunk/Source/WebCore/testing/Internals.cpp (173894 => 173895)


--- trunk/Source/WebCore/testing/Internals.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebCore/testing/Internals.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -624,7 +624,7 @@
 String Internals::visiblePlaceholder(Element* element)
 {
     if (element && isHTMLTextFormControlElement(*element)) {
-        const HTMLTextFormControlElement& textFormControlElement = downcast<HTMLTextFormControlElement>(*element);
+        const HTMLTextFormControlElement& textFormControlElement = toHTMLTextFormControlElement(*element);
         if (!textFormControlElement.isPlaceholderVisible())
             return String();
         if (HTMLElement* placeholderElement = textFormControlElement.placeholderElement())

Modified: trunk/Source/WebKit/win/ChangeLog (173894 => 173895)


--- trunk/Source/WebKit/win/ChangeLog	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebKit/win/ChangeLog	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1,3 +1,14 @@
+2014-09-23  Christophe Dumez  <cdu...@apple.com>
+
+        Unreviewed build fix after r173893.
+
+        Partial revert of r173893 to fix debug builds.
+
+        * DOMHTMLClasses.cpp:
+        (DOMHTMLDocument::URL):
+        (DOMHTMLDocument::body):
+        (DOMHTMLDocument::forms):
+
 2014-09-23  Chris Dumez  <cdu...@apple.com>
 
         Use downcast<HTML*Element>() instead of toHTML*Element()

Modified: trunk/Source/WebKit/win/DOMHTMLClasses.cpp (173894 => 173895)


--- trunk/Source/WebKit/win/DOMHTMLClasses.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebKit/win/DOMHTMLClasses.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -250,7 +250,7 @@
     if (!result)
         return E_POINTER;
 
-    *result = BString(downcast<HTMLDocument>(m_document)->url()).release();
+    *result = BString(toHTMLDocument(m_document)->url()).release();
     return S_OK;
 }
     
@@ -261,7 +261,7 @@
     if (!m_document || !m_document->isHTMLDocument())
         return E_FAIL;
 
-    HTMLDocument& htmlDoc = downcast<HTMLDocument>(*m_document);
+    HTMLDocument& htmlDoc = toHTMLDocument(*m_document);
     COMPtr<IDOMElement> domElement;
     domElement.adoptRef(DOMHTMLElement::createInstance(htmlDoc.body()));
     if (domElement)
@@ -304,7 +304,7 @@
     if (!m_document || !m_document->isHTMLDocument())
         return E_FAIL;
 
-    HTMLDocument& htmlDoc = downcast<HTMLDocument>(*m_document);
+    HTMLDocument& htmlDoc = toHTMLDocument(*m_document);
     RefPtr<HTMLCollection> forms = htmlDoc.forms();
     *collection = DOMHTMLCollection::createInstance(forms.get());
     return S_OK;

Modified: trunk/Source/WebKit2/ChangeLog (173894 => 173895)


--- trunk/Source/WebKit2/ChangeLog	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebKit2/ChangeLog	2014-09-23 22:27:38 UTC (rev 173895)
@@ -1,3 +1,18 @@
+2014-09-23  Christophe Dumez  <cdu...@apple.com>
+
+        Unreviewed build fix after r173893.
+
+        Partial revert of r173893 to fix debug builds.
+
+        * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
+        (WebKit::PDFPluginTextAnnotation::value):
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::initializePlugin):
+        (WebKit::PluginView::pluginSnapshotTimerFired):
+        (WebKit::PluginView::pluginDidReceiveUserInteraction):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::createPlugin):
+
 2014-09-23  Chris Dumez  <cdu...@apple.com>
 
         Use downcast<HTML*Element>() instead of toHTML*Element()

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm (173894 => 173895)


--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm	2014-09-23 22:27:38 UTC (rev 173895)
@@ -128,7 +128,7 @@
 
 String PDFPluginTextAnnotation::value() const
 {
-    return downcast<HTMLTextFormControlElement>(element())->value();
+    return toHTMLTextFormControlElement(element())->value();
 }
 
 bool PDFPluginTextAnnotation::handleEvent(Event* event)

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (173894 => 173895)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -590,7 +590,7 @@
     }
 
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-    HTMLPlugInImageElement* plugInImageElement = downcast<HTMLPlugInImageElement>(m_pluginElement.get());
+    HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(m_pluginElement.get());
     m_didPlugInStartOffScreen = !m_webPage->plugInIntersectsSearchRect(*plugInImageElement);
 #endif
     m_plugin->initialize(this, m_parameters);
@@ -1713,7 +1713,7 @@
     ASSERT(m_plugin);
 
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-    HTMLPlugInImageElement* plugInImageElement = downcast<HTMLPlugInImageElement>(m_pluginElement.get());
+    HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(m_pluginElement.get());
     bool isPlugInOnScreen = m_webPage->plugInIntersectsSearchRect(*plugInImageElement);
     bool plugInCameOnScreen = isPlugInOnScreen && m_didPlugInStartOffScreen;
     bool snapshotFound = false;
@@ -1781,7 +1781,7 @@
 
     m_didReceiveUserInteraction = true;
 
-    WebCore::HTMLPlugInImageElement* plugInImageElement = downcast<HTMLPlugInImageElement>(m_pluginElement.get());
+    WebCore::HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(m_pluginElement.get());
     String pageOrigin = plugInImageElement->document().page()->mainFrame().document()->baseURL().host();
     String pluginOrigin = plugInImageElement->loadedUrl().host();
     String mimeType = plugInImageElement->loadedMimeType();

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (173894 => 173895)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-09-23 22:16:25 UTC (rev 173894)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-09-23 22:27:38 UTC (rev 173895)
@@ -624,7 +624,7 @@
     String pageURLString = m_page->mainFrame().loader().documentLoader()->responseURL().string();
 
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-    HTMLPlugInImageElement& pluginImageElement = downcast<HTMLPlugInImageElement>(*pluginElement);
+    HTMLPlugInImageElement& pluginImageElement = toHTMLPlugInImageElement(*pluginElement);
     unsigned pluginArea = 0;
     PluginProcessType processType = pluginElement->displayState() == HTMLPlugInElement::WaitingForSnapshot && !(plugInIsPrimarySize(pluginImageElement, pluginArea) && !plugInIntersectsSearchRect(pluginImageElement)) ? PluginProcessTypeSnapshot : PluginProcessTypeNormal;
 #else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to