Title: [120482] trunk/Source/WebKit/blackberry
Revision
120482
Author
toniki...@webkit.org
Date
2012-06-15 11:53:27 -0700 (Fri, 15 Jun 2012)

Log Message

[BlackBerry] Disable WebCore::EventHandler synthesized mouse events during touch scrolling
https://bugs.webkit.org/show_bug.cgi?id=89227
PR #146642

Reviewed by Rob Buis.
Patch by Antonio Gomes <ago...@rim.com>

Make use of the Settings::supportsMouseDevice setting in order to
prevent mouse move event to fire as a response to a scroll action.
We might still want to dynamically toggle this setting ON, in case for
example of a mouse wheel driven scroll action, but we can revisit it
when it becomes a fully supported/primary use case.

Internally reviewed by Eli Fidler.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
* Api/WebSettings.cpp:
(WebKit):
(BlackBerry::WebKit::WebSettings::isDeviceSupportsMouseEnabled):
(BlackBerry::WebKit::WebSettings::setDeviceSupportsMouseEnabled):
* Api/WebSettings.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (120481 => 120482)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-06-15 18:43:28 UTC (rev 120481)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-06-15 18:53:27 UTC (rev 120482)
@@ -6222,6 +6222,7 @@
     coreSettings->setShouldDrawBorderWhileLoadingImages(webSettings->shouldDrawBorderWhileLoadingImages());
     coreSettings->setScriptEnabled(webSettings->isJavaScriptEnabled());
     coreSettings->setPrivateBrowsingEnabled(webSettings->isPrivateBrowsingEnabled());
+    coreSettings->setDeviceSupportsMouse(webSettings->deviceSupportsMouse());
     coreSettings->setDefaultFixedFontSize(webSettings->defaultFixedFontSize());
     coreSettings->setDefaultFontSize(webSettings->defaultFontSize());
     coreSettings->setMinimumLogicalFontSize(webSettings->minimumFontSize());

Modified: trunk/Source/WebKit/blackberry/Api/WebSettings.cpp (120481 => 120482)


--- trunk/Source/WebKit/blackberry/Api/WebSettings.cpp	2012-06-15 18:43:28 UTC (rev 120481)
+++ trunk/Source/WebKit/blackberry/Api/WebSettings.cpp	2012-06-15 18:53:27 UTC (rev 120482)
@@ -82,6 +82,7 @@
 DEFINE_STATIC_LOCAL(String, WebKitPageGroupName, ("WebKitPageGroupName"));
 DEFINE_STATIC_LOCAL(String, WebKitPluginsEnabled, ("WebKitPluginsEnabled"));
 DEFINE_STATIC_LOCAL(String, WebKitPrivateBrowsingEnabled, ("WebKitPrivateBrowsingEnabled"));
+DEFINE_STATIC_LOCAL(String, WebKitDeviceSupportsMouse, ("WebKitDeviceSupportsMouse"));
 DEFINE_STATIC_LOCAL(String, WebKitSansSeriffFontFamily, ("WebKitSansSeriffFontFamily"));
 DEFINE_STATIC_LOCAL(String, WebKitSeriffFontFamily, ("WebKitSeriffFontFamily"));
 DEFINE_STATIC_LOCAL(String, WebKitStandardFontFamily, ("WebKitStandardFontFamily"));
@@ -264,6 +265,16 @@
     m_private->setBoolean(WebKitPrivateBrowsingEnabled, enabled);
 }
 
+bool WebSettings::deviceSupportsMouse() const
+{
+    return m_private->getBoolean(WebKitDeviceSupportsMouse);
+}
+
+void WebSettings::setDeviceSupportsMouse(bool enabled)
+{
+    m_private->setBoolean(WebKitDeviceSupportsMouse, enabled);
+}
+
 int WebSettings::defaultFixedFontSize() const
 {
     return m_private->getInteger(WebKitDefaultFixedFontSize);

Modified: trunk/Source/WebKit/blackberry/Api/WebSettings.h (120481 => 120482)


--- trunk/Source/WebKit/blackberry/Api/WebSettings.h	2012-06-15 18:43:28 UTC (rev 120481)
+++ trunk/Source/WebKit/blackberry/Api/WebSettings.h	2012-06-15 18:53:27 UTC (rev 120482)
@@ -72,6 +72,9 @@
     bool isPrivateBrowsingEnabled() const;
     void setPrivateBrowsingEnabled(bool);
 
+    void setDeviceSupportsMouse(bool);
+    bool deviceSupportsMouse() const;
+
     int defaultFixedFontSize() const;
     void setDefaultFixedFontSize(int);
 

Modified: trunk/Source/WebKit/blackberry/ChangeLog (120481 => 120482)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-06-15 18:43:28 UTC (rev 120481)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-06-15 18:53:27 UTC (rev 120482)
@@ -1,3 +1,27 @@
+2012-06-15  Antonio Gomes  <ago...@rim.com>
+
+        [BlackBerry] Disable WebCore::EventHandler synthesized mouse events during touch scrolling
+        https://bugs.webkit.org/show_bug.cgi?id=89227
+        PR #146642
+
+        Reviewed by Rob Buis.
+
+        Make use of the Settings::supportsMouseDevice setting in order to
+        prevent mouse move event to fire as a response to a scroll action.
+        We might still want to dynamically toggle this setting ON, in case for
+        example of a mouse wheel driven scroll action, but we can revisit it
+        when it becomes a fully supported/primary use case.
+
+        Internally reviewed by Eli Fidler.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
+        * Api/WebSettings.cpp:
+        (WebKit):
+        (BlackBerry::WebKit::WebSettings::isDeviceSupportsMouseEnabled):
+        (BlackBerry::WebKit::WebSettings::setDeviceSupportsMouseEnabled):
+        * Api/WebSettings.h:
+
 2012-06-15  Jacky Jiang  <zhaji...@rim.com>
 
         [BlackBerry] Certain web pages (i.e., http://www.cloudtweaks.com/) are allowed to be wider than the screen
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to