Changeset 95047 in webkit
- Timestamp:
- Sep 13, 2011 2:54:02 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95043 r95047 1 2011-09-13 Tim Horton <timothy_horton@apple.com> 2 3 REGRESSION (64275): Shape pattern-image fill turns black 4 https://bugs.webkit.org/show_bug.cgi?id=51061 5 <rdar://problem/8504705> 6 7 Reviewed by Simon Fraser. 8 9 Add a test ensuring that replacing a SVG pattern without changing 10 the id causes the clients to be updated properly. 11 12 * svg/custom/pending-resource-after-removal-expected.png: Added. 13 * svg/custom/pending-resource-after-removal-expected.txt: Added. 14 * svg/custom/pending-resource-after-removal.xhtml: Added. 15 1 16 2011-09-13 Cary Clark <caryclark@google.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r95040 r95047 1 2011-09-13 Tim Horton <timothy_horton@apple.com> 2 3 REGRESSION (64275): Shape pattern-image fill turns black 4 https://bugs.webkit.org/show_bug.cgi?id=51061 5 <rdar://problem/8504705> 6 7 Reviewed by Simon Fraser. 8 9 When destroying a resource, register clients who are losing their 10 resource as having pending resources, so they can be resolved in the case a 11 resource with that id is re-registered. 12 13 Test: svg/custom/pending-resource-after-removal.xhtml 14 15 * rendering/svg/SVGResourcesCache.cpp: 16 (WebCore::SVGResourcesCache::resourceDestroyed): 17 * svg/SVGStyledElement.h: 18 (WebCore::toSVGStyledElement): Added. 19 1 20 2011-09-13 Eric Seidel <eric@webkit.org> 2 21 -
trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp
r83821 r95047 22 22 23 23 #if ENABLE(SVG) 24 #include "HTMLNames.h" 24 25 #include "RenderSVGResourceContainer.h" 25 26 #include "SVGDocumentExtensions.h" 26 27 #include "SVGResources.h" 27 28 #include "SVGResourcesCycleSolver.h" 29 #include "SVGStyledElement.h" 28 30 29 31 namespace WebCore { … … 161 163 162 164 HashMap<RenderObject*, SVGResources*>::iterator end = cache->m_cache.end(); 163 for (HashMap<RenderObject*, SVGResources*>::iterator it = cache->m_cache.begin(); it != end; ++it) 165 for (HashMap<RenderObject*, SVGResources*>::iterator it = cache->m_cache.begin(); it != end; ++it) { 164 166 it->second->resourceDestroyed(resource); 167 168 // Mark users of destroyed resources as pending resolution based on the id of the old resource. 169 Element* resourceElement = toElement(resource->node()); 170 SVGStyledElement* clientElement = toSVGStyledElement(it->first->node()); 171 SVGDocumentExtensions* extensions = clientElement->document()->accessSVGExtensions(); 172 173 extensions->addPendingResource(resourceElement->fastGetAttribute(HTMLNames::idAttr), clientElement); 174 } 165 175 } 166 176 -
trunk/Source/WebCore/svg/SVGStyledElement.h
r94928 r95047 97 97 }; 98 98 99 inline SVGStyledElement* toSVGStyledElement(Node* node) 100 { 101 ASSERT(!node || (node->isStyledElement() && node->isSVGElement())); 102 return static_cast<SVGStyledElement*>(node); 103 } 104 99 105 } // namespace WebCore 100 106
Note: See TracChangeset
for help on using the changeset viewer.