[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:23:01 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f4e33822191fc92caf046645742175b34d098abe
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 21 10:42:35 2010 +0000

    2010-07-21  Hans Wennborg  <hans at chromium.org>
    
            Reviewed by Steve Block.
    
            Runtime feature switch for device orientation
            https://bugs.webkit.org/show_bug.cgi?id=42265
    
            Add a runtime feature switch that decides whether device orientation
            events are available or not. Defaults to true.
    
            * WebCore.vcproj/WebCoreCommon.vsprops: Add bindings/generic to include path.
            * bindings/generic/RuntimeEnabledFeatures.cpp:
            * bindings/generic/RuntimeEnabledFeatures.h:
            (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
            (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
            (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
            (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
            * page/DOMWindow.cpp:
            (WebCore::DOMWindow::addEventListener):
            (WebCore::DOMWindow::removeEventListener):
            (WebCore::DOMWindow::removeAllEventListeners):
            * page/DOMWindow.idl:
            * page/Page.cpp:
            (WebCore::Page::Page):
    2010-07-21  Hans Wennborg  <hans at chromium.org>
    
            Reviewed by Steve Block.
    
            Runtime feature switch for device orientation
            https://bugs.webkit.org/show_bug.cgi?id=42265
    
            Add a runtime feature switch that decides whether device orientation
            events are available or not. Defaults to true.
    
            * public/WebRuntimeFeatures.h:
            * src/WebRuntimeFeatures.cpp:
            (WebKit::WebRuntimeFeatures::enableDeviceOrientation):
            (WebKit::WebRuntimeFeatures::isDeviceOrientationEnabled):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63810 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e0348af..1b69ecd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-21  Hans Wennborg  <hans at chromium.org>
+
+        Reviewed by Steve Block.
+
+        Runtime feature switch for device orientation
+        https://bugs.webkit.org/show_bug.cgi?id=42265
+
+        Add a runtime feature switch that decides whether device orientation
+        events are available or not. Defaults to true.
+
+        * WebCore.vcproj/WebCoreCommon.vsprops: Add bindings/generic to include path.
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
+        (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
+        (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
+        (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::addEventListener):
+        (WebCore::DOMWindow::removeEventListener):
+        (WebCore::DOMWindow::removeAllEventListeners):
+        * page/DOMWindow.idl:
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+
 2010-07-21  Zoltan Herczeg  <zherczeg at webkit.org>
 
         Reviewed Nikolas Zimmermann.
diff --git a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
index 9c666a1..75d4dea 100644
--- a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
+++ b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
@@ -7,7 +7,7 @@
 	>
 	<Tool
 		Name="VCCLCompilerTool"
-		AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings&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)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;"
+		AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\generic&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)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;"
 		PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
 		UsePrecompiledHeader="2"
 		PrecompiledHeaderThrough="WebCorePrefix.h"
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
index 7d4e5c1..153f995 100644
--- a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
@@ -47,6 +47,7 @@ bool RuntimeEnabledFeatures::isIndexedDBEnabled = false;
 bool RuntimeEnabledFeatures::isWebGLEnabled = false;
 bool RuntimeEnabledFeatures::isPushStateEnabled = false;
 bool RuntimeEnabledFeatures::isTouchEnabled = true;
+bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true;
 
 #if ENABLE(VIDEO)
 
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.h b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
index 73bbf0f..d8eae23 100644
--- a/WebCore/bindings/generic/RuntimeEnabledFeatures.h
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
@@ -113,6 +113,11 @@ public:
     static bool ontouchcancelEnabled() { return isTouchEnabled; }
 #endif
 
+    static void setDeviceOrientationEnabled(bool isEnabled) { isDeviceOrientationEnabled = isEnabled; }
+    static bool deviceOrientationEnabled() { return isDeviceOrientationEnabled; }
+    static bool deviceOrientationEventEnabled() { return isDeviceOrientationEnabled; }
+    static bool ondeviceorientationEnabled() { return isDeviceOrientationEnabled; }
+
 private:
     // Never instantiate.
     RuntimeEnabledFeatures() { }
@@ -126,6 +131,7 @@ private:
     static bool isWebGLEnabled;
     static bool isPushStateEnabled;
     static bool isTouchEnabled;
+    static bool isDeviceOrientationEnabled;
 };
 
 } // namespace WebCore
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 918a83a..062d0df 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -1413,8 +1413,8 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<Event
     else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
         addBeforeUnloadEventListener(this);
 #if ENABLE(DEVICE_ORIENTATION)
-    else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page())
-        frame()->page()->deviceOrientation()->addListener(this);
+    else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page() && frame()->page()->deviceOrientationController())
+        frame()->page()->deviceOrientationController()->addListener(this);
 #endif
 
     return true;
@@ -1430,8 +1430,8 @@ bool DOMWindow::removeEventListener(const AtomicString& eventType, EventListener
     else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
         removeBeforeUnloadEventListener(this);
 #if ENABLE(DEVICE_ORIENTATION)
-    else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page())
-        frame()->page()->deviceOrientation()->removeListener(this);
+    else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page() && frame()->page()->deviceOrientationController())
+        frame()->page()->deviceOrientationController()->removeListener(this);
 #endif
 
     return true;
@@ -1508,8 +1508,8 @@ void DOMWindow::removeAllEventListeners()
     EventTarget::removeAllEventListeners();
 
 #if ENABLE(DEVICE_ORIENTATION)
-    if (frame() && frame()->page())
-        frame()->page()->deviceOrientation()->removeAllListeners(this);
+    if (frame() && frame()->page() && frame()->page()->deviceOrientationController())
+        frame()->page()->deviceOrientationController()->removeAllListeners(this);
 #endif
 
     removeAllUnloadEventListeners(this);
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index c500ee7..82521ba 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -304,8 +304,8 @@ module window {
         attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
         attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
 
-        attribute [Conditional=DEVICE_ORIENTATION] DeviceOrientationEventConstructor DeviceOrientationEvent;
-        attribute [Conditional=DEVICE_ORIENTATION] EventListener ondeviceorientation;
+        attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent;
+        attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] EventListener ondeviceorientation;
 
         // EventTarget interface
         [Custom] void addEventListener(in DOMString type,
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index 59c2238..aaf3d4c 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -57,6 +57,7 @@
 #include "ProgressTracker.h"
 #include "RenderTheme.h"
 #include "RenderWidget.h"
+#include "RuntimeEnabledFeatures.h"
 #include "ScriptController.h"
 #include "SelectionController.h"
 #include "Settings.h"
@@ -139,7 +140,7 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
     , m_geolocationController(new GeolocationController(this, geolocationControllerClient))
 #endif
 #if ENABLE(DEVICE_ORIENTATION)
-    , m_deviceOrientationController(new DeviceOrientationController(this, deviceOrientationClient))
+    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, deviceOrientationClient) : 0)
 #endif
 #if ENABLE(INPUT_SPEECH)
     , m_speechInputClient(0)
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 8460cb0..297036b 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-21  Hans Wennborg  <hans at chromium.org>
+
+        Reviewed by Steve Block.
+
+        Runtime feature switch for device orientation
+        https://bugs.webkit.org/show_bug.cgi?id=42265
+
+        Add a runtime feature switch that decides whether device orientation
+        events are available or not. Defaults to true.
+
+        * public/WebRuntimeFeatures.h:
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enableDeviceOrientation):
+        (WebKit::WebRuntimeFeatures::isDeviceOrientationEnabled):
+
 2010-07-21  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index 03ff681..95307a2 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -77,6 +77,9 @@ public:
     WEBKIT_API static void enableTouch(bool);
     WEBKIT_API static bool isTouchEnabled();
 
+    WEBKIT_API static void enableDeviceOrientation(bool);
+    WEBKIT_API static bool isDeviceOrientationEnabled();
+
 private:
     WebRuntimeFeatures();
 };
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 595a47f..efb287c 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -226,4 +226,14 @@ bool WebRuntimeFeatures::isTouchEnabled()
 #endif
 }
 
+void WebRuntimeFeatures::enableDeviceOrientation(bool enable)
+{
+    RuntimeEnabledFeatures::setDeviceOrientationEnabled(enable);
+}
+
+bool WebRuntimeFeatures::isDeviceOrientationEnabled()
+{
+    return RuntimeEnabledFeatures::deviceOrientationEnabled();
+}
+
 } // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list