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 4429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4440 { | 4440 { |
4441 ASSERT(!hasVariableReference()); | 4441 ASSERT(!hasVariableReference()); |
4442 if ((supported & FixedConversion) && isLength()) | 4442 if ((supported & FixedConversion) && isLength()) |
4443 return computeLength<Length>(conversionData); | 4443 return computeLength<Length>(conversionData); |
4444 if ((supported & PercentConversion) && isPercentage()) | 4444 if ((supported & PercentConversion) && isPercentage()) |
4445 return Length(getDoubleValue(), Percent); | 4445 return Length(getDoubleValue(), Percent); |
4446 if ((supported & AutoConversion) && getValueID() == CSSValueAuto) | 4446 if ((supported & AutoConversion) && getValueID() == CSSValueAuto) |
4447 return Length(Auto); | 4447 return Length(Auto); |
4448 if ((supported & FixedConversion) && (supported & PercentConversion) && isCa
lculated()) | 4448 if ((supported & FixedConversion) && (supported & PercentConversion) && isCa
lculated()) |
4449 return Length(cssCalcValue()->toCalcValue(conversionData)); | 4449 return Length(cssCalcValue()->toCalcValue(conversionData)); |
4450 if ((supported & FixedConversion) && isViewportPercentageLength()) | |
4451 return viewportPercentageLength(); | |
4452 return Length(Undefined); | 4450 return Length(Undefined); |
4453 } | 4451 } |
4454 | 4452 |
4455 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBufferedRendering e) | 4453 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBufferedRendering e) |
4456 : CSSValue(PrimitiveClass) | 4454 : CSSValue(PrimitiveClass) |
4457 { | 4455 { |
4458 m_primitiveUnitType = CSS_VALUE_ID; | 4456 m_primitiveUnitType = CSS_VALUE_ID; |
4459 switch (e) { | 4457 switch (e) { |
4460 case BR_AUTO: | 4458 case BR_AUTO: |
4461 m_value.valueID = CSSValueAuto; | 4459 m_value.valueID = CSSValueAuto; |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4946 break; | 4944 break; |
4947 } | 4945 } |
4948 | 4946 |
4949 ASSERT_NOT_REACHED(); | 4947 ASSERT_NOT_REACHED(); |
4950 return TouchActionDelayNone; | 4948 return TouchActionDelayNone; |
4951 } | 4949 } |
4952 | 4950 |
4953 } | 4951 } |
4954 | 4952 |
4955 #endif | 4953 #endif |
OLD | NEW |