<!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>[173665] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173665">173665</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-16 11:28:57 -0700 (Tue, 16 Sep 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename Node::nodeIndex() to computeNodeIndex() for clarity
https://bugs.webkit.org/show_bug.cgi?id=136826
Reviewed by Benjamin Poulain.
Rename Node::nodeIndex() to computeNodeIndex() to make it clear that
index is being computed and that calling this method is potentially
expensive.
No new tests, no behavior change.
* WebCore.exp.in:
* WebCore.order:
Rename exported symbol for Node::nodeIndex() as well.
* dom/Document.cpp:
(WebCore::Document::caretRangeFromPoint):
* dom/Node.cpp:
(WebCore::Node::computeNodeIndex):
(WebCore::Node::nodeIndex): Deleted.
* dom/Node.h:
* dom/NodeWithIndex.h:
(WebCore::NodeWithIndex::index):
Clean up implementation to reduce the scope of the Node variable and
to follow coding style (variable naming, spacing, star placement).
* dom/Position.cpp:
(WebCore::Position::computeOffsetInContainerNode):
(WebCore::Position::previous):
(WebCore::Position::next):
(WebCore::Position::upstream):
(WebCore::Position::downstream):
* dom/Position.h:
(WebCore::positionInParentBeforeNode):
(WebCore::positionInParentAfterNode):
* dom/Range.cpp:
(WebCore::Range::compareNode):
(WebCore::Range::intersectsNode):
(WebCore::Range::processContents):
(WebCore::Range::insertNode):
(WebCore::Range::setStartAfter):
(WebCore::Range::setEndBefore):
(WebCore::Range::setEndAfter):
(WebCore::Range::setStartBefore):
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::ensureOffsetIsValid):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
* editing/Editor.cpp:
(WebCore::Editor::avoidIntersectionWithDeleteButtonController):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
* editing/TextIterator.cpp:
(WebCore::TextIterator::range):
(WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
(WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
* editing/htmlediting.cpp:
(WebCore::updatePositionForNodeRemoval):
* html/HTMLTextFormControlElement.cpp:
(WebCore::setContainerAndOffsetForRange):
* page/DOMSelection.cpp:
(WebCore::DOMSelection::getRangeAt):
(WebCore::DOMSelection::containsNode):
(WebCore::DOMSelection::shadowAdjustedOffset):
* rendering/RenderBlock.cpp:
(WebCore::positionForPointRespectingEditingBoundaries):
* rendering/RenderTreeAsText.cpp:
(WebCore::nodePosition):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCoreorder">trunk/Source/WebCore/WebCore.order</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoredomNodeWithIndexh">trunk/Source/WebCore/dom/NodeWithIndex.h</a></li>
<li><a href="#trunkSourceWebCoredomPositioncpp">trunk/Source/WebCore/dom/Position.cpp</a></li>
<li><a href="#trunkSourceWebCoredomPositionh">trunk/Source/WebCore/dom/Position.h</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRangeBoundaryPointh">trunk/Source/WebCore/dom/RangeBoundaryPoint.h</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.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="#trunkSourceWebCoreeditingReplaceSelectionCommandcpp">trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorcpp">trunk/Source/WebCore/editing/TextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditinghtmleditingcpp">trunk/Source/WebCore/editing/htmlediting.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementcpp">trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMSelectioncpp">trunk/Source/WebCore/page/DOMSelection.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTreeAsTextcpp">trunk/Source/WebCore/rendering/RenderTreeAsText.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/ChangeLog        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2014-09-16 Chris Dumez <cdumez@apple.com>
+
+ Rename Node::nodeIndex() to computeNodeIndex() for clarity
+ https://bugs.webkit.org/show_bug.cgi?id=136826
+
+ Reviewed by Benjamin Poulain.
+
+ Rename Node::nodeIndex() to computeNodeIndex() to make it clear that
+ index is being computed and that calling this method is potentially
+ expensive.
+
+ No new tests, no behavior change.
+
+ * WebCore.exp.in:
+ * WebCore.order:
+ Rename exported symbol for Node::nodeIndex() as well.
+
+ * dom/Document.cpp:
+ (WebCore::Document::caretRangeFromPoint):
+ * dom/Node.cpp:
+ (WebCore::Node::computeNodeIndex):
+ (WebCore::Node::nodeIndex): Deleted.
+ * dom/Node.h:
+ * dom/NodeWithIndex.h:
+ (WebCore::NodeWithIndex::index):
+ Clean up implementation to reduce the scope of the Node variable and
+ to follow coding style (variable naming, spacing, star placement).
+
+ * dom/Position.cpp:
+ (WebCore::Position::computeOffsetInContainerNode):
+ (WebCore::Position::previous):
+ (WebCore::Position::next):
+ (WebCore::Position::upstream):
+ (WebCore::Position::downstream):
+ * dom/Position.h:
+ (WebCore::positionInParentBeforeNode):
+ (WebCore::positionInParentAfterNode):
+ * dom/Range.cpp:
+ (WebCore::Range::compareNode):
+ (WebCore::Range::intersectsNode):
+ (WebCore::Range::processContents):
+ (WebCore::Range::insertNode):
+ (WebCore::Range::setStartAfter):
+ (WebCore::Range::setEndBefore):
+ (WebCore::Range::setEndAfter):
+ (WebCore::Range::setStartBefore):
+ * dom/RangeBoundaryPoint.h:
+ (WebCore::RangeBoundaryPoint::ensureOffsetIsValid):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
+ (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::handleGeneralDelete):
+ * editing/Editor.cpp:
+ (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
+ * editing/FrameSelection.cpp:
+ (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::doApply):
+ * editing/TextIterator.cpp:
+ (WebCore::TextIterator::range):
+ (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
+ (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
+ * editing/htmlediting.cpp:
+ (WebCore::updatePositionForNodeRemoval):
+ * html/HTMLTextFormControlElement.cpp:
+ (WebCore::setContainerAndOffsetForRange):
+ * page/DOMSelection.cpp:
+ (WebCore::DOMSelection::getRangeAt):
+ (WebCore::DOMSelection::containsNode):
+ (WebCore::DOMSelection::shadowAdjustedOffset):
+ * rendering/RenderBlock.cpp:
+ (WebCore::positionForPointRespectingEditingBoundaries):
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::nodePosition):
+
</ins><span class="cx"> 2014-09-16 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> Videos with controls enabled never receive 'dragstart' events.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1887,8 +1887,8 @@
</span><span class="cx"> __ZNK7WebCore4Node11textContentEb
</span><span class="cx"> __ZNK7WebCore4Node13ownerDocumentEv
</span><span class="cx"> __ZNK7WebCore4Node14isDescendantOfEPKS0_
</span><ins>+__ZNK7WebCore4Node16computeNodeIndexEv
</ins><span class="cx"> __ZNK7WebCore4Node28deprecatedShadowAncestorNodeEv
</span><del>-__ZNK7WebCore4Node9nodeIndexEv
</del><span class="cx"> __ZNK7WebCore4Node9textRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEE
</span><span class="cx"> __ZNK7WebCore4Page10pluginDataEv
</span><span class="cx"> __ZNK7WebCore4Page14renderTreeSizeEv
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreorder"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.order (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.order        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/WebCore.order        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -8131,7 +8131,7 @@
</span><span class="cx"> __ZN3WTF9HashTableIPN7WebCore5RangeES3_NS_17IdentityExtractorENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES8_E6rehashEi
</span><span class="cx"> __ZN7WebCore5Range10selectNodeEPNS_4NodeERi
</span><span class="cx"> __ZN7WebCore5Range14setStartBeforeEPNS_4NodeERi
</span><del>-__ZNK7WebCore4Node9nodeIndexEv
</del><ins>+__ZNK7WebCore4Node16computeNodeIndexEv
</ins><span class="cx"> __ZN7WebCore5Range8setStartEN3WTF10PassRefPtrINS_4NodeEEEiRi
</span><span class="cx"> __ZNK7WebCore13ContainerNode9childNodeEj
</span><span class="cx"> __ZN7WebCoreL30checkForDifferentRootContainerERKNS_18RangeBoundaryPointES2_
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1396,7 +1396,7 @@
</span><span class="cx">
</span><span class="cx"> Node* shadowAncestorNode = ancestorInThisScope(node);
</span><span class="cx"> if (shadowAncestorNode != node) {
</span><del>- unsigned offset = shadowAncestorNode->nodeIndex();
</del><ins>+ unsigned offset = shadowAncestorNode->computeNodeIndex();
</ins><span class="cx"> ContainerNode* container = shadowAncestorNode->parentNode();
</span><span class="cx"> return Range::create(*this, container, offset, container, offset);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/Node.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -691,12 +691,11 @@
</span><span class="cx"> markAncestorsWithChildNeedsStyleRecalc(*this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned Node::nodeIndex() const
</del><ins>+unsigned Node::computeNodeIndex() const
</ins><span class="cx"> {
</span><del>- Node *_tempNode = previousSibling();
- unsigned count=0;
- for ( count=0; _tempNode; count++ )
- _tempNode = _tempNode->previousSibling();
</del><ins>+ unsigned count = 0;
+ for (Node* sibling = previousSibling(); sibling; sibling = sibling->previousSibling())
+ ++count;
</ins><span class="cx"> return count;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/Node.h        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> WEBCORE_EXPORT LayoutRect renderRect(bool* isReplaced);
</span><span class="cx"> IntRect pixelSnappedRenderRect(bool* isReplaced) { return snappedIntRect(renderRect(isReplaced)); }
</span><span class="cx">
</span><del>- WEBCORE_EXPORT unsigned nodeIndex() const;
</del><ins>+ WEBCORE_EXPORT unsigned computeNodeIndex() const;
</ins><span class="cx">
</span><span class="cx"> // Returns the DOM ownerDocument attribute. This method never returns null, except in the case
</span><span class="cx"> // of a Document node.
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeWithIndexh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeWithIndex.h (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeWithIndex.h        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/NodeWithIndex.h        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -46,10 +46,10 @@
</span><span class="cx"> int index() const
</span><span class="cx"> {
</span><span class="cx"> if (!m_haveIndex) {
</span><del>- m_index = m_node->nodeIndex();
</del><ins>+ m_index = m_node->computeNodeIndex();
</ins><span class="cx"> m_haveIndex = true;
</span><span class="cx"> }
</span><del>- ASSERT(m_index == static_cast<int>(m_node->nodeIndex()));
</del><ins>+ ASSERT(m_index == static_cast<int>(m_node->computeNodeIndex()));
</ins><span class="cx"> return m_index;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/Position.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -196,9 +196,9 @@
</span><span class="cx"> case PositionIsOffsetInAnchor:
</span><span class="cx"> return minOffsetForNode(m_anchorNode.get(), m_offset);
</span><span class="cx"> case PositionIsBeforeAnchor:
</span><del>- return m_anchorNode->nodeIndex();
</del><ins>+ return m_anchorNode->computeNodeIndex();
</ins><span class="cx"> case PositionIsAfterAnchor:
</span><del>- return m_anchorNode->nodeIndex() + 1;
</del><ins>+ return m_anchorNode->computeNodeIndex() + 1;
</ins><span class="cx"> }
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx"> if (!parent)
</span><span class="cx"> return *this;
</span><span class="cx">
</span><del>- return createLegacyEditingPosition(parent, n->nodeIndex());
</del><ins>+ return createLegacyEditingPosition(parent, n->computeNodeIndex());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Position Position::next(PositionMoveType moveType) const
</span><span class="lines">@@ -362,7 +362,7 @@
</span><span class="cx"> if (!parent)
</span><span class="cx"> return *this;
</span><span class="cx">
</span><del>- return createLegacyEditingPosition(parent, n->nodeIndex() + 1);
</del><ins>+ return createLegacyEditingPosition(parent, n->computeNodeIndex() + 1);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int Position::uncheckedPreviousOffset(const Node* n, int current)
</span><span class="lines">@@ -614,7 +614,7 @@
</span><span class="cx"> lastVisible = currentPos;
</span><span class="cx">
</span><span class="cx"> // Don't move past a position that is visually distinct. We could rely on code above to terminate and
</span><del>- // return lastVisible on the next iteration, but we terminate early to avoid doing a nodeIndex() call.
</del><ins>+ // return lastVisible on the next iteration, but we terminate early to avoid doing a computeNodeIndex() call.
</ins><span class="cx"> if (endsOfNodeAreVisuallyDistinctPositions(currentNode) && currentPos.atStartOfNode())
</span><span class="cx"> return lastVisible;
</span><span class="cx">
</span><span class="lines">@@ -732,7 +732,7 @@
</span><span class="cx"> return lastVisible;
</span><span class="cx"> // Do not move past a visually disinct position.
</span><span class="cx"> // Note: The first position after the last in a node whose ends are visually distinct
</span><del>- // positions will be [boundary->parentNode(), originalBlock->nodeIndex() + 1].
</del><ins>+ // positions will be [boundary->parentNode(), originalBlock->computeNodeIndex() + 1].
</ins><span class="cx"> if (boundary && boundary->parentNode() == currentNode)
</span><span class="cx"> return lastVisible;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.h (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.h        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/Position.h        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> void clear() { m_anchorNode.clear(); m_offset = 0; m_anchorType = PositionIsOffsetInAnchor; m_isLegacyEditingPosition = false; }
</span><span class="cx">
</span><span class="cx"> // These are always DOM compliant values. Editing positions like [img, 0] (aka [img, before])
</span><del>- // will return img->parentNode() and img->nodeIndex() from these functions.
</del><ins>+ // will return img->parentNode() and img->computeNodeIndex() from these functions.
</ins><span class="cx"> WEBCORE_EXPORT Node* containerNode() const; // null for a before/after position anchored to a node with no parent
</span><span class="cx"> Text* containerText() const;
</span><span class="cx">
</span><span class="lines">@@ -273,13 +273,13 @@
</span><span class="cx"> inline Position positionInParentBeforeNode(const Node* node)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(node->parentNode());
</span><del>- return Position(node->parentNode(), node->nodeIndex(), Position::PositionIsOffsetInAnchor);
</del><ins>+ return Position(node->parentNode(), node->computeNodeIndex(), Position::PositionIsOffsetInAnchor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline Position positionInParentAfterNode(const Node* node)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(node->parentNode());
</span><del>- return Position(node->parentNode(), node->nodeIndex() + 1, Position::PositionIsOffsetInAnchor);
</del><ins>+ return Position(node->parentNode(), node->computeNodeIndex() + 1, Position::PositionIsOffsetInAnchor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // positionBeforeNode and positionAfterNode return neighbor-anchored positions, construction is O(1)
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/Range.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ContainerNode* parentNode = refNode->parentNode();
</span><del>- int nodeIndex = refNode->nodeIndex();
</del><ins>+ unsigned nodeIndex = refNode->computeNodeIndex();
</ins><span class="cx">
</span><span class="cx"> if (!parentNode) {
</span><span class="cx"> // if the node is the top document we should return NODE_BEFORE_AND_AFTER
</span><span class="lines">@@ -600,7 +600,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ContainerNode* parentNode = refNode->parentNode();
</span><del>- int nodeIndex = refNode->nodeIndex();
</del><ins>+ unsigned nodeIndex = refNode->computeNodeIndex();
</ins><span class="cx">
</span><span class="cx"> if (!parentNode) {
</span><span class="cx"> // if the node is the top document we should return NODE_BEFORE_AND_AFTER
</span><span class="lines">@@ -751,9 +751,9 @@
</span><span class="cx"> // Collapse the range, making sure that the result is not within a node that was partially selected.
</span><span class="cx"> if (action == Extract || action == Delete) {
</span><span class="cx"> if (partialStart && commonRoot->contains(partialStart.get()))
</span><del>- setStart(partialStart->parentNode(), partialStart->nodeIndex() + 1, ec);
</del><ins>+ setStart(partialStart->parentNode(), partialStart->computeNodeIndex() + 1, ec);
</ins><span class="cx"> else if (partialEnd && commonRoot->contains(partialEnd.get()))
</span><del>- setStart(partialEnd->parentNode(), partialEnd->nodeIndex(), ec);
</del><ins>+ setStart(partialEnd->parentNode(), partialEnd->computeNodeIndex(), ec);
</ins><span class="cx"> if (ec)
</span><span class="cx"> return 0;
</span><span class="cx"> m_end = m_start;
</span><span class="lines">@@ -1065,7 +1065,7 @@
</span><span class="cx"> if (firstInsertedChild->parentNode() == container)
</span><span class="cx"> m_start.setToBeforeChild(firstInsertedChild.get());
</span><span class="cx"> if (lastInsertedChild->parentNode() == container)
</span><del>- m_end.set(container, lastInsertedChild->nodeIndex() + 1, lastInsertedChild.get());
</del><ins>+ m_end.set(container, lastInsertedChild->computeNodeIndex() + 1, lastInsertedChild.get());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1257,7 +1257,7 @@
</span><span class="cx"> if (ec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- setStart(refNode->parentNode(), refNode->nodeIndex() + 1, ec);
</del><ins>+ setStart(refNode->parentNode(), refNode->computeNodeIndex() + 1, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Range::setEndBefore(Node* refNode, ExceptionCode& ec)
</span><span class="lines">@@ -1277,7 +1277,7 @@
</span><span class="cx"> if (ec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- setEnd(refNode->parentNode(), refNode->nodeIndex(), ec);
</del><ins>+ setEnd(refNode->parentNode(), refNode->computeNodeIndex(), ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Range::setEndAfter(Node* refNode, ExceptionCode& ec)
</span><span class="lines">@@ -1297,7 +1297,7 @@
</span><span class="cx"> if (ec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- setEnd(refNode->parentNode(), refNode->nodeIndex() + 1, ec);
</del><ins>+ setEnd(refNode->parentNode(), refNode->computeNodeIndex() + 1, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Range::selectNode(Node* refNode, ExceptionCode& ec)
</span><span class="lines">@@ -1517,7 +1517,7 @@
</span><span class="cx"> if (ec)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- setStart(refNode->parentNode(), refNode->nodeIndex(), ec);
</del><ins>+ setStart(refNode->parentNode(), refNode->computeNodeIndex(), ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Range::checkDeleteExtract(ExceptionCode& ec)
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangeBoundaryPointh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/RangeBoundaryPoint.h (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/RangeBoundaryPoint.h        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/dom/RangeBoundaryPoint.h        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ASSERT(m_childBeforeBoundary);
</span><del>- m_offsetInContainer = m_childBeforeBoundary->nodeIndex() + 1;
</del><ins>+ m_offsetInContainer = m_childBeforeBoundary->computeNodeIndex() + 1;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline const Position RangeBoundaryPoint::toPosition() const
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1291,8 +1291,8 @@
</span><span class="cx"> ASSERT(startChild);
</span><span class="cx"> mergeIdenticalElements(previousElement, element);
</span><span class="cx">
</span><del>- int startOffsetAdjustment = startChild->nodeIndex();
- int endOffsetAdjustment = startNode == end.deprecatedNode() ? startOffsetAdjustment : 0;
</del><ins>+ unsigned startOffsetAdjustment = startChild->computeNodeIndex();
+ unsigned endOffsetAdjustment = startNode == end.deprecatedNode() ? startOffsetAdjustment : 0;
</ins><span class="cx"> updateStartEnd(Position(startNode, startOffsetAdjustment, Position::PositionIsOffsetInAnchor),
</span><span class="cx"> Position(end.deprecatedNode(), end.deprecatedEditingOffset() + endOffsetAdjustment, Position::PositionIsOffsetInAnchor));
</span><span class="cx"> return true;
</span><span class="lines">@@ -1325,7 +1325,7 @@
</span><span class="cx"> mergeIdenticalElements(element, nextElement);
</span><span class="cx">
</span><span class="cx"> bool shouldUpdateStart = start.containerNode() == endNode;
</span><del>- int endOffset = nextChild ? nextChild->nodeIndex() : nextElement->countChildNodes();
</del><ins>+ unsigned endOffset = nextChild ? nextChild->computeNodeIndex() : nextElement->countChildNodes();
</ins><span class="cx"> updateStartEnd(shouldUpdateStart ? Position(nextElement, start.offsetInContainerNode(), Position::PositionIsOffsetInAnchor) : start,
</span><span class="cx"> Position(nextElement, endOffset, Position::PositionIsOffsetInAnchor));
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingDeleteSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -554,13 +554,13 @@
</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><span class="cx"> } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart.anchorNode()->inDocument())) {
</span><del>- int offset = 0;
</del><ins>+ unsigned offset = 0;
</ins><span class="cx"> if (m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode())) {
</span><span class="cx"> Node* n = m_upstreamStart.deprecatedNode();
</span><span class="cx"> while (n && n->parentNode() != m_downstreamEnd.deprecatedNode())
</span><span class="cx"> n = n->parentNode();
</span><span class="cx"> if (n)
</span><del>- offset = n->nodeIndex() + 1;
</del><ins>+ offset = n->computeNodeIndex() + 1;
</ins><span class="cx"> }
</span><span class="cx"> removeChildrenInRange(m_downstreamEnd.deprecatedNode(), offset, m_downstreamEnd.deprecatedEditingOffset());
</span><span class="cx"> m_downstreamEnd = createLegacyEditingPosition(m_downstreamEnd.deprecatedNode(), offset);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/Editor.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -163,12 +163,12 @@
</span><span class="cx"> if (startContainer == element || startContainer->isDescendantOf(element)) {
</span><span class="cx"> ASSERT(element->parentNode());
</span><span class="cx"> startContainer = element->parentNode();
</span><del>- startOffset = element->nodeIndex();
</del><ins>+ startOffset = element->computeNodeIndex();
</ins><span class="cx"> }
</span><span class="cx"> if (endContainer == element || endContainer->isDescendantOf(element)) {
</span><span class="cx"> ASSERT(element->parentNode());
</span><span class="cx"> endContainer = element->parentNode();
</span><del>- endOffset = element->nodeIndex();
</del><ins>+ endOffset = element->computeNodeIndex();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return Range::create(range->ownerDocument(), startContainer, startOffset, endContainer, endOffset);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1654,7 +1654,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Create compute positions before and after the element.
</span><del>- unsigned ownerElementNodeIndex = ownerElement->nodeIndex();
</del><ins>+ unsigned ownerElementNodeIndex = ownerElement->computeNodeIndex();
</ins><span class="cx"> VisiblePosition beforeOwnerElement(VisiblePosition(Position(ownerElementParent, ownerElementNodeIndex, Position::PositionIsOffsetInAnchor)));
</span><span class="cx"> VisiblePosition afterOwnerElement(VisiblePosition(Position(ownerElementParent, ownerElementNodeIndex + 1, Position::PositionIsOffsetInAnchor), VP_UPSTREAM_IF_POSSIBLE));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingReplaceSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1140,7 +1140,7 @@
</span><span class="cx">
</span><span class="cx"> // We inserted before the insertionBlock to prevent nesting, and the content before the insertionBlock wasn't in its own block and
</span><span class="cx"> // didn't have a br after it, so the inserted content ended up in the same paragraph.
</span><del>- if (insertionBlock && insertionPos.deprecatedNode() == insertionBlock->parentNode() && (unsigned)insertionPos.deprecatedEditingOffset() < insertionBlock->nodeIndex() && !isStartOfParagraph(startOfInsertedContent))
</del><ins>+ if (insertionBlock && insertionPos.deprecatedNode() == insertionBlock->parentNode() && (unsigned)insertionPos.deprecatedEditingOffset() < insertionBlock->computeNodeIndex() && !isStartOfParagraph(startOfInsertedContent))
</ins><span class="cx"> insertNodeAt(createBreakElement(document()), startOfInsertedContent.deepEquivalent());
</span><span class="cx">
</span><span class="cx"> if (endBR && (plainTextFragment || shouldRemoveEndBR(endBR.get(), originalVisPosBeforeEndBR))) {
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/TextIterator.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -1095,7 +1095,7 @@
</span><span class="cx">
</span><span class="cx"> // use the current run information, if we have it
</span><span class="cx"> if (m_positionOffsetBaseNode) {
</span><del>- int index = m_positionOffsetBaseNode->nodeIndex();
</del><ins>+ unsigned index = m_positionOffsetBaseNode->computeNodeIndex();
</ins><span class="cx"> m_positionStartOffset += index;
</span><span class="cx"> m_positionEndOffset += index;
</span><span class="cx"> m_positionOffsetBaseNode = nullptr;
</span><span class="lines">@@ -1327,7 +1327,7 @@
</span><span class="cx">
</span><span class="cx"> bool SimplifiedBackwardsTextIterator::handleReplacedElement()
</span><span class="cx"> {
</span><del>- unsigned index = m_node->nodeIndex();
</del><ins>+ unsigned index = m_node->computeNodeIndex();
</ins><span class="cx"> // We want replaced elements to behave like punctuation for boundary
</span><span class="cx"> // finding, and to simply take up space for the selection preservation
</span><span class="cx"> // code in moveParagraphs, so we use a comma. Unconditionally emit
</span><span class="lines">@@ -1341,7 +1341,7 @@
</span><span class="cx"> // We can use a linefeed in place of a tab because this simple iterator is only used to
</span><span class="cx"> // find boundaries, not actual content. A linefeed breaks words, sentences, and paragraphs.
</span><span class="cx"> if (shouldEmitNewlineForNode(m_node, m_behavior & TextIteratorEmitsOriginalText) || shouldEmitNewlineAfterNode(*m_node) || shouldEmitTabBeforeNode(*m_node)) {
</span><del>- unsigned index = m_node->nodeIndex();
</del><ins>+ unsigned index = m_node->computeNodeIndex();
</ins><span class="cx"> // The start of this emitted range is wrong. Ensuring correctness would require
</span><span class="cx"> // VisiblePositions and so would be slow. previousBoundary expects this.
</span><span class="cx"> emitCharacter('\n', *m_node->parentNode(), index + 1, index + 1);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditinghtmleditingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/htmlediting.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/htmlediting.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/editing/htmlediting.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -997,7 +997,7 @@
</span><span class="cx"> position = positionInParentBeforeNode(node);
</span><span class="cx"> break;
</span><span class="cx"> case Position::PositionIsOffsetInAnchor:
</span><del>- if (position.containerNode() == node->parentNode() && static_cast<unsigned>(position.offsetInContainerNode()) > node->nodeIndex())
</del><ins>+ if (position.containerNode() == node->parentNode() && static_cast<unsigned>(position.offsetInContainerNode()) > node->computeNodeIndex())
</ins><span class="cx"> position.moveToOffset(position.offsetInContainerNode() - 1);
</span><span class="cx"> else if (node->containsIncludingShadowDOM(position.containerNode()))
</span><span class="cx"> position = positionInParentBeforeNode(node);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -424,7 +424,7 @@
</span><span class="cx"> offsetInContainer = offset;
</span><span class="cx"> } else {
</span><span class="cx"> containerNode = node->parentNode();
</span><del>- offsetInContainer = node->nodeIndex() + offset;
</del><ins>+ offsetInContainer = node->computeNodeIndex() + offset;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMSelection.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMSelection.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/page/DOMSelection.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx">
</span><span class="cx"> if (Node* shadowAncestor = selectionShadowAncestor(m_frame)) {
</span><span class="cx"> ContainerNode* container = shadowAncestor->parentNodeGuaranteedHostFree();
</span><del>- int offset = shadowAncestor->nodeIndex();
</del><ins>+ unsigned offset = shadowAncestor->computeNodeIndex();
</ins><span class="cx"> return Range::create(shadowAncestor->document(), container, offset, container, offset);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> ContainerNode* parentNode = node->parentNode();
</span><span class="cx"> if (!parentNode || !parentNode->inDocument())
</span><span class="cx"> return false;
</span><del>- unsigned nodeIndex = node->nodeIndex();
</del><ins>+ unsigned nodeIndex = node->computeNodeIndex();
</ins><span class="cx">
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> bool nodeFullySelected = Range::compareBoundaryPoints(parentNode, nodeIndex, selectedRange->startContainer(), selectedRange->startOffset(), ec) >= 0 && !ec
</span><span class="lines">@@ -523,7 +523,7 @@
</span><span class="cx"> if (containerNode == adjustedNode)
</span><span class="cx"> return position.computeOffsetInContainerNode();
</span><span class="cx">
</span><del>- return adjustedNode->nodeIndex();
</del><ins>+ return adjustedNode->computeNodeIndex();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool DOMSelection::isValidForPosition(Node* node) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -2660,8 +2660,8 @@
</span><span class="cx"> LayoutUnit childMiddle = parent.logicalWidthForChild(child) / 2;
</span><span class="cx"> LayoutUnit logicalLeft = parent.isHorizontalWritingMode() ? pointInChildCoordinates.x() : pointInChildCoordinates.y();
</span><span class="cx"> if (logicalLeft < childMiddle)
</span><del>- return ancestor->createVisiblePosition(childElement->nodeIndex(), DOWNSTREAM);
- return ancestor->createVisiblePosition(childElement->nodeIndex() + 1, UPSTREAM);
</del><ins>+ return ancestor->createVisiblePosition(childElement->computeNodeIndex(), DOWNSTREAM);
+ return ancestor->createVisiblePosition(childElement->computeNodeIndex() + 1, UPSTREAM);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> VisiblePosition RenderBlock::positionForPointWithInlineChildren(const LayoutPoint&, const RenderRegion*)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (173664 => 173665)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp        2014-09-16 18:09:21 UTC (rev 173664)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp        2014-09-16 18:28:57 UTC (rev 173665)
</span><span class="lines">@@ -828,7 +828,7 @@
</span><span class="cx"> result.append('}');
</span><span class="cx"> } else {
</span><span class="cx"> result.appendLiteral("child ");
</span><del>- result.appendNumber(n->nodeIndex());
</del><ins>+ result.appendNumber(n->computeNodeIndex());
</ins><span class="cx"> result.appendLiteral(" {");
</span><span class="cx"> result.append(getTagName(n));
</span><span class="cx"> result.append('}');
</span></span></pre>
</div>
</div>
</body>
</html>