Bug 233294

Summary: Web Inspector: allow left docking when in LTR and right docking when in RTL
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, ews-watchlist, hi, inspector-bugzilla-changes, joepeck, pangle, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 234262    
Attachments:
Description Flags
Patch
none
[Image] after Patch is applied (undocked - light)
none
Patch
none
Patch none

Description Devin Rousso 2021-11-17 16:46:20 PST
Some developers prefer docking to the left even when in LTR and/or docking to the right when in RTL. There's no technical reason to disallow this, so let's make it possible.
Comment 1 Devin Rousso 2021-11-17 16:46:54 PST
Created attachment 444604 [details]
Patch
Comment 2 Devin Rousso 2021-11-17 16:47:44 PST
Created attachment 444605 [details]
[Image] after Patch is applied (undocked - light)
Comment 3 Patrick Angle 2021-11-17 17:35:03 PST
Comment on attachment 444604 [details]
Patch

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

Looks good to me, but needs to account for RTL layouts where the icons will be laid out in the reverse order, even though the sides they represent remain fixed.

> Source/WebInspectorUI/UserInterface/Base/Main.js:362
> +    if (supportsDockLeft && (supportsDockRight || supportsDockBottom || supportsUndocked)) {

I think the order of icons is going to be unintuitive in RTL languages - The icons will be placed on the rightmost edge of the tab bar in that case, with the docked items arranged visually as ["windowed", "right", "bottom", "left", "windowed"] (with one of those options hidden at any given time) and not ["windowed", "left", "bottom", "right"], so I think we still need to check WI.resolvedLayoutDirection and make sure the order of these buttons make sense.
Comment 4 Devin Rousso 2021-11-17 17:51:26 PST
Created attachment 444617 [details]
Patch
Comment 5 Devin Rousso 2021-11-17 17:53:21 PST
Created attachment 444618 [details]
Patch
Comment 6 Patrick Angle 2021-11-17 18:19:35 PST
Comment on attachment 444618 [details]
Patch

Nice! r=me
Comment 7 EWS 2021-11-17 19:28:29 PST
Committed r285974 (244371@main): <https://commits.webkit.org/244371@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444618 [details].
Comment 8 Radar WebKit Bug Importer 2021-11-17 19:29:25 PST
<rdar://problem/85531803>