OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 const AtomicString& tagName = element->localName(); | 207 const AtomicString& tagName = element->localName(); |
208 ASSERT(!tagName.isNull()); | 208 ASSERT(!tagName.isNull()); |
209 | 209 |
210 TreeScope& treeScope = element->treeScope(); | 210 TreeScope& treeScope = element->treeScope(); |
211 SVGDocumentExtensions& extensions = element->document().accessSVGExtensions(
); | 211 SVGDocumentExtensions& extensions = element->document().accessSVGExtensions(
); |
212 | 212 |
213 const SVGComputedStyle& style = computedStyle.svgStyle(); | 213 const SVGComputedStyle& style = computedStyle.svgStyle(); |
214 | 214 |
215 std::unique_ptr<SVGResources> resources; | 215 std::unique_ptr<SVGResources> resources; |
216 if (clipperFilterMaskerTags().contains(tagName)) { | 216 if (clipperFilterMaskerTags().contains(tagName)) { |
217 if (ClipPathOperation* clipPathOperation = style.clipPath()) { | 217 if (computedStyle.clipPath() && !object->isSVGRoot()) { |
| 218 ClipPathOperation* clipPathOperation = computedStyle.clipPath(); |
218 if (clipPathOperation->type() == ClipPathOperation::REFERENCE) { | 219 if (clipPathOperation->type() == ClipPathOperation::REFERENCE) { |
219 const ReferenceClipPathOperation& clipPathReference = toReferenc
eClipPathOperation(*clipPathOperation); | 220 const ReferenceClipPathOperation& clipPathReference = toReferenc
eClipPathOperation(*clipPathOperation); |
220 AtomicString id = SVGURIReference::fragmentIdentifierFromIRIStri
ng(clipPathReference.url(), treeScope); | 221 AtomicString id = SVGURIReference::fragmentIdentifierFromIRIStri
ng(clipPathReference.url(), treeScope); |
221 if (!ensureResources(resources).setClipper(getLayoutSVGResourceB
yId<LayoutSVGResourceClipper>(treeScope, id))) | 222 if (!ensureResources(resources).setClipper(getLayoutSVGResourceB
yId<LayoutSVGResourceClipper>(treeScope, id))) |
222 registerPendingResource(extensions, id, element); | 223 registerPendingResource(extensions, id, element); |
223 } | 224 } |
224 } | 225 } |
225 | 226 |
226 if (computedStyle.hasFilter() && !object->isSVGRoot()) { | 227 if (computedStyle.hasFilter() && !object->isSVGRoot()) { |
227 const FilterOperations& filterOperations = computedStyle.filter(); | 228 const FilterOperations& filterOperations = computedStyle.filter(); |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) | 667 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) |
667 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); | 668 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); |
668 } | 669 } |
669 | 670 |
670 if (m_linkedResource) | 671 if (m_linkedResource) |
671 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); | 672 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); |
672 } | 673 } |
673 #endif | 674 #endif |
674 | 675 |
675 } // namespace blink | 676 } // namespace blink |
OLD | NEW |