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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user