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

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

Issue 1319753004: Introduce composed tree version of VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-07T14:06:02 Rebase for VisibleSelectionChangeObserver and PendingSelection::commit Created 5 years, 3 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 823a96220673f7d7fd00e1964244af005a0e8b20..5e897bbc386005aef1564465a8f14681c72cb2b6 100644
--- a/Source/core/editing/VisibleSelection.h
+++ b/Source/core/editing/VisibleSelection.h
@@ -97,11 +97,11 @@ public:
static SelectionType selectionType(const VisibleSelection& selection) { return selection.selectionTypeInComposedTree(); }
static VisiblePosition selectionVisibleStart(const VisibleSelection& selection)
{
- return createVisiblePosition(selectionStart(selection), isRange(selection) ? TextAffinity::Downstream : selection.affinity());
+ return createVisiblePositionInDOMTree(selectionStart(selection), isRange(selection) ? TextAffinity::Downstream : selection.affinity());
}
static VisiblePosition selectionVisibleEnd(const VisibleSelection& selection)
{
- return createVisiblePosition(selectionEnd(selection), isRange(selection) ? TextAffinity::Upstream : selection.affinity());
+ return createVisiblePositionInDOMTree(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