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 return primitiveValue->convertToLength<FixedConversion | PercentConversion>(
conversionData); |
| 509 } |
| 510 |
504 Length StyleBuilderConverter::convertLengthOrAuto(StyleResolverState& state, CSS
Value* value) | 511 Length StyleBuilderConverter::convertLengthOrAuto(StyleResolverState& state, CSS
Value* value) |
505 { | 512 { |
506 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 513 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
507 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version | AutoConversion>(state.cssToLengthConversionData()); | 514 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version | AutoConversion>(state.cssToLengthConversionData()); |
508 result.setQuirk(primitiveValue->isQuirkValue()); | 515 result.setQuirk(primitiveValue->isQuirkValue()); |
509 return result; | 516 return result; |
510 } | 517 } |
511 | 518 |
512 Length StyleBuilderConverter::convertLengthSizing(StyleResolverState& state, CSS
Value* value) | 519 Length StyleBuilderConverter::convertLengthSizing(StyleResolverState& state, CSS
Value* value) |
513 { | 520 { |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); | 855 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); |
849 | 856 |
850 return TransformOrigin( | 857 return TransformOrigin( |
851 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, | 858 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, |
852 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, | 859 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, |
853 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) | 860 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) |
854 ); | 861 ); |
855 } | 862 } |
856 | 863 |
857 } // namespace blink | 864 } // namespace blink |
OLD | NEW |