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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2147263003: Send got/lostpointercapture immediately if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply comments Created 4 years, 5 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, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 void EventHandler::nodeWillBeRemoved(Node& nodeToBeRemoved) 302 void EventHandler::nodeWillBeRemoved(Node& nodeToBeRemoved)
303 { 303 {
304 if (nodeToBeRemoved.isShadowIncludingInclusiveAncestorOf(m_clickNode.get())) { 304 if (nodeToBeRemoved.isShadowIncludingInclusiveAncestorOf(m_clickNode.get())) {
305 // We don't dispatch click events if the mousedown node is removed 305 // We don't dispatch click events if the mousedown node is removed
306 // before a mouseup event. It is compatible with IE and Firefox. 306 // before a mouseup event. It is compatible with IE and Firefox.
307 m_clickNode = nullptr; 307 m_clickNode = nullptr;
308 } 308 }
309 } 309 }
310 310
311 void EventHandler::immediatelyProcessPendingPointerCapture(int pointerId)
312 {
313 m_pointerEventManager.immediatelyProcessPendingPointerCapture(pointerId);
314 }
315
311 WebInputEventResult EventHandler::handleMousePressEvent(const MouseEventWithHitT estResults& event) 316 WebInputEventResult EventHandler::handleMousePressEvent(const MouseEventWithHitT estResults& event)
312 { 317 {
313 TRACE_EVENT0("blink", "EventHandler::handleMousePressEvent"); 318 TRACE_EVENT0("blink", "EventHandler::handleMousePressEvent");
314 319
315 // Reset drag state. 320 // Reset drag state.
316 dragState().m_dragSrc = nullptr; 321 dragState().m_dragSrc = nullptr;
317 322
318 cancelFakeMouseMoveEvent(); 323 cancelFakeMouseMoveEvent();
319 324
320 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 325 m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2611 2616
2612 FrameHost* EventHandler::frameHost() const 2617 FrameHost* EventHandler::frameHost() const
2613 { 2618 {
2614 if (!m_frame->page()) 2619 if (!m_frame->page())
2615 return nullptr; 2620 return nullptr;
2616 2621
2617 return &m_frame->page()->frameHost(); 2622 return &m_frame->page()->frameHost();
2618 } 2623 }
2619 2624
2620 } // namespace blink 2625 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.h ('k') | third_party/WebKit/Source/core/input/PointerEventManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698