WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145604
[CSS Grid Layout] Setting height on a grid item doesn't have any effect
https://bugs.webkit.org/show_bug.cgi?id=145604
Summary
[CSS Grid Layout] Setting height on a grid item doesn't have any effect
Javier Fernandez
Reported
2015-06-03 07:37:34 PDT
Created
attachment 254173
[details]
Example to reproduce the issue. If you render a grid and then you modify the height of a grid item (which previously had "height: auto;" and was stretched), the item is not resized as expected. If align-items is "start" you cannot reproduce the issue. Attached example to reproduce the issue, when you click on the button the "A" item should be resized to 100x100. Only width is resized.
Attachments
Example to reproduce the issue.
(783 bytes, text/html)
2015-06-03 07:37 PDT
,
Javier Fernandez
no flags
Details
Example to reproduce the issue.
(871 bytes, text/html)
2015-06-03 09:40 PDT
,
Javier Fernandez
no flags
Details
Patch
(8.08 KB, patch)
2015-06-08 03:19 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Javier Fernandez
Comment 1
2015-06-03 09:40:50 PDT
Created
attachment 254181
[details]
Example to reproduce the issue.
Javier Fernandez
Comment 2
2015-06-08 03:19:48 PDT
Created
attachment 254483
[details]
Patch
Sergio Villar Senin
Comment 3
2015-06-08 08:16:06 PDT
Comment on
attachment 254483
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254483&action=review
Nice catch!
> Source/WebCore/rendering/RenderGrid.cpp:1300 > + child.clearOverrideLogicalContentHeight();
Don't we need to mark the child as needs layout in these cases?
Javier Fernandez
Comment 4
2015-06-08 12:35:07 PDT
(In reply to
comment #3
)
> Comment on
attachment 254483
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=254483&action=review
> > Nice catch! > > > Source/WebCore/rendering/RenderGrid.cpp:1300 > > + child.clearOverrideLogicalContentHeight(); > > Don't we need to mark the child as needs layout in these cases?
No, we don't. The overrideHeight is something we use to indicate, during layout, that instead of computing block's logical height a specific value must be used instead. Since grid layout uses this to set the stretched height, we need to clear it whenever stretching becomes not allowed. Whether block's logical height or not depends on many factors, what changed (width, margin, parent's height, ...) and that is not grid's layout responsibility; a block layout is forced only when its height is changed because of the stretching operation itself.
WebKit Commit Bot
Comment 5
2015-06-08 13:26:33 PDT
Comment on
attachment 254483
[details]
Patch Clearing flags on attachment: 254483 Committed
r185327
: <
http://trac.webkit.org/changeset/185327
>
WebKit Commit Bot
Comment 6
2015-06-08 13:26:37 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug