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

Unified Diff: Source/core/dom/Position.h

Issue 1213483003: Get rid of redundant parameter PositionIsOffsetInAnchor from PositionAlgorithm constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/dom/Position.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Position.h
diff --git a/Source/core/dom/Position.h b/Source/core/dom/Position.h
index cb4e4ad1a7173f4a335c3ebdcf8884fc48cd2547..1a654d1437f9e9cc49020594226862566a8b47ff 100644
--- a/Source/core/dom/Position.h
+++ b/Source/core/dom/Position.h
@@ -93,11 +93,10 @@ public:
// For creating before/after positions:
PositionAlgorithm(PassRefPtrWillBeRawPtr<Node> anchorNode, AnchorType);
- PositionAlgorithm(PassRefPtrWillBeRawPtr<Text> textNode, unsigned offset);
// For creating offset positions:
// FIXME: This constructor should eventually go away. See bug 63040.
- PositionAlgorithm(PassRefPtrWillBeRawPtr<Node> anchorNode, int offset, AnchorType);
+ PositionAlgorithm(PassRefPtrWillBeRawPtr<Node> anchorNode, int offset);
PositionAlgorithm(const PositionAlgorithm&);
@@ -317,7 +316,7 @@ typename Strategy::PositionType PositionAlgorithm<Strategy>::inParentBeforeNode(
// At least one caller currently hits this ASSERT though, which indicates
// that the caller is trying to make a position relative to a disconnected node (which is likely an error)
// Specifically, editing/deleting/delete-ligature-001.html crashes with ASSERT(node->parentNode())
- return PositionType(Strategy::parent(node), Strategy::index(node), PositionIsOffsetInAnchor);
+ return PositionType(Strategy::parent(node), Strategy::index(node));
}
inline Position positionInParentBeforeNode(const Node& node)
@@ -329,7 +328,7 @@ template <typename Strategy>
typename Strategy::PositionType PositionAlgorithm<Strategy>::inParentAfterNode(const Node& node)
{
ASSERT(node.parentNode());
- return PositionType(Strategy::parent(node), Strategy::index(node) + 1, PositionIsOffsetInAnchor);
+ return PositionType(Strategy::parent(node), Strategy::index(node) + 1);
}
inline Position positionInParentAfterNode(const Node& node)
@@ -378,7 +377,7 @@ template <typename Strategy>
typename Strategy::PositionType PositionAlgorithm<Strategy>::firstPositionInNode(Node* anchorNode)
{
if (anchorNode->isTextNode())
- return PositionType(anchorNode, 0, PositionIsOffsetInAnchor);
+ return PositionType(anchorNode, 0);
return PositionType(anchorNode, PositionIsBeforeChildren);
}
@@ -391,7 +390,7 @@ template <typename Strategy>
typename Strategy::PositionType PositionAlgorithm<Strategy>::lastPositionInNode(Node* anchorNode)
{
if (anchorNode->isTextNode())
- return PositionType(anchorNode, lastOffsetInNode(anchorNode), PositionIsOffsetInAnchor);
+ return PositionType(anchorNode, lastOffsetInNode(anchorNode));
return PositionType(anchorNode, PositionIsAfterChildren);
}
« no previous file with comments | « no previous file | Source/core/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698