<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174039] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174039">174039</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-27 22:21:30 -0700 (Sat, 27 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use the new is&lt;&gt;() / downcast&lt;&gt;() for more Node subclasses
https://bugs.webkit.org/show_bug.cgi?id=137184

Reviewed by Ryosuke Niwa.

Use the new is&lt;&gt;() / downcast&lt;&gt;() for more Node subclasses:
CDATASection, CharacterData, Comment, DocumentType,
ProcessingInstruction, and PseudoElement.

No new tests, no behavior change.

* dom/CDATASection.h:
(WebCore::isCDATASection):
* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* dom/CharacterData.h:
(WebCore::isCharacterData):
* dom/Comment.h:
(WebCore::isComment):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/DocumentType.h:
(WebCore::isDocumentType):
* dom/EventDispatcher.cpp:
(WebCore::eventTargetRespectingTargetRules):
(WebCore::nodeOrHostIfPseudoElement):
* dom/Node.cpp:
(WebCore::markAncestorsWithChildNeedsStyleRecalc):
(WebCore::Node::pseudoAwarePreviousSibling):
(WebCore::Node::pseudoAwareNextSibling):
* dom/NodeTraversal.cpp:
(WebCore::NodeTraversal::previousIncludingPseudo):
(WebCore::NodeTraversal::nextIncludingPseudo):
(WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
* dom/ProcessingInstruction.h:
(WebCore::isProcessingInstruction):
* dom/PseudoElement.h:
(WebCore::isPseudoElement):
* dom/Range.cpp:
(WebCore::lengthOfContentsInNode):
(WebCore::Range::processContentsBetweenOffsets):
(WebCore::Range::checkNodeWOffset):
* editing/Editor.cpp:
(WebCore::Editor::shouldInsertFragment):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendStartMarkup):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_traverseNode):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setInnerNode):
(WebCore::HitTestResult::setInnerNonSharedNode):
* rendering/RenderListItem.cpp:
(WebCore::enclosingList):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::generatingPseudoHostElement):
* xml/XPathFunctions.cpp:
(WebCore::XPath::expandedNameLocalPart):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomCDATASectionh">trunk/Source/WebCore/dom/CDATASection.h</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDatacpp">trunk/Source/WebCore/dom/CharacterData.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDatah">trunk/Source/WebCore/dom/CharacterData.h</a></li>
<li><a href="#trunkSourceWebCoredomCommenth">trunk/Source/WebCore/dom/Comment.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentStyleSheetCollectioncpp">trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentTypeh">trunk/Source/WebCore/dom/DocumentType.h</a></li>
<li><a href="#trunkSourceWebCoredomEventDispatchercpp">trunk/Source/WebCore/dom/EventDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeTraversalcpp">trunk/Source/WebCore/dom/NodeTraversal.cpp</a></li>
<li><a href="#trunkSourceWebCoredomProcessingInstructionh">trunk/Source/WebCore/dom/ProcessingInstruction.h</a></li>
<li><a href="#trunkSourceWebCoredomPseudoElementh">trunk/Source/WebCore/dom/PseudoElement.h</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingMarkupAccumulatorcpp">trunk/Source/WebCore/editing/MarkupAccumulator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorLayerTreeAgentcpp">trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingHitTestResultcpp">trunk/Source/WebCore/rendering/HitTestResult.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListItemcpp">trunk/Source/WebCore/rendering/RenderListItem.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXPathFunctionscpp">trunk/Source/WebCore/xml/XPathFunctions.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/ChangeLog        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -1,5 +1,69 @@
</span><span class="cx"> 2014-09-27  Christophe Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Use the new is&lt;&gt;() / downcast&lt;&gt;() for more Node subclasses
+        https://bugs.webkit.org/show_bug.cgi?id=137184
+
+        Reviewed by Ryosuke Niwa.
+
+        Use the new is&lt;&gt;() / downcast&lt;&gt;() for more Node subclasses:
+        CDATASection, CharacterData, Comment, DocumentType,
+        ProcessingInstruction, and PseudoElement.
+
+        No new tests, no behavior change.
+
+        * dom/CDATASection.h:
+        (WebCore::isCDATASection):
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::setDataAndUpdate):
+        * dom/CharacterData.h:
+        (WebCore::isCharacterData):
+        * dom/Comment.h:
+        (WebCore::isComment):
+        * dom/DocumentStyleSheetCollection.cpp:
+        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
+        * dom/DocumentType.h:
+        (WebCore::isDocumentType):
+        * dom/EventDispatcher.cpp:
+        (WebCore::eventTargetRespectingTargetRules):
+        (WebCore::nodeOrHostIfPseudoElement):
+        * dom/Node.cpp:
+        (WebCore::markAncestorsWithChildNeedsStyleRecalc):
+        (WebCore::Node::pseudoAwarePreviousSibling):
+        (WebCore::Node::pseudoAwareNextSibling):
+        * dom/NodeTraversal.cpp:
+        (WebCore::NodeTraversal::previousIncludingPseudo):
+        (WebCore::NodeTraversal::nextIncludingPseudo):
+        (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
+        * dom/ProcessingInstruction.h:
+        (WebCore::isProcessingInstruction):
+        * dom/PseudoElement.h:
+        (WebCore::isPseudoElement):
+        * dom/Range.cpp:
+        (WebCore::lengthOfContentsInNode):
+        (WebCore::Range::processContentsBetweenOffsets):
+        (WebCore::Range::checkNodeWOffset):
+        * editing/Editor.cpp:
+        (WebCore::Editor::shouldInsertFragment):
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::appendStartMarkup):
+        * editing/cocoa/HTMLConverter.mm:
+        (HTMLConverter::_traverseNode):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::buildObjectForNode):
+        * inspector/InspectorLayerTreeAgent.cpp:
+        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::setInnerNode):
+        (WebCore::HitTestResult::setInnerNonSharedNode):
+        * rendering/RenderListItem.cpp:
+        (WebCore::enclosingList):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::generatingPseudoHostElement):
+        * xml/XPathFunctions.cpp:
+        (WebCore::XPath::expandedNameLocalPart):
+
+2014-09-27  Christophe Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Use the new is&lt;&gt;() / downcast&lt;&gt;() for Attr Nodes
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=137183
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomCDATASectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CDATASection.h (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CDATASection.h        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/CDATASection.h        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -41,12 +41,10 @@
</span><span class="cx">     virtual PassRefPtr&lt;Text&gt; virtualCreate(const String&amp;) override;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool isCDATASection(const Node&amp; node) { return node.nodeType() == Node::CDATA_SECTION_NODE; }
-void isCDATASection(const CDATASection&amp;); // Catch unnecessary runtime check of type known at compile time.
-void isCDATASection(const ContainerNode&amp;); // Catch unnecessary runtime check of type known at compile time.
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(CDATASection)
+    static bool isCDATASection(const Node&amp; node) { return node.nodeType() == Node::CDATA_SECTION_NODE; }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-NODE_TYPE_CASTS(CDATASection)
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // CDATASection_h
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/CharacterData.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -198,8 +198,8 @@
</span><span class="cx">     if (isTextNode())
</span><span class="cx">         Style::updateTextRendererAfterContentChange(*toText(this), offsetOfReplacedData, oldLength);
</span><span class="cx"> 
</span><del>-    if (nodeType() == PROCESSING_INSTRUCTION_NODE)
-        toProcessingInstruction(this)-&gt;checkStyleSheet();
</del><ins>+    if (is&lt;ProcessingInstruction&gt;(this))
+        downcast&lt;ProcessingInstruction&gt;(*this).checkStyleSheet();
</ins><span class="cx"> 
</span><span class="cx">     if (document().frame())
</span><span class="cx">         document().frame()-&gt;selection().textWasReplaced(this, offsetOfReplacedData, oldLength, newLength);
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.h (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.h        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/CharacterData.h        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -76,12 +76,10 @@
</span><span class="cx">     String m_data;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool isCharacterData(const Node&amp; node) { return node.isCharacterDataNode(); }
-void isCharacterData(const CharacterData&amp;); // Catch unnecessary runtime check of type known at compile time.
-void isCharacterData(const ContainerNode&amp;); // Catch unnecessary runtime check of type known at compile time.
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(CharacterData)
+    static bool isCharacterData(const Node&amp; node) { return node.isCharacterDataNode(); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-NODE_TYPE_CASTS(CharacterData)
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // CharacterData_h
</span></span></pre></div>
<a id="trunkSourceWebCoredomCommenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Comment.h (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Comment.h        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/Comment.h        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -41,12 +41,10 @@
</span><span class="cx">     virtual bool childTypeAllowed(NodeType) const override;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool isComment(const Node&amp; node) { return node.nodeType() == Node::COMMENT_NODE; }
-void isComment(const Comment&amp;); // Catch unnecessary runtime check of type known at compile time.
-void isComment(const ContainerNode&amp;); // Catch unnecessary runtime check of type known at compile time.
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(Comment)
+    static bool isComment(const Node&amp; node) { return node.nodeType() == Node::COMMENT_NODE; }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-NODE_TYPE_CASTS(Comment)
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // Comment_h
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentStyleSheetCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -266,17 +266,17 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; node : m_styleSheetCandidateNodes) {
</span><span class="cx">         StyleSheet* sheet = nullptr;
</span><del>-        if (node-&gt;nodeType() == Node::PROCESSING_INSTRUCTION_NODE) {
</del><ins>+        if (is&lt;ProcessingInstruction&gt;(node)) {
</ins><span class="cx">             // Processing instruction (XML documents only).
</span><span class="cx">             // We don't support linking to embedded CSS stylesheets, see &lt;https://bugs.webkit.org/show_bug.cgi?id=49281&gt; for discussion.
</span><del>-            ProcessingInstruction* pi = toProcessingInstruction(node);
-            sheet = pi-&gt;sheet();
</del><ins>+            ProcessingInstruction&amp; pi = downcast&lt;ProcessingInstruction&gt;(*node);
+            sheet = pi.sheet();
</ins><span class="cx"> #if ENABLE(XSLT)
</span><span class="cx">             // Don't apply XSL transforms to already transformed documents -- &lt;rdar://problem/4132806&gt;
</span><del>-            if (pi-&gt;isXSL() &amp;&amp; !m_document.transformSourceDocument()) {
</del><ins>+            if (pi.isXSL() &amp;&amp; !m_document.transformSourceDocument()) {
</ins><span class="cx">                 // Don't apply XSL transforms until loading is finished.
</span><span class="cx">                 if (!m_document.parsing())
</span><del>-                    m_document.applyXSLTransform(pi);
</del><ins>+                    m_document.applyXSLTransform(&amp;pi);
</ins><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentType.h (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentType.h        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/DocumentType.h        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -60,13 +60,10 @@
</span><span class="cx">     String m_subset;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool isDocumentType(const Node&amp; node)
-{
-    return node.nodeType() == Node::DOCUMENT_TYPE_NODE;
-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(DocumentType)
+    static bool isDocumentType(const Node&amp; node) { return node.nodeType() == Node::DOCUMENT_TYPE_NODE; }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-NODE_TYPE_CASTS(DocumentType)
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventDispatcher.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -205,8 +205,8 @@
</span><span class="cx"> 
</span><span class="cx"> inline EventTarget&amp; eventTargetRespectingTargetRules(Node&amp; referenceNode)
</span><span class="cx"> {
</span><del>-    if (referenceNode.isPseudoElement()) {
-        EventTarget* hostElement = toPseudoElement(referenceNode).hostElement();
</del><ins>+    if (is&lt;PseudoElement&gt;(referenceNode)) {
+        EventTarget* hostElement = downcast&lt;PseudoElement&gt;(referenceNode).hostElement();
</ins><span class="cx">         ASSERT(hostElement);
</span><span class="cx">         return *hostElement;
</span><span class="cx">     }
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx"> 
</span><span class="cx"> static Node* nodeOrHostIfPseudoElement(Node* node)
</span><span class="cx"> {
</span><del>-    return node-&gt;isPseudoElement() ? toPseudoElement(node)-&gt;hostElement() : node;
</del><ins>+    return is&lt;PseudoElement&gt;(node) ? downcast&lt;PseudoElement&gt;(*node).hostElement() : node;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EventPath::EventPath(Node&amp; targetNode, Event&amp; event)
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/Node.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -672,7 +672,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline void markAncestorsWithChildNeedsStyleRecalc(Node&amp; node)
</span><span class="cx"> {
</span><del>-    if (ContainerNode* ancestor = node.isPseudoElement() ? toPseudoElement(node).hostElement() : node.parentOrShadowHostNode()) {
</del><ins>+    if (ContainerNode* ancestor = is&lt;PseudoElement&gt;(node) ? downcast&lt;PseudoElement&gt;(node).hostElement() : node.parentOrShadowHostNode()) {
</ins><span class="cx">         ancestor-&gt;setDirectChildNeedsStyleRecalc();
</span><span class="cx"> 
</span><span class="cx">         for (; ancestor &amp;&amp; !ancestor-&gt;childNeedsStyleRecalc(); ancestor = ancestor-&gt;parentOrShadowHostNode())
</span><span class="lines">@@ -872,7 +872,7 @@
</span><span class="cx"> 
</span><span class="cx"> Node* Node::pseudoAwarePreviousSibling() const
</span><span class="cx"> {
</span><del>-    Element* parentOrHost = isPseudoElement() ? toPseudoElement(this)-&gt;hostElement() : parentElement();
</del><ins>+    Element* parentOrHost = is&lt;PseudoElement&gt;(this) ? downcast&lt;PseudoElement&gt;(*this).hostElement() : parentElement();
</ins><span class="cx">     if (parentOrHost &amp;&amp; !previousSibling()) {
</span><span class="cx">         if (isAfterPseudoElement() &amp;&amp; parentOrHost-&gt;lastChild())
</span><span class="cx">             return parentOrHost-&gt;lastChild();
</span><span class="lines">@@ -884,7 +884,7 @@
</span><span class="cx"> 
</span><span class="cx"> Node* Node::pseudoAwareNextSibling() const
</span><span class="cx"> {
</span><del>-    Element* parentOrHost = isPseudoElement() ? toPseudoElement(this)-&gt;hostElement() : parentElement();
</del><ins>+    Element* parentOrHost = is&lt;PseudoElement&gt;(this) ? downcast&lt;PseudoElement&gt;(*this).hostElement() : parentElement();
</ins><span class="cx">     if (parentOrHost &amp;&amp; !nextSibling()) {
</span><span class="cx">         if (isBeforePseudoElement() &amp;&amp; parentOrHost-&gt;firstChild())
</span><span class="cx">             return parentOrHost-&gt;firstChild();
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeTraversalcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeTraversal.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeTraversal.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/NodeTraversal.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -35,13 +35,13 @@
</span><span class="cx"> {
</span><span class="cx">     Node* previous;
</span><span class="cx">     if (current == stayWithin)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if ((previous = current-&gt;pseudoAwarePreviousSibling())) {
</span><span class="cx">         while (previous-&gt;pseudoAwareLastChild())
</span><span class="cx">             previous = previous-&gt;pseudoAwareLastChild();
</span><span class="cx">         return previous;
</span><span class="cx">     }
</span><del>-    return current-&gt;isPseudoElement() ? toPseudoElement(current)-&gt;hostElement() : current-&gt;parentNode();
</del><ins>+    return is&lt;PseudoElement&gt;(current) ? downcast&lt;PseudoElement&gt;(*current).hostElement() : current-&gt;parentNode();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Node* nextIncludingPseudo(const Node* current, const Node* stayWithin)
</span><span class="lines">@@ -50,34 +50,34 @@
</span><span class="cx">     if ((next = current-&gt;pseudoAwareFirstChild()))
</span><span class="cx">         return next;
</span><span class="cx">     if (current == stayWithin)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if ((next = current-&gt;pseudoAwareNextSibling()))
</span><span class="cx">         return next;
</span><del>-    current = current-&gt;isPseudoElement() ? toPseudoElement(current)-&gt;hostElement() : current-&gt;parentNode();
</del><ins>+    current = is&lt;PseudoElement&gt;(current) ? downcast&lt;PseudoElement&gt;(*current).hostElement() : current-&gt;parentNode();
</ins><span class="cx">     for (; current; current = current-&gt;parentNode()) {
</span><span class="cx">         if (current == stayWithin)
</span><del>-            return 0;
</del><ins>+            return nullptr;
</ins><span class="cx">         if ((next = current-&gt;pseudoAwareNextSibling()))
</span><span class="cx">             return next;
</span><span class="cx">     }
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Node* nextIncludingPseudoSkippingChildren(const Node* current, const Node* stayWithin)
</span><span class="cx"> {
</span><span class="cx">     Node* next;
</span><span class="cx">     if (current == stayWithin)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if ((next = current-&gt;pseudoAwareNextSibling()))
</span><span class="cx">         return next;
</span><del>-    current = current-&gt;isPseudoElement() ? toPseudoElement(current)-&gt;hostElement() : current-&gt;parentNode();
</del><ins>+    current = is&lt;PseudoElement&gt;(current) ? downcast&lt;PseudoElement&gt;(*current).hostElement() : current-&gt;parentNode();
</ins><span class="cx">     for (; current; current = current-&gt;parentNode()) {
</span><span class="cx">         if (current == stayWithin)
</span><del>-            return 0;
</del><ins>+            return nullptr;
</ins><span class="cx">         if ((next = current-&gt;pseudoAwareNextSibling()))
</span><span class="cx">             return next;
</span><span class="cx">     }
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Node* nextAncestorSibling(const Node* current)
</span></span></pre></div>
<a id="trunkSourceWebCoredomProcessingInstructionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ProcessingInstruction.h (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ProcessingInstruction.h        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/ProcessingInstruction.h        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -91,13 +91,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline bool isProcessingInstruction(const Node&amp; node)
-{
-    return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE;
-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(ProcessingInstruction)
+    static bool isProcessingInstruction(const Node&amp; node) { return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE; }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-NODE_TYPE_CASTS(ProcessingInstruction)
-
</del><span class="cx"> } //namespace
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoredomPseudoElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/PseudoElement.h (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/PseudoElement.h        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/PseudoElement.h        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -77,9 +77,9 @@
</span><span class="cx">     return style &amp;&amp; style-&gt;display() != NONE &amp;&amp; (style-&gt;contentData() || style-&gt;hasFlowFrom());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void isPseudoElement(const PseudoElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-inline bool isPseudoElement(const Node&amp; node) { return node.isPseudoElement(); }
-NODE_TYPE_CASTS(PseudoElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(PseudoElement)
+    static bool isPseudoElement(const Node&amp; node) { return node.isPseudoElement(); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><span class="cx"> } // namespace
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/dom/Range.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -660,9 +660,8 @@
</span><span class="cx">     case Node::TEXT_NODE:
</span><span class="cx">     case Node::CDATA_SECTION_NODE:
</span><span class="cx">     case Node::COMMENT_NODE:
</span><del>-        return toCharacterData(node)-&gt;length();
</del><span class="cx">     case Node::PROCESSING_INSTRUCTION_NODE:
</span><del>-        return toProcessingInstruction(node)-&gt;data().length();
</del><ins>+        return downcast&lt;CharacterData&gt;(*node).length();
</ins><span class="cx">     case Node::ELEMENT_NODE:
</span><span class="cx">     case Node::ATTRIBUTE_NODE:
</span><span class="cx">     case Node::ENTITY_REFERENCE_NODE:
</span><span class="lines">@@ -809,7 +808,7 @@
</span><span class="cx">                 result = c.release();
</span><span class="cx">         }
</span><span class="cx">         if (action == Extract || action == Delete)
</span><del>-            toCharacterData(container)-&gt;deleteData(startOffset, endOffset - startOffset, ec);
</del><ins>+            downcast&lt;CharacterData&gt;(*container).deleteData(startOffset, endOffset - startOffset, ec);
</ins><span class="cx">         break;
</span><span class="cx">     case Node::PROCESSING_INSTRUCTION_NODE:
</span><span class="cx">         endOffset = std::min(endOffset, static_cast&lt;ProcessingInstruction*&gt;(container)-&gt;data().length());
</span><span class="lines">@@ -824,10 +823,10 @@
</span><span class="cx">                 result = c.release();
</span><span class="cx">         }
</span><span class="cx">         if (action == Extract || action == Delete) {
</span><del>-            ProcessingInstruction* pi = toProcessingInstruction(container);
-            String data(pi-&gt;data());
</del><ins>+            ProcessingInstruction&amp; pi = downcast&lt;ProcessingInstruction&gt;(*container);
+            String data(pi.data());
</ins><span class="cx">             data.remove(startOffset, endOffset - startOffset);
</span><del>-            pi-&gt;setData(data, ec);
</del><ins>+            pi.setData(data, ec);
</ins><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx">     case Node::ELEMENT_NODE:
</span><span class="lines">@@ -1152,17 +1151,14 @@
</span><span class="cx">         case Node::ENTITY_NODE:
</span><span class="cx">         case Node::NOTATION_NODE:
</span><span class="cx">             ec = RangeException::INVALID_NODE_TYPE_ERR;
</span><del>-            return 0;
</del><ins>+            return nullptr;
</ins><span class="cx">         case Node::CDATA_SECTION_NODE:
</span><span class="cx">         case Node::COMMENT_NODE:
</span><span class="cx">         case Node::TEXT_NODE:
</span><del>-            if (static_cast&lt;unsigned&gt;(offset) &gt; toCharacterData(n)-&gt;length())
-                ec = INDEX_SIZE_ERR;
-            return 0;
</del><span class="cx">         case Node::PROCESSING_INSTRUCTION_NODE:
</span><del>-            if (static_cast&lt;unsigned&gt;(offset) &gt; toProcessingInstruction(n)-&gt;data().length())
</del><ins>+            if (static_cast&lt;unsigned&gt;(offset) &gt; downcast&lt;CharacterData&gt;(*n).length())
</ins><span class="cx">                 ec = INDEX_SIZE_ERR;
</span><del>-            return 0;
</del><ins>+            return nullptr;
</ins><span class="cx">         case Node::ATTRIBUTE_NODE:
</span><span class="cx">         case Node::DOCUMENT_FRAGMENT_NODE:
</span><span class="cx">         case Node::DOCUMENT_NODE:
</span><span class="lines">@@ -1170,7 +1166,7 @@
</span><span class="cx">         case Node::ENTITY_REFERENCE_NODE:
</span><span class="cx">         case Node::XPATH_NAMESPACE_NODE: {
</span><span class="cx">             if (!offset)
</span><del>-                return 0;
</del><ins>+                return nullptr;
</ins><span class="cx">             Node* childBefore = n-&gt;traverseToChildAt(offset - 1);
</span><span class="cx">             if (!childBefore)
</span><span class="cx">                 ec = INDEX_SIZE_ERR;
</span><span class="lines">@@ -1178,7 +1174,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Range::checkNodeBA(Node* n, ExceptionCode&amp; ec) const
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/editing/Editor.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -588,8 +588,8 @@
</span><span class="cx">     
</span><span class="cx">     if (fragment) {
</span><span class="cx">         Node* child = fragment-&gt;firstChild();
</span><del>-        if (child &amp;&amp; fragment-&gt;lastChild() == child &amp;&amp; child-&gt;isCharacterDataNode())
-            return client()-&gt;shouldInsertText(toCharacterData(child)-&gt;data(), replacingDOMRange.get(), givenAction);
</del><ins>+        if (child &amp;&amp; fragment-&gt;lastChild() == child &amp;&amp; is&lt;CharacterData&gt;(child))
+            return client()-&gt;shouldInsertText(downcast&lt;CharacterData&gt;(*child).data(), replacingDOMRange.get(), givenAction);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return client()-&gt;shouldInsertNode(fragment.get(), replacingDOMRange.get(), givenAction);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingMarkupAccumulatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/MarkupAccumulator.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/MarkupAccumulator.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/editing/MarkupAccumulator.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">         appendText(result, toText(node));
</span><span class="cx">         break;
</span><span class="cx">     case Node::COMMENT_NODE:
</span><del>-        appendComment(result, toComment(node).data());
</del><ins>+        appendComment(result, downcast&lt;Comment&gt;(node).data());
</ins><span class="cx">         break;
</span><span class="cx">     case Node::DOCUMENT_NODE:
</span><span class="cx">         appendXMLDeclaration(result, toDocument(node));
</span><span class="lines">@@ -564,16 +564,16 @@
</span><span class="cx">     case Node::DOCUMENT_FRAGMENT_NODE:
</span><span class="cx">         break;
</span><span class="cx">     case Node::DOCUMENT_TYPE_NODE:
</span><del>-        appendDocumentType(result, toDocumentType(node));
</del><ins>+        appendDocumentType(result, downcast&lt;DocumentType&gt;(node));
</ins><span class="cx">         break;
</span><span class="cx">     case Node::PROCESSING_INSTRUCTION_NODE:
</span><del>-        appendProcessingInstruction(result, toProcessingInstruction(node).target(), toProcessingInstruction(node).data());
</del><ins>+        appendProcessingInstruction(result, downcast&lt;ProcessingInstruction&gt;(node).target(), downcast&lt;ProcessingInstruction&gt;(node).data());
</ins><span class="cx">         break;
</span><span class="cx">     case Node::ELEMENT_NODE:
</span><span class="cx">         appendElement(result, toElement(node), namespaces);
</span><span class="cx">         break;
</span><span class="cx">     case Node::CDATA_SECTION_NODE:
</span><del>-        appendCDATASection(result, toCDATASection(node).data());
</del><ins>+        appendCDATASection(result, downcast&lt;CDATASection&gt;(node).data());
</ins><span class="cx">         break;
</span><span class="cx">     case Node::ATTRIBUTE_NODE:
</span><span class="cx">     case Node::ENTITY_NODE:
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -2414,8 +2414,8 @@
</span><span class="cx">                 _exitElement(element, depth, startIndex);
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-    } else if (node.isCharacterDataNode())
-        _processText(toCharacterData(node));
</del><ins>+    } else if (is&lt;CharacterData&gt;(node))
+        _processText(downcast&lt;CharacterData&gt;(node));
</ins><span class="cx"> 
</span><span class="cx">     if (isEnd)
</span><span class="cx">         _flags.reachedEnd = YES;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -1306,11 +1306,11 @@
</span><span class="cx">         value-&gt;setDocumentURL(documentURLString(document));
</span><span class="cx">         value-&gt;setBaseURL(documentBaseURLString(document));
</span><span class="cx">         value-&gt;setXmlVersion(document-&gt;xmlVersion());
</span><del>-    } else if (node-&gt;nodeType() == Node::DOCUMENT_TYPE_NODE) {
-        DocumentType* docType = toDocumentType(node);
-        value-&gt;setPublicId(docType-&gt;publicId());
-        value-&gt;setSystemId(docType-&gt;systemId());
-        value-&gt;setInternalSubset(docType-&gt;internalSubset());
</del><ins>+    } else if (is&lt;DocumentType&gt;(node)) {
+        DocumentType&amp; docType = downcast&lt;DocumentType&gt;(*node);
+        value-&gt;setPublicId(docType.publicId());
+        value-&gt;setSystemId(docType.systemId());
+        value-&gt;setInternalSubset(docType.internalSubset());
</ins><span class="cx">     } else if (is&lt;Attr&gt;(node)) {
</span><span class="cx">         Attr&amp; attribute = downcast&lt;Attr&gt;(*node);
</span><span class="cx">         value-&gt;setName(attribute.name());
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorLayerTreeAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">         if (isReflection)
</span><span class="cx">             renderer = renderer-&gt;parent();
</span><span class="cx">         layerObject-&gt;setIsGeneratedContent(true);
</span><del>-        layerObject-&gt;setPseudoElementId(bindPseudoElement(toPseudoElement(renderer-&gt;node())));
</del><ins>+        layerObject-&gt;setPseudoElementId(bindPseudoElement(downcast&lt;PseudoElement&gt;(renderer-&gt;node())));
</ins><span class="cx">         if (renderer-&gt;isBeforeContent())
</span><span class="cx">             layerObject-&gt;setPseudoElement(&quot;before&quot;);
</span><span class="cx">         else if (renderer-&gt;isAfterContent())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingHitTestResultcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/HitTestResult.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/HitTestResult.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/rendering/HitTestResult.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -129,18 +129,18 @@
</span><span class="cx">     setInnerNonSharedNode(node);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HitTestResult::setInnerNode(Node* n)
</del><ins>+void HitTestResult::setInnerNode(Node* node)
</ins><span class="cx"> {
</span><del>-    if (n &amp;&amp; n-&gt;isPseudoElement())
-        n = toPseudoElement(n)-&gt;hostElement();
-    m_innerNode = n;
</del><ins>+    if (node &amp;&amp; is&lt;PseudoElement&gt;(node))
+        node = downcast&lt;PseudoElement&gt;(*node).hostElement();
+    m_innerNode = node;
</ins><span class="cx"> }
</span><span class="cx">     
</span><del>-void HitTestResult::setInnerNonSharedNode(Node* n)
</del><ins>+void HitTestResult::setInnerNonSharedNode(Node* node)
</ins><span class="cx"> {
</span><del>-    if (n &amp;&amp; n-&gt;isPseudoElement())
-        n = toPseudoElement(n)-&gt;hostElement();
-    m_innerNonSharedNode = n;
</del><ins>+    if (node &amp;&amp; is&lt;PseudoElement&gt;(node))
+        node = downcast&lt;PseudoElement&gt;(*node).hostElement();
+    m_innerNonSharedNode = node;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HitTestResult::setURLElement(Element* n) 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListItemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListItem.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListItem.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/rendering/RenderListItem.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -99,8 +99,8 @@
</span><span class="cx"> static Element* enclosingList(const RenderListItem* listItem)
</span><span class="cx"> {
</span><span class="cx">     Element&amp; listItemElement = listItem-&gt;element();
</span><del>-    Element* firstNode = 0;
-    Element* parent = listItemElement.isPseudoElement() ? toPseudoElement(listItemElement).hostElement() : listItemElement.parentElement();
</del><ins>+    Element* firstNode = nullptr;
+    Element* parent = is&lt;PseudoElement&gt;(listItemElement) ? downcast&lt;PseudoElement&gt;(listItemElement).hostElement() : listItemElement.parentElement();
</ins><span class="cx">     // We use parentNode because the enclosing list could be a ShadowRoot that's not Element.
</span><span class="cx">     for (; parent; parent = parent-&gt;parentElement()) {
</span><span class="cx">         if (isList(parent))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -2549,7 +2549,7 @@
</span><span class="cx"> 
</span><span class="cx"> Node* RenderObject::generatingPseudoHostElement() const
</span><span class="cx"> {
</span><del>-    return toPseudoElement(node())-&gt;hostElement();
</del><ins>+    return downcast&lt;PseudoElement&gt;(*node()).hostElement();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderObject::setNeedsBoundariesUpdate()
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXPathFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XPathFunctions.cpp (174038 => 174039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XPathFunctions.cpp        2014-09-28 04:13:59 UTC (rev 174038)
+++ trunk/Source/WebCore/xml/XPathFunctions.cpp        2014-09-28 05:21:30 UTC (rev 174039)
</span><span class="lines">@@ -362,8 +362,8 @@
</span><span class="cx"> {
</span><span class="cx">     // The local part of an XPath expanded-name matches DOM local name for most node types, except for namespace nodes and processing instruction nodes.
</span><span class="cx">     ASSERT(node-&gt;nodeType() != Node::XPATH_NAMESPACE_NODE); // Not supported yet.
</span><del>-    if (node-&gt;nodeType() == Node::PROCESSING_INSTRUCTION_NODE)
-        return toProcessingInstruction(node)-&gt;target();
</del><ins>+    if (is&lt;ProcessingInstruction&gt;(node))
+        return downcast&lt;ProcessingInstruction&gt;(*node).target();
</ins><span class="cx">     return node-&gt;localName().string();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>