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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 210823007: Add TRACE_EVENT for common events in EventHandler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/EventDispatcher.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index f8c3c99c58d17f8311709494899d091fc52af567..17598ae5aee923a082f97cda50dd3f69fdab7c2b 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -502,6 +502,8 @@ void EventHandler::selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHit
bool EventHandler::handleMousePressEventDoubleClick(const MouseEventWithHitTestResults& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMousePressEventDoubleClick");
+
if (event.event().button() != LeftButton)
return false;
@@ -520,6 +522,8 @@ bool EventHandler::handleMousePressEventDoubleClick(const MouseEventWithHitTestR
bool EventHandler::handleMousePressEventTripleClick(const MouseEventWithHitTestResults& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMousePressEventTripleClick");
+
if (event.event().button() != LeftButton)
return false;
@@ -545,6 +549,8 @@ static int textDistance(const Position& start, const Position& end)
bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestResults& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMousePressEventSingleClick");
+
m_frame->document()->updateLayoutIgnorePendingStylesheets();
Node* innerNode = event.targetNode();
if (!(innerNode && innerNode->renderer() && m_mouseDownMayStartSelect))
@@ -621,6 +627,8 @@ static inline bool canMouseDownStartSelect(Node* node)
bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMousePressEvent");
+
// Reset drag state.
dragState().m_dragSrc = nullptr;
@@ -686,6 +694,8 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMouseDraggedEvent");
+
if (!m_mousePressed)
return false;
@@ -885,6 +895,8 @@ bool EventHandler::panScrollInProgress() const
HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, HitTestRequest::HitTestRequestType hitType, const LayoutSize& padding)
{
+ TRACE_EVENT0("webkit", "EventHandler::hitTestResultAtPoint");
+
// We always send hitTestResultAtPoint to the main frame if we have one,
// otherwise we might hit areas that are obscured by higher frames.
if (Page* page = m_frame->page()) {
@@ -1285,6 +1297,8 @@ static LayoutPoint documentPointForWindowPoint(LocalFrame* frame, const IntPoint
bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMousePressEvent");
+
RefPtr<FrameView> protector(m_frame->view());
bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
@@ -1446,6 +1460,8 @@ ScrollableArea* EventHandler::associatedScrollableArea(const RenderLayer* layer)
bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMouseMoveEvent");
+
RefPtr<FrameView> protector(m_frame->view());
MaximumDurationTracker maxDurationTracker(&m_maxMouseMovedDuration);
@@ -1473,6 +1489,8 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& event)
void EventHandler::handleMouseLeaveEvent(const PlatformMouseEvent& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMouseLeaveEvent");
+
RefPtr<FrameView> protector(m_frame->view());
handleMouseMoveOrLeaveEvent(event);
}
@@ -1611,6 +1629,8 @@ static Node* parentForClickEvent(const Node& node)
bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleMouseReleaseEvent");
+
RefPtr<FrameView> protector(m_frame->view());
m_frame->selection().setCaretBlinkingSuspended(false);
@@ -3577,6 +3597,8 @@ HitTestResult EventHandler::hitTestResultInFrame(LocalFrame* frame, const Layout
bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
{
+ TRACE_EVENT0("webkit", "EventHandler::handleTouchEvent");
+
// First build up the lists to use for the 'touches', 'targetTouches' and 'changedTouches' attributes
// in the JS event. See http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/
// for an overview of how these lists fit together.
« no previous file with comments | « Source/core/events/EventDispatcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698