Changeset 160544 in webkit


Ignore:
Timestamp:
Dec 13, 2013 6:13:26 AM (10 years ago)
Author:
rwlbuis@webkit.org
Message:

Clean up SVGScriptElement
https://bugs.webkit.org/show_bug.cgi?id=125527

Reviewed by Darin Adler.

Source/WebCore:

From the Blink port of this bug it becomes clear that svg/dom/SVGScriptElement/script-set-href.svg and
svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug because SVGNames::typeAttr can't
be used with fastGetAttribute in all cases, because it can be animatable. However for SVGScriptElement
it is not animatable, so make isAnimatableAttribute virtual (note Debug only method) and allow typeAttr
in the SVGScriptElement case to be useable for fastGetAttribute.

Test: svg/dom/SVGScriptElement/script-type-attribute.svg

  • svg/SVGElement.h:
  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::isAnimatableAttribute):

  • svg/SVGScriptElement.h:

LayoutTests:

Add test to verify the new type getter/setter behavior on SVScriptElement.
Specifically, the old behavior was setting the JS type property did not reflect in
the actual content attribute being set, the new behavior is to do set the content
attribute when setting the JS type property.

  • svg/dom/SVGScriptElement/script-type-attribute-expected.txt: Added.
  • svg/dom/SVGScriptElement/script-type-attribute.svg: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r160542 r160544  
     12013-12-13  Rob Buis  <rob.buis@samsung.com>
     2
     3        Clean up SVGScriptElement
     4        https://bugs.webkit.org/show_bug.cgi?id=125527
     5
     6        Reviewed by Darin Adler.
     7
     8        Add test to verify the new type getter/setter behavior on SVScriptElement.
     9        Specifically, the old behavior was setting the JS type property did not reflect in
     10        the actual content attribute being set, the new behavior is to do set the content
     11        attribute when setting the JS type property.
     12
     13        * svg/dom/SVGScriptElement/script-type-attribute-expected.txt: Added.
     14        * svg/dom/SVGScriptElement/script-type-attribute.svg: Added.
     15
    1162013-12-13  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r160543 r160544  
     12013-12-13  Rob Buis  <rob.buis@samsung.com>
     2
     3        Clean up SVGScriptElement
     4        https://bugs.webkit.org/show_bug.cgi?id=125527
     5
     6        Reviewed by Darin Adler.
     7
     8        From the Blink port of this bug it becomes clear that svg/dom/SVGScriptElement/script-set-href.svg and
     9        svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug because SVGNames::typeAttr can't
     10        be used with fastGetAttribute in all cases, because it can be animatable. However for SVGScriptElement
     11        it is not animatable, so make isAnimatableAttribute virtual (note Debug only method) and allow typeAttr
     12        in the SVGScriptElement case to be useable for fastGetAttribute.
     13
     14        Test: svg/dom/SVGScriptElement/script-type-attribute.svg
     15
     16        * svg/SVGElement.h:
     17        * svg/SVGScriptElement.cpp:
     18        (WebCore::SVGScriptElement::isAnimatableAttribute):
     19        * svg/SVGScriptElement.h:
     20
    1212013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
    222
  • trunk/Source/WebCore/svg/SVGElement.h

    r160536 r160544  
    124124
    125125#ifndef NDEBUG
    126     bool isAnimatableAttribute(const QualifiedName&) const;
     126    virtual bool isAnimatableAttribute(const QualifiedName&) const;
    127127#endif
    128128
  • trunk/Source/WebCore/svg/SVGScriptElement.cpp

    r160415 r160544  
    199199}
    200200
     201#ifndef NDEBUG
     202bool SVGScriptElement::isAnimatableAttribute(const QualifiedName& name) const
     203{
     204    if (name == SVGNames::typeAttr)
     205        return false;
     206
     207    return SVGElement::isAnimatableAttribute(name);
     208}
     209#endif
     210
    201211}
    202212
  • trunk/Source/WebCore/svg/SVGScriptElement.h

    r160389 r160544  
    3939    static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
    4040
     41#ifndef NDEBUG
     42    virtual bool isAnimatableAttribute(const QualifiedName&) const;
     43#endif
    4144
    4245private:
Note: See TracChangeset for help on using the changeset viewer.