MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Browser / ResizeUIWebViews

Method ResizeUIWebViews

BrowserWindow.cpp:831–863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831HRESULT BrowserWindow::ResizeUIWebViews()
832{
833 if (m_controlsWebView != nullptr)
834 {
835 RECT bounds;
836 GetClientRect(m_hWnd, &bounds);
837 bounds.bottom = bounds.top + GetDPIAwareBound(c_uiBarHeight);
838 bounds.bottom += 1;
839
840 RETURN_IF_FAILED(m_controlsController->put_Bounds(bounds));
841 }
842
843 if (m_optionsWebView != nullptr)
844 {
845 RECT bounds;
846 GetClientRect(m_hWnd, &bounds);
847 bounds.top = GetDPIAwareBound(c_uiBarHeight);
848 bounds.bottom = bounds.top + GetDPIAwareBound(c_optionsDropdownHeight);
849 bounds.left = bounds.right - GetDPIAwareBound(c_optionsDropdownWidth);
850
851 RETURN_IF_FAILED(m_optionsController->put_Bounds(bounds));
852 }
853
854 // Workaround for black controls WebView issue in Windows 7
855 HWND wvWindow = GetWindow(m_hWnd, GW_CHILD);
856 while (wvWindow != nullptr)
857 {
858 UpdateWindow(wvWindow);
859 wvWindow = GetWindow(wvWindow, GW_HWNDNEXT);
860 }
861
862 return S_OK;
863}
864
865void BrowserWindow::UpdateMinWindowSize()
866{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected