Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: third_party/WebKit/Source/core/editing/SelectionController.h

Issue 2664253002: Revert "Blink handle selection handle visibility" (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef SelectionController_h 27 #ifndef SelectionController_h
28 #define SelectionController_h 28 #define SelectionController_h
29 29
30 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
31 #include "core/dom/SynchronousMutationObserver.h" 31 #include "core/dom/SynchronousMutationObserver.h"
32 #include "core/editing/FrameSelection.h"
33 #include "core/editing/TextGranularity.h" 32 #include "core/editing/TextGranularity.h"
34 #include "core/editing/VisibleSelection.h" 33 #include "core/editing/VisibleSelection.h"
35 #include "core/page/EventWithHitTestResults.h" 34 #include "core/page/EventWithHitTestResults.h"
36 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
39 class FrameSelection;
40 class HitTestResult; 40 class HitTestResult;
41 class LocalFrame; 41 class LocalFrame;
42 42
43 class CORE_EXPORT SelectionController final 43 class CORE_EXPORT SelectionController final
44 : public GarbageCollectedFinalized<SelectionController>, 44 : public GarbageCollectedFinalized<SelectionController>,
45 public SynchronousMutationObserver { 45 public SynchronousMutationObserver {
46 WTF_MAKE_NONCOPYABLE(SelectionController); 46 WTF_MAKE_NONCOPYABLE(SelectionController);
47 USING_GARBAGE_COLLECTED_MIXIN(SelectionController); 47 USING_GARBAGE_COLLECTED_MIXIN(SelectionController);
48 48
49 public: 49 public:
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 SelectInputEventType); 105 SelectInputEventType);
106 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, 106 void selectClosestMisspellingFromHitTestResult(const HitTestResult&,
107 AppendTrailingWhitespace); 107 AppendTrailingWhitespace);
108 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); 108 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&);
109 void selectClosestMisspellingFromMouseEvent( 109 void selectClosestMisspellingFromMouseEvent(
110 const MouseEventWithHitTestResults&); 110 const MouseEventWithHitTestResults&);
111 void selectClosestWordOrLinkFromMouseEvent( 111 void selectClosestWordOrLinkFromMouseEvent(
112 const MouseEventWithHitTestResults&); 112 const MouseEventWithHitTestResults&);
113 void setNonDirectionalSelectionIfNeeded(const VisibleSelectionInFlatTree&, 113 void setNonDirectionalSelectionIfNeeded(const VisibleSelectionInFlatTree&,
114 TextGranularity, 114 TextGranularity,
115 EndPointsAdjustmentMode, 115 EndPointsAdjustmentMode);
116 HandleVisibility);
117 void setCaretAtHitTestResult(const HitTestResult&); 116 void setCaretAtHitTestResult(const HitTestResult&);
118 bool updateSelectionForMouseDownDispatchingSelectStart( 117 bool updateSelectionForMouseDownDispatchingSelectStart(
119 Node*, 118 Node*,
120 const VisibleSelectionInFlatTree&, 119 const VisibleSelectionInFlatTree&,
121 TextGranularity, 120 TextGranularity);
122 HandleVisibility);
123 121
124 FrameSelection& selection() const; 122 FrameSelection& selection() const;
125 123
126 // Implements |SynchronousMutationObserver|. 124 // Implements |SynchronousMutationObserver|.
127 // TODO(yosin): We should relocate |m_originalBaseInFlatTree| when DOM tree 125 // TODO(yosin): We should relocate |m_originalBaseInFlatTree| when DOM tree
128 // changed. 126 // changed.
129 void contextDestroyed(Document*) final; 127 void contextDestroyed(Document*) final;
130 128
131 Member<LocalFrame> const m_frame; 129 Member<LocalFrame> const m_frame;
132 // TODO(yosin): We should use |PositionWIthAffinityInFlatTree| since we 130 // TODO(yosin): We should use |PositionWIthAffinityInFlatTree| since we
(...skipping 10 matching lines...) Expand all
143 }; 141 };
144 SelectionState m_selectionState; 142 SelectionState m_selectionState;
145 }; 143 };
146 144
147 bool isLinkSelection(const MouseEventWithHitTestResults&); 145 bool isLinkSelection(const MouseEventWithHitTestResults&);
148 bool isExtendingSelection(const MouseEventWithHitTestResults&); 146 bool isExtendingSelection(const MouseEventWithHitTestResults&);
149 147
150 } // namespace blink 148 } // namespace blink
151 149
152 #endif // SelectionController_h 150 #endif // SelectionController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698