Changeset 179867 in webkit


Ignore:
Timestamp:
Feb 10, 2015 12:24:53 AM (9 years ago)
Author:
commit-queue@webkit.org
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 <sh53.lee@samsung.com> 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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r179847 r179867  
     12015-02-10  Sanghyup Lee  <sh53.lee@samsung.com>
     2
     3        [EFL] Use a variable to set flicking time instead of hardcoding
     4        https://bugs.webkit.org/show_bug.cgi?id=138950
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Currently time of flick gesture animation is hardcoded as one second.
     9        This patch added a static variable to increase readability.
     10
     11        * UIProcess/API/efl/GestureRecognizer.cpp:
     12        (WebKit::GestureHandler::GestureHandler):
     13        (WebKit::GestureHandler::flickAnimatorCallback):
     14        (WebKit::GestureHandler::handleFlick):
     15
    1162015-02-09  Enrica Casucci  <enrica@apple.com>
    217
  • trunk/Source/WebKit2/UIProcess/API/efl/GestureRecognizer.cpp

    r163284 r179867  
    6464
    6565    static const int s_historyCapacity = 5;
     66    static constexpr float s_flickTime = 1.0;
    6667
    6768    EwkView* m_ewkView;
     
    233234{
    234235    GestureHandler* gestureHandler = static_cast<GestureHandler*>(data);
    235     float multiplier = easeInOutQuad(gestureHandler->m_flickIndex, 0, 1.0, gestureHandler->m_flickDuration);
     236    float multiplier = easeInOutQuad(gestureHandler->m_flickIndex, 0, s_flickTime, gestureHandler->m_flickDuration);
    236237    float offsetWidth = gestureHandler->m_flickOffset.width() * multiplier;
    237238    float offsetHeight = gestureHandler->m_flickOffset.height() * multiplier;
     
    252253{
    253254    m_flickOffset = offset;
    254     m_flickIndex = m_flickDuration = 1 / ecore_animator_frametime_get();
     255    m_flickIndex = m_flickDuration = s_flickTime / ecore_animator_frametime_get();
    255256    m_flickAnimator = ecore_animator_add(flickAnimatorCallback, this);
    256257}
Note: See TracChangeset for help on using the changeset viewer.