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

Commit fc4a69e9 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

When a window is closed, destroy the WebView properly so that WebCore is...

When a window is closed, destroy the WebView properly so that WebCore is informed of it's destruction.

Change-Id: I00002f53ec52c6056df4d7ddeec7cf0957423bd6
parent 3141e0a6
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -670,7 +670,12 @@ public class TestShellActivity extends Activity implements LayoutTestController
        public boolean onCreateWindow(WebView view, boolean dialog,
                boolean userGesture, Message resultMsg) {
            if (!mCanOpenWindows) {
                return false;
                // We can't open windows, so just send null back.
                WebView.WebViewTransport transport =
                        (WebView.WebViewTransport) resultMsg.obj;
                transport.setWebView(null);
                resultMsg.sendToTarget();
                return true;
            }

            // We never display the new window, just create the view and
@@ -688,6 +693,11 @@ public class TestShellActivity extends Activity implements LayoutTestController
            resultMsg.sendToTarget();
            return true;
        }

        @Override
        public void onCloseWindow(WebView view) {
            view.destroy();
        }
    };

    private static class NewWindowWebView extends WebView {