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

Issue 2471283004: [css-grid] Fix simplified layout of positioned grid items (Closed)

Created:
4 years, 1 month ago by Manuel Rego
Modified:
4 years, 1 month 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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Fix simplified layout of positioned grid items When a simplifiedLayout() is performed the method, for example when a positioned item is moved, LayoutGrid::layoutPositionedObjects() was not called. So the positioned items were not properly painted. To fix this we're properly overriding layoutPositionedObjects(). However we've to be careful and protect simplifiedLayout() so we don't perform it when we've positioned items and a dirty grid, otherwise we'll have troubles as layoutPositionedObjects() uses m_grid. On top of that, a new condition has been added into LayoutBox::updateGridPositionAfterStyleChange(), as for positioned items we don't need to mark the grid as dirty if they change the position. BUG=662049 TEST=fast/css-grid-layout/grid-positioned-item-dynamic-change-expected.html Committed: https://crrev.com/3c5effd4207aa48645264de4eaf3bca6c222ce71 Cr-Commit-Position: refs/heads/master@{#430401}

Patch Set 1 #

Total comments: 7

Patch Set 2 : New version #

Total comments: 4

Patch Set 3 : Fix minor comments #

Patch Set 4 : Remove unneeded line in test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change.html View 1 2 3 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change-expected.html View 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 2 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 17 (5 generated)
Manuel Rego
4 years, 1 month ago (2016-11-03 16:47:53 UTC) #2
cbiesinger
I'm confused -- why does simplifiedLayout get called? The caller is in LayoutBlockFlow, but grid ...
4 years, 1 month ago (2016-11-03 18:55:05 UTC) #3
Manuel Rego
On 2016/11/03 18:55:05, cbiesinger wrote: > I'm confused -- why does simplifiedLayout get called? The ...
4 years, 1 month ago (2016-11-03 20:16:55 UTC) #4
cbiesinger
On 2016/11/03 20:16:55, Manuel Rego wrote: > On 2016/11/03 18:55:05, cbiesinger wrote: > > I'm ...
4 years, 1 month ago (2016-11-03 20:25:49 UTC) #5
mstensho (USE GERRIT)
https://codereview.chromium.org/2471283004/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h File third_party/WebKit/Source/core/layout/LayoutBlock.h (right): https://codereview.chromium.org/2471283004/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h#newcode361 third_party/WebKit/Source/core/layout/LayoutBlock.h:361: virtual void layoutPositionedObjects( This shouldn't be necessary. https://codereview.chromium.org/2471283004/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h#newcode425 third_party/WebKit/Source/core/layout/LayoutBlock.h:425: ...
4 years, 1 month ago (2016-11-04 08:49:13 UTC) #7
Manuel Rego
Thanks for the reviews! I'm uploading a new version of the patch. On 2016/11/03 20:25:49, ...
4 years, 1 month ago (2016-11-04 09:29:17 UTC) #8
mstensho (USE GERRIT)
Don't know if you want to wait for cbiesinger or others, but this lgtm now. ...
4 years, 1 month ago (2016-11-04 09:47:34 UTC) #9
Manuel Rego
On 2016/11/04 09:47:34, mstensho wrote: > Don't know if you want to wait for cbiesinger ...
4 years, 1 month ago (2016-11-04 09:57:56 UTC) #10
cbiesinger
lgtm
4 years, 1 month ago (2016-11-07 21:25:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2471283004/60001
4 years, 1 month ago (2016-11-07 21:29:28 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-07 22:36:47 UTC) #15
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 22:40:20 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/3c5effd4207aa48645264de4eaf3bca6c222ce71
Cr-Commit-Position: refs/heads/master@{#430401}

Powered by Google App Engine
This is Rietveld 408576698