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

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

Issue 2473493003: [css-grid] mimax(auto, <flex>) should be serialized as <flex> (Closed)
Patch Set: Created 4 years, 1 month 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/Source/core/css/ComputedStyleCSSValueMapping.cpp ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 bool operator==(const GridLength& o) const { 69 bool operator==(const GridLength& o) const {
70 return m_length == o.m_length && m_flex == o.m_flex && m_type == o.m_type; 70 return m_length == o.m_length && m_flex == o.m_flex && m_type == o.m_type;
71 } 71 }
72 72
73 bool isContentSized() const { 73 bool isContentSized() const {
74 return m_type == LengthType && 74 return m_type == LengthType &&
75 (m_length.isAuto() || m_length.isMinContent() || 75 (m_length.isAuto() || m_length.isMinContent() ||
76 m_length.isMaxContent()); 76 m_length.isMaxContent());
77 } 77 }
78 78
79 bool isAuto() const { return m_type == LengthType && m_length.isAuto(); }
80
79 private: 81 private:
80 // Ideally we would put the 2 following fields in a union, but Length has a 82 // Ideally we would put the 2 following fields in a union, but Length has a
81 // constructor, a destructor and a copy assignment which isn't allowed. 83 // constructor, a destructor and a copy assignment which isn't allowed.
82 Length m_length; 84 Length m_length;
83 double m_flex; 85 double m_flex;
84 enum GridLengthType { LengthType, FlexType }; 86 enum GridLengthType { LengthType, FlexType };
85 GridLengthType m_type; 87 GridLengthType m_type;
86 }; 88 };
87 89
88 } // namespace blink 90 } // namespace blink
89 91
90 #endif // GridLength_h 92 #endif // GridLength_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698