Changeset 52709 in webkit
- Timestamp:
- Jan 4, 2010 12:21:52 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r52700 r52709 1 2010-01-04 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVGResources don't invalidate if target object changes attributes 6 https://bugs.webkit.org/show_bug.cgi?id=33091 7 8 Check if SVG resources are invalidated, if target object changes 9 attributes. 10 11 * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.checksum: Added. 12 * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.png: Added. 13 * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt: Added. 14 * svg/custom/resource-invalidate-on-target-update.svg: Added. 15 1 16 2010-01-03 Kenneth Russell <kbr@google.com> 2 17 -
trunk/WebCore/ChangeLog
r52700 r52709 1 2010-01-04 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVGResources don't invalidate if target object changes attributes 6 https://bugs.webkit.org/show_bug.cgi?id=33091 7 8 It's neccessary to invalidate all resources of an object, if the attributes of this 9 target change. Otherwise the saved resource data (like ImageBuffers) don't match 10 to the new object properties. 11 12 Test: svg/custom/resource-invalidate-on-target-update.svg 13 14 * svg/SVGStyledElement.cpp: 15 (WebCore::SVGStyledElement::svgAttributeChanged): 16 (WebCore::SVGStyledElement::invalidateResources): 17 * svg/SVGStyledElement.h: 18 1 19 2010-01-03 Kenneth Russell <kbr@google.com> 2 20 -
trunk/WebCore/svg/SVGStyledElement.cpp
r52580 r52709 37 37 #include "SVGNames.h" 38 38 #include "SVGRenderStyle.h" 39 #include "SVGResource.h" 39 #include "SVGResourceClipper.h" 40 #include "SVGResourceFilter.h" 41 #include "SVGResourceMasker.h" 40 42 #include "SVGSVGElement.h" 41 43 #include <wtf/Assertions.h> … … 203 205 invalidateResourcesInAncestorChain(); 204 206 207 // If the element is using resources, invalidate them. 208 invalidateResources(); 209 205 210 // Invalidate all SVGElementInstances associated with us 206 211 SVGElementInstance::invalidateAllInstancesOfElement(this); 212 } 213 214 void SVGStyledElement::invalidateResources() 215 { 216 RenderObject* object = renderer(); 217 if (!object) 218 return; 219 220 const SVGRenderStyle* svgStyle = object->style()->svgStyle(); 221 Document* document = this->document(); 222 223 if (document->parsing()) 224 return; 225 226 #if ENABLE(FILTERS) 227 SVGResourceFilter* filter = getFilterById(document, svgStyle->filter(), object); 228 if (filter) 229 filter->invalidate(); 230 #endif 231 232 SVGResourceMasker* masker = getMaskerById(document, svgStyle->maskElement(), object); 233 if (masker) 234 masker->invalidate(); 235 236 SVGResourceClipper* clipper = getClipperById(document, svgStyle->clipPath(), object); 237 if (clipper) 238 clipper->invalidate(); 207 239 } 208 240 -
trunk/WebCore/svg/SVGStyledElement.h
r52580 r52709 61 61 PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle); 62 62 63 void invalidateResourcesInAncestorChain() const; 63 void invalidateResourcesInAncestorChain() const; 64 void invalidateResources(); 65 64 66 virtual void detach(); 65 67
Note: See TracChangeset
for help on using the changeset viewer.