OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Adobe Systems Inc. All rights reserved. | 2 * Copyright (C) 2013 Adobe Systems Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * Copyright (C) 2011 Apple Inc. All rights reserved. | 4 * Copyright (C) 2011 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 123 } |
124 | 124 |
125 if (!document) | 125 if (!document) |
126 return nullptr; | 126 return nullptr; |
127 | 127 |
128 Element* filter = document->getElementById(filterOperation->fragment()); | 128 Element* filter = document->getElementById(filterOperation->fragment()); |
129 | 129 |
130 if (!filter) { | 130 if (!filter) { |
131 // Although we did not find the referenced filter, it might exist later | 131 // Although we did not find the referenced filter, it might exist later |
132 // in the document | 132 // in the document |
133 document->accessSVGExtensions()->addPendingResource(filterOperation->fra
gment(), toElement(renderer->node())); | 133 document->accessSVGExtensions().addPendingResource(filterOperation->frag
ment(), toElement(renderer->node())); |
134 return nullptr; | 134 return nullptr; |
135 } | 135 } |
136 | 136 |
137 if (!filter->isSVGElement() || !filter->hasTagName(SVGNames::filterTag)) | 137 if (!filter->isSVGElement() || !filter->hasTagName(SVGNames::filterTag)) |
138 return nullptr; | 138 return nullptr; |
139 | 139 |
140 SVGFilterElement* filterElement = toSVGFilterElement(toSVGElement(filter)); | 140 SVGFilterElement* filterElement = toSVGFilterElement(toSVGElement(filter)); |
141 | 141 |
142 // FIXME: Figure out what to do with SourceAlpha. Right now, we're | 142 // FIXME: Figure out what to do with SourceAlpha. Right now, we're |
143 // using the alpha of the original input layer, which is obviously | 143 // using the alpha of the original input layer, which is obviously |
(...skipping 23 matching lines...) Expand all Loading... |
167 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter
PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->cur
rentValue()->enumValue(), parentFilter->sourceImageRect())); | 167 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter
PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits()->cur
rentValue()->enumValue(), parentFilter->sourceImageRect())); |
168 ColorSpace colorSpace = filterColorSpace; | 168 ColorSpace colorSpace = filterColorSpace; |
169 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS
pace)) | 169 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS
pace)) |
170 effect->setOperatingColorSpace(colorSpace); | 170 effect->setOperatingColorSpace(colorSpace); |
171 builder->add(AtomicString(effectElement->result()->currentValue()->value
()), effect); | 171 builder->add(AtomicString(effectElement->result()->currentValue()->value
()), effect); |
172 } | 172 } |
173 return builder->lastEffect(); | 173 return builder->lastEffect(); |
174 } | 174 } |
175 | 175 |
176 } // namespace WebCore | 176 } // namespace WebCore |
OLD | NEW |