| 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 22 matching lines...) Expand all Loading... |
| 33 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); | 33 result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer); |
| 34 result.isTextDirectionRTL = bound.isTextDirectionRTL; | 34 result.isTextDirectionRTL = bound.isTextDirectionRTL; |
| 35 return result; | 35 return result; |
| 36 } | 36 } |
| 37 | 37 |
| 38 // SelectionType enums have the same values; enforced in | 38 // SelectionType enums have the same values; enforced in |
| 39 // AssertMatchingEnums.cpp. | 39 // AssertMatchingEnums.cpp. |
| 40 WebSelection::WebSelection(const CompositedSelection& selection) | 40 WebSelection::WebSelection(const CompositedSelection& selection) |
| 41 : m_selectionType(static_cast<WebSelection::SelectionType>(selection.type)), | 41 : m_selectionType(static_cast<WebSelection::SelectionType>(selection.type)), |
| 42 m_start(getWebSelectionBound(selection, true)), | 42 m_start(getWebSelectionBound(selection, true)), |
| 43 m_end(getWebSelectionBound(selection, false)), | 43 m_end(getWebSelectionBound(selection, false)) {} |
| 44 m_isEditable(selection.isEditable), | |
| 45 m_isEmptyTextControl(selection.isEmptyTextControl) {} | |
| 46 | 44 |
| 47 WebSelection::WebSelection(const WebSelection& other) | 45 WebSelection::WebSelection(const WebSelection& other) |
| 48 : m_selectionType(other.m_selectionType), | 46 : m_selectionType(other.m_selectionType), |
| 49 m_start(other.m_start), | 47 m_start(other.m_start), |
| 50 m_end(other.m_end), | 48 m_end(other.m_end) {} |
| 51 m_isEditable(other.m_isEditable), | |
| 52 m_isEmptyTextControl(other.m_isEmptyTextControl) {} | |
| 53 | 49 |
| 54 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |