diff options
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index aa38222..5f3390b 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -1,5 +1,8 @@ /* * Copyright 2006, The Android Open Source Project + * Copyright (C) 2011, 2012 Code Aurora Forum. All rights reserved. + * Copyright (C) 2012 Sony Ericsson Mobile Communications AB. + * Copyright (C) 2012 Sony Mobile Communications AB * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -4859,6 +4862,15 @@ static void Pause(JNIEnv* env, jobject obj, jint nativeClass) WebViewCore* viewImpl = reinterpret_cast<WebViewCore*>(nativeClass); Frame* mainFrame = viewImpl->mainFrame(); + + for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext()) { +#if ENABLE(WEBGL) + Document* document = frame->document(); + if (document) + document->suspendDocument(); +#endif + } + if (mainFrame) mainFrame->settings()->setMinDOMTimerInterval(BACKGROUND_TIMER_INTERVAL); @@ -4875,6 +4887,15 @@ static void Resume(JNIEnv* env, jobject obj, jint nativeClass) { WebViewCore* viewImpl = reinterpret_cast<WebViewCore*>(nativeClass); Frame* mainFrame = viewImpl->mainFrame(); + + for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext()) { +#if ENABLE(WEBGL) + Document* document = frame->document(); + if (document) + document->resumeDocument(); +#endif + } + if (mainFrame) mainFrame->settings()->setMinDOMTimerInterval(FOREGROUND_TIMER_INTERVAL); |