Bug 226877 - [css-grid] Consider container's writing mode to get grid item's margin
Summary: [css-grid] Consider container's writing mode to get grid item's margin
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zsun
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-10 06:51 PDT by zsun
Modified: 2021-06-25 06:58 PDT (History)
13 users (show)

See Also:


Attachments
Patch (11.57 KB, patch)
2021-06-10 07:20 PDT, zsun
no flags Details | Formatted Diff | Diff
Patch (11.13 KB, patch)
2021-06-11 01:30 PDT, zsun
no flags Details | Formatted Diff | Diff
Patch (10.38 KB, patch)
2021-06-25 03:41 PDT, zsun
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zsun 2021-06-10 06:51:38 PDT
The following WPT tests fail:

css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-008.html
css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011.html
Comment 1 zsun 2021-06-10 07:20:21 PDT
Created attachment 431076 [details]
Patch
Comment 2 EWS Watchlist 2021-06-10 07:21:23 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 zsun 2021-06-11 01:30:01 PDT
Created attachment 431183 [details]
Patch
Comment 4 Sergio Villar Senin 2021-06-14 02:38:05 PDT
Comment on attachment 431183 [details]
Patch

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

> Source/WebCore/rendering/RenderGrid.cpp:1590
>      LayoutUnit gridBorder = isRowAxis ? borderLogicalLeft() : borderBefore();

I wonder whether we have to do the same with borders and/or position. But that's just food for thought for another bug.
Comment 5 Oriol Brufau 2021-06-14 09:49:27 PDT
Comment on attachment 431183 [details]
Patch

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

>> Source/WebCore/rendering/RenderGrid.cpp:1590
>>      LayoutUnit gridBorder = isRowAxis ? borderLogicalLeft() : borderBefore();
> 
> I wonder whether we have to do the same with borders and/or position. But that's just food for thought for another bug.

Note the border is the one of the grid container. So it already is resolved using the writing mode of the grid container.
Comment 6 Sergio Villar Senin 2021-06-15 00:41:35 PDT
Comment on attachment 431183 [details]
Patch

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

>>> Source/WebCore/rendering/RenderGrid.cpp:1590
>>>      LayoutUnit gridBorder = isRowAxis ? borderLogicalLeft() : borderBefore();
>> 
>> I wonder whether we have to do the same with borders and/or position. But that's just food for thought for another bug.
> 
> Note the border is the one of the grid container. So it already is resolved using the writing mode of the grid container.

Oh right. But it still stands for the childPosition right?. There are several WPT tests failing in flexbox for example related to vertical-rl due to incorrect offsetLeft and I suspect that might be the cause of issues. Not sure if also here for grid too.
Comment 7 Radar WebKit Bug Importer 2021-06-17 06:52:36 PDT
<rdar://problem/79448742>
Comment 8 zsun 2021-06-24 02:23:22 PDT
The mac-wk2-stress failure looks related to https://bugs.webkit.org/show_bug.cgi?id=225126
Comment 9 zsun 2021-06-25 03:41:55 PDT
Created attachment 432253 [details]
Patch
Comment 10 EWS 2021-06-25 06:28:06 PDT
zsun@igalia.com does not have committer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/Tools/Scripts/webkitpy/common/config/contributors.json.

Rejecting attachment 432253 [details] from commit queue.
Comment 11 EWS 2021-06-25 06:58:32 PDT
Committed r279278 (239157@main): <https://commits.webkit.org/239157@main>

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