Convert TrackList's 'values' field to store only TrackSize.

It was storing both TrackSize and TrackRepeat before and TrackRepeat have to be
converted into sequence of TrackSize during serialization. Instead of doing this
in serialization process(which is hard and hacky), we converted to do this in
parsing process. We were doing this conversion in the ComputedValue conversion.
So we only had to move this process to parsing.
This commit is contained in:
Nazım Can Altınova 2017-07-14 15:41:26 -07:00
parent 8e14d93602
commit ade76f10b7
5 changed files with 92 additions and 130 deletions

View file

@ -549,10 +549,10 @@ pub type TrackSize = GenericTrackSize<LengthOrPercentage>;
/// The computed value of a grid `<track-list>`
/// (could also be `<auto-track-list>` or `<explicit-track-list>`)
pub type TrackList = GenericTrackList<TrackSize>;
pub type TrackList = GenericTrackList<LengthOrPercentage>;
/// `<grid-template-rows> | <grid-template-columns>`
pub type GridTemplateComponent = GenericGridTemplateComponent<TrackSize>;
pub type GridTemplateComponent = GenericGridTemplateComponent<LengthOrPercentage>;
impl ClipRectOrAuto {
/// Return an auto (default for clip-rect and image-region) value