OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. |
3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 4434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4445 { | 4445 { |
4446 ASSERT(!hasVariableReference()); | 4446 ASSERT(!hasVariableReference()); |
4447 if ((supported & FixedConversion) && isLength()) | 4447 if ((supported & FixedConversion) && isLength()) |
4448 return computeLength<Length>(conversionData); | 4448 return computeLength<Length>(conversionData); |
4449 if ((supported & PercentConversion) && isPercentage()) | 4449 if ((supported & PercentConversion) && isPercentage()) |
4450 return Length(getDoubleValue(), Percent); | 4450 return Length(getDoubleValue(), Percent); |
4451 if ((supported & AutoConversion) && getValueID() == CSSValueAuto) | 4451 if ((supported & AutoConversion) && getValueID() == CSSValueAuto) |
4452 return Length(Auto); | 4452 return Length(Auto); |
4453 if ((supported & FixedConversion) && (supported & PercentConversion) && isCa
lculated()) | 4453 if ((supported & FixedConversion) && (supported & PercentConversion) && isCa
lculated()) |
4454 return Length(cssCalcValue()->toCalcValue(conversionData)); | 4454 return Length(cssCalcValue()->toCalcValue(conversionData)); |
4455 if ((supported & FixedConversion) && isViewportPercentageLength()) | |
4456 return viewportPercentageLength(); | |
4457 ASSERT_NOT_REACHED(); | 4455 ASSERT_NOT_REACHED(); |
4458 return Length(0, Fixed); | 4456 return Length(0, Fixed); |
4459 } | 4457 } |
4460 | 4458 |
4461 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBufferedRendering e) | 4459 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBufferedRendering e) |
4462 : CSSValue(PrimitiveClass) | 4460 : CSSValue(PrimitiveClass) |
4463 { | 4461 { |
4464 m_primitiveUnitType = CSS_VALUE_ID; | 4462 m_primitiveUnitType = CSS_VALUE_ID; |
4465 switch (e) { | 4463 switch (e) { |
4466 case BR_AUTO: | 4464 case BR_AUTO: |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4983 default: | 4981 default: |
4984 break; | 4982 break; |
4985 } | 4983 } |
4986 ASSERT_NOT_REACHED(); | 4984 ASSERT_NOT_REACHED(); |
4987 return ContentBox; | 4985 return ContentBox; |
4988 } | 4986 } |
4989 | 4987 |
4990 } | 4988 } |
4991 | 4989 |
4992 #endif | 4990 #endif |
OLD | NEW |