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

Commit fa89c50a authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Ensure full screen plugin is dismissed when necessary.

Dismiss the full screen plugin view when the user navigates to a
new page or tab. This ensures the plugin does not cover up new
content when the browser switches tabs or loads a new URL.

Change-Id: I35d65073dbc772ab5babd20287d4d2fe598178e5
http://b/2908332
parent 3cfc508f
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -1291,6 +1291,7 @@ public class WebView extends AbsoluteLayout
    private void clearHelpers() {
        clearTextEntry();
        clearActionModes();
        dismissFullScreenMode();
    }

    /**
@@ -4911,6 +4912,13 @@ public class WebView extends AbsoluteLayout
        return mFullScreenHolder != null;
    }

    private void dismissFullScreenMode() {
        if (inFullScreenMode()) {
            mFullScreenHolder.dismiss();
            mFullScreenHolder = null;
        }
    }

    void onPinchToZoomAnimationStart() {
        // cancel the single touch handling
        cancelTouch();
@@ -6878,9 +6886,9 @@ public class WebView extends AbsoluteLayout
                    View view = (View) msg.obj;
                    int npp = msg.arg1;

                    if (mFullScreenHolder != null) {
                    if (inFullScreenMode()) {
                        Log.w(LOGTAG, "Should not have another full screen.");
                        mFullScreenHolder.dismiss();
                        dismissFullScreenMode();
                    }
                    mFullScreenHolder = new PluginFullScreenHolder(WebView.this, npp);
                    mFullScreenHolder.setContentView(view);
@@ -6891,10 +6899,7 @@ public class WebView extends AbsoluteLayout
                    break;
                }
                case HIDE_FULLSCREEN:
                    if (inFullScreenMode()) {
                        mFullScreenHolder.dismiss();
                        mFullScreenHolder = null;
                    }
                    dismissFullScreenMode();
                    break;

                case DOM_FOCUS_CHANGED: