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

Changeset 203523 in webkit


Ignore:
Timestamp:
Jul 21, 2016, 2:09:44 PM (10 years ago)
Author:
Chris Dumez
Message:

Fix null handling for HTMLImageElement.border
​https://bugs.webkit.org/show_bug.cgi?id=160039

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

Fix null handling for HTMLImageElement.border to match the specification:

We are supposed to treat null as the empty string.

Both Firefox and Chrome agree with the specification.

No new tests, rebaselined existing tests.

  • html/HTMLImageElement.idl:

LayoutTests:

Update existing test to reflect the behavior change.

  • fast/dom/element-attribute-js-null-expected.txt:
  • fast/dom/element-attribute-js-null.html:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r203522 r203523  
     12016-07-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling for HTMLImageElement.border
     4        https://bugs.webkit.org/show_bug.cgi?id=160039
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Update existing test to reflect the behavior change.
     9
     10        * fast/dom/element-attribute-js-null-expected.txt:
     11        * fast/dom/element-attribute-js-null.html:
     12
    1132016-07-21  Daniel Bates  <dabates@apple.com>
    214
  • trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt

    r203474 r203523  
    107107TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.align]
    108108TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.alt]
    109 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.border]
     109TEST SUCCEEDED: The value was the empty string. [tested HTMLImageElement.border]
    110110TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.useMap]
    111111
  • trunk/LayoutTests/fast/dom/element-attribute-js-null.html

    r203474 r203523  
    294294                        {name: 'align', expectedNull: 'null'},
    295295                        {name: 'alt', expectedNull: 'null'},
    296                         {name: 'border', expectedNull: 'null'},
     296                        {name: 'border', expectedNull: ''},
    297297                        {name: 'useMap', expectedNull: 'null'},
    298298                    ]
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r203517 r203523  
     12016-07-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling for HTMLImageElement.border
     4        https://bugs.webkit.org/show_bug.cgi?id=160039
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Rebaseline W3C test now that more checks are passing.
     9
     10        * web-platform-tests/html/dom/reflection-embedded-expected.txt:
     11
    1122016-07-21  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt

    r203463 r203523  
    18511851PASS img.border: IDL set to "\0" followed by IDL get
    18521852PASS img.border: IDL set to null should not throw
    1853 FAIL img.border: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
    1854 FAIL img.border: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     1853PASS img.border: IDL set to null followed by getAttribute()
     1854PASS img.border: IDL set to null followed by IDL get
    18551855PASS img.border: IDL set to object "test-toString" should not throw
    18561856PASS img.border: IDL set to object "test-toString" followed by getAttribute()
  • trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt

    r203463 r203523  
    18511851PASS img.border: IDL set to "\0" followed by IDL get
    18521852PASS img.border: IDL set to null should not throw
    1853 FAIL img.border: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
    1854 FAIL img.border: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     1853PASS img.border: IDL set to null followed by getAttribute()
     1854PASS img.border: IDL set to null followed by IDL get
    18551855PASS img.border: IDL set to object "test-toString" should not throw
    18561856PASS img.border: IDL set to object "test-toString" followed by getAttribute()
  • trunk/Source/WebCore/ChangeLog

    r203522 r203523  
     12016-07-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling for HTMLImageElement.border
     4        https://bugs.webkit.org/show_bug.cgi?id=160039
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Fix null handling for HTMLImageElement.border to match the specification:
     9        - https://html.spec.whatwg.org/#HTMLImageElement-partial
     10
     11        We are supposed to treat null as the empty string.
     12
     13        Both Firefox and Chrome agree with the specification.
     14
     15        No new tests, rebaselined existing tests.
     16
     17        * html/HTMLImageElement.idl:
     18
    1192016-07-21  Daniel Bates  <dabates@apple.com>
    220
  • trunk/Source/WebCore/html/HTMLImageElement.idl

    r199539 r203523  
    2626    [Reflect] attribute DOMString align;
    2727    [Reflect] attribute DOMString alt;
    28     [Reflect] attribute DOMString border;
     28    [Reflect, TreatNullAs=EmptyString] attribute DOMString border;
    2929    attribute DOMString? crossOrigin;
    3030    attribute long height;
Note: See TracChangeset for help on using the changeset viewer.