Bug 224051

Summary: Web Inspector: Grid overlay does not honor writing modes and RTL layout direction.
Product: WebKit Reporter: Patrick Angle <pangle>
Component: Web InspectorAssignee: Patrick Angle <pangle>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, drousso, ews-watchlist, inspector-bugzilla-changes, joepeck, pangle, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1.0
none
Video of Patch v1.0
none
Patch v1.1 - Review notes none

Description Patrick Angle 2021-04-01 09:18:30 PDT
Enabling a grid overlay on an element with a non-`normal` writing mode or with RTL direction set (via CSS or `dir` attribute) results in an overlay that may not line up with the underlying grid.
Comment 1 Radar WebKit Bug Importer 2021-04-01 09:18:50 PDT
<rdar://problem/76106774>
Comment 2 Patrick Angle 2021-04-05 13:06:15 PDT
Created attachment 425194 [details]
Patch v1.0
Comment 3 Patrick Angle 2021-04-05 13:20:23 PDT
Comment on attachment 425194 [details]
Patch v1.0

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

> Source/WebCore/inspector/InspectorOverlay.cpp:70
> +#include "WritingMode.h"

This import isn't needed any more for this patch.
Comment 4 Patrick Angle 2021-04-05 13:21:08 PDT
Created attachment 425196 [details]
Video of Patch v1.0
Comment 5 BJ Burg 2021-04-05 13:49:06 PDT
Comment on attachment 425194 [details]
Patch v1.0

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

r=me, nice work!

> Source/WebCore/inspector/InspectorOverlay.cpp:1673
> +            startPoint = { isWritingModeFlipped ? contentBox.width() - gridStartY : gridStartY, isDirectionFlipped ? contentBox.height() - x :x };

Nit: missing space in ':x'
Comment 6 Patrick Angle 2021-04-05 14:31:22 PDT
Created attachment 425206 [details]
Patch v1.1 - Review notes
Comment 7 EWS 2021-04-06 08:56:25 PDT
Committed r275519: <https://commits.webkit.org/r275519>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425206 [details].