Bug 207214

Summary: Web Inspector RTL: Elements closing tag is reversed
Product: WebKit Reporter: Lukas Möller <lukas.moeller.d>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Minor CC: commit-queue, ebrahim, inspector-bugzilla-changes, mmaxfield, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Mac   
OS: macOS 10.15   
Attachments:
Description Flags
Screenshot of Safari 13 dev tools.
none
Reduction
none
Patch
none
Patch none

Description Lukas Möller 2020-02-04 11:14:31 PST
Created attachment 389681 [details]
Screenshot of Safari 13 dev tools.

If a HTML DOM node contains a Unicode right-to-left override character (U+202E) the tag name of the closing tag is reversed as well. This could possibly be intended behavior, but I would prefer opening and closing tag to match. Only the content of the tag should change when including rtl or ltr overrides / embeddings.

This might be a duplicate of #200601.
Comment 1 Nikita Vasilyev 2020-02-04 15:30:07 PST
Thank you for reporting, Lukas! This isn't a duplicate of bug 200601.
Comment 2 Nikita Vasilyev 2020-02-04 16:22:44 PST
Created attachment 389735 [details]
Reduction
Comment 3 Nikita Vasilyev 2020-02-04 16:34:20 PST
Created attachment 389738 [details]
Patch
Comment 4 Nikita Vasilyev 2020-02-04 16:50:44 PST
Ultimately, we should display all Unicode BiDi characters as HTML entities, e.g. &#8238;.
Comment 5 Nikita Vasilyev 2020-02-04 17:31:50 PST
Created attachment 389752 [details]
Patch

A simpler CSS-only solution.
Comment 6 WebKit Commit Bot 2020-02-11 14:38:28 PST
Comment on attachment 389752 [details]
Patch

Clearing flags on attachment: 389752

Committed r256374: <https://trac.webkit.org/changeset/256374>
Comment 7 WebKit Commit Bot 2020-02-11 14:38:29 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2020-02-11 14:39:15 PST
<rdar://problem/59364408>
Comment 9 Ebrahim Byagowi 2021-01-21 15:07:21 PST
> Ultimately, we should display all Unicode BiDi characters as HTML entities, e.g. &#8238;.

Fun fact, the reason Chrome has the feature is the request I made on Bug 93888 and unfortunately the change removed while Web Inspector UI revamp landed after Blink's fork, so I filed Bug 220831 and will try to fix it myself this time :)