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

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

Issue 2065593002: Unprefix the CSS 'filter' property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 6 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
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 extensions.clearHasPendingResourcesIfPossible(pendingClient); 238 extensions.clearHasPendingResourcesIfPossible(pendingClient);
239 LayoutObject* layoutObject = pendingClient->layoutObject(); 239 LayoutObject* layoutObject = pendingClient->layoutObject();
240 if (!layoutObject) 240 if (!layoutObject)
241 continue; 241 continue;
242 242
243 const ComputedStyle& style = layoutObject->styleRef(); 243 const ComputedStyle& style = layoutObject->styleRef();
244 244
245 // If the client has a layer (is a non-SVGElement) we need to signal 245 // If the client has a layer (is a non-SVGElement) we need to signal
246 // invalidation in the same way as is done in markAllResourceClientsForI nvalidation above. 246 // invalidation in the same way as is done in markAllResourceClientsForI nvalidation above.
247 if (layoutObject->hasLayer() && resourceType() == FilterResourceType) { 247 if (layoutObject->hasLayer() && resourceType() == FilterResourceType) {
248 if (style.hasFilter()) 248 if (!style.hasFilter())
249 toLayoutBoxModelObject(layoutObject)->layer()->filterNeedsPaintI nvalidation();
250 // If this is the SVG root, we could have both 'filter' and
251 // '-webkit-filter' applied, so we need to do the invalidation
252 // below as well, unless we can optimistically determine that
253 // 'filter' does not apply to the element in question.
254 if (!layoutObject->isSVGRoot() || !style.svgStyle().hasFilter())
255 continue; 249 continue;
250 toLayoutBoxModelObject(layoutObject)->layer()->filterNeedsPaintInval idation();
251 if (!layoutObject->isSVGRoot())
chrishtr 2016/06/15 15:56:03 Can a non-SVGRoot SVG object have a PaintLayer?
fs 2016/06/15 22:02:10 Not at the moment (and unlikely ever...)
252 continue;
253 // A root SVG element with a filter, however, still needs to run
254 // the full invalidation step below.
256 } 255 }
257 256
258 StyleDifference diff; 257 StyleDifference diff;
259 diff.setNeedsFullLayout(); 258 diff.setNeedsFullLayout();
260 SVGResourcesCache::clientStyleChanged(layoutObject, diff, style); 259 SVGResourcesCache::clientStyleChanged(layoutObject, diff, style);
261 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR eason::SvgResourceInvalidated); 260 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR eason::SvgResourceInvalidated);
262 } 261 }
263 } 262 }
264 263
265 static inline void removeFromCacheAndInvalidateDependencies(LayoutObject* object , bool needsLayout) 264 static inline void removeFromCacheAndInvalidateDependencies(LayoutObject* object , bool needsLayout)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // This will process the rest of the ancestors. 320 // This will process the rest of the ancestors.
322 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); 321 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
323 break; 322 break;
324 } 323 }
325 324
326 current = current->parent(); 325 current = current->parent();
327 } 326 }
328 } 327 }
329 328
330 } // namespace blink 329 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698