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

Side by Side Diff: third_party/WebKit/Source/core/editing/TextSuggestionList.cpp

Issue 2650113004: [WIP] Add support for Android SuggestionSpans when editing text (Closed)
Patch Set: Uploading the latest version from my repo so I can reference it Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file.
4
5 #include "core/editing/TextSuggestionList.h"
6
7 namespace blink {
8
9 bool TextSuggestionList::operator<(const TextSuggestionList& other) const {
10 int length = end - start;
11 int otherLength = other.end - other.start;
12
13 if (length != otherLength) {
14 return length < otherLength;
15 }
16
17 // If the text range lengths are the same, pick some arbitrary yet stable
18 // order
19 return suggestionID < other.suggestionID;
20 }
21
22 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698