@@ -10957,7 +10957,7 @@ index 0000000000000000000000000000000000000000..30e6ae3bdc8c1695189885afae949071
10957
10957
+} // namespace WebKit
10958
10958
diff --git a/Source/WebKit/UIProcess/win/InspectorBrowserAgentClientWin.cpp b/Source/WebKit/UIProcess/win/InspectorBrowserAgentClientWin.cpp
10959
10959
new file mode 100644
10960
- index 0000000000000000000000000000000000000000..d33b1bb189d561754e5f44cc1fa87f2760a2f424
10960
+ index 0000000000000000000000000000000000000000..7406306e47b4f3469db150eef6a71ac30e8f2f7a
10961
10961
--- /dev/null
10962
10962
+++ b/Source/WebKit/UIProcess/win/InspectorBrowserAgentClientWin.cpp
10963
10963
@@ -0,0 +1,83 @@
@@ -11015,11 +11015,11 @@ index 0000000000000000000000000000000000000000..d33b1bb189d561754e5f44cc1fa87f27
11015
11015
+
11016
11016
+RefPtr<WebPageProxy> InspectorBrowserAgentClientWin::createPage(WTF::String& error, const BrowserContext& context)
11017
11017
+{
11018
- + auto conf = & API::PageConfiguration::create().leakRef ();
11019
- + auto prefs = & WebPreferences::create(String(), "WebKit2Automation.", "WebKit2Automation.").leakRef( );
11018
+ + auto conf = API::PageConfiguration::create();
11019
+ + auto prefs = WebPreferences::create(String(), "WebKit2Automation.", "WebKit2Automation.");
11020
11020
+ conf->setProcessPool(context.processPool.get());
11021
11021
+ conf->setWebsiteDataStore(context.dataStore.get());
11022
- + return toImpl(m_createPage(toAPI(conf)));
11022
+ + return toImpl(m_createPage(toAPI(& conf.get() )));
11023
11023
+}
11024
11024
+
11025
11025
+void InspectorBrowserAgentClientWin::closeBrowser()
@@ -12549,7 +12549,7 @@ index 61e75ba190ee2de5e4229cb4baae85248a9b35b3..a2a92644239b2aa4aa27d5da848ed97c
12549
12549
+ bool m_headless;
12550
12550
};
12551
12551
diff --git a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
12552
- index f590685184e78882f611164a284eb36bf50b5099..530518dc35048b56bf298bccbcf2ce28f249b19c 100644
12552
+ index f590685184e78882f611164a284eb36bf50b5099..43c27fdbdd1e5df25bfb3164edd43b03e6fca527 100644
12553
12553
--- a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
12554
12554
+++ b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
12555
12555
@@ -39,6 +39,8 @@
@@ -12659,7 +12659,7 @@ index f590685184e78882f611164a284eb36bf50b5099..530518dc35048b56bf298bccbcf2ce28
12659
12659
void WebKitBrowserWindow::setUserAgent(_bstr_t& customUAString)
12660
12660
{
12661
12661
auto page = WKViewGetPage(m_view.get());
12662
- @@ -381,21 +384,102 @@ bool WebKitBrowserWindow::canTrustServerCertificate(WKProtectionSpaceRef protect
12662
+ @@ -381,18 +384,100 @@ bool WebKitBrowserWindow::canTrustServerCertificate(WKProtectionSpaceRef protect
12663
12663
return false;
12664
12664
}
12665
12665
@@ -12755,19 +12755,18 @@ index f590685184e78882f611164a284eb36bf50b5099..530518dc35048b56bf298bccbcf2ce28
12755
12755
+ newWindow.browserWindow()->loadURL(_bstr_t("about:blank").GetBSTR());
12756
12756
+
12757
12757
auto& newBrowserWindow = *static_cast<WebKitBrowserWindow*>(newWindow.browserWindow());
12758
- WKRetainPtr<WKPageRef> newPage = WKViewGetPage(newBrowserWindow.m_view.get());
12759
- return newPage.leakRef( );
12760
- }
12761
-
12758
+ - WKRetainPtr<WKPageRef> newPage = WKViewGetPage(newBrowserWindow.m_view.get());
12759
+ + return WKViewGetPage(newBrowserWindow.m_view.get() );
12760
+ + }
12761
+ +
12762
12762
+
12763
12763
+WKPageRef WebKitBrowserWindow::createNewPage(WKPageRef, WKPageConfigurationRef configuration, WKNavigationActionRef, WKWindowFeaturesRef, const void*)
12764
12764
+{
12765
- + return createViewCallback(configuration, false);
12766
- +}
12767
- +
12768
- void WebKitBrowserWindow::didNotHandleKeyEvent(WKPageRef, WKNativeEventPtr event, const void* clientInfo)
12769
- {
12770
- auto& thisWindow = toWebKitBrowserWindow(clientInfo);
12765
+ + // Retain popups as per API contract.
12766
+ + WKRetainPtr<WKPageRef> newPage = createViewCallback(configuration, false);
12767
+ return newPage.leakRef();
12768
+ }
12769
+
12771
12770
diff --git a/Tools/MiniBrowser/win/WebKitBrowserWindow.h b/Tools/MiniBrowser/win/WebKitBrowserWindow.h
12772
12771
index e8efe3c2838a9bb553a1c59ff6c1fb25d2f96500..9131c6e8259772c8e8c066125acfac82f408ddb9 100644
12773
12772
--- a/Tools/MiniBrowser/win/WebKitBrowserWindow.h
0 commit comments