Generate more HTML type checks and casting
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Sep 2013 08:02:57 +0000 (08:02 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Sep 2013 08:02:57 +0000 (08:02 +0000)
commit43c102e973028467515effef689d3a06be0ad259
treecdb8ec5972fc8273b8a809e42ba41b43c8eed29f
parent35410f1980d3214263a4ccf666a9844684da649c
Generate more HTML type checks and casting
https://bugs.webkit.org/show_bug.cgi?id=121080

Reviewed by Andreas Kling.

Clean-up remained functions of HTML elements using auto-generated isFooElement(),
and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.

Besides this patch clean-up unnecessary checks which are being supported by
auto-generated isFooElement().

Source/WebCore:

No new tests, no behavior change.

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
* html/HTMLFrameElementBase.h:
(WebCore::toHTMLFrameElementBase):
* html/HTMLIFrameElement.h:
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLObjectElemenaeh:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLSelectElement.h:
* html/HTMLTagNames.in:
* html/HTMLVideoElement.h:
* html/shadow/HTMLContentElement.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* page/PageSerializer.cpp:
(WebCore::frameOwnerURLAttributeName):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* plugins/IFrameShimSupport.cpp:
(WebCore::getPluginOcclusions):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaSupportsFullscreen):
(WebCore::HitTestResult::mediaElement):
(WebCore::HitTestResult::enterFullscreenForVideo):
(WebCore::HitTestResult::mediaIsVideo):

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::adjustRectOffsetForFrameOffset):
(BlackBerry::WebKit::WebPage::notifyFullScreenVideoExited):
(BlackBerry::WebKit::WebPagePrivate::enterFullscreenForNode):
(BlackBerry::WebKit::WebPagePrivate::exitFullscreenForNode):
(BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
(BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::supportsFullscreenForNode):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::isElementTypePlugin):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
(BlackBerry::WebKit::InputHandler::didNodeOpenPopup):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):

Source/WebKit/gtk:

No new tests, no behavior change.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::supportsFullscreenForNode):

Source/WebKit/mac:

No new tests, no behavior change.

* Plugins/WebPluginController.mm:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::supportsFullscreenForNode):
* WebView/WebView.mm:
(-[WebView _enterFullscreenForNode:WebCore::]):

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::supportsFullscreenForNode):
* WebView.cpp:
(WebView::enterFullscreenForNode):

Source/WebKit2:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormControls):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
42 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/html/HTMLFrameElementBase.h
Source/WebCore/html/HTMLIFrameElement.h
Source/WebCore/html/HTMLImageLoader.cpp
Source/WebCore/html/HTMLObjectElement.h
Source/WebCore/html/HTMLOptionsCollection.cpp
Source/WebCore/html/HTMLSelectElement.h
Source/WebCore/html/HTMLTagNames.in
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/html/shadow/HTMLContentElement.h
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/page/SpatialNavigation.cpp
Source/WebCore/platform/gtk/PasteboardGtk.cpp
Source/WebCore/plugins/IFrameShimSupport.cpp
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/WebPluginController.mm
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp