equal
deleted
inserted
replaced
128 void WebPageScrollHandler::constructL() |
128 void WebPageScrollHandler::constructL() |
129 { |
129 { |
130 m_scrollTimer = CPeriodic::NewL(CActive::EPriorityUserInput - 1); |
130 m_scrollTimer = CPeriodic::NewL(CActive::EPriorityUserInput - 1); |
131 m_pageOverviewScrollPeriodic = CPeriodic::NewL(CActive::EPriorityUserInput - 1); |
131 m_pageOverviewScrollPeriodic = CPeriodic::NewL(CActive::EPriorityUserInput - 1); |
132 m_lastPosition = TPoint(0, 0); |
132 m_lastPosition = TPoint(0, 0); |
133 |
133 m_scrollbarDrawer = WebScrollbarDrawer::NewL(); |
134 if(AknLayoutUtils::PenEnabled()) { |
134 if(AknLayoutUtils::PenEnabled()) { |
135 m_touchScrolling = true; |
135 m_touchScrolling = true; |
136 m_scrollDirectionState = ScrollDirectionUnassigned; |
136 m_scrollDirectionState = ScrollDirectionUnassigned; |
137 m_scrollbarDrawer = WebScrollbarDrawer::NewL(); |
137 |
138 #ifndef BRDO_USE_GESTURE_HELPER |
138 #ifndef BRDO_USE_GESTURE_HELPER |
139 m_decel = WebScrollingDecelerator::NewL(*m_webView); |
139 m_decel = WebScrollingDecelerator::NewL(*m_webView); |
140 #else |
140 #else |
141 m_decelGH = WebScrollingDeceleratorGH::NewL(*m_webView); |
141 m_decelGH = WebScrollingDeceleratorGH::NewL(*m_webView); |
142 #endif |
142 #endif |
580 m_webView->mainFrame()->frameView()->scrollTo(TPoint(xInDoc, yInDoc)); |
580 m_webView->mainFrame()->frameView()->scrollTo(TPoint(xInDoc, yInDoc)); |
581 |
581 |
582 } |
582 } |
583 |
583 |
584 |
584 |
585 void WebPageScrollHandler::handleScrollingGH(const MGestureEvent& aEvent) |
585 void WebPageScrollHandler::handleScrollingGH(const TGestureEvent& aEvent) |
586 { |
586 { |
587 TPoint newPos = aEvent.CurrentPos(); |
587 TPoint newPos = aEvent.CurrentPos(); |
588 m_currentPosition = newPos; |
588 m_currentPosition = newPos; |
589 if (m_webView->inPageViewMode()) { |
589 if (m_webView->inPageViewMode()) { |
590 if (!m_pageOverviewScrollPeriodic->IsActive()){ |
590 if (!m_pageOverviewScrollPeriodic->IsActive()){ |
598 setupScrolling(newPos); |
598 setupScrolling(newPos); |
599 } |
599 } |
600 } |
600 } |
601 |
601 |
602 |
602 |
603 void WebPageScrollHandler::handleTouchDownGH(const MGestureEvent& aEvent) |
603 void WebPageScrollHandler::handleTouchDownGH(const TGestureEvent& aEvent) |
604 { |
604 { |
605 TPoint newPos = aEvent.CurrentPos(); |
605 TPoint newPos = aEvent.CurrentPos(); |
606 m_lastMoveEventTime = 0; |
606 m_lastMoveEventTime = 0; |
607 m_lastPosition = newPos; |
607 m_lastPosition = newPos; |
608 m_currentPosition = newPos; |
608 m_currentPosition = newPos; |
615 m_scrollableView.m_scrollingElement = NULL; |
615 m_scrollableView.m_scrollingElement = NULL; |
616 m_scrollableView.m_frameView = NULL; |
616 m_scrollableView.m_frameView = NULL; |
617 } |
617 } |
618 |
618 |
619 |
619 |
620 void WebPageScrollHandler::handleTouchUpGH(const MGestureEvent& aEvent) |
620 void WebPageScrollHandler::handleTouchUpGH(const TGestureEvent& aEvent) |
621 { |
621 { |
622 bool decelDoesScrollbars = false; |
622 bool decelDoesScrollbars = false; |
623 TPoint newPos = aEvent.CurrentPos(); |
623 TPoint newPos = aEvent.CurrentPos(); |
624 |
624 |
625 if (m_webView->inPageViewMode()) { |
625 if (m_webView->inPageViewMode()) { |
658 m_lastMoveEventTime = 0; |
658 m_lastMoveEventTime = 0; |
659 } |
659 } |
660 } |
660 } |
661 |
661 |
662 |
662 |
663 bool WebPageScrollHandler::startDeceleration(const MGestureEvent& aEvent) |
663 bool WebPageScrollHandler::startDeceleration(const TGestureEvent& aEvent) |
664 { |
664 { |
665 bool started = false; |
665 bool started = false; |
666 TRealPoint gstSpeed = aEvent.Speed(); |
666 TRealPoint gstSpeed = aEvent.Speed(); |
667 if (Abs(gstSpeed.iX / gstSpeed.iY) <= KTanOfThresholdAngle) { |
667 if (Abs(gstSpeed.iX / gstSpeed.iY) <= KTanOfThresholdAngle) { |
668 gstSpeed.iX = 0; |
668 gstSpeed.iX = 0; |