| Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| index 4027eeb6f03e0be49cedb37df7613dcd9b411231..900ac95dc4a8369e683e72c1a188924d851a5aa0 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
|
| @@ -621,16 +621,17 @@ public class AwContents {
|
| if (wasWindowFocused) onWindowFocusChanged(false);
|
| if (wasViewVisible) setViewVisibilityInternal(false);
|
| if (wasWindowVisible) setWindowVisibilityInternal(false);
|
| + if (wasAttached) onDetachedFromWindow();
|
| if (!wasPaused) onPause();
|
| - // Not calling onDetachedFromWindow here because native code requires GL context to release
|
| - // GL resources. This case is properly handled when destroy is called while still attached
|
| - // to window.
|
|
|
| setNewAwContents(popupNativeAwContents);
|
|
|
| // Finally refresh all view state for mContentViewCore and mNativeAwContents.
|
| if (!wasPaused) onResume();
|
| - if (wasAttached) onAttachedToWindow();
|
| + if (wasAttached) {
|
| + onAttachedToWindow();
|
| + postInvalidateOnAnimation();
|
| + }
|
| onSizeChanged(mContainerView.getWidth(), mContainerView.getHeight(), 0, 0);
|
| if (wasWindowVisible) setWindowVisibilityInternal(true);
|
| if (wasViewVisible) setViewVisibilityInternal(true);
|
|
|