Changeset 231964 in webkit
- Timestamp:
- May 18, 2018 10:36:26 AM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r231948 r231964 1 2018-05-18 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Win][MiniBrowser] Create MainWindow even in transparent mode 4 https://bugs.webkit.org/show_bug.cgi?id=185597 5 6 Reviewed by Per Arne Vollan. 7 8 The current implementations doesn't create the MainWindow in 9 transparent mode. The screenshot is in Bug 58300. 10 11 There were three problems: 12 - Can't control the WebView. ie. going backward and forward. 13 - Can't quit the program. 14 - It makes implementation complicated. 15 16 * MiniBrowser/win/Common.cpp (resizeSubViews): Resize sub views 17 even in the transparent mode. 18 * MiniBrowser/win/WinMain.cpp: 19 (wWinMain): Create the main window even in the transparent mode. 20 1 21 2018-05-18 Antoine Quint <graouts@apple.com> 2 22 -
trunk/Tools/MiniBrowser/win/Common.cpp
r231707 r231964 110 110 static void resizeSubViews() 111 111 { 112 if (gMiniBrowser->usesLayeredWebView() || !gViewWindow) 113 return; 114 115 float scaleFactor = WebCore::deviceScaleFactorForWindow(gViewWindow); 112 float scaleFactor = WebCore::deviceScaleFactorForWindow(hMainWnd); 116 113 117 114 RECT rcClient; … … 124 121 MoveWindow(hForwardButtonWnd, width, 0, width, height, TRUE); 125 122 MoveWindow(hURLBarWnd, width * 2, 0, rcClient.right, height, TRUE); 123 124 ::SendMessage(hURLBarWnd, static_cast<UINT>(WM_SETFONT), reinterpret_cast<WPARAM>(gMiniBrowser->urlBarFont()), TRUE); 125 126 if (gMiniBrowser->usesLayeredWebView() || !gViewWindow) 127 return; 126 128 MoveWindow(gViewWindow, 0, height, rcClient.right, rcClient.bottom - height, TRUE); 127 128 ::SendMessage(hURLBarWnd, static_cast<UINT>(WM_SETFONT), reinterpret_cast<WPARAM>(gMiniBrowser->urlBarFont()), TRUE);129 129 } 130 130 -
trunk/Tools/MiniBrowser/win/WinMain.cpp
r231707 r231964 75 75 float scaleFactor = WebCore::deviceScaleFactorForWindow(nullptr); 76 76 77 if (usesLayeredWebView) { 78 hURLBarWnd = CreateWindow(L"EDIT", L"Type URL Here", 79 WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL, 80 scaleFactor * s_windowPosition.x, scaleFactor * (s_windowPosition.y + s_windowSize.cy), scaleFactor * s_windowSize.cx, scaleFactor * URLBAR_HEIGHT, 81 0, 0, hInst, 0); 82 } else { 83 hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, 84 CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, hInst, 0); 77 hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, 78 CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, 0, hInst, 0); 85 79 86 87 80 if (!hMainWnd) 81 return FALSE; 88 82 89 90 91 83 hBackButtonWnd = CreateWindow(L"BUTTON", L"<", WS_CHILD | WS_VISIBLE | BS_TEXT, 0, 0, 0, 0, hMainWnd, 0, hInst, 0); 84 hForwardButtonWnd = CreateWindow(L"BUTTON", L">", WS_CHILD | WS_VISIBLE | BS_TEXT, scaleFactor * CONTROLBUTTON_WIDTH, 0, 0, 0, hMainWnd, 0, hInst, 0); 85 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); 92 86 93 ShowWindow(hMainWnd, nCmdShow); 94 UpdateWindow(hMainWnd); 95 } 87 ShowWindow(hMainWnd, nCmdShow); 88 UpdateWindow(hMainWnd); 96 89 97 90 DefEditProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hURLBarWnd, GWLP_WNDPROC));
Note: See TracChangeset
for help on using the changeset viewer.