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

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

Issue 55843002: Length type Relative is now unused. Remove it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@length-relative-die-step-3-4
Patch Set: Created 7 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 | « Source/core/rendering/RenderBox.cpp ('k') | Source/platform/LengthFunctions.cpp » ('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 18 matching lines...) Expand all
29 #include "wtf/FastAllocBase.h" 29 #include "wtf/FastAllocBase.h"
30 #include "wtf/Forward.h" 30 #include "wtf/Forward.h"
31 #include "wtf/HashMap.h" 31 #include "wtf/HashMap.h"
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 WebCore { 36 namespace WebCore {
37 37
38 enum LengthType { 38 enum LengthType {
39 Auto, Relative, Percent, Fixed, 39 Auto, Percent, Fixed,
40 Intrinsic, MinIntrinsic, 40 Intrinsic, MinIntrinsic,
41 MinContent, MaxContent, FillAvailable, FitContent, 41 MinContent, MaxContent, FillAvailable, FitContent,
42 Calculated, 42 Calculated,
43 ViewportPercentageWidth, ViewportPercentageHeight, ViewportPercentageMin, Vi ewportPercentageMax, 43 ViewportPercentageWidth, ViewportPercentageHeight, ViewportPercentageMin, Vi ewportPercentageMax,
44 ExtendToZoom, 44 ExtendToZoom,
45 Undefined 45 Undefined
46 }; 46 };
47 47
48 enum ValueRange { 48 enum ValueRange {
49 ValueRangeAll, 49 ValueRangeAll,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 bool isNegative() const 218 bool isNegative() const
219 { 219 {
220 if (isUndefined() || isCalculated()) 220 if (isUndefined() || isCalculated())
221 return false; 221 return false;
222 222
223 return getFloatValue() < 0; 223 return getFloatValue() < 0;
224 } 224 }
225 225
226 bool isAuto() const { return type() == Auto; } 226 bool isAuto() const { return type() == Auto; }
227 bool isRelative() const { return type() == Relative; }
228 bool isPercent() const { return type() == Percent || type() == Calculated; } 227 bool isPercent() const { return type() == Percent || type() == Calculated; }
229 bool isFixed() const { return type() == Fixed; } 228 bool isFixed() const { return type() == Fixed; }
230 bool isIntrinsicOrAuto() const { return type() == Auto || isLegacyIntrinsic( ) || isIntrinsic(); } 229 bool isIntrinsicOrAuto() const { return type() == Auto || isLegacyIntrinsic( ) || isIntrinsic(); }
231 bool isLegacyIntrinsic() const { return type() == Intrinsic || type() == Min Intrinsic; } 230 bool isLegacyIntrinsic() const { return type() == Intrinsic || type() == Min Intrinsic; }
232 bool isIntrinsic() const { return type() == MinContent || type() == MaxConte nt || type() == FillAvailable || type() == FitContent; } 231 bool isIntrinsic() const { return type() == MinContent || type() == MaxConte nt || type() == FillAvailable || type() == FitContent; }
233 bool isSpecified() const { return type() == Fixed || type() == Percent || ty pe() == Calculated || isViewportPercentage(); } 232 bool isSpecified() const { return type() == Fixed || type() == Percent || ty pe() == Calculated || isViewportPercentage(); }
234 bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); } 233 bool isSpecifiedOrIntrinsic() const { return isSpecified() || isIntrinsic(); }
235 bool isCalculated() const { return type() == Calculated; } 234 bool isCalculated() const { return type() == Calculated; }
236 bool isCalculatedEqual(const Length&) const; 235 bool isCalculatedEqual(const Length&) const;
237 bool isMinContent() const { return type() == MinContent; } 236 bool isMinContent() const { return type() == MinContent; }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 bool m_quirk; 316 bool m_quirk;
318 unsigned char m_type; 317 unsigned char m_type;
319 bool m_isFloat; 318 bool m_isFloat;
320 }; 319 };
321 320
322 PLATFORM_EXPORT Vector<Length> parseHTMLAreaElementCoords(const String&); 321 PLATFORM_EXPORT Vector<Length> parseHTMLAreaElementCoords(const String&);
323 322
324 } // namespace WebCore 323 } // namespace WebCore
325 324
326 #endif // Length_h 325 #endif // Length_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/platform/LengthFunctions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698