Issue 530476 in chromium: [css-grid] Modify grid item height doesn't work

0 views
Skip to first unread message

chro...@googlecode.com

unread,
Sep 11, 2015, 4:27:08 AM9/11/15
to chromi...@chromium.org
Status: Available
Owner: ----
CC: svil...@igalia.com, jfernan...@igalia.com, r...@igalia.com
Labels: Type-Bug Pri-2 Cr-Blink-Layout-Grid OS-All

New issue 530476 by r...@igalia.com: [css-grid] Modify grid item height
doesn't work
https://code.google.com/p/chromium/issues/detail?id=530476


In the attached example if you click the "Test" button, the grid item's
height is set to 100px, however the item is not modified at all.

You can test it live at:
http://jsbin.com/vokuru/edit?html,output

Attachments:
test-height.html 510 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Sep 11, 2015, 11:57:57 AM9/11/15
to chromi...@chromium.org

Comment #2 on issue 530476 by jfernan...@igalia.com: [css-grid] Modify grid
This issue makes the following assertion to fail, so that would explain the
unexpected behavior in release builds:

Program received signal SIGSEGV, Segmentation fault.
0x000000000370a7e2 in blink::LayoutBox::computeLogicalHeight
(this=0x272e94a0c210, logicalHeight=..., logicalTop=..., computedValues=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBox.cpp:2288
2288 ASSERT(style()->logicalHeight().isAuto());
(gdb) bt
#0 0x000000000370a7e2 in blink::LayoutBox::computeLogicalHeight
(this=0x272e94a0c210, logicalHeight=..., logicalTop=..., computedValues=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBox.cpp:2288
#1 0x000000000370a30d in blink::LayoutBox::updateLogicalHeight
(this=0x272e94a0c210)
at ../../third_party/WebKit/Source/core/layout/LayoutBox.cpp:2237
#2 0x00000000036e5977 in blink::LayoutBlockFlow::layoutBlockFlow
(this=0x272e94a0c210, relayoutChildren=false, pageLogicalHeight=...,
layoutScope=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:410
#3 0x00000000036d73f8 in blink::LayoutBlockFlow::layoutBlock
(this=0x272e94a0c210, relayoutChildren=false)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:298
#4 0x00000000036b7fc8 in blink::LayoutBlock::layout (this=0x272e94a0c210)
at ../../third_party/WebKit/Source/core/layout/LayoutBlock.cpp:881
#5 0x00000000036c4eb6 in blink::LayoutObject::layoutIfNeeded
(this=0x272e94a0c210)
at ../../third_party/WebKit/Source/core/layout/LayoutObject.h:746
#6 0x0000000003745e71 in blink::LayoutGrid::logicalHeightForChild
(this=0x272e94a10010, child=..., columnTracks=...)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:630
#7 0x0000000003746312 in blink::LayoutGrid::minContentForChild
(this=0x272e94a10010, child=..., direction=blink::ForRows, columnTracks=...)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:672
#8 0x000000000374613f in blink::LayoutGrid::minSizeForChild
(this=0x272e94a10010, child=..., direction=blink::ForRows, columnTracks=...)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:645
#9 0x000000000374674d in
blink::LayoutGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems
(this=0x272e94a10010, direction=blink::ForRows, coordinate=...,
gridItem=..., track=...,
columnTracks=...)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:793
#10 0x0000000003745251 in
blink::LayoutGrid::resolveContentBasedTrackSizingFunctions
(this=0x272e94a10010, direction=blink::ForRows, sizingData=...)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:755
#11 0x000000000374412a in blink::LayoutGrid::computeUsedBreadthOfGridTracks
(this=0x272e94a10010, direction=blink::ForRows, sizingData=...,
freeSpace=...)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:425
#12 0x0000000003742eaf in blink::LayoutGrid::layoutGridItems
(this=0x272e94a10010)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:1318
#13 0x0000000003742cb7 in blink::LayoutGrid::layoutBlock
(this=0x272e94a10010, relayoutChildren=false)
at ../../third_party/WebKit/Source/core/layout/LayoutGrid.cpp:354
#14 0x00000000036b7fc8 in blink::LayoutBlock::layout (this=0x272e94a10010)
at ../../third_party/WebKit/Source/core/layout/LayoutBlock.cpp:881
#15 0x00000000036d7ec7 in blink::LayoutBlockFlow::layoutBlockChild
(this=0x272e94a0c110, child=..., marginInfo=...,
previousFloatLogicalBottom=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:561
#16 0x00000000036dcb7e in blink::LayoutBlockFlow::layoutBlockChildren
(this=0x272e94a0c110, relayoutChildren=false, layoutScope=...,
beforeEdge=..., afterEdge=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1052
#17 0x00000000036e5771 in blink::LayoutBlockFlow::layoutBlockFlow
(this=0x272e94a0c110, relayoutChildren=false, pageLogicalHeight=...,
layoutScope=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:378
#18 0x00000000036d73f8 in blink::LayoutBlockFlow::layoutBlock
(this=0x272e94a0c110, relayoutChildren=false)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:298
#19 0x00000000036b7fc8 in blink::LayoutBlock::layout (this=0x272e94a0c110)
at ../../third_party/WebKit/Source/core/layout/LayoutBlock.cpp:881
#20 0x00000000036d7ec7 in blink::LayoutBlockFlow::layoutBlockChild
(this=0x272e94a0c010, child=..., marginInfo=...,
previousFloatLogicalBottom=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:561
#21 0x00000000036dcb7e in blink::LayoutBlockFlow::layoutBlockChildren
(this=0x272e94a0c010, relayoutChildren=false, layoutScope=...,
beforeEdge=..., afterEdge=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1052
#22 0x00000000036e5771 in blink::LayoutBlockFlow::layoutBlockFlow
(this=0x272e94a0c010, relayoutChildren=false, pageLogicalHeight=...,
layoutScope=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:378
#23 0x00000000036d73f8 in blink::LayoutBlockFlow::layoutBlock
(this=0x272e94a0c010, relayoutChildren=false)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:298
#24 0x00000000036b7fc8 in blink::LayoutBlock::layout (this=0x272e94a0c010)
at ../../third_party/WebKit/Source/core/layout/LayoutBlock.cpp:881
#25 0x00000000036d7ec7 in blink::LayoutBlockFlow::layoutBlockChild
(this=0x272e94a04010, child=..., marginInfo=...,
previousFloatLogicalBottom=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:561
#26 0x00000000036dcb7e in blink::LayoutBlockFlow::layoutBlockChildren
(this=0x272e94a04010, relayoutChildren=false, layoutScope=...,
beforeEdge=..., afterEdge=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:1052
#27 0x00000000036e5771 in blink::LayoutBlockFlow::layoutBlockFlow
(this=0x272e94a04010, relayoutChildren=false, pageLogicalHeight=...,
layoutScope=...)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:378
#28 0x00000000036d73f8 in blink::LayoutBlockFlow::layoutBlock
(this=0x272e94a04010, relayoutChildren=false)
at ../../third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:298
#29 0x00000000036b7fc8 in blink::LayoutBlock::layout (this=0x272e94a04010)
at ../../third_party/WebKit/Source/core/layout/LayoutBlock.cpp:881
#30 0x00000000037e0615 in blink::LayoutView::layoutContent
(this=0x272e94a04010)
at ../../third_party/WebKit/Source/core/layout/LayoutView.cpp:155
#31 0x00000000037e0c68 in blink::LayoutView::layout (this=0x272e94a04010)
at ../../third_party/WebKit/Source/core/layout/LayoutView.cpp:245
#32 0x00000000032d5fcc in blink::layoutFromRootObject (root=...)
at ../../third_party/WebKit/Source/core/frame/FrameView.cpp:804
#33 0x00000000032d5e91 in blink::FrameView::performLayout
(this=0x3a3edd38010, inSubtreeLayout=false)
at ../../third_party/WebKit/Source/core/frame/FrameView.cpp:866
---Type <return> to continue, or q <return> to quit---

chro...@googlecode.com

unread,
Sep 14, 2015, 7:58:15 AM9/14/15
to chromi...@chromium.org

Comment #3 on issue 530476 by bugd...@chromium.org: [css-grid] Modify
grid item height doesn't work
https://code.google.com/p/chromium/issues/detail?id=530476#c3

The following revision refers to this bug:
http://src.chromium.org/viewvc/blink?view=rev&rev=202196

------------------------------------------------------------------
r202196 | jfern...@igalia.com | 2015-09-14T11:53:30.455782Z

Changed paths:
M
http://src.chromium.org/viewvc/blink/trunk/Source/core/layout/LayoutGrid.cpp?r1=202196&r2=202195&pathrev=202196
M
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change-expected.txt?r1=202196&r2=202195&pathrev=202196
M
http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html?r1=202196&r2=202195&pathrev=202196

[CSS Grid Layout] Content sized tracks must clear the override height

Content sized tracks depend on grid item's height to determine their
height. If the item was stretched and needs a new layout, we must clear
the override height to properly.

However, we can't just clear the override height because we need to know
it was set, hence we would need grid item's intrinsic height instead of
its logicalHeight in case it does not need such new layout.

BUG=530476

Review URL: https://codereview.chromium.org/1335213004
-----------------------------------------------------------------

chro...@googlecode.com

unread,
Sep 21, 2015, 6:07:36 AM9/21/15
to chromi...@chromium.org
Updates:
Status: Fixed

Comment #4 on issue 530476 by jfernan...@igalia.com: [css-grid] Modify grid
This should be fixed now, please, verify.
Reply all
Reply to author
Forward
0 new messages