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

Side by Side Diff: third_party/WebKit/Source/platform/Length.h

Issue 1420303002: Remove support for intrinsic and min-intrinsic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 21 matching lines...) Expand all
32 #include "wtf/MathExtras.h" 32 #include "wtf/MathExtras.h"
33 #include "wtf/Vector.h" 33 #include "wtf/Vector.h"
34 #include <cstring> 34 #include <cstring>
35 35
36 namespace blink { 36 namespace blink {
37 37
38 // FIXME: This enum makes it hard to tell in general what values may be 38 // FIXME: This enum makes it hard to tell in general what values may be
39 // appropriate for any given Length. 39 // appropriate for any given Length.
40 enum LengthType { 40 enum LengthType {
41 Auto, Percent, Fixed, 41 Auto, Percent, Fixed,
42 Intrinsic, MinIntrinsic,
43 MinContent, MaxContent, FillAvailable, FitContent, 42 MinContent, MaxContent, FillAvailable, FitContent,
44 Calculated, 43 Calculated,
45 ExtendToZoom, DeviceWidth, DeviceHeight, 44 ExtendToZoom, DeviceWidth, DeviceHeight,
46 MaxSizeNone 45 MaxSizeNone
47 }; 46 };
48 47
49 enum ValueRange { 48 enum ValueRange {
50 ValueRangeAll, 49 ValueRangeAll,
51 ValueRangeNonNegative 50 ValueRangeNonNegative
52 }; 51 };
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 bool isNegative() const 236 bool isNegative() const
238 { 237 {
239 if (isMaxSizeNone() || isCalculated()) 238 if (isMaxSizeNone() || isCalculated())
240 return false; 239 return false;
241 240
242 return getFloatValue() < 0; 241 return getFloatValue() < 0;
243 } 242 }
244 243
245 bool isAuto() const { return type() == Auto; } 244 bool isAuto() const { return type() == Auto; }
246 bool isFixed() const { return type() == Fixed; } 245 bool isFixed() const { return type() == Fixed; }
247 bool isIntrinsicOrAuto() const { return type() == Auto || isLegacyIntrinsic( ) || isIntrinsic(); } 246 bool isIntrinsicOrAuto() const { return type() == Auto || isIntrinsic(); }
248 bool isLegacyIntrinsic() const { return type() == Intrinsic || type() == Min Intrinsic; }
249 bool isIntrinsic() const { return type() == MinContent || type() == MaxConte nt || type() == FillAvailable || type() == FitContent; } 247 bool isIntrinsic() const { return type() == MinContent || type() == MaxConte nt || type() == FillAvailable || type() == FitContent; }
250 bool isSpecified() const { return type() == Fixed || type() == Percent || ty pe() == Calculated; } 248 bool isSpecified() const { return type() == Fixed || type() == Percent || ty pe() == Calculated; }
251 bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); } 249 bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); }
252 bool isCalculated() const { return type() == Calculated; } 250 bool isCalculated() const { return type() == Calculated; }
253 bool isCalculatedEqual(const Length&) const; 251 bool isCalculatedEqual(const Length&) const;
254 bool isMinContent() const { return type() == MinContent; } 252 bool isMinContent() const { return type() == MinContent; }
255 bool isMaxContent() const { return type() == MaxContent; } 253 bool isMaxContent() const { return type() == MaxContent; }
256 bool isFillAvailable() const { return type() == FillAvailable; } 254 bool isFillAvailable() const { return type() == FillAvailable; }
257 bool isFitContent() const { return type() == FitContent; } 255 bool isFitContent() const { return type() == FitContent; }
258 bool hasPercent() const { return type() == Percent || type() == Calculated; } 256 bool hasPercent() const { return type() == Percent || type() == Calculated; }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 bool m_quirk; 319 bool m_quirk;
322 unsigned char m_type; 320 unsigned char m_type;
323 bool m_isFloat; 321 bool m_isFloat;
324 }; 322 };
325 323
326 PLATFORM_EXPORT Vector<Length> parseHTMLAreaElementCoords(const String&); 324 PLATFORM_EXPORT Vector<Length> parseHTMLAreaElementCoords(const String&);
327 325
328 } // namespace blink 326 } // namespace blink
329 327
330 #endif // Length_h 328 #endif // Length_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLengthContext.cpp ('k') | third_party/WebKit/Source/platform/LengthFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698