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

Side by Side Diff: third_party/WebKit/Source/core/events/TouchEvent.cpp

Issue 2394653003: reflow comments in core/events,core/fileapi (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2008, The Android Open Source Project 2 * Copyright 2008, The Android Open Source Project
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. 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 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above copyright 10 * * Redistributions in binary form must reproduce the above copyright
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const size_t kTouchTargetHistogramScrollableDocumentOffset = 3; 49 const size_t kTouchTargetHistogramScrollableDocumentOffset = 3;
50 const size_t kTouchTargetHistogramAlreadyHandledOffset = 0; 50 const size_t kTouchTargetHistogramAlreadyHandledOffset = 0;
51 const size_t kTouchTargetHistogramNotHandledOffset = 1; 51 const size_t kTouchTargetHistogramNotHandledOffset = 1;
52 const size_t kTouchTargetHistogramHandledOffset = 2; 52 const size_t kTouchTargetHistogramHandledOffset = 2;
53 const size_t kCapturingOffset = 0; 53 const size_t kCapturingOffset = 0;
54 const size_t kAtTargetOffset = 12; 54 const size_t kAtTargetOffset = 12;
55 const size_t kBubblingOffset = 24; 55 const size_t kBubblingOffset = 24;
56 56
57 enum TouchTargetAndDispatchResultType { 57 enum TouchTargetAndDispatchResultType {
58 // The following enums represent state captured during the CAPTURING_PHASE. 58 // The following enums represent state captured during the CAPTURING_PHASE.
59 CapturingNonRootScrollerNonScrollableAlreadyHandled, // Non-root-scroller, no n-scrollable document, already handled. 59
60 CapturingNonRootScrollerNonScrollableNotHandled, // Non-root-scroller, non-sc rollable document, not handled. 60 // Non-root-scroller, non-scrollable document, already handled.
61 CapturingNonRootScrollerNonScrollableHandled, // Non-root-scroller, non-scrol lable document, handled application. 61 CapturingNonRootScrollerNonScrollableAlreadyHandled,
62 CapturingNonRootScrollerScrollableDocumentAlreadyHandled, // Non-root-scrolle r, scrollable document, already handled. 62 // Non-root-scroller, non-scrollable document, not handled.
63 CapturingNonRootScrollerScrollableDocumentNotHandled, // Non-root-scroller, s crollable document, not handled. 63 CapturingNonRootScrollerNonScrollableNotHandled,
64 CapturingNonRootScrollerScrollableDocumentHandled, // Non-root-scroller, scro llable document, handled application. 64 // Non-root-scroller, non-scrollable document, handled application.
65 CapturingRootScrollerNonScrollableAlreadyHandled, // Root-scroller, non-scrol lable document, already handled. 65 CapturingNonRootScrollerNonScrollableHandled,
66 CapturingRootScrollerNonScrollableNotHandled, // Root-scroller, non-scrollabl e document, not handled. 66 // Non-root-scroller, scrollable document, already handled.
67 CapturingRootScrollerNonScrollableHandled, // Root-scroller, non-scrollable d ocument, handled. 67 CapturingNonRootScrollerScrollableDocumentAlreadyHandled,
68 CapturingRootScrollerScrollableDocumentAlreadyHandled, // Root-scroller, scro llable document, already handled. 68 // Non-root-scroller, scrollable document, not handled.
69 CapturingRootScrollerScrollableDocumentNotHandled, // Root-scroller, scrollab le document, not handled. 69 CapturingNonRootScrollerScrollableDocumentNotHandled,
70 CapturingRootScrollerScrollableDocumentHandled, // Root-scroller, scrollable document, handled. 70 // Non-root-scroller, scrollable document, handled application.
71 CapturingNonRootScrollerScrollableDocumentHandled,
72 // Root-scroller, non-scrollable document, already handled.
73 CapturingRootScrollerNonScrollableAlreadyHandled,
74 // Root-scroller, non-scrollable document, not handled.
75 CapturingRootScrollerNonScrollableNotHandled,
76 // Root-scroller, non-scrollable document, handled.
77 CapturingRootScrollerNonScrollableHandled,
78 // Root-scroller, scrollable document, already handled.
79 CapturingRootScrollerScrollableDocumentAlreadyHandled,
80 // Root-scroller, scrollable document, not handled.
81 CapturingRootScrollerScrollableDocumentNotHandled,
82 // Root-scroller, scrollable document, handled.
83 CapturingRootScrollerScrollableDocumentHandled,
71 84
72 // The following enums represent state captured during the AT_TARGET phase. 85 // The following enums represent state captured during the AT_TARGET phase.
73 NonRootScrollerNonScrollableAlreadyHandled, // Non-root-scroller, non-scrolla ble document, already handled. 86
74 NonRootScrollerNonScrollableNotHandled, // Non-root-scroller, non-scrollable document, not handled. 87 // Non-root-scroller, non-scrollable document, already handled.
75 NonRootScrollerNonScrollableHandled, // Non-root-scroller, non-scrollable doc ument, handled application. 88 NonRootScrollerNonScrollableAlreadyHandled,
76 NonRootScrollerScrollableDocumentAlreadyHandled, // Non-root-scroller, scroll able document, already handled. 89 // Non-root-scroller, non-scrollable document, not handled.
77 NonRootScrollerScrollableDocumentNotHandled, // Non-root-scroller, scrollable document, not handled. 90 NonRootScrollerNonScrollableNotHandled,
78 NonRootScrollerScrollableDocumentHandled, // Non-root-scroller, scrollable do cument, handled application. 91 // Non-root-scroller, non-scrollable document, handled application.
79 RootScrollerNonScrollableAlreadyHandled, // Root-scroller, non-scrollable doc ument, already handled. 92 NonRootScrollerNonScrollableHandled,
80 RootScrollerNonScrollableNotHandled, // Root-scroller, non-scrollable documen t, not handled. 93 // Non-root-scroller, scrollable document, already handled.
81 RootScrollerNonScrollableHandled, // Root-scroller, non-scrollable document, handled. 94 NonRootScrollerScrollableDocumentAlreadyHandled,
82 RootScrollerScrollableDocumentAlreadyHandled, // Root-scroller, scrollable do cument, already handled. 95 // Non-root-scroller, scrollable document, not handled.
83 RootScrollerScrollableDocumentNotHandled, // Root-scroller, scrollable docume nt, not handled. 96 NonRootScrollerScrollableDocumentNotHandled,
84 RootScrollerScrollableDocumentHandled, // Root-scroller, scrollable document, handled. 97 // Non-root-scroller, scrollable document, handled application.
98 NonRootScrollerScrollableDocumentHandled,
99 // Root-scroller, non-scrollable document, already handled.
100 RootScrollerNonScrollableAlreadyHandled,
101 // Root-scroller, non-scrollable document, not handled.
102 RootScrollerNonScrollableNotHandled,
103 // Root-scroller, non-scrollable document, handled.
104 RootScrollerNonScrollableHandled,
105 // Root-scroller, scrollable document, already handled.
106 RootScrollerScrollableDocumentAlreadyHandled,
107 // Root-scroller, scrollable document, not handled.
108 RootScrollerScrollableDocumentNotHandled,
109 // Root-scroller, scrollable document, handled.
110 RootScrollerScrollableDocumentHandled,
85 111
86 // The following enums represent state captured during the BUBBLING_PHASE. 112 // The following enums represent state captured during the BUBBLING_PHASE.
87 BubblingNonRootScrollerNonScrollableAlreadyHandled, // Non-root-scroller, non -scrollable document, already handled. 113
88 BubblingNonRootScrollerNonScrollableNotHandled, // Non-root-scroller, non-scr ollable document, not handled. 114 // Non-root-scroller, non-scrollable document, already handled.
89 BubblingNonRootScrollerNonScrollableHandled, // Non-root-scroller, non-scroll able document, handled application. 115 BubblingNonRootScrollerNonScrollableAlreadyHandled,
90 BubblingNonRootScrollerScrollableDocumentAlreadyHandled, // Non-root-scroller , scrollable document, already handled. 116 // Non-root-scroller, non-scrollable document, not handled.
91 BubblingNonRootScrollerScrollableDocumentNotHandled, // Non-root-scroller, sc rollable document, not handled. 117 BubblingNonRootScrollerNonScrollableNotHandled,
92 BubblingNonRootScrollerScrollableDocumentHandled, // Non-root-scroller, scrol lable document, handled application. 118 // Non-root-scroller, non-scrollable document, handled application.
93 BubblingRootScrollerNonScrollableAlreadyHandled, // Root-scroller, non-scroll able document, already handled. 119 BubblingNonRootScrollerNonScrollableHandled,
94 BubblingRootScrollerNonScrollableNotHandled, // Root-scroller, non-scrollable document, not handled. 120 // Non-root-scroller, scrollable document, already handled.
95 BubblingRootScrollerNonScrollableHandled, // Root-scroller, non-scrollable do cument, handled. 121 BubblingNonRootScrollerScrollableDocumentAlreadyHandled,
96 BubblingRootScrollerScrollableDocumentAlreadyHandled, // Root-scroller, scrol lable document, already handled. 122 // Non-root-scroller, scrollable document, not handled.
97 BubblingRootScrollerScrollableDocumentNotHandled, // Root-scroller, scrollabl e document, not handled. 123 BubblingNonRootScrollerScrollableDocumentNotHandled,
98 BubblingRootScrollerScrollableDocumentHandled, // Root-scroller, scrollable d ocument, handled. 124 // Non-root-scroller, scrollable document, handled application.
125 BubblingNonRootScrollerScrollableDocumentHandled,
126 // Root-scroller, non-scrollable document, already handled.
127 BubblingRootScrollerNonScrollableAlreadyHandled,
128 // Root-scroller, non-scrollable document, not handled.
129 BubblingRootScrollerNonScrollableNotHandled,
130 // Root-scroller, non-scrollable document, handled.
131 BubblingRootScrollerNonScrollableHandled,
132 // Root-scroller, scrollable document, already handled.
133 BubblingRootScrollerScrollableDocumentAlreadyHandled,
134 // Root-scroller, scrollable document, not handled.
135 BubblingRootScrollerScrollableDocumentNotHandled,
136 // Root-scroller, scrollable document, handled.
137 BubblingRootScrollerScrollableDocumentHandled,
138
99 TouchTargetAndDispatchResultTypeMax, 139 TouchTargetAndDispatchResultTypeMax,
100 }; 140 };
101 141
102 void logTouchTargetHistogram(EventTarget* eventTarget, 142 void logTouchTargetHistogram(EventTarget* eventTarget,
103 unsigned short phase, 143 unsigned short phase,
104 bool defaultPreventedBeforeCurrentTarget, 144 bool defaultPreventedBeforeCurrentTarget,
105 bool defaultPrevented) { 145 bool defaultPrevented) {
106 int result = 0; 146 int result = 0;
107 Document* document = nullptr; 147 Document* document = nullptr;
108 148
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 TouchEvent::TouchEvent(TouchList* touches, 204 TouchEvent::TouchEvent(TouchList* touches,
165 TouchList* targetTouches, 205 TouchList* targetTouches,
166 TouchList* changedTouches, 206 TouchList* changedTouches,
167 const AtomicString& type, 207 const AtomicString& type,
168 AbstractView* view, 208 AbstractView* view,
169 PlatformEvent::Modifiers modifiers, 209 PlatformEvent::Modifiers modifiers,
170 bool cancelable, 210 bool cancelable,
171 bool causesScrollingIfUncanceled, 211 bool causesScrollingIfUncanceled,
172 bool firstTouchMoveOrStart, 212 bool firstTouchMoveOrStart,
173 double platformTimeStamp) 213 double platformTimeStamp)
174 // Pass a sourceCapabilities including the ability to fire touchevents when creating this touchevent, which is always created from input device capabilities from EventHandler. 214 // Pass a sourceCapabilities including the ability to fire touchevents when
215 // creating this touchevent, which is always created from input device
216 // capabilities from EventHandler.
175 : UIEventWithKeyState( 217 : UIEventWithKeyState(
176 type, 218 type,
177 true, 219 true,
178 cancelable, 220 cancelable,
179 view, 221 view,
180 0, 222 0,
181 modifiers, 223 modifiers,
182 platformTimeStamp, 224 platformTimeStamp,
183 InputDeviceCapabilities::firesTouchEventsSourceCapabilities()), 225 InputDeviceCapabilities::firesTouchEventsSourceCapabilities()),
184 m_touches(touches), 226 m_touches(touches),
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 return toTouchEvent(EventDispatchMediator::event()); 304 return toTouchEvent(EventDispatchMediator::event());
263 } 305 }
264 306
265 DispatchEventResult TouchEventDispatchMediator::dispatchEvent( 307 DispatchEventResult TouchEventDispatchMediator::dispatchEvent(
266 EventDispatcher& dispatcher) const { 308 EventDispatcher& dispatcher) const {
267 event().eventPath().adjustForTouchEvent(event()); 309 event().eventPath().adjustForTouchEvent(event());
268 return dispatcher.dispatch(); 310 return dispatcher.dispatch();
269 } 311 }
270 312
271 } // namespace blink 313 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/TouchEvent.h ('k') | third_party/WebKit/Source/core/events/TreeScopeEventContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698