| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 const AtomicString& markerEndId = style.markerEndResource(); | 253 const AtomicString& markerEndId = style.markerEndResource(); |
| 254 if (!ensureResources(resources).setMarkerEnd(getLayoutSVGResourceById<La
youtSVGResourceMarker>(treeScope, style.markerEndResource()))) | 254 if (!ensureResources(resources).setMarkerEnd(getLayoutSVGResourceById<La
youtSVGResourceMarker>(treeScope, style.markerEndResource()))) |
| 255 registerPendingResource(extensions, markerEndId, element); | 255 registerPendingResource(extensions, markerEndId, element); |
| 256 } | 256 } |
| 257 | 257 |
| 258 if (fillAndStrokeTags().contains(tagName)) { | 258 if (fillAndStrokeTags().contains(tagName)) { |
| 259 if (style.hasFill()) { | 259 if (style.hasFill()) { |
| 260 bool hasPendingResource = false; | 260 bool hasPendingResource = false; |
| 261 AtomicString id; | 261 AtomicString id; |
| 262 LayoutSVGResourcePaintServer* resource = paintingResourceFromSVGPain
t(treeScope, style.fillPaintType(), style.fillPaintUri(), id, hasPendingResource
); | 262 LayoutSVGResourcePaintServer* resource = paintingResourceFromSVGPain
t(treeScope, style.fillPaintType(), style.fillPaintUri(), id, hasPendingResource
); |
| 263 if (!ensureResources(resources).setFill(resource) && hasPendingResou
rce) { | 263 if (!ensureResources(resources).setFill(resource) && hasPendingResou
rce) |
| 264 registerPendingResource(extensions, id, element); | 264 registerPendingResource(extensions, id, element); |
| 265 } | |
| 266 } | 265 } |
| 267 | 266 |
| 268 if (style.hasStroke()) { | 267 if (style.hasStroke()) { |
| 269 bool hasPendingResource = false; | 268 bool hasPendingResource = false; |
| 270 AtomicString id; | 269 AtomicString id; |
| 271 LayoutSVGResourcePaintServer* resource = paintingResourceFromSVGPain
t(treeScope, style.strokePaintType(), style.strokePaintUri(), id, hasPendingReso
urce); | 270 LayoutSVGResourcePaintServer* resource = paintingResourceFromSVGPain
t(treeScope, style.strokePaintType(), style.strokePaintUri(), id, hasPendingReso
urce); |
| 272 if (!ensureResources(resources).setStroke(resource) && hasPendingRes
ource) { | 271 if (!ensureResources(resources).setStroke(resource) && hasPendingRes
ource) |
| 273 registerPendingResource(extensions, id, element); | 272 registerPendingResource(extensions, id, element); |
| 274 } | |
| 275 } | 273 } |
| 276 } | 274 } |
| 277 | 275 |
| 278 if (chainableResourceTags().contains(tagName)) { | 276 if (chainableResourceTags().contains(tagName)) { |
| 279 AtomicString id = targetReferenceFromResource(*element); | 277 AtomicString id = targetReferenceFromResource(*element); |
| 280 if (!ensureResources(resources).setLinkedResource(getLayoutSVGResourceCo
ntainerById(treeScope, id))) | 278 if (!ensureResources(resources).setLinkedResource(getLayoutSVGResourceCo
ntainerById(treeScope, id))) |
| 281 registerPendingResource(extensions, id, element); | 279 registerPendingResource(extensions, id, element); |
| 282 } | 280 } |
| 283 | 281 |
| 284 return (!resources || !resources->hasResourceData()) ? nullptr : resources.r
elease(); | 282 return (!resources || !resources->hasResourceData()) ? nullptr : resources.r
elease(); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) | 664 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) |
| 667 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); | 665 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); |
| 668 } | 666 } |
| 669 | 667 |
| 670 if (m_linkedResource) | 668 if (m_linkedResource) |
| 671 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); | 669 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); |
| 672 } | 670 } |
| 673 #endif | 671 #endif |
| 674 | 672 |
| 675 } // namespace blink | 673 } // namespace blink |
| OLD | NEW |