Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: third_party/WebKit/Source/core/style/GridTrackSize.h

Issue 2420673002: [css-grid] Recompute track sizes if fit-content() argument is modified (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-change-fit-content-argument-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 bool isContentSized() const { 97 bool isContentSized() const {
98 return m_minTrackBreadth.isContentSized() || 98 return m_minTrackBreadth.isContentSized() ||
99 m_maxTrackBreadth.isContentSized(); 99 m_maxTrackBreadth.isContentSized();
100 } 100 }
101 bool isFitContent() const { return m_type == FitContentTrackSizing; } 101 bool isFitContent() const { return m_type == FitContentTrackSizing; }
102 102
103 bool operator==(const GridTrackSize& other) const { 103 bool operator==(const GridTrackSize& other) const {
104 return m_type == other.m_type && 104 return m_type == other.m_type &&
105 m_minTrackBreadth == other.m_minTrackBreadth && 105 m_minTrackBreadth == other.m_minTrackBreadth &&
106 m_maxTrackBreadth == other.m_maxTrackBreadth; 106 m_maxTrackBreadth == other.m_maxTrackBreadth &&
107 m_fitContentTrackBreadth == other.m_fitContentTrackBreadth;
107 } 108 }
108 109
109 void cacheMinMaxTrackBreadthTypes() { 110 void cacheMinMaxTrackBreadthTypes() {
110 m_minTrackBreadthIsAuto = 111 m_minTrackBreadthIsAuto =
111 minTrackBreadth().isLength() && minTrackBreadth().length().isAuto(); 112 minTrackBreadth().isLength() && minTrackBreadth().length().isAuto();
112 m_minTrackBreadthIsMinContent = minTrackBreadth().isLength() && 113 m_minTrackBreadthIsMinContent = minTrackBreadth().isLength() &&
113 minTrackBreadth().length().isMinContent(); 114 minTrackBreadth().length().isMinContent();
114 m_minTrackBreadthIsMaxContent = minTrackBreadth().isLength() && 115 m_minTrackBreadthIsMaxContent = minTrackBreadth().isLength() &&
115 minTrackBreadth().length().isMaxContent(); 116 minTrackBreadth().length().isMaxContent();
116 m_maxTrackBreadthIsMaxContent = maxTrackBreadth().isLength() && 117 m_maxTrackBreadthIsMaxContent = maxTrackBreadth().isLength() &&
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 bool m_minTrackBreadthIsMinContent : 1; 180 bool m_minTrackBreadthIsMinContent : 1;
180 bool m_maxTrackBreadthIsMaxContent : 1; 181 bool m_maxTrackBreadthIsMaxContent : 1;
181 bool m_maxTrackBreadthIsMinContent : 1; 182 bool m_maxTrackBreadthIsMinContent : 1;
182 bool m_minTrackBreadthIsIntrinsic : 1; 183 bool m_minTrackBreadthIsIntrinsic : 1;
183 bool m_maxTrackBreadthIsIntrinsic : 1; 184 bool m_maxTrackBreadthIsIntrinsic : 1;
184 }; 185 };
185 186
186 } // namespace blink 187 } // namespace blink
187 188
188 #endif // GridTrackSize_h 189 #endif // GridTrackSize_h
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-change-fit-content-argument-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698