Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |