Title: [110899] trunk/Source
Revision
110899
Author
[email protected]
Date
2012-03-15 15:44:02 -0700 (Thu, 15 Mar 2012)

Log Message

Deprecate ondisplay()
https://bugs.webkit.org/show_bug.cgi?id=80483
<rdar://problem/10912432>

Reviewed by Jian Li.

Source/WebCore:

The appropriate event listener for notifications is onshow().

* notifications/Notification.h: Wrap ondisplay in ENABLE(LEGACY_NOTIFICATIONS).
* notifications/Notification.idl: Wrap ondisplay in ENABLE_LEGACY_NOTIFICATIONS.

Source/WebKit/chromium:

* src/WebNotification.cpp:
(WebKit::WebNotification::dispatchDisplayEvent): Dispatch the show event.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110898 => 110899)


--- trunk/Source/WebCore/ChangeLog	2012-03-15 22:31:33 UTC (rev 110898)
+++ trunk/Source/WebCore/ChangeLog	2012-03-15 22:44:02 UTC (rev 110899)
@@ -1,3 +1,16 @@
+2012-03-13  Jon Lee  <[email protected]>
+
+        Deprecate ondisplay()
+        https://bugs.webkit.org/show_bug.cgi?id=80483
+        <rdar://problem/10912432>
+
+        Reviewed by Jian Li.
+
+        The appropriate event listener for notifications is onshow().
+
+        * notifications/Notification.h: Wrap ondisplay in ENABLE(LEGACY_NOTIFICATIONS).
+        * notifications/Notification.idl: Wrap ondisplay in ENABLE_LEGACY_NOTIFICATIONS.
+
 2012-03-14  W. James MacLean  <[email protected]>
 
         [chromium] Wire up PlatformGestureCurves for CC, ScrollAnimatorNone.

Modified: trunk/Source/WebCore/notifications/Notification.h (110898 => 110899)


--- trunk/Source/WebCore/notifications/Notification.h	2012-03-15 22:31:33 UTC (rev 110898)
+++ trunk/Source/WebCore/notifications/Notification.h	2012-03-15 22:44:02 UTC (rev 110899)
@@ -89,9 +89,9 @@
     TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
 
     DEFINE_ATTRIBUTE_EVENT_LISTENER(show);
-    // FIXME: The latest Web Notifications standard uses the onshow event listener.
-    // The ondisplay event listener should be removed when implementations change the event listener to onshow.
+#if ENABLE(LEGACY_NOTIFICATIONS)
     DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
+#endif
     DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(click);

Modified: trunk/Source/WebCore/notifications/Notification.idl (110898 => 110899)


--- trunk/Source/WebCore/notifications/Notification.idl	2012-03-15 22:31:33 UTC (rev 110898)
+++ trunk/Source/WebCore/notifications/Notification.idl	2012-03-15 22:44:02 UTC (rev 110899)
@@ -41,9 +41,9 @@
         void cancel();
 
         attribute EventListener onshow;
-        // FIXME: The latest Web Notifications standard uses the onshow event listener.
-        // The ondisplay event listener should be removed when implementations change the event listener to onshow.
+#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
         attribute EventListener ondisplay;
+#endif
         attribute EventListener onerror;
         attribute EventListener onclose;
         attribute EventListener onclick;

Modified: trunk/Source/WebKit/chromium/ChangeLog (110898 => 110899)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-15 22:31:33 UTC (rev 110898)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-15 22:44:02 UTC (rev 110899)
@@ -1,3 +1,14 @@
+2012-03-13  Jon Lee  <[email protected]>
+
+        Deprecate ondisplay()
+        https://bugs.webkit.org/show_bug.cgi?id=80483
+        <rdar://problem/10912432>
+
+        Reviewed by Jian Li.
+
+        * src/WebNotification.cpp:
+        (WebKit::WebNotification::dispatchDisplayEvent): Dispatch the show event.
+
 2012-03-14  W. James MacLean  <[email protected]>
 
         [chromium] Wire up PlatformGestureCurves for CC, ScrollAnimatorNone.

Modified: trunk/Source/WebKit/chromium/src/WebNotification.cpp (110898 => 110899)


--- trunk/Source/WebKit/chromium/src/WebNotification.cpp	2012-03-15 22:31:33 UTC (rev 110898)
+++ trunk/Source/WebKit/chromium/src/WebNotification.cpp	2012-03-15 22:44:02 UTC (rev 110899)
@@ -116,7 +116,10 @@
 
 void WebNotification::dispatchDisplayEvent()
 {
+#if ENABLE(LEGACY_NOTIFICATIONS)
     dispatchEvent("display");
+#endif
+    dispatchEvent("show");
 }
 
 void WebNotification::dispatchErrorEvent(const WebKit::WebString& /* errorMessage */)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to