Description[css-grid] Fix positioned children in RTL
The problem is only affecting the items without
a static inline position (i.e. "left" and/or "right" properties
are not "auto"). In this particular case we need to compute
the "offset" from the left, so we need a specific condition
and computation.
Let's use an example to understand what it's fixing:
<div style="display: grid; grid-template-columns: 100px 50px; width: 300px;
position: relative; direction: rtl;">
<div style="position: absolute; left: 0; grid-column: 1 / 2;">item</div>
</div>
In this case the item has to be placed in the first column
(the one on the right as we're in RTL).
For this we need to calculate the offset from the left, which is 200px:
150px (alignment offset) + 50px (offset from line 3 to 2).
Added more RTL cases for the positioned tests.
BUG=568882
TEST=fast/css-grid-layout/grid-positioned-items-background-rtl.html
Committed: https://crrev.com/ee6041d32d93b5fcc4915f8280b6a7e09187650b
Cr-Commit-Position: refs/heads/master@{#384539}
Patch Set 1 #
Total comments: 2
Dependent Patchsets: Messages
Total messages: 12 (5 generated)
|