Modified: trunk/Tools/MiniBrowser/win/Common.cpp (231963 => 231964)
--- trunk/Tools/MiniBrowser/win/Common.cpp 2018-05-18 17:34:19 UTC (rev 231963)
+++ trunk/Tools/MiniBrowser/win/Common.cpp 2018-05-18 17:36:26 UTC (rev 231964)
@@ -109,11 +109,8 @@
static void resizeSubViews()
{
- if (gMiniBrowser->usesLayeredWebView() || !gViewWindow)
- return;
+ float scaleFactor = WebCore::deviceScaleFactorForWindow(hMainWnd);
- float scaleFactor = WebCore::deviceScaleFactorForWindow(gViewWindow);
-
RECT rcClient;
GetClientRect(hMainWnd, &rcClient);
@@ -123,9 +120,12 @@
MoveWindow(hBackButtonWnd, 0, 0, width, height, TRUE);
MoveWindow(hForwardButtonWnd, width, 0, width, height, TRUE);
MoveWindow(hURLBarWnd, width * 2, 0, rcClient.right, height, TRUE);
- MoveWindow(gViewWindow, 0, height, rcClient.right, rcClient.bottom - height, TRUE);
::SendMessage(hURLBarWnd, static_cast<UINT>(WM_SETFONT), reinterpret_cast<WPARAM>(gMiniBrowser->urlBarFont()), TRUE);
+
+ if (gMiniBrowser->usesLayeredWebView() || !gViewWindow)
+ return;
+ MoveWindow(gViewWindow, 0, height, rcClient.right, rcClient.bottom - height, TRUE);
}
static void computeFullDesktopFrame()
Modified: trunk/Tools/MiniBrowser/win/WinMain.cpp (231963 => 231964)
--- trunk/Tools/MiniBrowser/win/WinMain.cpp 2018-05-18 17:34:19 UTC (rev 231963)
+++ trunk/Tools/MiniBrowser/win/WinMain.cpp 2018-05-18 17:36:26 UTC (rev 231964)
@@ -74,25 +74,18 @@
float scaleFactor = WebCore::deviceScaleFactorForWindow(nullptr);
- if (usesLayeredWebView) {
- hURLBarWnd = CreateWindow(L"EDIT", L"Type URL Here",
- WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL,
- scaleFactor * s_windowPosition.x, scaleFactor * (s_windowPosition.y + s_windowSize.cy), scaleFactor * s_windowSize.cx, scaleFactor * URLBAR_HEIGHT,
- 0, 0, hInst, 0);
- } else {
- hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, hInst, 0);
+ hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, hInst, 0);
- if (!hMainWnd)
- return FALSE;
+ if (!hMainWnd)
+ return FALSE;
- hBackButtonWnd = CreateWindow(L"BUTTON", L"<", WS_CHILD | WS_VISIBLE | BS_TEXT, 0, 0, 0, 0, hMainWnd, 0, hInst, 0);
- hForwardButtonWnd = CreateWindow(L"BUTTON", L">", WS_CHILD | WS_VISIBLE | BS_TEXT, scaleFactor * CONTROLBUTTON_WIDTH, 0, 0, 0, hMainWnd, 0, hInst, 0);
- hURLBarWnd = CreateWindow(L"EDIT", 0, WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL, scaleFactor * CONTROLBUTTON_WIDTH * 2, 0, 0, 0, hMainWnd, 0, hInst, 0);
+ hBackButtonWnd = CreateWindow(L"BUTTON", L"<", WS_CHILD | WS_VISIBLE | BS_TEXT, 0, 0, 0, 0, hMainWnd, 0, hInst, 0);
+ hForwardButtonWnd = CreateWindow(L"BUTTON", L">", WS_CHILD | WS_VISIBLE | BS_TEXT, scaleFactor * CONTROLBUTTON_WIDTH, 0, 0, 0, hMainWnd, 0, hInst, 0);
+ hURLBarWnd = CreateWindow(L"EDIT", 0, WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL, scaleFactor * CONTROLBUTTON_WIDTH * 2, 0, 0, 0, hMainWnd, 0, hInst, 0);
- ShowWindow(hMainWnd, nCmdShow);
- UpdateWindow(hMainWnd);
- }
+ ShowWindow(hMainWnd, nCmdShow);
+ UpdateWindow(hMainWnd);
DefEditProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hURLBarWnd, GWLP_WNDPROC));
DefButtonProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hBackButtonWnd, GWLP_WNDPROC));