OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "public/web/WebSelection.h" | 5 #include "public/web/WebSelection.h" |
6 | 6 |
7 #include "core/editing/SelectionType.h" | 7 #include "core/editing/SelectionType.h" |
8 #include "core/layout/compositing/CompositedSelection.h" | 8 #include "core/layout/compositing/CompositedSelection.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 20 matching lines...) Expand all Loading... |
31 return result; | 31 return result; |
32 } | 32 } |
33 | 33 |
34 // SelectionType enums have the same values; enforced in AssertMatchingEnums.cpp
. | 34 // SelectionType enums have the same values; enforced in AssertMatchingEnums.cpp
. |
35 WebSelection::WebSelection(const CompositedSelection& selection) | 35 WebSelection::WebSelection(const CompositedSelection& selection) |
36 : m_selectionType(static_cast<WebSelection::SelectionType>(selection.type)) | 36 : m_selectionType(static_cast<WebSelection::SelectionType>(selection.type)) |
37 , m_start(getWebSelectionBound(selection, true)) | 37 , m_start(getWebSelectionBound(selection, true)) |
38 , m_end(getWebSelectionBound(selection, false)) | 38 , m_end(getWebSelectionBound(selection, false)) |
39 , m_isEditable(selection.isEditable) | 39 , m_isEditable(selection.isEditable) |
40 , m_isEmptyTextFormControl(selection.isEmptyTextFormControl) | 40 , m_isEmptyTextFormControl(selection.isEmptyTextFormControl) |
| 41 , m_isHandleVisible(selection.isHandleVisible) |
41 { | 42 { |
42 } | 43 } |
43 | 44 |
44 WebSelection::WebSelection(const WebSelection& other) | 45 WebSelection::WebSelection(const WebSelection& other) |
45 : m_selectionType(other.m_selectionType) | 46 : m_selectionType(other.m_selectionType) |
46 , m_start(other.m_start) | 47 , m_start(other.m_start) |
47 , m_end(other.m_end) | 48 , m_end(other.m_end) |
48 , m_isEditable(other.m_isEditable) | 49 , m_isEditable(other.m_isEditable) |
49 , m_isEmptyTextFormControl(other.m_isEmptyTextFormControl) | 50 , m_isEmptyTextFormControl(other.m_isEmptyTextFormControl) |
| 51 , m_isHandleVisible(other.m_isHandleVisible) |
50 { | 52 { |
51 } | 53 } |
52 | 54 |
53 } // namespace blink | 55 } // namespace blink |
OLD | NEW |