Changeset 129330 in webkit


Ignore:
Timestamp:
Sep 24, 2012 12:41:04 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Skeleton implementation of dialog.showModal()
https://bugs.webkit.org/show_bug.cgi?id=97425

Patch by Matt Falkenhagen <falken@chromium.org> on 2012-09-24
Reviewed by Kent Tamura.

Source/WebCore:

This adds a basic implementation of showModal(), so it later can be
used to test the top layer, once it is implemented. The main features
of showModal(), modality and the top layer, are not yet implemented.

Test: fast/dom/HTMLDialogElement/dialog-show-modal.html

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::showModal): The same as show(), but throws an error in the cases specified in the spec.
(WebCore):

  • html/HTMLDialogElement.h:

(HTMLDialogElement):

  • html/HTMLDialogElement.idl:

LayoutTests:

Add a test that showModal() opens the dialog or throws an error in the cases specified in the spec.

  • fast/dom/HTMLDialogElement/dialog-show-modal-expected.txt: Added.
  • fast/dom/HTMLDialogElement/dialog-show-modal.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r129317 r129330  
     12012-09-24  Matt Falkenhagen  <falken@chromium.org>
     2
     3        Skeleton implementation of dialog.showModal()
     4        https://bugs.webkit.org/show_bug.cgi?id=97425
     5
     6        Reviewed by Kent Tamura.
     7
     8        Add a test that showModal() opens the dialog or throws an error in the cases specified in the spec.
     9
     10        * fast/dom/HTMLDialogElement/dialog-show-modal-expected.txt: Added.
     11        * fast/dom/HTMLDialogElement/dialog-show-modal.html: Added.
     12
    1132012-09-23  Gavin Barraclough  <barraclough@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r129329 r129330  
     12012-09-24  Matt Falkenhagen  <falken@chromium.org>
     2
     3        Skeleton implementation of dialog.showModal()
     4        https://bugs.webkit.org/show_bug.cgi?id=97425
     5
     6        Reviewed by Kent Tamura.
     7
     8        This adds a basic implementation of showModal(), so it later can be
     9        used to test the top layer, once it is implemented. The main features
     10        of showModal(), modality and the top layer, are not yet implemented.
     11
     12        Test: fast/dom/HTMLDialogElement/dialog-show-modal.html
     13
     14        * html/HTMLDialogElement.cpp:
     15        (WebCore::HTMLDialogElement::showModal): The same as show(), but throws an error in the cases specified in the spec.
     16        (WebCore):
     17        * html/HTMLDialogElement.h:
     18        (HTMLDialogElement):
     19        * html/HTMLDialogElement.idl:
     20
    1212012-09-24  Ryuan Choi  <ryuan.choi@samsung.com>
    222
  • trunk/Source/WebCore/html/HTMLDialogElement.cpp

    r127681 r129330  
    6363}
    6464
     65void HTMLDialogElement::showModal(ExceptionCode& ec)
     66{
     67    if (fastHasAttribute(openAttr) || !inDocument()) {
     68        ec = INVALID_STATE_ERR;
     69        return;
     70    }
     71    setBooleanAttribute(openAttr, true);
     72}
     73
    6574bool HTMLDialogElement::isPresentationAttribute(const QualifiedName& name) const
    6675{
  • trunk/Source/WebCore/html/HTMLDialogElement.h

    r127681 r129330  
    4242    void close(ExceptionCode&);
    4343    void show();
     44    void showModal(ExceptionCode&);
    4445
    4546private:
  • trunk/Source/WebCore/html/HTMLDialogElement.idl

    r123193 r129330  
    3232        void close() raises(DOMException);
    3333        void show();
     34        void showModal() raises(DOMException);
    3435    };
    3536
Note: See TracChangeset for help on using the changeset viewer.