| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 SVGURLReferenceResolver resolver(toCSSURIValue(value).value(), state.doc
ument()); | 126 SVGURLReferenceResolver resolver(toCSSURIValue(value).value(), state.doc
ument()); |
| 127 // If the reference is non-local, then the fragment will remain as a |
| 128 // null string, which makes the element lookup fail. |
| 129 AtomicString fragmentIdentifier; |
| 130 if (resolver.isLocal()) |
| 131 fragmentIdentifier = resolver.fragmentIdentifier(); |
| 127 // TODO(fs): Doesn't work with forward or external SVG references (crbug
.com/391604, crbug.com/109212, ...) | 132 // TODO(fs): Doesn't work with forward or external SVG references (crbug
.com/391604, crbug.com/109212, ...) |
| 128 return ReferenceClipPathOperation::create(toCSSURIValue(value).value(),
resolver.fragmentIdentifier()); | 133 return ReferenceClipPathOperation::create(toCSSURIValue(value).value(),
fragmentIdentifier); |
| 129 } | 134 } |
| 130 DCHECK(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 135 DCHECK(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
| 131 return nullptr; | 136 return nullptr; |
| 132 } | 137 } |
| 133 | 138 |
| 134 FilterOperations StyleBuilderConverter::convertFilterOperations(StyleResolverSta
te& state, const CSSValue& value) | 139 FilterOperations StyleBuilderConverter::convertFilterOperations(StyleResolverSta
te& state, const CSSValue& value) |
| 135 { | 140 { |
| 136 return FilterOperationResolver::createFilterOperations(state, value); | 141 return FilterOperationResolver::createFilterOperations(state, value); |
| 137 } | 142 } |
| 138 | 143 |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1078 |
| 1074 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 1079 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
| 1075 { | 1080 { |
| 1076 if (value.isPathValue()) | 1081 if (value.isPathValue()) |
| 1077 return toCSSPathValue(value).stylePath(); | 1082 return toCSSPathValue(value).stylePath(); |
| 1078 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 1083 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
| 1079 return nullptr; | 1084 return nullptr; |
| 1080 } | 1085 } |
| 1081 | 1086 |
| 1082 } // namespace blink | 1087 } // namespace blink |
| OLD | NEW |