| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue) | 65 LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue) |
| 66 { | 66 { |
| 67 switch (length.type()) { | 67 switch (length.type()) { |
| 68 case Fixed: | 68 case Fixed: |
| 69 return length.value(); | 69 return length.value(); |
| 70 case Percent: | 70 case Percent: |
| 71 // Don't remove the extra cast to float. It is needed for rounding on 32
-bit Intel machines that use the FPU stack. | 71 // Don't remove the extra cast to float. It is needed for rounding on 32
-bit Intel machines that use the FPU stack. |
| 72 return static_cast<float>(maximumValue * length.percent() / 100.0f); | 72 return static_cast<float>(maximumValue * length.percent() / 100.0f); |
| 73 case Calculated: | 73 case Calculated: |
| 74 return length.nonNanCalculatedValue(maximumValue); | 74 return length.nonNanCalculatedValue(maximumValue.toFloat()); |
| 75 case FillAvailable: | 75 case FillAvailable: |
| 76 case Auto: | 76 case Auto: |
| 77 return 0; | 77 return 0; |
| 78 case Intrinsic: | 78 case Intrinsic: |
| 79 case MinIntrinsic: | 79 case MinIntrinsic: |
| 80 case MinContent: | 80 case MinContent: |
| 81 case MaxContent: | 81 case MaxContent: |
| 82 case FitContent: | 82 case FitContent: |
| 83 case ExtendToZoom: | 83 case ExtendToZoom: |
| 84 case DeviceWidth: | 84 case DeviceWidth: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 ASSERT_NOT_REACHED(); | 123 ASSERT_NOT_REACHED(); |
| 124 return 0; | 124 return 0; |
| 125 } | 125 } |
| 126 | 126 |
| 127 FloatSize floatSizeForLengthSize(const LengthSize& lengthSize, const FloatSize&
boxSize) | 127 FloatSize floatSizeForLengthSize(const LengthSize& lengthSize, const FloatSize&
boxSize) |
| 128 { | 128 { |
| 129 return FloatSize(floatValueForLength(lengthSize.width(), boxSize.width()), f
loatValueForLength(lengthSize.height(), boxSize.height())); | 129 return FloatSize(floatValueForLength(lengthSize.width(), boxSize.width()), f
loatValueForLength(lengthSize.height(), boxSize.height())); |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace blink | 132 } // namespace blink |
| OLD | NEW |