| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 } | 494 } |
| 495 | 495 |
| 496 Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue*
value) | 496 Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue*
value) |
| 497 { | 497 { |
| 498 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 498 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 499 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version>(state.cssToLengthConversionData()); | 499 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version>(state.cssToLengthConversionData()); |
| 500 result.setQuirk(primitiveValue->isQuirkValue()); | 500 result.setQuirk(primitiveValue->isQuirkValue()); |
| 501 return result; | 501 return result; |
| 502 } | 502 } |
| 503 | 503 |
| 504 Length StyleBuilderConverter::convertLengthUnzoomed(StyleResolverState& state, C
SSValue* value) |
| 505 { |
| 506 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 507 CSSToLengthConversionData conversionData = state.cssToLengthConversionData()
.copyWithAdjustedZoom(1.0f); |
| 508 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version>(conversionData); |
| 509 result.setQuirk(primitiveValue->isQuirkValue()); |
| 510 return result; |
| 511 } |
| 512 |
| 504 Length StyleBuilderConverter::convertLengthOrAuto(StyleResolverState& state, CSS
Value* value) | 513 Length StyleBuilderConverter::convertLengthOrAuto(StyleResolverState& state, CSS
Value* value) |
| 505 { | 514 { |
| 506 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 515 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 507 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version | AutoConversion>(state.cssToLengthConversionData()); | 516 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version | AutoConversion>(state.cssToLengthConversionData()); |
| 508 result.setQuirk(primitiveValue->isQuirkValue()); | 517 result.setQuirk(primitiveValue->isQuirkValue()); |
| 509 return result; | 518 return result; |
| 510 } | 519 } |
| 511 | 520 |
| 512 Length StyleBuilderConverter::convertLengthSizing(StyleResolverState& state, CSS
Value* value) | 521 Length StyleBuilderConverter::convertLengthSizing(StyleResolverState& state, CSS
Value* value) |
| 513 { | 522 { |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); | 857 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); |
| 849 | 858 |
| 850 return TransformOrigin( | 859 return TransformOrigin( |
| 851 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, | 860 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, |
| 852 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, | 861 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, |
| 853 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) | 862 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) |
| 854 ); | 863 ); |
| 855 } | 864 } |
| 856 | 865 |
| 857 } // namespace blink | 866 } // namespace blink |
| OLD | NEW |