Title: [179867] trunk/Source/WebKit2
- Revision
- 179867
- Author
- [email protected]
- Date
- 2015-02-10 00:24:53 -0800 (Tue, 10 Feb 2015)
Log Message
[EFL] Use a variable to set flicking time instead of hardcoding
https://bugs.webkit.org/show_bug.cgi?id=138950
Patch by Sanghyup Lee <[email protected]> on 2015-02-10
Reviewed by Gyuyoung Kim.
Currently time of flick gesture animation is hardcoded as one second.
This patch added a static variable to increase readability.
* UIProcess/API/efl/GestureRecognizer.cpp:
(WebKit::GestureHandler::GestureHandler):
(WebKit::GestureHandler::flickAnimatorCallback):
(WebKit::GestureHandler::handleFlick):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (179866 => 179867)
--- trunk/Source/WebKit2/ChangeLog 2015-02-10 08:16:23 UTC (rev 179866)
+++ trunk/Source/WebKit2/ChangeLog 2015-02-10 08:24:53 UTC (rev 179867)
@@ -1,3 +1,18 @@
+2015-02-10 Sanghyup Lee <[email protected]>
+
+ [EFL] Use a variable to set flicking time instead of hardcoding
+ https://bugs.webkit.org/show_bug.cgi?id=138950
+
+ Reviewed by Gyuyoung Kim.
+
+ Currently time of flick gesture animation is hardcoded as one second.
+ This patch added a static variable to increase readability.
+
+ * UIProcess/API/efl/GestureRecognizer.cpp:
+ (WebKit::GestureHandler::GestureHandler):
+ (WebKit::GestureHandler::flickAnimatorCallback):
+ (WebKit::GestureHandler::handleFlick):
+
2015-02-09 Enrica Casucci <[email protected]>
Selection flickers when trying to change size of selection.
Modified: trunk/Source/WebKit2/UIProcess/API/efl/GestureRecognizer.cpp (179866 => 179867)
--- trunk/Source/WebKit2/UIProcess/API/efl/GestureRecognizer.cpp 2015-02-10 08:16:23 UTC (rev 179866)
+++ trunk/Source/WebKit2/UIProcess/API/efl/GestureRecognizer.cpp 2015-02-10 08:24:53 UTC (rev 179867)
@@ -63,6 +63,7 @@
static Eina_Bool flickAnimatorCallback(void*);
static const int s_historyCapacity = 5;
+ static constexpr float s_flickTime = 1.0;
EwkView* m_ewkView;
IntPoint m_lastPoint;
@@ -232,7 +233,7 @@
Eina_Bool GestureHandler::flickAnimatorCallback(void* data)
{
GestureHandler* gestureHandler = static_cast<GestureHandler*>(data);
- float multiplier = easeInOutQuad(gestureHandler->m_flickIndex, 0, 1.0, gestureHandler->m_flickDuration);
+ float multiplier = easeInOutQuad(gestureHandler->m_flickIndex, 0, s_flickTime, gestureHandler->m_flickDuration);
float offsetWidth = gestureHandler->m_flickOffset.width() * multiplier;
float offsetHeight = gestureHandler->m_flickOffset.height() * multiplier;
offsetWidth = (offsetWidth > 0) ? ceilf(offsetWidth) : floorf(offsetWidth);
@@ -251,7 +252,7 @@
void GestureHandler::handleFlick(const IntSize& offset)
{
m_flickOffset = offset;
- m_flickIndex = m_flickDuration = 1 / ecore_animator_frametime_get();
+ m_flickIndex = m_flickDuration = s_flickTime / ecore_animator_frametime_get();
m_flickAnimator = ecore_animator_add(flickAnimatorCallback, this);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes