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

Side by Side Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 490783003: Reduce hit test on ShowPress by moving event targeting to WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update hit test counts Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 26 matching lines...) Expand all
37 #include "core/dom/PseudoElement.h" 37 #include "core/dom/PseudoElement.h"
38 #include "core/frame/FrameView.h" 38 #include "core/frame/FrameView.h"
39 #include "core/frame/LocalFrame.h" 39 #include "core/frame/LocalFrame.h"
40 #include "core/frame/Settings.h" 40 #include "core/frame/Settings.h"
41 #include "core/inspector/InspectorClient.h" 41 #include "core/inspector/InspectorClient.h"
42 #include "core/inspector/InspectorOverlayHost.h" 42 #include "core/inspector/InspectorOverlayHost.h"
43 #include "core/loader/EmptyClients.h" 43 #include "core/loader/EmptyClients.h"
44 #include "core/loader/FrameLoadRequest.h" 44 #include "core/loader/FrameLoadRequest.h"
45 #include "core/page/Chrome.h" 45 #include "core/page/Chrome.h"
46 #include "core/page/EventHandler.h" 46 #include "core/page/EventHandler.h"
47 #include "core/page/EventWithHitTestResults.h"
47 #include "core/page/Page.h" 48 #include "core/page/Page.h"
48 #include "core/rendering/RenderBox.h" 49 #include "core/rendering/RenderBox.h"
49 #include "core/rendering/RenderBoxModelObject.h" 50 #include "core/rendering/RenderBoxModelObject.h"
50 #include "core/rendering/RenderInline.h" 51 #include "core/rendering/RenderInline.h"
51 #include "core/rendering/RenderObject.h" 52 #include "core/rendering/RenderObject.h"
52 #include "core/rendering/shapes/ShapeOutsideInfo.h" 53 #include "core/rendering/shapes/ShapeOutsideInfo.h"
53 #include "core/rendering/style/RenderStyleConstants.h" 54 #include "core/rendering/style/RenderStyleConstants.h"
54 #include "platform/JSONValues.h" 55 #include "platform/JSONValues.h"
55 #include "platform/PlatformMouseEvent.h" 56 #include "platform/PlatformMouseEvent.h"
56 #include "platform/ScriptForbiddenScope.h" 57 #include "platform/ScriptForbiddenScope.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 void InspectorOverlay::invalidate() 363 void InspectorOverlay::invalidate()
363 { 364 {
364 m_client->highlight(); 365 m_client->highlight();
365 } 366 }
366 367
367 bool InspectorOverlay::handleGestureEvent(const PlatformGestureEvent& event) 368 bool InspectorOverlay::handleGestureEvent(const PlatformGestureEvent& event)
368 { 369 {
369 if (isEmpty()) 370 if (isEmpty())
370 return false; 371 return false;
371 372
372 return toLocalFrame(overlayPage()->mainFrame())->eventHandler().handleGestur eEvent(event); 373 GestureEventWithHitTestResults targetedEvent =
374 toLocalFrame(overlayPage()->mainFrame())->eventHandler().targetGestureEv ent(event);
Rick Byers 2014/08/20 23:59:32 Perhaps you should keep a trivial version of Event
Zeeshan Qureshi 2014/08/21 04:59:25 Done.
375 return toLocalFrame(overlayPage()->mainFrame())->eventHandler().handleGestur eEvent(targetedEvent);
373 } 376 }
374 377
375 bool InspectorOverlay::handleMouseEvent(const PlatformMouseEvent& event) 378 bool InspectorOverlay::handleMouseEvent(const PlatformMouseEvent& event)
376 { 379 {
377 if (isEmpty()) 380 if (isEmpty())
378 return false; 381 return false;
379 382
380 EventHandler& eventHandler = toLocalFrame(overlayPage()->mainFrame())->event Handler(); 383 EventHandler& eventHandler = toLocalFrame(overlayPage()->mainFrame())->event Handler();
381 switch (event.type()) { 384 switch (event.type()) {
382 case PlatformEvent::MouseMoved: 385 case PlatformEvent::MouseMoved:
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 hideHighlight(); 849 hideHighlight();
847 } 850 }
848 851
849 void InspectorOverlay::startedRecordingProfile() 852 void InspectorOverlay::startedRecordingProfile()
850 { 853 {
851 if (!m_activeProfilerCount++) 854 if (!m_activeProfilerCount++)
852 freePage(); 855 freePage();
853 } 856 }
854 857
855 } // namespace blink 858 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698