Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 356451 Details for
Bug 226218
[patch]
patch v3
widget.patch (text/plain), 8.45 KB, created by
Makoto Kato [:m_kato]
(
hide
)
Description:
patch v3
Filename:
MIME Type:
Creator:
Makoto Kato [:m_kato]
Size:
8.45 KB
patch
obsolete
>diff --git a/widget/src/windows/nsSwitchToUIThread.h b/widget/src/windows/nsSwitchToUIThread.h >--- a/widget/src/windows/nsSwitchToUIThread.h >+++ b/widget/src/windows/nsSwitchToUIThread.h >@@ -61,9 +61,9 @@ struct MethodInfo { > nsSwitchToUIThread* target; > UINT methodId; > int nArgs; >- DWORD* args; >+ DWORD_PTR* args; > >- MethodInfo(nsSwitchToUIThread *obj, UINT id, int numArgs=0, DWORD *arguments = 0) { >+ MethodInfo(nsSwitchToUIThread *obj, UINT id, int numArgs=0, DWORD_PTR *arguments = 0) { > target = obj; > methodId = id; > nArgs = numArgs; >diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp >--- a/widget/src/windows/nsWindow.cpp >+++ b/widget/src/windows/nsWindow.cpp >@@ -559,7 +559,7 @@ HWND nsWindow::GetTopLevelHWND(HWND aWnd > > #ifndef WINCE > if (aStopOnDialogOrPopup) { >- DWORD style = ::GetWindowLongW(curWnd, GWL_STYLE); >+ DWORD_PTR style = ::GetWindowLongPtrW(curWnd, GWL_STYLE); > > VERIFY_WINDOW_STYLE(style); > >@@ -587,7 +587,7 @@ HWND nsWindow::GetTopLevelHWND(HWND aWnd > > BOOL CALLBACK nsWindow::BroadcastMsgToChildren(HWND aWnd, LPARAM aMsg) > { >- WNDPROC winProc = (WNDPROC)::GetWindowLongW(aWnd, GWL_WNDPROC); >+ WNDPROC winProc = (WNDPROC)::GetWindowLongPtrW(aWnd, GWLP_WNDPROC); > if (winProc == &nsWindow::WindowProc) { > // it's one of our windows so go ahead and send a message to it > ::CallWindowProcW(winProc, aWnd, aMsg, 0, 0); >@@ -1206,14 +1206,14 @@ nsWindow::StandardWindowCreate(nsIWidget > > nsToolkit* toolkit = (nsToolkit *)mToolkit; > if (toolkit && !toolkit->IsGuiThread()) { >- DWORD args[7]; >- args[0] = (DWORD)aParent; >- args[1] = (DWORD)&aRect; >- args[2] = (DWORD)aHandleEventFunction; >- args[3] = (DWORD)aContext; >- args[4] = (DWORD)aAppShell; >- args[5] = (DWORD)aToolkit; >- args[6] = (DWORD)aInitData; >+ DWORD_PTR args[7]; >+ args[0] = (DWORD_PTR)aParent; >+ args[1] = (DWORD_PTR)&aRect; >+ args[2] = (DWORD_PTR)aHandleEventFunction; >+ args[3] = (DWORD_PTR)aContext; >+ args[4] = (DWORD_PTR)aAppShell; >+ args[5] = (DWORD_PTR)aToolkit; >+ args[6] = (DWORD_PTR)aInitData; > > if (nsnull != aParent) { > // nsIWidget parent dispatch >@@ -1611,7 +1611,7 @@ NS_METHOD nsWindow::Show(PRBool bState) > HWND wndAfter = ::GetForegroundWindow(); > if (!wndAfter) > wndAfter = HWND_BOTTOM; >- else if (GetWindowLong(wndAfter, GWL_EXSTYLE) & WS_EX_TOPMOST) >+ else if (GetWindowLongPtrW(wndAfter, GWL_EXSTYLE) & WS_EX_TOPMOST) > wndAfter = HWND_TOP; > ::SetWindowPos(mWnd, wndAfter, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | > SWP_NOMOVE | SWP_NOACTIVATE); >@@ -1691,7 +1691,7 @@ NS_METHOD nsWindow::PlaceBehind(nsTopLev > HWND wndAfter = ::GetForegroundWindow(); > if (!wndAfter) > behind = HWND_BOTTOM; >- else if (!(GetWindowLong(wndAfter, GWL_EXSTYLE) & WS_EX_TOPMOST)) >+ else if (!(GetWindowLongPtrW(wndAfter, GWL_EXSTYLE) & WS_EX_TOPMOST)) > behind = wndAfter; > flags |= SWP_NOACTIVATE; > } >@@ -1796,8 +1796,8 @@ NS_METHOD nsWindow::ModalEventFilter(PRB > > // if not, accept events for any window that hasn't been disabled. > if (!acceptEvent) { >- LONG proc = ::GetWindowLongW(msgWindow, GWL_WNDPROC); >- if (proc == (LONG)&nsWindow::WindowProc) { >+ LONG_PTR proc = ::GetWindowLongPtrW(msgWindow, GWLP_WNDPROC); >+ if (proc == (LONG_PTR)&nsWindow::WindowProc) { > nsWindow *msgWin = GetNSWindowPtr(msgWindow); > msgWin->IsEnabled(&acceptEvent); > } >@@ -2221,7 +2221,7 @@ NS_METHOD nsWindow::SetBackgroundColor(c > mBrush = ::CreateSolidBrush(NSRGB_2_COLOREF(mBackground)); > #ifndef WINCE > if (mWnd != NULL) { >- SetClassLong(mWnd, GCL_HBRBACKGROUND, (LONG)mBrush); >+ ::SetClassLongPtrW(mWnd, GCLP_HBRBACKGROUND, (LONG_PTR)mBrush); > } > #endif > return NS_OK; >@@ -2589,10 +2589,10 @@ NS_IMETHODIMP nsWindow::HideWindowChrome > return NS_ERROR_FAILURE; > } > >- DWORD style, exStyle; >+ DWORD_PTR style, exStyle; > if (aShouldHide) { >- DWORD tempStyle = ::GetWindowLongW(hwnd, GWL_STYLE); >- DWORD tempExStyle = ::GetWindowLongW(hwnd, GWL_EXSTYLE); >+ DWORD_PTR tempStyle = ::GetWindowLongPtrW(hwnd, GWL_STYLE); >+ DWORD_PTR tempExStyle = ::GetWindowLongPtrW(hwnd, GWL_EXSTYLE); > > style = tempStyle & ~(WS_CAPTION | WS_THICKFRAME); > exStyle = tempExStyle & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | >@@ -2603,8 +2603,8 @@ NS_IMETHODIMP nsWindow::HideWindowChrome > } > else { > if (!mOldStyle || !mOldExStyle) { >- mOldStyle = ::GetWindowLongW(hwnd, GWL_STYLE); >- mOldExStyle = ::GetWindowLongW(hwnd, GWL_EXSTYLE); >+ mOldStyle = ::GetWindowLongPtrW(hwnd, GWL_STYLE); >+ mOldExStyle = ::GetWindowLongPtrW(hwnd, GWL_EXSTYLE); > } > > style = mOldStyle; >@@ -2612,8 +2612,8 @@ NS_IMETHODIMP nsWindow::HideWindowChrome > } > > VERIFY_WINDOW_STYLE(style); >- ::SetWindowLongW(hwnd, GWL_STYLE, style); >- ::SetWindowLongW(hwnd, GWL_EXSTYLE, exStyle); >+ ::SetWindowLongPtrW(hwnd, GWL_STYLE, style); >+ ::SetWindowLongPtrW(hwnd, GWL_EXSTYLE, exStyle); > > return NS_OK; > } >@@ -2827,8 +2827,8 @@ NS_METHOD nsWindow::SetColorMap(nsColorM > // a window created by a plugin. > BOOL CALLBACK nsWindow::InvalidateForeignChildWindows(HWND aWnd, LPARAM aMsg) > { >- LONG proc = ::GetWindowLongW(aWnd, GWL_WNDPROC); >- if (proc != (LONG)&nsWindow::WindowProc) { >+ LONG_PTR proc = ::GetWindowLongPtrW(aWnd, GWLP_WNDPROC); >+ if (proc != (LONG_PTR)&nsWindow::WindowProc) { > // This window is not one of our windows so invalidate it. > VERIFY(::InvalidateRect(aWnd, NULL, FALSE)); > } >@@ -4034,8 +4034,8 @@ static nsresult HeapDump(const char *fil > > BOOL CALLBACK nsWindow::DispatchStarvedPaints(HWND aWnd, LPARAM aMsg) > { >- LONG proc = ::GetWindowLongW(aWnd, GWL_WNDPROC); >- if (proc == (LONG)&nsWindow::WindowProc) { >+ LONG_PTR proc = ::GetWindowLongPtrW(aWnd, GWLP_WNDPROC); >+ if (proc == (LONG_PTR)&nsWindow::WindowProc) { > // its one of our windows so check to see if it has a > // invalidated rect. If it does. Dispatch a synchronous > // paint. >@@ -5620,20 +5620,20 @@ void nsWindow::SubclassWindow(BOOL bStat > if (bState) { > // change the nsWindow proc > if (mUnicodeWidget) >- mPrevWndProc = (WNDPROC)::SetWindowLongW(mWnd, GWL_WNDPROC, >- (LONG)nsWindow::WindowProc); >- else >- mPrevWndProc = (WNDPROC)::SetWindowLongA(mWnd, GWL_WNDPROC, >- (LONG)nsWindow::WindowProc); >+ mPrevWndProc = (WNDPROC)::SetWindowLongPtrW(mWnd, GWLP_WNDPROC, >+ (LONG_PTR)nsWindow::WindowProc); >+ else >+ mPrevWndProc = (WNDPROC)::SetWindowLongPtrA(mWnd, GWLP_WNDPROC, >+ (LONG_PTR)nsWindow::WindowProc); > NS_ASSERTION(mPrevWndProc, "Null standard window procedure"); > // connect the this pointer to the nsWindow handle > SetNSWindowPtr(mWnd, this); > } > else { > if (mUnicodeWidget) >- ::SetWindowLongW(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc); >- else >- ::SetWindowLongA(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc); >+ ::SetWindowLongPtrW(mWnd, GWLP_WNDPROC, (LONG_PTR)mPrevWndProc); >+ else >+ ::SetWindowLongPtrA(mWnd, GWLP_WNDPROC, (LONG_PTR)mPrevWndProc); > SetNSWindowPtr(mWnd, NULL); > mPrevWndProc = NULL; > } >@@ -8137,7 +8137,7 @@ void nsWindow::SetWindowTranslucencyInne > return; > } > >- LONG style = 0, exStyle = 0; >+ LONG_PTR style = 0, exStyle = 0; > switch(aMode) { > case eTransparencyTransparent: > exStyle |= WS_EX_LAYERED; >@@ -8151,8 +8151,8 @@ void nsWindow::SetWindowTranslucencyInne > exStyle |= topWindow->WindowExStyle(); > > VERIFY_WINDOW_STYLE(style); >- ::SetWindowLongW(hWnd, GWL_STYLE, style); >- ::SetWindowLongW(hWnd, GWL_EXSTYLE, exStyle); >+ ::SetWindowLongPtrW(hWnd, GWL_STYLE, style); >+ ::SetWindowLongPtrW(hWnd, GWL_EXSTYLE, exStyle); > > mTransparencyMode = aMode; > >diff --git a/widget/src/windows/nsWindow.h b/widget/src/windows/nsWindow.h >--- a/widget/src/windows/nsWindow.h >+++ b/widget/src/windows/nsWindow.h >@@ -473,8 +473,8 @@ protected: > PRInt32 mMenuCmdId; > > // Window styles used by this window before chrome was hidden >- DWORD mOldStyle; >- DWORD mOldExStyle; >+ DWORD_PTR mOldStyle; >+ DWORD_PTR mOldExStyle; > > // To enable/disable IME > HIMC mOldIMC;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
emaijala+moz
: review+
Actions:
View
|
Diff
|
Review
Attachments on
bug 226218
:
135925
|
213149
|
213150
|
213151
|
326161
| 356451