equal
deleted
inserted
replaced
128 const int KZoomLevelMinValue = 10; |
128 const int KZoomLevelMinValue = 10; |
129 |
129 |
130 const int KZoomBgRectColor = 209; |
130 const int KZoomBgRectColor = 209; |
131 const int KZoomDefaultLevel = 8; //100% |
131 const int KZoomDefaultLevel = 8; //100% |
132 const int defaultCacheCapacity = 256 * 1024; |
132 const int defaultCacheCapacity = 256 * 1024; |
|
133 |
|
134 const int KMaxMissedDrawsAllowed = 5;//Max missed repaint allowed before paint happens |
133 |
135 |
134 // LOCAL FUNCTION PROTOTYPES |
136 // LOCAL FUNCTION PROTOTYPES |
135 TInt doRepaintCb( TAny* ptr ); |
137 TInt doRepaintCb( TAny* ptr ); |
136 TInt doFepCb( TAny* ptr ); |
138 TInt doFepCb( TAny* ptr ); |
137 |
139 |
201 , m_prevEditMode(false) |
203 , m_prevEditMode(false) |
202 , m_firedEvent(0) |
204 , m_firedEvent(0) |
203 , m_waitTimer(0) |
205 , m_waitTimer(0) |
204 , m_pinchZoomHandler(NULL) |
206 , m_pinchZoomHandler(NULL) |
205 , m_isPinchZoom(false) |
207 , m_isPinchZoom(false) |
|
208 , m_drawsMissed(0) |
206 { |
209 { |
207 } |
210 } |
208 |
211 |
209 WebView::~WebView() |
212 WebView::~WebView() |
210 { |
213 { |
628 f = f->tree()->traverseNext(); |
631 f = f->tree()->traverseNext(); |
629 } |
632 } |
630 layoutPending = false; |
633 layoutPending = false; |
631 } |
634 } |
632 |
635 |
633 if ( !layoutPending || !isLoading()) { |
636 if ( !layoutPending || (m_drawsMissed >= KMaxMissedDrawsAllowed && !isLoading())) { |
|
637 m_drawsMissed = 0; |
634 bool needsDraw = false; |
638 bool needsDraw = false; |
635 m_repaints.Tidy(); |
639 m_repaints.Tidy(); |
636 for (int i=0; i<m_repaints.Count(); ++i) { |
640 for (int i=0; i<m_repaints.Count(); ++i) { |
637 TRect r = m_repaints[i]; |
641 TRect r = m_repaints[i]; |
638 if (r.Intersects(viewRect)) { |
642 if (r.Intersects(viewRect)) { |
650 m_brctl->DrawNow(); |
654 m_brctl->DrawNow(); |
651 } |
655 } |
652 |
656 |
653 // dont do next async repaint until KRepaintDelay |
657 // dont do next async repaint until KRepaintDelay |
654 m_repaints.Clear(); |
658 m_repaints.Clear(); |
|
659 } |
|
660 else{ |
|
661 m_drawsMissed++; |
655 } |
662 } |
656 m_repainttimer->Cancel(); |
663 m_repainttimer->Cancel(); |
657 // tot:fixme TBool complete = iWebkitControl->IsProgressComplete(); && CImageRendererFactory::Instance()->DecodeCount()==0; |
664 // tot:fixme TBool complete = iWebkitControl->IsProgressComplete(); && CImageRendererFactory::Instance()->DecodeCount()==0; |
658 |
665 |
659 TBool complete = ETrue; |
666 TBool complete = ETrue; |
2994 else { |
3001 else { |
2995 setPinchBitmapZoomOut(zoomLevel); |
3002 setPinchBitmapZoomOut(zoomLevel); |
2996 } |
3003 } |
2997 m_currentZoomLevel = zoomLevel; |
3004 m_currentZoomLevel = zoomLevel; |
2998 DrawNow(); |
3005 DrawNow(); |
|
3006 PluginSkin* pluginskin = mainFrame()->focusedPlugin(); |
|
3007 if(pluginskin) |
|
3008 { |
|
3009 pluginskin->deActivate(); |
|
3010 } |
2999 } |
3011 } |
3000 |
3012 |
3001 //------------------------------------------------------------------------------- |
3013 //------------------------------------------------------------------------------- |
3002 // WebView::setPinchBitmapZoomIn |
3014 // WebView::setPinchBitmapZoomIn |
3003 //------------------------------------------------------------------------------- |
3015 //------------------------------------------------------------------------------- |