Changeset 130203 in webkit


Ignore:
Timestamp:
Oct 2, 2012, 1:35:47 PM (13 years ago)
Author:
arv@chromium.org
Message:

createHTMLDocument() should not create a title element if the title argument is left out
https://bugs.webkit.org/show_bug.cgi?id=96694

Reviewed by Darin Adler.

In case the argument is not passed to createHTMLDocument we use a null string and check
for that before creating a title element.

Source/WebCore:

Test: fast/dom/DOMImplementation/createHTMLDocument-optional-title.html

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createHTMLDocument):

  • dom/DOMImplementation.idl:

LayoutTests:

  • fast/dom/DOMImplementation/createHTMLDocument-optional-title-expected.txt: Added.
  • fast/dom/DOMImplementation/createHTMLDocument-optional-title.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r130202 r130203  
     12012-10-02  Erik Arvidsson  <arv@chromium.org>
     2
     3        createHTMLDocument() should not create a title element if the title argument is left out
     4        https://bugs.webkit.org/show_bug.cgi?id=96694
     5
     6        Reviewed by Darin Adler.
     7
     8        In case the argument is not passed to createHTMLDocument we use a null string and check
     9        for that before creating a title element.
     10
     11        * fast/dom/DOMImplementation/createHTMLDocument-optional-title-expected.txt: Added.
     12        * fast/dom/DOMImplementation/createHTMLDocument-optional-title.html: Added.
     13
    1142012-10-02  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r130199 r130203  
     12012-10-02  Erik Arvidsson  <arv@chromium.org>
     2
     3        createHTMLDocument() should not create a title element if the title argument is left out
     4        https://bugs.webkit.org/show_bug.cgi?id=96694
     5
     6        Reviewed by Darin Adler.
     7
     8        In case the argument is not passed to createHTMLDocument we use a null string and check
     9        for that before creating a title element.
     10
     11        Test: fast/dom/DOMImplementation/createHTMLDocument-optional-title.html
     12
     13        * dom/DOMImplementation.cpp:
     14        (WebCore::DOMImplementation::createHTMLDocument):
     15        * dom/DOMImplementation.idl:
     16
    1172012-10-02  David Grogan  <dgrogan@chromium.org>
    218
  • trunk/Source/WebCore/dom/DOMImplementation.cpp

    r129164 r130203  
    373373    d->open();
    374374    d->write("<!doctype html><html><body></body></html>");
    375     d->setTitle(title);
     375    if (!title.isNull())
     376        d->setTitle(title);
    376377    d->setSecurityOrigin(m_document->securityOrigin());
    377378    d->setContextFeatures(m_document->contextFeatures());
  • trunk/Source/WebCore/dom/DOMImplementation.idl

    r107304 r130203  
    5050        // HTMLDOMImplementation interface from DOM Level 2 HTML
    5151
    52         HTMLDocument createHTMLDocument(in [Optional=DefaultIsUndefined] DOMString title);
     52        HTMLDocument createHTMLDocument(in [Optional=DefaultIsNullString] DOMString title);
    5353    };
    5454
Note: See TracChangeset for help on using the changeset viewer.