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

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

Issue 2030513002: Remove Event.relatedTargetScoped and update event path calculation for relatedTarget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 6 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, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 LocalFrame* frame = toLocalDOMWindow(abstractView)->frame(); 44 LocalFrame* frame = toLocalDOMWindow(abstractView)->frame();
45 if (!frame) 45 if (!frame)
46 return LayoutSize(); 46 return LayoutSize();
47 FrameView* frameView = frame->view(); 47 FrameView* frameView = frame->view();
48 if (!frameView) 48 if (!frameView)
49 return LayoutSize(); 49 return LayoutSize();
50 float scaleFactor = frame->pageZoomFactor(); 50 float scaleFactor = frame->pageZoomFactor();
51 return LayoutSize(frameView->scrollX() / scaleFactor, frameView->scrollY() / scaleFactor); 51 return LayoutSize(frameView->scrollX() / scaleFactor, frameView->scrollY() / scaleFactor);
52 } 52 }
53 53
54 MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubb le, bool cancelable, EventTarget* relatedTarget, 54 MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubb le, bool cancelable,
55 AbstractView* abstractView, int detail, const IntPoint& screenLocation, 55 AbstractView* abstractView, int detail, const IntPoint& screenLocation,
56 const IntPoint& rootFrameLocation, const IntPoint& movementDelta, PlatformEv ent::Modifiers modifiers, 56 const IntPoint& rootFrameLocation, const IntPoint& movementDelta, PlatformEv ent::Modifiers modifiers,
57 double platformTimeStamp, PositionType positionType, InputDeviceCapabilities * sourceCapabilities) 57 double platformTimeStamp, PositionType positionType, InputDeviceCapabilities * sourceCapabilities)
58 : UIEventWithKeyState(eventType, canBubble, cancelable, relatedTarget, abstr actView, detail, modifiers, platformTimeStamp, sourceCapabilities) 58 : UIEventWithKeyState(eventType, canBubble, cancelable, abstractView, detail , modifiers, platformTimeStamp, sourceCapabilities)
59 , m_screenLocation(screenLocation) 59 , m_screenLocation(screenLocation)
60 , m_movementDelta(movementDelta) 60 , m_movementDelta(movementDelta)
61 , m_positionType(positionType) 61 , m_positionType(positionType)
62 { 62 {
63 LayoutPoint adjustedPageLocation; 63 LayoutPoint adjustedPageLocation;
64 LayoutPoint scrollPosition; 64 LayoutPoint scrollPosition;
65 65
66 LocalFrame* frame = view() && view()->isLocalDOMWindow() ? toLocalDOMWindow( view())->frame() : nullptr; 66 LocalFrame* frame = view() && view()->isLocalDOMWindow() ? toLocalDOMWindow( view())->frame() : nullptr;
67 if (frame && hasPosition()) { 67 if (frame && hasPosition()) {
68 if (FrameView* frameView = frame->view()) { 68 if (FrameView* frameView = frame->view()) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events .html>. 234 // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events .html>.
235 return m_clientLocation.y(); 235 return m_clientLocation.y();
236 } 236 }
237 237
238 DEFINE_TRACE(MouseRelatedEvent) 238 DEFINE_TRACE(MouseRelatedEvent)
239 { 239 {
240 UIEventWithKeyState::trace(visitor); 240 UIEventWithKeyState::trace(visitor);
241 } 241 }
242 242
243 } // namespace blink 243 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698