Changeset 195336 in webkit


Ignore:
Timestamp:
Jan 19, 2016 8:06:27 PM (8 years ago)
Author:
Chris Dumez
Message:

DocumentType.publicId / systemId should never return null
https://bugs.webkit.org/show_bug.cgi?id=153264

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C DOM tests now that more checks are passing.

  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument-expected.txt:
  • web-platform-tests/dom/nodes/Node-properties-expected.txt:

Source/WebCore:

DocumentType.publicId / systemId should never return null as these
attributes are not nullable in the IDL:
https://dom.spec.whatwg.org/#interface-documenttype

Instead we should return the empty string. Firefox and Chrome match the
specification.

No new tests, already covered by existing tests.

  • dom/DocumentType.idl:

LayoutTests:

Drop outdated DOM test.

  • dom/xhtml/level3/core/documentgetdoctype01-expected.txt: Removed.
  • dom/xhtml/level3/core/documentgetdoctype01.js: Removed.
  • dom/xhtml/level3/core/documentgetdoctype01.xhtml: Removed.
Location:
trunk
Files:
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195334 r195336  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        DocumentType.publicId / systemId should never return null
     4        https://bugs.webkit.org/show_bug.cgi?id=153264
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Drop outdated DOM test.
     9
     10        * dom/xhtml/level3/core/documentgetdoctype01-expected.txt: Removed.
     11        * dom/xhtml/level3/core/documentgetdoctype01.js: Removed.
     12        * dom/xhtml/level3/core/documentgetdoctype01.xhtml: Removed.
     13
    1142016-01-19  Brady Eidson  <beidson@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r195322 r195336  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        DocumentType.publicId / systemId should never return null
     4        https://bugs.webkit.org/show_bug.cgi?id=153264
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Rebaseline several W3C DOM tests now that more checks are passing.
     9
     10        * web-platform-tests/dom/interfaces-expected.txt:
     11        * web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument-expected.txt:
     12        * web-platform-tests/dom/nodes/Node-properties-expected.txt:
     13
    1142016-01-19  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt

    r194580 r195336  
    815815PASS Stringification of document.doctype
    816816PASS DocumentType interface: document.doctype must inherit property "name" with the proper type (0)
    817 FAIL DocumentType interface: document.doctype must inherit property "publicId" with the proper type (1) assert_equals: expected "string" but got "object"
    818 FAIL DocumentType interface: document.doctype must inherit property "systemId" with the proper type (2) assert_equals: expected "string" but got "object"
     817PASS DocumentType interface: document.doctype must inherit property "publicId" with the proper type (1)
     818PASS DocumentType interface: document.doctype must inherit property "systemId" with the proper type (2)
    819819PASS DocumentType interface: document.doctype must inherit property "before" with the proper type (3)
    820820PASS DocumentType interface: calling before([object Object],[object Object]) on document.doctype with too few arguments must throw TypeError
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument-expected.txt

    r191379 r195336  
    11
    2 FAIL createHTMLDocument test 0: "","","" assert_equals: expected (string) "" but got (object) null
    3 FAIL createHTMLDocument test 1: null,"null","null" assert_equals: expected (string) "" but got (object) null
    4 FAIL createHTMLDocument test 2: undefined,undefined,"" assert_equals: expected (string) "" but got (object) null
    5 FAIL createHTMLDocument test 3: "foo  bar baz","foo  bar baz","foo bar baz" assert_equals: expected (string) "" but got (object) null
    6 FAIL createHTMLDocument test 4: "foo\t\tbar baz","foo\t\tbar baz","foo bar baz" assert_equals: expected (string) "" but got (object) null
    7 FAIL createHTMLDocument test 5: "foo\n\nbar baz","foo\n\nbar baz","foo bar baz" assert_equals: expected (string) "" but got (object) null
    8 FAIL createHTMLDocument test 6: "foo\f\fbar baz","foo\f\fbar baz","foo bar baz" assert_equals: expected (string) "" but got (object) null
    9 FAIL createHTMLDocument test 7: "foo\r\rbar baz","foo\r\rbar baz","foo bar baz" assert_equals: expected (string) "" but got (object) null
    10 FAIL Missing title argument assert_equals: expected (string) "" but got (object) null
     2FAIL createHTMLDocument test 0: "","","" assert_equals: expected 1 but got 0
     3PASS createHTMLDocument test 1: null,"null","null"
     4PASS createHTMLDocument test 2: undefined,undefined,""
     5PASS createHTMLDocument test 3: "foo  bar baz","foo  bar baz","foo bar baz"
     6PASS createHTMLDocument test 4: "foo\t\tbar baz","foo\t\tbar baz","foo bar baz"
     7PASS createHTMLDocument test 5: "foo\n\nbar baz","foo\n\nbar baz","foo bar baz"
     8PASS createHTMLDocument test 6: "foo\f\fbar baz","foo\f\fbar baz","foo bar baz"
     9PASS createHTMLDocument test 7: "foo\r\rbar baz","foo\r\rbar baz","foo bar baz"
     10PASS Missing title argument
    1111FAIL createHTMLDocument(): metadata assert_equals: expected "about:blank" but got ""
    1212FAIL createHTMLDocument(): characterSet aliases assert_equals: charset expected (string) "UTF-8" but got (undefined) undefined
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-properties-expected.txt

    r191379 r195336  
    532532PASS doctype.nextSibling
    533533PASS doctype.name
    534 FAIL doctype.publicId assert_equals: expected (string) "" but got (object) null
    535 FAIL doctype.systemId assert_equals: expected (string) "" but got (object) null
     534PASS doctype.publicId
     535PASS doctype.systemId
    536536PASS doctype.nodeName
    537537PASS doctype.childNodes.length
     
    548548PASS foreignDoctype.nextSibling
    549549PASS foreignDoctype.name
    550 FAIL foreignDoctype.publicId assert_equals: expected (string) "" but got (object) null
    551 FAIL foreignDoctype.systemId assert_equals: expected (string) "" but got (object) null
     550PASS foreignDoctype.publicId
     551PASS foreignDoctype.systemId
    552552PASS foreignDoctype.nodeName
    553553PASS foreignDoctype.childNodes.length
  • trunk/Source/WebCore/ChangeLog

    r195335 r195336  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        DocumentType.publicId / systemId should never return null
     4        https://bugs.webkit.org/show_bug.cgi?id=153264
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        DocumentType.publicId / systemId should never return null as these
     9        attributes are not nullable in the IDL:
     10        https://dom.spec.whatwg.org/#interface-documenttype
     11
     12        Instead we should return the empty string. Firefox and Chrome match the
     13        specification.
     14
     15        No new tests, already covered by existing tests.
     16
     17        * dom/DocumentType.idl:
     18
    1192016-01-19  Commit Queue  <commit-queue@webkit.org>
    220
  • trunk/Source/WebCore/dom/DocumentType.idl

    r195157 r195336  
    3434    // DOM Level 2
    3535
    36     [TreatReturnedNullStringAs=Null] readonly attribute DOMString publicId;
    37     [TreatReturnedNullStringAs=Null] readonly attribute DOMString systemId;
    38     [TreatReturnedNullStringAs=Null] readonly attribute DOMString internalSubset;       
     36    readonly attribute DOMString publicId;
     37    readonly attribute DOMString systemId;
     38    [TreatReturnedNullStringAs=Null] readonly attribute DOMString internalSubset;
    3939};
    4040
Note: See TracChangeset for help on using the changeset viewer.