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

Issue 358673003: [CSS Grid Layout] Avoid inserting grid items twice in the grid (Closed)

Created:
6 years, 6 months ago by svillar
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, jfernandez, leviw+renderwatch, pdr., Manuel Rego, rune+blink, svillar, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[CSS Grid Layout] Avoid inserting grid items twice in the grid Given a grid with one item wrapped by an anonymous block, every attempt to insert a new grid item before that one will trigger a crash due to a double call to RenderGrid::addChild for the new item, in the first one beforeChild is the already present item while in the second is the anonymous block. We should avoid inserting the new item in the grid twice by using similar checks to the ones already present in RenderBlock. BUG=313293 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177653

Patch Set 1 #

Total comments: 8

Patch Set 2 : Patch v2 #

Total comments: 2

Patch Set 3 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -0 lines) Patch
A LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderGrid.cpp View 1 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
svillar
I'll appreciate a review here :)
6 years, 6 months ago (2014-06-25 16:51:36 UTC) #1
Manuel Rego
I detected this very same issue past week. I reported it in a different bug ...
6 years, 6 months ago (2014-06-25 20:13:11 UTC) #2
Julien - ping for review
https://codereview.chromium.org/358673003/diff/1/Source/core/rendering/RenderGrid.cpp File Source/core/rendering/RenderGrid.cpp (right): https://codereview.chromium.org/358673003/diff/1/Source/core/rendering/RenderGrid.cpp#newcode215 Source/core/rendering/RenderGrid.cpp:215: dirtyGrid(); Do we really need to invalidate the grid ...
6 years, 6 months ago (2014-06-25 21:25:08 UTC) #3
svillar
Thanks for the very useful comments guys. https://codereview.chromium.org/358673003/diff/1/LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html File LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html (right): https://codereview.chromium.org/358673003/diff/1/LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html#newcode2 LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html:2: <p>This test ...
6 years, 6 months ago (2014-06-26 09:45:53 UTC) #4
Manuel Rego
I've been testing the new patch and as expected it also fixes the example (using ...
6 years, 5 months ago (2014-07-01 13:05:11 UTC) #5
svillar
Ping reviewers
6 years, 5 months ago (2014-07-07 08:46:33 UTC) #6
Julien - ping for review
lgtm https://codereview.chromium.org/358673003/diff/20001/LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html File LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html (right): https://codereview.chromium.org/358673003/diff/20001/LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html#newcode3 LayoutTests/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html:3: <div id=grid style="display: grid;">X</div> On 2014/07/01 13:05:11, Manuel ...
6 years, 5 months ago (2014-07-07 17:34:41 UTC) #7
svillar
Added the grid-auto-flow: stack
6 years, 5 months ago (2014-07-08 08:50:01 UTC) #8
svillar
The CQ bit was checked by svillar@igalia.com
6 years, 5 months ago (2014-07-08 08:50:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/svillar@igalia.com/358673003/40001
6 years, 5 months ago (2014-07-08 08:51:32 UTC) #10
commit-bot: I haz the power
6 years, 5 months ago (2014-07-08 09:52:37 UTC) #11
Message was sent while issue was closed.
Change committed as 177653

Powered by Google App Engine
This is Rietveld 408576698