Changeset 117365 in webkit


Ignore:
Timestamp:
May 16, 2012 5:07:16 PM (12 years ago)
Author:
timothy_horton@apple.com
Message:

Crash if SVG gradient stop has display: none set
https://bugs.webkit.org/show_bug.cgi?id=86686
<rdar://problem/10751905>

Reviewed by Dean Jackson.

Source/WebCore:

Create a renderer for SVGStopElement regardless of the "display" property.
This matches the behavior of Opera and the SVG specification.

Test: svg/custom/gradient-stop-display-none-crash.svg

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::rendererIsNeeded):
(WebCore):

  • svg/SVGStopElement.h:

(SVGStopElement):

LayoutTests:

Add a test that ensures that we don't crash if "display: none" is set on an SVGStopElement.

  • svg/custom/gradient-stop-display-none-crash-expected.txt: Added.
  • svg/custom/gradient-stop-display-none-crash.svg: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117363 r117365  
     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 Dean Jackson.
     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  Philippe Normand  <pnormand@igalia.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r117362 r117365  
     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 Dean Jackson.
     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
    1202012-05-16  Dana Jansens  <danakj@chromium.org>
    221
  • trunk/Source/WebCore/svg/SVGStopElement.cpp

    r117195 r117365  
    107107}
    108108
     109bool SVGStopElement::rendererIsNeeded(const NodeRenderingContext&)
     110{
     111    return true;
     112}
     113
    109114Color SVGStopElement::stopColorIncludingOpacity() const
    110115{
  • trunk/Source/WebCore/svg/SVGStopElement.h

    r117195 r117365  
    4444
    4545    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     46    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
    4647
    4748    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGStopElement)
Note: See TracChangeset for help on using the changeset viewer.