⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203444 in webkit


Ignore:
Timestamp:
Jul 19, 2016, 10:13:06 PM (10 years ago)
Author:
Chris Dumez
Message:

Fix null handling of SVGScriptElement.type attribute
https://bugs.webkit.org/show_bug.cgi?id=159927

Reviewed by Benjamin Poulain.

Source/WebCore:

Fix null handling of SVGScriptElement.type attribute:

We were treating null as the null String which would end up removing
the 'type' content attribute. However, we should treat null as the
String "null".

Firefox and Chrome match the specification.

No new tests, updated existing test.

  • svg/SVGScriptElement.idl:

LayoutTests:

Rebaseline existing test to reflect the behavior change.

  • svg/dom/svg-element-attribute-js-null-expected.txt:
  • svg/dom/svg-element-attribute-js-null.xhtml:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r203443 r203444  
     12016-07-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling of SVGScriptElement.type attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=159927
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Rebaseline existing test to reflect the behavior change.
     9
     10        * svg/dom/svg-element-attribute-js-null-expected.txt:
     11        * svg/dom/svg-element-attribute-js-null.xhtml:
     12
    1132016-07-19  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/svg/dom/svg-element-attribute-js-null-expected.txt

    r203438 r203444  
    77TEST SUCCEEDED: The value was the string '0'. [tested SVGLength.valueAsString]
    88
    9 TEST SUCCEEDED: The value was the empty string. [tested SVGScriptElement.type]
     9TEST SUCCEEDED: The value was the string 'null'. [tested SVGScriptElement.type]
    1010
    1111
  • trunk/LayoutTests/svg/dom/svg-element-attribute-js-null.xhtml

    r203438 r203444  
    7474                    elementToUse: document.createElementNS(svgNS, 'script'),
    7575                    attributes: [
    76                         {name: 'type', expectedNull: ''}
     76                        {name: 'type', expectedNull: 'null'}
    7777                    ]
    7878                }
  • trunk/Source/WebCore/ChangeLog

    r203443 r203444  
     12016-07-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling of SVGScriptElement.type attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=159927
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Fix null handling of SVGScriptElement.type attribute:
     9        - https://www.w3.org/TR/SVG2/interact.html#InterfaceSVGScriptElement
     10
     11        We were treating null as the null String which would end up removing
     12        the 'type' content attribute. However, we should treat null as the
     13        String "null".
     14
     15        Firefox and Chrome match the specification.
     16
     17        No new tests, updated existing test.
     18
     19        * svg/SVGScriptElement.idl:
     20
    1212016-07-19  Chris Dumez  <cdumez@apple.com>
    222
  • trunk/Source/WebCore/svg/SVGScriptElement.idl

    r197353 r203444  
    2525
    2626interface SVGScriptElement : SVGElement {
    27     // FIXME: This should not use [TreatNullAs=LegacyNullString].
    28     [TreatNullAs=LegacyNullString, Reflect] attribute DOMString type;
     27    [Reflect] attribute DOMString type;
    2928};
    3029
Note: See TracChangeset for help on using the changeset viewer.