Closed Bug 1251999 Opened 8 years ago Closed 8 years ago

[css-grid] Update <fixed-size> parsing to the latest spec

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(2 files)

The syntax for <fixed-size> recently changed to:
<fixed-size> = 
  <fixed-breadth> | 
  minmax( <fixed-breadth> , <track-breadth> ) |
  minmax( <track-breadth> , <fixed-breadth> )
https://drafts.csswg.org/css-grid/#typedef-fixed-size

I think our layout code already handles this correctly though - we use
the max-sizing function if it's definite, otherwise the min-sizing.

I should update the code comment here though since the spec text changed:
http://hg.mozilla.org/mozilla-central/annotate/5e0140b6d118/layout/generic/nsGridContainerFrame.cpp#l428
Priority: -- → P3
Attached patch fixSplinter Review
Attachment #8724826 - Flags: review?(dholbert)
Comment on attachment 8724826 [details] [diff] [review]
fix

Review of attachment 8724826 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for being on top of this spec-change!

r=me, just one nit:

::: layout/style/nsCSSParser.cpp
@@ +8603,5 @@
>  CSSParseResult
>  CSSParserImpl::ParseGridTrackSize(nsCSSValue& aValue,
>                                    GridTrackSizeFlags aFlags)
>  {
> +  const bool requireFixedSize = !!(aFlags & GridTrackSizeFlags::eFixedTrackSize);

This line is a little too long -- either wrap after the "=", or do something like s/require/need/ in the variable-name to shorten.
Attachment #8724826 - Flags: review?(dholbert) → review+
I skimmed the tests, too, & they seem sane - feel free to mark those as rs=dholbert if you like
https://hg.mozilla.org/mozilla-central/rev/bd98615e4b4b
https://hg.mozilla.org/mozilla-central/rev/9060d17ed510
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: