Unreviewed rollout r222036.
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 23:49:19 +0000 (23:49 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 23:49:19 +0000 (23:49 +0000)
The LayoutTests added with this change is flaky.

Source/WebCore:

Reverted changeset
Web Inspector: Timeline should show when events preventDefault() was called on an event or not
https://bugs.webkit.org/show_bug.cgi?id=176824
http://trac.webkit.org/changeset/222036

Source/WebInspectorUI:

This left in the Test.js, Test.html, InspectorBackend changes
needed by later patches. They are independent of the flakey test.

Reverted changeset
Web Inspector: Timeline should show when events preventDefault() was called on an event or not
https://bugs.webkit.org/show_bug.cgi?id=176824
http://trac.webkit.org/changeset/222036

LayoutTests:

Reverted changeset
Web Inspector: Timeline should show when events preventDefault() was called on an event or not
https://bugs.webkit.org/show_bug.cgi?id=176824
http://trac.webkit.org/changeset/222036

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/timeline/resources/timeline-event-utilities.js [deleted file]
LayoutTests/inspector/timeline/timeline-event-EventDispatch-expected.txt [deleted file]
LayoutTests/inspector/timeline/timeline-event-EventDispatch.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/TimelineRecordFactory.cpp
Source/WebCore/inspector/TimelineRecordFactory.h
Source/WebCore/page/DOMWindow.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js
Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js
Source/WebInspectorUI/UserInterface/Views/ScriptTimelineDataGridNode.js

index 0113aba..37da4cd 100644 (file)
@@ -1,3 +1,14 @@
+2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Unreviewed rollout r222036.
+        
+        The LayoutTests added with this change is flaky.
+
+        Reverted changeset
+        Web Inspector: Timeline should show when events preventDefault() was called on an event or not
+        https://bugs.webkit.org/show_bug.cgi?id=176824
+        http://trac.webkit.org/changeset/222036
+
 2017-09-14  Daniel Bates  <dabates@apple.com>
 
         Import CSS Pseudo Elements 4 Web Platform Tests
diff --git a/LayoutTests/inspector/timeline/resources/timeline-event-utilities.js b/LayoutTests/inspector/timeline/resources/timeline-event-utilities.js
deleted file mode 100644 (file)
index be21275..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-TestPage.registerInitializer(() => {
-    window.pageRecordingData = null;
-
-    window.captureTimelineWithScript = function(expression) {
-        pageRecordingData = null;
-
-        InspectorTest.log("Starting Capture...");
-        const newRecording = true;
-        WI.timelineManager.startCapturing(newRecording);
-        InspectorTest.evaluateInPage(expression);
-        InspectorTest.awaitEvent("FinishRecording").then((event) => {
-            InspectorTest.log("Stopping Capture...");
-            pageRecordingData = event.data;
-            WI.timelineManager.stopCapturing();
-        });
-
-        return WI.timelineManager.awaitEvent(WI.TimelineManager.Event.CapturingStopped);
-    }
-});
-
-function finishRecording(data) {
-    TestPage.dispatchEventToFrontend("FinishRecording", data);
-}
diff --git a/LayoutTests/inspector/timeline/timeline-event-EventDispatch-expected.txt b/LayoutTests/inspector/timeline/timeline-event-EventDispatch-expected.txt
deleted file mode 100644 (file)
index ff11c43..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Tests 'EventDispatch' Timeline event records.
-
-
-== Running test suite: TimelineEvent.EventDispatch
--- Running test case: TimelineEvent.EventDispatch.Handler.Regular
-Starting Capture...
-click handler fired
-Stopping Capture...
-PASS: Should be 1 EventDispatched record.
-DETAILS: {"type":"click","defaultPrevented":false}
-PASS: ScriptTimelineRecord extraDetails should show default was not prevented.
-
--- Running test case: TimelineEvent.EventDispatch.Handler.DefaultPrevented
-Starting Capture...
-click handler fired, will prevent default
-Stopping Capture...
-PASS: Should be 1 EventDispatched record.
-DETAILS: {"type":"click","defaultPrevented":true}
-PASS: ScriptTimelineRecord extraDetails should show default was prevented.
-
--- Running test case: TimelineEvent.EventDispatch.AttributeHandler.Regular
-Starting Capture...
-b1 onclick attribute handler fired
-Stopping Capture...
-PASS: Should be 1 EventDispatched record.
-DETAILS: {"type":"click","defaultPrevented":false}
-PASS: ScriptTimelineRecord extraDetails should show default was not prevented.
-
--- Running test case: TimelineEvent.EventDispatch.AttributeHandler.DefaultPrevented
-Starting Capture...
-b2 onclick attribute handler fired, will prevent default
-Stopping Capture...
-PASS: Should be 1 EventDispatched record.
-DETAILS: {"type":"click","defaultPrevented":true}
-PASS: ScriptTimelineRecord extraDetails should show default was prevented.
-
diff --git a/LayoutTests/inspector/timeline/timeline-event-EventDispatch.html b/LayoutTests/inspector/timeline/timeline-event-EventDispatch.html
deleted file mode 100644 (file)
index 53071c2..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script src="./resources/timeline-event-utilities.js"></script>
-<script>
-function testClickEventHandler({preventDefault}) {
-    let button = document.body.appendChild(document.createElement("button"));
-    button.addEventListener("click", (event) => {
-        TestPage.addResult("click handler fired" + (preventDefault ? ", will prevent default" : ""));
-        setTimeout(() => { finishRecording({preventDefault}); });
-        if (preventDefault)
-            event.preventDefault();
-    });
-
-    button.dispatchEvent(new MouseEvent("click", {bubbles: true, cancelable: true}));
-}
-
-function testClickEventAttributeHandler(id, {preventDefault}) {
-    let button = document.getElementById(id);
-    button.dispatchEvent(new MouseEvent("click", {bubbles: true, cancelable: true}));
-    setTimeout(() => { finishRecording({preventDefault}); });
-}
-
-function test()
-{
-    let suite = InspectorTest.createAsyncSuite("TimelineEvent.EventDispatch");
-
-    suite.addTestCase({
-        name: "TimelineEvent.EventDispatch.Handler.Regular",
-        test(resolve, reject) {
-            captureTimelineWithScript(`testClickEventHandler({preventDefault: false})`).then(() => {
-                InspectorTest.assert(typeof pageRecordingData.preventDefault === "boolean");
-
-                let recording = WI.timelineManager.activeRecording;
-                let scriptTimeline = recording.timelines.get(WI.TimelineRecord.Type.Script);
-                let records = scriptTimeline.records.filter((x) => x.eventType === WI.ScriptTimelineRecord.EventType.EventDispatched);
-                InspectorTest.expectEqual(records.length, 1, "Should be 1 EventDispatched record.");
-                for (let record of records) {
-                    InspectorTest.log("DETAILS: " + JSON.stringify(record.extraDetails));
-                    InspectorTest.expectEqual(record.extraDetails.defaultPrevented, pageRecordingData.preventDefault, "ScriptTimelineRecord extraDetails should show default was not prevented.");
-                }
-            }).then(resolve, reject);
-        }
-    });
-
-    suite.addTestCase({
-        name: "TimelineEvent.EventDispatch.Handler.DefaultPrevented",
-        test(resolve, reject) {
-            captureTimelineWithScript(`testClickEventHandler({preventDefault: true})`).then(() => {
-                InspectorTest.assert(typeof pageRecordingData.preventDefault === "boolean");
-
-                let recording = WI.timelineManager.activeRecording;
-                let scriptTimeline = recording.timelines.get(WI.TimelineRecord.Type.Script);
-                let records = scriptTimeline.records.filter((x) => x.eventType === WI.ScriptTimelineRecord.EventType.EventDispatched);
-                InspectorTest.expectEqual(records.length, 1, "Should be 1 EventDispatched record.");
-                for (let record of records) {
-                    InspectorTest.log("DETAILS: " + JSON.stringify(record.extraDetails));
-                    InspectorTest.expectEqual(record.extraDetails.defaultPrevented, pageRecordingData.preventDefault, "ScriptTimelineRecord extraDetails should show default was prevented.");
-                }
-            }).then(resolve, reject);
-        }
-    });
-
-    suite.addTestCase({
-        name: "TimelineEvent.EventDispatch.AttributeHandler.Regular",
-        test(resolve, reject) {
-            captureTimelineWithScript(`testClickEventAttributeHandler("b1", {preventDefault: false})`).then(() => {
-                InspectorTest.assert(typeof pageRecordingData.preventDefault === "boolean");
-
-                let recording = WI.timelineManager.activeRecording;
-                let scriptTimeline = recording.timelines.get(WI.TimelineRecord.Type.Script);
-                let records = scriptTimeline.records.filter((x) => x.eventType === WI.ScriptTimelineRecord.EventType.EventDispatched);
-                InspectorTest.expectEqual(records.length, 1, "Should be 1 EventDispatched record.");
-                for (let record of records) {
-                    InspectorTest.log("DETAILS: " + JSON.stringify(record.extraDetails));
-                    InspectorTest.expectEqual(record.extraDetails.defaultPrevented, pageRecordingData.preventDefault, "ScriptTimelineRecord extraDetails should show default was not prevented.");
-                }
-            }).then(resolve, reject);
-        }
-    });
-
-    suite.addTestCase({
-        name: "TimelineEvent.EventDispatch.AttributeHandler.DefaultPrevented",
-        test(resolve, reject) {
-            captureTimelineWithScript(`testClickEventAttributeHandler("b2", {preventDefault: true})`).then(() => {
-                InspectorTest.assert(typeof pageRecordingData.preventDefault === "boolean");
-
-                let recording = WI.timelineManager.activeRecording;
-                let scriptTimeline = recording.timelines.get(WI.TimelineRecord.Type.Script);
-                let records = scriptTimeline.records.filter((x) => x.eventType === WI.ScriptTimelineRecord.EventType.EventDispatched);
-                InspectorTest.expectEqual(records.length, 1, "Should be 1 EventDispatched record.");
-                for (let record of records) {
-                    InspectorTest.log("DETAILS: " + JSON.stringify(record.extraDetails));
-                    InspectorTest.expectEqual(record.extraDetails.defaultPrevented, pageRecordingData.preventDefault, "ScriptTimelineRecord extraDetails should show default was prevented.");
-                }
-            }).then(resolve, reject);
-        }
-    });
-
-    suite.runTestCasesAndFinish();
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>Tests 'EventDispatch' Timeline event records.</p>
-<button id="b1" onclick="TestPage.addResult('b1 onclick attribute handler fired'); return true"></button>
-<button id="b2" onclick="TestPage.addResult('b2 onclick attribute handler fired, will prevent default'); return false"></button>
-</body>
-</html>
index 7475d46..401a19a 100644 (file)
@@ -1,3 +1,14 @@
+2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Unreviewed rollout r222036.
+        
+        The LayoutTests added with this change is flaky.
+
+        Reverted changeset
+        Web Inspector: Timeline should show when events preventDefault() was called on an event or not
+        https://bugs.webkit.org/show_bug.cgi?id=176824
+        http://trac.webkit.org/changeset/222036
+
 2017-09-14  Ryosuke Niwa  <rniwa@webkit.org>
 
         WebContentReader::readWebArchive doesn't need to handle image MIME type
index 6856803..5a330a1 100644 (file)
@@ -299,7 +299,7 @@ void EventTarget::fireEventListeners(Event& event, EventListenerVector listeners
     }
 
     if (contextIsDocument)
-        InspectorInstrumentation::didDispatchEvent(willDispatchEventCookie, event.defaultPrevented());
+        InspectorInstrumentation::didDispatchEvent(willDispatchEventCookie);
 }
 
 const EventListenerVector& EventTarget::eventListeners(const AtomicString& eventType)
index 1ad137b..73e5934 100644 (file)
@@ -433,10 +433,10 @@ void InspectorInstrumentation::didHandleEventImpl(InstrumentingAgents& instrumen
         debuggerAgent->didDispatchAsyncCall();
 }
 
-void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentationCookie& cookie, bool defaultPrevented)
+void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentationCookie& cookie)
 {
     if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
-        timelineAgent->didDispatchEvent(defaultPrevented);
+        timelineAgent->didDispatchEvent();
 }
 
 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindowImpl(InstrumentingAgents& instrumentingAgents, const Event& event, DOMWindow& window)
@@ -451,10 +451,10 @@ InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWind
     return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
 }
 
-void InspectorInstrumentation::didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie& cookie, bool defaultPrevented)
+void InspectorInstrumentation::didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie& cookie)
 {
     if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
-        timelineAgent->didDispatchEvent(defaultPrevented);
+        timelineAgent->didDispatchEvent();
 }
 
 InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScriptImpl(InstrumentingAgents& instrumentingAgents, Frame& frame, const String& url, int lineNumber)
index c9fd165..250fa84 100644 (file)
@@ -147,11 +147,11 @@ public:
     static void didAddEventListener(EventTarget&, const AtomicString& eventType);
     static void willRemoveEventListener(EventTarget&, const AtomicString& eventType, EventListener&, bool capture);
     static InspectorInstrumentationCookie willDispatchEvent(Document&, const Event&, bool hasEventListeners);
-    static void didDispatchEvent(const InspectorInstrumentationCookie&, bool defaultPrevented);
+    static void didDispatchEvent(const InspectorInstrumentationCookie&);
     static void willHandleEvent(ScriptExecutionContext&, const Event&, const RegisteredEventListener&);
     static void didHandleEvent(ScriptExecutionContext&);
     static InspectorInstrumentationCookie willDispatchEventOnWindow(Frame*, const Event&, DOMWindow&);
-    static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&, bool defaultPrevented);
+    static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&);
     static InspectorInstrumentationCookie willEvaluateScript(Frame&, const String& url, int lineNumber);
     static void didEvaluateScript(const InspectorInstrumentationCookie&, Frame&);
     static InspectorInstrumentationCookie willFireTimer(ScriptExecutionContext&, int timerId);
@@ -321,9 +321,9 @@ private:
     static InspectorInstrumentationCookie willDispatchEventImpl(InstrumentingAgents&, Document&, const Event&, bool hasEventListeners);
     static void willHandleEventImpl(InstrumentingAgents&, const Event&, const RegisteredEventListener&);
     static void didHandleEventImpl(InstrumentingAgents&);
-    static void didDispatchEventImpl(const InspectorInstrumentationCookie&, bool defaultPrevented);
+    static void didDispatchEventImpl(const InspectorInstrumentationCookie&);
     static InspectorInstrumentationCookie willDispatchEventOnWindowImpl(InstrumentingAgents&, const Event&, DOMWindow&);
-    static void didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie&, bool defaultPrevented);
+    static void didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie&);
     static InspectorInstrumentationCookie willEvaluateScriptImpl(InstrumentingAgents&, Frame&, const String& url, int lineNumber);
     static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&, Frame&);
     static InspectorInstrumentationCookie willFireTimerImpl(InstrumentingAgents&, int timerId, ScriptExecutionContext&);
@@ -733,11 +733,11 @@ inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEven
     return InspectorInstrumentationCookie();
 }
 
-inline void InspectorInstrumentation::didDispatchEvent(const InspectorInstrumentationCookie& cookie, bool defaultPrevented)
+inline void InspectorInstrumentation::didDispatchEvent(const InspectorInstrumentationCookie& cookie)
 {
     FAST_RETURN_IF_NO_FRONTENDS(void());
     if (cookie.isValid())
-        didDispatchEventImpl(cookie, defaultPrevented);
+        didDispatchEventImpl(cookie);
 }
 
 inline void InspectorInstrumentation::willHandleEvent(ScriptExecutionContext& context, const Event& event, const RegisteredEventListener& listener)
@@ -762,11 +762,11 @@ inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEven
     return InspectorInstrumentationCookie();
 }
 
-inline void InspectorInstrumentation::didDispatchEventOnWindow(const InspectorInstrumentationCookie& cookie, bool defaultPrevented)
+inline void InspectorInstrumentation::didDispatchEventOnWindow(const InspectorInstrumentationCookie& cookie)
 {
     FAST_RETURN_IF_NO_FRONTENDS(void());
     if (cookie.isValid())
-        didDispatchEventOnWindowImpl(cookie, defaultPrevented);
+        didDispatchEventOnWindowImpl(cookie);
 }
 
 inline InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScript(Frame& frame, const String& url, int lineNumber)
index a59f045..1b52bfd 100644 (file)
@@ -311,12 +311,8 @@ void InspectorTimelineAgent::willDispatchEvent(const Event& event, Frame* frame)
     pushCurrentRecord(TimelineRecordFactory::createEventDispatchData(event), TimelineRecordType::EventDispatch, false, frame);
 }
 
-void InspectorTimelineAgent::didDispatchEvent(bool defaultPrevented)
+void InspectorTimelineAgent::didDispatchEvent()
 {
-    TimelineRecordEntry& entry = m_recordStack.last();
-    ASSERT(entry.type == TimelineRecordType::EventDispatch);
-    TimelineRecordFactory::appendDidDispatchEventData(*entry.data.get(), defaultPrevented);
-
     didCompleteCurrentRecord(TimelineRecordType::EventDispatch);
 }
 
@@ -339,10 +335,9 @@ void InspectorTimelineAgent::didLayout(RenderObject& root)
     Vector<FloatQuad> quads;
     root.absoluteQuads(quads);
     if (quads.size() >= 1)
-        TimelineRecordFactory::appendLayoutRoot(*entry.data.get(), quads[0]);
+        TimelineRecordFactory::appendLayoutRoot(entry.data.get(), quads[0]);
     else
         ASSERT_NOT_REACHED();
-
     didCompleteCurrentRecord(TimelineRecordType::Layout);
 }
 
@@ -387,7 +382,6 @@ void InspectorTimelineAgent::didPaint(RenderObject& renderer, const LayoutRect&
     FloatQuad quad;
     localToPageQuad(renderer, clipRect, &quad);
     entry.data = TimelineRecordFactory::createPaintData(quad);
-
     didCompleteCurrentRecord(TimelineRecordType::Paint);
 }
 
index e4df7ae..85f06da 100644 (file)
@@ -119,7 +119,7 @@ public:
     void willCallFunction(const String& scriptName, int scriptLine, Frame*);
     void didCallFunction(Frame*);
     void willDispatchEvent(const Event&, Frame*);
-    void didDispatchEvent(bool defaultPrevented);
+    void didDispatchEvent();
     void willEvaluateScript(const String&, int, Frame&);
     void didEvaluateScript(Frame&);
     void didInvalidateLayout(Frame&);
index 61bedcf..74aa7ff 100644 (file)
@@ -146,14 +146,9 @@ Ref<InspectorObject> TimelineRecordFactory::createPaintData(const FloatQuad& qua
     return data;
 }
 
-void TimelineRecordFactory::appendLayoutRoot(InspectorObject& data, const FloatQuad& quad)
+void TimelineRecordFactory::appendLayoutRoot(InspectorObject* data, const FloatQuad& quad)
 {
-    data.setArray(ASCIILiteral("root"), createQuad(quad));
-}
-
-void TimelineRecordFactory::appendDidDispatchEventData(InspectorObject& data, bool defaultPrevented)
-{
-    data.setBoolean(ASCIILiteral("defaultPrevented"), defaultPrevented);
+    data->setArray(ASCIILiteral("root"), createQuad(quad));
 }
 
 } // namespace WebCore
index cefc5b0..dd9de60 100644 (file)
@@ -60,8 +60,7 @@ public:
     static Ref<Inspector::InspectorObject> createAnimationFrameData(int callbackId);
     static Ref<Inspector::InspectorObject> createPaintData(const FloatQuad&);
 
-    static void appendLayoutRoot(Inspector::InspectorObject& data, const FloatQuad&);
-    static void appendDidDispatchEventData(Inspector::InspectorObject& data, bool defaultPrevented);
+    static void appendLayoutRoot(Inspector::InspectorObject* data, const FloatQuad&);
 
 private:
     TimelineRecordFactory() { }
index 92f3dc1..cb16398 100644 (file)
@@ -2002,7 +2002,7 @@ bool DOMWindow::dispatchEvent(Event& event, EventTarget* target)
 
     bool result = fireEventListeners(event);
 
-    InspectorInstrumentation::didDispatchEventOnWindow(cookie, event.defaultPrevented());
+    InspectorInstrumentation::didDispatchEventOnWindow(cookie);
 
     return result;
 }
index b6fd519..ea4c5b2 100644 (file)
@@ -1,3 +1,17 @@
+2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Unreviewed rollout r222036.
+        
+        The LayoutTests added with this change is flaky.
+
+        This left in the Test.js, Test.html, InspectorBackend changes
+        needed by later patches. They are independent of the flakey test.
+
+        Reverted changeset
+        Web Inspector: Timeline should show when events preventDefault() was called on an event or not
+        https://bugs.webkit.org/show_bug.cgi?id=176824
+        http://trac.webkit.org/changeset/222036
+
 2017-09-14  Devin Rousso  <webkit@devinrousso.com>
 
         Web Inspector: make recording swizzle async
index a720452..157fb5d 100644 (file)
@@ -971,7 +971,6 @@ localizedStrings["Z-Index"] = "Z-Index";
 localizedStrings["Zoom:"] = "Zoom:";
 localizedStrings["computed"] = "computed";
 localizedStrings["default"] = "default";
-localizedStrings["default prevented"] = "default prevented";
 localizedStrings["for changes to take effect"] = "for changes to take effect";
 localizedStrings["key"] = "key";
 localizedStrings["line "] = "line ";
index 0b05819..9e19331 100644 (file)
@@ -563,7 +563,7 @@ WI.TimelineManager = class TimelineManager extends WI.Object
                 record = new WI.ScriptTimelineRecord(WI.ScriptTimelineRecord.EventType.TimerFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.timerId, profileData);
                 break;
             case TimelineAgent.EventType.EventDispatch:
-                record = new WI.ScriptTimelineRecord(WI.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.type, profileData, parentRecordPayload.data);
+                record = new WI.ScriptTimelineRecord(WI.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.type, profileData);
                 break;
             case TimelineAgent.EventType.FireAnimationFrame:
                 record = new WI.ScriptTimelineRecord(WI.ScriptTimelineRecord.EventType.AnimationFrameFired, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.id, profileData);
index 5843757..5d87f98 100644 (file)
@@ -25,7 +25,7 @@
 
 WI.ScriptTimelineRecord = class ScriptTimelineRecord extends WI.TimelineRecord
 {
-    constructor(eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload, extraDetails)
+    constructor(eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload)
     {
         super(WI.TimelineRecord.Type.Script, startTime, endTime, callFrames, sourceCodeLocation);
 
@@ -38,7 +38,6 @@ WI.ScriptTimelineRecord = class ScriptTimelineRecord extends WI.TimelineRecord
         this._details = details || "";
         this._profilePayload = profilePayload || null;
         this._profile = null;
-        this._extraDetails = extraDetails || null;
 
         // COMPATIBILITY(iOS 9): Before the ScriptProfilerAgent we did not have sample data. Return NaN to match old behavior.
         if (!window.ScriptProfilerAgent)
@@ -51,10 +50,15 @@ WI.ScriptTimelineRecord = class ScriptTimelineRecord extends WI.TimelineRecord
 
     // Public
 
-    get eventType() { return this._eventType; }
-    get details() { return this._details; }
-    get extraDetails() { return this._extraDetails; }
-    get callCountOrSamples() { return this._callCountOrSamples; }
+    get eventType()
+    {
+        return this._eventType;
+    }
+
+    get details()
+    {
+        return this._details;
+    }
 
     get profile()
     {
@@ -62,6 +66,11 @@ WI.ScriptTimelineRecord = class ScriptTimelineRecord extends WI.TimelineRecord
         return this._profile;
     }
 
+    get callCountOrSamples()
+    {
+        return this._callCountOrSamples;
+    }
+
     isGarbageCollection()
     {
         return this._eventType === WI.ScriptTimelineRecord.EventType.GarbageCollected;
index 93ef24b..daafe10 100644 (file)
@@ -34,7 +34,7 @@ WI.ScriptDetailsTimelineView = class ScriptDetailsTimelineView extends WI.Timeli
         let columns = {name: {}, location: {}, callCount: {}, startTime: {}, totalTime: {}, selfTime: {}, averageTime: {}};
 
         columns.name.title = WI.UIString("Name");
-        columns.name.width = "30%";
+        columns.name.width = "10%";
         columns.name.icon = true;
         columns.name.disclosure = true;
         columns.name.locked = true;
@@ -69,7 +69,7 @@ WI.ScriptDetailsTimelineView = class ScriptDetailsTimelineView extends WI.Timeli
         columns.averageTime.width = "10%";
         columns.averageTime.aligned = "right";
 
-        for (let column in columns)
+        for (var column in columns)
             columns[column].sortable = true;
 
         this._dataGrid = new WI.ScriptTimelineDataGrid(columns);
index fa2d0d0..05d9ad1 100644 (file)
@@ -100,9 +100,6 @@ WI.ScriptTimelineDataGridNode = class ScriptTimelineDataGridNode extends WI.Time
                 this._subtitle = WI.UIString("%s interval").format(timeoutString);
             else
                 this._subtitle = WI.UIString("%s delay").format(timeoutString);
-        } else if (this._record.eventType === WI.ScriptTimelineRecord.EventType.EventDispatched) {
-            if (this._record.extraDetails && this._record.extraDetails.defaultPrevented)
-                this._subtitle = WI.UIString("default prevented");
         }
 
         return this._subtitle;