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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/SelectionState.cpp

Issue 2732643004: Add operator<< to SelectionState for debug logging. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/SelectionState.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
3 // found in the LICENSE file.
4
5 #include "core/layout/api/SelectionState.h"
6
7 #include "wtf/Assertions.h"
8
9 namespace blink {
10
11 #ifndef NDEBUG
12
13 std::ostream& operator<<(std::ostream& out, const SelectionState& state) {
yosin_UTC9 2017/03/06 04:51:10 nit: s/const SelectionState&/SelectionState/
14 switch (state) {
15 case SelectionNone:
yosin_UTC9 2017/03/06 04:51:10 How about using FOR_EACH_XXX(V) technique to make
16 return out << "None";
17 case SelectionStart:
18 return out << "Start";
19 case SelectionInside:
20 return out << "Inside";
21 case SelectionEnd:
22 return out << "End";
23 case SelectionBoth:
24 return out << "Both";
25 default:
26 NOTREACHED();
27 return out << "Unknown";
28 }
29 }
30
31 #endif
32
33 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/SelectionState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698