webengine/osswebengine/WebKit/s60/webview/WebPageScrollHandler.cpp
branchRCL_3
changeset 44 800203832575
parent 41 4bd5176e1bc8
child 47 e1bea15f9a39
equal deleted inserted replaced
42:a1a5d4e727e8 44:800203832575
    41 const int KPageOverviewScrollPeriodic = 20 * 1000; // Update frequently for faster, smoother scrolling
    41 const int KPageOverviewScrollPeriodic = 20 * 1000; // Update frequently for faster, smoother scrolling
    42 const int KMicroInterval = 300000;
    42 const int KMicroInterval = 300000;
    43 const int KPageOverviewScrollStart = 1000;
    43 const int KPageOverviewScrollStart = 1000;
    44 const int KCancelDecelerationTimeout = 200000; //Decelerate only if flicked KCancelDecelerationTimeout microsec after last drag event.
    44 const int KCancelDecelerationTimeout = 200000; //Decelerate only if flicked KCancelDecelerationTimeout microsec after last drag event.
    45 
    45 
       
    46 #ifdef BRDO_PERF_IMPROVEMENTS_ENABLED_FF
       
    47 const int KScrollIntervalTimeout = 30000; // scroll timer interval in microseconds
       
    48 #else
    46 const int KScrollIntervalTimeout = 40000; // scroll timer interval in microseconds
    49 const int KScrollIntervalTimeout = 40000; // scroll timer interval in microseconds
       
    50 #endif
       
    51 
    47 const int KAngularDeviationThreshold = 160; // % deviation ignored from minor axis of motion(120 means 20 %)
    52 const int KAngularDeviationThreshold = 160; // % deviation ignored from minor axis of motion(120 means 20 %)
    48 const int KScrollThresholdPixels = 10; // scrolls only if delta is above this threshold
    53 const int KScrollThresholdPixels = 10; // scrolls only if delta is above this threshold
    49 const int KScrollDirectionBoundary = 30; // Bound around focal point within which scrolling locks in X or Y states
    54 const int KScrollDirectionBoundary = 30; // Bound around focal point within which scrolling locks in X or Y states
    50 const float KTanOfThresholdAngle = 0.46; // tan of 25 degree
    55 const float KTanOfThresholdAngle = 0.46; // tan of 25 degree
    51 
    56 
   694     if (Abs(gstSpeed.iY / gstSpeed.iX) <= KTanOfThresholdAngle) { 
   699     if (Abs(gstSpeed.iY / gstSpeed.iX) <= KTanOfThresholdAngle) { 
   695        gstSpeed.iY = 0;
   700        gstSpeed.iY = 0;
   696     }
   701     }
   697     
   702     
   698     if ((Abs(gstSpeed.iX) > 0) || (Abs(gstSpeed.iY) > 0)) {
   703     if ((Abs(gstSpeed.iX) > 0) || (Abs(gstSpeed.iY) > 0)) {
   699        m_decelGH->startDecel(gstSpeed, m_scrollbarDrawer); 
   704         started = m_decelGH->startDecel(gstSpeed, m_scrollbarDrawer); 
   700        started = true;
   705     }
   701     }
       
   702     
       
   703     
       
   704     return started;
   706     return started;
   705 }
   707 }
   706 
   708 
       
   709 void WebPageScrollHandler::stopScrolling()
       
   710 {
       
   711     if (m_scrollTimer && m_scrollTimer->IsActive()) {
       
   712         m_scrollTimer->Cancel();
       
   713    }
       
   714    if (m_scrollbarDrawer) { 
       
   715        m_scrollbarDrawer->fadeScrollbar();
       
   716    }
       
   717    m_webView->setViewIsScrolling(false);
       
   718 }
   707 //  End of File
   719 //  End of File