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

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

Issue 298133003: Expose fractional TouchEvent coordinates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make layout test output stable across platforms Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/inspector/InspectorClient.h" 36 #include "core/inspector/InspectorClient.h"
37 #include "core/page/Chrome.h" 37 #include "core/page/Chrome.h"
38 #include "core/page/EventHandler.h" 38 #include "core/page/EventHandler.h"
39 #include "core/page/Page.h" 39 #include "core/page/Page.h"
40 #include "platform/JSONValues.h" 40 #include "platform/JSONValues.h"
41 #include "platform/PlatformKeyboardEvent.h" 41 #include "platform/PlatformKeyboardEvent.h"
42 #include "platform/PlatformMouseEvent.h" 42 #include "platform/PlatformMouseEvent.h"
43 #include "platform/PlatformTouchEvent.h" 43 #include "platform/PlatformTouchEvent.h"
44 #include "platform/PlatformTouchPoint.h" 44 #include "platform/PlatformTouchPoint.h"
45 #include "platform/geometry/FloatSize.h"
45 #include "platform/geometry/IntPoint.h" 46 #include "platform/geometry/IntPoint.h"
46 #include "platform/geometry/IntRect.h" 47 #include "platform/geometry/IntRect.h"
47 #include "platform/geometry/IntSize.h" 48 #include "platform/geometry/IntSize.h"
48 #include "wtf/CurrentTime.h" 49 #include "wtf/CurrentTime.h"
49 50
50 namespace { 51 namespace {
51 52
52 class SyntheticInspectorTouchPoint : public WebCore::PlatformTouchPoint { 53 class SyntheticInspectorTouchPoint : public WebCore::PlatformTouchPoint {
53 public: 54 public:
54 SyntheticInspectorTouchPoint(unsigned id, State state, const WebCore::IntPoi nt& screenPos, const WebCore::IntPoint& pos, int radiusX, int radiusY, double ro tationAngle, double force) 55 SyntheticInspectorTouchPoint(unsigned id, State state, const WebCore::IntPoi nt& screenPos, const WebCore::IntPoint& pos, int radiusX, int radiusY, double ro tationAngle, double force)
55 { 56 {
56 m_id = id; 57 m_id = id;
57 m_screenPos = screenPos; 58 m_screenPos = screenPos;
58 m_pos = pos; 59 m_pos = pos;
59 m_state = state; 60 m_state = state;
60 m_radiusY = radiusY; 61 m_radius = WebCore::FloatSize(radiusX, radiusY);
61 m_radiusX = radiusX;
62 m_rotationAngle = rotationAngle; 62 m_rotationAngle = rotationAngle;
63 m_force = force; 63 m_force = force;
64 } 64 }
65 }; 65 };
66 66
67 class SyntheticInspectorTouchEvent : public WebCore::PlatformTouchEvent { 67 class SyntheticInspectorTouchEvent : public WebCore::PlatformTouchEvent {
68 public: 68 public:
69 SyntheticInspectorTouchEvent(const WebCore::PlatformEvent::Type type, unsign ed modifiers, double timestamp) 69 SyntheticInspectorTouchEvent(const WebCore::PlatformEvent::Type type, unsign ed modifiers, double timestamp)
70 { 70 {
71 m_type = type; 71 m_type = type;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 SyntheticInspectorTouchPoint point(id++, convertedState, globalPoint, co nvertedPoint, radiusX, radiusY, rotationAngle, force); 266 SyntheticInspectorTouchPoint point(id++, convertedState, globalPoint, co nvertedPoint, radiusX, radiusY, rotationAngle, force);
267 event.append(point); 267 event.append(point);
268 } 268 }
269 269
270 m_page->mainFrame()->eventHandler().handleTouchEvent(event); 270 m_page->mainFrame()->eventHandler().handleTouchEvent(event);
271 } 271 }
272 272
273 } // namespace WebCore 273 } // namespace WebCore
274 274
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698