Bug 224051 - Web Inspector: Grid overlay does not honor writing modes and RTL layout direction.
Summary: Web Inspector: Grid overlay does not honor writing modes and RTL layout direc...
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: Patrick Angle
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-01 09:18 PDT by Patrick Angle
Modified: 2021-04-06 08:56 PDT (History)
7 users (show)

See Also:


Attachments
Patch v1.0 (18.88 KB, patch)
2021-04-05 13:06 PDT, Patrick Angle
no flags Details | Formatted Diff | Diff
Video of Patch v1.0 (4.24 MB, video/quicktime)
2021-04-05 13:21 PDT, Patrick Angle
no flags Details
Patch v1.1 - Review notes (18.68 KB, patch)
2021-04-05 14:31 PDT, Patrick Angle
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].