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

Side by Side Diff: Source/core/layout/svg/LayoutSVGResourceContainer.cpp

Issue 1068073005: Handle layer clients in LayoutSVGResourceContainer::registerResource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 // Update cached resources of pending clients. 217 // Update cached resources of pending clients.
218 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client s->end(); 218 const SVGDocumentExtensions::SVGPendingElements::const_iterator end = client s->end();
219 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) { 219 for (SVGDocumentExtensions::SVGPendingElements::const_iterator it = clients- >begin(); it != end; ++it) {
220 ASSERT((*it)->hasPendingResources()); 220 ASSERT((*it)->hasPendingResources());
221 extensions.clearHasPendingResourcesIfPossible(*it); 221 extensions.clearHasPendingResourcesIfPossible(*it);
222 LayoutObject* layoutObject = (*it)->layoutObject(); 222 LayoutObject* layoutObject = (*it)->layoutObject();
223 if (!layoutObject) 223 if (!layoutObject)
224 continue; 224 continue;
225 225
226 // If the client is has a layer (is a non-SVGElement) we need to signal
kouhei (in TOK) 2015/04/08 17:14:41 s/is has/has/
fs 2015/04/08 17:26:04 Done.
227 // invalidation in the same way as is done in markAllClientLayersForInva lidation above.
228 if (layoutObject->hasLayer() && resourceType() == FilterResourceType)
229 toLayoutBoxModelObject(layoutObject)->layer()->filterNeedsPaintInval idation();
kouhei (in TOK) 2015/04/08 17:14:41 Would it make sense to do a early "continue" here,
fs 2015/04/08 17:26:04 I believe we still want to do the setNeedsLayoutAn
kouhei (in TOK) 2015/04/08 17:28:50 Thanks for the explanation. No strong opinion here
fs 2015/04/08 17:34:16 Hmm, it's quite possible that the "filter update h
fs 2015/04/09 10:21:33 Ended up doing like this suggests, because I concl
230
226 StyleDifference diff; 231 StyleDifference diff;
227 diff.setNeedsFullLayout(); 232 diff.setNeedsFullLayout();
228 SVGResourcesCache::clientStyleChanged(layoutObject, diff, layoutObject-> styleRef()); 233 SVGResourcesCache::clientStyleChanged(layoutObject, diff, layoutObject-> styleRef());
229 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR eason::SvgResourceInvalidated); 234 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR eason::SvgResourceInvalidated);
230 } 235 }
231 } 236 }
232 237
233 static inline void removeFromCacheAndInvalidateDependencies(LayoutObject* object , bool needsLayout) 238 static inline void removeFromCacheAndInvalidateDependencies(LayoutObject* object , bool needsLayout)
234 { 239 {
235 ASSERT(object); 240 ASSERT(object);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // This will process the rest of the ancestors. 295 // This will process the rest of the ancestors.
291 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); 296 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
292 break; 297 break;
293 } 298 }
294 299
295 current = current->parent(); 300 current = current->parent();
296 } 301 }
297 } 302 }
298 303
299 } 304 }
OLDNEW
« no previous file with comments | « LayoutTests/css3/filters/effect-reference-rename-2-expected.html ('k') | Source/core/layout/svg/SVGResourcesCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698