https://bugs.webkit.org/show_bug.cgi?id=193284
Reviewed by Joseph Pecoraro.
Source/WebCore:
No newe tests, as this is simply exposes a value.
* inspector/InspectorFrontendHost.idl:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::isBeingInspected): Added.
Source/WebInspectorUI:
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239779
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+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 Joseph Pecoraro.
+
+ 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-09 Zalan Bujtas <zalan@apple.com>
[LFC][BFC][MarginCollapsing] Add support for peculiar cases.
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)
void beep();
void inspectInspector();
+ bool isBeingInspected();
private:
#if ENABLE(CONTEXT_MENUS)
void beep();
void inspectInspector();
+ boolean isBeingInspected();
};
dictionary ContextMenuItem {
+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 Joseph Pecoraro.
+
+ 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-09 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
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)