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

Side by Side Diff: WebCore/rendering/RenderSVGResourceContainer.cpp

Issue 3308018: Merge 66847 - 2010-09-06 Justin Schuh <jschuh@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 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 | « no previous file | WebCore/svg/SVGDocumentExtensions.h » ('j') | 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void RenderSVGResourceContainer::registerResource() 155 void RenderSVGResourceContainer::registerResource()
156 { 156 {
157 SVGDocumentExtensions* extensions = svgExtensionsFromNode(node()); 157 SVGDocumentExtensions* extensions = svgExtensionsFromNode(node());
158 if (!extensions->isPendingResource(m_id)) { 158 if (!extensions->isPendingResource(m_id)) {
159 extensions->addResource(m_id, this); 159 extensions->addResource(m_id, this);
160 return; 160 return;
161 } 161 }
162 162
163 OwnPtr<HashSet<SVGStyledElement*> > clients(extensions->removePendingResourc e(m_id)); 163 OwnPtr<SVGDocumentExtensions::SVGPendingElements> clients(extensions->remove PendingResource(m_id));
164 164
165 // Cache us with the new id. 165 // Cache us with the new id.
166 extensions->addResource(m_id, this); 166 extensions->addResource(m_id, this);
167 167
168 // Update cached resources of pending clients. 168 // Update cached resources of pending clients.
169 const HashSet<SVGStyledElement*>::const_iterator end = clients->end(); 169 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client s->end();
170 for (HashSet<SVGStyledElement*>::const_iterator it = clients->begin(); it != end; ++it) { 170 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) {
171 RenderObject* renderer = (*it)->renderer(); 171 RenderObject* renderer = (*it)->renderer();
172 if (!renderer) 172 if (!renderer)
173 continue; 173 continue;
174 SVGResourcesCache::clientUpdatedFromElement(renderer, renderer->style()) ; 174 SVGResourcesCache::clientUpdatedFromElement(renderer, renderer->style()) ;
175 renderer->setNeedsLayout(true); 175 renderer->setNeedsLayout(true);
176 } 176 }
177 } 177 }
178 178
179 // FIXME: This does not belong here. 179 // FIXME: This does not belong here.
180 AffineTransform RenderSVGResourceContainer::transformOnNonScalingStroke(RenderOb ject* object, const AffineTransform& resourceTransform) 180 AffineTransform RenderSVGResourceContainer::transformOnNonScalingStroke(RenderOb ject* object, const AffineTransform& resourceTransform)
181 { 181 {
182 if (!object->isRenderPath()) 182 if (!object->isRenderPath())
183 return resourceTransform; 183 return resourceTransform;
184 184
185 SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableE lement*>(object->node()); 185 SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableE lement*>(object->node());
186 AffineTransform transform = resourceTransform; 186 AffineTransform transform = resourceTransform;
187 transform.multiply(element->getScreenCTM(SVGLocatable::DisallowStyleUpdate)) ; 187 transform.multiply(element->getScreenCTM(SVGLocatable::DisallowStyleUpdate)) ;
188 return transform; 188 return transform;
189 } 189 }
190 190
191 } 191 }
192 192
193 #endif 193 #endif
OLDNEW
« no previous file with comments | « no previous file | WebCore/svg/SVGDocumentExtensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698