Rename Node::nodeIndex() to computeNodeIndex() to make it clearer that the node index is actually computed and thus calling this method is potentially expensive.
Created attachment 238132 [details] Patch
Comment on attachment 238132 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238132&action=review I did not check the surrounding code, no need to change the type when the fix is non obvious. > Source/WebCore/dom/Range.cpp:603 > + int nodeIndex = refNode->computeNodeIndex(); int -> unsigned? > Source/WebCore/editing/ApplyStyleCommand.cpp:1294 > + int startOffsetAdjustment = startChild->computeNodeIndex(); ditto? > Source/WebCore/editing/ApplyStyleCommand.cpp:1328 > + int endOffset = nextChild ? nextChild->computeNodeIndex() : nextElement->countChildNodes(); ditto? > Source/WebCore/editing/DeleteSelectionCommand.cpp:563 > + offset = n->computeNodeIndex() + 1; ditto? > Source/WebCore/editing/Editor.cpp:166 > + startOffset = element->computeNodeIndex(); ditto? > Source/WebCore/editing/Editor.cpp:171 > + endOffset = element->computeNodeIndex(); ditto? > Source/WebCore/editing/TextIterator.cpp:1098 > + int index = m_positionOffsetBaseNode->computeNodeIndex(); ditto? > Source/WebCore/html/HTMLTextFormControlElement.cpp:427 > + offsetInContainer = node->computeNodeIndex() + offset; ditto? > Source/WebCore/page/DOMSelection.cpp:367 > + int offset = shadowAncestor->computeNodeIndex(); ditto?
Created attachment 238183 [details] Patch
Comment on attachment 238183 [details] Patch Clearing flags on attachment: 238183 Committed r173665: <http://trac.webkit.org/changeset/173665>
All reviewed patches have been landed. Closing bug.