[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:16:47 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit fa81fd6b7abced6a21bc0d0ef5e581a70b8a0145
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 30 19:37:12 2009 +0000

    2009-10-30  John Gregg  <johnnyg at google.com>
    
            Reviewed by David Levin.
    
            Need to turn off notifications properly at runtime
            https://bugs.webkit.org/show_bug.cgi?id=30409
    
            Moving the notificationsEnabled bit from NotificationCenter
            to the new V8 RuntimeEnabledFeatures object.
    
            Just moving a bit around, so no new tests.
    
            * bindings/v8/RuntimeEnabledFeatures.cpp:
            * bindings/v8/RuntimeEnabledFeatures.h:
            (WebCore::RuntimeEnabledFeatures::setNotificationsEnabled):
            (WebCore::RuntimeEnabledFeatures::notificationsEnabled):
            * bindings/v8/custom/V8DOMWindowCustom.cpp:
            (WebCore::ACCESSOR_RUNTIME_ENABLER):
            * bindings/v8/custom/V8WorkerContextCustom.cpp:
            (WebCore::ACCESSOR_RUNTIME_ENABLER):
            * notifications/NotificationCenter.cpp:
            * notifications/NotificationCenter.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50348 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9d1f8bc..27eed28 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2009-10-30  John Gregg  <johnnyg at google.com>
+
+        Reviewed by David Levin.
+
+        Need to turn off notifications properly at runtime
+        https://bugs.webkit.org/show_bug.cgi?id=30409
+
+        Moving the notificationsEnabled bit from NotificationCenter
+        to the new V8 RuntimeEnabledFeatures object.
+
+        Just moving a bit around, so no new tests.
+
+        * bindings/v8/RuntimeEnabledFeatures.cpp:
+        * bindings/v8/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setNotificationsEnabled):
+        (WebCore::RuntimeEnabledFeatures::notificationsEnabled):
+        * bindings/v8/custom/V8DOMWindowCustom.cpp:
+        (WebCore::ACCESSOR_RUNTIME_ENABLER):
+        * bindings/v8/custom/V8WorkerContextCustom.cpp:
+        (WebCore::ACCESSOR_RUNTIME_ENABLER):
+        * notifications/NotificationCenter.cpp:
+        * notifications/NotificationCenter.h:
+
 2009-10-30  Dmitry Titov  <dimich at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp b/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
index 21293a5..9c4421b 100644
--- a/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
+++ b/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
@@ -36,5 +36,6 @@ namespace WebCore {
 bool RuntimeEnabledFeatures::isDatabaseEnabled = false;
 bool RuntimeEnabledFeatures::isLocalStorageEnabled = true;
 bool RuntimeEnabledFeatures::isSessionStorageEnabled = true;
+bool RuntimeEnabledFeatures::isNotificationsEnabled = false;
 
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/RuntimeEnabledFeatures.h b/WebCore/bindings/v8/RuntimeEnabledFeatures.h
index fa42024..49ad4ef 100644
--- a/WebCore/bindings/v8/RuntimeEnabledFeatures.h
+++ b/WebCore/bindings/v8/RuntimeEnabledFeatures.h
@@ -45,6 +45,9 @@ public:
     static void setSessionStorageEnabled(bool isEnabled) { isSessionStorageEnabled = isEnabled; }
     static bool sessionStorageEnabled() { return isSessionStorageEnabled; }
 
+    static void setNotificationsEnabled(bool isEnabled) { isNotificationsEnabled = isEnabled; }
+    static bool notificationsEnabled() { return isNotificationsEnabled; }
+
 private:
     // Never instantiate.
     RuntimeEnabledFeatures() { }
@@ -52,6 +55,7 @@ private:
     static bool isDatabaseEnabled;
     static bool isLocalStorageEnabled;
     static bool isSessionStorageEnabled;
+    static bool isNotificationsEnabled;
 };
 
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index 7eccfb1..08e0520 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -46,7 +46,6 @@
 #include "FrameView.h"
 #include "HTMLCollection.h"
 #include "MediaPlayer.h"
-#include "NotificationCenter.h"
 #include "Page.h"
 #include "PlatformScreen.h"
 #include "RuntimeEnabledFeatures.h"
@@ -304,7 +303,7 @@ ACCESSOR_RUNTIME_ENABLER(DOMWindowSessionStorage)
 #if ENABLE(NOTIFICATIONS)
 ACCESSOR_RUNTIME_ENABLER(DOMWindowWebkitNotifications)
 {
-    return NotificationCenter::isAvailable();
+    return RuntimeEnabledFeatures::notificationsEnabled();
 }
 #endif
 
diff --git a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
index 627a54e..9b68ac0 100644
--- a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
@@ -34,7 +34,7 @@
 
 #include "DOMTimer.h"
 #include "ExceptionCode.h"
-#include "NotificationCenter.h"
+#include "RuntimeEnabledFeatures.h"
 #include "ScheduledAction.h"
 #include "V8Binding.h"
 #include "V8CustomBinding.h"
@@ -49,7 +49,7 @@ namespace WebCore {
 #if ENABLE(NOTIFICATIONS)
 ACCESSOR_RUNTIME_ENABLER(WorkerContextWebkitNotifications)
 {
-    return NotificationCenter::isAvailable();
+    return RuntimeEnabledFeatures::notificationsEnabled();
 }
 #endif
 
diff --git a/WebCore/notifications/NotificationCenter.cpp b/WebCore/notifications/NotificationCenter.cpp
index 69b0075..94976a2 100644
--- a/WebCore/notifications/NotificationCenter.cpp
+++ b/WebCore/notifications/NotificationCenter.cpp
@@ -40,20 +40,6 @@
 
 namespace WebCore {
 
-#if USE(V8)
-static bool notificationCenterAvailable = false;
-
-void NotificationCenter::setIsAvailable(bool available)
-{
-    notificationCenterAvailable = available;
-}
-
-bool NotificationCenter::isAvailable()
-{
-    return notificationCenterAvailable;
-}
-#endif
-
 NotificationCenter::NotificationCenter(ScriptExecutionContext* context, NotificationPresenter* presenter) 
     : ActiveDOMObject(context, this)
     , m_scriptExecutionContext(context)
diff --git a/WebCore/notifications/NotificationCenter.h b/WebCore/notifications/NotificationCenter.h
index 1084442..ef59414 100644
--- a/WebCore/notifications/NotificationCenter.h
+++ b/WebCore/notifications/NotificationCenter.h
@@ -47,10 +47,6 @@ namespace WebCore {
 
     class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject { 
     public:
-#if USE(V8)
-        static void setIsAvailable(bool);
-        static bool isAvailable();
-#endif
         static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
 
         Notification* createHTMLNotification(const String& URI, ExceptionCode& ec)
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index c30b6b9..2c1ba2b 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -625,9 +625,6 @@ NotificationCenter* DOMWindow::webkitNotifications() const
     if (!page)
         return 0;
 
-    if (!page->settings()->experimentalNotificationsEnabled())
-        return 0;
-
     NotificationPresenter* provider = page->chrome()->notificationPresenter();
     if (provider) 
         m_notifications = NotificationCenter::create(document, provider);    

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list