| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 if (LayoutSVGResourcePaintServer* fill = m_fillStrokeData->fill) | 316 if (LayoutSVGResourcePaintServer* fill = m_fillStrokeData->fill) |
| 317 fill->layoutIfNeeded(); | 317 fill->layoutIfNeeded(); |
| 318 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) | 318 if (LayoutSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) |
| 319 stroke->layoutIfNeeded(); | 319 stroke->layoutIfNeeded(); |
| 320 } | 320 } |
| 321 | 321 |
| 322 if (m_linkedResource) | 322 if (m_linkedResource) |
| 323 m_linkedResource->layoutIfNeeded(); | 323 m_linkedResource->layoutIfNeeded(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void SVGResources::removeClientFromCacheAffectingObjectBounds( |
| 327 LayoutObject* object, |
| 328 bool markForInvalidation) const { |
| 329 if (!m_clipperFilterMaskerData) |
| 330 return; |
| 331 if (LayoutSVGResourceClipper* clipper = m_clipperFilterMaskerData->clipper) |
| 332 clipper->removeClientFromCache(object, markForInvalidation); |
| 333 if (LayoutSVGResourceFilter* filter = m_clipperFilterMaskerData->filter) |
| 334 filter->removeClientFromCache(object, markForInvalidation); |
| 335 if (LayoutSVGResourceMasker* masker = m_clipperFilterMaskerData->masker) |
| 336 masker->removeClientFromCache(object, markForInvalidation); |
| 337 } |
| 338 |
| 326 void SVGResources::removeClientFromCache(LayoutObject* object, | 339 void SVGResources::removeClientFromCache(LayoutObject* object, |
| 327 bool markForInvalidation) const { | 340 bool markForInvalidation) const { |
| 328 if (!hasResourceData()) | 341 if (!hasResourceData()) |
| 329 return; | 342 return; |
| 330 | 343 |
| 331 if (m_linkedResource) { | 344 if (m_linkedResource) { |
| 332 ASSERT(!m_clipperFilterMaskerData); | 345 ASSERT(!m_clipperFilterMaskerData); |
| 333 ASSERT(!m_markerData); | 346 ASSERT(!m_markerData); |
| 334 ASSERT(!m_fillStrokeData); | 347 ASSERT(!m_fillStrokeData); |
| 335 m_linkedResource->removeClientFromCache(object, markForInvalidation); | 348 m_linkedResource->removeClientFromCache(object, markForInvalidation); |
| 336 return; | 349 return; |
| 337 } | 350 } |
| 338 | 351 |
| 339 if (m_clipperFilterMaskerData) { | 352 removeClientFromCacheAffectingObjectBounds(object, markForInvalidation); |
| 340 if (m_clipperFilterMaskerData->clipper) | |
| 341 m_clipperFilterMaskerData->clipper->removeClientFromCache( | |
| 342 object, markForInvalidation); | |
| 343 if (m_clipperFilterMaskerData->filter) | |
| 344 m_clipperFilterMaskerData->filter->removeClientFromCache( | |
| 345 object, markForInvalidation); | |
| 346 if (m_clipperFilterMaskerData->masker) | |
| 347 m_clipperFilterMaskerData->masker->removeClientFromCache( | |
| 348 object, markForInvalidation); | |
| 349 } | |
| 350 | 353 |
| 351 if (m_markerData) { | 354 if (m_markerData) { |
| 352 if (m_markerData->markerStart) | 355 if (m_markerData->markerStart) |
| 353 m_markerData->markerStart->removeClientFromCache(object, | 356 m_markerData->markerStart->removeClientFromCache(object, |
| 354 markForInvalidation); | 357 markForInvalidation); |
| 355 if (m_markerData->markerMid) | 358 if (m_markerData->markerMid) |
| 356 m_markerData->markerMid->removeClientFromCache(object, | 359 m_markerData->markerMid->removeClientFromCache(object, |
| 357 markForInvalidation); | 360 markForInvalidation); |
| 358 if (m_markerData->markerEnd) | 361 if (m_markerData->markerEnd) |
| 359 m_markerData->markerEnd->removeClientFromCache(object, | 362 m_markerData->markerEnd->removeClientFromCache(object, |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 stroke->element()); | 676 stroke->element()); |
| 674 } | 677 } |
| 675 | 678 |
| 676 if (m_linkedResource) | 679 if (m_linkedResource) |
| 677 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, | 680 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, |
| 678 m_linkedResource->element()); | 681 m_linkedResource->element()); |
| 679 } | 682 } |
| 680 #endif | 683 #endif |
| 681 | 684 |
| 682 } // namespace blink | 685 } // namespace blink |
| OLD | NEW |