Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: Source/core/rendering/svg/SVGResources.cpp

Issue 203723007: Store marker identifiers as AtomicString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/style/SVGRenderStyleDefs.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 if (style->hasMasker()) { 246 if (style->hasMasker()) {
247 AtomicString id = style->maskerResource(); 247 AtomicString id = style->maskerResource();
248 if (!ensureResources(resources)->setMasker(getRenderSVGResourceById< RenderSVGResourceMasker>(document, id))) 248 if (!ensureResources(resources)->setMasker(getRenderSVGResourceById< RenderSVGResourceMasker>(document, id)))
249 registerPendingResource(extensions, id, element); 249 registerPendingResource(extensions, id, element);
250 } 250 }
251 } 251 }
252 252
253 if (markerTags().contains(tagName) && style->hasMarkers()) { 253 if (markerTags().contains(tagName) && style->hasMarkers()) {
254 AtomicString markerStartId(style->markerStartResource()); 254 const AtomicString& markerStartId = style->markerStartResource();
255 if (!ensureResources(resources)->setMarkerStart(getRenderSVGResourceById <RenderSVGResourceMarker>(document, markerStartId))) 255 if (!ensureResources(resources)->setMarkerStart(getRenderSVGResourceById <RenderSVGResourceMarker>(document, markerStartId)))
256 registerPendingResource(extensions, markerStartId, element); 256 registerPendingResource(extensions, markerStartId, element);
257 257
258 AtomicString markerMidId(style->markerMidResource()); 258 const AtomicString& markerMidId = style->markerMidResource();
259 if (!ensureResources(resources)->setMarkerMid(getRenderSVGResourceById<R enderSVGResourceMarker>(document, markerMidId))) 259 if (!ensureResources(resources)->setMarkerMid(getRenderSVGResourceById<R enderSVGResourceMarker>(document, markerMidId)))
260 registerPendingResource(extensions, markerMidId, element); 260 registerPendingResource(extensions, markerMidId, element);
261 261
262 AtomicString markerEndId(style->markerEndResource()); 262 const AtomicString& markerEndId = style->markerEndResource();
263 if (!ensureResources(resources)->setMarkerEnd(getRenderSVGResourceById<R enderSVGResourceMarker>(document, markerEndId))) 263 if (!ensureResources(resources)->setMarkerEnd(getRenderSVGResourceById<R enderSVGResourceMarker>(document, style->markerEndResource())))
264 registerPendingResource(extensions, markerEndId, element); 264 registerPendingResource(extensions, markerEndId, element);
265 } 265 }
266 266
267 if (fillAndStrokeTags().contains(tagName)) { 267 if (fillAndStrokeTags().contains(tagName)) {
268 if (style->hasFill()) { 268 if (style->hasFill()) {
269 bool hasPendingResource = false; 269 bool hasPendingResource = false;
270 AtomicString id; 270 AtomicString id;
271 RenderSVGResourceContainer* resource = paintingResourceFromSVGPaint( document, style->fillPaintType(), style->fillPaintUri(), id, hasPendingResource) ; 271 RenderSVGResourceContainer* resource = paintingResourceFromSVGPaint( document, style->fillPaintType(), style->fillPaintUri(), id, hasPendingResource) ;
272 if (!ensureResources(resources)->setFill(resource) && hasPendingReso urce) { 272 if (!ensureResources(resources)->setFill(resource) && hasPendingReso urce) {
273 registerPendingResource(extensions, id, element); 273 registerPendingResource(extensions, id, element);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke) 699 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke)
700 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke-> element()); 700 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke-> element());
701 } 701 }
702 702
703 if (m_linkedResource) 703 if (m_linkedResource)
704 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_ linkedResource->element()); 704 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_ linkedResource->element());
705 } 705 }
706 #endif 706 #endif
707 707
708 } 708 }
OLDNEW
« no previous file with comments | « Source/core/rendering/style/SVGRenderStyleDefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698