| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 markClientForInvalidation(client, markForInvalidation ? BoundariesInvalidati
on : ParentOnlyInvalidation); | 76 markClientForInvalidation(client, markForInvalidation ? BoundariesInvalidati
on : ParentOnlyInvalidation); |
| 77 } | 77 } |
| 78 | 78 |
| 79 PassRefPtr<SVGFilterBuilder> RenderSVGResourceFilter::buildPrimitives(SVGFilter*
filter) | 79 PassRefPtr<SVGFilterBuilder> RenderSVGResourceFilter::buildPrimitives(SVGFilter*
filter) |
| 80 { | 80 { |
| 81 SVGFilterElement* filterElement = toSVGFilterElement(element()); | 81 SVGFilterElement* filterElement = toSVGFilterElement(element()); |
| 82 FloatRect targetBoundingBox = filter->targetBoundingBox(); | 82 FloatRect targetBoundingBox = filter->targetBoundingBox(); |
| 83 | 83 |
| 84 // Add effects to the builder | 84 // Add effects to the builder |
| 85 RefPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(SourceGraphic::c
reate(filter), SourceAlpha::create(filter)); | 85 RefPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(SourceGraphic::c
reate(filter), SourceAlpha::create(filter)); |
| 86 for (Element* child = ElementTraversal::firstWithin(*filterElement); child;
child = ElementTraversal::nextSibling(*child)) { | 86 for (SVGElement* element = Traversal<SVGElement>::firstChild(*filterElement)
; element; element = Traversal<SVGElement>::nextSibling(*element)) { |
| 87 if (!child->isSVGElement()) | |
| 88 continue; | |
| 89 | |
| 90 SVGElement* element = toSVGElement(child); | |
| 91 if (!element->isFilterEffect() || !element->renderer()) | 87 if (!element->isFilterEffect() || !element->renderer()) |
| 92 continue; | 88 continue; |
| 93 | 89 |
| 94 SVGFilterPrimitiveStandardAttributes* effectElement = static_cast<SVGFil
terPrimitiveStandardAttributes*>(element); | 90 SVGFilterPrimitiveStandardAttributes* effectElement = static_cast<SVGFil
terPrimitiveStandardAttributes*>(element); |
| 95 RefPtr<FilterEffect> effect = effectElement->build(builder.get(), filter
); | 91 RefPtr<FilterEffect> effect = effectElement->build(builder.get(), filter
); |
| 96 if (!effect) { | 92 if (!effect) { |
| 97 builder->clearEffects(); | 93 builder->clearEffects(); |
| 98 return nullptr; | 94 return nullptr; |
| 99 } | 95 } |
| 100 builder->appendEffectToEffectReferences(effect, effectElement->renderer(
)); | 96 builder->appendEffectToEffectReferences(effect, effectElement->renderer(
)); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 markAllClientLayersForInvalidation(); | 389 markAllClientLayersForInvalidation(); |
| 394 } | 390 } |
| 395 | 391 |
| 396 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const | 392 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const |
| 397 { | 393 { |
| 398 FilterData* filterData = m_filter.get(object); | 394 FilterData* filterData = m_filter.get(object); |
| 399 return filterData ? filterData->drawingRegion : FloatRect(); | 395 return filterData ? filterData->drawingRegion : FloatRect(); |
| 400 } | 396 } |
| 401 | 397 |
| 402 } | 398 } |
| OLD | NEW |