[webkit-reviews] review denied: [Bug 25463] Desktop Notifications API : [Attachment 32344] Notifications API, Core & JSC Bindings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 20 21:41:41 PDT 2009


Maciej Stachowiak <mjs at apple.com> has denied John Gregg <johnnyg at google.com>'s
request for review:
Bug 25463: Desktop Notifications API
https://bugs.webkit.org/show_bug.cgi?id=25463

Attachment 32344: Notifications API, Core & JSC Bindings
https://bugs.webkit.org/attachment.cgi?id=32344&action=review

------- Additional Comments from Maciej Stachowiak <mjs at apple.com>
This is looking much better! I still have some comments that I think need
addressing. The main substantive issue is the dispatch logic still being buggy
in various ways, and I also think there is a lot of unnecessary use of custom
bindings which could be manual. r- to address remaining issues. I suggested
test case ideas that could verify correctness of event dispatch logic. I'd also
be happy to help further by email or IRC, or I could even try to make full test
cases showing the bugs if my descriptions are too vague. r- for remaining
issues.

> Index: JavaScriptCore/ChangeLog
> ===================================================================
> --- JavaScriptCore/ChangeLog	(revision 45576)
> +++ JavaScriptCore/ChangeLog	(working copy)
> @@ -1,3 +1,15 @@
> +2009-07-06  John Gregg  <johnnyg at google.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Desktop Notifications API
> +	   https://bugs.webkit.org/show_bug.cgi?id=25463
> +
> +	   Adds ENABLE_NOTIFICATION flag.
> +
> +	   * Configurations/FeatureDefines.xcconfig:
> +	   * wtf/Platform.h:
> +
>  2009-07-06  Ada Chan  <adachan at apple.com>
>  
>	   Reviewed by Darin Adler and Mark Rowe.
> Index: JavaScriptCore/Configurations/FeatureDefines.xcconfig
> ===================================================================
> --- JavaScriptCore/Configurations/FeatureDefines.xcconfig	(revision
45574)
> +++ JavaScriptCore/Configurations/FeatureDefines.xcconfig	(working copy)
> @@ -37,6 +37,7 @@ ENABLE_FILTERS = ;
>  ENABLE_GEOLOCATION = ;
>  ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
>  ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
> +ENABLE_NOTIFICATIONS = ;
>  ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
>  ENABLE_SVG = ENABLE_SVG;
>  ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION;
> @@ -51,4 +52,4 @@ ENABLE_WORKERS = ENABLE_WORKERS;
>  ENABLE_XPATH = ENABLE_XPATH;
>  ENABLE_XSLT = ENABLE_XSLT;
>  
> -FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING)
$(ENABLE_DATABASE) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS)
$(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER)
$(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION)
$(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS)
$(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WML)
$(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
> +FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING)
$(ENABLE_DATABASE) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS)
$(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER)
$(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG)
$(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS)
$(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE)
$(ENABLE_VIDEO) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);

> Index: JavaScriptCore/wtf/Platform.h
> ===================================================================
> --- JavaScriptCore/wtf/Platform.h	(revision 45574)
> +++ JavaScriptCore/wtf/Platform.h	(working copy)
> @@ -514,6 +514,10 @@
>  #define ENABLE_GEOLOCATION 0
>  #endif
>  
> +#if !defined(ENABLE_NOTIFICATIONS)
> +#define ENABLE_NOTIFICATIONS 0
> +#endif
> +
>  #if !defined(ENABLE_TEXT_CARET)
>  #define ENABLE_TEXT_CARET 1
>  #endif
> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog (revision 45576)
> +++ WebCore/ChangeLog (working copy)
> @@ -1,3 +1,105 @@
> +2009-07-06  John Gregg  <johnnyg at google.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Desktop Notifications API
> +	   https://bugs.webkit.org/show_bug.cgi?id=25463
> +
> +	   Adds an implementation of desktop notifications, behind the
compile-time
> +	   flag ENABLE(NOTIFICATIONS).	This code simply relays calls on the
JavaScript
> +	   API through a NotificationProvider interface, which must provide the
services
> +	   to actually notify the user and manage the desktop.	This provider
is injected
> +	   into WebKit through the ChromeClient for normal page contexts and
through the
> +	   WorkerThread for worker contexts.
> +
> +	   A permissions API is defined on a per-origin basis, which allows a
web page
> +	   to check if its origin is allowed to show desktop notifications, and
to request
> +	   permission for its origin.
> +
> +	   * Configurations/FeatureDefines.xcconfig:
> +	   * DerivedSources.cpp:
> +	   * DerivedSources.make:
> +	   * GNUmakefile.am:
> +	   * WebCore.vcproj/WebCore.vcproj:
> +	   * WebCore.vcproj/WebCoreCommon.vsprops:
> +	   * WebCore.xcodeproj/project.pbxproj:
> +	   * bindings/js/JSDOMWindowCustom.cpp:
> +	   (WebCore::JSDOMWindow::notifications):
> +	   * bindings/js/JSDesktopNotificationsCustom.cpp: Added.
> +	   (WebCore::JSNotificationCenter::createHTMLNotification):
> +	   (WebCore::JSNotificationCenter::createNotification):
> +	   (WebCore::JSNotificationCenter::checkPermission):
> +	   (WebCore::JSNotificationCenter::requestPermission):
> +	   * loader/EmptyClients.h:
> +	   (WebCore::EmptyChromeClient::notificationProvider):
> +	   * notifications: Added.
> +	   * notifications/Notification.cpp: Added.
> +	   (WebCore::Notification::Notification):
> +	   (WebCore::Notification::~Notification):
> +	   (WebCore::Notification::show):
> +	   (WebCore::Notification::cancel):
> +	   (WebCore::Notification::dispatchDisplayEvent):
> +	   (WebCore::Notification::dispatchErrorEvent):
> +	   (WebCore::Notification::dispatchCloseEvent):
> +	   (WebCore::Notification::addEventListener):
> +	   (WebCore::Notification::removeEventListener):
> +	   (WebCore::Notification::dispatchEvent):
> +	   (WebCore::Notification::display):
> +	   (WebCore::Notification::error):
> +	   (WebCore::Notification::close):
> +	   * notifications/Notification.h: Added.
> +	   (WebCore::Notification::create):
> +	   (WebCore::Notification::isHTML):
> +	   (WebCore::Notification::url):
> +	   (WebCore::Notification::contents):
> +	   (WebCore::Notification::ondisplay):
> +	   (WebCore::Notification::setOndisplay):
> +	   (WebCore::Notification::onerror):
> +	   (WebCore::Notification::setOnerror):
> +	   (WebCore::Notification::onclose):
> +	   (WebCore::Notification::setOnclose):
> +	   (WebCore::Notification::scriptExecutionContext):
> +	   (WebCore::Notification::refEventTarget):
> +	   (WebCore::Notification::derefEventTarget):
> +	   * notifications/Notification.idl: Added.
> +	   * notifications/NotificationCenter.cpp: Added.
> +	   (WebCore::NotificationCenter::NotificationCenter):
> +	   (WebCore::NotificationCenter::checkPermission):
> +	   (WebCore::NotificationCenter::requestPermission):
> +	   * notifications/NotificationCenter.h: Added.
> +	   (WebCore::NotificationCenter::create):
> +	   (WebCore::NotificationCenter::createHTMLNotification):
> +	   (WebCore::NotificationCenter::createNotification):
> +	   (WebCore::NotificationCenter::context):
> +	   (WebCore::NotificationCenter::provider):
> +	   * notifications/NotificationCenter.idl: Added.
> +	   * notifications/NotificationContents.h: Added.
> +	   (WebCore::NotificationContents::NotificationContents):
> +	   (WebCore::NotificationContents::icon):
> +	   (WebCore::NotificationContents::title):
> +	   (WebCore::NotificationContents::body):
> +	   * notifications/NotificationProvider.h: Added.
> +	   (WebCore::NotificationProvider::):
> +	   (WebCore::NotificationProvider::~NotificationProvider):
> +	   * page/Chrome.cpp:
> +	   (WebCore::Chrome::notificationProvider):
> +	   * page/Chrome.h:
> +	   * page/ChromeClient.h:
> +	   * page/DOMWindow.cpp:
> +	   (WebCore::DOMWindow::clear):
> +	   (WebCore::DOMWindow::webkitNotifications):
> +	   * page/DOMWindow.h:
> +	   * page/DOMWindow.idl:
> +	   * page/Page.h:
> +	   * workers/WorkerContext.cpp:
> +	   (WebCore::WorkerContext::~WorkerContext):
> +	   (WebCore::WorkerContext::webkitNotifications):
> +	   * workers/WorkerContext.h:
> +	   * workers/WorkerContext.idl:
> +	   * workers/WorkerThread.h:
> +	   (WebCore::WorkerThread::getNotificationProvider):
> +	   (WebCore::WorkerThread::setNotificationProvider):
> +
>  2009-07-06  Eric Carlson  <eric.carlson at apple.com>
>  
>	   Reviewed by Simon Fraser.
> Index: WebCore/DerivedSources.cpp
> ===================================================================
> --- WebCore/DerivedSources.cpp	(revision 45574)
> +++ WebCore/DerivedSources.cpp	(working copy)
> @@ -162,6 +162,8 @@
>  #include "JSNodeIterator.cpp"
>  #include "JSNodeList.cpp"
>  #include "JSNotation.cpp"
> +#include "JSNotificationCenter.cpp"
> +#include "JSNotification.cpp"
>  #include "JSOverflowEvent.cpp"
>  #include "JSPlugin.cpp"
>  #include "JSPluginArray.cpp"
> Index: WebCore/DerivedSources.make
> ===================================================================
> --- WebCore/DerivedSources.make	(revision 45574)
> +++ WebCore/DerivedSources.make	(working copy)
> @@ -34,6 +34,7 @@ VPATH = \
>      $(WebCore)/html \
>      $(WebCore)/inspector \
>      $(WebCore)/loader/appcache \
> +    $(WebCore)/notifications \
>      $(WebCore)/page \
>      $(WebCore)/plugins \
>      $(WebCore)/storage \
> @@ -188,6 +189,8 @@ DOM_CLASSES = \
>      NodeIterator \
>      NodeList \
>      Notation \
> +    Notification \
> +    NotificationCenter \
>      OverflowEvent \
>      Plugin \
>      PluginArray \
> @@ -678,7 +681,7 @@ endif
>  # JavaScript bindings
>  
>  GENERATE_BINDINGS = perl -I $(WebCore)/bindings/scripts
$(WebCore)/bindings/scripts/generate-bindings.pl \
> -    --include dom --include html --include css --include page --include xml
--include svg --outputDir .
> +    --include dom --include html --include css --include page --include
notifications --include xml --include svg --outputDir .
>  
>  GENERATE_BINDINGS_SCRIPTS = \
>      bindings/scripts/CodeGenerator.pm \
> Index: WebCore/GNUmakefile.am
> ===================================================================
> --- WebCore/GNUmakefile.am	(revision 45574)
> +++ WebCore/GNUmakefile.am	(working copy)
> @@ -25,6 +25,7 @@ webcore_cppflags += \
>	-I$(srcdir)/WebCore/loader/appcache \
>	-I$(srcdir)/WebCore/loader/archive \
>	-I$(srcdir)/WebCore/loader/icon \
> +	-I$(srcdir)/WebCore/notifications \
>	-I$(srcdir)/WebCore/page \
>	-I$(srcdir)/WebCore/page/animation \
>	-I$(srcdir)/WebCore/platform \
> @@ -231,6 +232,8 @@ IDL_BINDINGS += \
>	WebCore/html/VoidCallback.idl \
>	WebCore/inspector/JavaScriptCallFrame.idl \
>	WebCore/inspector/InspectorController.idl \
> +	WebCore/notifications/Notification.idl \
> +	WebCore/notifications/NotificationCenter.idl \
>	WebCore/page/BarInfo.idl \
>	WebCore/page/Console.idl \
>	WebCore/page/Coordinates.idl \
> @@ -2428,6 +2431,24 @@ webcoregtk_sources += \
>	WebCore/platform/gtk/GeolocationServiceGtk.h
>  endif # END ENABLE_GEOLOCATION
>  
> +# ----
> +# Notifications support
> +# ----
> +if ENABLE_NOTIFICATIONS
> +FEATURE_DEFINES_JAVASCRIPT += ENABLE_NOTIFICATIONS=1
> +
> +webcore_cppflags += \
> +	-DENABLE_NOTIFICATIONS=1
> +
> +webcore_sources += \
> +	WebCore/notifications/Notification.cpp \
> +	WebCore/notifications/Notification.h \
> +	WebCore/notifications/NotificationCenter.cpp \
> +	WebCore/notifications/NotificationCenter.h \
> +	WebCore/notifications/NotificationProvider.h \
> +	WebCore/notifications/NotificationContents.h
> +
> +endif # END ENABLE_NOTIFICATIONS
>  
>  # ----
>  # SVG Support
> Index: WebCore/Configurations/FeatureDefines.xcconfig
> ===================================================================
> --- WebCore/Configurations/FeatureDefines.xcconfig	(revision 45574)
> +++ WebCore/Configurations/FeatureDefines.xcconfig	(working copy)
> @@ -38,6 +38,7 @@ ENABLE_FILTERS = ;
>  ENABLE_GEOLOCATION = ;
>  ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
>  ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
> +ENABLE_NOTIFICATIONS = ;
>  ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
>  ENABLE_SVG = ENABLE_SVG;
>  ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION;
> @@ -52,4 +53,5 @@ ENABLE_WORKERS = ENABLE_WORKERS;
>  ENABLE_XPATH = ENABLE_XPATH;
>  ENABLE_XSLT = ENABLE_XSLT;
>  
> -FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING)
$(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS)
$(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER)
$(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION)
$(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS)
$(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WML)
$(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
> +FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING)
$(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS)
$(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER)
$(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG)
$(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS)
$(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE)
$(ENABLE_VIDEO) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);

> +
> Index: WebCore/WebCore.vcproj/WebCore.vcproj
> ===================================================================
> --- WebCore/WebCore.vcproj/WebCore.vcproj	(revision 45574)
> +++ WebCore/WebCore.vcproj/WebCore.vcproj	(working copy)
> @@ -67,7 +67,7 @@
>			/>
>			<Tool
>				Name="VCPostBuildEventTool"
> -				CommandLine="mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkd
ir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;
&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#
x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&
#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0
A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0
A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;
&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0
A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A
;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x
0D;&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot
;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\accessibility\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\accessibility\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\inspector\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\appcache\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\archive\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\archive\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\icon\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\history\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\history\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\html\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\css\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\animation\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\text\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\network\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\network\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\network\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\sql\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\bindings\js\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\page\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\page\animation\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\page\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\bridge\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\plugins\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\plugins\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\rendering\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\rendering\style\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\editing\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\dom\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\xml\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\svg\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\storage\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\workers\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;
&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#
x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&
#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0
A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0
A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;
&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0
A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A
;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x
0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot
;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy
/y /d /s /exclude:xcopy.excludes
&quot;$(ProjectDir)\..\inspector\front-end\*&quot;
&quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir
2&gt;NUL
&quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy
/y /d /s /exclude:xcopy.excludes
&quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot;
&quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&
#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del
&quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
> +				CommandLine="mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkd
ir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;
&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#
x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&
#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0
A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0
A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;
&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0
A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A
;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x
0D;&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot
;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\accessibility\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\accessibility\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\inspector\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\appcache\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\archive\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\archive\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\loader\icon\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\history\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\history\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\html\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\notifications\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\css\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\animation\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\text\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\network\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\network\cf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\network\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\sql\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\bindings\js\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\page\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\page\animation\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\page\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\bridge\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\plugins\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\plugins\win\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\rendering\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\rendering\style\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\editing\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\dom\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\xml\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\svg\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\storage\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)..\workers\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;
&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#
x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&
#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0
A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0
A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;
&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0
A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A
;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x
0D;&#x0A;xcopy /y /d
&quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot;
&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot
;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL
&quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy
/y /d /s /exclude:xcopy.excludes
&quot;$(ProjectDir)\..\inspector\front-end\*&quot;
&quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir
2&gt;NUL
&quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy
/y /d /s /exclude:xcopy.excludes
&quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot;
&quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&
#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del
&quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
>			/>
>		</Configuration>
>		<Configuration
> @@ -7190,6 +7190,102 @@
>				>
>			</File>
>			<File
> +			       
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotificati
on.cpp"
> +				>
> +				<FileConfiguration
> +					Name="Debug|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Release|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Debug_Internal|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Debug_Cairo|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Release_Cairo|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +			</File>
> +			<File
> +			       
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotificati
on.h"
> +				>
> +			</File>
> +			<File
> +			       
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotificati
onCenter.cpp"
> +				>
> +				<FileConfiguration
> +					Name="Debug|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Release|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Debug_Internal|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Debug_Cairo|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +				<FileConfiguration
> +					Name="Release_Cairo|Win32"
> +					ExcludedFromBuild="true"
> +					>
> +					<Tool
> +						Name="VCCLCompilerTool"
> +					/>
> +				</FileConfiguration>
> +			</File>
> +			<File
> +			       
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotificati
onCenter.h"
> +				>
> +			</File>
> +			<File
>			       
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSOverflowEv
ent.cpp"
>				>
>				<FileConfiguration
> @@ -23832,6 +23928,34 @@
>			</File>
>		</Filter>
>		<Filter
> +			Name="notifications"
> +			>
> +			<File
> +			       
RelativePath="..\notifications\Notification.cpp"
> +				>
> +			</File>
> +			<File
> +				RelativePath="..\notifications\Notification.h"
> +				>
> +			</File>
> +			<File
> +			       
RelativePath="..\notifications\NotificationCenter.cpp"
> +				>
> +			</File>
> +			<File
> +			       
RelativePath="..\notifications\NotificationCenter.h"
> +				>
> +			</File>
> +			<File
> +			       
RelativePath="..\notifications\NotificationContents.h"
> +				>
> +			</File>
> +			<File
> +			       
RelativePath="..\notifications\NotificationProvider.h"
> +				>
> +			</File>
> +		</Filter>
> +		<Filter
>			Name="editing"
>			>
>			<File
> @@ -28066,6 +28190,10 @@
>					>
>				</File>
>				<File
> +				       
RelativePath="..\bindings\js\JSDesktopNotificationsCustom.cpp"
> +					>
> +				</File>
> +				<File
>				       
RelativePath="..\bindings\js\JSDocumentCustom.cpp"
>					>
>				</File>
> Index: WebCore/WebCore.vcproj/WebCoreCommon.vsprops
> ===================================================================
> --- WebCore/WebCore.vcproj/WebCoreCommon.vsprops	(revision 45574)
> +++ WebCore/WebCore.vcproj/WebCoreCommon.vsprops	(working copy)
> @@ -7,7 +7,7 @@
>	>
>	<Tool
>		Name="VCCLCompilerTool"
> -	       
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir).
.&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessi
bility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridg
e\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&
quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot
;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot
;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(
ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectD
ir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectD
ir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;
$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(Proj
ectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(Pro
jectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;
$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&qu
ot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\networ
k\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platf
orm\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot
;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platf
orm\text&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(Projec
tDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&qu
ot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;
$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&q
uot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(Pr
ojectDir)..\storage&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOut
putDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&qu
ot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&
quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)
\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$
(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\J
avaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompa
tibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCom
patibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)..\svg\animation&qu
ot;"
> +	       
AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir).
.&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessi
bility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridg
e\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&
quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\rendering&quot;;
&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings\js&q
uot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&q
uot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(Proj
ectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir
)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(Pr
ojectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&qu
ot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;
$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(Pro
jectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&q
uot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&q
uot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\pla
tform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir
)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\tr
ansforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\
platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutpu
tDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quo
t;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&q
uot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;
&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(Pro
jectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitO
utputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&
quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\inc
lude\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLi
brariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&q
uot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLib
rariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitL
ibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&qu
ot;;&quot;$(ProjectDir)..\svg\animation&quot;"
>	       
PreprocessorDefinitions="__WIN32__;WEBCORE_CONTEXT_MENUS;ENABLE_DATABASE;ENABLE
_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATION
S;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_S
VG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
>		UsePrecompiledHeader="2"
>		PrecompiledHeaderThrough="WebCorePrefix.h"
> Index: WebCore/WebCore.xcodeproj/project.pbxproj
> ===================================================================
> --- WebCore/WebCore.xcodeproj/project.pbxproj (revision 45574)
> +++ WebCore/WebCore.xcodeproj/project.pbxproj (working copy)
> @@ -614,6 +614,10 @@
>		31C0FF4C0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.h in
Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF460E4CEFDD007D6FE5 /*
DOMWebKitTransitionEvent.h */; };
>		31C0FF4D0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm in
Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF470E4CEFDD007D6FE5 /*
DOMWebKitTransitionEvent.mm */; };
>		31C0FF4E0E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h
in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF480E4CEFDD007D6FE5 /*
DOMWebKitTransitionEventInternal.h */; };
> +		3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources
*/ = {isa = PBXBuildFile; fileRef = 3390CA510FFC157B00921962 /*
NotificationCenter.cpp */; };
> +		3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */
= {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /*
NotificationCenter.h */; };
> +		3390CA570FFC157B00921962 /* NotificationCenter.idl in Resources
*/ = {isa = PBXBuildFile; fileRef = 3390CA530FFC157B00921962 /*
NotificationCenter.idl */; };
> +		3390CA580FFC157B00921962 /* NotificationContents.h in Headers
*/ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /*
NotificationContents.h */; };
>		371F4F400D25B9AF00ECE0D5 /* FontData.h in Headers */ = {isa =
PBXBuildFile; fileRef = 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */; settings =
{ATTRIBUTES = (Private, ); }; };
>		371F4F410D25B9AF00ECE0D5 /* FontData.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */; };
>		371F4FFC0D25E7F300ECE0D5 /* SegmentedFontData.h in Headers */ =
{isa = PBXBuildFile; fileRef = 371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h
*/; };
> @@ -5542,6 +5546,14 @@
>		31C0FF460E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.h */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = DOMWebKitTransitionEvent.h; sourceTree = "<group>"; };
>		31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */ =
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.cpp.objcpp; path = DOMWebKitTransitionEvent.mm; sourceTree =
"<group>"; };
>		31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
sourcecode.c.h; path = DOMWebKitTransitionEventInternal.h; sourceTree =
"<group>"; };
> +		333F704E0FB49CA2008E12A6 /* Notification.idl */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name =
Notification.idl; path = notifications/Notification.idl; sourceTree =
"<group>"; };
> +		333F704F0FB49CA2008E12A6 /* Notification.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name =
Notification.h; path = notifications/Notification.h; sourceTree = "<group>"; };

> +		333F70500FB49CA2008E12A6 /* Notification.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
name = Notification.cpp; path = notifications/Notification.cpp; sourceTree =
"<group>"; };
> +		333F70510FB49CA2008E12A6 /* NotificationProvider.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name =
NotificationProvider.h; path = notifications/NotificationProvider.h; sourceTree
= "<group>"; };
> +		3390CA510FFC157B00921962 /* NotificationCenter.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
name = NotificationCenter.cpp; path = notifications/NotificationCenter.cpp;
sourceTree = "<group>"; };
> +		3390CA520FFC157B00921962 /* NotificationCenter.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name =
NotificationCenter.h; path = notifications/NotificationCenter.h; sourceTree =
"<group>"; };
> +		3390CA530FFC157B00921962 /* NotificationCenter.idl */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name =
NotificationCenter.idl; path = notifications/NotificationCenter.idl; sourceTree
= "<group>"; };
> +		3390CA540FFC157B00921962 /* NotificationContents.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name =
NotificationContents.h; path = notifications/NotificationContents.h; sourceTree
= "<group>"; };
>		371F4F3E0D25B9AF00ECE0D5 /* FontData.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
FontData.h; sourceTree = "<group>"; };
>		371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
path = FontData.cpp; sourceTree = "<group>"; };
>		371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SegmentedFontData.h; sourceTree = "<group>"; };
> @@ -9414,6 +9426,7 @@
>				93EEC1EC09C2877700C515D1 /* html */,
>				1C81B94D0E9732D900266E07 /* inspector */,
>				BCB16BFB0979C38700467741 /* loader */,
> +				333F703D0FB49C16008E12A6 /* notifications */,
>				65BF02180974806300C43196 /* page */,
>				BCF1A5BA097832090061A123 /* platform */,
>				5DCF83690D59157800953BC6 /* plugins */,
> @@ -9884,6 +9897,21 @@
>			name = animation;
>			sourceTree = "<group>";
>		};
> +		333F703D0FB49C16008E12A6 /* notifications */ = {
> +			isa = PBXGroup;
> +			children = (
> +				3390CA510FFC157B00921962 /*
NotificationCenter.cpp */,
> +				3390CA520FFC157B00921962 /*
NotificationCenter.h */,
> +				3390CA530FFC157B00921962 /*
NotificationCenter.idl */,
> +				3390CA540FFC157B00921962 /*
NotificationContents.h */,
> +				333F704E0FB49CA2008E12A6 /* Notification.idl
*/,
> +				333F704F0FB49CA2008E12A6 /* Notification.h */,
> +				333F70500FB49CA2008E12A6 /* Notification.cpp
*/,
> +				333F70510FB49CA2008E12A6 /*
NotificationProvider.h */,
> +			);
> +			name = notifications;
> +			sourceTree = "<group>";
> +		};
>		449195900FBE175B00D9F824 /* Exports */ = {
>			isa = PBXGroup;
>			children = (
> @@ -16917,6 +16945,8 @@
>				BC77D16C0FF19F560070887B /*
JSDataGridColumnList.h in Headers */,
>				BCBCAE370FF19385000762AE /*
DataGridDataSource.h in Headers */,
>				BCBCAE3D0FF19399000762AE /*
JSDataGridDataSource.h in Headers */,
> +				3390CA560FFC157B00921962 /*
NotificationCenter.h in Headers */,
> +				3390CA580FFC157B00921962 /*
NotificationContents.h in Headers */,
>				C50D0E830FF4272900AC2644 /* StorageNamespace.h
in Headers */,
>				BC7DAAEF0FF9615D00CE0138 /*
DOMDataGridDataSource.h in Headers */,
>				B5A684220FFABE9800D24689 /* SQLiteFileSystem.h
in Headers */,
> @@ -17028,6 +17058,7 @@
>				BC77CDA30FEFEB530070887B /*
HTMLDataGridCellElement.idl in Resources */,
>				BC77CF990FF172420070887B /*
DataGridColumnList.idl in Resources */,
>				BC77CF9F0FF172B30070887B /* DataGridColumn.idl
in Resources */,
> +				3390CA570FFC157B00921962 /*
NotificationCenter.idl in Resources */,
>			);
>			runOnlyForDeploymentPostprocessing = 0;
>		};
> @@ -18932,6 +18963,7 @@
>				BCBCAE540FF1A29E000762AE /*
JSHTMLDataGridElementCustom.cpp in Sources */,
>				BC77D1FD0FF28D9B0070887B /*
DataGridColumnList.cpp in Sources */,
>				BC77D2390FF298080070887B /* DataGridColumn.cpp
in Sources */,
> +				3390CA550FFC157B00921962 /*
NotificationCenter.cpp in Sources */,
>				C50D0E820FF4272900AC2644 /*
StorageNamespace.cpp in Sources */,
>				BC7DAAEE0FF9615D00CE0138 /*
DOMDataGridDataSource.cpp in Sources */,
>				B5A684240FFABEAA00D24689 /*
SQLiteFileSystem.cpp in Sources */,
> Index: WebCore/bindings/js/JSDOMWindowCustom.cpp
> ===================================================================
> --- WebCore/bindings/js/JSDOMWindowCustom.cpp (revision 45574)
> +++ WebCore/bindings/js/JSDOMWindowCustom.cpp (working copy)
> @@ -44,6 +44,7 @@
>  #include "JSLocation.h"
>  #include "JSMessageChannelConstructor.h"
>  #include "JSMessagePort.h"
> +#include "JSNotificationCenter.h"
>  #include "JSOptionConstructor.h"
>  #include "JSWebKitCSSMatrixConstructor.h"
>  #include "JSWebKitPointConstructor.h"
> @@ -53,6 +54,7 @@
>  #include "Location.h"
>  #include "MediaPlayer.h"
>  #include "MessagePort.h"
> +#include "NotificationCenter.h"
>  #include "Page.h"
>  #include "PlatformScreen.h"
>  #include "RegisteredEventListener.h"
> @@ -374,6 +376,19 @@ JSValue JSDOMWindow::location(ExecState*
>      return jsLocation;
>  }
>  
> +#if ENABLE(NOTIFICATIONS)
> +JSValue JSDOMWindow::notifications(ExecState* exec) const
> +{
> +    NotificationCenter* notifications = impl()->notifications();
> +    if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(),
notifications))
> +	   return wrapper;
> +
> +    JSNotificationCenter* jsNotifications = new (exec)
JSNotificationCenter(getDOMStructure<JSNotificationCenter>(exec,
const_cast<JSDOMWindow*>(this)), notifications);
> +    cacheDOMObjectWrapper(exec->globalData(), notifications,
jsNotifications);
> +    return jsNotifications;
> +}
> +#endif
> +

Why does this need to be a custom binding? Seems like this does basically the
same thing that a manual binding would (except the manual binding would use
toJS() instead of doing the wrapper conversion by hand).

> +
> +JSValue JSNotificationCenter::createHTMLNotification(ExecState* exec, const
ArgList& args)
> +{
> +    ExceptionCode ec = 0;
> +    String url = args.at(0).toString(exec);
> +    JSValue value = toJS(exec, Notification::create(url, impl()->context(),
ec, impl()->provider()));
> +    setDOMException(exec, ec);
> +    return value;
> +}

Why does this need to be a custom binding? Wouldn't it be simpler to give
JSNotificationCenter a createHTMLNotification() method and let the bindings
generator do the work? Also, it looks like this code will use "undefined" for
url if the URL parameter is omitted, instead of an empty string as is the case
with many other DOM APIs. Is that intentional?

> +
> +JSValue JSNotificationCenter::createNotification(ExecState* exec, const
ArgList& args)
> +{
> +    ExceptionCode ec = 0;
> +    NotificationContents contents(args.at(0).toString(exec),
args.at(1).toString(exec), args.at(2).toString(exec));
> +
> +
> +    JSValue value = toJS(exec, Notification::create(contents,
impl()->context(), ec, impl()->provider()));
> +    setDOMException(exec, ec);
> +    return value;
> +}

Ditto the two issues above.

> +
> +JSValue JSNotificationCenter::checkPermission(ExecState* exec, const
ArgList& args)
> +{
> +    return JSValue(exec, impl()->checkPermission());
> +}

Once again, not clear why this needs to be a custom binding.



> +Notification::~Notification() 
> +{
> +}

It's not necessary to explicitly define an empty constructor.

> +
> +void Notification::dispatchDisplayEvent() 
> +{   
> +    RefPtr<Event> event = Event::create("display", false, true);
> +
> +    if (m_onDisplayListener) {
> +	   event->setTarget(this);
> +	   event->setCurrentTarget(this);
> +	   m_onDisplayListener->handleEvent(event.get(), true);
> +    }
> +
> +    ExceptionCode ec = 0;
> +    dispatchEvent(event.release(), ec);
> +    ASSERT(!ec);
> +}

I think all of the event dispatch has some bugs. The event flow should be like
this:

1) All capturing event listeners -- ones registered with addEventListener's
third argument (useCapture) set to true -- get to handle the event, in the
order in which they were added.
2) All non-capturing event listeners, including built-in ones set via the
attributes, get to handle the event in the order in which they were added.

This should happen whether or not the event is dispatched internally or by an
explicit dispatchEvent() call from JS.

I believe you have at least four bugs here, I will describe them plus test
cases that would catch them (which you should add).

A) For events dispatched internally, the built-in listener will be invoked
*before* the capturing listeners (which we don't get to until handleEvent).
This is wrong, capturing listeners need to fire first. You can test this by
setting a capturing listener with addEventListener as well as one via the
builtin (onerror, onclose, etc) DOM attributes. Then cause one of the events to
be dispatched in a built-in way.

B) For events dispatched by calling dispatchEvent() directly, the built-in
listeners will be skipped entirely. That's because they are only called by the
special dispatchErrorEvent / dispatchCloseEvent etc functions, but those are
not invoked when dispatchEvent is called directly.

C) Very minor - if you add a non-capturing listener with addEventListener, and
then afterwards set a DOM property listener (say, by setting onerror) the
addEventListener listener should fire first on a built-in dispatch, but with
your code it will fire second.

D) You are not handling propagationStopped properly between the phases. You can
observe this by setting a capturing and non-capturing listener, and calling
stopPropagation in the capturing listener. 

There may be EventTarget subclasses that get this wrong. Node gets it right,
although it also has logic to go up and down the DOM tree which is not
necessary here. If you code it more like what Node does, starting with the line
event->setEventPhase(Event::AT_TARGET) in Node::dispatchGenericEvent() up to
right before the section of code handling the bubble phase, and if you make the
attribute listeners work more like they would via
Node::setAttributeEventListener(), then all four of the above bugs should go
away.

We can file bugs on any other classes getting this wrong. Maybe we should
eventually have some helper code for EventTarget classes that are standalone
and not DOM nodes, to make it easier to get this right.

> +
> +void Notification::dispatchErrorEvent()
> +{  
> +    RefPtr<Event> event = Event::create(eventNames().errorEvent, false,
true);
> +
> +    if (m_onErrorListener) {
> +	   event->setTarget(this);
> +	   event->setCurrentTarget(this);
> +	   m_onErrorListener->handleEvent(event.get(), true);
> +    }
> +
> +    ExceptionCode ec = 0;
> +    dispatchEvent(event.release(), ec);
> +    ASSERT(!ec);
> +}
> +
> +void Notification::dispatchCloseEvent() 
> +{   
> +    RefPtr<Event> event = Event::create(eventNames().closeEvent, false,
true);
> +
> +    if (m_onCloseListener) {
> +	   event->setTarget(this);
> +	   event->setCurrentTarget(this);
> +	   m_onCloseListener->handleEvent(event.get(), true);
> +    }
> +
> +    ExceptionCode ec = 0;
> +    dispatchEvent(event.release(), ec);
> +    ASSERT(!ec);
> +
> +}

These two methods are buggy too, as cited above.

> +bool Notification::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec)

> +{
> +    RegisteredEventListenerVector listenersCopy = m_eventListeners;
> +    size_t size = listenersCopy.size();
> +    for (size_t i = 0; i < size; ++i) {
> +	   RegisteredEventListener& r = *listenersCopy[i];
> +	   if (r.eventType() == event->type() && !r.removed())
> +	       r.listener()->handleEvent(event.get());
> +    }
> +
> +    return true;
> +}

And this too - notice how it ignores whether the listeners have useCapture set.


> +
> +void Notification::display()
> +{
> +    dispatchDisplayEvent();
> +}
> +
> +void Notification::error()
> +{
> +    dispatchErrorEvent();
> +}
> +
> +void Notification::close()
> +{
> +    dispatchCloseEvent();
> +}

These one-line wrappers don't seem to add much. Maybe there should be only one
of display()/dispatchDisplayEvent() and the notification provider can call
that.


I think NotificationDisplay or NotificationUI or something like that would be a
better name than NotificationProvider, as discussed previously. Or maybe
NotificationPresenter (since the job of this class from the point of view of
the rest of the code) is to present notifications to the user.


More information about the webkit-reviews mailing list