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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/css/resolver/StyleBuilderConverter.h" | 28 #include "core/css/resolver/StyleBuilderConverter.h" |
29 | 29 |
30 #include "core/css/BasicShapeFunctions.h" | 30 #include "core/css/BasicShapeFunctions.h" |
31 #include "core/css/CSSContentDistributionValue.h" | 31 #include "core/css/CSSContentDistributionValue.h" |
32 #include "core/css/CSSFontFeatureValue.h" | 32 #include "core/css/CSSFontFeatureValue.h" |
33 #include "core/css/CSSFunctionValue.h" | 33 #include "core/css/CSSFunctionValue.h" |
34 #include "core/css/CSSGridLineNamesValue.h" | 34 #include "core/css/CSSGridLineNamesValue.h" |
35 #include "core/css/CSSPrimitiveValueMappings.h" | 35 #include "core/css/CSSPrimitiveValueMappings.h" |
| 36 #include "core/css/CSSQuadValue.h" |
36 #include "core/css/CSSReflectValue.h" | 37 #include "core/css/CSSReflectValue.h" |
37 #include "core/css/CSSShadowValue.h" | 38 #include "core/css/CSSShadowValue.h" |
38 #include "core/css/Pair.h" | 39 #include "core/css/Pair.h" |
39 #include "core/css/Rect.h" | |
40 #include "core/svg/SVGElement.h" | 40 #include "core/svg/SVGElement.h" |
41 #include "core/svg/SVGURIReference.h" | 41 #include "core/svg/SVGURIReference.h" |
42 #include "platform/transforms/RotateTransformOperation.h" | 42 #include "platform/transforms/RotateTransformOperation.h" |
43 #include "platform/transforms/ScaleTransformOperation.h" | 43 #include "platform/transforms/ScaleTransformOperation.h" |
44 #include "platform/transforms/TranslateTransformOperation.h" | 44 #include "platform/transforms/TranslateTransformOperation.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 AtomicString StyleBuilderConverter::convertFragmentIdentifier(StyleResolverState
& state, CSSValue* value) | 93 AtomicString StyleBuilderConverter::convertFragmentIdentifier(StyleResolverState
& state, CSSValue* value) |
94 { | 94 { |
95 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 95 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
96 if (primitiveValue->isURI()) | 96 if (primitiveValue->isURI()) |
97 return SVGURIReference::fragmentIdentifierFromIRIString(primitiveValue->
getStringValue(), state.element()->treeScope()); | 97 return SVGURIReference::fragmentIdentifierFromIRIString(primitiveValue->
getStringValue(), state.element()->treeScope()); |
98 return nullAtom; | 98 return nullAtom; |
99 } | 99 } |
100 | 100 |
101 LengthBox StyleBuilderConverter::convertClip(StyleResolverState& state, CSSValue
* value) | 101 LengthBox StyleBuilderConverter::convertClip(StyleResolverState& state, CSSValue
* value) |
102 { | 102 { |
103 Rect* rect = toCSSPrimitiveValue(value)->getRectValue(); | 103 RefPtrWillBeRawPtr<CSSQuadValue> rect = toCSSQuadValue(value); |
104 | 104 |
105 return LengthBox(convertLengthOrAuto(state, rect->top()), | 105 return LengthBox(convertLengthOrAuto(state, rect->top()), |
106 convertLengthOrAuto(state, rect->right()), | 106 convertLengthOrAuto(state, rect->right()), |
107 convertLengthOrAuto(state, rect->bottom()), | 107 convertLengthOrAuto(state, rect->bottom()), |
108 convertLengthOrAuto(state, rect->left())); | 108 convertLengthOrAuto(state, rect->left())); |
109 } | 109 } |
110 | 110 |
111 static FontDescription::GenericFamilyType convertGenericFamily(CSSValueID valueI
D) | 111 static FontDescription::GenericFamilyType convertGenericFamily(CSSValueID valueI
D) |
112 { | 112 { |
113 switch (valueID) { | 113 switch (valueID) { |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale
3D); | 957 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale
3D); |
958 } | 958 } |
959 | 959 |
960 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style
ResolverState& state, CSSValue* value) | 960 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style
ResolverState& state, CSSValue* value) |
961 { | 961 { |
962 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 962 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
963 return primitiveValue->getValueID() == CSSValueFromImage ? RespectImageOrien
tation : DoNotRespectImageOrientation; | 963 return primitiveValue->getValueID() == CSSValueFromImage ? RespectImageOrien
tation : DoNotRespectImageOrientation; |
964 } | 964 } |
965 | 965 |
966 } // namespace blink | 966 } // namespace blink |
OLD | NEW |