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

Unified Diff: Source/core/editing/Position.cpp

Issue 1286993006: Introduce isRenderedCharacter(Position) function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T12:39:43 Created 5 years, 4 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 | « Source/core/editing/Position.h ('k') | Source/core/editing/commands/DeleteSelectionCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Position.cpp
diff --git a/Source/core/editing/Position.cpp b/Source/core/editing/Position.cpp
index 628f860b52088250966294c189071fd4991e3802..83a9796e9dfba13369fbce0f6b6a592bd2fdcb3a 100644
--- a/Source/core/editing/Position.cpp
+++ b/Source/core/editing/Position.cpp
@@ -939,20 +939,19 @@ bool PositionAlgorithm<Strategy>::inRenderedText() const
return false;
}
-template <typename Strategy>
-bool PositionAlgorithm<Strategy>::isRenderedCharacter() const
+bool isRenderedCharacter(const Position& position)
{
- if (isNull())
+ if (position.isNull())
return false;
- ASSERT(isOffsetInAnchor());
- if (!anchorNode()->isTextNode())
+ ASSERT(position.isOffsetInAnchor());
+ if (!position.anchorNode()->isTextNode())
return false;
- LayoutObject* layoutObject = anchorNode()->layoutObject();
+ LayoutObject* layoutObject = position.anchorNode()->layoutObject();
if (!layoutObject)
return false;
- return toLayoutText(layoutObject)->isRenderedCharacter(offsetInContainerNode());
+ return toLayoutText(layoutObject)->isRenderedCharacter(position.offsetInContainerNode());
}
template <typename Strategy>
« no previous file with comments | « Source/core/editing/Position.h ('k') | Source/core/editing/commands/DeleteSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698