| Index: third_party/WebKit/Source/core/layout/api/SelectionState.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/api/SelectionState.cpp b/third_party/WebKit/Source/core/layout/api/SelectionState.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7ba84f793d6276a29a4a555f8d84cc269ad8358d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/layout/api/SelectionState.cpp
|
| @@ -0,0 +1,24 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/layout/api/SelectionState.h"
|
| +
|
| +#include "wtf/Assertions.h"
|
| +
|
| +namespace blink {
|
| +
|
| +std::ostream& operator<<(std::ostream& out, const SelectionState state) {
|
| + static const char* const kText[] = {
|
| +#define V(state) #state,
|
| + FOR_EACH_SELECTION_STATE(V)
|
| +#undef V
|
| + };
|
| +
|
| + const auto& it = std::begin(kText) + static_cast<size_t>(state);
|
| + DCHECK_GE(it, std::begin(kText)) << "Unknown state value";
|
| + DCHECK_LT(it, std::end(kText)) << "Unknown state value";
|
| + return out << *it;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|