LayoutTests/ChangeLog

 12012-05-16 Tim Horton <timothy_horton@apple.com>
 2
 3 Crash if SVG gradient stop has display: none set
 4 https://bugs.webkit.org/show_bug.cgi?id=86686
 5 <rdar://problem/10751905>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Add a test that ensures that we don't crash if "display: none" is set on an SVGStopElement.
 10
 11 * svg/custom/gradient-stop-display-none-crash-expected.txt: Added.
 12 * svg/custom/gradient-stop-display-none-crash.svg: Added.
 13
1142012-05-16 Emil A Eklund <eae@chromium.org>
215
316 Change ascents and descent back to ints for now

LayoutTests/svg/custom/gradient-stop-display-none-crash-expected.txt

 1This test passes if there is no crash.

LayoutTests/svg/custom/gradient-stop-display-none-crash.svg

 1<svg xmlns="http://www.w3.org/2000/svg">
 2 <script>
 3 if (window.layoutTestController)
 4 layoutTestController.dumpAsText();
 5 </script>
 6 <defs>
 7 <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
 8 <stop offset="0%" style="stop-color: rgb(0,255,0); display: none;"/>
 9 </linearGradient>
 10 </defs>
 11 <rect x="0" y="0" width="100" height="100" fill="url(#grad1)"/>
 12 <text x="120" y="20">This test passes if there is no crash.</text>
 13</svg>

Source/WebCore/ChangeLog

112012-05-16 Tim Horton <timothy_horton@apple.com>
22
 3 Crash if SVG gradient stop has display: none set
 4 https://bugs.webkit.org/show_bug.cgi?id=86686
 5 <rdar://problem/10751905>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Create a renderer for SVGStopElement regardless of the "display" property.
 10 This matches the behavior of Opera and the SVG specification.
 11
 12 Test: svg/custom/gradient-stop-display-none-crash.svg
 13
 14 * svg/SVGStopElement.cpp:
 15 (WebCore::SVGStopElement::rendererIsNeeded):
 16 (WebCore):
 17 * svg/SVGStopElement.h:
 18 (SVGStopElement):
 19
 202012-05-16 Tim Horton <timothy_horton@apple.com>
 21
322 Scrollbar layers should respect accelerated drawing setting
423 https://bugs.webkit.org/show_bug.cgi?id=86644
524 <rdar://problem/11462038>

Source/WebCore/svg/SVGStopElement.cpp

@@RenderObject* SVGStopElement::createRenderer(RenderArena* arena, RenderStyle*)
106106 return new (arena) RenderSVGGradientStop(this);
107107}
108108
 109bool SVGStopElement::rendererIsNeeded(const NodeRenderingContext&)
 110{
 111 return true;
 112}
 113
109114Color SVGStopElement::stopColorIncludingOpacity() const
110115{
111116 ASSERT(renderer());

Source/WebCore/svg/SVGStopElement.h

@@private:
4343 virtual bool isGradientStop() const { return true; }
4444
4545 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 46 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
4647
4748 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGStopElement)
4849 DECLARE_ANIMATED_NUMBER(Offset, offset)