Bug 200601 - Web Inspector: RTL: DOM outline in Elements tab should be LTR
Summary: Web Inspector: RTL: DOM outline in Elements tab should be LTR
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-09 17:23 PDT by Nikita Vasilyev
Modified: 2019-08-21 19:34 PDT (History)
4 users (show)

See Also:


Attachments
[Image] Bug (80.16 KB, image/png)
2019-08-09 17:23 PDT, Nikita Vasilyev
no flags Details
Patch (7.61 KB, patch)
2019-08-16 15:51 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[Image] With patch applied (351.78 KB, image/png)
2019-08-16 15:55 PDT, Nikita Vasilyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2019-08-09 17:23:57 PDT
Created attachment 375985 [details]
[Image] Bug

Currently, HTML is garbled.

A few examples:

    <div id="flatpage" class="flatpages">

shown as:

    <"div id="flatpage" class="flatpages">

---
 
    <link href="https://static.npmjs.com/assets/cjz3o4s010001df74sudx2ja9/apos-
      minified/anon-cjz3o4s010001df74sudx2ja9.css" rel="stylesheet">

shown as:

    link href="https://static.npmjs.com/assets/cjz3o4s010001df74sudx2ja9/apos->
      <"minified/anon-cjz3o4s010001df74sudx2ja9.css" rel="stylesheet
Comment 1 Nikita Vasilyev 2019-08-16 15:51:48 PDT
Created attachment 376551 [details]
Patch
Comment 2 Nikita Vasilyev 2019-08-16 15:55:23 PDT
Created attachment 376553 [details]
[Image] With patch applied
Comment 3 Timothy Hatcher 2019-08-21 18:34:39 PDT
Comment on attachment 376551 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376551&action=review

> Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:47
> +        this.element.dir = "ltr";

Set this in CSS instead?
Comment 4 Nikita Vasilyev 2019-08-21 18:40:40 PDT
Comment on attachment 376551 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376551&action=review

>> Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:47
>> +        this.element.dir = "ltr";
> 
> Set this in CSS instead?

I set this as an attribute because there are CSS selectors that depend on it. For example, there's one that "unmirrors" disclosure triangles:

body[dir=rtl] [dir=ltr] .tree-outline .item .disclosure-button {
    transform: unset;
}
Comment 5 WebKit Commit Bot 2019-08-21 19:33:46 PDT
Comment on attachment 376551 [details]
Patch

Clearing flags on attachment: 376551

Committed r248991: <https://trac.webkit.org/changeset/248991>
Comment 6 WebKit Commit Bot 2019-08-21 19:33:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-08-21 19:34:17 PDT
<rdar://problem/54583339>