<!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<>() / downcast<>() for more Node subclasses
https://bugs.webkit.org/show_bug.cgi?id=137184
Reviewed by Ryosuke Niwa.
Use the new is<>() / downcast<>() 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 <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Use the new is<>() / downcast<>() for more Node subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137184
+
+ Reviewed by Ryosuke Niwa.
+
+ Use the new is<>() / downcast<>() 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 <cdumez@apple.com>
+
</ins><span class="cx"> Use the new is<>() / downcast<>() 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<Text> virtualCreate(const String&) override;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-inline bool isCDATASection(const Node& node) { return node.nodeType() == Node::CDATA_SECTION_NODE; }
-void isCDATASection(const CDATASection&); // Catch unnecessary runtime check of type known at compile time.
-void isCDATASection(const ContainerNode&); // Catch unnecessary runtime check of type known at compile time.
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(CDATASection)
+ static bool isCDATASection(const Node& 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)->checkStyleSheet();
</del><ins>+ if (is<ProcessingInstruction>(this))
+ downcast<ProcessingInstruction>(*this).checkStyleSheet();
</ins><span class="cx">
</span><span class="cx"> if (document().frame())
</span><span class="cx"> document().frame()->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& node) { return node.isCharacterDataNode(); }
-void isCharacterData(const CharacterData&); // Catch unnecessary runtime check of type known at compile time.
-void isCharacterData(const ContainerNode&); // Catch unnecessary runtime check of type known at compile time.
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(CharacterData)
+ static bool isCharacterData(const Node& 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& node) { return node.nodeType() == Node::COMMENT_NODE; }
-void isComment(const Comment&); // Catch unnecessary runtime check of type known at compile time.
-void isComment(const ContainerNode&); // Catch unnecessary runtime check of type known at compile time.
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(Comment)
+ static bool isComment(const Node& 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& node : m_styleSheetCandidateNodes) {
</span><span class="cx"> StyleSheet* sheet = nullptr;
</span><del>- if (node->nodeType() == Node::PROCESSING_INSTRUCTION_NODE) {
</del><ins>+ if (is<ProcessingInstruction>(node)) {
</ins><span class="cx"> // Processing instruction (XML documents only).
</span><span class="cx"> // We don't support linking to embedded CSS stylesheets, see <https://bugs.webkit.org/show_bug.cgi?id=49281> for discussion.
</span><del>- ProcessingInstruction* pi = toProcessingInstruction(node);
- sheet = pi->sheet();
</del><ins>+ ProcessingInstruction& pi = downcast<ProcessingInstruction>(*node);
+ sheet = pi.sheet();
</ins><span class="cx"> #if ENABLE(XSLT)
</span><span class="cx"> // Don't apply XSL transforms to already transformed documents -- <rdar://problem/4132806>
</span><del>- if (pi->isXSL() && !m_document.transformSourceDocument()) {
</del><ins>+ if (pi.isXSL() && !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(&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& node)
-{
- return node.nodeType() == Node::DOCUMENT_TYPE_NODE;
-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(DocumentType)
+ static bool isDocumentType(const Node& 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& eventTargetRespectingTargetRules(Node& referenceNode)
</span><span class="cx"> {
</span><del>- if (referenceNode.isPseudoElement()) {
- EventTarget* hostElement = toPseudoElement(referenceNode).hostElement();
</del><ins>+ if (is<PseudoElement>(referenceNode)) {
+ EventTarget* hostElement = downcast<PseudoElement>(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->isPseudoElement() ? toPseudoElement(node)->hostElement() : node;
</del><ins>+ return is<PseudoElement>(node) ? downcast<PseudoElement>(*node).hostElement() : node;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> EventPath::EventPath(Node& targetNode, Event& 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& node)
</span><span class="cx"> {
</span><del>- if (ContainerNode* ancestor = node.isPseudoElement() ? toPseudoElement(node).hostElement() : node.parentOrShadowHostNode()) {
</del><ins>+ if (ContainerNode* ancestor = is<PseudoElement>(node) ? downcast<PseudoElement>(node).hostElement() : node.parentOrShadowHostNode()) {
</ins><span class="cx"> ancestor->setDirectChildNeedsStyleRecalc();
</span><span class="cx">
</span><span class="cx"> for (; ancestor && !ancestor->childNeedsStyleRecalc(); ancestor = ancestor->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)->hostElement() : parentElement();
</del><ins>+ Element* parentOrHost = is<PseudoElement>(this) ? downcast<PseudoElement>(*this).hostElement() : parentElement();
</ins><span class="cx"> if (parentOrHost && !previousSibling()) {
</span><span class="cx"> if (isAfterPseudoElement() && parentOrHost->lastChild())
</span><span class="cx"> return parentOrHost->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)->hostElement() : parentElement();
</del><ins>+ Element* parentOrHost = is<PseudoElement>(this) ? downcast<PseudoElement>(*this).hostElement() : parentElement();
</ins><span class="cx"> if (parentOrHost && !nextSibling()) {
</span><span class="cx"> if (isBeforePseudoElement() && parentOrHost->firstChild())
</span><span class="cx"> return parentOrHost->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->pseudoAwarePreviousSibling())) {
</span><span class="cx"> while (previous->pseudoAwareLastChild())
</span><span class="cx"> previous = previous->pseudoAwareLastChild();
</span><span class="cx"> return previous;
</span><span class="cx"> }
</span><del>- return current->isPseudoElement() ? toPseudoElement(current)->hostElement() : current->parentNode();
</del><ins>+ return is<PseudoElement>(current) ? downcast<PseudoElement>(*current).hostElement() : current->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->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->pseudoAwareNextSibling()))
</span><span class="cx"> return next;
</span><del>- current = current->isPseudoElement() ? toPseudoElement(current)->hostElement() : current->parentNode();
</del><ins>+ current = is<PseudoElement>(current) ? downcast<PseudoElement>(*current).hostElement() : current->parentNode();
</ins><span class="cx"> for (; current; current = current->parentNode()) {
</span><span class="cx"> if (current == stayWithin)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> if ((next = current->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->pseudoAwareNextSibling()))
</span><span class="cx"> return next;
</span><del>- current = current->isPseudoElement() ? toPseudoElement(current)->hostElement() : current->parentNode();
</del><ins>+ current = is<PseudoElement>(current) ? downcast<PseudoElement>(*current).hostElement() : current->parentNode();
</ins><span class="cx"> for (; current; current = current->parentNode()) {
</span><span class="cx"> if (current == stayWithin)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> if ((next = current->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& node)
-{
- return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE;
-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(ProcessingInstruction)
+ static bool isProcessingInstruction(const Node& 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 && style->display() != NONE && (style->contentData() || style->hasFlowFrom());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void isPseudoElement(const PseudoElement&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isPseudoElement(const Node& node) { return node.isPseudoElement(); }
-NODE_TYPE_CASTS(PseudoElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(PseudoElement)
+ static bool isPseudoElement(const Node& 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)->length();
</del><span class="cx"> case Node::PROCESSING_INSTRUCTION_NODE:
</span><del>- return toProcessingInstruction(node)->data().length();
</del><ins>+ return downcast<CharacterData>(*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)->deleteData(startOffset, endOffset - startOffset, ec);
</del><ins>+ downcast<CharacterData>(*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<ProcessingInstruction*>(container)->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->data());
</del><ins>+ ProcessingInstruction& pi = downcast<ProcessingInstruction>(*container);
+ String data(pi.data());
</ins><span class="cx"> data.remove(startOffset, endOffset - startOffset);
</span><del>- pi->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<unsigned>(offset) > toCharacterData(n)->length())
- ec = INDEX_SIZE_ERR;
- return 0;
</del><span class="cx"> case Node::PROCESSING_INSTRUCTION_NODE:
</span><del>- if (static_cast<unsigned>(offset) > toProcessingInstruction(n)->data().length())
</del><ins>+ if (static_cast<unsigned>(offset) > downcast<CharacterData>(*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->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& 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->firstChild();
</span><del>- if (child && fragment->lastChild() == child && child->isCharacterDataNode())
- return client()->shouldInsertText(toCharacterData(child)->data(), replacingDOMRange.get(), givenAction);
</del><ins>+ if (child && fragment->lastChild() == child && is<CharacterData>(child))
+ return client()->shouldInsertText(downcast<CharacterData>(*child).data(), replacingDOMRange.get(), givenAction);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return client()->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<Comment>(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<DocumentType>(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<ProcessingInstruction>(node).target(), downcast<ProcessingInstruction>(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<CDATASection>(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<CharacterData>(node))
+ _processText(downcast<CharacterData>(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->setDocumentURL(documentURLString(document));
</span><span class="cx"> value->setBaseURL(documentBaseURLString(document));
</span><span class="cx"> value->setXmlVersion(document->xmlVersion());
</span><del>- } else if (node->nodeType() == Node::DOCUMENT_TYPE_NODE) {
- DocumentType* docType = toDocumentType(node);
- value->setPublicId(docType->publicId());
- value->setSystemId(docType->systemId());
- value->setInternalSubset(docType->internalSubset());
</del><ins>+ } else if (is<DocumentType>(node)) {
+ DocumentType& docType = downcast<DocumentType>(*node);
+ value->setPublicId(docType.publicId());
+ value->setSystemId(docType.systemId());
+ value->setInternalSubset(docType.internalSubset());
</ins><span class="cx"> } else if (is<Attr>(node)) {
</span><span class="cx"> Attr& attribute = downcast<Attr>(*node);
</span><span class="cx"> value->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->parent();
</span><span class="cx"> layerObject->setIsGeneratedContent(true);
</span><del>- layerObject->setPseudoElementId(bindPseudoElement(toPseudoElement(renderer->node())));
</del><ins>+ layerObject->setPseudoElementId(bindPseudoElement(downcast<PseudoElement>(renderer->node())));
</ins><span class="cx"> if (renderer->isBeforeContent())
</span><span class="cx"> layerObject->setPseudoElement("before");
</span><span class="cx"> else if (renderer->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 && n->isPseudoElement())
- n = toPseudoElement(n)->hostElement();
- m_innerNode = n;
</del><ins>+ if (node && is<PseudoElement>(node))
+ node = downcast<PseudoElement>(*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 && n->isPseudoElement())
- n = toPseudoElement(n)->hostElement();
- m_innerNonSharedNode = n;
</del><ins>+ if (node && is<PseudoElement>(node))
+ node = downcast<PseudoElement>(*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& listItemElement = listItem->element();
</span><del>- Element* firstNode = 0;
- Element* parent = listItemElement.isPseudoElement() ? toPseudoElement(listItemElement).hostElement() : listItemElement.parentElement();
</del><ins>+ Element* firstNode = nullptr;
+ Element* parent = is<PseudoElement>(listItemElement) ? downcast<PseudoElement>(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->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())->hostElement();
</del><ins>+ return downcast<PseudoElement>(*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->nodeType() != Node::XPATH_NAMESPACE_NODE); // Not supported yet.
</span><del>- if (node->nodeType() == Node::PROCESSING_INSTRUCTION_NODE)
- return toProcessingInstruction(node)->target();
</del><ins>+ if (is<ProcessingInstruction>(node))
+ return downcast<ProcessingInstruction>(*node).target();
</ins><span class="cx"> return node->localName().string();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>