100 #include "eikon.hrh" |
100 #include "eikon.hrh" |
101 #include "WebScrollbarDrawer.h" |
101 #include "WebScrollbarDrawer.h" |
102 #include "EventNames.h" |
102 #include "EventNames.h" |
103 #include "Editor.h" |
103 #include "Editor.h" |
104 #include "ThumbnailGenerator.h" |
104 #include "ThumbnailGenerator.h" |
105 #include <kjs_window.h> |
|
106 #include "PluginHandler.h" |
105 #include "PluginHandler.h" |
107 |
106 |
108 using namespace WebCore; |
107 using namespace WebCore; |
109 using namespace EventNames; |
108 using namespace EventNames; |
110 |
109 |
218 , m_checkerBoardBitmap(NULL) |
217 , m_checkerBoardBitmap(NULL) |
219 , m_checkerBoardDevice(NULL) |
218 , m_checkerBoardDevice(NULL) |
220 , m_checkerBoardGc(NULL) |
219 , m_checkerBoardGc(NULL) |
221 , m_checkerBoardDestroyTimer(NULL) |
220 , m_checkerBoardDestroyTimer(NULL) |
222 , m_isPinchZoomOut(false) |
221 , m_isPinchZoomOut(false) |
223 , m_jsTimeouts(0) |
222 , m_jsPaused(0) |
224 { |
223 { |
225 } |
224 } |
226 |
225 |
227 WebView::~WebView() |
226 WebView::~WebView() |
228 { |
227 { |
280 delete m_checkerBoardDestroyTimer; |
279 delete m_checkerBoardDestroyTimer; |
281 |
280 |
282 if (StaticObjectsContainer::instance()->webSurface()->topView() == this) |
281 if (StaticObjectsContainer::instance()->webSurface()->topView() == this) |
283 StaticObjectsContainer::instance()->webSurface()->setView( NULL ); |
282 StaticObjectsContainer::instance()->webSurface()->setView( NULL ); |
284 |
283 |
|
284 delete m_pausedTimeouts; |
|
285 |
285 } |
286 } |
286 |
287 |
287 // ----------------------------------------------------------------------------- |
288 // ----------------------------------------------------------------------------- |
288 // WebView::ConstructL |
289 // WebView::ConstructL |
289 // Private Class Method |
290 // Private Class Method |
3334 } |
3337 } |
3335 } |
3338 } |
3336 |
3339 |
3337 void WebView::pauseJsTimers() |
3340 void WebView::pauseJsTimers() |
3338 { |
3341 { |
3339 if(m_jsTimeouts==0) { |
3342 if(!m_jsPaused) { |
3340 WebCore::Frame *frame = core(mainFrame()); |
3343 for (Frame* frame = core(mainFrame()); frame; frame = frame->tree()->traverseNext()) { |
3341 KJS::Window* window = KJS::Window::retrieveWindow(frame); |
3344 if (KJS::Window* window = KJS::Window::retrieveWindow(frame)) { |
3342 if(window) { |
3345 KJS::PausedTimeouts* timeouts = window->pauseTimeouts(); |
3343 m_jsTimeouts = window->pauseTimeouts(); |
3346 if(timeouts) |
3344 } |
3347 m_pausedTimeouts->append(std::make_pair(frame, timeouts)); |
|
3348 } |
|
3349 } |
|
3350 m_jsPaused = (m_pausedTimeouts->size()) ? ETrue : EFalse; |
3345 } |
3351 } |
3346 } |
3352 } |
3347 |
3353 |
3348 void WebView::resumeJsTimers() |
3354 void WebView::resumeJsTimers() |
3349 { |
3355 { |
3350 if(m_jsTimeouts) { |
3356 if(m_jsPaused) { |
3351 WebCore::Frame *frame = core(mainFrame()); |
3357 TInt count = m_pausedTimeouts->size(); |
3352 KJS::Window* window = KJS::Window::retrieveWindow(frame); |
3358 for (size_t i = 0; i < count; i++) { |
3353 if(window) { |
3359 KJS::Window* window = KJS::Window::retrieveWindow(m_pausedTimeouts->at(i).first.get()); |
3354 window->resumeTimeouts(m_jsTimeouts); |
3360 if (window) { |
3355 delete m_jsTimeouts; |
3361 window->resumeTimeouts(m_pausedTimeouts->at(i).second); |
3356 m_jsTimeouts = 0; |
3362 } |
3357 } |
3363 delete m_pausedTimeouts->at(i).second; |
3358 } |
3364 } |
3359 } |
3365 m_pausedTimeouts->clear(); |
3360 // END OF FILE |
3366 m_jsPaused = EFalse; |
|
3367 } |
|
3368 } |
|
3369 |
|
3370 void WebView::resetJsTimers() |
|
3371 { |
|
3372 m_jsPaused=0; |
|
3373 m_pausedTimeouts->clear(); |
|
3374 } |
|
3375 |
3361 void WebView::scrollStatus(bool status) |
3376 void WebView::scrollStatus(bool status) |
3362 { |
3377 { |
3363 if(m_scrollingstatus != status) |
3378 if(m_scrollingstatus != status) |
3364 { |
3379 { |
3365 m_scrollingstatus = status; |
3380 m_scrollingstatus = status; |