Changeset 122616 in webkit


Ignore:
Timestamp:
Jul 13, 2012 12:08:31 PM (12 years ago)
Author:
pdr@google.com
Message:

Remove assert in localCoordinateSpaceTransform()
https://bugs.webkit.org/show_bug.cgi?id=91189

Reviewed by Nikolas Zimmermann.

Source/WebCore:

The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
to override the method but it is better to simply return the identity matrix.

This scenario can occur when we break the SVG content model, such as asking for
the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
tspan is not a subclass of SVGLocatable but both Firefox and Opera
implement this by returning the identity matrix.

Test: svg/custom/invalid-ctm.svg

  • svg/SVGStyledElement.cpp:

(WebCore::SVGStyledElement::localCoordinateSpaceTransform):

LayoutTests:

  • svg/custom/invalid-ctm-expected.txt: Added.
  • svg/custom/invalid-ctm.svg: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r122613 r122616  
     12012-07-13  Philip Rogers  <pdr@google.com>
     2
     3        Remove assert in localCoordinateSpaceTransform()
     4        https://bugs.webkit.org/show_bug.cgi?id=91189
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        * svg/custom/invalid-ctm-expected.txt: Added.
     9        * svg/custom/invalid-ctm.svg: Added.
     10
    1112012-07-13  David Grogan  <dgrogan@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r122614 r122616  
     12012-07-13  Philip Rogers  <pdr@google.com>
     2
     3        Remove assert in localCoordinateSpaceTransform()
     4        https://bugs.webkit.org/show_bug.cgi?id=91189
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
     9        to override the method but it is better to simply return the identity matrix.
     10
     11        This scenario can occur when we break the SVG content model, such as asking for
     12        the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
     13        tspan is not a subclass of SVGLocatable but both Firefox and Opera
     14        implement this by returning the identity matrix.
     15
     16        Test: svg/custom/invalid-ctm.svg
     17
     18        * svg/SVGStyledElement.cpp:
     19        (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
     20
    1212012-07-13  Kentaro Hara  <haraken@chromium.org>
    222
  • trunk/Source/WebCore/svg/SVGStyledElement.cpp

    r121330 r122616  
    452452{
    453453    // To be overriden by SVGStyledLocatableElement/SVGStyledTransformableElement (or as special case SVGTextElement and SVGPatternElement)
    454     ASSERT_NOT_REACHED();
    455454    return AffineTransform();
    456455}
Note: See TracChangeset for help on using the changeset viewer.