| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 return true; | 84 return true; |
| 85 } | 85 } |
| 86 | 86 |
| 87 PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren
derObject* renderer, FilterEffect* previousEffect, const ReferenceFilterOperatio
n* filterOperation) | 87 PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren
derObject* renderer, FilterEffect* previousEffect, const ReferenceFilterOperatio
n* filterOperation) |
| 88 { | 88 { |
| 89 if (!renderer) | 89 if (!renderer) |
| 90 return 0; | 90 return 0; |
| 91 | 91 |
| 92 Document* document = renderer->document(); | 92 Document* document = &renderer->document(); |
| 93 ASSERT(document); | |
| 94 | 93 |
| 95 DocumentResourceReference* documentResourceReference = filterOperation->docu
mentResourceReference(); | 94 DocumentResourceReference* documentResourceReference = filterOperation->docu
mentResourceReference(); |
| 96 DocumentResource* cachedSVGDocument = documentResourceReference ? documentRe
sourceReference->document() : 0; | 95 DocumentResource* cachedSVGDocument = documentResourceReference ? documentRe
sourceReference->document() : 0; |
| 97 | 96 |
| 98 // If we have an SVG document, this is an external reference. Otherwise | 97 // If we have an SVG document, this is an external reference. Otherwise |
| 99 // we look up the referenced node in the current document. | 98 // we look up the referenced node in the current document. |
| 100 if (cachedSVGDocument) | 99 if (cachedSVGDocument) |
| 101 document = cachedSVGDocument->document(); | 100 document = cachedSVGDocument->document(); |
| 102 | 101 |
| 103 if (!document) | 102 if (!document) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter
PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnitsCurrent
Value(), parentFilter->sourceImageRect())); | 144 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter
PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnitsCurrent
Value(), parentFilter->sourceImageRect())); |
| 146 ColorSpace colorSpace = filterColorSpace; | 145 ColorSpace colorSpace = filterColorSpace; |
| 147 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS
pace)) | 146 if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorS
pace)) |
| 148 effect->setOperatingColorSpace(colorSpace); | 147 effect->setOperatingColorSpace(colorSpace); |
| 149 builder->add(effectElement->resultCurrentValue(), effect); | 148 builder->add(effectElement->resultCurrentValue(), effect); |
| 150 } | 149 } |
| 151 return builder->lastEffect(); | 150 return builder->lastEffect(); |
| 152 } | 151 } |
| 153 | 152 |
| 154 } // namespace WebCore | 153 } // namespace WebCore |
| OLD | NEW |