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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceContainer.h

Issue 181713003: Have Document::accessSVGExtensions() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 HashSet<RenderObject*> m_clients; 85 HashSet<RenderObject*> m_clients;
86 HashSet<RenderLayer*> m_clientLayers; 86 HashSet<RenderLayer*> m_clientLayers;
87 }; 87 };
88 88
89 inline RenderSVGResourceContainer* getRenderSVGResourceContainerById(Document& d ocument, const AtomicString& id) 89 inline RenderSVGResourceContainer* getRenderSVGResourceContainerById(Document& d ocument, const AtomicString& id)
90 { 90 {
91 if (id.isEmpty()) 91 if (id.isEmpty())
92 return 0; 92 return 0;
93 93
94 if (RenderSVGResourceContainer* renderResource = document.accessSVGExtension s()->resourceById(id)) 94 if (RenderSVGResourceContainer* renderResource = document.accessSVGExtension s().resourceById(id))
95 return renderResource; 95 return renderResource;
96 96
97 return 0; 97 return 0;
98 } 98 }
99 99
100 template<typename Renderer> 100 template<typename Renderer>
101 Renderer* getRenderSVGResourceById(Document& document, const AtomicString& id) 101 Renderer* getRenderSVGResourceById(Document& document, const AtomicString& id)
102 { 102 {
103 if (RenderSVGResourceContainer* container = getRenderSVGResourceContainerByI d(document, id)) 103 if (RenderSVGResourceContainer* container = getRenderSVGResourceContainerByI d(document, id))
104 return container->cast<Renderer>(); 104 return container->cast<Renderer>();
105 105
106 return 0; 106 return 0;
107 } 107 }
108 108
109 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContain er()); 109 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContain er());
110 110
111 } 111 }
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResource.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698