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

Unified Diff: third_party/WebKit/Source/core/editing/Position.h

Issue 1994043002: Get rid of a redundant function alias lastPositionInNode() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-05-19T14:50:30 Created 4 years, 7 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 | third_party/WebKit/Source/core/editing/SurroundingText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Position.h
diff --git a/third_party/WebKit/Source/core/editing/Position.h b/third_party/WebKit/Source/core/editing/Position.h
index 36b043d240894940f985ba1da866fa4b75588981..e0f3cbfb5afde9db847e62f217753fcd84281d3b 100644
--- a/third_party/WebKit/Source/core/editing/Position.h
+++ b/third_party/WebKit/Source/core/editing/Position.h
@@ -284,7 +284,6 @@ int PositionTemplate<Strategy>::lastOffsetInNode(Node* node)
return node->offsetInCharacters() ? node->maxCharacterOffset() : static_cast<int>(Strategy::countChildren(*node));
}
-// firstPositionInNode and lastPositionInNode return parent-anchored positions, lastPositionInNode construction is O(n) due to countChildren()
template <typename Strategy>
PositionTemplate<Strategy> PositionTemplate<Strategy>::firstPositionInNode(Node* anchorNode)
{
@@ -301,11 +300,6 @@ PositionTemplate<Strategy> PositionTemplate<Strategy>::lastPositionInNode(Node*
return PositionTemplate<Strategy>(anchorNode, PositionAnchorType::AfterChildren);
}
-inline Position lastPositionInNode(Node* anchorNode)
-{
- return Position::lastPositionInNode(anchorNode);
-}
-
template <typename Strategy>
int PositionTemplate<Strategy>::minOffsetForNode(Node* anchorNode, int offset)
{
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SurroundingText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698