WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
128173
[CSS Grid Layout] Percentages of indefinite sizes should compute to auto
https://bugs.webkit.org/show_bug.cgi?id=128173
Summary
[CSS Grid Layout] Percentages of indefinite sizes should compute to auto
Sergio Villar Senin
Reported
2014-02-04 04:33:33 PST
According to the spec,
http://dev.w3.org/csswg/css-grid/#valuedef-percentage
, that's what we have to do. This will fix examples like the following one .grid { width: -webkit-min-content; height: auto; -webkit-grid-definition-columns:50%; -webkit-grid-definition-rows:20%; } <div class="grid"></div> If we ask for getComputedStyle() for the <div> element, we'll get a negative value, because the renderer will try to compute a percentage of an undefined size (which is internally represented as -1).
Attachments
Patch
(19.22 KB, patch)
2014-02-07 03:17 PST
,
Sergio Villar Senin
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sergio Villar Senin
Comment 1
2014-02-07 03:17:21 PST
Created
attachment 223446
[details]
Patch
Darin Adler
Comment 2
2014-03-03 10:58:39 PST
Comment on
attachment 223446
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=223446&action=review
> Source/WebCore/rendering/RenderGrid.cpp:413 > + DEFINE_STATIC_LOCAL(GridTrackSize, autoTrackSize, (Auto));
New code should not use DEFINE_STATIC_LOCAL (I think we should rename it DEPRECATED_DEFINE_STATIC_LOCAL). Instead you should just use static NeverDestroyed. There are lots of examples of that all over the code.
Sergio Villar Senin
Comment 3
2014-03-03 11:17:46 PST
(In reply to
comment #2
)
> (From update of
attachment 223446
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=223446&action=review
> > > Source/WebCore/rendering/RenderGrid.cpp:413 > > + DEFINE_STATIC_LOCAL(GridTrackSize, autoTrackSize, (Auto)); > > New code should not use DEFINE_STATIC_LOCAL (I think we should rename it DEPRECATED_DEFINE_STATIC_LOCAL). Instead you should just use static NeverDestroyed. There are lots of examples of that all over the code.
Filed
https://bugs.webkit.org/show_bug.cgi?id=129612
Sergio Villar Senin
Comment 4
2014-03-04 04:30:47 PST
Committed
r165048
: <
http://trac.webkit.org/changeset/165048
>
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