DevTools: Let the grid overlay frontend know what writing-mode the grid is in
Right now, the grid overlay does not support vertical writing modes. The grid information collected by the backend (track and gap breadth, etc.) is collected "logically", as if the grid was in its default horizontal-tb mode. The approach here is to add the writing-mode value to the grid info object sent to the grid overlay frontend so it can apply the right transformation, as a whole, to the overlay. I decided not to convert coordinates on the backend as I thought the code would become quickly difficult to read and maintain as opposed to applying a transform on the frontend canvas which would achieve the same thing. In both cases anyway, displaying grid labels so they point to the right place has to be done on the frontend, so doing the writing-mode transformation on the front-end means we do everything there, making it easier to follow. Corresponding frontend CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2364455/ Bug: 1096971 Change-Id: I27fc7b24d73581439cd1fb9c5dd6e4c19d4846d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363050 Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com> Reviewed-by:Brandon Goddard <brgoddar@microsoft.com> Reviewed-by:
Alex Rudenko <alexrudenko@chromium.org> Reviewed-by:
Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#799660}
Showing
This diff is collapsed.
Please register or sign in to comment