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 (style.hasClipper()) { | 217 if (ClipPathOperation* clipPathOperation = style.clipPath()) { |
218 AtomicString id = style.clipperResource(); | 218 if (clipPathOperation->type() == ClipPathOperation::REFERENCE) { |
219 if (!ensureResources(resources).setClipper(getLayoutSVGResourceById<
LayoutSVGResourceClipper>(treeScope, id))) | 219 const ReferenceClipPathOperation& clipPathReference = toReferenc
eClipPathOperation(*clipPathOperation); |
220 registerPendingResource(extensions, id, element); | 220 AtomicString id = SVGURIReference::fragmentIdentifierFromIRIStri
ng(clipPathReference.url(), treeScope); |
| 221 if (!ensureResources(resources).setClipper(getLayoutSVGResourceB
yId<LayoutSVGResourceClipper>(treeScope, id))) |
| 222 registerPendingResource(extensions, id, element); |
| 223 } |
221 } | 224 } |
222 | 225 |
223 if (computedStyle.hasFilter() && !object->isSVGRoot()) { | 226 if (computedStyle.hasFilter() && !object->isSVGRoot()) { |
224 const FilterOperations& filterOperations = computedStyle.filter(); | 227 const FilterOperations& filterOperations = computedStyle.filter(); |
225 if (filterOperations.size() == 1) { | 228 if (filterOperations.size() == 1) { |
226 const FilterOperation& filterOperation = *filterOperations.at(0)
; | 229 const FilterOperation& filterOperation = *filterOperations.at(0)
; |
227 if (filterOperation.type() == FilterOperation::REFERENCE) { | 230 if (filterOperation.type() == FilterOperation::REFERENCE) { |
228 const auto& referenceFilterOperation = toReferenceFilterOper
ation(filterOperation); | 231 const auto& referenceFilterOperation = toReferenceFilterOper
ation(filterOperation); |
229 AtomicString id = SVGURIReference::fragmentIdentifierFromIRI
String(referenceFilterOperation.url(), treeScope); | 232 AtomicString id = SVGURIReference::fragmentIdentifierFromIRI
String(referenceFilterOperation.url(), treeScope); |
230 if (!ensureResources(resources).setFilter(getLayoutSVGResour
ceById<LayoutSVGResourceFilter>(treeScope, id))) | 233 if (!ensureResources(resources).setFilter(getLayoutSVGResour
ceById<LayoutSVGResourceFilter>(treeScope, id))) |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) | 666 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) |
664 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); | 667 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); |
665 } | 668 } |
666 | 669 |
667 if (m_linkedResource) | 670 if (m_linkedResource) |
668 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); | 671 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); |
669 } | 672 } |
670 #endif | 673 #endif |
671 | 674 |
672 } // namespace blink | 675 } // namespace blink |
OLD | NEW |