Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Issue 1841073002: [css-grid] Fix positioned children in RTL (Closed)

Created:
4 years, 8 months ago by Manuel Rego
Modified:
4 years, 8 months ago
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, svillar, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, leviw+renderwatch, jchaffraix+rendering, blink-reviews, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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

Messages

Total messages: 12 (5 generated)
Manuel Rego
This is the 2nd part of: http://crrev.com/1824323002/ The 1st part has already landed: http://crrev.com/1838173002/
4 years, 8 months ago (2016-03-29 15:24:09 UTC) #2
Manuel Rego
On 2016/03/29 15:24:09, Manuel Rego wrote: > This is the 2nd part of: http://crrev.com/1824323002/ > ...
4 years, 8 months ago (2016-03-29 16:31:20 UTC) #3
svillar
lgtm. The values we store in the vectors are starting to make no sense at ...
4 years, 8 months ago (2016-04-01 08:55:49 UTC) #4
Manuel Rego
Thanks for the review. https://codereview.chromium.org/1841073002/diff/1/third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html File third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html (right): https://codereview.chromium.org/1841073002/diff/1/third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html#newcode300 third_party/WebKit/LayoutTests/fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html:300: <div class="sizedToGridArea absolute autoRowAutoColumn offsetLeft25 ...
4 years, 8 months ago (2016-04-01 09:17:05 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1841073002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1841073002/1
4 years, 8 months ago (2016-04-01 09:17:29 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-01 10:34:27 UTC) #10
commit-bot: I haz the power
4 years, 8 months ago (2016-04-01 10:35:39 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/ee6041d32d93b5fcc4915f8280b6a7e09187650b
Cr-Commit-Position: refs/heads/master@{#384539}

Powered by Google App Engine
This is Rietveld 408576698