Skip to content

Commit

Permalink
Grid properties should not accept unitless length quirk
Browse files Browse the repository at this point in the history
The following properties are currently accepting unit lengths
in quirks mode, contrary to spec[1].
- grid-auto-columns
- grid-auto-rows
- grid-template-columns
- grid-template-rows
so it should disallow.

[1]https://quirks.spec.whatwg.org/#the-unitless-length-quirk

Bug: 876704
Change-Id: I3af3d01f96efb3b3f788ca02893b12c7ae683c20
Reviewed-on: https://chromium-review.googlesource.com/1190045
Commit-Queue: Eric Willigers <[email protected]>
Commit-Queue: Hwanseung Lee <[email protected]>
Reviewed-by: Eric Willigers <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586513}
  • Loading branch information
hwanseung authored and Commit Bot committed Aug 28, 2018
1 parent 87e497f commit 13c023c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

var properties = [
'block-size',
'grid-auto-columns',
'grid-auto-rows',
'grid-template-columns',
'grid-template-rows',
'inline-size',
'margin-block-end',
'margin-block-start',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ CSSValue* ConsumeGridBreadth(CSSParserTokenRange& range,
}
return CSSPropertyParserHelpers::ConsumeLengthOrPercent(
range, css_parser_mode, kValueRangeNonNegative,
CSSPropertyParserHelpers::UnitlessQuirk::kAllow);
CSSPropertyParserHelpers::UnitlessQuirk::kForbid);
}

CSSValue* ConsumeFitContent(CSSParserTokenRange& range,
Expand Down

0 comments on commit 13c023c

Please sign in to comment.