@@ -4738,18 +4738,6 @@ index 87930048f4fd18d6098af7de4da25be532df5931..2bb2afcf9473b0d5d97efbe18dd7b814
4738
4738
Vector<WTF::Function<void(bool)>> m_listeners;
4739
4739
Timer m_updateStateTimer;
4740
4740
4741
- diff --git a/Source/WebCore/platform/network/curl/CookieJarDB.h b/Source/WebCore/platform/network/curl/CookieJarDB.h
4742
- index 112f632128b1aa72b4639b62a3eb5a79e37c5f80..37cc9c38d914c13361cf11a5a175d4df3da09f21 100644
4743
- --- a/Source/WebCore/platform/network/curl/CookieJarDB.h
4744
- +++ b/Source/WebCore/platform/network/curl/CookieJarDB.h
4745
- @@ -65,6 +65,7 @@ public:
4746
- bool deleteCookies(const String& url);
4747
- bool deleteAllCookies();
4748
-
4749
- + Vector<Cookie> getAllCookies();
4750
- WEBCORE_EXPORT CookieJarDB(const String& databasePath);
4751
- WEBCORE_EXPORT ~CookieJarDB();
4752
-
4753
4741
diff --git a/Source/WebCore/platform/win/KeyEventWin.cpp b/Source/WebCore/platform/win/KeyEventWin.cpp
4754
4742
index 44737686187a06a92c408ea60b63a48ac8481334..c754a763688b52e7ddd47493296ef9b0c6adc527 100644
4755
4743
--- a/Source/WebCore/platform/win/KeyEventWin.cpp
@@ -12070,18 +12058,6 @@ index 4c5147dcd38a53e2feaeaae0fce38f92dc60eba6..4b1cab0c187352688740c7cca79483fa
12070
12058
12071
12059
return 0;
12072
12060
}
12073
- diff --git a/Tools/MiniBrowser/win/BrowserWindow.h b/Tools/MiniBrowser/win/BrowserWindow.h
12074
- index 0989d7b1470eaf6b1453861bf482ae68f287aa8d..a7ec3facc0973a128cc4ba07b67e08e3dcce8a4f 100644
12075
- --- a/Tools/MiniBrowser/win/BrowserWindow.h
12076
- +++ b/Tools/MiniBrowser/win/BrowserWindow.h
12077
- @@ -51,7 +51,6 @@ public:
12078
-
12079
- virtual void print() = 0;
12080
- virtual void launchInspector() = 0;
12081
- - virtual void openProxySettings() = 0;
12082
-
12083
- virtual _bstr_t userAgent() = 0;
12084
- void setUserAgent(UINT menuID);
12085
12061
diff --git a/Tools/MiniBrowser/win/Common.cpp b/Tools/MiniBrowser/win/Common.cpp
12086
12062
index 87fde928c12a91f13a4f8bc2f2dc24097e42f2d0..c81685683a61cfa9f39de2de695e3c7a9b0ab1e3 100644
12087
12063
--- a/Tools/MiniBrowser/win/Common.cpp
@@ -12363,7 +12339,7 @@ index d79c6fdc4fa05e1e4b9acdcc6932e571163320eb..d7902d4d0da67b9874ce32004e465b13
12363
12339
+ bool m_headless;
12364
12340
};
12365
12341
diff --git a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
12366
- index dc2b3f257600e3f4d172875ebb821769a160979d..5a33e4bd2d329e9060d33409b8cabbfcbc886c5a 100644
12342
+ index dc2b3f257600e3f4d172875ebb821769a160979d..852f3207690c53f4fb5657d3f2d5709e7972a272 100644
12367
12343
--- a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
12368
12344
+++ b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
12369
12345
@@ -39,6 +39,8 @@
@@ -12415,65 +12391,53 @@ index dc2b3f257600e3f4d172875ebb821769a160979d..5a33e4bd2d329e9060d33409b8cabbfc
12415
12391
WKPageSetPageUIClient(page, &uiClient.base);
12416
12392
12417
12393
WKPageStateClientV0 stateClient = { };
12418
- @@ -159,28 +167,30 @@ WebKitBrowserWindow::WebKitBrowserWindow(BrowserWindowClient& client, WKPageConf
12394
+ @@ -159,7 +167,6 @@ WebKitBrowserWindow::WebKitBrowserWindow(BrowserWindowClient& client, WKPageConf
12419
12395
stateClient.didChangeActiveURL = didChangeActiveURL;
12420
12396
WKPageSetPageStateClient(page, &stateClient.base);
12421
12397
12422
12398
- updateProxySettings();
12423
12399
resetZoom();
12424
12400
}
12425
12401
12426
- -void WebKitBrowserWindow::updateProxySettings()
12402
+ @@ -183,6 +190,29 @@ void WebKitBrowserWindow::updateProxySettings()
12403
+ WKWebsiteDataStoreEnableCustomNetworkProxySettings(store, url.get(), excludeHosts.get());
12404
+ }
12405
+
12427
12406
+WebKitBrowserWindow::~WebKitBrowserWindow()
12428
- {
12429
- - auto context = WKPageGetContext(WKViewGetPage(m_view.get()));
12430
- - auto store = WKWebsiteDataStoreGetDefaultDataStore();
12407
+ +{
12431
12408
+ if (m_alertDialog) {
12432
12409
+ WKRelease(m_alertDialog);
12433
12410
+ m_alertDialog = NULL;
12434
12411
+ }
12435
-
12436
- - if (!m_proxy.enable) {
12437
- - WKWebsiteDataStoreDisableNetworkProxySettings(store);
12438
- - return;
12412
+ +
12439
12413
+ if (m_confirmDialog) {
12440
12414
+ WKRelease(m_confirmDialog);
12441
12415
+ m_confirmDialog = NULL;
12442
- }
12443
-
12444
- - if (!m_proxy.custom) {
12445
- - WKWebsiteDataStoreEnableDefaultNetworkProxySettings(store);
12446
- - return;
12416
+ + }
12417
+ +
12447
12418
+ if (m_promptDialog) {
12448
12419
+ WKRelease(m_promptDialog);
12449
12420
+ m_promptDialog = NULL;
12450
- }
12451
-
12452
- - auto url = createWKURL(m_proxy.url);
12453
- - auto excludeHosts = createWKString(m_proxy.excludeHosts);
12454
- - WKWebsiteDataStoreEnableCustomNetworkProxySettings(store, url.get(), excludeHosts.get());
12421
+ + }
12422
+ +
12455
12423
+ if (m_beforeUnloadDialog) {
12456
12424
+ WKRelease(m_beforeUnloadDialog);
12457
12425
+ m_beforeUnloadDialog = NULL;
12458
12426
+ }
12459
- }
12460
-
12427
+ + }
12428
+ +
12461
12429
HRESULT WebKitBrowserWindow::init()
12462
- @@ -247,13 +257,6 @@ void WebKitBrowserWindow::launchInspector()
12463
- WKInspectorShow(inspector);
12430
+ {
12431
+ return S_OK;
12432
+ @@ -251,7 +281,6 @@ void WebKitBrowserWindow::openProxySettings()
12433
+ {
12434
+ if (askProxySettings(m_hMainWnd, m_proxy))
12435
+ updateProxySettings();
12436
+ -
12464
12437
}
12465
12438
12466
- -void WebKitBrowserWindow::openProxySettings()
12467
- -{
12468
- - if (askProxySettings(m_hMainWnd, m_proxy))
12469
- - updateProxySettings();
12470
- -
12471
- -}
12472
- -
12473
12439
void WebKitBrowserWindow::setUserAgent(_bstr_t& customUAString)
12474
- {
12475
- auto page = WKViewGetPage(m_view.get());
12476
- @@ -381,18 +384,100 @@ bool WebKitBrowserWindow::canTrustServerCertificate(WKProtectionSpaceRef protect
12440
+ @@ -381,18 +410,100 @@ bool WebKitBrowserWindow::canTrustServerCertificate(WKProtectionSpaceRef protect
12477
12441
return false;
12478
12442
}
12479
12443
@@ -12505,7 +12469,9 @@ index dc2b3f257600e3f4d172875ebb821769a160979d..5a33e4bd2d329e9060d33409b8cabbfc
12505
12469
+}
12506
12470
+
12507
12471
+void WebKitBrowserWindow::runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptPromptResultListenerRef listener, const void *clientInfo)
12508
- +{
12472
+ {
12473
+ - auto& newWindow = MainWindow::create().leakRef();
12474
+ - auto factory = [configuration](BrowserWindowClient& client, HWND mainWnd, bool) -> auto {
12509
12475
+ auto& thisWindow = toWebKitBrowserWindow(clientInfo);
12510
12476
+ WKRetain(listener);
12511
12477
+ thisWindow.m_promptDialog = listener;
@@ -12552,9 +12518,7 @@ index dc2b3f257600e3f4d172875ebb821769a160979d..5a33e4bd2d329e9060d33409b8cabbfc
12552
12518
+}
12553
12519
+
12554
12520
+WKPageRef WebKitBrowserWindow::createViewCallback(WKPageConfigurationRef configuration, bool navigate)
12555
- {
12556
- - auto& newWindow = MainWindow::create().leakRef();
12557
- - auto factory = [configuration](BrowserWindowClient& client, HWND mainWnd, bool) -> auto {
12521
+ +{
12558
12522
+ auto context = WKPageConfigurationGetContext(configuration);
12559
12523
+ auto dataStore = WKPageConfigurationGetWebsiteDataStore(configuration);
12560
12524
+ auto& newWindow = MainWindow::create(context, dataStore, s_headless).leakRef();
@@ -12582,7 +12546,7 @@ index dc2b3f257600e3f4d172875ebb821769a160979d..5a33e4bd2d329e9060d33409b8cabbfc
12582
12546
}
12583
12547
12584
12548
diff --git a/Tools/MiniBrowser/win/WebKitBrowserWindow.h b/Tools/MiniBrowser/win/WebKitBrowserWindow.h
12585
- index 373d0de77e852c673a6615e0acedd5195e3c021b..9a7f46822593ceb984520cfc90bd7c08d04bf5f7 100644
12549
+ index 373d0de77e852c673a6615e0acedd5195e3c021b..2e63607a2299b57947f367fcebc1aa88374827fc 100644
12586
12550
--- a/Tools/MiniBrowser/win/WebKitBrowserWindow.h
12587
12551
+++ b/Tools/MiniBrowser/win/WebKitBrowserWindow.h
12588
12552
@@ -26,6 +26,7 @@
@@ -12609,24 +12573,7 @@ index 373d0de77e852c673a6615e0acedd5195e3c021b..9a7f46822593ceb984520cfc90bd7c08
12609
12573
12610
12574
HRESULT init() override;
12611
12575
HWND hwnd() override;
12612
- @@ -49,7 +54,6 @@ private:
12613
-
12614
- void print() override;
12615
- void launchInspector() override;
12616
- - void openProxySettings() override;
12617
-
12618
- _bstr_t userAgent() override;
12619
- void setUserAgent(_bstr_t&) override;
12620
- @@ -61,8 +65,6 @@ private:
12621
- void zoomIn() override;
12622
- void zoomOut() override;
12623
-
12624
- - void updateProxySettings();
12625
- -
12626
- bool canTrustServerCertificate(WKProtectionSpaceRef);
12627
-
12628
- static void didChangeTitle(const void*);
12629
- @@ -71,6 +73,12 @@ private:
12576
+ @@ -71,6 +76,12 @@ private:
12630
12577
static void didChangeActiveURL(const void*);
12631
12578
static void didReceiveAuthenticationChallenge(WKPageRef, WKAuthenticationChallengeRef, const void*);
12632
12579
static WKPageRef createNewPage(WKPageRef, WKPageConfigurationRef, WKNavigationActionRef, WKWindowFeaturesRef, const void *);
@@ -12639,7 +12586,7 @@ index 373d0de77e852c673a6615e0acedd5195e3c021b..9a7f46822593ceb984520cfc90bd7c08
12639
12586
static void didNotHandleKeyEvent(WKPageRef, WKNativeEventPtr, const void*);
12640
12587
12641
12588
BrowserWindowClient& m_client;
12642
- @@ -78,4 +86 ,8 @@ private:
12589
+ @@ -78,4 +89 ,8 @@ private:
12643
12590
HWND m_hMainWnd { nullptr };
12644
12591
ProxySettings m_proxy { };
12645
12592
std::unordered_map<std::wstring, std::wstring> m_acceptedServerTrustCerts;
0 commit comments