OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2015 Google Inc. All rights reserved. | 3 * Copyright (C) 2015 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Implements |SynchronousMutationObserver|. | 123 // Implements |SynchronousMutationObserver|. |
124 // TODO(yosin): We should relocate |m_originalBaseInFlatTree| when DOM tree | 124 // TODO(yosin): We should relocate |m_originalBaseInFlatTree| when DOM tree |
125 // changed. | 125 // changed. |
126 void ContextDestroyed(Document*) final; | 126 void ContextDestroyed(Document*) final; |
127 | 127 |
128 bool HandleSingleClick(const MouseEventWithHitTestResults&); | 128 bool HandleSingleClick(const MouseEventWithHitTestResults&); |
129 bool HandleDoubleClick(const MouseEventWithHitTestResults&); | 129 bool HandleDoubleClick(const MouseEventWithHitTestResults&); |
130 bool HandleTripleClick(const MouseEventWithHitTestResults&); | 130 bool HandleTripleClick(const MouseEventWithHitTestResults&); |
131 | 131 |
132 Member<LocalFrame> const frame_; | 132 Member<LocalFrame> const frame_; |
133 // TODO(yosin): We should use |PositionWIthAffinityInFlatTree| since we | |
134 // should reduce usage of |VisibleSelectionInFlatTree|. | |
135 // Used to store base before the adjustment at bidi boundary | 133 // Used to store base before the adjustment at bidi boundary |
136 VisiblePositionInFlatTree original_base_in_flat_tree_; | 134 PositionInFlatTreeWithAffinity original_base_in_flat_tree_; |
137 bool mouse_down_may_start_select_; | 135 bool mouse_down_may_start_select_; |
138 bool mouse_down_was_single_click_in_selection_; | 136 bool mouse_down_was_single_click_in_selection_; |
139 bool mouse_down_allows_multi_click_; | 137 bool mouse_down_allows_multi_click_; |
140 enum class SelectionState { | 138 enum class SelectionState { |
141 kHaveNotStartedSelection, | 139 kHaveNotStartedSelection, |
142 kPlacedCaret, | 140 kPlacedCaret, |
143 kExtendedSelection | 141 kExtendedSelection |
144 }; | 142 }; |
145 SelectionState selection_state_; | 143 SelectionState selection_state_; |
146 }; | 144 }; |
147 | 145 |
148 bool IsLinkSelection(const MouseEventWithHitTestResults&); | 146 bool IsLinkSelection(const MouseEventWithHitTestResults&); |
149 bool IsExtendingSelection(const MouseEventWithHitTestResults&); | 147 bool IsExtendingSelection(const MouseEventWithHitTestResults&); |
150 | 148 |
151 } // namespace blink | 149 } // namespace blink |
152 | 150 |
153 #endif // SelectionController_h | 151 #endif // SelectionController_h |
OLD | NEW |