Changeset 54638 in webkit
- Timestamp:
- Feb 10, 2010 7:04:38 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r54628 r54638 1 2010-02-10 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Simon Fraser and Darin Adler. 4 5 Test for https://bugs.webkit.org/show_bug.cgi?id=34185 REGRESSION: 6 Mask not invalidating 7 8 * platform/mac/svg/custom/mask-invalidation-expected.checksum: Added. 9 * platform/mac/svg/custom/mask-invalidation-expected.png: Added. 10 * platform/mac/svg/custom/mask-invalidation-expected.txt: Added. 11 * svg/custom/mask-invalidation.svg: Added. 12 1 13 2010-02-10 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r54637 r54638 1 2010-02-10 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Simon Fraser and Darin Adler. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=34185 REGRESSION: 6 Mask not invalidating 7 8 SVGMaskElement is the only class that keeps a HashMap of canvas 9 resources rather than just a pointer to a resource. This 10 patch makes SVGMaskElement invalidate all of its resources in the 11 HashMap instead of just one. 12 13 * svg/SVGMaskElement.cpp: 14 (WebCore::SVGMaskElement::svgAttributeChanged): 15 (WebCore::SVGMaskElement::childrenChanged): 16 (WebCore::SVGMaskElement::invalidateCanvasResources): 17 * svg/SVGMaskElement.h: 18 * svg/SVGStyledElement.cpp: 19 (WebCore::SVGStyledElement::invalidateResourcesInAncestorChain): 20 (WebCore::SVGStyledElement::invalidateCanvasResources): 21 * svg/SVGStyledElement.h: 22 1 23 2010-02-10 Stephan Aßmus <superstippi@gmx.de> 2 24 -
trunk/WebCore/svg/SVGMaskElement.cpp
r54503 r54638 106 106 SVGStyledElement::svgAttributeChanged(attrName); 107 107 108 if (m_masker.isEmpty())109 return;110 111 108 if (attrName == SVGNames::maskUnitsAttr || attrName == SVGNames::maskContentUnitsAttr || 112 109 attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || … … 117 114 SVGExternalResourcesRequired::isKnownAttribute(attrName) || 118 115 SVGStyledElement::isKnownAttribute(attrName)) 119 for (HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::iterator it = m_masker.begin(); it != m_masker.end(); ++it) 120 it->second->invalidate(); 116 invalidateCanvasResources(); 121 117 } 122 118 … … 152 148 { 153 149 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); 154 155 if (m_masker.isEmpty()) 156 return; 157 158 for (HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::iterator it = m_masker.begin(); it != m_masker.end(); ++it) 159 it->second->invalidate(); 150 invalidateCanvasResources(); 160 151 } 161 152 … … 286 277 } 287 278 279 void SVGMaskElement::invalidateCanvasResources() 280 { 281 // Don't call through to the base class since the base class will just 282 // invalidate one item in the HashMap. 283 HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::const_iterator end = m_masker.end(); 284 for (HashMap<const RenderObject*, RefPtr<SVGResourceMasker> >::const_iterator it = m_masker.begin(); it != end; ++it) 285 it->second->invalidate(); 286 } 287 288 288 } 289 289 -
trunk/WebCore/svg/SVGMaskElement.h
r53879 r54638 72 72 DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 73 73 74 virtual void invalidateCanvasResources(); 75 74 76 HashMap<const RenderObject*, RefPtr<SVGResourceMasker> > m_masker; 75 77 }; -
trunk/WebCore/svg/SVGStyledElement.cpp
r54009 r54638 252 252 253 253 SVGElement* element = static_cast<SVGElement*>(node); 254 if (SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(element->isStyled() ? element : 0)) { 255 if (SVGResource* resource = styledElement->canvasResource(node->renderer())) 256 resource->invalidate(); 257 } 254 if (SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(element->isStyled() ? element : 0)) 255 styledElement->invalidateCanvasResources(); 258 256 259 257 node = node->parentNode(); 260 258 } 259 } 260 261 void SVGStyledElement::invalidateCanvasResources() 262 { 263 if (SVGResource* resource = canvasResource(renderer())) 264 resource->invalidate(); 261 265 } 262 266 -
trunk/WebCore/svg/SVGStyledElement.h
r54009 r54638 72 72 static int cssPropertyIdForSVGAttributeName(const QualifiedName&); 73 73 74 virtual void invalidateCanvasResources(); 75 74 76 private: 75 77 DECLARE_ANIMATED_PROPERTY(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className)
Note: See TracChangeset
for help on using the changeset viewer.