Title: [191732] trunk/Source
Revision
191732
Author
commit-qu...@webkit.org
Date
2015-10-29 10:20:42 -0700 (Thu, 29 Oct 2015)

Log Message

Web Inspector: Clean up and audit TimelineRecordFactory records
https://bugs.webkit.org/show_bug.cgi?id=150660

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-10-29
Reviewed by Brian Burg.

Source/WebCore:

Cleanup included removing unused methods and payload data that the
frontend wasn't likely to use. Also added ASCIILiteral and removed
unnecessary includes.

* inspector/InspectorNetworkAgent.cpp:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willLayout):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createFunctionCallData):
(WebCore::TimelineRecordFactory::createConsoleProfileData):
(WebCore::TimelineRecordFactory::createEventDispatchData):
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
(WebCore::TimelineRecordFactory::createEvaluateScriptData):
(WebCore::TimelineRecordFactory::createTimeStampData):
(WebCore::TimelineRecordFactory::createParseHTMLData):
(WebCore::TimelineRecordFactory::createAnimationFrameData):
(WebCore::TimelineRecordFactory::createPaintData):
(WebCore::TimelineRecordFactory::appendLayoutRoot):
(WebCore::TimelineRecordFactory::createBackgroundRecord): Deleted.
(WebCore::TimelineRecordFactory::createLayoutData): Deleted.
* inspector/TimelineRecordFactory.h:
(WebCore::TimelineRecordFactory::TimelineRecordFactory):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
Add FIXME for payload data which we are not yet using but could.
Fix typo in some rAF records where we were mistakenly using "timerId"
instead of "id" for the request identifier.

* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
Display the now correctly accessed rAF identifier in the Scripts timeline.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (191731 => 191732)


--- trunk/Source/WebCore/ChangeLog	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/ChangeLog	2015-10-29 17:20:42 UTC (rev 191732)
@@ -1,3 +1,37 @@
+2015-10-29  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Clean up and audit TimelineRecordFactory records
+        https://bugs.webkit.org/show_bug.cgi?id=150660
+
+        Reviewed by Brian Burg.
+
+        Cleanup included removing unused methods and payload data that the
+        frontend wasn't likely to use. Also added ASCIILiteral and removed
+        unnecessary includes.
+
+        * inspector/InspectorNetworkAgent.cpp:
+        * inspector/InspectorPageAgent.cpp:
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::willLayout):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::TimelineRecordFactory::createGenericRecord):
+        (WebCore::TimelineRecordFactory::createFunctionCallData):
+        (WebCore::TimelineRecordFactory::createConsoleProfileData):
+        (WebCore::TimelineRecordFactory::createEventDispatchData):
+        (WebCore::TimelineRecordFactory::createGenericTimerData):
+        (WebCore::TimelineRecordFactory::createTimerInstallData):
+        (WebCore::TimelineRecordFactory::createEvaluateScriptData):
+        (WebCore::TimelineRecordFactory::createTimeStampData):
+        (WebCore::TimelineRecordFactory::createParseHTMLData):
+        (WebCore::TimelineRecordFactory::createAnimationFrameData):
+        (WebCore::TimelineRecordFactory::createPaintData):
+        (WebCore::TimelineRecordFactory::appendLayoutRoot):
+        (WebCore::TimelineRecordFactory::createBackgroundRecord): Deleted.
+        (WebCore::TimelineRecordFactory::createLayoutData): Deleted.
+        * inspector/TimelineRecordFactory.h:
+        (WebCore::TimelineRecordFactory::TimelineRecordFactory):
+
 2015-10-29  Said Abou-Hallawa  <sabouhall...@apple.com>
 
         Exploitable crash happens when an SVG contains an indirect resource inheritance cycle

Modified: trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp (191731 => 191732)


--- trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/inspector/InspectorNetworkAgent.cpp	2015-10-29 17:20:42 UTC (rev 191732)
@@ -66,6 +66,7 @@
 #include <inspector/ScriptCallStack.h>
 #include <inspector/ScriptCallStackFactory.h>
 #include <wtf/RefPtr.h>
+#include <wtf/Stopwatch.h>
 #include <wtf/text/StringBuilder.h>
 
 using namespace Inspector;

Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (191731 => 191732)


--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp	2015-10-29 17:20:42 UTC (rev 191732)
@@ -72,6 +72,7 @@
 #include <inspector/IdentifiersFactory.h>
 #include <inspector/InspectorValues.h>
 #include <wtf/ListHashSet.h>
+#include <wtf/Stopwatch.h>
 #include <wtf/text/Base64.h>
 #include <wtf/text/StringBuilder.h>
 #include <yarr/RegularExpression.h>

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (191731 => 191732)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2015-10-29 17:20:42 UTC (rev 191732)
@@ -35,23 +35,16 @@
 
 #include "Event.h"
 #include "Frame.h"
-#include "FrameView.h"
 #include "InspectorPageAgent.h"
 #include "InstrumentingAgents.h"
-#include "IntRect.h"
 #include "JSDOMWindow.h"
-#include "MainFrame.h"
 #include "PageScriptDebugServer.h"
-#include "RenderElement.h"
 #include "RenderView.h"
-#include "ResourceRequest.h"
-#include "ResourceResponse.h"
 #include "ScriptState.h"
 #include "TimelineRecordFactory.h"
-#include <inspector/IdentifiersFactory.h>
 #include <inspector/ScriptBreakpoint.h>
 #include <profiler/LegacyProfiler.h>
-#include <wtf/CurrentTime.h>
+#include <wtf/Stopwatch.h>
 
 #if PLATFORM(IOS)
 #include "RuntimeApplicationChecksIOS.h"
@@ -340,20 +333,7 @@
 
 void InspectorTimelineAgent::willLayout(Frame& frame)
 {
-    auto* root = frame.view()->layoutRoot();
-    bool partialLayout = !!root;
-
-    if (!partialLayout)
-        root = frame.contentRenderer();
-
-    unsigned dirtyObjects = 0;
-    unsigned totalObjects = 0;
-    for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) {
-        ++totalObjects;
-        if (o->needsLayout())
-            ++dirtyObjects;
-    }
-    pushCurrentRecord(TimelineRecordFactory::createLayoutData(dirtyObjects, totalObjects, partialLayout), TimelineRecordType::Layout, true, &frame);
+    pushCurrentRecord(InspectorObject::create(), TimelineRecordType::Layout, true, &frame);
 }
 
 void InspectorTimelineAgent::didLayout(RenderObject* root)

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (191731 => 191732)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h	2015-10-29 17:20:42 UTC (rev 191732)
@@ -39,9 +39,7 @@
 #include <inspector/InspectorFrontendDispatchers.h>
 #include <inspector/InspectorValues.h>
 #include <inspector/ScriptDebugListener.h>
-#include <wtf/Stopwatch.h>
 #include <wtf/Vector.h>
-#include <wtf/WeakPtr.h>
 
 namespace JSC {
 class Profile;
@@ -53,13 +51,8 @@
 class FloatQuad;
 class Frame;
 class InspectorPageAgent;
-class IntRect;
-class URL;
-class Page;
 class PageScriptDebugServer;
 class RenderObject;
-class ResourceRequest;
-class ResourceResponse;
 class RunLoopObserver;
 
 typedef String ErrorString;

Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp (191731 => 191732)


--- trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp	2015-10-29 17:20:42 UTC (rev 191732)
@@ -34,11 +34,7 @@
 
 #include "Event.h"
 #include "FloatQuad.h"
-#include "IntRect.h"
 #include "JSMainThreadExecState.h"
-#include "LayoutRect.h"
-#include "ResourceRequest.h"
-#include "ResourceResponse.h"
 #include <inspector/InspectorProtocolObjects.h>
 #include <inspector/ScriptBreakpoint.h>
 #include <inspector/ScriptCallStack.h>
@@ -52,36 +48,28 @@
 Ref<InspectorObject> TimelineRecordFactory::createGenericRecord(double startTime, int maxCallStackDepth)
 {
     Ref<InspectorObject> record = InspectorObject::create();
-    record->setDouble("startTime", startTime);
+    record->setDouble(ASCIILiteral("startTime"), startTime);
 
     if (maxCallStackDepth) {
         RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(JSMainThreadExecState::currentState(), maxCallStackDepth);
         if (stackTrace && stackTrace->size())
-            record->setValue("stackTrace", stackTrace->buildInspectorArray());
+            record->setValue(ASCIILiteral("stackTrace"), stackTrace->buildInspectorArray());
     }
     return WTF::move(record);
 }
 
-Ref<InspectorObject> TimelineRecordFactory::createBackgroundRecord(double startTime, const String& threadName)
-{
-    Ref<InspectorObject> record = InspectorObject::create();
-    record->setDouble("startTime", startTime);
-    record->setString("thread", threadName);
-    return WTF::move(record);
-}
-
 Ref<InspectorObject> TimelineRecordFactory::createFunctionCallData(const String& scriptName, int scriptLine)
 {
     Ref<InspectorObject> data = ""
-    data->setString("scriptName", scriptName);
-    data->setInteger("scriptLine", scriptLine);
+    data->setString(ASCIILiteral("scriptName"), scriptName);
+    data->setInteger(ASCIILiteral("scriptLine"), scriptLine);
     return WTF::move(data);
 }
 
 Ref<InspectorObject> TimelineRecordFactory::createConsoleProfileData(const String& title)
 {
     Ref<InspectorObject> data = ""
-    data->setString("title", title);
+    data->setString(ASCIILiteral("title"), title);
     return WTF::move(data);
 }
 
@@ -96,61 +84,52 @@
 Ref<InspectorObject> TimelineRecordFactory::createEventDispatchData(const Event& event)
 {
     Ref<InspectorObject> data = ""
-    data->setString("type", event.type().string());
+    data->setString(ASCIILiteral("type"), event.type().string());
     return WTF::move(data);
 }
 
 Ref<InspectorObject> TimelineRecordFactory::createGenericTimerData(int timerId)
 {
     Ref<InspectorObject> data = ""
-    data->setInteger("timerId", timerId);
+    data->setInteger(ASCIILiteral("timerId"), timerId);
     return WTF::move(data);
 }
 
 Ref<InspectorObject> TimelineRecordFactory::createTimerInstallData(int timerId, int timeout, bool singleShot)
 {
     Ref<InspectorObject> data = ""
-    data->setInteger("timerId", timerId);
-    data->setInteger("timeout", timeout);
-    data->setBoolean("singleShot", singleShot);
+    data->setInteger(ASCIILiteral("timerId"), timerId);
+    data->setInteger(ASCIILiteral("timeout"), timeout);
+    data->setBoolean(ASCIILiteral("singleShot"), singleShot);
     return WTF::move(data);
 }
 
 Ref<InspectorObject> TimelineRecordFactory::createEvaluateScriptData(const String& url, double lineNumber)
 {
     Ref<InspectorObject> data = ""
-    data->setString("url", url);
-    data->setInteger("lineNumber", lineNumber);
+    data->setString(ASCIILiteral("url"), url);
+    data->setInteger(ASCIILiteral("lineNumber"), lineNumber);
     return WTF::move(data);
 }
 
 Ref<InspectorObject> TimelineRecordFactory::createTimeStampData(const String& message)
 {
     Ref<InspectorObject> data = ""
-    data->setString("message", message);
+    data->setString(ASCIILiteral("message"), message);
     return WTF::move(data);
 }
 
-Ref<InspectorObject> TimelineRecordFactory::createLayoutData(unsigned dirtyObjects, unsigned totalObjects, bool partialLayout)
-{
-    Ref<InspectorObject> data = ""
-    data->setInteger("dirtyObjects", dirtyObjects);
-    data->setInteger("totalObjects", totalObjects);
-    data->setBoolean("partialLayout", partialLayout);
-    return WTF::move(data);
-}
-
 Ref<InspectorObject> TimelineRecordFactory::createParseHTMLData(unsigned startLine)
 {
     Ref<InspectorObject> data = ""
-    data->setInteger("startLine", startLine);
+    data->setInteger(ASCIILiteral("startLine"), startLine);
     return WTF::move(data);
 }
 
 Ref<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int callbackId)
 {
     Ref<InspectorObject> data = ""
-    data->setInteger("id", callbackId);
+    data->setInteger(ASCIILiteral("id"), callbackId);
     return WTF::move(data);
 }
 
@@ -171,13 +150,13 @@
 Ref<InspectorObject> TimelineRecordFactory::createPaintData(const FloatQuad& quad)
 {
     Ref<InspectorObject> data = ""
-    data->setArray("clip", createQuad(quad));
+    data->setArray(ASCIILiteral("clip"), createQuad(quad));
     return WTF::move(data);
 }
 
 void TimelineRecordFactory::appendLayoutRoot(InspectorObject* data, const FloatQuad& quad)
 {
-    data->setArray("root", createQuad(quad));
+    data->setArray(ASCIILiteral("root"), createQuad(quad));
 }
 
 static Ref<Protocol::Timeline::CPUProfileNodeAggregateCallInfo> buildAggregateCallInfoInspectorObject(const JSC::ProfileNode* node)

Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.h (191731 => 191732)


--- trunk/Source/WebCore/inspector/TimelineRecordFactory.h	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.h	2015-10-29 17:20:42 UTC (rev 191732)
@@ -32,7 +32,6 @@
 #ifndef TimelineRecordFactory_h
 #define TimelineRecordFactory_h
 
-#include "URL.h"
 #include <inspector/InspectorValues.h>
 #include <wtf/Forward.h>
 #include <wtf/text/WTFString.h>
@@ -47,48 +46,32 @@
 
 namespace WebCore {
 
-    class Event;
-    class FloatQuad;
-    class ResourceRequest;
-    class ResourceResponse;
-    class ScriptProfile;
+class Event;
+class FloatQuad;
 
-    class TimelineRecordFactory {
-    public:
-        static Ref<Inspector::InspectorObject> createGenericRecord(double startTime, int maxCallStackDepth);
-        static Ref<Inspector::InspectorObject> createBackgroundRecord(double startTime, const String& thread);
+class TimelineRecordFactory {
+public:
+    static Ref<Inspector::InspectorObject> createGenericRecord(double startTime, int maxCallStackDepth);
 
-        static Ref<Inspector::InspectorObject> createFunctionCallData(const String& scriptName, int scriptLine);
-        static Ref<Inspector::InspectorObject> createConsoleProfileData(const String& title);
+    static Ref<Inspector::InspectorObject> createFunctionCallData(const String& scriptName, int scriptLine);
+    static Ref<Inspector::InspectorObject> createConsoleProfileData(const String& title);
+    static Ref<Inspector::InspectorObject> createProbeSampleData(const Inspector::ScriptBreakpointAction&, unsigned sampleId);
+    static Ref<Inspector::InspectorObject> createEventDispatchData(const Event&);
+    static Ref<Inspector::InspectorObject> createGenericTimerData(int timerId);
+    static Ref<Inspector::InspectorObject> createTimerInstallData(int timerId, int timeout, bool singleShot);
+    static Ref<Inspector::InspectorObject> createEvaluateScriptData(const String&, double lineNumber);
+    static Ref<Inspector::InspectorObject> createTimeStampData(const String&);
+    static Ref<Inspector::InspectorObject> createParseHTMLData(unsigned startLine);
+    static Ref<Inspector::InspectorObject> createAnimationFrameData(int callbackId);
+    static Ref<Inspector::InspectorObject> createPaintData(const FloatQuad&);
 
-        static Ref<Inspector::InspectorObject> createProbeSampleData(const Inspector::ScriptBreakpointAction&, unsigned sampleId);
+    static void appendLayoutRoot(Inspector::InspectorObject* data, const FloatQuad&);
+    static void appendProfile(Inspector::InspectorObject*, RefPtr<JSC::Profile>&&);
 
-        static Ref<Inspector::InspectorObject> createEventDispatchData(const Event&);
+private:
+    TimelineRecordFactory() { }
+};
 
-        static Ref<Inspector::InspectorObject> createGenericTimerData(int timerId);
-
-        static Ref<Inspector::InspectorObject> createTimerInstallData(int timerId, int timeout, bool singleShot);
-
-        static Ref<Inspector::InspectorObject> createEvaluateScriptData(const String&, double lineNumber);
-
-        static Ref<Inspector::InspectorObject> createTimeStampData(const String&);
-
-        static Ref<Inspector::InspectorObject> createLayoutData(unsigned dirtyObjects, unsigned totalObjects, bool partialLayout);
-
-        static Ref<Inspector::InspectorObject> createParseHTMLData(unsigned startLine);
-
-        static Ref<Inspector::InspectorObject> createAnimationFrameData(int callbackId);
-
-        static Ref<Inspector::InspectorObject> createPaintData(const FloatQuad&);
-
-        static void appendLayoutRoot(Inspector::InspectorObject* data, const FloatQuad&);
-
-        static void appendProfile(Inspector::InspectorObject*, RefPtr<JSC::Profile>&&);
-
-    private:
-        TimelineRecordFactory() { }
-    };
-
 } // namespace WebCore
 
 #endif // !defined(TimelineRecordFactory_h)

Modified: trunk/Source/WebInspectorUI/ChangeLog (191731 => 191732)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-10-29 17:20:42 UTC (rev 191732)
@@ -1,3 +1,22 @@
+2015-10-29  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Clean up and audit TimelineRecordFactory records
+        https://bugs.webkit.org/show_bug.cgi?id=150660
+
+        Reviewed by Brian Burg.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Controllers/TimelineManager.js:
+        (WebInspector.TimelineManager.prototype._processRecord):
+        (WebInspector.TimelineManager.prototype._processEvent):
+        Add FIXME for payload data which we are not yet using but could.
+        Fix typo in some rAF records where we were mistakenly using "timerId"
+        instead of "id" for the request identifier.
+
+        * UserInterface/Models/ScriptTimelineRecord.js:
+        (WebInspector.ScriptTimelineRecord.EventType.displayName):
+        Display the now correctly accessed rAF identifier in the Scripts timeline.
+
 2015-10-28  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Add "revert" to CSS value autocompletion

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (191731 => 191732)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2015-10-29 17:20:42 UTC (rev 191732)
@@ -66,6 +66,9 @@
 localizedStrings["An unexpected error occurred."] = "An unexpected error occurred.";
 localizedStrings["Angle"] = "Angle";
 localizedStrings["Animation"] = "Animation";
+localizedStrings["Animation Frame %s Canceled"] = "Animation Frame %s Canceled";
+localizedStrings["Animation Frame %s Fired"] = "Animation Frame %s Fired";
+localizedStrings["Animation Frame %s Requested"] = "Animation Frame %s Requested";
 localizedStrings["Animation Frame Canceled"] = "Animation Frame Canceled";
 localizedStrings["Animation Frame Fired"] = "Animation Frame Fired";
 localizedStrings["Animation Frame Requested"] = "Animation Frame Requested";
@@ -114,7 +117,6 @@
 localizedStrings["Click Listener"] = "Click Listener";
 localizedStrings["Click or press the spacebar to record."] = "Click or press the spacebar to record.";
 localizedStrings["Click or press the spacebar to stop recording."] = "Click or press the spacebar to stop recording.";
-localizedStrings["Click to add a new item."] = "Click to add a new item.";
 localizedStrings["Click to add a new rule."] = "Click to add a new rule.";
 localizedStrings["Click to clear modified properties"] = "Click to clear modified properties";
 localizedStrings["Click to close this tab"] = "Click to close this tab";

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (191731 => 191732)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js	2015-10-29 17:20:42 UTC (rev 191732)
@@ -384,6 +384,7 @@
             console.assert(isNaN(endTime));
 
             // Pass the startTime as the endTime since this record type has no duration.
+            // FIXME: Make use of "timeout" and "singleShot" payload properties.
             return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.TimerInstalled, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.timerId);
 
         case TimelineAgent.EventType.TimerRemove:
@@ -396,13 +397,13 @@
             console.assert(isNaN(endTime));
 
             // Pass the startTime as the endTime since this record type has no duration.
-            return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameRequested, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.timerId);
+            return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameRequested, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.id);
 
         case TimelineAgent.EventType.CancelAnimationFrame:
             console.assert(isNaN(endTime));
 
             // Pass the startTime as the endTime since this record type has no duration.
-            return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameCanceled, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.timerId);
+            return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameCanceled, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.id);
         }
 
         return null;
@@ -412,6 +413,7 @@
     {
         switch (recordPayload.type) {
         case TimelineAgent.EventType.TimeStamp:
+            // FIXME: Make use of "message" payload properties.
             var timestamp = this.activeRecording.computeElapsedTime(recordPayload.startTime);
             var eventMarker = new WebInspector.TimelineMarker(timestamp, WebInspector.TimelineMarker.Type.TimeStamp);
             this._activeRecording.addEventMarker(eventMarker);

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js (191731 => 191732)


--- trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js	2015-10-29 17:12:43 UTC (rev 191731)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js	2015-10-29 17:20:42 UTC (rev 191732)
@@ -365,10 +365,16 @@
             return WebInspector.UIString("Timer %s Removed").format(details);
         return WebInspector.UIString("Timer Removed");
     case WebInspector.ScriptTimelineRecord.EventType.AnimationFrameFired:
+        if (details && includeDetailsInMainTitle)
+            return WebInspector.UIString("Animation Frame %s Fired").format(details);
         return WebInspector.UIString("Animation Frame Fired");
     case WebInspector.ScriptTimelineRecord.EventType.AnimationFrameRequested:
+        if (details && includeDetailsInMainTitle)
+            return WebInspector.UIString("Animation Frame %s Requested").format(details);
         return WebInspector.UIString("Animation Frame Requested");
     case WebInspector.ScriptTimelineRecord.EventType.AnimationFrameCanceled:
+        if (details && includeDetailsInMainTitle)
+            return WebInspector.UIString("Animation Frame %s Canceled").format(details);
         return WebInspector.UIString("Animation Frame Canceled");
     }
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to