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

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

Issue 1371003002: Utilize VisibleSelectionTemplate template class in SelectionController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015-09-28T14:31:05 Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 private: 69 private:
70 explicit SelectionController(LocalFrame&); 70 explicit SelectionController(LocalFrame&);
71 71
72 template <typename Strategy> 72 template <typename Strategy>
73 bool handleMousePressEventSingleClickAlgorithm(const MouseEventWithHitTestRe sults&); 73 bool handleMousePressEventSingleClickAlgorithm(const MouseEventWithHitTestRe sults&);
74 74
75 template <typename Strategy> 75 template <typename Strategy>
76 void updateSelectionForMouseDragAlgorithm(const HitTestResult&, Node*, const LayoutPoint&, const IntPoint&); 76 void updateSelectionForMouseDragAlgorithm(const HitTestResult&, Node*, const LayoutPoint&, const IntPoint&);
77 77
78 enum class AppendTrailingWhitespace { ShouldAppend, DontAppend }; 78 enum class AppendTrailingWhitespace { ShouldAppend, DontAppend };
79
80 template <typename Strategy>
79 void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailing Whitespace); 81 void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailing Whitespace);
82 template <typename Strategy>
80 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendT railingWhitespace); 83 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendT railingWhitespace);
81 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); 84 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&);
85
86 template <typename Strategy>
82 void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResul ts&); 87 void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResul ts&);
88
89 template <typename Strategy>
83 void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResult s&); 90 void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResult s&);
84 91
85 template <typename Strategy> 92 template <typename Strategy>
93 bool handleGestureLongPressAlgorithm(const PlatformGestureEvent&, const HitT estResult&);
94
95 template <typename Strategy>
96 bool handleMousePressEventTripleClickAlgorithm(const MouseEventWithHitTestRe sults&);
97
98 template <typename Strategy>
99 bool handleMouseReleaseEventAlgorithm(const MouseEventWithHitTestResults&, c onst LayoutPoint&);
100
101 template <typename Strategy>
102 void passMousePressEventToSubframeAlgorithm(const MouseEventWithHitTestResul ts&);
103
104 template <typename Strategy>
86 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS electionTemplate<Strategy>&, TextGranularity); 105 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS electionTemplate<Strategy>&, TextGranularity);
87 106
88 FrameSelection& selection() const; 107 FrameSelection& selection() const;
89 108
90 RawPtrWillBeMember<LocalFrame> const m_frame; 109 RawPtrWillBeMember<LocalFrame> const m_frame;
91 bool m_mouseDownMayStartSelect; 110 bool m_mouseDownMayStartSelect;
92 bool m_mouseDownWasSingleClickInSelection; 111 bool m_mouseDownWasSingleClickInSelection;
93 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe lection }; 112 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe lection };
94 SelectionState m_selectionState; 113 SelectionState m_selectionState;
95 }; 114 };
96 115
97 } // namespace blink 116 } // namespace blink
117
98 #endif // SelectionController_h 118 #endif // SelectionController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698