Title: [171894] trunk/Source/WebInspectorUI
- Revision
- 171894
- Author
- [email protected]
- Date
- 2014-07-31 16:17:15 -0700 (Thu, 31 Jul 2014)
Log Message
Web Inspector: Timeline recording is not working inspecting iOS 7 and earlier
https://bugs.webkit.org/show_bug.cgi?id=135466
Patch by Joseph Pecoraro <[email protected]> on 2014-07-31
Reviewed by Timothy Hatcher.
Start / stop capturing for older backends that won't emit start / stop events.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Agent.prototype.hasEvent):
Provide a way to check if an event is supported.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing):
Fallback to starting and stopping capturing manually if the backend
does not provide the events.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171893 => 171894)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-31 22:56:30 UTC (rev 171893)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-31 23:17:15 UTC (rev 171894)
@@ -1,3 +1,22 @@
+2014-07-31 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Timeline recording is not working inspecting iOS 7 and earlier
+ https://bugs.webkit.org/show_bug.cgi?id=135466
+
+ Reviewed by Timothy Hatcher.
+
+ Start / stop capturing for older backends that won't emit start / stop events.
+
+ * UserInterface/Protocol/InspectorBackend.js:
+ (InspectorBackend.Agent.prototype.hasEvent):
+ Provide a way to check if an event is supported.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager.prototype.startCapturing):
+ (WebInspector.TimelineManager.prototype.stopCapturing):
+ Fallback to starting and stopping capturing manually if the backend
+ does not provide the events.
+
2014-07-31 Jonathan Wells <[email protected]>
Web Inspector: Sync button look and feel with Xcode updates.
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (171893 => 171894)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2014-07-31 22:56:30 UTC (rev 171893)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2014-07-31 23:17:15 UTC (rev 171894)
@@ -62,11 +62,19 @@
startCapturing: function()
{
TimelineAgent.start();
+
+ // COMPATIBILITY (iOS 7): recordingStarted event did not exist yet. Start explicitly.
+ if (!TimelineAgent.hasEvent("recordingStarted"))
+ this.capturingStarted();
},
stopCapturing: function()
{
TimelineAgent.stop();
+
+ // COMPATIBILITY (iOS 7): recordingStopped event did not exist yet. Stop explicitly.
+ if (!TimelineAgent.hasEvent("recordingStopped"))
+ this.capturingStopped();
},
capturingStarted: function()
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js (171893 => 171894)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2014-07-31 22:56:30 UTC (rev 171893)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2014-07-31 23:17:15 UTC (rev 171894)
@@ -306,6 +306,11 @@
return this._events[eventName];
},
+ hasEvent: function(eventName)
+ {
+ return eventName in this._events;
+ },
+
dispatchEvent: function(eventName, eventArguments)
{
if (!(eventName in this._dispatcher)) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes