Title: [98016] trunk/Source
Revision
98016
Author
sch...@chromium.org
Date
2011-10-20 12:59:14 -0700 (Thu, 20 Oct 2011)

Log Message

MouseLock compile and run time flags.
https://bugs.webkit.org/show_bug.cgi?id=70530

Reviewed by Darin Fisher.

Source/_javascript_Core:

* wtf/Platform.h:

Source/WebCore:

No new tests.

* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webkitMouseLockAPIEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitMouseLockAPIEnabled):
(WebCore::RuntimeEnabledFeatures::webkitLockMouseEnabled):
(WebCore::RuntimeEnabledFeatures::webkitUnlockMouseEnabled):
(WebCore::RuntimeEnabledFeatures::webkitMouseLockedEnabled):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setMouseLockEnabled):
(WebCore::Settings::mouseLockEnabled):

Source/WebKit/chromium:

* features.gypi:
* public/WebRuntimeFeatures.h:
* public/WebSettings.h:
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableMouseLockAPI):
(WebKit::WebRuntimeFeatures::isMouseLockAPIEnabled):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setMouseLockEnabled):
* src/WebSettingsImpl.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (98015 => 98016)


--- trunk/Source/_javascript_Core/ChangeLog	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-20 19:59:14 UTC (rev 98016)
@@ -1,3 +1,12 @@
+2011-10-20  Vincent Scheib  <sch...@chromium.org>
+
+        MouseLock compile and run time flags.
+        https://bugs.webkit.org/show_bug.cgi?id=70530
+
+        Reviewed by Darin Fisher.
+
+        * wtf/Platform.h:
+
 2011-10-20  Mark Hahnenberg  <mhahnenb...@apple.com>
 
         Rename static deleteProperty to deletePropertyByIndex

Modified: trunk/Source/_javascript_Core/wtf/Platform.h (98015 => 98016)


--- trunk/Source/_javascript_Core/wtf/Platform.h	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/_javascript_Core/wtf/Platform.h	2011-10-20 19:59:14 UTC (rev 98016)
@@ -841,6 +841,10 @@
 #define ENABLE_FULLSCREEN_API 0
 #endif
 
+#if !defined(ENABLE_MOUSE_LOCK_API)
+#define ENABLE_MOUSE_LOCK_API 0
+#endif
+
 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
 #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
     || (CPU(IA64) && !CPU(IA64_32)) \

Modified: trunk/Source/WebCore/ChangeLog (98015 => 98016)


--- trunk/Source/WebCore/ChangeLog	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebCore/ChangeLog	2011-10-20 19:59:14 UTC (rev 98016)
@@ -1,3 +1,25 @@
+2011-10-20  Vincent Scheib  <sch...@chromium.org>
+
+        MouseLock compile and run time flags.
+        https://bugs.webkit.org/show_bug.cgi?id=70530
+
+        Reviewed by Darin Fisher.
+
+        No new tests.
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::webkitMouseLockAPIEnabled):
+        (WebCore::RuntimeEnabledFeatures::setWebkitMouseLockAPIEnabled):
+        (WebCore::RuntimeEnabledFeatures::webkitLockMouseEnabled):
+        (WebCore::RuntimeEnabledFeatures::webkitUnlockMouseEnabled):
+        (WebCore::RuntimeEnabledFeatures::webkitMouseLockedEnabled):
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        * page/Settings.h:
+        (WebCore::Settings::setMouseLockEnabled):
+        (WebCore::Settings::mouseLockEnabled):
+
 2011-10-20  Tony Chang  <t...@chromium.org>
 
         Fix a compiler warning in MediaStreamTrack.cpp:

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (98015 => 98016)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2011-10-20 19:59:14 UTC (rev 98016)
@@ -155,6 +155,10 @@
 bool RuntimeEnabledFeatures::isFullScreenAPIEnabled = true;
 #endif
 
+#if ENABLE(MOUSE_LOCK_API)
+bool RuntimeEnabledFeatures::isMouseLockAPIEnabled = false;
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
 bool RuntimeEnabledFeatures::isMediaSourceEnabled = false;
 #endif

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (98015 => 98016)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2011-10-20 19:59:14 UTC (rev 98016)
@@ -80,6 +80,14 @@
     static bool webkitCancelFullScreenEnabled() { return isFullScreenAPIEnabled; }
 #endif
 
+#if ENABLE(MOUSE_LOCK_API)
+    static bool webkitMouseLockAPIEnabled() { return isMouseLockAPIEnabled; }
+    static void setWebkitMouseLockAPIEnabled(bool isEnabled) { isMouseLockAPIEnabled = isEnabled; }
+    static bool webkitLockMouseEnabled() { return isMouseLockAPIEnabled; }
+    static bool webkitUnlockMouseEnabled() { return isMouseLockAPIEnabled; }
+    static bool webkitMouseLockedEnabled() { return isMouseLockAPIEnabled; }
+#endif
+
 #if ENABLE(VIDEO)
     static bool audioEnabled();
     static bool htmlMediaElementEnabled();
@@ -218,6 +226,10 @@
     static bool isFullScreenAPIEnabled;
 #endif
 
+#if ENABLE(MOUSE_LOCK_API)
+    static bool isMouseLockAPIEnabled;
+#endif
+
 #if ENABLE(MEDIA_SOURCE)
     static bool isMediaSourceEnabled;
 #endif

Modified: trunk/Source/WebCore/page/Settings.cpp (98015 => 98016)


--- trunk/Source/WebCore/page/Settings.cpp	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebCore/page/Settings.cpp	2011-10-20 19:59:14 UTC (rev 98016)
@@ -195,6 +195,9 @@
 #if ENABLE(FULLSCREEN_API)
     , m_fullScreenAPIEnabled(false)
 #endif
+#if ENABLE(MOUSE_LOCK_API)
+    , m_mouseLockAPIEnabled(false)
+#endif
     , m_asynchronousSpellCheckingEnabled(false)
 #if USE(UNIFIED_TEXT_CHECKING)
     , m_unifiedTextCheckerEnabled(true)

Modified: trunk/Source/WebCore/page/Settings.h (98015 => 98016)


--- trunk/Source/WebCore/page/Settings.h	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebCore/page/Settings.h	2011-10-20 19:59:14 UTC (rev 98016)
@@ -373,6 +373,11 @@
         bool fullScreenEnabled() const  { return m_fullScreenAPIEnabled; }
 #endif
 
+#if ENABLE(MOUSE_LOCK_API)
+        void setMouseLockEnabled(bool flag) { m_mouseLockAPIEnabled = flag; }
+        bool mouseLockEnabled() const  { return m_mouseLockAPIEnabled; }
+#endif
+
 #if USE(AVFOUNDATION)
         static void setAVFoundationEnabled(bool flag) { gAVFoundationEnabled = flag; }
         static bool isAVFoundationEnabled() { return gAVFoundationEnabled; }
@@ -570,6 +575,9 @@
 #if ENABLE(FULLSCREEN_API)
         bool m_fullScreenAPIEnabled : 1;
 #endif
+#if ENABLE(MOUSE_LOCK_API)
+        bool m_mouseLockAPIEnabled : 1;
+#endif
         bool m_asynchronousSpellCheckingEnabled: 1;
         bool m_unifiedTextCheckerEnabled: 1;
         bool m_memoryInfoEnabled: 1;

Modified: trunk/Source/WebKit/chromium/ChangeLog (98015 => 98016)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-10-20 19:59:14 UTC (rev 98016)
@@ -1,3 +1,20 @@
+2011-10-20  Vincent Scheib  <sch...@chromium.org>
+
+        MouseLock compile and run time flags.
+        https://bugs.webkit.org/show_bug.cgi?id=70530
+
+        Reviewed by Darin Fisher.
+
+        * features.gypi:
+        * public/WebRuntimeFeatures.h:
+        * public/WebSettings.h:
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enableMouseLockAPI):
+        (WebKit::WebRuntimeFeatures::isMouseLockAPIEnabled):
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setMouseLockEnabled):
+        * src/WebSettingsImpl.h:
+
 2011-10-20  Hao Zheng  <zheng...@chromium.org>
 
         [Chromium] Reduce dependencies of ImageDiff to compile it for Android.

Modified: trunk/Source/WebKit/chromium/features.gypi (98015 => 98016)


--- trunk/Source/WebKit/chromium/features.gypi	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/features.gypi	2011-10-20 19:59:14 UTC (rev 98016)
@@ -68,6 +68,7 @@
       'ENABLE_METER_TAG=1',
       'ENABLE_MHTML=1',
       'ENABLE_MICRODATA=0',
+      'ENABLE_MOUSE_LOCK_API=1',
       'ENABLE_MUTATION_OBSERVERS=<(enable_mutation_observers)',
       'ENABLE_NOTIFICATIONS=1',
       'ENABLE_ORIENTATION_EVENTS=0',

Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (98015 => 98016)


--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2011-10-20 19:59:14 UTC (rev 98016)
@@ -109,6 +109,9 @@
     WEBKIT_EXPORT static void enableFullScreenAPI(bool);
     WEBKIT_EXPORT static bool isFullScreenAPIEnabled();
 
+    WEBKIT_EXPORT static void enableMouseLockAPI(bool);
+    WEBKIT_EXPORT static bool isMouseLockAPIEnabled();
+
     WEBKIT_EXPORT static void enableMediaSource(bool);
     WEBKIT_EXPORT static bool isMediaSourceEnabled();
 

Modified: trunk/Source/WebKit/chromium/public/WebSettings.h (98015 => 98016)


--- trunk/Source/WebKit/chromium/public/WebSettings.h	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/public/WebSettings.h	2011-10-20 19:59:14 UTC (rev 98016)
@@ -124,6 +124,7 @@
     virtual void setValidationMessageTimerMagnification(int) = 0;
     virtual void setMinimumTimerInterval(double) = 0;
     virtual void setFullScreenEnabled(bool) = 0;
+    virtual void setMouseLockEnabled(bool) = 0;
     virtual void setAllowDisplayOfInsecureContent(bool) = 0;
     virtual void setAllowRunningOfInsecureContent(bool) = 0;
     virtual void setShouldPrintBackgrounds(bool) = 0;

Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (98015 => 98016)


--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2011-10-20 19:59:14 UTC (rev 98016)
@@ -360,6 +360,24 @@
 #endif
 }
 
+void WebRuntimeFeatures::enableMouseLockAPI(bool enable)
+{
+#if ENABLE(MOUSE_LOCK_API)
+    RuntimeEnabledFeatures::setWebkitMouseLockAPIEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isMouseLockAPIEnabled()
+{
+#if ENABLE(MOUSE_LOCK_API)
+    return RuntimeEnabledFeatures::webkitMouseLockAPIEnabled();
+#else
+    return false;
+#endif
+}
+
 void WebRuntimeFeatures::enableMediaSource(bool enable)
 {
 #if ENABLE(MEDIA_SOURCE)

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp (98015 => 98016)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2011-10-20 19:59:14 UTC (rev 98016)
@@ -413,6 +413,15 @@
 #endif
 }
 
+void WebSettingsImpl::setMouseLockEnabled(bool enabled)
+{
+#if ENABLE(MOUSE_LOCK_API)
+    m_settings->setMouseLockEnabled(enabled);
+#else
+    UNUSED_PARAM(enabled);
+#endif
+}
+
 void WebSettingsImpl::setAllowDisplayOfInsecureContent(bool enabled)
 {
     m_settings->setAllowDisplayOfInsecureContent(enabled);

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.h (98015 => 98016)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2011-10-20 19:44:28 UTC (rev 98015)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2011-10-20 19:59:14 UTC (rev 98016)
@@ -116,6 +116,7 @@
     virtual void setValidationMessageTimerMagnification(int);
     virtual void setMinimumTimerInterval(double);
     virtual void setFullScreenEnabled(bool);
+    virtual void setMouseLockEnabled(bool);
     virtual void setAllowDisplayOfInsecureContent(bool);
     virtual void setAllowRunningOfInsecureContent(bool);
     virtual void setShouldPrintBackgrounds(bool);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to