Bug 200601

Summary: Web Inspector: RTL: DOM outline in Elements tab should be LTR
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Image] Bug
none
Patch
none
[Image] With patch applied none

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>