logo

WebKitGTK

Unnamed repository; edit this file 'description' to name the repository.
commit: 89dadf6a50b0b7df44a822c826fff75fd1b6b743
parent: b8ba3d7d164a6df2f27add50b4f556a0eff5b5f2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  2 Nov 2018 17:59:57 +0100

Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js: Remove %c support in the console

Diffstat:

MSource/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js23-----------------------
1 file changed, 0 insertions(+), 23 deletions(-)

diff --git a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js @@ -791,26 +791,6 @@ WI.ConsoleMessageView = class ConsoleMessageView extends WI.Object } var currentStyle = null; - function styleFormatter(obj) - { - currentStyle = {}; - var buffer = document.createElement("span"); - buffer.setAttribute("style", obj.description); - for (var i = 0; i < buffer.style.length; i++) { - var property = buffer.style[i]; - if (isWhitelistedProperty(property)) - currentStyle[property] = buffer.style[property]; - } - } - - function isWhitelistedProperty(property) - { - for (var prefix of ["background", "border", "color", "font", "line", "margin", "padding", "text"]) { - if (property.startsWith(prefix) || property.startsWith("-webkit-" + prefix)) - return true; - } - return false; - } // Firebug uses %o for formatting objects. var formatters = {}; @@ -822,9 +802,6 @@ WI.ConsoleMessageView = class ConsoleMessageView extends WI.Object formatters.i = integerFormatter; formatters.d = integerFormatter; - // Firebug uses %c for styling the message. - formatters.c = styleFormatter; - // Support %O to force object formatting, instead of the type-based %o formatting. formatters.O = parameterFormatter.bind(this, true);