Skip to content

Commit 3f65e95

Browse files
author
Jochen Neubeck
committed
Fix the address bar's security label
1 parent fc7223b commit 3f65e95

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

BrowserWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ HRESULT BrowserWindow::HandleTabSecurityUpdate(size_t tabId, ICoreWebView2* webv
730730
jsonObj[L"message"] = web::json::value(MG_SECURITY_UPDATE);
731731
jsonObj[L"args"] = web::json::value::parse(L"{}");
732732
jsonObj[L"args"][L"tabId"] = web::json::value::number(tabId);
733-
jsonObj[L"args"][L"state"] = securityEvent.at(L"securityState");
733+
jsonObj[L"args"][L"state"] = securityEvent.at(L"visibleSecurityState");
734734

735735
return PostJsonToWebView(jsonObj, m_controlsWebView.Get());
736736
}

Tab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ HRESULT Tab::Init(ICoreWebView2Environment* env, bool shouldBeActive)
6969
// Enable listening for security events to update secure icon
7070
RETURN_IF_FAILED(m_contentWebView->CallDevToolsProtocolMethod(L"Security.enable", L"{}", nullptr));
7171

72-
BrowserWindow::CheckFailure(m_contentWebView->GetDevToolsProtocolEventReceiver(L"Security.securityStateChanged", &m_securityStateChangedReceiver), L"");
72+
BrowserWindow::CheckFailure(m_contentWebView->GetDevToolsProtocolEventReceiver(L"Security.visibleSecurityStateChanged", &m_securityStateChangedReceiver), L"");
7373

7474
// Forward security status updates to browser
7575
RETURN_IF_FAILED(m_securityStateChangedReceiver->add_DevToolsProtocolEventReceived(Callback<ICoreWebView2DevToolsProtocolEventReceivedEventHandler>(

wvbrowser_ui/controls_ui/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ function updateLockIcon() {
336336
return;
337337
}
338338

339-
switch (activeTab.securityState) {
339+
switch (activeTab.securityState?.securityState) {
340340
case 'insecure':
341341
labelElement.className = 'label-insecure';
342342
break;

0 commit comments

Comments
 (0)