Diff
Modified: trunk/Source/WebCore/ChangeLog (137750 => 137751)
--- trunk/Source/WebCore/ChangeLog 2012-12-14 17:19:36 UTC (rev 137750)
+++ trunk/Source/WebCore/ChangeLog 2012-12-14 17:21:20 UTC (rev 137751)
@@ -1,3 +1,17 @@
+2012-12-14 Yury Semikhatsky <[email protected]>
+
+ Web Inspector: optional parameters of protocol commands should go after required ones
+ https://bugs.webkit.org/show_bug.cgi?id=105019
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/Inspector.json: Moved required x and y parameters declaration before
+ optional ones.
+ * inspector/InspectorInputAgent.cpp:
+ (WebCore::InspectorInputAgent::dispatchMouseEvent):
+ * inspector/InspectorInputAgent.h:
+ (InspectorInputAgent):
+
2012-12-14 Jessie Berlin <[email protected]>
Mac build fix after r137724.
Modified: trunk/Source/WebCore/inspector/Inspector.json (137750 => 137751)
--- trunk/Source/WebCore/inspector/Inspector.json 2012-12-14 17:19:36 UTC (rev 137750)
+++ trunk/Source/WebCore/inspector/Inspector.json 2012-12-14 17:21:20 UTC (rev 137751)
@@ -3291,12 +3291,12 @@
"name": "dispatchMouseEvent",
"parameters": [
{ "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." },
+ { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
+ { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
{ "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
{ "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
{ "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." },
- { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." },
- { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
- { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."}
+ { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." }
],
"description": "Dispatches a mouse event to the page."
}
Modified: trunk/Source/WebCore/inspector/InspectorInputAgent.cpp (137750 => 137751)
--- trunk/Source/WebCore/inspector/InspectorInputAgent.cpp 2012-12-14 17:19:36 UTC (rev 137750)
+++ trunk/Source/WebCore/inspector/InspectorInputAgent.cpp 2012-12-14 17:21:20 UTC (rev 137751)
@@ -93,7 +93,7 @@
m_page->mainFrame()->eventHandler()->keyEvent(event);
}
-void InspectorInputAgent::dispatchMouseEvent(ErrorString* error, const String& type, const int* modifiers, const double* timestamp, const String* button, const int* clickCount, int x, int y)
+void InspectorInputAgent::dispatchMouseEvent(ErrorString* error, const String& type, int x, int y, const int* modifiers, const double* timestamp, const String* button, const int* clickCount)
{
PlatformEvent::Type convertedType;
if (type == "mousePressed")
Modified: trunk/Source/WebCore/inspector/InspectorInputAgent.h (137750 => 137751)
--- trunk/Source/WebCore/inspector/InspectorInputAgent.h 2012-12-14 17:19:36 UTC (rev 137750)
+++ trunk/Source/WebCore/inspector/InspectorInputAgent.h 2012-12-14 17:21:20 UTC (rev 137751)
@@ -57,7 +57,7 @@
// Methods called from the frontend for simulating input.
virtual void dispatchKeyEvent(ErrorString*, const String& type, const int* modifiers, const double* timestamp, const String* text, const String* unmodifiedText, const String* keyIdentifier, const int* windowsVirtualKeyCode, const int* nativeVirtualKeyCode, const int* macCharCode, const bool* autoRepeat, const bool* isKeypad, const bool* isSystemKey);
- virtual void dispatchMouseEvent(ErrorString*, const String& type, const int* modifiers, const double* timestamp, const String* button, const int* clickCount, int x, int y);
+ virtual void dispatchMouseEvent(ErrorString*, const String& type, int x, int y, const int* modifiers, const double* timestamp, const String* button, const int* clickCount);
private:
InspectorInputAgent(InstrumentingAgents*, InspectorState*, Page*);