Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1187)

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index cf875b8f0e4f8aeb181f93d3e46a4910719a36b5..fed03353f55ed4fa03b8f0b67ffc02d2b62934ef 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -167,9 +167,9 @@ int comparePositionsInDOMTree(Node* containerA, int offsetA, Node* containerB, i
return comparePositions<NodeTraversal>(containerA, offsetA, containerB, offsetB, disconnected);
}
-int comparePositionsInComposedTree(Node* containerA, int offsetA, Node* containerB, int offsetB, bool* disconnected)
+int comparePositionsInFlatTree(Node* containerA, int offsetA, Node* containerB, int offsetB, bool* disconnected)
{
- return comparePositions<ComposedTreeTraversal>(containerA, offsetA, containerB, offsetB, disconnected);
+ return comparePositions<FlatTreeTraversal>(containerA, offsetA, containerB, offsetB, disconnected);
}
// Compare two positions, taking into account the possibility that one or both
@@ -240,7 +240,7 @@ ContainerNode* highestEditableRoot(const Position& position, EditableType editab
return highestRoot;
}
-ContainerNode* highestEditableRoot(const PositionInComposedTree& position, EditableType editableType)
+ContainerNode* highestEditableRoot(const PositionInFlatTree& position, EditableType editableType)
{
return highestEditableRoot(toPositionInDOMTree(position), editableType);
}
@@ -263,7 +263,7 @@ bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty
return node->hasEditableStyle(editableType);
}
-bool isEditablePosition(const PositionInComposedTree& p, EditableType editableType, EUpdateStyle updateStyle)
+bool isEditablePosition(const PositionInFlatTree& p, EditableType editableType, EUpdateStyle updateStyle)
{
return isEditablePosition(toPositionInDOMTree(p), editableType, updateStyle);
}
@@ -299,7 +299,7 @@ Element* rootEditableElementOf(const Position& p, EditableType editableType)
return node->rootEditableElement(editableType);
}
-Element* rootEditableElementOf(const PositionInComposedTree& p, EditableType editableType)
+Element* rootEditableElementOf(const PositionInFlatTree& p, EditableType editableType)
{
return rootEditableElementOf(toPositionInDOMTree(p), editableType);
}
@@ -348,9 +348,9 @@ Position nextCandidate(const Position& position)
return nextCandidateAlgorithm<EditingStrategy>(position);
}
-PositionInComposedTree nextCandidate(const PositionInComposedTree& position)
+PositionInFlatTree nextCandidate(const PositionInFlatTree& position)
{
- return nextCandidateAlgorithm<EditingInComposedTreeStrategy>(position);
+ return nextCandidateAlgorithm<EditingInFlatTreeStrategy>(position);
}
// |nextVisuallyDistinctCandidate| is similar to |nextCandidate| except
@@ -383,9 +383,9 @@ Position nextVisuallyDistinctCandidate(const Position& position)
return nextVisuallyDistinctCandidateAlgorithm<EditingStrategy>(position);
}
-PositionInComposedTree nextVisuallyDistinctCandidate(const PositionInComposedTree& position)
+PositionInFlatTree nextVisuallyDistinctCandidate(const PositionInFlatTree& position)
{
- return nextVisuallyDistinctCandidateAlgorithm<EditingInComposedTreeStrategy>(position);
+ return nextVisuallyDistinctCandidateAlgorithm<EditingInFlatTreeStrategy>(position);
}
template <typename Strategy>
@@ -411,9 +411,9 @@ Position previousCandidate(const Position& position)
return previousCandidateAlgorithm<EditingStrategy>(position);
}
-PositionInComposedTree previousCandidate(const PositionInComposedTree& position)
+PositionInFlatTree previousCandidate(const PositionInFlatTree& position)
{
- return previousCandidateAlgorithm<EditingInComposedTreeStrategy>(position);
+ return previousCandidateAlgorithm<EditingInFlatTreeStrategy>(position);
}
// |previousVisuallyDistinctCandidate| is similar to |previousCandidate| except
@@ -446,9 +446,9 @@ Position previousVisuallyDistinctCandidate(const Position& position)
return previousVisuallyDistinctCandidateAlgorithm<EditingStrategy>(position);
}
-PositionInComposedTree previousVisuallyDistinctCandidate(const PositionInComposedTree& position)
+PositionInFlatTree previousVisuallyDistinctCandidate(const PositionInFlatTree& position)
{
- return previousVisuallyDistinctCandidateAlgorithm<EditingInComposedTreeStrategy>(position);
+ return previousVisuallyDistinctCandidateAlgorithm<EditingInFlatTreeStrategy>(position);
}
VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(const Position& position, ContainerNode& highestRoot)
@@ -456,7 +456,7 @@ VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(const Position&
return createVisiblePosition(firstEditablePositionAfterPositionInRoot(position, highestRoot));
}
-VisiblePositionInComposedTree firstEditableVisiblePositionAfterPositionInRoot(const PositionInComposedTree& position, ContainerNode& highestRoot)
+VisiblePositionInFlatTree firstEditableVisiblePositionAfterPositionInRoot(const PositionInFlatTree& position, ContainerNode& highestRoot)
{
return createVisiblePosition(firstEditablePositionAfterPositionInRoot(position, highestRoot));
}
@@ -492,9 +492,9 @@ Position firstEditablePositionAfterPositionInRoot(const Position& position, Node
return firstEditablePositionAfterPositionInRootAlgorithm<EditingStrategy>(position, highestRoot);
}
-PositionInComposedTree firstEditablePositionAfterPositionInRoot(const PositionInComposedTree& position, Node& highestRoot)
+PositionInFlatTree firstEditablePositionAfterPositionInRoot(const PositionInFlatTree& position, Node& highestRoot)
{
- return firstEditablePositionAfterPositionInRootAlgorithm<EditingInComposedTreeStrategy>(position, highestRoot);
+ return firstEditablePositionAfterPositionInRootAlgorithm<EditingInFlatTreeStrategy>(position, highestRoot);
}
VisiblePosition lastEditableVisiblePositionBeforePositionInRoot(const Position& position, ContainerNode& highestRoot)
@@ -502,7 +502,7 @@ VisiblePosition lastEditableVisiblePositionBeforePositionInRoot(const Position&
return createVisiblePosition(lastEditablePositionBeforePositionInRoot(position, highestRoot));
}
-VisiblePositionInComposedTree lastEditableVisiblePositionBeforePositionInRoot(const PositionInComposedTree& position, ContainerNode& highestRoot)
+VisiblePositionInFlatTree lastEditableVisiblePositionBeforePositionInRoot(const PositionInFlatTree& position, ContainerNode& highestRoot)
{
return createVisiblePosition(lastEditablePositionBeforePositionInRoot(position, highestRoot));
}
@@ -537,9 +537,9 @@ Position lastEditablePositionBeforePositionInRoot(const Position& position, Node
return lastEditablePositionBeforePositionInRootAlgorithm<EditingStrategy>(position, highestRoot);
}
-PositionInComposedTree lastEditablePositionBeforePositionInRoot(const PositionInComposedTree& position, Node& highestRoot)
+PositionInFlatTree lastEditablePositionBeforePositionInRoot(const PositionInFlatTree& position, Node& highestRoot)
{
- return lastEditablePositionBeforePositionInRootAlgorithm<EditingInComposedTreeStrategy>(position, highestRoot);
+ return lastEditablePositionBeforePositionInRootAlgorithm<EditingInFlatTreeStrategy>(position, highestRoot);
}
int uncheckedPreviousOffset(const Node* n, int current)
@@ -603,9 +603,9 @@ Position previousPositionOf(const Position& position, PositionMoveType moveType)
return previousPositionOfAlgorithm<EditingStrategy>(position, moveType);
}
-PositionInComposedTree previousPositionOf(const PositionInComposedTree& position, PositionMoveType moveType)
+PositionInFlatTree previousPositionOf(const PositionInFlatTree& position, PositionMoveType moveType)
{
- return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(position, moveType);
+ return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(position, moveType);
}
template <typename Strategy>
@@ -644,9 +644,9 @@ Position nextPositionOf(const Position& position, PositionMoveType moveType)
return nextPositionOfAlgorithm<EditingStrategy>(position, moveType);
}
-PositionInComposedTree nextPositionOf(const PositionInComposedTree& position, PositionMoveType moveType)
+PositionInFlatTree nextPositionOf(const PositionInFlatTree& position, PositionMoveType moveType)
{
- return nextPositionOfAlgorithm<EditingInComposedTreeStrategy>(position, moveType);
+ return nextPositionOfAlgorithm<EditingInFlatTreeStrategy>(position, moveType);
}
bool isEnclosingBlock(const Node* node)
@@ -682,9 +682,9 @@ Element* enclosingBlock(const Position& position, EditingBoundaryCrossingRule ru
return enclosingBlockAlgorithm<EditingStrategy>(position, rule);
}
-Element* enclosingBlock(const PositionInComposedTree& position, EditingBoundaryCrossingRule rule)
+Element* enclosingBlock(const PositionInFlatTree& position, EditingBoundaryCrossingRule rule)
{
- return enclosingBlockAlgorithm<EditingInComposedTreeStrategy>(position, rule);
+ return enclosingBlockAlgorithm<EditingInFlatTreeStrategy>(position, rule);
}
Element* enclosingBlockFlowElement(Node& node)
@@ -725,9 +725,9 @@ TextDirection directionOfEnclosingBlock(const Position& position)
return directionOfEnclosingBlockAlgorithm<EditingStrategy>(position);
}
-TextDirection directionOfEnclosingBlock(const PositionInComposedTree& position)
+TextDirection directionOfEnclosingBlock(const PositionInFlatTree& position)
{
- return directionOfEnclosingBlockAlgorithm<EditingInComposedTreeStrategy>(position);
+ return directionOfEnclosingBlockAlgorithm<EditingInFlatTreeStrategy>(position);
}
TextDirection primaryDirectionOf(const Node& node)
@@ -882,9 +882,9 @@ Element* isFirstPositionAfterTable(const VisiblePosition& visiblePosition)
return isFirstPositionAfterTableAlgorithm<EditingStrategy>(visiblePosition);
}
-Element* isFirstPositionAfterTable(const VisiblePositionInComposedTree& visiblePosition)
+Element* isFirstPositionAfterTable(const VisiblePositionInFlatTree& visiblePosition)
{
- return isFirstPositionAfterTableAlgorithm<EditingInComposedTreeStrategy>(visiblePosition);
+ return isFirstPositionAfterTableAlgorithm<EditingInFlatTreeStrategy>(visiblePosition);
}
Element* isLastPositionBeforeTable(const VisiblePosition& visiblePosition)
@@ -1029,9 +1029,9 @@ Node* enclosingNodeOfType(const Position& p, bool (*nodeIsOfType)(const Node*),
return enclosingNodeOfTypeAlgorithm<EditingStrategy>(p, nodeIsOfType, rule);
}
-Node* enclosingNodeOfType(const PositionInComposedTree& p, bool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule rule)
+Node* enclosingNodeOfType(const PositionInFlatTree& p, bool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule rule)
{
- return enclosingNodeOfTypeAlgorithm<EditingInComposedTreeStrategy>(p, nodeIsOfType, rule);
+ return enclosingNodeOfTypeAlgorithm<EditingInFlatTreeStrategy>(p, nodeIsOfType, rule);
}
Node* highestEnclosingNodeOfType(const Position& p, bool (*nodeIsOfType)(const Node*), EditingBoundaryCrossingRule rule, Node* stayWithin)
@@ -1537,9 +1537,9 @@ EphemeralRange normalizeRange(const EphemeralRange& range)
return normalizeRangeAlgorithm<EditingStrategy>(range);
}
-EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInComposedTree& range)
+EphemeralRangeInFlatTree normalizeRange(const EphemeralRangeInFlatTree& range)
{
- return normalizeRangeAlgorithm<EditingInComposedTreeStrategy>(range);
+ return normalizeRangeAlgorithm<EditingInFlatTreeStrategy>(range);
}
VisiblePosition visiblePositionForIndex(int index, ContainerNode* scope)

Powered by Google App Engine
This is Rietveld 408576698