Rename Node::nodeIndex() to computeNodeIndex() for clarity
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Sep 2014 18:28:57 +0000 (18:28 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Sep 2014 18:28:57 +0000 (18:28 +0000)
commit7f666b217fb972c3651290239d2e726f0e95d5d4
tree82d782129365d091f4741e83bf3b1f00e6931ae2
parenta5083b568c9e73b0bb6cd85fcb536e334c9465ac
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.order
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/NodeWithIndex.h
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/Position.h
Source/WebCore/dom/Range.cpp
Source/WebCore/dom/RangeBoundaryPoint.h
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/DeleteSelectionCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/page/DOMSelection.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderTreeAsText.cpp