OLD | NEW |
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 Copyright (C) 2012 Motorola Mobility, Inc. All rights reserved. | 6 Copyright (C) 2012 Motorola Mobility, Inc. All rights reserved. |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 25 matching lines...) Expand all Loading... |
36 switch (length.type()) { | 36 switch (length.type()) { |
37 case Fixed: | 37 case Fixed: |
38 return length.getFloatValue(); | 38 return length.getFloatValue(); |
39 case Percent: | 39 case Percent: |
40 return static_cast<float>(maximumValue * length.percent() / 100.0f); | 40 return static_cast<float>(maximumValue * length.percent() / 100.0f); |
41 case FillAvailable: | 41 case FillAvailable: |
42 case Auto: | 42 case Auto: |
43 return static_cast<float>(maximumValue); | 43 return static_cast<float>(maximumValue); |
44 case Calculated: | 44 case Calculated: |
45 return length.nonNanCalculatedValue(maximumValue); | 45 return length.nonNanCalculatedValue(maximumValue); |
46 case ViewportPercentageWidth: | |
47 case ViewportPercentageHeight: | |
48 case ViewportPercentageMin: | |
49 case ViewportPercentageMax: | |
50 return 0; | |
51 case Intrinsic: | 46 case Intrinsic: |
52 case MinIntrinsic: | 47 case MinIntrinsic: |
53 case MinContent: | 48 case MinContent: |
54 case MaxContent: | 49 case MaxContent: |
55 case FitContent: | 50 case FitContent: |
56 case ExtendToZoom: | 51 case ExtendToZoom: |
| 52 case DeviceWidth: |
| 53 case DeviceHeight: |
57 case Undefined: | 54 case Undefined: |
58 ASSERT_NOT_REACHED(); | 55 ASSERT_NOT_REACHED(); |
59 return 0; | 56 return 0; |
60 } | 57 } |
61 ASSERT_NOT_REACHED(); | 58 ASSERT_NOT_REACHED(); |
62 return 0; | 59 return 0; |
63 } | 60 } |
64 | 61 |
65 } // namespace WebCore | 62 } // namespace WebCore |
OLD | NEW |