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

Side by Side Diff: Source/WebCore/platform/Length.h

Issue 13674002: Support intrinsic values for height, min-height and max-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSS table tests Created 7 years, 8 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 | « Source/WebCore/css/StyleBuilder.cpp ('k') | Source/WebCore/rendering/RenderBox.h » ('j') | 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) 1999 Lars Knoll (knoll@kde.org) 2 Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
4 Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com) 4 Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com)
5 Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 bool isFixed() const { return type() == Fixed; } 221 bool isFixed() const { return type() == Fixed; }
222 bool isIntrinsicOrAuto() const { return type() == Auto || isLegacyIntrinsic( ) || isIntrinsic(); } 222 bool isIntrinsicOrAuto() const { return type() == Auto || isLegacyIntrinsic( ) || isIntrinsic(); }
223 bool isLegacyIntrinsic() const { return type() == Intrinsic || type() == Min Intrinsic; } 223 bool isLegacyIntrinsic() const { return type() == Intrinsic || type() == Min Intrinsic; }
224 bool isIntrinsic() const { return type() == MinContent || type() == MaxConte nt || type() == FillAvailable || type() == FitContent; } 224 bool isIntrinsic() const { return type() == MinContent || type() == MaxConte nt || type() == FillAvailable || type() == FitContent; }
225 bool isSpecified() const { return type() == Fixed || type() == Percent || ty pe() == Calculated || isViewportPercentage(); } 225 bool isSpecified() const { return type() == Fixed || type() == Percent || ty pe() == Calculated || isViewportPercentage(); }
226 bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); } 226 bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); }
227 bool isCalculated() const { return type() == Calculated; } 227 bool isCalculated() const { return type() == Calculated; }
228 bool isCalculatedEqual(const Length&) const; 228 bool isCalculatedEqual(const Length&) const;
229 bool isMinContent() const { return type() == MinContent; } 229 bool isMinContent() const { return type() == MinContent; }
230 bool isMaxContent() const { return type() == MaxContent; } 230 bool isMaxContent() const { return type() == MaxContent; }
231 bool isFillAvailable() const { return type() == FillAvailable; }
232 bool isFitContent() const { return type() == FitContent; }
231 233
232 Length blend(const Length& from, double progress) const 234 Length blend(const Length& from, double progress) const
233 { 235 {
234 // Blend two lengths to produce a new length that is in between them. U sed for animation. 236 // Blend two lengths to produce a new length that is in between them. U sed for animation.
235 if (from.type() == Calculated || type() == Calculated) 237 if (from.type() == Calculated || type() == Calculated)
236 return blendMixedTypes(from, progress); 238 return blendMixedTypes(from, progress);
237 239
238 if (!from.isZero() && !isZero() && from.type() != type()) 240 if (!from.isZero() && !isZero() && from.type() != type())
239 return blendMixedTypes(from, progress); 241 return blendMixedTypes(from, progress);
240 242
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 unsigned char m_type; 314 unsigned char m_type;
313 bool m_isFloat; 315 bool m_isFloat;
314 }; 316 };
315 317
316 PassOwnArrayPtr<Length> newCoordsArray(const String&, int& len); 318 PassOwnArrayPtr<Length> newCoordsArray(const String&, int& len);
317 PassOwnArrayPtr<Length> newLengthArray(const String&, int& len); 319 PassOwnArrayPtr<Length> newLengthArray(const String&, int& len);
318 320
319 } // namespace WebCore 321 } // namespace WebCore
320 322
321 #endif // Length_h 323 #endif // Length_h
OLDNEW
« no previous file with comments | « Source/WebCore/css/StyleBuilder.cpp ('k') | Source/WebCore/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698