Merge "When a window is closed, destroy the WebView properly so that WebCore is informed of it's destruction."
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user