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

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

Issue 280633002: Rename RenderObject::setNeedsLayout to setNeedsLayoutAndFullRepaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 { 193 {
194 ASSERT(client); 194 ASSERT(client);
195 m_clientLayers.remove(client); 195 m_clientLayers.remove(client);
196 } 196 }
197 197
198 void RenderSVGResourceContainer::invalidateCacheAndMarkForLayout(SubtreeLayoutSc ope* layoutScope) 198 void RenderSVGResourceContainer::invalidateCacheAndMarkForLayout(SubtreeLayoutSc ope* layoutScope)
199 { 199 {
200 if (selfNeedsLayout()) 200 if (selfNeedsLayout())
201 return; 201 return;
202 202
203 setNeedsLayout(MarkContainingBlockChain, layoutScope); 203 setNeedsLayoutAndFullRepaint(MarkContainingBlockChain, layoutScope);
204 204
205 if (everHadLayout()) 205 if (everHadLayout())
206 removeAllClientsFromCache(); 206 removeAllClientsFromCache();
207 } 207 }
208 208
209 void RenderSVGResourceContainer::registerResource() 209 void RenderSVGResourceContainer::registerResource()
210 { 210 {
211 SVGDocumentExtensions& extensions = svgExtensionsFromElement(element()); 211 SVGDocumentExtensions& extensions = svgExtensionsFromElement(element());
212 if (!extensions.hasPendingResource(m_id)) { 212 if (!extensions.hasPendingResource(m_id)) {
213 extensions.addResource(m_id, this); 213 extensions.addResource(m_id, this);
(...skipping 10 matching lines...) Expand all
224 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) { 224 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) {
225 ASSERT((*it)->hasPendingResources()); 225 ASSERT((*it)->hasPendingResources());
226 extensions.clearHasPendingResourcesIfPossible(*it); 226 extensions.clearHasPendingResourcesIfPossible(*it);
227 RenderObject* renderer = (*it)->renderer(); 227 RenderObject* renderer = (*it)->renderer();
228 if (!renderer) 228 if (!renderer)
229 continue; 229 continue;
230 230
231 StyleDifference diff; 231 StyleDifference diff;
232 diff.setNeedsFullLayout(); 232 diff.setNeedsFullLayout();
233 SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->style()) ; 233 SVGResourcesCache::clientStyleChanged(renderer, diff, renderer->style()) ;
234 renderer->setNeedsLayout(); 234 renderer->setNeedsLayoutAndFullRepaint();
235 } 235 }
236 } 236 }
237 237
238 AffineTransform RenderSVGResourceContainer::computeResourceSpaceTransform(Render Object* object, const AffineTransform& baseTransform, const SVGRenderStyle* svgS tyle, unsigned short resourceMode) 238 AffineTransform RenderSVGResourceContainer::computeResourceSpaceTransform(Render Object* object, const AffineTransform& baseTransform, const SVGRenderStyle* svgS tyle, unsigned short resourceMode)
239 { 239 {
240 AffineTransform computedSpaceTransform = baseTransform; 240 AffineTransform computedSpaceTransform = baseTransform;
241 if (resourceMode & ApplyToTextMode) { 241 if (resourceMode & ApplyToTextMode) {
242 // Depending on the font scaling factor, we may need to apply an 242 // Depending on the font scaling factor, we may need to apply an
243 // additional transform (scale-factor) the paintserver, since text 243 // additional transform (scale-factor) the paintserver, since text
244 // painting removes the scale factor from the context. (See 244 // painting removes the scale factor from the context. (See
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (!object->isSVGShape()) 278 if (!object->isSVGShape())
279 return resourceTransform; 279 return resourceTransform;
280 280
281 SVGGraphicsElement* element = toSVGGraphicsElement(object->node()); 281 SVGGraphicsElement* element = toSVGGraphicsElement(object->node());
282 AffineTransform transform = element->getScreenCTM(SVGGraphicsElement::Disall owStyleUpdate); 282 AffineTransform transform = element->getScreenCTM(SVGGraphicsElement::Disall owStyleUpdate);
283 transform *= resourceTransform; 283 transform *= resourceTransform;
284 return transform; 284 return transform;
285 } 285 }
286 286
287 } 287 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResource.cpp ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698