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

Changeset 203524 in webkit


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

Fix null handling for HTMLIFrameElement.marginWidth / marginHeight
​https://bugs.webkit.org/show_bug.cgi?id=160037

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 HTMLIFrameElement.marginWidth / marginHeight 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/HTMLIFrameElement.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

    r203523 r203524  
     12016-07-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling for HTMLIFrameElement.marginWidth / marginHeight
     4        https://bugs.webkit.org/show_bug.cgi?id=160037
     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  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt

    r203523 r203524  
    9898TEST SUCCEEDED: The value was the string 'null'. [tested HTMLIFrameElement.frameBorder]
    9999TEST SUCCEEDED: The value was the string 'null'. [tested HTMLIFrameElement.height]
    100 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLIFrameElement.marginHeight]
    101 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLIFrameElement.marginWidth]
     100TEST SUCCEEDED: The value was the empty string. [tested HTMLIFrameElement.marginHeight]
     101TEST SUCCEEDED: The value was the empty string. [tested HTMLIFrameElement.marginWidth]
    102102TEST SUCCEEDED: The value was the string 'null'. [tested HTMLIFrameElement.name]
    103103TEST SUCCEEDED: The value was the string 'null'. [tested HTMLIFrameElement.scrolling]
  • trunk/LayoutTests/fast/dom/element-attribute-js-null.html

    r203523 r203524  
    280280                        {name: 'frameBorder', expectedNull: 'null'},
    281281                        {name: 'height', expectedNull: 'null'},
    282                         {name: 'marginHeight', expectedNull: 'null'},
    283                         {name: 'marginWidth', expectedNull: 'null'},
     282                        {name: 'marginHeight', expectedNull: ''},
     283                        {name: 'marginWidth', expectedNull: ''},
    284284                        {name: 'name', expectedNull: 'null'},
    285285                        {name: 'scrolling', expectedNull: 'null'},
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r203523 r203524  
     12016-07-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix null handling for HTMLIFrameElement.marginWidth / marginHeight
     4        https://bugs.webkit.org/show_bug.cgi?id=160037
     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

    r203523 r203524  
    34003400PASS iframe.marginHeight: IDL set to "\0" followed by IDL get
    34013401PASS iframe.marginHeight: IDL set to null should not throw
    3402 FAIL iframe.marginHeight: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
    3403 FAIL iframe.marginHeight: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     3402PASS iframe.marginHeight: IDL set to null followed by getAttribute()
     3403PASS iframe.marginHeight: IDL set to null followed by IDL get
    34043404PASS iframe.marginHeight: IDL set to object "test-toString" should not throw
    34053405PASS iframe.marginHeight: IDL set to object "test-toString" followed by getAttribute()
    … …  
    34773477PASS iframe.marginWidth: IDL set to "\0" followed by IDL get
    34783478PASS iframe.marginWidth: IDL set to null should not throw
    3479 FAIL iframe.marginWidth: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
    3480 FAIL iframe.marginWidth: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     3479PASS iframe.marginWidth: IDL set to null followed by getAttribute()
     3480PASS iframe.marginWidth: IDL set to null followed by IDL get
    34813481PASS iframe.marginWidth: IDL set to object "test-toString" should not throw
    34823482PASS iframe.marginWidth: 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

    r203523 r203524  
    34003400PASS iframe.marginHeight: IDL set to "\0" followed by IDL get
    34013401PASS iframe.marginHeight: IDL set to null should not throw
    3402 FAIL iframe.marginHeight: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
    3403 FAIL iframe.marginHeight: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     3402PASS iframe.marginHeight: IDL set to null followed by getAttribute()
     3403PASS iframe.marginHeight: IDL set to null followed by IDL get
    34043404PASS iframe.marginHeight: IDL set to object "test-toString" should not throw
    34053405PASS iframe.marginHeight: IDL set to object "test-toString" followed by getAttribute()
    … …  
    34773477PASS iframe.marginWidth: IDL set to "\0" followed by IDL get
    34783478PASS iframe.marginWidth: IDL set to null should not throw
    3479 FAIL iframe.marginWidth: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
    3480 FAIL iframe.marginWidth: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     3479PASS iframe.marginWidth: IDL set to null followed by getAttribute()
     3480PASS iframe.marginWidth: IDL set to null followed by IDL get
    34813481PASS iframe.marginWidth: IDL set to object "test-toString" should not throw
    34823482PASS iframe.marginWidth: IDL set to object "test-toString" followed by getAttribute()
  • trunk/Source/WebCore/ChangeLog

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

    r196123 r203524  
    2424    [Reflect] attribute DOMString height;
    2525    [Reflect] attribute DOMString longDesc;
    26     [Reflect] attribute DOMString marginHeight;
    27     [Reflect] attribute DOMString marginWidth;
     26    [Reflect, TreatNullAs=EmptyString] attribute DOMString marginHeight;
     27    [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
    2828    [Reflect] attribute DOMString name;
    2929
Note: See TracChangeset for help on using the changeset viewer.