Changeset 127321 in webkit


Ignore:
Timestamp:
Aug 31, 2012 2:26:44 PM (12 years ago)
Author:
jonlee@apple.com
Message:

ondisplay event handlers are not called
https://bugs.webkit.org/show_bug.cgi?id=95263
<rdar://problem/12193359>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

To support the legacy API, we conflate ondisplay and onshow.

  • Modules/notifications/Notification.h:

(WebCore::Notification::ondisplay): Use display event as an alias for the show event.
(WebCore::Notification::setOndisplay):

LayoutTests:

Adjust the test to use the ondisplay handler, to fully test legacy API.

  • http/tests/notifications/legacy/show-expected.txt: Verify that event listener for ondisplay is

the same as that for onshow.

  • http/tests/notifications/legacy/show.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r127320 r127321  
     12012-08-31  Jon Lee  <jonlee@apple.com>
     2
     3        ondisplay event handlers are not called
     4        https://bugs.webkit.org/show_bug.cgi?id=95263
     5        <rdar://problem/12193359>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        Adjust the test to use the ondisplay handler, to fully test legacy API.
     10
     11        * http/tests/notifications/legacy/show-expected.txt: Verify that event listener for ondisplay is
     12        the same as that for onshow.
     13        * http/tests/notifications/legacy/show.html:
     14
    1152012-08-31  Roger Fong  <roger_fong@apple.com>
    216
  • trunk/LayoutTests/http/tests/notifications/legacy/show-expected.txt

    r127299 r127321  
    99PASS window.webkitNotifications.checkPermission() is 0
    1010PASS ondisplay event handler was called
     11PASS this.ondisplay is this.onshow
    1112Denying permission to http://127.0.0.1:8000
    1213PASS window.webkitNotifications.checkPermission() is 2
  • trunk/LayoutTests/http/tests/notifications/legacy/show.html

    r127299 r127321  
    2323
    2424        n = window.webkitNotifications.createNotification("", "title 2", "body");
    25         n.onshow = function() {
     25        n.ondisplay = function() {
    2626                testPassed("ondisplay event handler was called");
     27                shouldBe("this.ondisplay", "this.onshow");
    2728                setTimeout(part3, 0);
    2829        };
  • trunk/Source/WebCore/ChangeLog

    r127318 r127321  
     12012-08-31  Jon Lee  <jonlee@apple.com>
     2
     3        ondisplay event handlers are not called
     4        https://bugs.webkit.org/show_bug.cgi?id=95263
     5        <rdar://problem/12193359>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        To support the legacy API, we conflate ondisplay and onshow.
     10
     11        * Modules/notifications/Notification.h:
     12        (WebCore::Notification::ondisplay): Use display event as an alias for the show event.
     13        (WebCore::Notification::setOndisplay):
     14
    1152012-08-31  Tony Chang  <tony@chromium.org>
    216
  • trunk/Source/WebCore/Modules/notifications/Notification.h

    r125280 r127321  
    108108    TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
    109109
     110#if ENABLE(LEGACY_NOTIFICATIONS)
     111    EventListener* ondisplay() { return getAttributeEventListener(eventNames().showEvent); }
     112    void setOndisplay(PassRefPtr<EventListener> listener) { setAttributeEventListener(eventNames().showEvent, listener); }
     113#endif
    110114    DEFINE_ATTRIBUTE_EVENT_LISTENER(show);
    111 #if ENABLE(LEGACY_NOTIFICATIONS)
    112     DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
    113 #endif
    114115    DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
    115116    DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
Note: See TracChangeset for help on using the changeset viewer.