WebKit Bugzilla
Attachment 340285 Details for
Bug 185597
: [Win][MiniBrowser] Create MainWindow even in transparent mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185597-20180514121210.patch (text/plain), 4.79 KB, created by
Fujii Hironori
on 2018-05-13 20:12:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-05-13 20:12:11 PDT
Size:
4.79 KB
patch
obsolete
>Subversion Revision: 231744 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 8cb18d9cff772b2b6c4a975a62af39fecd83940e..773c5e94d9d62c8c7c377dd3882f2831e65f00a4 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,23 @@ >+2018-05-13 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][MiniBrowser] Create MainWindow even in transparent mode >+ https://bugs.webkit.org/show_bug.cgi?id=185597 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The current implementations doesn't create the MainWindow in >+ transparent mode. The screenshot is in Bug 58300. >+ >+ There were three problems: >+ - Can't control the WebView. ie. going backward and forward. >+ - Can't quit the program. >+ - It makes implementation complicated. >+ >+ * MiniBrowser/win/Common.cpp (resizeSubViews): Resize sub views >+ even in the transparent mode. >+ * MiniBrowser/win/WinMain.cpp: >+ (wWinMain): Create the main window even in the transparent mode. >+ > 2018-05-11 Leo Balter <leonardo.balter@gmail.com> > > Test262 Runner should search for the Debug JSC by default >diff --git a/Tools/MiniBrowser/win/Common.cpp b/Tools/MiniBrowser/win/Common.cpp >index 67f238390e86025489ea709ccfa0b2c3cf30f82e..11c6549f36838fb8c8bc9541605713cf30e3d3a2 100644 >--- a/Tools/MiniBrowser/win/Common.cpp >+++ b/Tools/MiniBrowser/win/Common.cpp >@@ -109,10 +109,7 @@ float deviceScaleFactorForWindow(HWND); > > static void resizeSubViews() > { >- if (gMiniBrowser->usesLayeredWebView() || !gViewWindow) >- return; >- >- float scaleFactor = WebCore::deviceScaleFactorForWindow(gViewWindow); >+ float scaleFactor = WebCore::deviceScaleFactorForWindow(hMainWnd); > > RECT rcClient; > GetClientRect(hMainWnd, &rcClient); >@@ -123,9 +120,12 @@ static void resizeSubViews() > 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() >diff --git a/Tools/MiniBrowser/win/WinMain.cpp b/Tools/MiniBrowser/win/WinMain.cpp >index 0c9b9a25268d08815e20dd7cd70d57154e8eb7b1..087e94df06822305f35c7517e78209d832452d04 100644 >--- a/Tools/MiniBrowser/win/WinMain.cpp >+++ b/Tools/MiniBrowser/win/WinMain.cpp >@@ -74,25 +74,18 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, > > 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); >- >- 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); >- >- ShowWindow(hMainWnd, nCmdShow); >- UpdateWindow(hMainWnd); >- } >+ hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, >+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, hInst, 0); >+ >+ 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); >+ >+ ShowWindow(hMainWnd, nCmdShow); >+ UpdateWindow(hMainWnd); > > DefEditProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hURLBarWnd, GWLP_WNDPROC)); > DefButtonProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hBackButtonWnd, GWLP_WNDPROC));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185597
:
340283
|
340284
| 340285 |
340617
|
340658