WebKit Bugzilla
Attachment 358710 Details for
Bug 193284
: Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193284-20190109102320.patch (text/plain), 4.66 KB, created by
Devin Rousso
on 2019-01-09 09:23:21 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-09 09:23:21 PST
Size:
4.66 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 17a56b4775498f615ee2ff0bef5d2f5332327d08..663f5f75f400eeb73755129e1e9e0a223903e96e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-09 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open >+ https://bugs.webkit.org/show_bug.cgi?id=193284 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No newe tests, as this is simply exposes a value. >+ >+ * inspector/InspectorFrontendHost.idl: >+ * inspector/InspectorFrontendHost.h: >+ * inspector/InspectorFrontendHost.cpp: >+ (WebCore::InspectorFrontendHost::isBeingInspected): Added. >+ > 2019-01-08 Dean Jackson <dino@apple.com> > > Blob references for System Previews don't get a correct file extension >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 84f09016f2cfcb404c18c7a90f168a2100cee00e..6ca6684ff15398ef907c42d26cb3c327442344c6 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-09 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open >+ https://bugs.webkit.org/show_bug.cgi?id=193284 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If inspector^2 is closed, stringify all messages. >+ If inspector^2 is open, log each message JSON object without modifying it. >+ >+ * UserInterface/Protocol/LoggingProtocolTracer.js: >+ (WI.LoggingProtocolTracer.prototype._processEntry): >+ > 2019-01-08 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Styles: Undo reverts all changes at once >diff --git a/Source/WebCore/inspector/InspectorFrontendHost.cpp b/Source/WebCore/inspector/InspectorFrontendHost.cpp >index c080a56c6861f3e398979a7b123d562b8b90f46a..15b8dc0809a0f6fd649d15e2a8be605b8bb94cdb 100644 >--- a/Source/WebCore/inspector/InspectorFrontendHost.cpp >+++ b/Source/WebCore/inspector/InspectorFrontendHost.cpp >@@ -445,6 +445,15 @@ void InspectorFrontendHost::inspectInspector() > m_frontendPage->inspectorController().show(); > } > >+bool InspectorFrontendHost::isBeingInspected() >+{ >+ if (!m_frontendPage) >+ return false; >+ >+ InspectorController& inspectorController = m_frontendPage->inspectorController(); >+ return inspectorController.hasLocalFrontend() || inspectorController.hasRemoteFrontend(); >+} >+ > bool InspectorFrontendHost::supportsShowCertificate() const > { > #if PLATFORM(COCOA) >diff --git a/Source/WebCore/inspector/InspectorFrontendHost.h b/Source/WebCore/inspector/InspectorFrontendHost.h >index 9c04425e03e8b8133c9194f1eec7b94bedf00bc6..5242cc689463bdddbe8846f60ee7ae613bcacc10 100644 >--- a/Source/WebCore/inspector/InspectorFrontendHost.h >+++ b/Source/WebCore/inspector/InspectorFrontendHost.h >@@ -109,6 +109,7 @@ public: > > void beep(); > void inspectInspector(); >+ bool isBeingInspected(); > > private: > #if ENABLE(CONTEXT_MENUS) >diff --git a/Source/WebCore/inspector/InspectorFrontendHost.idl b/Source/WebCore/inspector/InspectorFrontendHost.idl >index 163274bc8bac0e086e3ba22f2e113d4948732c36..c7cbf9d110a205a47969f341d16831c5f5e49227 100644 >--- a/Source/WebCore/inspector/InspectorFrontendHost.idl >+++ b/Source/WebCore/inspector/InspectorFrontendHost.idl >@@ -81,6 +81,7 @@ > > void beep(); > void inspectInspector(); >+ boolean isBeingInspected(); > }; > > dictionary ContextMenuItem { >diff --git a/Source/WebInspectorUI/UserInterface/Protocol/LoggingProtocolTracer.js b/Source/WebInspectorUI/UserInterface/Protocol/LoggingProtocolTracer.js >index 8d4390da2929e62df65a7767a8ffe70f0f6b6cf1..5009a30b51201088c7f31a8e666352fb61ad34a4 100644 >--- a/Source/WebInspectorUI/UserInterface/Protocol/LoggingProtocolTracer.js >+++ b/Source/WebInspectorUI/UserInterface/Protocol/LoggingProtocolTracer.js >@@ -119,7 +119,13 @@ WI.LoggingProtocolTracer = class LoggingProtocolTracer extends WI.ProtocolTracer > let targetId = connection && connection.target ? connection.target.identifier : "unknown"; > if (this._filterMultiplexingBackend && targetId === "multi") > return; >- this._logToConsole(`${entry.type} (${targetId}): ${JSON.stringify(entry.message)}`); >+ >+ let prefix = `${entry.type} (${targetId})`; >+ if (!window.InspectorTest && InspectorFrontendHost.isBeingInspected()) >+ this._logToConsole(prefix, entry.message); >+ else >+ this._logToConsole(`${prefix}: ${JSON.stringify(entry.message)}`); >+ > if (entry.exception) { > this._logToConsole(entry.exception); > if (entry.exception.stack)
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 193284
: 358710