OLD | NEW |
---|---|
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(); | 249 toLayoutBoxModelObject(layoutObject)->layer()->filterNeedsPaintI nvalidation(); |
250 // If this is the SVG root, we could have both 'filter' and | 250 // If this is the SVG root, we could have 'filter' applied and |
fs
2016/05/23 12:29:53
This comment does make a lot of sense anymore. If
Noel Gordon
2016/05/29 04:15:28
Thanks for the code. I tried it and the two tests
fs
2016/05/30 11:58:52
Yes, this was under the assumption that FilterPain
| |
251 // '-webkit-filter' applied, so we need to do the invalidation | 251 // so need to do the invalidation below as well, unless we can |
252 // below as well, unless we can optimistically determine that | 252 // optimistically determine that filter does not apply to the |
253 // 'filter' does not apply to the element in question. | 253 // element in question. |
254 if (!layoutObject->isSVGRoot() || !style.svgStyle().hasFilter()) | 254 if (!layoutObject->isSVGRoot() || !style.hasFilter()) |
255 continue; | 255 continue; |
256 } | 256 } |
257 | 257 |
258 StyleDifference diff; | 258 StyleDifference diff; |
259 diff.setNeedsFullLayout(); | 259 diff.setNeedsFullLayout(); |
260 SVGResourcesCache::clientStyleChanged(layoutObject, diff, style); | 260 SVGResourcesCache::clientStyleChanged(layoutObject, diff, style); |
261 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR eason::SvgResourceInvalidated); | 261 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationR eason::SvgResourceInvalidated); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
321 // This will process the rest of the ancestors. | 321 // This will process the rest of the ancestors. |
322 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); | 322 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); |
323 break; | 323 break; |
324 } | 324 } |
325 | 325 |
326 current = current->parent(); | 326 current = current->parent(); |
327 } | 327 } |
328 } | 328 } |
329 | 329 |
330 } // namespace blink | 330 } // namespace blink |
OLD | NEW |