Title: [181851] trunk/Source/WebKit2
- Revision
- 181851
- Author
- zandober...@gmail.com
- Date
- 2015-03-23 03:05:12 -0700 (Mon, 23 Mar 2015)
Log Message
[GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
https://bugs.webkit.org/show_bug.cgi?id=142964
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
instead of C's abs(). The templated nature of std::abs() ensures the proper
computation that matches the types of the passed-in values, and shuts down
a warning when compiling with Clang.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (181850 => 181851)
--- trunk/Source/WebKit2/ChangeLog 2015-03-23 10:02:08 UTC (rev 181850)
+++ trunk/Source/WebKit2/ChangeLog 2015-03-23 10:05:12 UTC (rev 181851)
@@ -1,5 +1,18 @@
2015-03-23 Zan Dobersek <zdober...@igalia.com>
+ [GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
+ https://bugs.webkit.org/show_bug.cgi?id=142964
+
+ Reviewed by Carlos Garcia Campos.
+
+ * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+ (ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
+ instead of C's abs(). The templated nature of std::abs() ensures the proper
+ computation that matches the types of the passed-in values, and shuts down
+ a warning when compiling with Clang.
+
+2015-03-23 Zan Dobersek <zdober...@igalia.com>
+
[GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
https://bugs.webkit.org/show_bug.cgi?id=142963
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (181850 => 181851)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp 2015-03-23 10:02:08 UTC (rev 181850)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp 2015-03-23 10:05:12 UTC (rev 181851)
@@ -115,8 +115,8 @@
}
if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
- || ((abs(buttonEvent->x - previousClickPoint.x()) < doubleClickDistance)
- && (abs(buttonEvent->y - previousClickPoint.y()) < doubleClickDistance)
+ || ((std::abs(buttonEvent->x - previousClickPoint.x()) < doubleClickDistance)
+ && (std::abs(buttonEvent->y - previousClickPoint.y()) < doubleClickDistance)
&& (eventTime - previousClickTime < static_cast<unsigned>(doubleClickTime))
&& (buttonEvent->button == previousClickButton)))
currentClickCount++;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes