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

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

Issue 2274253002: Added counters for pointer boundary events fired. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added hasProcessedPendingPointerCapture API. Created 4 years, 3 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/input/PointerEventManager.h" 5 #include "core/input/PointerEventManager.h"
6 6
7 #include "core/dom/ElementTraversal.h" 7 #include "core/dom/ElementTraversal.h"
8 #include "core/dom/shadow/FlatTreeTraversal.h" 8 #include "core/dom/shadow/FlatTreeTraversal.h"
9 #include "core/events/MouseEvent.h" 9 #include "core/events/MouseEvent.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 // the capture. Note that this might be different from 753 // the capture. Note that this might be different from
754 // |m_pointercaptureTarget|. |m_pointercaptureTarget| holds the element 754 // |m_pointercaptureTarget|. |m_pointercaptureTarget| holds the element
755 // that had the capture until now and has been receiving the pointerevents 755 // that had the capture until now and has been receiving the pointerevents
756 // but |m_pendingPointerCaptureTarget| indicated the element that gets the 756 // but |m_pendingPointerCaptureTarget| indicated the element that gets the
757 // very next pointer event. They will be the same if there was no change in 757 // very next pointer event. They will be the same if there was no change in
758 // capturing of a particular |pointerId|. See crbug.com/614481. 758 // capturing of a particular |pointerId|. See crbug.com/614481.
759 if (m_pendingPointerCaptureTarget.get(pointerId) == target) 759 if (m_pendingPointerCaptureTarget.get(pointerId) == target)
760 releasePointerCapture(pointerId); 760 releasePointerCapture(pointerId);
761 } 761 }
762 762
763 bool PointerEventManager::hasPointerCapture(int pointerId, EventTarget* target) 763 bool PointerEventManager::hasPointerCapture(int pointerId, const EventTarget* ta rget) const
764 { 764 {
765 return m_pendingPointerCaptureTarget.get(pointerId) == target; 765 return m_pendingPointerCaptureTarget.get(pointerId) == target;
766 } 766 }
767 767
768 bool PointerEventManager::hasProcessedPointerCapture(int pointerId, const EventT arget* target) const
769 {
770 return m_pointerCaptureTarget.get(pointerId) == target;
Navid Zolghadr 2016/08/25 15:53:23 This doesn't seem enough either. It has other blin
mustaq 2016/08/25 17:38:01 Changed the UseCounter condition instead. I kept m
771 }
772
768 void PointerEventManager::releasePointerCapture(int pointerId) 773 void PointerEventManager::releasePointerCapture(int pointerId)
769 { 774 {
770 m_pendingPointerCaptureTarget.remove(pointerId); 775 m_pendingPointerCaptureTarget.remove(pointerId);
771 } 776 }
772 777
773 bool PointerEventManager::isActive(const int pointerId) const 778 bool PointerEventManager::isActive(const int pointerId) const
774 { 779 {
775 return m_pointerEventFactory.isActive(pointerId); 780 return m_pointerEventFactory.isActive(pointerId);
776 } 781 }
777 782
(...skipping 27 matching lines...) Expand all
805 { 810 {
806 visitor->trace(m_frame); 811 visitor->trace(m_frame);
807 visitor->trace(m_nodeUnderPointer); 812 visitor->trace(m_nodeUnderPointer);
808 visitor->trace(m_pointerCaptureTarget); 813 visitor->trace(m_pointerCaptureTarget);
809 visitor->trace(m_pendingPointerCaptureTarget); 814 visitor->trace(m_pendingPointerCaptureTarget);
810 visitor->trace(m_touchEventManager); 815 visitor->trace(m_touchEventManager);
811 } 816 }
812 817
813 818
814 } // namespace blink 819 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/PointerEventManager.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698