| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void updateSelectionForMouseDrag(const HitTestResult&, Node*, const LayoutPo
int&, const IntPoint&); | 59 void updateSelectionForMouseDrag(const HitTestResult&, Node*, const LayoutPo
int&, const IntPoint&); |
| 60 void sendContextMenuEvent(const MouseEventWithHitTestResults&, const LayoutP
oint&); | 60 void sendContextMenuEvent(const MouseEventWithHitTestResults&, const LayoutP
oint&); |
| 61 void passMousePressEventToSubframe(const MouseEventWithHitTestResults&); | 61 void passMousePressEventToSubframe(const MouseEventWithHitTestResults&); |
| 62 | 62 |
| 63 void initializeSelectionState(); | 63 void initializeSelectionState(); |
| 64 void setMouseDownMayStartSelect(bool); | 64 void setMouseDownMayStartSelect(bool); |
| 65 bool mouseDownMayStartSelect() const; | 65 bool mouseDownMayStartSelect() const; |
| 66 bool mouseDownWasSingleClickInSelection() const; | 66 bool mouseDownWasSingleClickInSelection() const; |
| 67 void notifySelectionChanged(); | 67 void notifySelectionChanged(); |
| 68 | 68 |
| 69 // Selects a word if there's one in the given position. Returns true if a |
| 70 // word was selected. |
| 71 bool selectWordAtPositionIfAny(const IntPoint&); |
| 72 |
| 69 private: | 73 private: |
| 70 explicit SelectionController(LocalFrame&); | 74 explicit SelectionController(LocalFrame&); |
| 71 | 75 |
| 72 template <typename Strategy> | 76 template <typename Strategy> |
| 73 bool handleMousePressEventSingleClickAlgorithm(const MouseEventWithHitTestRe
sults&); | 77 bool handleMousePressEventSingleClickAlgorithm(const MouseEventWithHitTestRe
sults&); |
| 74 | 78 |
| 75 template <typename Strategy> | 79 template <typename Strategy> |
| 76 void updateSelectionForMouseDragAlgorithm(const HitTestResult&, Node*, const
LayoutPoint&, const IntPoint&); | 80 void updateSelectionForMouseDragAlgorithm(const HitTestResult&, Node*, const
LayoutPoint&, const IntPoint&); |
| 77 | 81 |
| 78 enum class AppendTrailingWhitespace { ShouldAppend, DontAppend }; | 82 enum class AppendTrailingWhitespace { ShouldAppend, DontAppend }; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 bool m_mouseDownMayStartSelect; | 114 bool m_mouseDownMayStartSelect; |
| 111 bool m_mouseDownWasSingleClickInSelection; | 115 bool m_mouseDownWasSingleClickInSelection; |
| 112 bool m_mouseDownAllowsMultiClick; | 116 bool m_mouseDownAllowsMultiClick; |
| 113 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe
lection }; | 117 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe
lection }; |
| 114 SelectionState m_selectionState; | 118 SelectionState m_selectionState; |
| 115 }; | 119 }; |
| 116 | 120 |
| 117 } // namespace blink | 121 } // namespace blink |
| 118 | 122 |
| 119 #endif // SelectionController_h | 123 #endif // SelectionController_h |
| OLD | NEW |