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

Unified Diff: Source/core/editing/VisibleSelection.h

Issue 1314433011: Introduce visiblePositionOf() for Position and PositionInComposedTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-31T16:32:26 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
Index: Source/core/editing/VisibleSelection.h
diff --git a/Source/core/editing/VisibleSelection.h b/Source/core/editing/VisibleSelection.h
index b1a470c28b3dd1bc69aa2c81f15e1f65df26d217..0b4db45b9fbc0145beadc8535fd6aada9f8b2ca7 100644
--- a/Source/core/editing/VisibleSelection.h
+++ b/Source/core/editing/VisibleSelection.h
@@ -82,11 +82,11 @@ public:
static SelectionType selectionType(const VisibleSelection& selection) { return selection.selectionTypeInComposedTree(); }
static VisiblePosition selectionVisibleStart(const VisibleSelection& selection)
{
- return VisiblePosition(selectionStart(selection), isRange(selection) ? TextAffinity::Downstream : selection.affinity());
+ return visiblePositionOf(selectionStart(selection), isRange(selection) ? TextAffinity::Downstream : selection.affinity());
}
static VisiblePosition selectionVisibleEnd(const VisibleSelection& selection)
{
- return VisiblePosition(selectionEnd(selection), isRange(selection) ? TextAffinity::Upstream : selection.affinity());
+ return visiblePositionOf(selectionEnd(selection), isRange(selection) ? TextAffinity::Upstream : selection.affinity());
}
static PositionType toPositionType(const Position& position) { return toPositionInComposedTree(position); }
};
« no previous file with comments | « Source/core/editing/VisiblePositionTest.cpp ('k') | Source/core/editing/serializers/StyledMarkupSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698