Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4f520ae authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 5314559 - Slow menu scrolling in browser on some devices

nativeSetIsScrolling has other side effects. Just pause picture
updating when WebView loses focus.

Change-Id: I917851c806f35a91a12a25c7457712123669384f
parent d4fdc0f5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -5580,18 +5580,16 @@ public class WebView extends AbsoluteLayout
        setActive(hasWindowFocus);
        if (hasWindowFocus) {
            JWebCoreJavaBridge.setActiveWebView(this);
            if (mPictureUpdatePausedForFocusChange && mNativeClass != 0) {
            if (mPictureUpdatePausedForFocusChange) {
                WebViewCore.resumeUpdatePicture(mWebViewCore);
                nativeSetIsScrolling(false);
                mPictureUpdatePausedForFocusChange = false;
            }
        } else {
            JWebCoreJavaBridge.removeActiveWebView(this);
            final WebSettings settings = getSettings();
            if (settings != null && settings.enableSmoothTransition() && mNativeClass != 0 &&
            if (settings != null && settings.enableSmoothTransition() &&
                    mWebViewCore != null && !WebViewCore.isUpdatePicturePaused(mWebViewCore)) {
                WebViewCore.pauseUpdatePicture(mWebViewCore);
                nativeSetIsScrolling(true);
                mPictureUpdatePausedForFocusChange = true;
            }
        }