Fix <rdar://problem/5365030> calling dataWithPDFInsideRect on an SVG with a gradient...
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2007 03:48:44 +0000 (03:48 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2007 03:48:44 +0000 (03:48 +0000)
commita565757f1fa7fe1f5c466e0a5467a1dbbbdaf8b8
treed84822bb7df6b708aa633a2c6953b76d97b72e43
parent6fd7dd4c060db3e59fdec4f559932bdca88b5778
Fix <rdar://problem/5365030> calling dataWithPDFInsideRect on an SVG with a gradient crashes (14780)

Reviewed by Anders.

When drawing directly to PDF CG may delay the use of the gradient function until outside our
standard drawing path, which in turn could let us invalidate the caches before they were used.

To work around this we now store the cached stops in a RefCounted object, so that we can ensure
that cache exists as long as required.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/platform/graphics/svg/SVGPaintServerGradient.cpp
WebCore/platform/graphics/svg/SVGPaintServerGradient.h
WebCore/platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp