cefclient: Windows: Fix type conversion error (issue #1511).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2003 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2015-01-28 17:14:52 +00:00
parent fd5ededb27
commit 37464c2a4c
2 changed files with 12 additions and 4 deletions

View File

@ -45,7 +45,9 @@ void BrowserWindowStdWin::ShowPopup(HWND parent_hwnd,
HWND hwnd = GetHWND();
if (hwnd) {
SetParent(hwnd, parent_hwnd);
SetWindowPos(hwnd, NULL, x, y, width, height, SWP_NOZORDER);
SetWindowPos(hwnd, NULL, x, y,
static_cast<int>(width), static_cast<int>(height),
SWP_NOZORDER);
ShowWindow(hwnd, SW_SHOW);
}
}
@ -76,7 +78,9 @@ void BrowserWindowStdWin::SetBounds(int x, int y, size_t width, size_t height) {
HWND hwnd = GetHWND();
if (hwnd) {
// Set the browser window bounds.
SetWindowPos(hwnd, NULL, x, y, width, height, SWP_NOZORDER);
SetWindowPos(hwnd, NULL, x, y,
static_cast<int>(width), static_cast<int>(height),
SWP_NOZORDER);
}
}

View File

@ -114,7 +114,9 @@ void OsrWindowWin::ShowPopup(HWND parent_hwnd,
DCHECK(browser_.get());
// Create the native window.
const RECT rect = {x, y, x + width, y + height};
const RECT rect = {x, y,
x + static_cast<int>(width),
y + static_cast<int>(height)};
Create(parent_hwnd, rect);
// Send resize notification so the compositor is assigned the correct
@ -178,7 +180,9 @@ void OsrWindowWin::SetBounds(int x, int y, size_t width, size_t height) {
if (hwnd_) {
// Set the browser window bounds.
::SetWindowPos(hwnd_, NULL, x, y, width, height, SWP_NOZORDER);
::SetWindowPos(hwnd_, NULL, x, y,
static_cast<int>(width), static_cast<int>(height),
SWP_NOZORDER);
}
}