<!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>[208839] 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/208839">208839</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-11-16 22:24:13 -0800 (Wed, 16 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add Node::isDescendantOf() overload that takes in a reference
https://bugs.webkit.org/show_bug.cgi?id=164854
Reviewed by Ryosuke Niwa.
Add Node::isDescendantOf() overload that takes in a reference as a lot
of call sites have a reference or a pointer they know is not null.
No new tests, no Web-exposed behavior change.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* dom/Document.cpp:
(WebCore::isNodeInSubtree):
(WebCore::Document::removeFullScreenElementOfSubtree):
(WebCore::Document::setAnimatingFullScreen):
* dom/Node.cpp:
(WebCore::Node::isDescendantOf):
(WebCore::Node::isDescendantOrShadowDescendantOf):
(WebCore::Node::contains):
* dom/Node.h:
(WebCore::Node::isDescendantOf):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::updateForNodeRemoval):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::filterRootById):
* dom/TypedElementDescendantIterator.h:
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::doApply):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::textDirectionForSelection):
* editing/FormatBlockCommand.cpp:
(WebCore::FormatBlockCommand::formatRange):
* editing/TextIterator.cpp:
(WebCore::TextIterator::advance):
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore):
(WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter):
* editing/htmlediting.cpp:
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
(WebCore::selectionForParagraphIteration):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
* html/CachedHTMLCollection.h:
(WebCore::traversalType>::namedItem):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::getElementById):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoredomNodeIteratorcpp">trunk/Source/WebCore/dom/NodeIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSelectorQuerycpp">trunk/Source/WebCore/dom/SelectorQuery.cpp</a></li>
<li><a href="#trunkSourceWebCoredomTypedElementDescendantIteratorh">trunk/Source/WebCore/dom/TypedElementDescendantIterator.h</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingBreakBlockquoteCommandcpp">trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingCompositeEditCommandcpp">trunk/Source/WebCore/editing/CompositeEditCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingDeleteSelectionCommandcpp">trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFormatBlockCommandcpp">trunk/Source/WebCore/editing/FormatBlockCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorcpp">trunk/Source/WebCore/editing/TextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisiblePositioncpp">trunk/Source/WebCore/editing/VisiblePosition.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditinghtmleditingcpp">trunk/Source/WebCore/editing/htmlediting.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingmarkupcpp">trunk/Source/WebCore/editing/markup.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlCachedHTMLCollectionh">trunk/Source/WebCore/html/CachedHTMLCollection.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementcpp">trunk/Source/WebCore/html/HTMLFormElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGSVGElementcpp">trunk/Source/WebCore/svg/SVGSVGElement.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/ChangeLog        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2016-11-16 Chris Dumez <cdumez@apple.com>
+
+ Add Node::isDescendantOf() overload that takes in a reference
+ https://bugs.webkit.org/show_bug.cgi?id=164854
+
+ Reviewed by Ryosuke Niwa.
+
+ Add Node::isDescendantOf() overload that takes in a reference as a lot
+ of call sites have a reference or a pointer they know is not null.
+
+ No new tests, no Web-exposed behavior change.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::press):
+ * dom/Document.cpp:
+ (WebCore::isNodeInSubtree):
+ (WebCore::Document::removeFullScreenElementOfSubtree):
+ (WebCore::Document::setAnimatingFullScreen):
+ * dom/Node.cpp:
+ (WebCore::Node::isDescendantOf):
+ (WebCore::Node::isDescendantOrShadowDescendantOf):
+ (WebCore::Node::contains):
+ * dom/Node.h:
+ (WebCore::Node::isDescendantOf):
+ * dom/NodeIterator.cpp:
+ (WebCore::NodeIterator::updateForNodeRemoval):
+ * dom/SelectorQuery.cpp:
+ (WebCore::SelectorDataList::executeFastPathForIdSelector):
+ (WebCore::filterRootById):
+ * dom/TypedElementDescendantIterator.h:
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
+ (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
+ * editing/BreakBlockquoteCommand.cpp:
+ (WebCore::BreakBlockquoteCommand::doApply):
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::handleGeneralDelete):
+ (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
+ (WebCore::DeleteSelectionCommand::doApply):
+ * editing/EditingStyle.cpp:
+ (WebCore::EditingStyle::textDirectionForSelection):
+ * editing/FormatBlockCommand.cpp:
+ (WebCore::FormatBlockCommand::formatRange):
+ * editing/TextIterator.cpp:
+ (WebCore::TextIterator::advance):
+ * editing/VisiblePosition.cpp:
+ (WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore):
+ (WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter):
+ * editing/htmlediting.cpp:
+ (WebCore::firstEditablePositionAfterPositionInRoot):
+ (WebCore::lastEditablePositionBeforePositionInRoot):
+ (WebCore::selectionForParagraphIteration):
+ * editing/markup.cpp:
+ (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
+ * html/CachedHTMLCollection.h:
+ (WebCore::traversalType>::namedItem):
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::formElementIndex):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent):
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::getElementById):
+
</ins><span class="cx"> 2016-11-16 Ryosuke Niwa <rniwa@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -911,11 +911,12 @@
</span><span class="cx">
</span><span class="cx"> // Prefer the actionElement instead of this node, if the actionElement is inside this node.
</span><span class="cx"> Element* pressElement = this->element();
</span><del>- if (!pressElement || actionElem->isDescendantOf(pressElement))
</del><ins>+ if (!pressElement || actionElem->isDescendantOf(*pressElement))
</ins><span class="cx"> pressElement = actionElem;
</span><span class="cx">
</span><ins>+ ASSERT(pressElement);
</ins><span class="cx"> // Prefer the hit test element, if it is inside the target element.
</span><del>- if (hitTestElement && hitTestElement->isDescendantOf(pressElement))
</del><ins>+ if (hitTestElement && hitTestElement->isDescendantOf(*pressElement))
</ins><span class="cx"> pressElement = hitTestElement;
</span><span class="cx">
</span><span class="cx"> UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -3534,9 +3534,9 @@
</span><span class="cx"> static bool isNodeInSubtree(Node& node, Node& container, bool amongChildrenOnly)
</span><span class="cx"> {
</span><span class="cx"> if (amongChildrenOnly)
</span><del>- return node.isDescendantOf(&container);
</del><ins>+ return node.isDescendantOf(container);
</ins><span class="cx"> else
</span><del>- return &node == &container || node.isDescendantOf(&container);
</del><ins>+ return &node == &container || node.isDescendantOf(container);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Document::removeFocusedNodeOfSubtree(Node& node, bool amongChildrenOnly)
</span><span class="lines">@@ -5963,9 +5963,9 @@
</span><span class="cx">
</span><span class="cx"> bool elementInSubtree = false;
</span><span class="cx"> if (amongChildrenOnly)
</span><del>- elementInSubtree = m_fullScreenElement->isDescendantOf(&node);
</del><ins>+ elementInSubtree = m_fullScreenElement->isDescendantOf(node);
</ins><span class="cx"> else
</span><del>- elementInSubtree = (m_fullScreenElement == &node) || m_fullScreenElement->isDescendantOf(&node);
</del><ins>+ elementInSubtree = (m_fullScreenElement == &node) || m_fullScreenElement->isDescendantOf(node);
</ins><span class="cx">
</span><span class="cx"> if (elementInSubtree)
</span><span class="cx"> fullScreenElementRemoved();
</span><span class="lines">@@ -5982,7 +5982,7 @@
</span><span class="cx"> return;
</span><span class="cx"> m_isAnimatingFullScreen = flag;
</span><span class="cx">
</span><del>- if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(this)) {
</del><ins>+ if (m_fullScreenElement && m_fullScreenElement->isDescendantOf(*this)) {
</ins><span class="cx"> m_fullScreenElement->invalidateStyleForSubtree();
</span><span class="cx"> scheduleForcedStyleRecalc();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/dom/Node.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -912,15 +912,15 @@
</span><span class="cx"> return { };
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Node::isDescendantOf(const Node* other) const
</del><ins>+bool Node::isDescendantOf(const Node& other) const
</ins><span class="cx"> {
</span><span class="cx"> // Return true if other is an ancestor of this, otherwise false
</span><del>- if (!other || !other->hasChildNodes() || inDocument() != other->inDocument())
</del><ins>+ if (!other.hasChildNodes() || inDocument() != other.inDocument())
</ins><span class="cx"> return false;
</span><del>- if (other->isDocumentNode())
- return &document() == other && !isDocumentNode() && inDocument();
- for (const ContainerNode* n = parentNode(); n; n = n->parentNode()) {
- if (n == other)
</del><ins>+ if (other.isDocumentNode())
+ return &document() == &other && !isDocumentNode() && inDocument();
+ for (const auto* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
+ if (ancestor == &other)
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -930,12 +930,12 @@
</span><span class="cx"> {
</span><span class="cx"> if (!other)
</span><span class="cx"> return false;
</span><del>- if (isDescendantOf(other))
</del><ins>+ if (isDescendantOf(*other))
</ins><span class="cx"> return true;
</span><span class="cx"> const Node* shadowAncestorNode = deprecatedShadowAncestorNode();
</span><span class="cx"> if (!shadowAncestorNode)
</span><span class="cx"> return false;
</span><del>- return shadowAncestorNode == other || shadowAncestorNode->isDescendantOf(other);
</del><ins>+ return shadowAncestorNode == other || shadowAncestorNode->isDescendantOf(*other);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool Node::contains(const Node* node) const
</span><span class="lines">@@ -942,7 +942,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!node)
</span><span class="cx"> return false;
</span><del>- return this == node || node->isDescendantOf(this);
</del><ins>+ return this == node || node->isDescendantOf(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool Node::containsIncludingShadowDOM(const Node* node) const
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/dom/Node.h        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -386,7 +386,9 @@
</span><span class="cx">
</span><span class="cx"> ExceptionOr<void> checkSetPrefix(const AtomicString& prefix);
</span><span class="cx">
</span><del>- WEBCORE_EXPORT bool isDescendantOf(const Node*) const;
</del><ins>+ WEBCORE_EXPORT bool isDescendantOf(const Node&) const;
+ WEBCORE_EXPORT bool isDescendantOf(const Node* other) const { return other && isDescendantOf(*other); }
+
</ins><span class="cx"> bool isDescendantOrShadowDescendantOf(const Node*) const;
</span><span class="cx"> WEBCORE_EXPORT bool contains(const Node*) const;
</span><span class="cx"> bool containsIncludingShadowDOM(const Node*) const;
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeIterator.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeIterator.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/dom/NodeIterator.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -143,10 +143,10 @@
</span><span class="cx">
</span><span class="cx"> // Iterator is not affected if the removed node is the reference node and is the root.
</span><span class="cx"> // or if removed node is not the reference node, or the ancestor of the reference node.
</span><del>- if (!removedNode.isDescendantOf(&root()))
</del><ins>+ if (!removedNode.isDescendantOf(root()))
</ins><span class="cx"> return;
</span><span class="cx"> bool willRemoveReferenceNode = &removedNode == referenceNode.node;
</span><del>- bool willRemoveReferenceNodeAncestor = referenceNode.node && referenceNode.node->isDescendantOf(&removedNode);
</del><ins>+ bool willRemoveReferenceNodeAncestor = referenceNode.node && referenceNode.node->isDescendantOf(removedNode);
</ins><span class="cx"> if (!willRemoveReferenceNode && !willRemoveReferenceNodeAncestor)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> if (node) {
</span><span class="cx"> // Move out from under the node being removed if the new reference
</span><span class="cx"> // node is a descendant of the node being removed.
</span><del>- while (node && node->isDescendantOf(&removedNode))
</del><ins>+ while (node && node->isDescendantOf(removedNode))
</ins><span class="cx"> node = NodeTraversal::next(*node, &root());
</span><span class="cx"> if (node)
</span><span class="cx"> referenceNode.node = node;
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> // Move out from under the node being removed if the reference node is
</span><span class="cx"> // a descendant of the node being removed.
</span><span class="cx"> if (willRemoveReferenceNodeAncestor) {
</span><del>- while (node && node->isDescendantOf(&removedNode))
</del><ins>+ while (node && node->isDescendantOf(removedNode))
</ins><span class="cx"> node = NodeTraversal::previous(*node);
</span><span class="cx"> }
</span><span class="cx"> if (node)
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> // Move out from under the node being removed if the reference node is
</span><span class="cx"> // a descendant of the node being removed.
</span><span class="cx"> if (willRemoveReferenceNodeAncestor) {
</span><del>- while (node && node->isDescendantOf(&removedNode))
</del><ins>+ while (node && node->isDescendantOf(removedNode))
</ins><span class="cx"> node = NodeTraversal::previous(*node);
</span><span class="cx"> }
</span><span class="cx"> if (node)
</span></span></pre></div>
<a id="trunkSourceWebCoredomSelectorQuerycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SelectorQuery.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SelectorQuery.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/dom/SelectorQuery.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx"> ASSERT(elements);
</span><span class="cx"> bool rootNodeIsTreeScopeRoot = isTreeScopeRoot(rootNode);
</span><span class="cx"> for (auto& element : *elements) {
</span><del>- if ((rootNodeIsTreeScopeRoot || element->isDescendantOf(&rootNode)) && selectorMatches(selectorData, *element, rootNode)) {
</del><ins>+ if ((rootNodeIsTreeScopeRoot || element->isDescendantOf(rootNode)) && selectorMatches(selectorData, *element, rootNode)) {
</ins><span class="cx"> SelectorQueryTrait::appendOutputForElement(output, element);
</span><span class="cx"> if (SelectorQueryTrait::shouldOnlyMatchFirstElement)
</span><span class="cx"> return;
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Element* element = rootNode.treeScope().getElementById(idToMatch);
</span><del>- if (!element || !(isTreeScopeRoot(rootNode) || element->isDescendantOf(&rootNode)))
</del><ins>+ if (!element || !(isTreeScopeRoot(rootNode) || element->isDescendantOf(rootNode)))
</ins><span class="cx"> return;
</span><span class="cx"> if (selectorMatches(selectorData, *element, rootNode))
</span><span class="cx"> SelectorQueryTrait::appendOutputForElement(output, element);
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> if (LIKELY(!rootNode.treeScope().containsMultipleElementsWithId(idToMatch))) {
</span><span class="cx"> if (inAdjacentChain)
</span><span class="cx"> searchRoot = searchRoot->parentNode();
</span><del>- if (searchRoot && (isTreeScopeRoot(rootNode) || searchRoot == &rootNode || searchRoot->isDescendantOf(&rootNode)))
</del><ins>+ if (searchRoot && (isTreeScopeRoot(rootNode) || searchRoot == &rootNode || searchRoot->isDescendantOf(rootNode)))
</ins><span class="cx"> return *searchRoot;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomTypedElementDescendantIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TypedElementDescendantIterator.h (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TypedElementDescendantIterator.h        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/dom/TypedElementDescendantIterator.h        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> template <typename ElementType>
</span><span class="cx"> inline TypedElementDescendantIterator<ElementType> TypedElementDescendantIteratorAdapter<ElementType>::beginAt(ElementType& descendant)
</span><span class="cx"> {
</span><del>- ASSERT(descendant.isDescendantOf(&m_root));
</del><ins>+ ASSERT(descendant.isDescendantOf(m_root));
</ins><span class="cx"> return TypedElementDescendantIterator<ElementType>(m_root, &descendant);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> template <typename ElementType>
</span><span class="cx"> inline TypedElementDescendantIterator<ElementType> TypedElementDescendantIteratorAdapter<ElementType>::from(Element& descendant)
</span><span class="cx"> {
</span><del>- ASSERT(descendant.isDescendantOf(&m_root));
</del><ins>+ ASSERT(descendant.isDescendantOf(m_root));
</ins><span class="cx"> if (is<ElementType>(descendant))
</span><span class="cx"> return TypedElementDescendantIterator<ElementType>(m_root, downcast<ElementType>(&descendant));
</span><span class="cx"> ElementType* next = Traversal<ElementType>::next(descendant, &m_root);
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx"> template <typename ElementType>
</span><span class="cx"> inline TypedElementDescendantConstIterator<ElementType> TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt(const ElementType& descendant) const
</span><span class="cx"> {
</span><del>- ASSERT(descendant.isDescendantOf(&m_root));
</del><ins>+ ASSERT(descendant.isDescendantOf(m_root));
</ins><span class="cx"> return TypedElementDescendantConstIterator<ElementType>(m_root, &descendant);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx"> template <typename ElementType>
</span><span class="cx"> inline TypedElementDescendantConstIterator<ElementType> TypedElementDescendantConstIteratorAdapter<ElementType>::from(const Element& descendant) const
</span><span class="cx"> {
</span><del>- ASSERT(descendant.isDescendantOf(&m_root));
</del><ins>+ ASSERT(descendant.isDescendantOf(m_root));
</ins><span class="cx"> if (is<ElementType>(descendant))
</span><span class="cx"> return TypedElementDescendantConstIterator<ElementType>(m_root, downcast<ElementType>(&descendant));
</span><span class="cx"> const ElementType* next = Traversal<ElementType>::next(descendant, &m_root);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx"> Node* beyondEnd;
</span><span class="cx"> ASSERT(start.deprecatedNode());
</span><span class="cx"> ASSERT(end.deprecatedNode());
</span><del>- if (start.deprecatedNode()->isDescendantOf(end.deprecatedNode()))
</del><ins>+ if (start.deprecatedNode()->isDescendantOf(*end.deprecatedNode()))
</ins><span class="cx"> beyondEnd = NodeTraversal::nextSkippingChildren(*end.deprecatedNode());
</span><span class="cx"> else
</span><span class="cx"> beyondEnd = NodeTraversal::next(*end.deprecatedNode());
</span><span class="lines">@@ -785,7 +785,7 @@
</span><span class="cx"> // This is a plaintext-only region. Only proceed if it's fully selected.
</span><span class="cx"> // pastEndNode is the node after the last fully selected node, so if it's inside node then
</span><span class="cx"> // node isn't fully selected.
</span><del>- if (pastEndNode && pastEndNode->isDescendantOf(node.get()))
</del><ins>+ if (pastEndNode && pastEndNode->isDescendantOf(*node))
</ins><span class="cx"> break;
</span><span class="cx"> // Add to this element's inline style and skip over its contents.
</span><span class="cx"> HTMLElement& element = downcast<HTMLElement>(*node);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingBreakBlockquoteCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If there's nothing inside topBlockquote to move, we're finished.
</span><del>- if (!startNode->isDescendantOf(topBlockquote)) {
</del><ins>+ if (!startNode->isDescendantOf(*topBlockquote)) {
</ins><span class="cx"> setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingCompositeEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -1301,7 +1301,7 @@
</span><span class="cx"> auto clonedNode = node->cloneNode(true);
</span><span class="cx"> insertNodeAfter(clonedNode.ptr(), lastNode);
</span><span class="cx"> lastNode = WTFMove(clonedNode);
</span><del>- if (node == end.deprecatedNode() || end.deprecatedNode()->isDescendantOf(node.get()))
</del><ins>+ if (node == end.deprecatedNode() || end.deprecatedNode()->isDescendantOf(*node))
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingDeleteSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -519,7 +519,7 @@
</span><span class="cx"> if (comparePositions(firstPositionInOrBeforeNode(node.get()), m_downstreamEnd) >= 0) {
</span><span class="cx"> // NodeTraversal::nextSkippingChildren just blew past the end position, so stop deleting
</span><span class="cx"> node = nullptr;
</span><del>- } else if (!m_downstreamEnd.deprecatedNode()->isDescendantOf(node.get())) {
</del><ins>+ } else if (!m_downstreamEnd.deprecatedNode()->isDescendantOf(*node)) {
</ins><span class="cx"> RefPtr<Node> nextNode = NodeTraversal::nextSkippingChildren(*node);
</span><span class="cx"> // if we just removed a node from the end container, update end position so the
</span><span class="cx"> // check above will work
</span><span class="lines">@@ -702,7 +702,7 @@
</span><span class="cx"> if (m_endTableRow && m_endTableRow->inDocument() && m_endTableRow != m_startTableRow)
</span><span class="cx"> if (isTableRowEmpty(m_endTableRow.get())) {
</span><span class="cx"> // Don't remove m_endTableRow if it's where we're putting the ending selection.
</span><del>- if (!m_endingPosition.deprecatedNode()->isDescendantOf(m_endTableRow.get())) {
</del><ins>+ if (!m_endingPosition.deprecatedNode()->isDescendantOf(*m_endTableRow)) {
</ins><span class="cx"> // FIXME: We probably shouldn't remove m_endTableRow unless it's fully selected, even if it is empty.
</span><span class="cx"> // We'll need to start adjusting the selection endpoints during deletion to know whether or not m_endTableRow
</span><span class="cx"> // was fully selected here.
</span><span class="lines">@@ -820,9 +820,10 @@
</span><span class="cx"> // Don't need a placeholder when deleting a selection that starts just before a table
</span><span class="cx"> // and ends inside it (we do need placeholders to hold open empty cells, but that's
</span><span class="cx"> // handled elsewhere).
</span><del>- if (Node* table = isLastPositionBeforeTable(m_selectionToDelete.visibleStart()))
- if (m_selectionToDelete.end().deprecatedNode()->isDescendantOf(table))
</del><ins>+ if (auto* table = isLastPositionBeforeTable(m_selectionToDelete.visibleStart())) {
+ if (m_selectionToDelete.end().deprecatedNode()->isDescendantOf(*table))
</ins><span class="cx"> m_needPlaceholder = false;
</span><ins>+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -1531,7 +1531,7 @@
</span><span class="cx"> return NaturalWritingDirection;
</span><span class="cx">
</span><span class="cx"> // In the range case, make sure that the embedding element persists until the end of the range.
</span><del>- if (selection.isRange() && !end.deprecatedNode()->isDescendantOf(node))
</del><ins>+ if (selection.isRange() && !end.deprecatedNode()->isDescendantOf(*node))
</ins><span class="cx"> return NaturalWritingDirection;
</span><span class="cx">
</span><span class="cx"> foundDirection = directionValue == CSSValueLtr ? LeftToRightWritingDirection : RightToLeftWritingDirection;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFormatBlockCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FormatBlockCommand.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FormatBlockCommand.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/FormatBlockCommand.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> return;
</span><span class="cx"> if (isElementForFormatBlock(refNode->tagQName()) && start == startOfBlock(start)
</span><span class="cx"> && (end == endOfBlock(end) || isNodeVisiblyContainedWithin(*refNode, *range))
</span><del>- && refNode != root && !root->isDescendantOf(refNode)) {
</del><ins>+ && refNode != root && !root->isDescendantOf(*refNode)) {
</ins><span class="cx"> // Already in a block element that only contains the current paragraph
</span><span class="cx"> if (refNode->hasTagName(tagName()))
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/TextIterator.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx"> bool pastEnd = NodeTraversal::next(*m_node) == m_pastEndNode;
</span><span class="cx"> Node* parentNode = m_node->parentOrShadowHostNode();
</span><span class="cx"> while (!next && parentNode) {
</span><del>- if ((pastEnd && parentNode == m_endContainer) || m_endContainer->isDescendantOf(parentNode))
</del><ins>+ if ((pastEnd && parentNode == m_endContainer) || m_endContainer->isDescendantOf(*parentNode))
</ins><span class="cx"> return;
</span><span class="cx"> bool haveRenderer = m_node->renderer();
</span><span class="cx"> m_node = parentNode;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisiblePositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisiblePosition.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisiblePosition.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/VisiblePosition.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -466,7 +466,7 @@
</span><span class="cx"> auto* highestRoot = highestEditableRoot(deepEquivalent());
</span><span class="cx">
</span><span class="cx"> // Return empty position if pos is not somewhere inside the editable region containing this position
</span><del>- if (highestRoot && !position.deepEquivalent().deprecatedNode()->isDescendantOf(highestRoot)) {
</del><ins>+ if (highestRoot && !position.deepEquivalent().deprecatedNode()->isDescendantOf(*highestRoot)) {
</ins><span class="cx"> if (reachedBoundary)
</span><span class="cx"> *reachedBoundary = true;
</span><span class="cx"> return VisiblePosition();
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx"> auto* highestRoot = highestEditableRoot(deepEquivalent());
</span><span class="cx">
</span><span class="cx"> // Return empty position if pos is not somewhere inside the editable region containing this position
</span><del>- if (highestRoot && !pos.deepEquivalent().deprecatedNode()->isDescendantOf(highestRoot)) {
</del><ins>+ if (highestRoot && !pos.deepEquivalent().deprecatedNode()->isDescendantOf(*highestRoot)) {
</ins><span class="cx"> if (reachedBoundary)
</span><span class="cx"> *reachedBoundary = true;
</span><span class="cx"> return VisiblePosition();
</span></span></pre></div>
<a id="trunkSourceWebCoreeditinghtmleditingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/htmlediting.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/htmlediting.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/htmlediting.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -299,10 +299,10 @@
</span><span class="cx"> candidate = positionAfterNode(shadowAncestor);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- while (candidate.deprecatedNode() && !isEditablePosition(candidate) && candidate.deprecatedNode()->isDescendantOf(highestRoot))
</del><ins>+ while (candidate.deprecatedNode() && !isEditablePosition(candidate) && candidate.deprecatedNode()->isDescendantOf(*highestRoot))
</ins><span class="cx"> candidate = isAtomicNode(candidate.deprecatedNode()) ? positionInParentAfterNode(candidate.deprecatedNode()) : nextVisuallyDistinctCandidate(candidate);
</span><span class="cx">
</span><del>- if (candidate.deprecatedNode() && candidate.deprecatedNode() != highestRoot && !candidate.deprecatedNode()->isDescendantOf(highestRoot))
</del><ins>+ if (candidate.deprecatedNode() && candidate.deprecatedNode() != highestRoot && !candidate.deprecatedNode()->isDescendantOf(*highestRoot))
</ins><span class="cx"> return { };
</span><span class="cx">
</span><span class="cx"> return candidate;
</span><span class="lines">@@ -327,10 +327,10 @@
</span><span class="cx"> candidate = firstPositionInOrBeforeNode(shadowAncestor);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- while (candidate.deprecatedNode() && !isEditablePosition(candidate) && candidate.deprecatedNode()->isDescendantOf(highestRoot))
</del><ins>+ while (candidate.deprecatedNode() && !isEditablePosition(candidate) && candidate.deprecatedNode()->isDescendantOf(*highestRoot))
</ins><span class="cx"> candidate = isAtomicNode(candidate.deprecatedNode()) ? positionInParentBeforeNode(candidate.deprecatedNode()) : previousVisuallyDistinctCandidate(candidate);
</span><span class="cx">
</span><del>- if (candidate.deprecatedNode() && candidate.deprecatedNode() != highestRoot && !candidate.deprecatedNode()->isDescendantOf(highestRoot))
</del><ins>+ if (candidate.deprecatedNode() && candidate.deprecatedNode() != highestRoot && !candidate.deprecatedNode()->isDescendantOf(*highestRoot))
</ins><span class="cx"> return { };
</span><span class="cx">
</span><span class="cx"> return candidate;
</span><span class="lines">@@ -1060,7 +1060,7 @@
</span><span class="cx"> // that we'll want modify is the last one inside the table, not the table itself
</span><span class="cx"> // (a table is itself a paragraph).
</span><span class="cx"> if (auto* table = isFirstPositionAfterTable(endOfSelection)) {
</span><del>- if (startOfSelection.deepEquivalent().deprecatedNode()->isDescendantOf(table))
</del><ins>+ if (startOfSelection.deepEquivalent().deprecatedNode()->isDescendantOf(*table))
</ins><span class="cx"> newSelection = VisibleSelection(startOfSelection, endOfSelection.previous(CannotCrossEditingBoundary));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1069,7 +1069,7 @@
</span><span class="cx"> // we'll want to modify is the first one inside the table, not the paragraph
</span><span class="cx"> // containing the table itself.
</span><span class="cx"> if (auto* table = isLastPositionBeforeTable(startOfSelection)) {
</span><del>- if (endOfSelection.deepEquivalent().deprecatedNode()->isDescendantOf(table))
</del><ins>+ if (endOfSelection.deepEquivalent().deprecatedNode()->isDescendantOf(*table))
</ins><span class="cx"> newSelection = VisibleSelection(startOfSelection.next(CannotCrossEditingBoundary), endOfSelection);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/markup.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/markup.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/editing/markup.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx"> if (!n->renderer() && !enclosingElementWithTag(firstPositionInOrBeforeNode(n), selectTag)) {
</span><span class="cx"> next = NodeTraversal::nextSkippingChildren(*n);
</span><span class="cx"> // Don't skip over pastEnd.
</span><del>- if (pastEnd && pastEnd->isDescendantOf(n))
</del><ins>+ if (pastEnd && pastEnd->isDescendantOf(*n))
</ins><span class="cx"> next = pastEnd;
</span><span class="cx"> } else {
</span><span class="cx"> // Add the node to the markup if we're not skipping the descendants
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx"> if (!parent->renderer())
</span><span class="cx"> continue;
</span><span class="cx"> // or b) ancestors that we never encountered during a pre-order traversal starting at startNode:
</span><del>- ASSERT(startNode->isDescendantOf(parent));
</del><ins>+ ASSERT(startNode->isDescendantOf(*parent));
</ins><span class="cx"> if (shouldEmit)
</span><span class="cx"> wrapWithNode(*parent);
</span><span class="cx"> lastClosed = parent;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlCachedHTMLCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/CachedHTMLCollection.h (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/CachedHTMLCollection.h        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/html/CachedHTMLCollection.h        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> if (candidate && collection().elementMatches(*candidate)) {
</span><del>- if (traversalType == CollectionTraversalType::ChildrenOnly ? candidate->parentNode() == &root : candidate->isDescendantOf(&root))
</del><ins>+ if (traversalType == CollectionTraversalType::ChildrenOnly ? candidate->parentNode() == &root : candidate->isDescendantOf(root))
</ins><span class="cx"> return candidate;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -537,7 +537,7 @@
</span><span class="cx"> unsigned currentAssociatedElementsAfterIndex = m_associatedElementsAfterIndex;
</span><span class="cx"> ++m_associatedElementsAfterIndex;
</span><span class="cx">
</span><del>- if (!associatedHTMLElement.isDescendantOf(this))
</del><ins>+ if (!associatedHTMLElement.isDescendantOf(*this))
</ins><span class="cx"> return currentAssociatedElementsAfterIndex;
</span><span class="cx">
</span><span class="cx"> // Check for the special case where this element is the very last thing in
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -2051,7 +2051,7 @@
</span><span class="cx"> {
</span><span class="cx"> GraphicsContext* context = drawingContext();
</span><span class="cx">
</span><del>- if (!element.focused() || !state().hasInvertibleTransform || path.isEmpty() || !element.isDescendantOf(&canvas()) || !context)
</del><ins>+ if (!element.focused() || !state().hasInvertibleTransform || path.isEmpty() || !element.isDescendantOf(canvas()) || !context)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> context->drawFocusRing(path, 1, 1, RenderTheme::focusRingColor());
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -608,7 +608,7 @@
</span><span class="cx"> if (targetNode && targetNode->renderer() && m_mouseDownMayStartSelect) {
</span><span class="cx"> VisibleSelection newSelection;
</span><span class="cx"> VisiblePosition pos(targetNode->renderer()->positionForPoint(result.localPoint(), nullptr));
</span><del>- if (pos.isNotNull() && pos.deepEquivalent().deprecatedNode()->isDescendantOf(urlElement))
</del><ins>+ if (pos.isNotNull() && pos.deepEquivalent().deprecatedNode()->isDescendantOf(*urlElement))
</ins><span class="cx"> newSelection = VisibleSelection::selectionFromContentsOfNode(urlElement);
</span><span class="cx">
</span><span class="cx"> updateSelectionForMouseDownDispatchingSelectStart(targetNode, expandSelectionToRespectSelectOnMouseDown(*targetNode, newSelection), WordGranularity);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (208838 => 208839)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGSVGElement.cpp        2016-11-17 05:46:32 UTC (rev 208838)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp        2016-11-17 06:24:13 UTC (rev 208839)
</span><span class="lines">@@ -694,11 +694,11 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> Element* element = treeScope().getElementById(id);
</span><del>- if (element && element->isDescendantOf(this))
</del><ins>+ if (element && element->isDescendantOf(*this))
</ins><span class="cx"> return element;
</span><span class="cx"> if (treeScope().containsMultipleElementsWithId(id)) {
</span><span class="cx"> for (auto* element : *treeScope().getAllElementsById(id)) {
</span><del>- if (element->isDescendantOf(this))
</del><ins>+ if (element->isDescendantOf(*this))
</ins><span class="cx"> return element;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>