[Webkit-unassigned] [Bug 220639] Web Inspector: BiDi issue on JavaScript evaluation result element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 15 16:50:46 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=220639
--- Comment #2 from Ebrahim Byagowi <ebrahim at gnu.org> ---
Thank you very much! Okay now that I have a working Web Inspector development environment using your instruction I see there is one case that dir="auto"/<bdi>/unicode-bidi:isolate would be overkill and that is a string that itself ends with bidi natural character like,
"سیب."
If we use isolate it will turn it to
".سیب"
but there is a solution to this and is to use either unicode-bidi:embed or just to use dir="ltr" which implies unicode-bidi:embed anyway so I like to suggest something like
dir="ltr":
--- a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
+++ b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
@@ -532,6 +532,7 @@ WI.ConsoleMessageView = class ConsoleMessageView extends WI.Object
parameters[i] = this._createRemoteObjectIfNeeded(parameters[i]);
let builderElement = element.appendChild(document.createElement("span"));
+ builderElement.setAttribute("dir", "ltr");
let shouldFormatWithStringSubstitution = parameters[0].type === "string" && this._message.type !== WI.ConsoleMessage.MessageType.Result;
// Single object (e.g. console result or logging a non-string object).
Or, adding unicode-bidi:embed with CSS:
--- a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css
+++ b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css
@@ -309,6 +309,10 @@
display: inline-block;
}
+.console-message-content {
+ unicode-bidi: embed;
+}
+
@media (prefers-color-scheme: dark) {
.console-message .syntax-highlighted {
background-color: unset;
--- a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
+++ b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
@@ -532,6 +532,7 @@ WI.ConsoleMessageView = class ConsoleMessageView extends WI.Object
parameters[i] = this._createRemoteObjectIfNeeded(parameters[i]);
let builderElement = element.appendChild(document.createElement("span"));
+ builderElement.classList.add("console-message-content");
let shouldFormatWithStringSubstitution = parameters[0].type === "string" && this._message.type !== WI.ConsoleMessage.MessageType.Result;
// Single object (e.g. console result or logging a non-string object).
Or do you prefer dir="auto", which is OK to me also. Thanks!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210116/7c3ef5a3/attachment.htm>
More information about the webkit-unassigned
mailing list