WebKit Bugzilla
Attachment 357638 Details for
Bug 192669
: Web Inspector: Timelines: correctly label Intersection Observer callbacks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192669-20181218171709.patch (text/plain), 23.63 KB, created by
Simon Fraser (smfr)
on 2018-12-18 17:17:10 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-12-18 17:17:10 PST
Size:
23.63 KB
patch
obsolete
>Subversion Revision: 239306 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 762e38753f26869f9f41ba77756ea4b0f05f37a7..2e5b19539bfda1952c41016f4ddd6ef5fadf4a02 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-18 Simon Fraser <simon.fraser@apple.com> >+ >+ Web Inspector: Timelines: correctly label Intersection Observer callbacks >+ https://bugs.webkit.org/show_bug.cgi?id=192669 >+ <rdar://problem/46702490> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls >+ to Intersection Observer, Performance Observer and Mutation Observer callbacks so >+ that they get correctly labeled in the Inspector timeline. >+ >+ * inspector/protocol/Timeline.json: >+ > 2018-12-17 Mark Lam <mark.lam@apple.com> > > SamplingProfiler's isValidFramePointer() should reject address at stack origin. >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8617b0206a913fb8290f20f4b218659508556948..6e8cf335f9d56130dfbb78c6a81b5ffaa380ffbf 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,37 @@ >+2018-12-18 Simon Fraser <simon.fraser@apple.com> >+ >+ Web Inspector: Timelines: correctly label Intersection Observer callbacks >+ https://bugs.webkit.org/show_bug.cgi?id=192669 >+ <rdar://problem/46702490> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls >+ to Intersection Observer, Performance Observer and Mutation Observer callbacks so >+ that they get correctly labeled in the Inspector timeline. >+ >+ * dom/MutationObserver.cpp: >+ (WebCore::MutationObserver::deliver): >+ * en.lproj/Localizable.strings: >+ * inspector/InspectorInstrumentation.cpp: >+ (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl): >+ (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl): >+ * inspector/InspectorInstrumentation.h: >+ (WebCore::InspectorInstrumentation::willFireObserverCallback): >+ (WebCore::InspectorInstrumentation::didFireObserverCallback): >+ * inspector/TimelineRecordFactory.cpp: >+ (WebCore::TimelineRecordFactory::createObserverCallbackData): >+ * inspector/TimelineRecordFactory.h: >+ * inspector/agents/InspectorTimelineAgent.cpp: >+ (WebCore::InspectorTimelineAgent::willFireObserverCallback): >+ (WebCore::InspectorTimelineAgent::didFireObserverCallback): >+ (WebCore::toProtocol): >+ * inspector/agents/InspectorTimelineAgent.h: >+ * page/IntersectionObserver.cpp: >+ (WebCore::IntersectionObserver::notify): >+ * page/PerformanceObserver.cpp: >+ (WebCore::PerformanceObserver::deliver): >+ > 2018-12-17 Simon Fraser <simon.fraser@apple.com> > > Don't use more expensive layer backing store formats when subpixel text antialiasing is not enabled >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index d1657831261b1945f5365c0825a2ea0ffd34e63e..dddd155d764dc1b09579b47ff2a15e19b66dc024 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,23 @@ >+2018-12-18 Simon Fraser <simon.fraser@apple.com> >+ >+ Web Inspector: Timelines: correctly label Intersection Observer callbacks >+ https://bugs.webkit.org/show_bug.cgi?id=192669 >+ <rdar://problem/46702490> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls >+ to Intersection Observer, Performance Observer and Mutation Observer callbacks so >+ that they get correctly labeled in the Inspector timeline. >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ * UserInterface/Controllers/TimelineManager.js: >+ (WI.TimelineManager.prototype._processRecord): >+ * UserInterface/Models/ScriptTimelineRecord.js: >+ (WI.ScriptTimelineRecord.EventType.displayName): >+ * UserInterface/Views/TimelineTabContentView.js: >+ (WI.TimelineTabContentView.iconClassNameForRecord): >+ > 2018-12-17 Devin Rousso <drousso@apple.com> > > Web Inspector: Audit: add plural result strings >diff --git a/Source/JavaScriptCore/inspector/protocol/Timeline.json b/Source/JavaScriptCore/inspector/protocol/Timeline.json >index 4a8ad6d0edb2ee035c30eb78a774a56faf375082..6b55c299ed9eb6115312d793ab6cf20a80b03fea 100644 >--- a/Source/JavaScriptCore/inspector/protocol/Timeline.json >+++ b/Source/JavaScriptCore/inspector/protocol/Timeline.json >@@ -28,7 +28,8 @@ > "ConsoleProfile", > "RequestAnimationFrame", > "CancelAnimationFrame", >- "FireAnimationFrame" >+ "FireAnimationFrame", >+ "ObserverCallback" > ] > }, > { >diff --git a/Source/WebCore/dom/MutationObserver.cpp b/Source/WebCore/dom/MutationObserver.cpp >index 10486aeeaff1eb7fdfa757e17c85e17a203d3630..d94e6e5eeb6dd2c33f2e0c251b846e61ed7a1b4f 100644 >--- a/Source/WebCore/dom/MutationObserver.cpp >+++ b/Source/WebCore/dom/MutationObserver.cpp >@@ -36,6 +36,7 @@ > #include "Document.h" > #include "GCReachableRef.h" > #include "HTMLSlotElement.h" >+#include "InspectorInstrumentation.h" > #include "Microtasks.h" > #include "MutationCallback.h" > #include "MutationObserverRegistration.h" >@@ -244,8 +245,15 @@ void MutationObserver::deliver() > records.swap(m_records); > > // FIXME: Keep mutation observer callback as long as its observed nodes are alive. See https://webkit.org/b/179224. >- if (m_callback->hasCallback()) >+ if (m_callback->hasCallback()) { >+ auto* context = m_callback->scriptExecutionContext(); >+ if (!context) >+ return; >+ >+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireObserverCallback(*context, "Mutation Observer"_s); > m_callback->handleEvent(*this, records, *this); >+ InspectorInstrumentation::didFireObserverCallback(cookie); >+ } > } > > void MutationObserver::notifyMutationObservers() >diff --git a/Source/WebCore/en.lproj/Localizable.strings b/Source/WebCore/en.lproj/Localizable.strings >index 553e5620dfee6f9bdaf009bae0c2fcae2f2baa5d..e3490d6b9c17cf9d4869b4b25e85f9e602c4f955 100644 >--- a/Source/WebCore/en.lproj/Localizable.strings >+++ b/Source/WebCore/en.lproj/Localizable.strings >@@ -646,6 +646,9 @@ > /* Show Media Controls context menu item */ > "Show Controls" = "Show Controls"; > >+/* Action from safe browsing warning */ >+"Show Details" = "Show Details"; >+ > /* Show fonts context menu item */ > "Show Fonts" = "Show Fonts"; > >@@ -655,9 +658,6 @@ > /* menu item title */ > "Show Substitutions" = "Show Substitutions"; > >-/* Action from safe browsing warning */ >-"Show Details" = "Show Details"; >- > /* Title of the context menu item to show when PDFPlugin was used instead of a blocked plugin */ > "Show in blocked plug-in" = "Show in blocked plug-in"; > >diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp >index 59a8b08775c95084d1bfaf3287fbafd794f30c3f..62e09cf0747d6527ba9edb179e1c55e57b8f9cc7 100644 >--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp >+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp >@@ -1099,6 +1099,22 @@ void InspectorInstrumentation::didFireAnimationFrameImpl(const InspectorInstrume > timelineAgent->didFireAnimationFrame(); > } > >+InspectorInstrumentationCookie InspectorInstrumentation::willFireObserverCallbackImpl(InstrumentingAgents& instrumentingAgents, const String& callbackType, ScriptExecutionContext& context) >+{ >+ int timelineAgentId = 0; >+ if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) { >+ timelineAgent->willFireObserverCallback(callbackType, frameForScriptExecutionContext(&context)); >+ timelineAgentId = timelineAgent->id(); >+ } >+ return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId); >+} >+ >+void InspectorInstrumentation::didFireObserverCallbackImpl(const InspectorInstrumentationCookie& cookie) >+{ >+ if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) >+ timelineAgent->didFireObserverCallback(); >+} >+ > void InspectorInstrumentation::registerInstrumentingAgents(InstrumentingAgents& instrumentingAgents) > { > if (!s_instrumentingAgentsSet) >diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h >index b9a42e6fc098b634bd8b38a702e4d82957976753..7e14fbc592914760da103f9109317cdc4a80ee98 100644 >--- a/Source/WebCore/inspector/InspectorInstrumentation.h >+++ b/Source/WebCore/inspector/InspectorInstrumentation.h >@@ -235,6 +235,9 @@ public: > static InspectorInstrumentationCookie willFireAnimationFrame(Document&, int callbackId); > static void didFireAnimationFrame(const InspectorInstrumentationCookie&); > >+ static InspectorInstrumentationCookie willFireObserverCallback(ScriptExecutionContext&, const String& callbackType); >+ static void didFireObserverCallback(const InspectorInstrumentationCookie&); >+ > static void didOpenDatabase(ScriptExecutionContext*, RefPtr<Database>&&, const String& domain, const String& name, const String& version); > > static void didDispatchDOMStorageEvent(Page&, const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*); >@@ -407,6 +410,9 @@ private: > static InspectorInstrumentationCookie willFireAnimationFrameImpl(InstrumentingAgents&, int callbackId, Document&); > static void didFireAnimationFrameImpl(const InspectorInstrumentationCookie&); > >+ static InspectorInstrumentationCookie willFireObserverCallbackImpl(InstrumentingAgents&, const String&, ScriptExecutionContext&); >+ static void didFireObserverCallbackImpl(const InspectorInstrumentationCookie&); >+ > static void didOpenDatabaseImpl(InstrumentingAgents&, RefPtr<Database>&&, const String& domain, const String& name, const String& version); > > static void didDispatchDOMStorageEventImpl(InstrumentingAgents&, const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*); >@@ -1422,6 +1428,20 @@ inline void InspectorInstrumentation::didFireAnimationFrame(const InspectorInstr > didFireAnimationFrameImpl(cookie); > } > >+inline InspectorInstrumentationCookie InspectorInstrumentation::willFireObserverCallback(ScriptExecutionContext& context, const String& callbackType) >+{ >+ if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) >+ return willFireObserverCallbackImpl(*instrumentingAgents, callbackType, context); >+ return InspectorInstrumentationCookie(); >+} >+ >+inline void InspectorInstrumentation::didFireObserverCallback(const InspectorInstrumentationCookie& cookie) >+{ >+ FAST_RETURN_IF_NO_FRONTENDS(void()); >+ if (cookie.isValid()) >+ didFireObserverCallbackImpl(cookie); >+} >+ > inline void InspectorInstrumentation::layerTreeDidChange(Page* page) > { > FAST_RETURN_IF_NO_FRONTENDS(void()); >diff --git a/Source/WebCore/inspector/TimelineRecordFactory.cpp b/Source/WebCore/inspector/TimelineRecordFactory.cpp >index f2b7be1317d7e2a5f03bfc9229e8829adec52be7..0cab454fc10fb399a8f3a82acbdbb8c6d6df0248 100644 >--- a/Source/WebCore/inspector/TimelineRecordFactory.cpp >+++ b/Source/WebCore/inspector/TimelineRecordFactory.cpp >@@ -125,6 +125,13 @@ Ref<JSON::Object> TimelineRecordFactory::createAnimationFrameData(int callbackId > return data; > } > >+Ref<JSON::Object> TimelineRecordFactory::createObserverCallbackData(const String& callbackType) >+{ >+ Ref<JSON::Object> data = JSON::Object::create(); >+ data->setString("type"_s, callbackType); >+ return data; >+} >+ > static Ref<JSON::Array> createQuad(const FloatQuad& quad) > { > Ref<JSON::Array> array = JSON::Array::create(); >diff --git a/Source/WebCore/inspector/TimelineRecordFactory.h b/Source/WebCore/inspector/TimelineRecordFactory.h >index ab98212ab679d39ddc3e5d255431c6c191e97668..d5c13ff764dde3b7994a7f13d69f78a1d04da856 100644 >--- a/Source/WebCore/inspector/TimelineRecordFactory.h >+++ b/Source/WebCore/inspector/TimelineRecordFactory.h >@@ -58,6 +58,7 @@ public: > static Ref<JSON::Object> createEvaluateScriptData(const String&, double lineNumber); > static Ref<JSON::Object> createTimeStampData(const String&); > static Ref<JSON::Object> createAnimationFrameData(int callbackId); >+ static Ref<JSON::Object> createObserverCallbackData(const String& callbackType); > static Ref<JSON::Object> createPaintData(const FloatQuad&); > > static void appendLayoutRoot(JSON::Object* data, const FloatQuad&); >diff --git a/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp b/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >index 9732ec01ace618a24cf86a0d005bf4344c3fe7b3..db70295bf1fe642225f80b97d52350309f5aae43 100644 >--- a/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp >@@ -597,6 +597,16 @@ void InspectorTimelineAgent::didFireAnimationFrame() > didCompleteCurrentRecord(TimelineRecordType::FireAnimationFrame); > } > >+void InspectorTimelineAgent::willFireObserverCallback(const String& callbackType, Frame* frame) >+{ >+ pushCurrentRecord(TimelineRecordFactory::createObserverCallbackData(callbackType), TimelineRecordType::ObserverCallback, false, frame); >+} >+ >+void InspectorTimelineAgent::didFireObserverCallback() >+{ >+ didCompleteCurrentRecord(TimelineRecordType::ObserverCallback); >+} >+ > // ScriptDebugListener > > void InspectorTimelineAgent::breakpointActionProbe(JSC::ExecState& state, const Inspector::ScriptBreakpointAction& action, unsigned /*batchId*/, unsigned sampleId, JSC::JSValue) >@@ -654,6 +664,9 @@ static Inspector::Protocol::Timeline::EventType toProtocol(TimelineRecordType ty > return Inspector::Protocol::Timeline::EventType::CancelAnimationFrame; > case TimelineRecordType::FireAnimationFrame: > return Inspector::Protocol::Timeline::EventType::FireAnimationFrame; >+ >+ case TimelineRecordType::ObserverCallback: >+ return Inspector::Protocol::Timeline::EventType::ObserverCallback; > } > > return Inspector::Protocol::Timeline::EventType::TimeStamp; >diff --git a/Source/WebCore/inspector/agents/InspectorTimelineAgent.h b/Source/WebCore/inspector/agents/InspectorTimelineAgent.h >index d2616db1b7b63e39010214e6ea9209b1e4680bb3..cf2635ee2588913e7673269737847258cc1c231b 100644 >--- a/Source/WebCore/inspector/agents/InspectorTimelineAgent.h >+++ b/Source/WebCore/inspector/agents/InspectorTimelineAgent.h >@@ -83,6 +83,8 @@ enum class TimelineRecordType { > RequestAnimationFrame, > CancelAnimationFrame, > FireAnimationFrame, >+ >+ ObserverCallback, > }; > > class InspectorTimelineAgent final >@@ -137,6 +139,8 @@ public: > void didCancelAnimationFrame(int callbackId, Frame*); > void willFireAnimationFrame(int callbackId, Frame*); > void didFireAnimationFrame(); >+ void willFireObserverCallback(const String& callbackType, Frame*); >+ void didFireObserverCallback(); > void time(Frame&, const String&); > void timeEnd(Frame&, const String&); > void mainFrameStartedLoading(); >diff --git a/Source/WebCore/page/IntersectionObserver.cpp b/Source/WebCore/page/IntersectionObserver.cpp >index 0b4ef288b36f9b71cd66c3bf6a0515e3911bccb5..084eb4d60c515b955ce96ad9142825237db727b5 100644 >--- a/Source/WebCore/page/IntersectionObserver.cpp >+++ b/Source/WebCore/page/IntersectionObserver.cpp >@@ -32,6 +32,7 @@ > #include "CSSPropertyParserHelpers.h" > #include "CSSTokenizer.h" > #include "Element.h" >+#include "InspectorInstrumentation.h" > #include "IntersectionObserverCallback.h" > #include "IntersectionObserverEntry.h" > #include "Performance.h" >@@ -256,8 +257,16 @@ void IntersectionObserver::notify() > return; > } > >+ auto* context = m_callback->scriptExecutionContext(); >+ if (!context) >+ return; >+ >+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireObserverCallback(*context, "Intersection Observer"_s); >+ > auto takenRecords = takeRecords(); > m_callback->handleEvent(WTFMove(takenRecords.records), *this); >+ >+ InspectorInstrumentation::didFireObserverCallback(cookie); > } > > bool IntersectionObserver::hasPendingActivity() const >diff --git a/Source/WebCore/page/PerformanceObserver.cpp b/Source/WebCore/page/PerformanceObserver.cpp >index 11e594940764d0b2c35bada3c0f92f31478ae191..b582a7ca6614ab7e39df601ab07b443f3feab0d1 100644 >--- a/Source/WebCore/page/PerformanceObserver.cpp >+++ b/Source/WebCore/page/PerformanceObserver.cpp >@@ -28,6 +28,7 @@ > > #include "DOMWindow.h" > #include "Document.h" >+#include "InspectorInstrumentation.h" > #include "Performance.h" > #include "PerformanceObserverEntryList.h" > #include "WorkerGlobalScope.h" >@@ -100,9 +101,16 @@ void PerformanceObserver::deliver() > if (m_entriesToDeliver.isEmpty()) > return; > >+ auto* context = m_callback->scriptExecutionContext(); >+ if (!context) >+ return; >+ > Vector<RefPtr<PerformanceEntry>> entries = WTFMove(m_entriesToDeliver); > auto list = PerformanceObserverEntryList::create(WTFMove(entries)); >+ >+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireObserverCallback(*context, "Performance Observer"_s); > m_callback->handleEvent(list, *this); >+ InspectorInstrumentation::didFireObserverCallback(cookie); > } > > } // namespace WebCore >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index 60fc1d97a18dea49d5d6b1a1349e9e3311061ebd..619824ef04e688231e34d8771eb565fc0a50af04 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -45,6 +45,7 @@ localizedStrings["%s (%s)"] = "%s (%s)"; > localizedStrings["%s (%s, %s)"] = "%s (%s, %s)"; > localizedStrings["%s (default)"] = "%s (default)"; > localizedStrings["%s (hidden)"] = "%s (hidden)"; >+localizedStrings["%s Callback"] = "%s Callback"; > localizedStrings["%s Event Dispatched"] = "%s Event Dispatched"; > localizedStrings["%s Fired"] = "%s Fired"; > localizedStrings["%s Prototype"] = "%s Prototype"; >@@ -53,6 +54,7 @@ localizedStrings["%s \u2013 %s"] = "%s \u2013 %s"; > localizedStrings["%s \u2014 %s"] = "%s \u2014 %s"; > localizedStrings["%s cannot be modified"] = "%s cannot be modified"; > localizedStrings["%s delay"] = "%s delay"; >+localizedStrings["%s eval\n%s async"] = "%s eval\n%s async"; > localizedStrings["%s interval"] = "%s interval"; > localizedStrings["(Action %s)"] = "(Action %s)"; > localizedStrings["(Disk)"] = "(Disk)"; >@@ -121,6 +123,7 @@ localizedStrings["Assertion Failed: %s"] = "Assertion Failed: %s"; > localizedStrings["Assertion Failures"] = "Assertion Failures"; > localizedStrings["Assertion with message: %s"] = "Assertion with message: %s"; > localizedStrings["Assertive"] = "Assertive"; >+localizedStrings["Async audits are not supported."] = "Async audits are not supported."; > localizedStrings["Attribute"] = "Attribute"; > localizedStrings["Attribute Modified"] = "Attribute Modified"; > localizedStrings["Attributes"] = "Attributes"; >@@ -630,6 +633,7 @@ localizedStrings["None"] = "None"; > localizedStrings["Not found"] = "Not found"; > localizedStrings["Object Graph"] = "Object Graph"; > localizedStrings["Object Store"] = "Object Store"; >+localizedStrings["Observer Callback"] = "Observer Callback"; > localizedStrings["Off"] = "Off"; > localizedStrings["Once"] = "Once"; > localizedStrings["Online"] = "Online"; >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js b/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js >index a9867aabbd476bca6b0d4eb93e8ec5a3de27e4e0..3829d9f38cc91ebad12e1c550404058a1e53e80b 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js >@@ -563,6 +563,7 @@ WI.TimelineManager = class TimelineManager extends WI.Object > case TimelineAgent.EventType.TimerFire: > case TimelineAgent.EventType.EventDispatch: > case TimelineAgent.EventType.FireAnimationFrame: >+ case TimelineAgent.EventType.ObserverCallback: > // These are handled when the parent of FunctionCall or EvaluateScript. > break; > >@@ -596,6 +597,9 @@ WI.TimelineManager = class TimelineManager extends WI.Object > case TimelineAgent.EventType.EventDispatch: > record = new WI.ScriptTimelineRecord(WI.ScriptTimelineRecord.EventType.EventDispatched, startTime, endTime, callFrames, sourceCodeLocation, parentRecordPayload.data.type, profileData); > break; >+ case TimelineAgent.EventType.ObserverCallback: >+ record = new WI.ScriptTimelineRecord(WI.ScriptTimelineRecord.EventType.ObserverCallback, 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); > break; >diff --git a/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js b/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js >index 331bdd52fec3a10afde0a2cecd1a59ea2ee93abc..5f59b0d0ba12e55a1c4d2b9e83f42910a75a0e4a 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js >+++ b/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js >@@ -194,6 +194,7 @@ WI.ScriptTimelineRecord.EventType = { > AnimationFrameFired: "script-timeline-record-animation-frame-fired", > AnimationFrameRequested: "script-timeline-record-animation-frame-requested", > AnimationFrameCanceled: "script-timeline-record-animation-frame-canceled", >+ ObserverCallback: "script-timeline-record-observer-callback", > ConsoleProfileRecorded: "script-timeline-record-console-profile-recorded", > GarbageCollected: "script-timeline-record-garbage-collected", > }; >@@ -400,6 +401,10 @@ WI.ScriptTimelineRecord.EventType.displayName = function(eventType, details, inc > if (details && includeDetailsInMainTitle) > return WI.UIString("Animation Frame %d Fired").format(details); > return WI.UIString("Animation Frame Fired"); >+ case WI.ScriptTimelineRecord.EventType.ObserverCallback: >+ if (details && (details instanceof String || typeof details === "string")) >+ return WI.UIString("%s Callback").format(details); >+ return WI.UIString("Observer Callback"); > case WI.ScriptTimelineRecord.EventType.AnimationFrameRequested: > if (details && includeDetailsInMainTitle) > return WI.UIString("Animation Frame %d Requested").format(details); >diff --git a/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js >index 5b57d80f51e4f642231f3ca1c324543e8ab8b7f2..c0adfb6efa1f0e6963aa985ddf0155a429681b50 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js >@@ -207,6 +207,7 @@ WI.TimelineTabContentView = class TimelineTabContentView extends WI.ContentBrows > return WI.TimelineRecordTreeElement.EvaluatedRecordIconStyleClass; > case WI.ScriptTimelineRecord.EventType.MicrotaskDispatched: > case WI.ScriptTimelineRecord.EventType.EventDispatched: >+ case WI.ScriptTimelineRecord.EventType.ObserverCallback: > return WI.TimelineRecordTreeElement.EventRecordIconStyleClass; > case WI.ScriptTimelineRecord.EventType.ProbeSampleRecorded: > return WI.TimelineRecordTreeElement.ProbeRecordIconStyleClass;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192669
: 357638