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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 convertLengthOrAuto(state, *rect.right()), | 116 convertLengthOrAuto(state, *rect.right()), |
117 convertLengthOrAuto(state, *rect.bottom()), | 117 convertLengthOrAuto(state, *rect.bottom()), |
118 convertLengthOrAuto(state, *rect.left())); | 118 convertLengthOrAuto(state, *rect.left())); |
119 } | 119 } |
120 | 120 |
121 PassRefPtr<ClipPathOperation> StyleBuilderConverter::convertClipPath(StyleResolv
erState& state, const CSSValue& value) | 121 PassRefPtr<ClipPathOperation> StyleBuilderConverter::convertClipPath(StyleResolv
erState& state, const CSSValue& value) |
122 { | 122 { |
123 if (value.isBasicShapeValue()) | 123 if (value.isBasicShapeValue()) |
124 return ShapeClipPathOperation::create(basicShapeForValue(state, value)); | 124 return ShapeClipPathOperation::create(basicShapeForValue(state, value)); |
125 if (value.isURIValue()) { | 125 if (value.isURIValue()) { |
126 String cssURLValue = toCSSURIValue(value).value(); | 126 SVGURLReferenceResolver resolver(toCSSURIValue(value).value(), state.doc
ument()); |
127 KURL url = state.document().completeURL(cssURLValue); | |
128 // TODO(fs): Doesn't work with forward or external SVG references (crbug
.com/391604, crbug.com/109212, ...) | 127 // TODO(fs): Doesn't work with forward or external SVG references (crbug
.com/391604, crbug.com/109212, ...) |
129 return ReferenceClipPathOperation::create(cssURLValue, AtomicString(url.
fragmentIdentifier())); | 128 return ReferenceClipPathOperation::create(toCSSURIValue(value).value(),
resolver.fragmentIdentifier()); |
130 } | 129 } |
131 DCHECK(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 130 DCHECK(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
132 return nullptr; | 131 return nullptr; |
133 } | 132 } |
134 | 133 |
135 FilterOperations StyleBuilderConverter::convertFilterOperations(StyleResolverSta
te& state, const CSSValue& value) | 134 FilterOperations StyleBuilderConverter::convertFilterOperations(StyleResolverSta
te& state, const CSSValue& value) |
136 { | 135 { |
137 return FilterOperationResolver::createFilterOperations(state, value); | 136 return FilterOperationResolver::createFilterOperations(state, value); |
138 } | 137 } |
139 | 138 |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 | 1073 |
1075 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 1074 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
1076 { | 1075 { |
1077 if (value.isPathValue()) | 1076 if (value.isPathValue()) |
1078 return toCSSPathValue(value).stylePath(); | 1077 return toCSSPathValue(value).stylePath(); |
1079 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 1078 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
1080 return nullptr; | 1079 return nullptr; |
1081 } | 1080 } |
1082 | 1081 |
1083 } // namespace blink | 1082 } // namespace blink |
OLD | NEW |