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 11 matching lines...) Expand all Loading... |
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 | 29 |
30 #include "core/rendering/svg/ReferenceFilterBuilder.h" | 30 #include "core/rendering/svg/ReferenceFilterBuilder.h" |
31 | 31 |
| 32 #include "SVGNames.h" |
32 #include "core/css/CSSPrimitiveValue.h" | 33 #include "core/css/CSSPrimitiveValue.h" |
33 #include "core/css/CSSPrimitiveValueMappings.h" | 34 #include "core/css/CSSPrimitiveValueMappings.h" |
34 #include "core/dom/Element.h" | 35 #include "core/dom/Element.h" |
35 #include "core/loader/cache/CachedDocument.h" | 36 #include "core/loader/cache/CachedDocument.h" |
36 #include "core/loader/cache/CachedSVGDocumentReference.h" | 37 #include "core/loader/cache/CachedSVGDocumentReference.h" |
37 #include "core/platform/graphics/filters/FilterEffect.h" | 38 #include "core/platform/graphics/filters/FilterEffect.h" |
38 #include "core/platform/graphics/filters/SourceAlpha.h" | 39 #include "core/platform/graphics/filters/SourceAlpha.h" |
| 40 #include "core/rendering/svg/RenderSVGResourceFilter.h" |
39 #include "core/svg/SVGDocumentExtensions.h" | 41 #include "core/svg/SVGDocumentExtensions.h" |
40 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" | 42 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" |
41 #include "core/svg/graphics/filters/SVGFilterBuilder.h" | 43 #include "core/svg/graphics/filters/SVGFilterBuilder.h" |
42 | 44 |
43 namespace WebCore { | 45 namespace WebCore { |
44 | 46 |
45 // Returns whether or not the SVGStyledElement object contains a valid color-int
erpolation-filters attribute | 47 // Returns whether or not the SVGStyledElement object contains a valid color-int
erpolation-filters attribute |
46 static bool getSVGStyledElementColorSpace(SVGStyledElement* svgStyledElement, Co
lorSpace& cs) | 48 static bool getSVGStyledElementColorSpace(SVGStyledElement* svgStyledElement, Co
lorSpace& cs) |
47 { | 49 { |
48 if (!svgStyledElement) | 50 if (!svgStyledElement) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter
PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits(), par
entFilter->sourceImageRect())); | 145 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter
PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnits(), par
entFilter->sourceImageRect())); |
144 ColorSpace colorSpace = filterColorSpace; | 146 ColorSpace colorSpace = filterColorSpace; |
145 if (useFilterColorSpace || getSVGStyledElementColorSpace(effectElement,
colorSpace)) | 147 if (useFilterColorSpace || getSVGStyledElementColorSpace(effectElement,
colorSpace)) |
146 effect->setOperatingColorSpace(colorSpace); | 148 effect->setOperatingColorSpace(colorSpace); |
147 builder->add(effectElement->result(), effect); | 149 builder->add(effectElement->result(), effect); |
148 } | 150 } |
149 return builder->lastEffect(); | 151 return builder->lastEffect(); |
150 } | 152 } |
151 | 153 |
152 } // namespace WebCore | 154 } // namespace WebCore |
OLD | NEW |