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

Side by Side Diff: third_party/WebKit/Source/core/events/MouseEvent.h

Issue 2889733002: Set the target lazily for the coalesced events (Closed)
Patch Set: Add missing override Created 3 years, 7 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) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 MouseEvent(const AtomicString& type, 213 MouseEvent(const AtomicString& type,
214 const MouseEventInit&, 214 const MouseEventInit&,
215 TimeTicks platform_time_stamp); 215 TimeTicks platform_time_stamp);
216 MouseEvent(const AtomicString& type, const MouseEventInit& init) 216 MouseEvent(const AtomicString& type, const MouseEventInit& init)
217 : MouseEvent(type, init, TimeTicks::Now()) {} 217 : MouseEvent(type, init, TimeTicks::Now()) {}
218 218
219 MouseEvent(); 219 MouseEvent();
220 220
221 short RawButton() const { return button_; } 221 short RawButton() const { return button_; }
222 222
223 void ReceivedTarget() override;
224
223 private: 225 private:
224 friend class MouseEventDispatchMediator; 226 friend class MouseEventDispatchMediator;
225 void InitMouseEventInternal(const AtomicString& type, 227 void InitMouseEventInternal(const AtomicString& type,
226 bool can_bubble, 228 bool can_bubble,
227 bool cancelable, 229 bool cancelable,
228 AbstractView*, 230 AbstractView*,
229 int detail, 231 int detail,
230 int screen_x, 232 int screen_x,
231 int screen_y, 233 int screen_y,
232 int client_x, 234 int client_x,
233 int client_y, 235 int client_y,
234 WebInputEvent::Modifiers, 236 WebInputEvent::Modifiers,
235 short button, 237 short button,
236 EventTarget* related_target, 238 EventTarget* related_target,
237 InputDeviceCapabilities* source_capabilities, 239 InputDeviceCapabilities* source_capabilities,
238 unsigned short buttons = 0); 240 unsigned short buttons = 0);
239 241
240 void InitCoordinates(const double client_x, const double client_y); 242 void InitCoordinates(const double client_x, const double client_y);
241 void InitCoordinatesFromRootFrame(int window_x, int window_y); 243 void InitCoordinatesFromRootFrame(int window_x, int window_y);
242 void ReceivedTarget() final;
243 244
244 void ComputePageLocation(); 245 void ComputePageLocation();
245 void ComputeRelativePosition(); 246 void ComputeRelativePosition();
246 247
247 DoublePoint screen_location_; 248 DoublePoint screen_location_;
248 DoublePoint client_location_; 249 DoublePoint client_location_;
249 DoublePoint movement_delta_; 250 DoublePoint movement_delta_;
250 251
251 DoublePoint page_location_; 252 DoublePoint page_location_;
252 DoublePoint layer_location_; 253 DoublePoint layer_location_;
(...skipping 18 matching lines...) Expand all
271 MouseEvent& Event() const; 272 MouseEvent& Event() const;
272 273
273 DispatchEventResult DispatchEvent(EventDispatcher&) const override; 274 DispatchEventResult DispatchEvent(EventDispatcher&) const override;
274 }; 275 };
275 276
276 DEFINE_EVENT_TYPE_CASTS(MouseEvent); 277 DEFINE_EVENT_TYPE_CASTS(MouseEvent);
277 278
278 } // namespace blink 279 } // namespace blink
279 280
280 #endif // MouseEvent_h 281 #endif // MouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698