Bug 168793

Summary: Web Inspector: RTL: navigation sidebar text overflows on left side (per RTL context), but resource names are LTR
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: BJ Burg <bburg>
Status: NEW ---    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, karlcow, mattbaker
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
SCREENSHOT
none
Patch
mattbaker: review-
[Image] Tree element titles none

Description BJ Burg 2017-02-23 12:11:22 PST
Created attachment 302555 [details]
SCREENSHOT

Problems:

 - ellipsis on left side of text is prepended to the resource
 - subtitle with origin text should be overflowed before the resource name

For the first, we should override the dir attribute for these labels so that ellipsis appear on the right side of text. I think it should still be possible to right align them.
For the second, we should double-check that the separator used for this is localizable so RTL languages can swap the order of the title and subtitle. Or, we could do it manually if this is ambiguous.
Comment 1 Matt Baker 2017-03-10 21:10:59 PST
(In reply to comment #0)
> Created attachment 302555 [details]
> SCREENSHOT
> 
> Problems:
> 
>  - ellipsis on left side of text is prepended to the resource
>  - subtitle with origin text should be overflowed before the resource name
> 
> For the first, we should override the dir attribute for these labels so that
> ellipsis appear on the right side of text. I think it should still be
> possible to right align them.
> For the second, we should double-check that the separator used for this is
> localizable so RTL languages can swap the order of the title and subtitle.
> Or, we could do it manually if this is ambiguous.

I have a patch that resolves the second issue. Elements will flow their contents according the current direction as long as the children are inline-block.

With only minor CSS tweaks our GeneralTreeElement class works great in RTL!
Comment 2 Matt Baker 2017-03-10 21:23:34 PST
Created attachment 304131 [details]
Patch
Comment 3 Matt Baker 2017-03-10 21:24:12 PST
Created attachment 304132 [details]
[Image] Tree element titles
Comment 4 Matt Baker 2017-03-12 11:25:25 PDT
Comment on attachment 304131 [details]
Patch

Need to come up with an alternate solution: inline-block breaks text-overflow on the title/subtitle elements.
Comment 5 Karl Dubost 2022-06-02 23:50:25 PDT
This depends on partially at least on this bug with RTL text and ellipsis. https://bugs.webkit.org/show_bug.cgi?id=164999