<!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>[211591] trunk/Source</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/211591">211591</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-02-02 13:29:15 -0800 (Thu, 02 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename Node::inDocument() to isConnected()
https://bugs.webkit.org/show_bug.cgi?id=167743
Reviewed by Sam Weinig.
Rename Node::inDocument() to isConnected() to match the DOM specification more closely:
- https://dom.spec.whatwg.org/#connected
Source/WebKit/mac:
* DOM/DOMNode.mm:
(-[DOMNode isConnected]):
* WebView/WebFrame.mm:
(-[WebFrame selectNSRange:onElement:]):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXObjectCachecpp">trunk/Source/WebCore/accessibility/AXObjectCache.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeCustomcpp">trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeAlgorithmscpp">trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCustomElementReactionQueuecpp">trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDataTransfercpp">trunk/Source/WebCore/dom/DataTransfer.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomEventPathcpp">trunk/Source/WebCore/dom/EventPath.cpp</a></li>
<li><a href="#trunkSourceWebCoredomInlineStyleSheetOwnercpp">trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp</a></li>
<li><a href="#trunkSourceWebCoredomLiveNodeListcpp">trunk/Source/WebCore/dom/LiveNodeList.cpp</a></li>
<li><a href="#trunkSourceWebCoredomLiveNodeListh">trunk/Source/WebCore/dom/LiveNodeList.h</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="#trunkSourceWebCoredomNodeidl">trunk/Source/WebCore/dom/Node.idl</a></li>
<li><a href="#trunkSourceWebCoredomPositionh">trunk/Source/WebCore/dom/Position.h</a></li>
<li><a href="#trunkSourceWebCoredomProcessingInstructioncpp">trunk/Source/WebCore/dom/ProcessingInstruction.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementcpp">trunk/Source/WebCore/dom/ScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptRunnercpp">trunk/Source/WebCore/dom/ScriptRunner.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSelectorQuerycpp">trunk/Source/WebCore/dom/SelectorQuery.cpp</a></li>
<li><a href="#trunkSourceWebCoredomShadowRootcpp">trunk/Source/WebCore/dom/ShadowRoot.cpp</a></li>
<li><a href="#trunkSourceWebCoredomTreeScopeAdoptercpp">trunk/Source/WebCore/dom/TreeScopeAdopter.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyBlockElementCommandcpp">trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.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="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingIndentOutdentCommandcpp">trunk/Source/WebCore/editing/IndentOutdentCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingInsertLineBreakCommandcpp">trunk/Source/WebCore/editing/InsertLineBreakCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingInsertListCommandcpp">trunk/Source/WebCore/editing/InsertListCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingInsertTextCommandcpp">trunk/Source/WebCore/editing/InsertTextCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingMoveSelectionCommandcpp">trunk/Source/WebCore/editing/MoveSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingReplaceNodeWithSpanCommandcpp">trunk/Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingReplaceSelectionCommandcpp">trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlFormAssociatedElementcpp">trunk/Source/WebCore/html/FormAssociatedElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLBaseElementcpp">trunk/Source/WebCore/html/HTMLBaseElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLBodyElementcpp">trunk/Source/WebCore/html/HTMLBodyElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCollectionh">trunk/Source/WebCore/html/HTMLCollection.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementcpp">trunk/Source/WebCore/html/HTMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementcpp">trunk/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementWithStatecpp">trunk/Source/WebCore/html/HTMLFormControlElementWithState.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementcpp">trunk/Source/WebCore/html/HTMLFormElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameElementBasecpp">trunk/Source/WebCore/html/HTMLFrameElementBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp">trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameSetElementcpp">trunk/Source/WebCore/html/HTMLFrameSetElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementcpp">trunk/Source/WebCore/html/HTMLImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageLoadercpp">trunk/Source/WebCore/html/HTMLImageLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLabelElementcpp">trunk/Source/WebCore/html/HTMLLabelElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementcpp">trunk/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMapElementcpp">trunk/Source/WebCore/html/HTMLMapElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMetaElementcpp">trunk/Source/WebCore/html/HTMLMetaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementcpp">trunk/Source/WebCore/html/HTMLObjectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInImageElementcpp">trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementcpp">trunk/Source/WebCore/html/HTMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLStyleElementcpp">trunk/Source/WebCore/html/HTMLStyleElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementcpp">trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTitleElementcpp">trunk/Source/WebCore/html/HTMLTitleElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasStylecpp">trunk/Source/WebCore/html/canvas/CanvasStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMSelectioncpp">trunk/Source/WebCore/page/DOMSelection.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePointerLockControllercpp">trunk/Source/WebCore/page/PointerLockController.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingHitTestResultcpp">trunk/Source/WebCore/rendering/HitTestResult.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlMultiLinecpp">trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp</a></li>
<li><a href="#trunkSourceWebCorereplayReplayControllercpp">trunk/Source/WebCore/replay/ReplayController.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleScopecpp">trunk/Source/WebCore/style/StyleScope.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleTreeResolvercpp">trunk/Source/WebCore/style/StyleTreeResolver.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementBasecpp">trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGExternalResourcesRequiredcpp">trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFEImageElementcpp">trunk/Source/WebCore/svg/SVGFEImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceElementcpp">trunk/Source/WebCore/svg/SVGFontFaceElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGImageElementcpp">trunk/Source/WebCore/svg/SVGImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGMPathElementcpp">trunk/Source/WebCore/svg/SVGMPathElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGSVGElementcpp">trunk/Source/WebCore/svg/SVGSVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGScriptElementcpp">trunk/Source/WebCore/svg/SVGScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGStyleElementcpp">trunk/Source/WebCore/svg/SVGStyleElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTRefElementcpp">trunk/Source/WebCore/svg/SVGTRefElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTestscpp">trunk/Source/WebCore/svg/SVGTests.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextPathElementcpp">trunk/Source/WebCore/svg/SVGTextPathElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTitleElementcpp">trunk/Source/WebCore/svg/SVGTitleElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementcpp">trunk/Source/WebCore/svg/SVGUseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementcpp">trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXPathNodeSetcpp">trunk/Source/WebCore/xml/XPathNodeSet.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp">trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMNodemm">trunk/Source/WebKit/mac/DOM/DOMNode.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/ChangeLog        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-02-02 Chris Dumez <cdumez@apple.com>
+
+ Rename Node::inDocument() to isConnected()
+ https://bugs.webkit.org/show_bug.cgi?id=167743
+
+ Reviewed by Sam Weinig.
+
+ Rename Node::inDocument() to isConnected() to match the DOM specification more closely:
+ - https://dom.spec.whatwg.org/#connected
+
</ins><span class="cx"> 2017-02-02 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] Provide a compact mode for when the controls are small
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -2658,7 +2658,7 @@
</span><span class="cx"> // Check each node to see if it's inside the document being deleted, of if it no longer belongs to a document.
</span><span class="cx"> HashSet<Node*> nodesToDelete;
</span><span class="cx"> for (const auto& node : m_textMarkerNodes) {
</span><del>- if (!node->inDocument() || &(node)->document() == document)
</del><ins>+ if (!node->isConnected() || &(node)->document() == document)
</ins><span class="cx"> nodesToDelete.add(node);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool isReachableFromDOM(Node* node, SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- if (!node->inDocument()) {
</del><ins>+ if (!node->isConnected()) {
</ins><span class="cx"> if (is<Element>(*node)) {
</span><span class="cx"> auto& element = downcast<Element>(*node);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -816,7 +816,7 @@
</span><span class="cx"> c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeInsertedEvent, true, c->parentNode()));
</span><span class="cx">
</span><span class="cx"> // dispatch the DOMNodeInsertedIntoDocument event to all descendants
</span><del>- if (c->inDocument() && document->hasListenerType(Document::DOMNODEINSERTEDINTODOCUMENT_LISTENER)) {
</del><ins>+ if (c->isConnected() && document->hasListenerType(Document::DOMNODEINSERTEDINTODOCUMENT_LISTENER)) {
</ins><span class="cx"> for (; c; c = NodeTraversal::next(*c, &child))
</span><span class="cx"> c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeInsertedIntoDocumentEvent, false));
</span><span class="cx"> }
</span><span class="lines">@@ -842,7 +842,7 @@
</span><span class="cx"> c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeRemovedEvent, true, c->parentNode()));
</span><span class="cx">
</span><span class="cx"> // dispatch the DOMNodeRemovedFromDocument event to all descendants
</span><del>- if (c->inDocument() && document->hasListenerType(Document::DOMNODEREMOVEDFROMDOCUMENT_LISTENER)) {
</del><ins>+ if (c->isConnected() && document->hasListenerType(Document::DOMNODEREMOVEDFROMDOCUMENT_LISTENER)) {
</ins><span class="cx"> for (; c; c = NodeTraversal::next(*c, &child))
</span><span class="cx"> c->dispatchScopedEvent(MutationEvent::create(eventNames().DOMNodeRemovedFromDocumentEvent, false));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeAlgorithmscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> // If we have been removed from the document during this loop, then
</span><span class="cx"> // we don't want to tell the rest of our children that they've been
</span><span class="cx"> // inserted into the document because they haven't.
</span><del>- if (node.inDocument() && child->parentNode() == &node)
</del><ins>+ if (node.isConnected() && child->parentNode() == &node)
</ins><span class="cx"> notifyNodeInsertedIntoDocument(insertionPoint, *child, postInsertionNotificationTargets);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (RefPtr<ShadowRoot> root = downcast<Element>(node).shadowRoot()) {
</span><del>- if (node.inDocument() && root->host() == &node)
</del><ins>+ if (node.isConnected() && root->host() == &node)
</ins><span class="cx"> notifyNodeInsertedIntoDocument(insertionPoint, *root, postInsertionNotificationTargets);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">
</span><span class="cx"> void notifyNodeInsertedIntoDocument(ContainerNode& insertionPoint, Node& node, NodeVector& postInsertionNotificationTargets)
</span><span class="cx"> {
</span><del>- ASSERT(insertionPoint.inDocument());
</del><ins>+ ASSERT(insertionPoint.isConnected());
</ins><span class="cx"> if (node.insertedInto(insertionPoint) == Node::InsertionShouldCallFinishedInsertingSubtree)
</span><span class="cx"> postInsertionNotificationTargets.append(node);
</span><span class="cx"> if (is<ContainerNode>(node))
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> void notifyNodeInsertedIntoTree(ContainerNode& insertionPoint, ContainerNode& node, NodeVector& postInsertionNotificationTargets)
</span><span class="cx"> {
</span><span class="cx"> NoEventDispatchAssertion assertNoEventDispatch;
</span><del>- ASSERT(!insertionPoint.inDocument());
</del><ins>+ ASSERT(!insertionPoint.isConnected());
</ins><span class="cx">
</span><span class="cx"> if (node.insertedInto(insertionPoint) == Node::InsertionShouldCallFinishedInsertingSubtree)
</span><span class="cx"> postInsertionNotificationTargets.append(node);
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> Ref<Document> protectDocument(node.document());
</span><span class="cx"> Ref<Node> protectNode(node);
</span><span class="cx">
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> notifyNodeInsertedIntoDocument(insertionPoint, node, postInsertionNotificationTargets);
</span><span class="cx"> else if (is<ContainerNode>(node))
</span><span class="cx"> notifyNodeInsertedIntoTree(insertionPoint, downcast<ContainerNode>(node), postInsertionNotificationTargets);
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">
</span><span class="cx"> void notifyNodeRemovedFromDocument(ContainerNode& insertionPoint, Node& node)
</span><span class="cx"> {
</span><del>- ASSERT(insertionPoint.inDocument());
</del><ins>+ ASSERT(insertionPoint.isConnected());
</ins><span class="cx"> node.removedFrom(insertionPoint);
</span><span class="cx">
</span><span class="cx"> if (!is<ContainerNode>(node))
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> // If we have been added to the document during this loop, then we
</span><span class="cx"> // don't want to tell the rest of our children that they've been
</span><span class="cx"> // removed from the document because they haven't.
</span><del>- if (!node.inDocument() && child->parentNode() == &node)
</del><ins>+ if (!node.isConnected() && child->parentNode() == &node)
</ins><span class="cx"> notifyNodeRemovedFromDocument(insertionPoint, *child.get());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx"> node.document().setCSSTarget(nullptr);
</span><span class="cx">
</span><span class="cx"> if (RefPtr<ShadowRoot> root = downcast<Element>(node).shadowRoot()) {
</span><del>- if (!node.inDocument() && root->host() == &node)
</del><ins>+ if (!node.isConnected() && root->host() == &node)
</ins><span class="cx"> notifyNodeRemovedFromDocument(insertionPoint, *root.get());
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> void notifyNodeRemovedFromTree(ContainerNode& insertionPoint, ContainerNode& node)
</span><span class="cx"> {
</span><span class="cx"> NoEventDispatchAssertion assertNoEventDispatch;
</span><del>- ASSERT(!insertionPoint.inDocument());
</del><ins>+ ASSERT(!insertionPoint.isConnected());
</ins><span class="cx">
</span><span class="cx"> node.removedFrom(insertionPoint);
</span><span class="cx">
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">
</span><span class="cx"> void notifyChildNodeRemoved(ContainerNode& insertionPoint, Node& child)
</span><span class="cx"> {
</span><del>- if (!child.inDocument()) {
</del><ins>+ if (!child.isConnected()) {
</ins><span class="cx"> if (is<ContainerNode>(child))
</span><span class="cx"> notifyNodeRemovedFromTree(insertionPoint, downcast<ContainerNode>(child));
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoredomCustomElementReactionQueuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx">
</span><span class="cx"> void CustomElementReactionQueue::enqueueElementUpgradeIfDefined(Element& element)
</span><span class="cx"> {
</span><del>- ASSERT(element.inDocument());
</del><ins>+ ASSERT(element.isConnected());
</ins><span class="cx"> ASSERT(element.isCustomElementUpgradeCandidate());
</span><span class="cx"> auto* window = element.document().domWindow();
</span><span class="cx"> if (!window)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> void CustomElementReactionQueue::enqueuePostUpgradeReactions(Element& element)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(element.isCustomElementUpgradeCandidate());
</span><del>- if (!element.hasAttributes() && !element.inDocument())
</del><ins>+ if (!element.hasAttributes() && !element.isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto* queue = element.reactionQueue();
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (element.inDocument() && queue->m_interface->hasConnectedCallback())
</del><ins>+ if (element.isConnected() && queue->m_interface->hasConnectedCallback())
</ins><span class="cx"> queue->m_items.append({CustomElementReactionQueueItem::Type::Connected});
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomDataTransfercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DataTransfer.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DataTransfer.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/DataTransfer.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CachedImage* image = nullptr;
</span><del>- if (is<HTMLImageElement>(element) && !element->inDocument())
</del><ins>+ if (is<HTMLImageElement>(element) && !element->isConnected())
</ins><span class="cx"> image = downcast<HTMLImageElement>(*element).cachedImage();
</span><span class="cx">
</span><span class="cx"> m_dragLocation = IntPoint(x, y);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Document.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -5579,7 +5579,7 @@
</span><span class="cx"> // node document:
</span><span class="cx">
</span><span class="cx"> // The context object is not in a document.
</span><del>- if (!element->inDocument())
</del><ins>+ if (!element->isConnected())
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> // The context object's node document, or an ancestor browsing context's document does not have
</span><span class="lines">@@ -5738,7 +5738,7 @@
</span><span class="cx"> // If doc's fullscreen element stack is non-empty and the element now at the top is either
</span><span class="cx"> // not in a document or its node document is not doc, repeat this substep.
</span><span class="cx"> newTop = currentDoc->webkitFullscreenElement();
</span><del>- if (newTop && (!newTop->inDocument() || &newTop->document() != currentDoc))
</del><ins>+ if (newTop && (!newTop->isConnected() || &newTop->document() != currentDoc))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> // 2. Queue a task to fire an event named fullscreenchange with its bubbles attribute set to true
</span><span class="lines">@@ -5937,7 +5937,7 @@
</span><span class="cx">
</span><span class="cx"> // If the element was removed from our tree, also message the documentElement. Since we may
</span><span class="cx"> // have a document hierarchy, check that node isn't in another document.
</span><del>- if (!node->inDocument())
</del><ins>+ if (!node->isConnected())
</ins><span class="cx"> queue.append(documentElement());
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="lines">@@ -6961,7 +6961,7 @@
</span><span class="cx">
</span><span class="cx"> void Document::didInsertInDocumentShadowRoot(ShadowRoot& shadowRoot)
</span><span class="cx"> {
</span><del>- ASSERT(shadowRoot.inDocument());
</del><ins>+ ASSERT(shadowRoot.isConnected());
</ins><span class="cx"> ASSERT(!m_inDocumentShadowRoots.contains(&shadowRoot));
</span><span class="cx"> m_inDocumentShadowRoots.add(&shadowRoot);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Element.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx">
</span><span class="cx"> bool Element::isFocusable() const
</span><span class="cx"> {
</span><del>- if (!inDocument() || !supportsFocus())
</del><ins>+ if (!isConnected() || !supportsFocus())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (!renderer()) {
</span><span class="lines">@@ -1510,7 +1510,7 @@
</span><span class="cx">
</span><span class="cx"> void Element::parserSetAttributes(const Vector<Attribute>& attributeVector)
</span><span class="cx"> {
</span><del>- ASSERT(!inDocument());
</del><ins>+ ASSERT(!isConnected());
</ins><span class="cx"> ASSERT(!parentNode());
</span><span class="cx"> ASSERT(!m_elementData);
</span><span class="cx">
</span><span class="lines">@@ -1605,11 +1605,11 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest Element::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- bool wasInDocument = inDocument();
- // need to do superclass processing first so inDocument() is true
</del><ins>+ bool wasInDocument = isConnected();
+ // need to do superclass processing first so isConnected() is true
</ins><span class="cx"> // by the time we reach updateId
</span><span class="cx"> ContainerNode::insertedInto(insertionPoint);
</span><del>- ASSERT(!wasInDocument || inDocument());
</del><ins>+ ASSERT(!wasInDocument || isConnected());
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx"> if (containsFullScreenElement() && parentElement() && !parentElement()->containsFullScreenElement())
</span><span class="lines">@@ -1628,7 +1628,7 @@
</span><span class="cx"> // This element is new to the shadow tree (and its tree scope) only if the parent into which this element
</span><span class="cx"> // or its ancestor is inserted belongs to the same tree scope as this element's.
</span><span class="cx"> TreeScope* newScope = &insertionPoint.treeScope();
</span><del>- bool becomeConnected = !wasInDocument && inDocument();
</del><ins>+ bool becomeConnected = !wasInDocument && isConnected();
</ins><span class="cx"> HTMLDocument* newDocument = becomeConnected && is<HTMLDocument>(newScope->documentScope()) ? &downcast<HTMLDocument>(newScope->documentScope()) : nullptr;
</span><span class="cx"> if (newScope != &treeScope())
</span><span class="cx"> newScope = nullptr;
</span><span class="lines">@@ -1679,7 +1679,7 @@
</span><span class="cx">
</span><span class="cx"> if (insertionPoint.isInTreeScope()) {
</span><span class="cx"> TreeScope* oldScope = &insertionPoint.treeScope();
</span><del>- bool becomeDisconnected = inDocument();
</del><ins>+ bool becomeDisconnected = isConnected();
</ins><span class="cx"> HTMLDocument* oldDocument = becomeDisconnected && is<HTMLDocument>(oldScope->documentScope()) ? &downcast<HTMLDocument>(oldScope->documentScope()) : nullptr;
</span><span class="cx">
</span><span class="cx"> // ContainerNode::removeBetween always sets the removed chid's tree scope to Document's but InTreeScope flag is unset in Node::removedFrom.
</span><span class="lines">@@ -2343,7 +2343,7 @@
</span><span class="cx">
</span><span class="cx"> void Element::focus(bool restorePreviousSelection, FocusDirection direction)
</span><span class="cx"> {
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (document().focusedElement() == this) {
</span><span class="lines">@@ -2646,7 +2646,7 @@
</span><span class="cx">
</span><span class="cx"> const RenderStyle& Element::resolveComputedStyle()
</span><span class="cx"> {
</span><del>- ASSERT(inDocument());
</del><ins>+ ASSERT(isConnected());
</ins><span class="cx"> ASSERT(!existingComputedStyle());
</span><span class="cx">
</span><span class="cx"> Deque<Element*, 32> elementsRequiringComputedStyle({ this });
</span><span class="lines">@@ -2675,7 +2675,7 @@
</span><span class="cx">
</span><span class="cx"> const RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier)
</span><span class="cx"> {
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> if (PseudoElement* pseudoElement = beforeOrAfterPseudoElement(*this, pseudoElementSpecifier))
</span><span class="lines">@@ -3202,7 +3202,7 @@
</span><span class="cx">
</span><span class="cx"> updateNameForTreeScope(treeScope(), oldName, newName);
</span><span class="cx">
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> if (!is<HTMLDocument>(document()))
</span><span class="cx"> return;
</span><span class="lines">@@ -3253,7 +3253,7 @@
</span><span class="cx">
</span><span class="cx"> updateIdForTreeScope(treeScope(), oldId, newId, notifyObservers);
</span><span class="cx">
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> if (!is<HTMLDocument>(document()))
</span><span class="cx"> return;
</span><span class="lines">@@ -3273,7 +3273,7 @@
</span><span class="cx">
</span><span class="cx"> void Element::updateIdForDocument(HTMLDocument& document, const AtomicString& oldId, const AtomicString& newId, HTMLDocumentNamedItemMapsUpdatingCondition condition)
</span><span class="cx"> {
</span><del>- ASSERT(inDocument());
</del><ins>+ ASSERT(isConnected());
</ins><span class="cx"> ASSERT(oldId != newId);
</span><span class="cx">
</span><span class="cx"> if (isInShadowTree())
</span><span class="lines">@@ -3300,7 +3300,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasTagName(labelTag));
</span><span class="cx">
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (oldForAttributeValue == newForAttributeValue)
</span><span class="lines">@@ -3510,7 +3510,7 @@
</span><span class="cx">
</span><span class="cx"> // We can't update window and document's named item maps since the presence of image and object elements depend on other attributes and children.
</span><span class="cx"> // Fortunately, those named item maps are only updated when this element is in the document, which should never be the case.
</span><del>- ASSERT(!inDocument());
</del><ins>+ ASSERT(!isConnected());
</ins><span class="cx">
</span><span class="cx"> const AtomicString& oldID = getIdAttribute();
</span><span class="cx"> const AtomicString& newID = other.getIdAttribute();
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Element.h        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -701,7 +701,7 @@
</span><span class="cx">
</span><span class="cx"> inline const Element* Element::rootElement() const
</span><span class="cx"> {
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> return document().documentElement();
</span><span class="cx">
</span><span class="cx"> const Element* highest = this;
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventPath.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventPath.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/EventPath.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto& targetTreeScope = target.treeScope();
</span><span class="cx"> TreeScope* currentTreeScope = &m_relatedNode.treeScope();
</span><del>- if (LIKELY(currentTreeScope == &targetTreeScope && target.inDocument() && m_relatedNode.inDocument()))
</del><ins>+ if (LIKELY(currentTreeScope == &targetTreeScope && target.isConnected() && m_relatedNode.isConnected()))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (&currentTreeScope->documentScope() != &targetTreeScope.documentScope()) {
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> m_retargetedRelatedNode = nullptr;
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (relatedNode.inDocument() != target.inDocument()) {
</del><ins>+ if (relatedNode.isConnected() != target.isConnected()) {
</ins><span class="cx"> m_hasDifferentTreeRoot = true;
</span><span class="cx"> m_retargetedRelatedNode = moveOutOfAllShadowRoots(relatedNode);
</span><span class="cx"> return;
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool lowestCommonAncestorIsDocumentScope = i + 1 == m_ancestorTreeScopes.size();
</span><del>- if (lowestCommonAncestorIsDocumentScope && !relatedNode.inDocument() && !target.inDocument()) {
</del><ins>+ if (lowestCommonAncestorIsDocumentScope && !relatedNode.isConnected() && !target.isConnected()) {
</ins><span class="cx"> Node& relatedNodeAncestorInDocumentScope = i ? *downcast<ShadowRoot>(m_ancestorTreeScopes[i - 1]->rootNode()).shadowHost() : relatedNode;
</span><span class="cx"> Node& targetAncestorInDocumentScope = j ? *downcast<ShadowRoot>(targetTreeScopeAncestors[j - 1]->rootNode()).shadowHost() : target;
</span><span class="cx"> if (&targetAncestorInDocumentScope.rootNode() != &relatedNodeAncestorInDocumentScope.rootNode()) {
</span></span></pre></div>
<a id="trunkSourceWebCoredomInlineStyleSheetOwnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_isParsingChildren)
</span><span class="cx"> return;
</span><del>- if (!element.inDocument())
</del><ins>+ if (!element.isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> createSheetFromTextContents(element);
</span><span class="cx"> }
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">
</span><span class="cx"> void InlineStyleSheetOwner::finishParsingChildren(Element& element)
</span><span class="cx"> {
</span><del>- if (element.inDocument())
</del><ins>+ if (element.isConnected())
</ins><span class="cx"> createSheetFromTextContents(element);
</span><span class="cx"> m_isParsingChildren = false;
</span><span class="cx"> }
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">
</span><span class="cx"> void InlineStyleSheetOwner::createSheet(Element& element, const String& text)
</span><span class="cx"> {
</span><del>- ASSERT(element.inDocument());
</del><ins>+ ASSERT(element.isConnected());
</ins><span class="cx"> Document& document = element.document();
</span><span class="cx"> if (m_sheet) {
</span><span class="cx"> if (m_sheet->isLoading() && m_styleScope)
</span></span></pre></div>
<a id="trunkSourceWebCoredomLiveNodeListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LiveNodeList.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LiveNodeList.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/LiveNodeList.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">
</span><span class="cx"> ContainerNode& LiveNodeList::rootNode() const
</span><span class="cx"> {
</span><del>- if (isRootedAtDocument() && ownerNode().inDocument())
</del><ins>+ if (isRootedAtDocument() && ownerNode().isConnected())
</ins><span class="cx"> return ownerNode().document();
</span><span class="cx">
</span><span class="cx"> return ownerNode();
</span></span></pre></div>
<a id="trunkSourceWebCoredomLiveNodeListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/LiveNodeList.h (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/LiveNodeList.h        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/LiveNodeList.h        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx"> template <class NodeListType>
</span><span class="cx"> inline ContainerNode& CachedLiveNodeList<NodeListType>::rootNode() const
</span><span class="cx"> {
</span><del>- if (nodeList().isRootedAtDocument() && ownerNode().inDocument())
</del><ins>+ if (nodeList().isRootedAtDocument() && ownerNode().isConnected())
</ins><span class="cx"> return ownerNode().document();
</span><span class="cx">
</span><span class="cx"> return ownerNode();
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Node.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -911,10 +911,10 @@
</span><span class="cx"> bool Node::isDescendantOf(const Node& other) const
</span><span class="cx"> {
</span><span class="cx"> // Return true if other is an ancestor of this, otherwise false
</span><del>- if (!other.hasChildNodes() || inDocument() != other.inDocument())
</del><ins>+ if (!other.hasChildNodes() || isConnected() != other.isConnected())
</ins><span class="cx"> return false;
</span><span class="cx"> if (other.isDocumentNode())
</span><del>- return &document() == &other && !isDocumentNode() && inDocument();
</del><ins>+ return &document() == &other && !isDocumentNode() && isConnected();
</ins><span class="cx"> for (const auto* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
</span><span class="cx"> if (ancestor == &other)
</span><span class="cx"> return true;
</span><span class="lines">@@ -1220,9 +1220,9 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest Node::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- ASSERT(insertionPoint.inDocument() || isContainerNode());
- if (insertionPoint.inDocument())
- setFlag(InDocumentFlag);
</del><ins>+ ASSERT(insertionPoint.isConnected() || isContainerNode());
+ if (insertionPoint.isConnected())
+ setFlag(IsConnectedFlag);
</ins><span class="cx"> if (parentOrShadowHostNode()->isInShadowTree())
</span><span class="cx"> setFlag(IsInShadowTreeFlag);
</span><span class="cx">
</span><span class="lines">@@ -1233,9 +1233,9 @@
</span><span class="cx">
</span><span class="cx"> void Node::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- ASSERT(insertionPoint.inDocument() || isContainerNode());
- if (insertionPoint.inDocument())
- clearFlag(InDocumentFlag);
</del><ins>+ ASSERT(insertionPoint.isConnected() || isContainerNode());
+ if (insertionPoint.isConnected())
+ clearFlag(IsConnectedFlag);
</ins><span class="cx"> if (isInShadowTree() && !treeScope().rootNode().isShadowRoot())
</span><span class="cx"> clearFlag(IsInShadowTreeFlag);
</span><span class="cx"> }
</span><span class="lines">@@ -1598,8 +1598,8 @@
</span><span class="cx">
</span><span class="cx"> // If one node is in the document and the other is not, we must be disconnected.
</span><span class="cx"> // If the nodes have different owning documents, they must be disconnected. Note that we avoid
</span><del>- // comparing Attr nodes here, since they return false from inDocument() all the time (which seems like a bug).
- if (start1->inDocument() != start2->inDocument() || &start1->treeScope() != &start2->treeScope())
</del><ins>+ // comparing Attr nodes here, since they return false from isConnected() all the time (which seems like a bug).
+ if (start1->isConnected() != start2->isConnected() || &start1->treeScope() != &start2->treeScope())
</ins><span class="cx"> return compareDetachedElementsPosition(*this, otherNode);
</span><span class="cx">
</span><span class="cx"> // We need to find a common ancestor container, and then compare the indices of the two immediate children.
</span><span class="lines">@@ -2397,7 +2397,7 @@
</span><span class="cx">
</span><span class="cx"> bool Node::inRenderedDocument() const
</span><span class="cx"> {
</span><del>- return inDocument() && document().hasLivingRenderTree();
</del><ins>+ return isConnected() && document().hasLivingRenderTree();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void* Node::opaqueRootSlow() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Node.h        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -372,14 +372,14 @@
</span><span class="cx"> static ptrdiff_t treeScopeMemoryOffset() { return OBJECT_OFFSETOF(Node, m_treeScope); }
</span><span class="cx">
</span><span class="cx"> // Returns true if this node is associated with a document and is in its associated document's
</span><del>- // node tree, false otherwise.
- bool inDocument() const
</del><ins>+ // node tree, false otherwise (https://dom.spec.whatwg.org/#connected).
+ bool isConnected() const
</ins><span class="cx"> {
</span><del>- return getFlag(InDocumentFlag);
</del><ins>+ return getFlag(IsConnectedFlag);
</ins><span class="cx"> }
</span><span class="cx"> bool isInUserAgentShadowTree() const;
</span><span class="cx"> bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
</span><del>- bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumentFlag | IsInShadowTreeFlag)); }
</del><ins>+ bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(IsConnectedFlag | IsInShadowTreeFlag)); }
</ins><span class="cx">
</span><span class="cx"> bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; }
</span><span class="cx"> virtual bool childTypeAllowed(NodeType) const { return false; }
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx"> // dispatching.
</span><span class="cx"> //
</span><span class="cx"> // WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree.
</span><del>- // Implementation can determine the type of subtree by seeing insertionPoint->inDocument().
</del><ins>+ // Implementation can determine the type of subtree by seeing insertionPoint->isConnected().
</ins><span class="cx"> // For a performance reason, notifications are delivered only to ContainerNode subclasses if the insertionPoint is out of document.
</span><span class="cx"> //
</span><span class="cx"> // There is another callback named finishedInsertingSubtree(), which is called after all descendants are notified.
</span><span class="lines">@@ -573,7 +573,7 @@
</span><span class="cx"> IsHTMLFlag = 1 << 4,
</span><span class="cx"> IsSVGFlag = 1 << 5,
</span><span class="cx"> ChildNeedsStyleRecalcFlag = 1 << 7,
</span><del>- InDocumentFlag = 1 << 8,
</del><ins>+ IsConnectedFlag = 1 << 8,
</ins><span class="cx"> IsLinkFlag = 1 << 9,
</span><span class="cx"> IsUserActionElement = 1 << 10,
</span><span class="cx"> HasRareDataFlag = 1 << 11,
</span><span class="lines">@@ -617,13 +617,13 @@
</span><span class="cx"> CreateText = DefaultNodeFlags | IsTextFlag,
</span><span class="cx"> CreateContainer = DefaultNodeFlags | IsContainerFlag,
</span><span class="cx"> CreateElement = CreateContainer | IsElementFlag,
</span><del>- CreatePseudoElement = CreateElement | InDocumentFlag,
</del><ins>+ CreatePseudoElement = CreateElement | IsConnectedFlag,
</ins><span class="cx"> CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | IsInShadowTreeFlag,
</span><span class="cx"> CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag,
</span><span class="cx"> CreateStyledElement = CreateElement | IsStyledElementFlag,
</span><span class="cx"> CreateHTMLElement = CreateStyledElement | IsHTMLFlag,
</span><span class="cx"> CreateSVGElement = CreateStyledElement | IsSVGFlag | HasCustomStyleResolveCallbacksFlag,
</span><del>- CreateDocument = CreateContainer | InDocumentFlag,
</del><ins>+ CreateDocument = CreateContainer | IsConnectedFlag,
</ins><span class="cx"> CreateEditingText = CreateText | IsEditingTextOrUndefinedCustomElementFlag,
</span><span class="cx"> CreateMathMLElement = CreateStyledElement | IsMathMLFlag
</span><span class="cx"> };
</span><span class="lines">@@ -761,7 +761,7 @@
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Possible race?
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=165713
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> return &document();
</span><span class="cx"> return opaqueRootSlow();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.idl (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.idl        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Node.idl        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> boolean contains(Node? other);
</span><span class="cx">
</span><span class="cx"> [EnabledAtRuntime=ShadowDOM] Node getRootNode(optional GetRootNodeOptions options);
</span><del>- [EnabledAtRuntime=ShadowDOM, ImplementedAs=inDocument] readonly attribute boolean isConnected;
</del><ins>+ [EnabledAtRuntime=ShadowDOM] readonly attribute boolean isConnected;
</ins><span class="cx">
</span><span class="cx"> readonly attribute Element parentElement;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.h (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.h        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Position.h        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">
</span><span class="cx"> bool isNull() const { return !m_anchorNode; }
</span><span class="cx"> bool isNotNull() const { return m_anchorNode; }
</span><del>- bool isOrphan() const { return m_anchorNode && !m_anchorNode->inDocument(); }
</del><ins>+ bool isOrphan() const { return m_anchorNode && !m_anchorNode->isConnected(); }
</ins><span class="cx">
</span><span class="cx"> Element* element() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomProcessingInstructioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ProcessingInstruction.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ProcessingInstruction.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/ProcessingInstruction.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> if (m_cachedSheet)
</span><span class="cx"> m_cachedSheet->removeClient(*this);
</span><span class="cx">
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> document().styleScope().removeStyleSheetCandidateNode(*this);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx">
</span><span class="cx"> void ProcessingInstruction::setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
</span><span class="cx"> {
</span><del>- if (!inDocument()) {
</del><ins>+ if (!isConnected()) {
</ins><span class="cx"> ASSERT(!m_sheet);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> CharacterData::insertedInto(insertionPoint);
</span><del>- if (!insertionPoint.inDocument())
</del><ins>+ if (!insertionPoint.isConnected())
</ins><span class="cx"> return InsertionDone;
</span><span class="cx"> document().styleScope().addStyleSheetCandidateNode(*this, m_createdByParser);
</span><span class="cx"> checkStyleSheet();
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx"> void ProcessingInstruction::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> CharacterData::removedFrom(insertionPoint);
</span><del>- if (!insertionPoint.inDocument())
</del><ins>+ if (!insertionPoint.isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> document().styleScope().removeStyleSheetCandidateNode(*this);
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/Range.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx"> if (checkNodeResult.hasException()) {
</span><span class="cx"> // DOM4 spec requires us to check whether refNode and start container have the same root first
</span><span class="cx"> // but we do it in the reverse order to avoid O(n) operation here in common case.
</span><del>- if (!refNode.inDocument() && !commonAncestorContainer(&refNode, &startContainer()))
</del><ins>+ if (!refNode.isConnected() && !commonAncestorContainer(&refNode, &startContainer()))
</ins><span class="cx"> return Exception { WRONG_DOCUMENT_ERR };
</span><span class="cx"> return checkNodeResult.releaseException();
</span><span class="cx"> }
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx"> // This method returns 0, 1, 2, or 3 based on if the node is before, after,
</span><span class="cx"> // before and after(surrounds), or inside the range, respectively
</span><span class="cx">
</span><del>- if (!refNode.inDocument()) {
</del><ins>+ if (!refNode.isConnected()) {
</ins><span class="cx"> // Firefox doesn't throw an exception for this case; it returns 0.
</span><span class="cx"> return NODE_BEFORE;
</span><span class="cx"> }
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx">
</span><span class="cx"> ExceptionOr<bool> Range::intersectsNode(Node& refNode) const
</span><span class="cx"> {
</span><del>- if (!refNode.inDocument() || &refNode.document() != &ownerDocument())
</del><ins>+ if (!refNode.isConnected() || &refNode.document() != &ownerDocument())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ContainerNode* parentNode = refNode.parentNode();
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">
</span><span class="cx"> bool ScriptElement::shouldCallFinishedInsertingSubtree(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- return insertionPoint.inDocument() && !m_parserInserted;
</del><ins>+ return insertionPoint.isConnected() && !m_parserInserted;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScriptElement::finishedInsertingSubtree()
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">
</span><span class="cx"> void ScriptElement::childrenChanged()
</span><span class="cx"> {
</span><del>- if (!m_parserInserted && m_element.inDocument())
</del><ins>+ if (!m_parserInserted && m_element.isConnected())
</ins><span class="cx"> prepareScript(); // FIXME: Provide a real starting line number here.
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> if (!hasSourceAttribute() && !m_element.firstChild())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!m_element.inDocument())
</del><ins>+ if (!m_element.isConnected())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ScriptType scriptType = ScriptType::Classic;
</span><span class="lines">@@ -285,7 +285,7 @@
</span><span class="cx"> Ref<Document> originalDocument(m_element.document());
</span><span class="cx"> if (!m_element.dispatchBeforeLoadEvent(sourceURL))
</span><span class="cx"> return false;
</span><del>- bool didEventListenerDisconnectThisElement = !m_element.inDocument() || &m_element.document() != originalDocument.ptr();
</del><ins>+ bool didEventListenerDisconnectThisElement = !m_element.isConnected() || &m_element.document() != originalDocument.ptr();
</ins><span class="cx"> if (didEventListenerDisconnectThisElement)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -325,7 +325,7 @@
</span><span class="cx"> if (!m_element.dispatchBeforeLoadEvent(sourceURL))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- bool didEventListenerDisconnectThisElement = !m_element.inDocument() || &m_element.document() != originalDocument.ptr();
</del><ins>+ bool didEventListenerDisconnectThisElement = !m_element.isConnected() || &m_element.document() != originalDocument.ptr();
</ins><span class="cx"> if (didEventListenerDisconnectThisElement)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -433,7 +433,7 @@
</span><span class="cx">
</span><span class="cx"> bool ScriptElement::ignoresLoadRequest() const
</span><span class="cx"> {
</span><del>- return m_alreadyStarted || m_isExternalScript || m_parserInserted || !m_element.inDocument();
</del><ins>+ return m_alreadyStarted || m_isExternalScript || m_parserInserted || !m_element.isConnected();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ScriptElement::isScriptForEventSupported() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptRunner.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptRunner.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/ScriptRunner.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">
</span><span class="cx"> void ScriptRunner::queueScriptForExecution(ScriptElement& scriptElement, LoadableScript& loadableScript, ExecutionType executionType)
</span><span class="cx"> {
</span><del>- ASSERT(scriptElement.element().inDocument());
</del><ins>+ ASSERT(scriptElement.element().isConnected());
</ins><span class="cx">
</span><span class="cx"> m_document.incrementLoadEventDelayCount();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomSelectorQuerycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SelectorQuery.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SelectorQuery.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/SelectorQuery.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">
</span><span class="cx"> static const CSSSelector* selectorForIdLookup(const ContainerNode& rootNode, const CSSSelector& firstSelector)
</span><span class="cx"> {
</span><del>- if (!rootNode.inDocument())
</del><ins>+ if (!rootNode.isConnected())
</ins><span class="cx"> return nullptr;
</span><span class="cx"> if (rootNode.document().inQuirksMode())
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx">
</span><span class="cx"> static ContainerNode& filterRootById(ContainerNode& rootNode, const CSSSelector& firstSelector)
</span><span class="cx"> {
</span><del>- if (!rootNode.inDocument())
</del><ins>+ if (!rootNode.isConnected())
</ins><span class="cx"> return rootNode;
</span><span class="cx"> if (rootNode.document().inQuirksMode())
</span><span class="cx"> return rootNode;
</span></span></pre></div>
<a id="trunkSourceWebCoredomShadowRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ShadowRoot.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ShadowRoot.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/ShadowRoot.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">
</span><span class="cx"> ShadowRoot::~ShadowRoot()
</span><span class="cx"> {
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> document().didRemoveInDocumentShadowRoot(*this);
</span><span class="cx">
</span><span class="cx"> // We cannot let ContainerNode destructor call willBeDeletedFrom()
</span><span class="lines">@@ -88,9 +88,9 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest ShadowRoot::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- bool wasInDocument = inDocument();
</del><ins>+ bool wasInDocument = isConnected();
</ins><span class="cx"> DocumentFragment::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument() && !wasInDocument)
</del><ins>+ if (insertionPoint.isConnected() && !wasInDocument)
</ins><span class="cx"> document().didInsertInDocumentShadowRoot(*this);
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> void ShadowRoot::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> DocumentFragment::removedFrom(insertionPoint);
</span><del>- if (insertionPoint.inDocument() && !inDocument())
</del><ins>+ if (insertionPoint.isConnected() && !isConnected())
</ins><span class="cx"> document().didRemoveInDocumentShadowRoot(*this);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomTreeScopeAdoptercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TreeScopeAdopter.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TreeScopeAdopter.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/dom/TreeScopeAdopter.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">
</span><span class="cx"> inline void TreeScopeAdopter::moveNodeToNewDocument(Node& node, Document& oldDocument, Document& newDocument) const
</span><span class="cx"> {
</span><del>- ASSERT(!node.inDocument() || &oldDocument != &newDocument);
</del><ins>+ ASSERT(!node.isConnected() || &oldDocument != &newDocument);
</ins><span class="cx">
</span><span class="cx"> newDocument.incrementReferencingNodeCount();
</span><span class="cx"> oldDocument.decrementReferencingNodeCount();
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyBlockElementCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -157,11 +157,11 @@
</span><span class="cx"> // indentIntoBlockquote could move more than one paragraph if the paragraph
</span><span class="cx"> // is in a list item or a table. As a result, endAfterSelection could refer to a position
</span><span class="cx"> // no longer in the document.
</span><del>- if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().anchorNode()->inDocument())
</del><ins>+ if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().anchorNode()->isConnected())
</ins><span class="cx"> break;
</span><span class="cx"> // Sanity check: Make sure our moveParagraph calls didn't remove endOfNextParagraph.deepEquivalent().deprecatedNode()
</span><span class="cx"> // If somehow we did, return to prevent crashes.
</span><del>- if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->inDocument()) {
</del><ins>+ if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->isConnected()) {
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -755,7 +755,7 @@
</span><span class="cx">
</span><span class="cx"> bool startAndEndAreStillInDocument()
</span><span class="cx"> {
</span><del>- return start && end && start->inDocument() && end->inDocument();
</del><ins>+ return start && end && start->isConnected() && end->isConnected();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<Node> start;
</span><span class="lines">@@ -870,7 +870,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(runStart && runEnd);
</span><span class="cx"> RefPtr<Node> next = runStart;
</span><del>- for (RefPtr<Node> node = next; node && node->inDocument() && node != pastEndNode; node = next) {
</del><ins>+ for (RefPtr<Node> node = next; node && node->isConnected() && node != pastEndNode; node = next) {
</ins><span class="cx"> if (editingIgnoresContent(*node)) {
</span><span class="cx"> ASSERT(!node->contains(pastEndNode.get()));
</span><span class="cx"> next = NodeTraversal::nextSkippingChildren(*node);
</span><span class="lines">@@ -884,7 +884,7 @@
</span><span class="cx"> RefPtr<Node> nextSibling = node->nextSibling();
</span><span class="cx"> RefPtr<ContainerNode> parent = node->parentNode();
</span><span class="cx"> removeInlineStyleFromElement(style, downcast<HTMLElement>(node.get()), RemoveAlways);
</span><del>- if (!node->inDocument()) {
</del><ins>+ if (!node->isConnected()) {
</ins><span class="cx"> // FIXME: We might need to update the start and the end of current selection here but need a test.
</span><span class="cx"> if (runStart == node)
</span><span class="cx"> runStart = previousSibling ? previousSibling->nextSibling() : parent->firstChild();
</span><span class="lines">@@ -914,7 +914,7 @@
</span><span class="cx"> if (removeImplicitlyStyledElement(style, element.get(), mode, extractedStyle))
</span><span class="cx"> removed = true;
</span><span class="cx">
</span><del>- if (!element->inDocument())
</del><ins>+ if (!element->isConnected())
</ins><span class="cx"> return removed;
</span><span class="cx">
</span><span class="cx"> // If the node was converted to a span, the span may still contain relevant
</span><span class="lines">@@ -931,7 +931,7 @@
</span><span class="cx"> removeNodePreservingChildren(elem);
</span><span class="cx"> else {
</span><span class="cx"> HTMLElement* newSpanElement = replaceElementWithSpanPreservingChildrenAndAttributes(elem);
</span><del>- ASSERT(newSpanElement && newSpanElement->inDocument());
</del><ins>+ ASSERT(newSpanElement && newSpanElement->isConnected());
</ins><span class="cx"> elem = newSpanElement;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1097,8 +1097,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(start.isNotNull());
</span><span class="cx"> ASSERT(end.isNotNull());
</span><del>- ASSERT(start.anchorNode()->inDocument());
- ASSERT(end.anchorNode()->inDocument());
</del><ins>+ ASSERT(start.anchorNode()->isConnected());
+ ASSERT(end.anchorNode()->isConnected());
</ins><span class="cx"> ASSERT(comparePositions(start, end) <= 0);
</span><span class="cx"> // FIXME: We should assert that start/end are not in the middle of a text node.
</span><span class="cx">
</span><span class="lines">@@ -1148,7 +1148,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> removeInlineStyleFromElement(style, element.ptr(), RemoveIfNeeded, styleToPushDown.get());
</span><del>- if (!element->inDocument()) {
</del><ins>+ if (!element->isConnected()) {
</ins><span class="cx"> if (s.deprecatedNode() == element.ptr()) {
</span><span class="cx"> // Since elem must have been fully selected, and it is at the start
</span><span class="cx"> // of the selection, it is clear we can set the new s offset to 0.
</span><span class="lines">@@ -1401,7 +1401,7 @@
</span><span class="cx">
</span><span class="cx"> void ApplyStyleCommand::addInlineStyleIfNeeded(EditingStyle* style, PassRefPtr<Node> passedStart, PassRefPtr<Node> passedEnd, EAddStyledElement addStyledElement)
</span><span class="cx"> {
</span><del>- if (!passedStart || !passedEnd || !passedStart->inDocument() || !passedEnd->inDocument())
</del><ins>+ if (!passedStart || !passedEnd || !passedStart->isConnected() || !passedEnd->isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<Node> start = passedStart;
</span><span class="lines">@@ -1430,8 +1430,8 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Node> startNode = passedStart;
</span><span class="cx"> RefPtr<Node> endNode = passedEnd;
</span><del>- ASSERT(startNode->inDocument());
- ASSERT(endNode->inDocument());
</del><ins>+ ASSERT(startNode->isConnected());
+ ASSERT(endNode->isConnected());
</ins><span class="cx">
</span><span class="cx"> // Find appropriate font and span elements top-down.
</span><span class="cx"> HTMLFontElement* fontContainer = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingCompositeEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -572,7 +572,7 @@
</span><span class="cx"> splitTextNode(downcast<Text>(refChild), offset);
</span><span class="cx">
</span><span class="cx"> // Mutation events (bug 22634) from the text node insertion may have removed the refChild
</span><del>- if (!refChild->inDocument())
</del><ins>+ if (!refChild->isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> insertNodeBefore(insertChild, refChild);
</span><span class="cx"> } else
</span><span class="lines">@@ -648,7 +648,7 @@
</span><span class="cx"> // Returning a raw pointer here is OK because the command is retained by
</span><span class="cx"> // applyCommandToComposite (thus retaining the span), and the span is also
</span><span class="cx"> // in the DOM tree, and thus alive whie it has a parent.
</span><del>- ASSERT(command->spanElement()->inDocument());
</del><ins>+ ASSERT(command->spanElement()->isConnected());
</ins><span class="cx"> return command->spanElement();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1238,7 +1238,7 @@
</span><span class="cx"> setEndingSelection(VisibleSelection::selectionFromContentsOfNode(&anchorElement));
</span><span class="cx"> applyStyledElement(&anchorElement);
</span><span class="cx"> // Clones of anchorElement have been pushed down, now remove it.
</span><del>- if (anchorElement.inDocument())
</del><ins>+ if (anchorElement.isConnected())
</ins><span class="cx"> removeNodePreservingChildren(&anchorElement);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1485,9 +1485,9 @@
</span><span class="cx"> frame().editor().clearMisspellingsAndBadGrammar(endingSelection());
</span><span class="cx"> deleteSelection(false, false, false, false);
</span><span class="cx">
</span><del>- ASSERT(destination.deepEquivalent().anchorNode()->inDocument());
</del><ins>+ ASSERT(destination.deepEquivalent().anchorNode()->isConnected());
</ins><span class="cx"> cleanupAfterDeletion(destination);
</span><del>- ASSERT(destination.deepEquivalent().anchorNode()->inDocument());
</del><ins>+ ASSERT(destination.deepEquivalent().anchorNode()->isConnected());
</ins><span class="cx">
</span><span class="cx"> // Add a br if pruning an empty block level element caused a collapse. For example:
</span><span class="cx"> // foo^
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingDeleteSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -536,7 +536,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_downstreamEnd.deprecatedNode() != startNode && !m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode()) && m_downstreamEnd.anchorNode()->inDocument() && m_downstreamEnd.deprecatedEditingOffset() >= caretMinOffset(*m_downstreamEnd.deprecatedNode())) {
</del><ins>+ if (m_downstreamEnd.deprecatedNode() != startNode && !m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode()) && m_downstreamEnd.anchorNode()->isConnected() && m_downstreamEnd.deprecatedEditingOffset() >= caretMinOffset(*m_downstreamEnd.deprecatedNode())) {
</ins><span class="cx"> if (m_downstreamEnd.atLastEditingPositionForNode() && !canHaveChildrenForEditing(*m_downstreamEnd.deprecatedNode())) {
</span><span class="cx"> // The node itself is fully selected, not just its contents. Delete it.
</span><span class="cx"> removeNode(m_downstreamEnd.deprecatedNode());
</span><span class="lines">@@ -553,7 +553,7 @@
</span><span class="cx"> // know how many children to remove.
</span><span class="cx"> // FIXME: Make m_upstreamStart a position we update as we remove content, then we can
</span><span class="cx"> // always know which children to remove.
</span><del>- } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart.anchorNode()->inDocument())) {
</del><ins>+ } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart.anchorNode()->isConnected())) {
</ins><span class="cx"> unsigned offset = 0;
</span><span class="cx"> if (m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode())) {
</span><span class="cx"> Node* n = m_upstreamStart.deprecatedNode();
</span><span class="lines">@@ -605,9 +605,9 @@
</span><span class="cx"> ASSERT(!m_pruneStartBlockIfNecessary);
</span><span class="cx">
</span><span class="cx"> // FIXME: Deletion should adjust selection endpoints as it removes nodes so that we never get into this state (4099839).
</span><del>- if (!m_downstreamEnd.anchorNode()->inDocument() || !m_upstreamStart.anchorNode()->inDocument())
</del><ins>+ if (!m_downstreamEnd.anchorNode()->isConnected() || !m_upstreamStart.anchorNode()->isConnected())
</ins><span class="cx"> return;
</span><del>-
</del><ins>+
</ins><span class="cx"> // FIXME: The deletion algorithm shouldn't let this happen.
</span><span class="cx"> if (comparePositions(m_upstreamStart, m_downstreamEnd) > 0)
</span><span class="cx"> return;
</span><span class="lines">@@ -676,7 +676,7 @@
</span><span class="cx">
</span><span class="cx"> void DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows()
</span><span class="cx"> {
</span><del>- if (m_endTableRow && m_endTableRow->inDocument() && m_endTableRow != m_startTableRow) {
</del><ins>+ if (m_endTableRow && m_endTableRow->isConnected() && m_endTableRow != m_startTableRow) {
</ins><span class="cx"> Node* row = m_endTableRow->previousSibling();
</span><span class="cx"> while (row && row != m_startTableRow) {
</span><span class="cx"> RefPtr<Node> previousRow = row->previousSibling();
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Remove empty rows after the start row.
</span><del>- if (m_startTableRow && m_startTableRow->inDocument() && m_startTableRow != m_endTableRow) {
</del><ins>+ if (m_startTableRow && m_startTableRow->isConnected() && m_startTableRow != m_endTableRow) {
</ins><span class="cx"> Node* row = m_startTableRow->nextSibling();
</span><span class="cx"> while (row && row != m_endTableRow) {
</span><span class="cx"> RefPtr<Node> nextRow = row->nextSibling();
</span><span class="lines">@@ -698,8 +698,8 @@
</span><span class="cx"> row = nextRow.get();
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
- if (m_endTableRow && m_endTableRow->inDocument() && m_endTableRow != m_startTableRow)
</del><ins>+
+ if (m_endTableRow && m_endTableRow->isConnected() && m_endTableRow != m_startTableRow) {
</ins><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><span class="cx"> if (!m_endingPosition.deprecatedNode()->isDescendantOf(*m_endTableRow)) {
</span><span class="lines">@@ -709,6 +709,7 @@
</span><span class="cx"> CompositeEditCommand::removeNode(m_endTableRow.get());
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DeleteSelectionCommand::calculateTypingStyleAfterDelete()
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/Editor.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -3437,7 +3437,7 @@
</span><span class="cx"> // When typing we check spelling elsewhere, so don't redo it here.
</span><span class="cx"> // If this is a change in selection resulting from a delete operation,
</span><span class="cx"> // oldSelection may no longer be in the document.
</span><del>- if (m_editorUIUpdateTimerShouldCheckSpellingAndGrammar && oldSelection.isContentEditable() && oldSelection.start().deprecatedNode() && oldSelection.start().anchorNode()->inDocument()) {
</del><ins>+ if (m_editorUIUpdateTimerShouldCheckSpellingAndGrammar && oldSelection.isContentEditable() && oldSelection.start().deprecatedNode() && oldSelection.start().anchorNode()->isConnected()) {
</ins><span class="cx"> VisiblePosition oldStart(oldSelection.visibleStart());
</span><span class="cx"> VisibleSelection oldAdjacentWords = VisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary));
</span><span class="cx"> if (oldAdjacentWords != newAdjacentWords) {
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx">
</span><span class="cx"> void DragCaretController::nodeWillBeRemoved(Node& node)
</span><span class="cx"> {
</span><del>- if (!hasCaret() || !node.inDocument())
</del><ins>+ if (!hasCaret() || !node.isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!removingNodeRemovesPosition(node, m_position.deepEquivalent()))
</span><span class="lines">@@ -435,7 +435,7 @@
</span><span class="cx"> {
</span><span class="cx"> // There can't be a selection inside a fragment, so if a fragment's node is being removed,
</span><span class="cx"> // the selection in the document that created the fragment needs no adjustment.
</span><del>- if (isNone() || !node.inDocument())
</del><ins>+ if (isNone() || !node.isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> respondToNodeModification(node, removingNodeRemovesPosition(node, m_selection.base()), removingNodeRemovesPosition(node, m_selection.extent()),
</span><span class="lines">@@ -524,7 +524,7 @@
</span><span class="cx"> void FrameSelection::textWasReplaced(CharacterData* node, unsigned offset, unsigned oldLength, unsigned newLength)
</span><span class="cx"> {
</span><span class="cx"> // The fragment check is a performance optimization. See http://trac.webkit.org/changeset/30062.
</span><del>- if (isNone() || !node || !node->inDocument())
</del><ins>+ if (isNone() || !node || !node->isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Position base = m_selection.base();
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingIndentOutdentCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/IndentOutdentCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/IndentOutdentCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/IndentOutdentCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -216,10 +216,10 @@
</span><span class="cx"> // outdentParagraph could move more than one paragraph if the paragraph
</span><span class="cx"> // is in a list item. As a result, endAfterSelection and endOfNextParagraph
</span><span class="cx"> // could refer to positions no longer in the document.
</span><del>- if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().anchorNode()->inDocument())
</del><ins>+ if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().anchorNode()->isConnected())
</ins><span class="cx"> break;
</span><span class="cx">
</span><del>- if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->inDocument()) {
</del><ins>+ if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->isConnected()) {
</ins><span class="cx"> endOfCurrentParagraph = endingSelection().end();
</span><span class="cx"> endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingInsertLineBreakCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/InsertLineBreakCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/InsertLineBreakCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/InsertLineBreakCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> deleteInsignificantTextDownstream(endingPosition);
</span><span class="cx"> ASSERT(!textNode.renderer() || textNode.renderer()->style().collapseWhiteSpace());
</span><span class="cx"> // Deleting insignificant whitespace will remove textNode if it contains nothing but insignificant whitespace.
</span><del>- if (textNode.inDocument())
</del><ins>+ if (textNode.isConnected())
</ins><span class="cx"> insertTextIntoNode(&textNode, 0, nonBreakingSpaceString());
</span><span class="cx"> else {
</span><span class="cx"> RefPtr<Text> nbspNode = document().createTextNode(nonBreakingSpaceString());
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingInsertListCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/InsertListCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/InsertListCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/InsertListCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> // infinite loop and because there is no more work to be done.
</span><span class="cx"> // FIXME(<rdar://problem/5983974>): The endingSelection() may be incorrect here. Compute
</span><span class="cx"> // the new location of endOfSelection and use it as the end of the new selection.
</span><del>- if (!startOfLastParagraph.deepEquivalent().anchorNode()->inDocument())
</del><ins>+ if (!startOfLastParagraph.deepEquivalent().anchorNode()->isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> setEndingSelection(startOfCurrentParagraph);
</span><span class="cx">
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx"> // Manually remove listNode because moveParagraphWithClones sometimes leaves it behind in the document.
</span><span class="cx"> // See the bug 33668 and editing/execCommand/insert-list-orphaned-item-with-nested-lists.html.
</span><span class="cx"> // FIXME: This might be a bug in moveParagraphWithClones or deleteSelection.
</span><del>- if (listNode && listNode->inDocument())
</del><ins>+ if (listNode && listNode->isConnected())
</ins><span class="cx"> removeNode(listNode);
</span><span class="cx">
</span><span class="cx"> newList = mergeWithNeighboringLists(newList);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingInsertTextCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/InsertTextCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/InsertTextCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/InsertTextCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx"> // and so deleteInsignificantText could remove it. Save the position before the node in case that happens.
</span><span class="cx"> Position positionBeforeStartNode(positionInParentBeforeNode(startPosition.containerNode()));
</span><span class="cx"> deleteInsignificantText(startPosition.upstream(), startPosition.downstream());
</span><del>- if (!startPosition.anchorNode()->inDocument())
</del><ins>+ if (!startPosition.anchorNode()->isConnected())
</ins><span class="cx"> startPosition = positionBeforeStartNode;
</span><span class="cx"> if (!startPosition.isCandidate())
</span><span class="cx"> startPosition = startPosition.downstream();
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingMoveSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/MoveSelectionCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/MoveSelectionCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/MoveSelectionCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> // set the destination to the ending point after the deletion.
</span><span class="cx"> // Fixes: <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand;
</span><span class="cx"> // selection is empty, leading to null deref
</span><del>- if (!pos.anchorNode()->inDocument())
</del><ins>+ if (!pos.anchorNode()->isConnected())
</ins><span class="cx"> pos = endingSelection().start();
</span><span class="cx">
</span><span class="cx"> cleanupAfterDeletion(pos);
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">
</span><span class="cx"> setEndingSelection(VisibleSelection(pos, endingSelection().affinity(), endingSelection().isDirectional()));
</span><span class="cx"> setStartingSelection(endingSelection());
</span><del>- if (!pos.anchorNode()->inDocument()) {
</del><ins>+ if (!pos.anchorNode()->isConnected()) {
</ins><span class="cx"> // Document was modified out from under us.
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingReplaceNodeWithSpanCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">
</span><span class="cx"> static void swapInNodePreservingAttributesAndChildren(HTMLElement& newNode, HTMLElement& nodeToReplace)
</span><span class="cx"> {
</span><del>- ASSERT(nodeToReplace.inDocument());
</del><ins>+ ASSERT(nodeToReplace.isConnected());
</ins><span class="cx"> RefPtr<ContainerNode> parentNode = nodeToReplace.parentNode();
</span><span class="cx">
</span><span class="cx"> // FIXME: Fix this to send the proper MutationRecords when MutationObservers are present.
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">
</span><span class="cx"> void ReplaceNodeWithSpanCommand::doApply()
</span><span class="cx"> {
</span><del>- if (!m_elementToReplace->inDocument())
</del><ins>+ if (!m_elementToReplace->isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> if (!m_spanElement)
</span><span class="cx"> m_spanElement = HTMLSpanElement::create(m_elementToReplace->document());
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">
</span><span class="cx"> void ReplaceNodeWithSpanCommand::doUnapply()
</span><span class="cx"> {
</span><del>- if (!m_spanElement->inDocument())
</del><ins>+ if (!m_spanElement->isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> swapInNodePreservingAttributesAndChildren(*m_elementToReplace, *m_spanElement);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingReplaceSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -1120,7 +1120,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Mutation events (bug 22634) may have already removed the inserted content
</span><del>- if (!refNode->inDocument())
</del><ins>+ if (!refNode->isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> bool plainTextFragment = isPlainTextMarkup(refNode.get());
</span><span class="lines">@@ -1132,7 +1132,7 @@
</span><span class="cx"> insertedNodes.respondToNodeInsertion(node.get());
</span><span class="cx">
</span><span class="cx"> // Mutation events (bug 22634) may have already removed the inserted content
</span><del>- if (!node->inDocument())
</del><ins>+ if (!node->isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> refNode = node;
</span><span class="lines">@@ -1147,7 +1147,7 @@
</span><span class="cx"> handleStyleSpans(insertedNodes);
</span><span class="cx">
</span><span class="cx"> // Mutation events (bug 20161) may have already removed the inserted content
</span><del>- if (!insertedNodes.firstNodeInserted() || !insertedNodes.firstNodeInserted()->inDocument())
</del><ins>+ if (!insertedNodes.firstNodeInserted() || !insertedNodes.firstNodeInserted()->isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> VisiblePosition startOfInsertedContent = firstPositionInOrBeforeNode(insertedNodes.firstNodeInserted());
</span><span class="lines">@@ -1203,7 +1203,7 @@
</span><span class="cx"> if (startOfParagraph(endOfInsertedContent) == startOfParagraphToMove) {
</span><span class="cx"> insertNodeAt(HTMLBRElement::create(document()), endOfInsertedContent.deepEquivalent());
</span><span class="cx"> // Mutation events (bug 22634) triggered by inserting the <br> might have removed the content we're about to move
</span><del>- if (!startOfParagraphToMove.deepEquivalent().anchorNode()->inDocument())
</del><ins>+ if (!startOfParagraphToMove.deepEquivalent().anchorNode()->isConnected())
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1279,9 +1279,9 @@
</span><span class="cx">
</span><span class="cx"> bool ReplaceSelectionCommand::shouldRemoveEndBR(Node* endBR, const VisiblePosition& originalVisPosBeforeEndBR)
</span><span class="cx"> {
</span><del>- if (!endBR || !endBR->inDocument())
</del><ins>+ if (!endBR || !endBR->isConnected())
</ins><span class="cx"> return false;
</span><del>-
</del><ins>+
</ins><span class="cx"> VisiblePosition visiblePos(positionBeforeNode(endBR));
</span><span class="cx">
</span><span class="cx"> // Don't remove the br if nothing was inserted.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormAssociatedElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormAssociatedElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormAssociatedElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/FormAssociatedElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> if (m_form && element.rootElement() != m_form->rootElement())
</span><span class="cx"> setForm(nullptr);
</span><span class="cx">
</span><del>- if (!insertionPoint.inDocument())
</del><ins>+ if (!insertionPoint.isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (element.hasAttributeWithoutSynchronization(formAttr))
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Compute the highest ancestor instead of calling Node::rootNode in removedFrom / formRemovedFromTree
</span><del>-// since inDocument flag on some form associated elements may not have been updated yet.
</del><ins>+// since isConnected flag on some form associated elements may not have been updated yet.
</ins><span class="cx"> static Node* computeRootNode(Node& node)
</span><span class="cx"> {
</span><span class="cx"> Node* current = &node;
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> void FormAssociatedElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement& element = asHTMLElement();
</span><del>- if (insertionPoint.inDocument() && element.hasAttributeWithoutSynchronization(formAttr))
</del><ins>+ if (insertionPoint.isConnected() && element.hasAttributeWithoutSynchronization(formAttr))
</ins><span class="cx"> m_formAttributeTargetObserver = nullptr;
</span><span class="cx"> // If the form and element are both in the same tree, preserve the connection to the form.
</span><span class="cx"> // Otherwise, null out our form and remove ourselves from the form's list of elements.
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> HTMLFormElement* FormAssociatedElement::findAssociatedForm(const HTMLElement* element, HTMLFormElement* currentAssociatedForm)
</span><span class="cx"> {
</span><span class="cx"> const AtomicString& formId(element->attributeWithoutSynchronization(formAttr));
</span><del>- if (!formId.isNull() && element->inDocument()) {
</del><ins>+ if (!formId.isNull() && element->isConnected()) {
</ins><span class="cx"> // The HTML5 spec says that the element should be associated with
</span><span class="cx"> // the first element in the document to have an ID that equal to
</span><span class="cx"> // the value of form attribute, so we put the result of
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> HTMLFormElement* originalForm = m_form;
</span><span class="cx"> setForm(findAssociatedForm(&asHTMLElement(), m_form));
</span><span class="cx"> HTMLElement& element = asHTMLElement();
</span><del>- if (m_form && m_form != originalForm && m_form->inDocument())
</del><ins>+ if (m_form && m_form != originalForm && m_form->isConnected())
</ins><span class="cx"> element.document().didAssociateFormControl(&element);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -182,12 +182,12 @@
</span><span class="cx"> // The form attribute removed. We need to reset form owner here.
</span><span class="cx"> HTMLFormElement* originalForm = m_form;
</span><span class="cx"> setForm(HTMLFormElement::findClosestFormAncestor(element));
</span><del>- if (m_form && m_form != originalForm && m_form->inDocument())
</del><ins>+ if (m_form && m_form != originalForm && m_form->isConnected())
</ins><span class="cx"> element.document().didAssociateFormControl(&element);
</span><span class="cx"> m_formAttributeTargetObserver = nullptr;
</span><span class="cx"> } else {
</span><span class="cx"> resetFormOwner();
</span><del>- if (element.inDocument())
</del><ins>+ if (element.isConnected())
</ins><span class="cx"> resetFormAttributeTargetObserver();
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLBaseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLBaseElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLBaseElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLBaseElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> document().processBaseElement();
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> void HTMLBaseElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::removedFrom(insertionPoint);
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> document().processBaseElement();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLBodyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLBodyElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (!insertionPoint.inDocument())
</del><ins>+ if (!insertionPoint.isConnected())
</ins><span class="cx"> return InsertionDone;
</span><span class="cx">
</span><span class="cx"> // FIXME: It's surprising this is web compatible since it means a marginwidth and marginheight attribute can
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCollection.h (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCollection.h        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLCollection.h        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">
</span><span class="cx"> inline ContainerNode& HTMLCollection::rootNode() const
</span><span class="cx"> {
</span><del>- if (isRootedAtDocument() && ownerNode().inDocument())
</del><ins>+ if (isRootedAtDocument() && ownerNode().isConnected())
</ins><span class="cx"> return ownerNode().document();
</span><span class="cx">
</span><span class="cx"> return ownerNode();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -514,7 +514,7 @@
</span><span class="cx"> // FIXME: Can the renderer be out of date here? Do we need to call updateStyleIfNeeded?
</span><span class="cx"> // For example, for the contents of textarea elements that are display:none?
</span><span class="cx"> auto* r = renderer();
</span><del>- if ((r && r->style().preserveNewline()) || (inDocument() && isTextControlInnerTextElement())) {
</del><ins>+ if ((r && r->style().preserveNewline()) || (isConnected() && isTextControlInnerTextElement())) {
</ins><span class="cx"> if (!text.contains('\r')) {
</span><span class="cx"> replaceAllChildren(document().createTextNode(text));
</span><span class="cx"> return { };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!element->hasAttributeWithoutSynchronization(autofocusAttr))
</span><span class="cx"> return false;
</span><del>- if (!element->inDocument() || !element->document().renderView())
</del><ins>+ if (!element->isConnected() || !element->document().renderView())
</ins><span class="cx"> return false;
</span><span class="cx"> if (element->document().isSandboxed(SandboxAutomaticFeatures)) {
</span><span class="cx"> // FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
</span><span class="lines">@@ -483,7 +483,7 @@
</span><span class="cx"> Ref<HTMLFormControlElement> protectedThis(*this);
</span><span class="cx"> Ref<Document> originalDocument(document());
</span><span class="cx"> bool needsDefaultAction = dispatchEvent(Event::create(eventNames().invalidEvent, false, true));
</span><del>- if (needsDefaultAction && unhandledInvalidControls && inDocument() && originalDocument.ptr() == &document())
</del><ins>+ if (needsDefaultAction && unhandledInvalidControls && isConnected() && originalDocument.ptr() == &document())
</ins><span class="cx"> unhandledInvalidControls->append(this);
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -501,7 +501,7 @@
</span><span class="cx"> // has !renderer()->needsLayout() assertion.
</span><span class="cx"> document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx">
</span><del>- if (inDocument() && isFocusable()) {
</del><ins>+ if (isConnected() && isFocusable()) {
</ins><span class="cx"> focusAndShowValidationMessage();
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementWithStatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElementWithState.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElementWithState.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLFormControlElementWithState.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- if (insertionPoint.inDocument() && !containingShadowRoot())
</del><ins>+ if (insertionPoint.isConnected() && !containingShadowRoot())
</ins><span class="cx"> document().formController().registerFormElementWithState(this);
</span><span class="cx"> return HTMLFormControlElement::insertedInto(insertionPoint);
</span><span class="cx"> }
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">
</span><span class="cx"> void HTMLFormControlElementWithState::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- if (insertionPoint.inDocument() && !containingShadowRoot() && !insertionPoint.containingShadowRoot())
</del><ins>+ if (insertionPoint.isConnected() && !containingShadowRoot() && !insertionPoint.containingShadowRoot())
</ins><span class="cx"> document().formController().unregisterFormElementWithState(this);
</span><span class="cx"> HTMLFormControlElement::removedFrom(insertionPoint);
</span><span class="cx"> }
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() const
</span><span class="cx"> {
</span><span class="cx"> // We don't save/restore control state in a form with autocomplete=off.
</span><del>- return inDocument() && shouldAutocomplete();
</del><ins>+ return isConnected() && shouldAutocomplete();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FormControlState HTMLFormControlElementWithState::saveFormControlState() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> document().didAssociateFormControl(this);
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx">
</span><span class="cx"> // Focus on the first focusable control and show a validation message.
</span><span class="cx"> for (auto& control : unhandledInvalidControls) {
</span><del>- if (control->inDocument() && control->isFocusable()) {
</del><ins>+ if (control->isConnected() && control->isFocusable()) {
</ins><span class="cx"> control->focusAndShowValidationMessage();
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx"> // Warn about all of unfocusable controls.
</span><span class="cx"> if (document().frame()) {
</span><span class="cx"> for (auto& control : unhandledInvalidControls) {
</span><del>- if (control->inDocument() && control->isFocusable())
</del><ins>+ if (control->isConnected() && control->isFocusable())
</ins><span class="cx"> continue;
</span><span class="cx"> String message = makeString("An invalid form control with name='", control->name(), "' is not focusable.");
</span><span class="cx"> document().addConsoleMessage(MessageSource::Rendering, MessageLevel::Error, message);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameElementBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLFrameElementBase::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLFrameOwnerElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> return InsertionShouldCallFinishedInsertingSubtree;
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">
</span><span class="cx"> void HTMLFrameElementBase::finishedInsertingSubtree()
</span><span class="cx"> {
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // DocumentFragments don't kick of any loads.
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">
</span><span class="cx"> m_URL = AtomicString(str);
</span><span class="cx">
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> openURL(LockHistory::No, LockBackForwardList::No);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> ASSERT(!m_contentFrame || m_contentFrame->ownerElement() != this);
</span><span class="cx"> ASSERT(frame);
</span><span class="cx"> // Disconnected frames should not be allowed to load.
</span><del>- ASSERT(inDocument());
</del><ins>+ ASSERT(isConnected());
</ins><span class="cx"> m_contentFrame = frame;
</span><span class="cx">
</span><span class="cx"> for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode())
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameSetElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameSetElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameSetElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLFrameSetElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument()) {
</del><ins>+ if (insertionPoint.isConnected()) {
</ins><span class="cx"> if (Frame* frame = document().frame())
</span><span class="cx"> frame->loader().client().dispatchDidBecomeFrameset(document().isFrameSet());
</span><span class="cx"> }
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx"> void HTMLFrameSetElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::removedFrom(insertionPoint);
</span><del>- if (insertionPoint.inDocument()) {
</del><ins>+ if (insertionPoint.isConnected()) {
</ins><span class="cx"> if (Frame* frame = document().frame())
</span><span class="cx"> frame->loader().client().dispatchDidBecomeFrameset(document().isFrameSet());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -204,12 +204,12 @@
</span><span class="cx"> } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr)
</span><span class="cx"> selectImageSource();
</span><span class="cx"> else if (name == usemapAttr) {
</span><del>- if (inDocument() && !m_parsedUsemap.isNull())
</del><ins>+ if (isConnected() && !m_parsedUsemap.isNull())
</ins><span class="cx"> document().removeImageElementByUsemap(*m_parsedUsemap.impl(), *this);
</span><span class="cx">
</span><span class="cx"> m_parsedUsemap = parseHTMLHashNameReference(value);
</span><span class="cx">
</span><del>- if (inDocument() && !m_parsedUsemap.isNull())
</del><ins>+ if (isConnected() && !m_parsedUsemap.isNull())
</ins><span class="cx"> document().addImageElementByUsemap(*m_parsedUsemap.impl(), *this);
</span><span class="cx"> } else if (name == compositeAttr) {
</span><span class="cx"> // FIXME: images don't support blend modes in their compositing attribute.
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> if (name == nameAttr) {
</span><span class="cx"> bool willHaveName = !value.isNull();
</span><del>- if (m_hadNameBeforeAttributeChanged != willHaveName && inDocument() && !isInShadowTree() && is<HTMLDocument>(document())) {
</del><ins>+ if (m_hadNameBeforeAttributeChanged != willHaveName && isConnected() && !isInShadowTree() && is<HTMLDocument>(document())) {
</ins><span class="cx"> HTMLDocument& document = downcast<HTMLDocument>(this->document());
</span><span class="cx"> const AtomicString& id = getIdAttribute();
</span><span class="cx"> if (!id.isEmpty() && id != getNameAttribute()) {
</span><span class="lines">@@ -313,7 +313,7 @@
</span><span class="cx"> // in callbacks back to this node.
</span><span class="cx"> Node::InsertionNotificationRequest insertNotificationRequest = HTMLElement::insertedInto(insertionPoint);
</span><span class="cx">
</span><del>- if (insertionPoint.inDocument() && !m_parsedUsemap.isNull())
</del><ins>+ if (insertionPoint.isConnected() && !m_parsedUsemap.isNull())
</ins><span class="cx"> document().addImageElementByUsemap(*m_parsedUsemap.impl(), *this);
</span><span class="cx">
</span><span class="cx"> if (is<HTMLPictureElement>(parentNode())) {
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx">
</span><span class="cx"> // If we have been inserted from a renderer-less document,
</span><span class="cx"> // our loader may have not fetched the image, so do it now.
</span><del>- if (insertionPoint.inDocument() && !m_imageLoader.image())
</del><ins>+ if (insertionPoint.isConnected() && !m_imageLoader.image())
</ins><span class="cx"> m_imageLoader.updateFromElement();
</span><span class="cx">
</span><span class="cx"> return insertNotificationRequest;
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> if (m_form)
</span><span class="cx"> m_form->removeImgElement(this);
</span><span class="cx">
</span><del>- if (insertionPoint.inDocument() && !m_parsedUsemap.isNull())
</del><ins>+ if (insertionPoint.isConnected() && !m_parsedUsemap.isNull())
</ins><span class="cx"> document().removeImageElementByUsemap(*m_parsedUsemap.impl(), *this);
</span><span class="cx">
</span><span class="cx"> if (is<HTMLPictureElement>(parentNode()))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageLoader.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageLoader.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLImageLoader.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">
</span><span class="cx"> bool loadError = cachedImage.errorOccurred() || cachedImage.response().httpStatusCode() >= 400;
</span><span class="cx"> if (!loadError) {
</span><del>- if (!element().inDocument()) {
</del><ins>+ if (!element().isConnected()) {
</ins><span class="cx"> JSC::VM& vm = commonVM();
</span><span class="cx"> JSC::JSLockHolder lock(vm);
</span><span class="cx"> // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -923,7 +923,7 @@
</span><span class="cx"> // unchecked to match other browsers. DOM is not a useful standard for this
</span><span class="cx"> // because it says only to fire change events at "lose focus" time, which is
</span><span class="cx"> // definitely wrong in practice for these types of elements.
</span><del>- if (eventBehavior != DispatchNoEvent && inDocument() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
</del><ins>+ if (eventBehavior != DispatchNoEvent && isConnected() && m_inputType->shouldSendChangeEventAfterCheckedChanged()) {
</ins><span class="cx"> setTextAsOfLastFormControlChangeEvent(String());
</span><span class="cx"> dispatchFormControlChangeEvent();
</span><span class="cx"> }
</span><span class="lines">@@ -1509,16 +1509,16 @@
</span><span class="cx"> void HTMLInputElement::finishedInsertingSubtree()
</span><span class="cx"> {
</span><span class="cx"> HTMLTextFormControlElement::finishedInsertingSubtree();
</span><del>- if (inDocument() && !form())
</del><ins>+ if (isConnected() && !form())
</ins><span class="cx"> addToRadioButtonGroup();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLInputElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- if (insertionPoint.inDocument() && !form())
</del><ins>+ if (insertionPoint.isConnected() && !form())
</ins><span class="cx"> removeFromRadioButtonGroup();
</span><span class="cx"> HTMLTextFormControlElement::removedFrom(insertionPoint);
</span><del>- ASSERT(!inDocument());
</del><ins>+ ASSERT(!isConnected());
</ins><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span><span class="cx"> resetListAttributeTargetObserver();
</span><span class="cx"> #endif
</span><span class="lines">@@ -1604,7 +1604,7 @@
</span><span class="cx">
</span><span class="cx"> void HTMLInputElement::resetListAttributeTargetObserver()
</span><span class="cx"> {
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> m_listAttributeTargetObserver = std::make_unique<ListAttributeTargetObserver>(attributeWithoutSynchronization(listAttr), this);
</span><span class="cx"> else
</span><span class="cx"> m_listAttributeTargetObserver = nullptr;
</span><span class="lines">@@ -1870,7 +1870,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> if (auto* formElement = form())
</span><span class="cx"> return &formElement->radioButtonGroups();
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> return &document().formController().radioButtonGroups();
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLabelElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLabelElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLabelElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLLabelElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><del>- return inDocument() ? firstElementWithIdIfLabelable(treeScope(), controlId) : nullptr;
</del><ins>+ return isConnected() ? firstElementWithIdIfLabelable(treeScope(), controlId) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> HTMLFormElement* HTMLLabelElement::form() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -113,8 +113,8 @@
</span><span class="cx"> if (oldDisabledState == m_disabledState)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- ASSERT(inDocument() || !styleSheetIsLoading());
- if (!inDocument())
</del><ins>+ ASSERT(isConnected() || !styleSheetIsLoading());
+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // If we change the disabled state while the sheet is still loading, then we have to
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx"> if (!dispatchBeforeLoadEvent(getNonEmptyURLAttribute(hrefAttr)))
</span><span class="cx"> return false;
</span><span class="cx"> // A beforeload handler might have removed us from the document or changed the document.
</span><del>- if (!inDocument() || &document() != originalDocument.ptr())
</del><ins>+ if (!isConnected() || &document() != originalDocument.ptr())
</ins><span class="cx"> return false;
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">
</span><span class="cx"> void HTMLLinkElement::process()
</span><span class="cx"> {
</span><del>- if (!inDocument()) {
</del><ins>+ if (!isConnected()) {
</ins><span class="cx"> ASSERT(!m_sheet);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -302,9 +302,9 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- bool wasInDocument = inDocument();
</del><ins>+ bool wasInDocument = isConnected();
</ins><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (!insertionPoint.inDocument() || wasInDocument)
</del><ins>+ if (!insertionPoint.isConnected() || wasInDocument)
</ins><span class="cx"> return InsertionDone;
</span><span class="cx">
</span><span class="cx"> m_styleScope = &Style::Scope::forNode(*this);
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx"> void HTMLLinkElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::removedFrom(insertionPoint);
</span><del>- if (!insertionPoint.inDocument() || inDocument())
</del><ins>+ if (!insertionPoint.isConnected() || isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (m_sheet)
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx">
</span><span class="cx"> void HTMLLinkElement::setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* cachedStyleSheet)
</span><span class="cx"> {
</span><del>- if (!inDocument()) {
</del><ins>+ if (!isConnected()) {
</ins><span class="cx"> ASSERT(!m_sheet);
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMapElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMapElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMapElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLMapElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -94,13 +94,13 @@
</span><span class="cx"> if (document().isHTMLDocument())
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> treeScope().removeImageMap(*this);
</span><span class="cx"> String mapName = value;
</span><span class="cx"> if (mapName[0] == '#')
</span><span class="cx"> mapName = mapName.substring(1);
</span><span class="cx"> m_name = mapName;
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> treeScope().addImageMap(*this);
</span><span class="cx">
</span><span class="cx"> return;
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> Node::InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> treeScope().addImageMap(*this);
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">
</span><span class="cx"> void HTMLMapElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> treeScope().removeImageMap(*this);
</span><span class="cx"> HTMLElement::removedFrom(insertionPoint);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -817,7 +817,7 @@
</span><span class="cx"> LOG(Media, "HTMLMediaElement::insertedInto(%p)", this);
</span><span class="cx">
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument()) {
</del><ins>+ if (insertionPoint.isConnected()) {
</ins><span class="cx"> m_inActiveDocument = true;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -876,7 +876,7 @@
</span><span class="cx"> LOG(Media, "HTMLMediaElement::removedFrom(%p)", this);
</span><span class="cx">
</span><span class="cx"> m_inActiveDocument = false;
</span><del>- if (insertionPoint.inDocument()) {
</del><ins>+ if (insertionPoint.isConnected()) {
</ins><span class="cx"> // Pause asynchronously to let the operation that removed us finish, in case we get inserted back into a document.
</span><span class="cx"> m_pauseAfterDetachedTaskQueue.enqueueTask(std::bind(&HTMLMediaElement::pauseAfterDetachedTask, this));
</span><span class="cx"> }
</span><span class="lines">@@ -5847,7 +5847,7 @@
</span><span class="cx">
</span><span class="cx"> ensureUserAgentShadowRoot().appendChild(mediaControls);
</span><span class="cx">
</span><del>- if (!controls() || !inDocument())
</del><ins>+ if (!controls() || !isConnected())
</ins><span class="cx"> mediaControls->hide();
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -5872,12 +5872,12 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><del>- if (!requireControls || !inDocument() || !inActiveDocument())
</del><ins>+ if (!requireControls || !isConnected() || !inActiveDocument())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ensureMediaControlsShadowRoot();
</span><span class="cx"> #else
</span><del>- if (!requireControls || !inDocument() || !inActiveDocument()) {
</del><ins>+ if (!requireControls || !isConnected() || !inActiveDocument()) {
</ins><span class="cx"> if (hasMediaControls())
</span><span class="cx"> mediaControls()->hide();
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMetaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMetaElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMetaElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLMetaElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLMetaElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument())
</del><ins>+ if (insertionPoint.isConnected())
</ins><span class="cx"> process();
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> void HTMLMetaElement::process()
</span><span class="cx"> {
</span><span class="cx"> // Changing a meta tag while it's not in the tree shouldn't have any effect on the document.
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> const AtomicString& contentValue = attributeWithoutSynchronization(contentAttr);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLObjectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> } else
</span><span class="cx"> HTMLPlugInImageElement::parseAttribute(name, value);
</span><span class="cx">
</span><del>- if (!invalidateRenderer || !inDocument() || !renderer())
</del><ins>+ if (!invalidateRenderer || !isConnected() || !renderer())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> clearUseFallbackContent();
</span><span class="lines">@@ -349,7 +349,7 @@
</span><span class="cx"> void HTMLObjectElement::childrenChanged(const ChildChange& change)
</span><span class="cx"> {
</span><span class="cx"> updateDocNamedItem();
</span><del>- if (inDocument() && !useFallbackContent()) {
</del><ins>+ if (isConnected() && !useFallbackContent()) {
</ins><span class="cx"> setNeedsWidgetUpdate(true);
</span><span class="cx"> invalidateStyleForSubtree();
</span><span class="cx"> }
</span><span class="lines">@@ -371,7 +371,7 @@
</span><span class="cx"> if (useFallbackContent())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> invalidateStyleAndRenderersForSubtree();
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx"> isNamedItem = false;
</span><span class="cx"> child = child->nextSibling();
</span><span class="cx"> }
</span><del>- if (isNamedItem != wasNamedItem && inDocument() && !isInShadowTree() && is<HTMLDocument>(document())) {
</del><ins>+ if (isNamedItem != wasNamedItem && isConnected() && !isInShadowTree() && is<HTMLDocument>(document())) {
</ins><span class="cx"> HTMLDocument& document = downcast<HTMLDocument>(this->document());
</span><span class="cx">
</span><span class="cx"> const AtomicString& id = getIdAttribute();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx"> // HTMLObjectElement needs to delay widget updates until after all children are parsed,
</span><span class="cx"> // For HTMLEmbedElement this delay is unnecessary, but there is no harm in doing the same.
</span><span class="cx"> setNeedsWidgetUpdate(true);
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> invalidateStyleForSubtree();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -759,11 +759,11 @@
</span><span class="cx"> m_activeSelectionAnchorIndex = -1;
</span><span class="cx"> setOptionsChangedOnRenderer();
</span><span class="cx"> invalidateStyleForSubtree();
</span><del>- if (!inDocument()) {
</del><ins>+ if (!isConnected()) {
</ins><span class="cx"> if (HTMLCollection* collection = cachedHTMLCollection(SelectOptions))
</span><span class="cx"> collection->invalidateCache(document());
</span><span class="cx"> }
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> invalidateSelectedItems();
</span><span class="cx"> if (auto* cache = document().existingAXObjectCache())
</span><span class="cx"> cache->childrenChanged(this);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLStyleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLStyleElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLStyleElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLStyleElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -97,9 +97,9 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><del>- bool wasInDocument = inDocument();
</del><ins>+ bool wasInDocument = isConnected();
</ins><span class="cx"> auto result = HTMLElement::insertedInto(insertionPoint);
</span><del>- if (insertionPoint.inDocument() && !wasInDocument)
</del><ins>+ if (insertionPoint.isConnected() && !wasInDocument)
</ins><span class="cx"> m_styleSheetOwner.insertedIntoDocument(*this);
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> void HTMLStyleElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::removedFrom(insertionPoint);
</span><del>- if (insertionPoint.inDocument() && !inDocument())
</del><ins>+ if (insertionPoint.isConnected() && !isConnected())
</ins><span class="cx"> m_styleSheetOwner.removedFromDocument(*this);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> InsertionNotificationRequest insertionNotificationRequest = HTMLFormControlElementWithState::insertedInto(insertionPoint);
</span><del>- if (!insertionPoint.inDocument())
</del><ins>+ if (!insertionPoint.isConnected())
</ins><span class="cx"> return insertionNotificationRequest;
</span><span class="cx"> String initialValue = value();
</span><span class="cx"> setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString() : initialValue);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTitleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTitleElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTitleElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/HTMLTitleElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::insertedInto(insertionPoint);
</span><del>- if (inDocument() && !isInShadowTree())
</del><ins>+ if (isConnected() && !isInShadowTree())
</ins><span class="cx"> document().titleElementAdded(*this);
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> void HTMLTitleElement::removedFrom(ContainerNode& insertionPoint)
</span><span class="cx"> {
</span><span class="cx"> HTMLElement::removedFrom(insertionPoint);
</span><del>- if (insertionPoint.inDocument() && !insertionPoint.isInShadowTree())
</del><ins>+ if (insertionPoint.isConnected() && !insertionPoint.isInShadowTree())
</ins><span class="cx"> document().titleElementRemoved(*this);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasStyle.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasStyle.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/html/canvas/CanvasStyle.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">
</span><span class="cx"> Color currentColor(HTMLCanvasElement* canvas)
</span><span class="cx"> {
</span><del>- if (!canvas || !canvas->inDocument() || !canvas->inlineStyle())
</del><ins>+ if (!canvas || !canvas->isConnected() || !canvas->inlineStyle())
</ins><span class="cx"> return Color::black;
</span><span class="cx"> Color color = CSSParser::parseColor(canvas->inlineStyle()->getPropertyValue(CSSPropertyColor));
</span><span class="cx"> if (!color.isValid())
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMSelection.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMSelection.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/page/DOMSelection.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx"> auto selectedRange = selection.selection().toNormalizedRange();
</span><span class="cx">
</span><span class="cx"> ContainerNode* parentNode = node.parentNode();
</span><del>- if (!parentNode || !parentNode->inDocument())
</del><ins>+ if (!parentNode || !parentNode->isConnected())
</ins><span class="cx"> return false;
</span><span class="cx"> unsigned nodeIndex = node.computeNodeIndex();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -3400,7 +3400,7 @@
</span><span class="cx"> void EventHandler::updateDragStateAfterEditDragIfNeeded(Element& rootEditableElement)
</span><span class="cx"> {
</span><span class="cx"> // If inserting the dragged contents removed the drag source, we still want to fire dragend at the root editable element.
</span><del>- if (dragState().source && !dragState().source->inDocument())
</del><ins>+ if (dragState().source && !dragState().source->isConnected())
</ins><span class="cx"> dragState().source = &rootEditableElement;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePointerLockControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PointerLockController.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PointerLockController.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/page/PointerLockController.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">
</span><span class="cx"> void PointerLockController::requestPointerLock(Element* target)
</span><span class="cx"> {
</span><del>- if (!target || !target->inDocument() || m_documentOfRemovedElementWhileWaitingForUnlock) {
</del><ins>+ if (!target || !target->isConnected() || m_documentOfRemovedElementWhileWaitingForUnlock) {
</ins><span class="cx"> enqueueEvent(eventNames().pointerlockerrorEvent, target);
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingHitTestResultcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/HitTestResult.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/HitTestResult.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/rendering/HitTestResult.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -755,11 +755,11 @@
</span><span class="cx"> Node* node = innerNode();
</span><span class="cx"> if (!node)
</span><span class="cx"> return 0;
</span><del>- if (node->inDocument())
</del><ins>+ if (node->isConnected())
</ins><span class="cx"> return node;
</span><span class="cx">
</span><span class="cx"> Element* element = node->parentElement();
</span><del>- if (element && element->inDocument())
</del><ins>+ if (element && element->isConnected())
</ins><span class="cx"> return element;
</span><span class="cx">
</span><span class="cx"> return node;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlMultiLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">
</span><span class="cx"> RenderTextControlMultiLine::~RenderTextControlMultiLine()
</span><span class="cx"> {
</span><del>- if (textAreaElement().inDocument())
</del><ins>+ if (textAreaElement().isConnected())
</ins><span class="cx"> textAreaElement().rendererWillBeDestroyed();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorereplayReplayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/ReplayController.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/ReplayController.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/replay/ReplayController.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> LOG(WebReplay, "%-20s --->%s DOM event: type=%s, target=%u/node[%p] %s\n", "ReplayEvents",
</span><span class="cx"> (eventIsUnrelated) ? "Unrelated" : "Dispatching",
</span><span class="cx"> event.type().string().utf8().data(),
</span><del>- frameIndexFromDocument((node->inDocument()) ? &node->document() : node->ownerDocument()),
</del><ins>+ frameIndexFromDocument((node->isConnected()) ? &node->document() : node->ownerDocument()),
</ins><span class="cx"> node,
</span><span class="cx"> node->nodeName().utf8().data());
</span><span class="cx"> } else if (DOMWindow* window = target->toDOMWindow()) {
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx"> Document* document = frame ? frame->document() : nullptr;
</span><span class="cx"> // Fetch the document from the event target, because the target could be detached.
</span><span class="cx"> if (Node* node = target->toNode())
</span><del>- document = node->inDocument() ? &node->document() : node->ownerDocument();
</del><ins>+ document = node->isConnected() ? &node->document() : node->ownerDocument();
</ins><span class="cx"> else if (DOMWindow* window = target->toDOMWindow())
</span><span class="cx"> document = window->document();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleScope.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleScope.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/style/StyleScope.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">
</span><span class="cx"> Scope& Scope::forNode(Node& node)
</span><span class="cx"> {
</span><del>- ASSERT(node.inDocument());
</del><ins>+ ASSERT(node.isConnected());
</ins><span class="cx"> auto* shadowRoot = node.containingShadowRoot();
</span><span class="cx"> if (shadowRoot)
</span><span class="cx"> return shadowRoot->styleScope();
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">
</span><span class="cx"> void Scope::addStyleSheetCandidateNode(Node& node, bool createdByParser)
</span><span class="cx"> {
</span><del>- if (!node.inDocument())
</del><ins>+ if (!node.isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Until the <body> exists, we have no choice but to compare document positions,
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleTreeResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleTreeResolver.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -378,7 +378,7 @@
</span><span class="cx"> auto& node = *it;
</span><span class="cx"> auto& parent = this->parent();
</span><span class="cx">
</span><del>- ASSERT(node.inDocument());
</del><ins>+ ASSERT(node.isConnected());
</ins><span class="cx"> ASSERT(node.containingShadowRoot() == scope().shadowRoot);
</span><span class="cx"> ASSERT(node.parentElement() == parent.element || is<ShadowRoot>(node.parentNode()) || node.parentElement()->shadowRoot());
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -251,8 +251,8 @@
</span><span class="cx">
</span><span class="cx"> static inline void applyCSSPropertyToTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName, const String& valueAsString)
</span><span class="cx"> {
</span><del>- // FIXME: Do we really need to check both inDocument and !parentNode?
- if (attributeName == anyQName() || !targetElement.inDocument() || !targetElement.parentNode())
</del><ins>+ // FIXME: Do we really need to check both isConnected and !parentNode?
+ if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CSSPropertyID id = cssPropertyID(attributeName.localName());
</span><span class="lines">@@ -267,8 +267,8 @@
</span><span class="cx">
</span><span class="cx"> static inline void removeCSSPropertyFromTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName)
</span><span class="cx"> {
</span><del>- // FIXME: Do we really need to check both inDocument and !parentNode?
- if (attributeName == anyQName() || !targetElement.inDocument() || !targetElement.parentNode())
</del><ins>+ // FIXME: Do we really need to check both isConnected and !parentNode?
+ if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CSSPropertyID id = cssPropertyID(attributeName.localName());
</span><span class="lines">@@ -289,7 +289,7 @@
</span><span class="cx">
</span><span class="cx"> static inline void notifyTargetAndInstancesAboutAnimValChange(SVGElement& targetElement, const QualifiedName& attributeName)
</span><span class="cx"> {
</span><del>- if (attributeName == anyQName() || !targetElement.inDocument() || !targetElement.parentNode())
</del><ins>+ if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> SVGElement::InstanceUpdateBlocker blocker(targetElement);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -363,7 +363,7 @@
</span><span class="cx">
</span><span class="cx"> void SVGElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><del>- bool wasInDocument = rootParent.inDocument();
</del><ins>+ bool wasInDocument = rootParent.isConnected();
</ins><span class="cx"> if (wasInDocument)
</span><span class="cx"> updateRelativeLengthsInformation(false, this);
</span><span class="cx">
</span><span class="lines">@@ -977,7 +977,7 @@
</span><span class="cx"> // Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
</span><span class="cx"> if (is<RenderSVGResourceContainer>(renderer))
</span><span class="cx"> downcast<RenderSVGResourceContainer>(*renderer).idChanged();
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> buildPendingResourcesIfNeeded();
</span><span class="cx"> invalidateInstances();
</span><span class="cx"> return;
</span><span class="lines">@@ -994,7 +994,7 @@
</span><span class="cx">
</span><span class="cx"> void SVGElement::buildPendingResourcesIfNeeded()
</span><span class="cx"> {
</span><del>- if (!needsPendingResourceHandling() || !inDocument() || isInShadowTree())
</del><ins>+ if (!needsPendingResourceHandling() || !isConnected() || isInShadowTree())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> SVGDocumentExtensions& extensions = document().accessSVGExtensions();
</span><span class="lines">@@ -1067,7 +1067,7 @@
</span><span class="cx"> void SVGElement::updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement* element)
</span><span class="cx"> {
</span><span class="cx"> // If we're not yet in a document, this function will be called again from insertedInto(). Do nothing now.
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // An element wants to notify us that its own relative lengths state changed.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGExternalResourcesRequiredcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> ASSERT(targetElement);
</span><span class="cx"> if (!isKnownAttribute(attrName))
</span><span class="cx"> return false;
</span><del>- if (!targetElement->inDocument())
</del><ins>+ if (!targetElement->isConnected())
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // Handle dynamic updates of the 'externalResourcesRequired' attribute. Only possible case: changing from 'true' to 'false'
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFEImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> void SVGFEImageElement::buildPendingResource()
</span><span class="cx"> {
</span><span class="cx"> clearResourceReferences();
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> String id;
</span><span class="lines">@@ -164,13 +164,13 @@
</span><span class="cx"> void SVGFEImageElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGFilterPrimitiveStandardAttributes::removedFrom(rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> clearResourceReferences();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SVGFEImageElement::notifyFinished(CachedResource&)
</span><span class="cx"> {
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Element* parent = parentElement();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">
</span><span class="cx"> void SVGFontFaceElement::rebuildFontFace()
</span><span class="cx"> {
</span><del>- if (!inDocument()) {
</del><ins>+ if (!isConnected()) {
</ins><span class="cx"> ASSERT(!m_fontElement);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::insertedInto(rootParent);
</span><del>- if (!rootParent.inDocument()) {
</del><ins>+ if (!rootParent.isConnected()) {
</ins><span class="cx"> ASSERT(!m_fontElement);
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx"> {
</span><span class="cx"> SVGElement::removedFrom(rootParent);
</span><span class="cx">
</span><del>- if (rootParent.inDocument()) {
</del><ins>+ if (rootParent.isConnected()) {
</ins><span class="cx"> m_fontElement = nullptr;
</span><span class="cx"> document().accessSVGExtensions().unregisterSVGFontFaceElement(this);
</span><span class="cx"> m_fontFaceRule->mutableProperties().clear();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGImageElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGGraphicsElement::insertedInto(rootParent);
</span><del>- if (!rootParent.inDocument())
</del><ins>+ if (!rootParent.isConnected())
</ins><span class="cx"> return InsertionDone;
</span><span class="cx"> // Update image loader, as soon as we're living in the tree.
</span><span class="cx"> // We can only resolve base URIs properly, after that!
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGMPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGMPathElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGMPathElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGMPathElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> void SVGMPathElement::buildPendingResource()
</span><span class="cx"> {
</span><span class="cx"> clearResourceReferences();
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> String id;
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::insertedInto(rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> return InsertionShouldCallFinishedInsertingSubtree;
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> {
</span><span class="cx"> SVGElement::removedFrom(rootParent);
</span><span class="cx"> notifyParentOfPathChange(&rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> clearResourceReferences();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGSVGElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx"> {
</span><span class="cx"> // The behavior of currentScale() is undefined when we're dealing with non-standalone SVG documents.
</span><span class="cx"> // If the document is embedded, the scaling is handled by the host renderer.
</span><del>- if (!inDocument() || !isOutermostSVGSVGElement())
</del><ins>+ if (!isConnected() || !isOutermostSVGSVGElement())
</ins><span class="cx"> return nullptr;
</span><span class="cx"> Frame* frame = document().frame();
</span><span class="cx"> return frame && frame->isMainFrame() ? frame : nullptr;
</span><span class="lines">@@ -466,7 +466,7 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><del>- if (rootParent.inDocument()) {
</del><ins>+ if (rootParent.isConnected()) {
</ins><span class="cx"> document().accessSVGExtensions().addTimeContainer(this);
</span><span class="cx">
</span><span class="cx"> // Animations are started at the end of document parsing and after firing the load event,
</span><span class="lines">@@ -480,7 +480,7 @@
</span><span class="cx">
</span><span class="cx"> void SVGSVGElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> document().accessSVGExtensions().removeTimeContainer(this);
</span><span class="cx"> SVGGraphicsElement::removedFrom(rootParent);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGScriptElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGScriptElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::insertedInto(rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> SVGExternalResourcesRequired::insertedIntoDocument(this);
</span><span class="cx"> return shouldCallFinishedInsertingSubtree(rootParent) ? InsertionShouldCallFinishedInsertingSubtree : InsertionDone;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGStyleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGStyleElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGStyleElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGStyleElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -115,9 +115,9 @@
</span><span class="cx">
</span><span class="cx"> Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><del>- bool wasInDocument = inDocument();
</del><ins>+ bool wasInDocument = isConnected();
</ins><span class="cx"> auto result = SVGElement::insertedInto(rootParent);
</span><del>- if (rootParent.inDocument() && !wasInDocument)
</del><ins>+ if (rootParent.isConnected() && !wasInDocument)
</ins><span class="cx"> m_styleSheetOwner.insertedIntoDocument(*this);
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> void SVGStyleElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::removedFrom(rootParent);
</span><del>- if (rootParent.inDocument() && !inDocument())
</del><ins>+ if (rootParent.isConnected() && !isConnected())
</ins><span class="cx"> m_styleSheetOwner.removedFromDocument(*this);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTRefElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTRefElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!isAttached());
</span><span class="cx"> ASSERT(target.get());
</span><del>- ASSERT(target->inDocument());
</del><ins>+ ASSERT(target->isConnected());
</ins><span class="cx">
</span><span class="cx"> target->addEventListener(eventNames().DOMSubtreeModifiedEvent, *this, false);
</span><span class="cx"> target->addEventListener(eventNames().DOMNodeRemovedFromDocumentEvent, *this, false);
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx"> if (container)
</span><span class="cx"> container->setTextContent(emptyContent);
</span><span class="cx">
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Mark the referenced ID as pending.
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx"> m_targetListener->detach();
</span><span class="cx">
</span><span class="cx"> // If we're not yet in a document, this function will be called again from insertedInto().
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> String id;
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGTRefElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::insertedInto(rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> return InsertionShouldCallFinishedInsertingSubtree;
</span><span class="cx"> return InsertionDone;
</span><span class="cx"> }
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> void SVGTRefElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::removedFrom(rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> m_targetListener->detach();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTestscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTests.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTests.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGTests.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx"> ASSERT(targetElement);
</span><span class="cx"> if (!isKnownAttribute(attributeName))
</span><span class="cx"> return false;
</span><del>- if (!targetElement->inDocument())
</del><ins>+ if (!targetElement->isConnected())
</ins><span class="cx"> return true;
</span><span class="cx"> targetElement->invalidateStyleAndRenderersForSubtree();
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx"> void SVGTextPathElement::buildPendingResource()
</span><span class="cx"> {
</span><span class="cx"> clearResourceReferences();
</span><del>- if (!inDocument())
</del><ins>+ if (!isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> String id;
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> void SVGTextPathElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGTextContentElement::removedFrom(rootParent);
</span><del>- if (rootParent.inDocument())
</del><ins>+ if (rootParent.isConnected())
</ins><span class="cx"> clearResourceReferences();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTitleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTitleElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTitleElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGTitleElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::insertedInto(rootParent);
</span><del>- if (!rootParent.inDocument())
</del><ins>+ if (!rootParent.isConnected())
</ins><span class="cx"> return InsertionDone;
</span><span class="cx">
</span><span class="cx"> if (firstChild() && document().isSVGDocument())
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> void SVGTitleElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::removedFrom(rootParent);
</span><del>- if (rootParent.inDocument() && document().isSVGDocument())
</del><ins>+ if (rootParent.isConnected() && document().isSVGDocument())
</ins><span class="cx"> document().titleElementRemoved(*this);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGGraphicsElement::insertedInto(rootParent);
</span><del>- if (inDocument()) {
</del><ins>+ if (isConnected()) {
</ins><span class="cx"> SVGExternalResourcesRequired::insertedIntoDocument(this);
</span><span class="cx"> invalidateShadowTree();
</span><span class="cx"> updateExternalDocument();
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx"> // FIXME: It's expensive to re-clone the entire tree every time. We should find a more efficient way to handle this.
</span><span class="cx"> clearShadowTree();
</span><span class="cx">
</span><del>- if (isInShadowTree() || !inDocument())
</del><ins>+ if (isInShadowTree() || !isConnected())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> String targetID;
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx"> // This function is used only on elements in subtrees that are not yet in documents, so
</span><span class="cx"> // mutation events are not a factor; there are no event listeners to handle those events.
</span><span class="cx"> // Assert that it's not in a document to make sure callers are still using it this way.
</span><del>- ASSERT(!subtree.inDocument());
</del><ins>+ ASSERT(!subtree.isConnected());
</ins><span class="cx">
</span><span class="cx"> Vector<Element*> disallowedElements;
</span><span class="cx"> auto descendants = descendantsOfType<Element>(subtree);
</span><span class="lines">@@ -409,7 +409,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> auto& target = downcast<SVGElement>(*targetCandidate);
</span><span class="cx">
</span><del>- if (!target.inDocument() || isDisallowedElement(target))
</del><ins>+ if (!target.isConnected() || isDisallowedElement(target))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> // Reject any target that has already been cloned to create one of the ancestors of this element,
</span><span class="lines">@@ -553,7 +553,7 @@
</span><span class="cx"> void SVGUseElement::updateExternalDocument()
</span><span class="cx"> {
</span><span class="cx"> URL externalDocumentURL;
</span><del>- if (inDocument() && isExternalURIReference(href(), document())) {
</del><ins>+ if (isConnected() && isExternalURIReference(href(), document())) {
</ins><span class="cx"> externalDocumentURL = document().completeURL(href());
</span><span class="cx"> if (!externalDocumentURL.hasFragmentIdentifier())
</span><span class="cx"> externalDocumentURL = URL();
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx"> {
</span><span class="cx"> clearResourceReferences();
</span><span class="cx">
</span><del>- if (!inDocument()) {
</del><ins>+ if (!isConnected()) {
</ins><span class="cx"> // Reset the target element if we are no longer in the document.
</span><span class="cx"> setTargetElement(nullptr);
</span><span class="cx"> return;
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx"> target = SVGURIReference::targetElementFromIRIString(href, document(), &id);
</span><span class="cx"> SVGElement* svgTarget = is<SVGElement>(target) ? downcast<SVGElement>(target) : nullptr;
</span><span class="cx">
</span><del>- if (svgTarget && !svgTarget->inDocument())
</del><ins>+ if (svgTarget && !svgTarget->isConnected())
</ins><span class="cx"> svgTarget = nullptr;
</span><span class="cx">
</span><span class="cx"> if (svgTarget != targetElement())
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx"> Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode& rootParent)
</span><span class="cx"> {
</span><span class="cx"> SVGElement::insertedInto(rootParent);
</span><del>- if (!rootParent.inDocument())
</del><ins>+ if (!rootParent.isConnected())
</ins><span class="cx"> return InsertionDone;
</span><span class="cx">
</span><span class="cx"> // Verify we are not in <use> instance tree.
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx">
</span><span class="cx"> void SVGSMILElement::removedFrom(ContainerNode& rootParent)
</span><span class="cx"> {
</span><del>- if (rootParent.inDocument()) {
</del><ins>+ if (rootParent.isConnected()) {
</ins><span class="cx"> clearResourceReferences();
</span><span class="cx"> disconnectConditions();
</span><span class="cx"> setTargetElement(nullptr);
</span><span class="lines">@@ -481,7 +481,7 @@
</span><span class="cx"> parseBeginOrEnd(attributeWithoutSynchronization(SVGNames::endAttr), End);
</span><span class="cx"> }
</span><span class="cx"> parseBeginOrEnd(value.string(), Begin);
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> connectConditions();
</span><span class="cx"> } else if (name == SVGNames::endAttr) {
</span><span class="cx"> if (!m_conditions.isEmpty()) {
</span><span class="lines">@@ -490,7 +490,7 @@
</span><span class="cx"> parseBeginOrEnd(attributeWithoutSynchronization(SVGNames::beginAttr), Begin);
</span><span class="cx"> }
</span><span class="cx"> parseBeginOrEnd(value.string(), End);
</span><del>- if (inDocument())
</del><ins>+ if (isConnected())
</ins><span class="cx"> connectConditions();
</span><span class="cx"> } else if (name == SVGNames::onendAttr)
</span><span class="cx"> setAttributeEventListener(eventNames().endEventEvent, name, value);
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx"> else if (attrName.matches(XLinkNames::hrefAttr)) {
</span><span class="cx"> InstanceInvalidationGuard guard(*this);
</span><span class="cx"> buildPendingResource();
</span><del>- } else if (inDocument()) {
</del><ins>+ } else if (isConnected()) {
</ins><span class="cx"> if (attrName == SVGNames::beginAttr)
</span><span class="cx"> beginListChanged(elapsed());
</span><span class="cx"> else if (attrName == SVGNames::endAttr)
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXPathNodeSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XPathNodeSet.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XPathNodeSet.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/xml/XPathNodeSet.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (is<Attr>(*node))
</span><span class="cx"> node = downcast<Attr>(*node).ownerElement();
</span><del>- if (node->inDocument())
</del><ins>+ if (node->isConnected())
</ins><span class="cx"> node = &node->document();
</span><span class="cx"> else {
</span><span class="cx"> while (Node* parent = node->parentNode())
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -857,7 +857,7 @@
</span><span class="cx">
</span><span class="cx"> // The element's parent may have already been removed from document.
</span><span class="cx"> // Parsing continues in this case, but scripts aren't executed.
</span><del>- if (!element.inDocument()) {
</del><ins>+ if (!element.isConnected()) {
</ins><span class="cx"> popCurrentNode();
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2017-02-02 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Rename Node::inDocument() to isConnected()
+ https://bugs.webkit.org/show_bug.cgi?id=167743
+
+ Reviewed by Sam Weinig.
+
+ Rename Node::inDocument() to isConnected() to match the DOM specification more closely:
+ - https://dom.spec.whatwg.org/#connected
+
+ * DOM/DOMNode.mm:
+ (-[DOMNode isConnected]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame selectNSRange:onElement:]):
+
+2017-02-02 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=167738
</span><span class="cx"> <rdar://problem/30229990>
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMNodemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMNode.mm (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMNode.mm        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebKit/mac/DOM/DOMNode.mm        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx"> - (BOOL)isConnected
</span><span class="cx"> {
</span><span class="cx"> JSMainThreadNullState state;
</span><del>- return unwrap(*self).inDocument();
</del><ins>+ return unwrap(*self).isConnected();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (DOMElement *)parentElement
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (211590 => 211591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2017-02-02 21:25:19 UTC (rev 211590)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2017-02-02 21:29:15 UTC (rev 211591)
</span><span class="lines">@@ -1594,9 +1594,9 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Node* node = core(element);
</span><del>- if (!node->inDocument())
</del><ins>+ if (!node->isConnected())
</ins><span class="cx"> return;
</span><del>-
</del><ins>+
</ins><span class="cx"> frame->selection().selectRangeOnElement(range.location, range.length, *node);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>