Title: [127321] trunk
- Revision
- 127321
- Author
- [email protected]
- Date
- 2012-08-31 14:26:44 -0700 (Fri, 31 Aug 2012)
Log 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:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (127320 => 127321)
--- trunk/LayoutTests/ChangeLog 2012-08-31 21:24:55 UTC (rev 127320)
+++ trunk/LayoutTests/ChangeLog 2012-08-31 21:26:44 UTC (rev 127321)
@@ -1,3 +1,17 @@
+2012-08-31 Jon Lee <[email protected]>
+
+ ondisplay event handlers are not called
+ https://bugs.webkit.org/show_bug.cgi?id=95263
+ <rdar://problem/12193359>
+
+ Reviewed by Alexey Proskuryakov.
+
+ 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:
+
2012-08-31 Roger Fong <[email protected]>
Unreviewed. Adding passing test results for fast/canvas/canvas-strokeRect-alpha-shadow.
Modified: trunk/LayoutTests/http/tests/notifications/legacy/show-expected.txt (127320 => 127321)
--- trunk/LayoutTests/http/tests/notifications/legacy/show-expected.txt 2012-08-31 21:24:55 UTC (rev 127320)
+++ trunk/LayoutTests/http/tests/notifications/legacy/show-expected.txt 2012-08-31 21:26:44 UTC (rev 127321)
@@ -8,6 +8,7 @@
Granting permission to http://127.0.0.1:8000
PASS window.webkitNotifications.checkPermission() is 0
PASS ondisplay event handler was called
+PASS this.ondisplay is this.onshow
Denying permission to http://127.0.0.1:8000
PASS window.webkitNotifications.checkPermission() is 2
PASS window.webkitNotifications.createNotification('', 'title 3', 'body'); threw exception Error: SECURITY_ERR: DOM Exception 18.
Modified: trunk/LayoutTests/http/tests/notifications/legacy/show.html (127320 => 127321)
--- trunk/LayoutTests/http/tests/notifications/legacy/show.html 2012-08-31 21:24:55 UTC (rev 127320)
+++ trunk/LayoutTests/http/tests/notifications/legacy/show.html 2012-08-31 21:26:44 UTC (rev 127321)
@@ -22,8 +22,9 @@
shouldBe("window.webkitNotifications.checkPermission()", "0");
n = window.webkitNotifications.createNotification("", "title 2", "body");
- n._onshow_ = function() {
+ n._ondisplay_ = function() {
testPassed("ondisplay event handler was called");
+ shouldBe("this.ondisplay", "this.onshow");
setTimeout(part3, 0);
};
n._onerror_ = function() {
Modified: trunk/Source/WebCore/ChangeLog (127320 => 127321)
--- trunk/Source/WebCore/ChangeLog 2012-08-31 21:24:55 UTC (rev 127320)
+++ trunk/Source/WebCore/ChangeLog 2012-08-31 21:26:44 UTC (rev 127321)
@@ -1,3 +1,17 @@
+2012-08-31 Jon Lee <[email protected]>
+
+ ondisplay event handlers are not called
+ https://bugs.webkit.org/show_bug.cgi?id=95263
+ <rdar://problem/12193359>
+
+ Reviewed by Alexey Proskuryakov.
+
+ 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):
+
2012-08-31 Tony Chang <[email protected]>
Remove ENABLE_CSS3_FLEXBOX compile time flag
Modified: trunk/Source/WebCore/Modules/notifications/Notification.h (127320 => 127321)
--- trunk/Source/WebCore/Modules/notifications/Notification.h 2012-08-31 21:24:55 UTC (rev 127320)
+++ trunk/Source/WebCore/Modules/notifications/Notification.h 2012-08-31 21:26:44 UTC (rev 127321)
@@ -107,10 +107,11 @@
TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
- DEFINE_ATTRIBUTE_EVENT_LISTENER(show);
#if ENABLE(LEGACY_NOTIFICATIONS)
- DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
+ EventListener* ondisplay() { return getAttributeEventListener(eventNames().showEvent); }
+ void setOndisplay(PassRefPtr<EventListener> listener) { setAttributeEventListener(eventNames().showEvent, listener); }
#endif
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(show);
DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes