Chromium Code Reviews| 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()); | |
|
Timothy Loh
2015/02/05 03:26:30
No need for quirk values
Erik Dahlström (inactive)
2015/02/05 16:09:02
Acknowledged.
| |
| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 840 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); | 849 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); |
| 841 | 850 |
| 842 return TransformOrigin( | 851 return TransformOrigin( |
| 843 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX) , | 852 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX) , |
| 844 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY) , | 853 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY) , |
| 845 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu eZ) | 854 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu eZ) |
| 846 ); | 855 ); |
| 847 } | 856 } |
| 848 | 857 |
| 849 } // namespace blink | 858 } // namespace blink |
| OLD | NEW |