Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Sep 2014 17:35:28 +0000 (17:35 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Sep 2014 17:35:28 +0000 (17:35 +0000)
commitebb5c2750de34ebc874b55ce7ea180cfb6abff42
treee200514ebf90b86bbb8046dabed33b0b8edffb49
parenta38df4d534139dc0a51a2afad2c33001cdffb301
Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
https://bugs.webkit.org/show_bug.cgi?id=137199

Reviewed by Darin Adler.

Use the new is<>() / downcast<>() for ShadowRoot and StyledElement and
move towards getting rid of the NODE_TYPE_CASTS() macro.

No new tests, no behavior change.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAllRules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initElement):
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::locateCousinList):
(WebCore::StyleResolver::findSiblingForStyleSharing):
* dom/Attr.cpp:
(WebCore::Attr::style):
* dom/Element.cpp:
(WebCore::Element::removeAttribute):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
(WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
(WebCore::eventTargetRespectingTargetRules):
(WebCore::EventPath::EventPath):
* dom/Node.cpp:
(WebCore::Node::containingShadowRoot):
(WebCore::Node::parentOrShadowHostElement):
(WebCore::Node::showNodePathForThis):
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::traverseParent):
* dom/ShadowRoot.h:
(WebCore::isShadowRoot):
(WebCore::Node::shadowRoot):
(WebCore::Node::parentOrShadowHostNode):
* dom/StyledElement.h:
(WebCore::StyledElement::presentationAttributeStyle):
(WebCore::isStyledElement):
* dom/Text.cpp:
(WebCore::isSVGShadowText):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveNodeToNewDocument):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::wrappingStyleForSerialization):
* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToElement):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::inlineStylePropertyForElement):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendElement):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::owner):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
* testing/Internals.cpp:
(WebCore::Internals::shadowRoot):
(WebCore::Internals::shadowRootType):
(WebCore::Internals::includerFor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/ElementRuleCollector.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/Attr.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/NodeRenderingTraversal.cpp
Source/WebCore/dom/ShadowRoot.h
Source/WebCore/dom/StyledElement.h
Source/WebCore/dom/Text.cpp
Source/WebCore/dom/TreeScope.cpp
Source/WebCore/dom/TreeScopeAdopter.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/cocoa/HTMLConverter.mm
Source/WebCore/editing/markup.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/testing/Internals.cpp