Bug 207214 - Web Inspector RTL: Elements closing tag is reversed
Summary: Web Inspector RTL: Elements closing tag is reversed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 13
Hardware: Macintosh macOS 10.15
: P2 Minor
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-04 11:14 PST by Lukas Möller
Modified: 2020-02-11 14:39 PST (History)
5 users (show)

See Also:


Attachments
Screenshot of Safari 13 dev tools. (365.81 KB, image/png)
2020-02-04 11:14 PST, Lukas Möller
no flags Details
Reduction (47 bytes, text/html)
2020-02-04 16:22 PST, Nikita Vasilyev
no flags Details
Patch (3.54 KB, patch)
2020-02-04 16:34 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (1.48 KB, patch)
2020-02-04 17:31 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ‮.
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>