Make is<>() / downcast<>() work for HTMLDocument and its subclasses
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Sep 2014 16:58:42 +0000 (16:58 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Sep 2014 16:58:42 +0000 (16:58 +0000)
commita6b58a539be44bfa5e1d54bb663c4524717ca655
tree6ea67401dcd5316623e29b7a072392271536b83b
parent174bc962040c43193f8b6a684274acc879a0b75b
Make is<>() / downcast<>() work for HTMLDocument and its subclasses
https://bugs.webkit.org/show_bug.cgi?id=137169

Reviewed by Darin Adler.

Source/WebCore:

Make is<>() / downcast<>() work for HTMLDocument and its subclasses by
using the SPECIALIZE_TYPE_TRAITS_*() macro. Drop the DOCUMENT_TYPE_CASTS()
macro as it is no longer needed.

No new tests, no behavior change.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::processHttpEquiv):
(WebCore::eventTargetElementForDocument):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateName):
(WebCore::Element::updateId):
* html/HTMLDocument.h:
(WebCore::isHTMLDocument):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::matchesReadWritePseudoClass):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::document):
* html/ImageDocument.h:
(WebCore::isImageDocument):
* html/MediaDocument.h:
(WebCore::isMediaDocument):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* html/PluginDocument.h:
(WebCore::isPluginDocument):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
* page/DragController.cpp:
(WebCore::DragController::operationForLoad):
* page/FrameView.cpp:
(WebCore::determineLayerFlushThrottleState):

Source/WebKit/win:

Use is<>() / downcast<>() for HTMLDocument and its subclasses.

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

Source/WebKit2:

Use is<>() / downcast<>() for HTMLDocument and its subclasses.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pdfDocumentForPrintingFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp
Source/WebCore/html/HTMLDocument.h
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/ImageDocument.h
Source/WebCore/html/MediaDocument.h
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/PluginDocument.h
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/FrameView.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMHTMLClasses.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp