зеркало из https://github.com/mozilla/pjs.git
Bug 553882 - [OS/2] Plugin-related coding errors. r=wuno
This commit is contained in:
Родитель
876dd129bb
Коммит
a771296b05
|
@ -308,14 +308,19 @@ static MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM m
|
|||
// doesn't receive it, window activation/deactivation won't happen.
|
||||
WinDefWindowProc(hWnd, msg, mp1, mp2);
|
||||
|
||||
// If focus is being gained, and the plugin widget neither lost
|
||||
// nor gained the focus, then a child just got it from some other
|
||||
// window. Post a WM_FOCUSCHANGED msg that identifies the child
|
||||
// as the window losing focus. After nsWindow::ActivatePlugin()
|
||||
// activates the plugin, it will restore the focus to the child.
|
||||
// If focus is being gained, and the plugin widget neither lost nor
|
||||
// gained the focus, then a child just got it from some other window.
|
||||
// If that other window was neither a child of the widget nor owned
|
||||
// by a child of the widget (e.g. a popup menu), post a WM_FOCUSCHANGED
|
||||
// msg that identifies the child as the window losing focus. After
|
||||
// nsWindow:: ActivatePlugin() activates the plugin, it will restore
|
||||
// the focus to the child.
|
||||
if (SHORT1FROMMP(mp2) && (HWND)mp1 != hWnd) {
|
||||
HWND hFocus = WinQueryFocus(HWND_DESKTOP);
|
||||
if (hFocus != hWnd) {
|
||||
if (hFocus != hWnd &&
|
||||
WinIsChild(hFocus, hWnd) &&
|
||||
!WinIsChild((HWND)mp1, hWnd) &&
|
||||
!WinIsChild(WinQueryWindow((HWND)mp1, QW_OWNER), hWnd)) {
|
||||
WinPostMsg(hWnd, WM_FOCUSCHANGED, (MPARAM)hFocus, mp2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,6 +261,13 @@ nsWindow::~nsWindow()
|
|||
Destroy();
|
||||
}
|
||||
|
||||
// Once a plugin window has been destroyed,
|
||||
// its parent, the clipping window, can be destroyed.
|
||||
if (mClipWnd) {
|
||||
WinDestroyWindow(mClipWnd);
|
||||
mClipWnd = 0;
|
||||
}
|
||||
|
||||
// If it exists, destroy our os2FrameWindow helper object.
|
||||
if (mFrame) {
|
||||
delete mFrame;
|
||||
|
@ -812,11 +819,11 @@ void nsWindow::Scroll(const nsIntPoint& aDelta,
|
|||
// but not the part outside it [at least on Windows]. For
|
||||
// these widgets, we have to invalidate them to get both
|
||||
// parts updated after the scroll.
|
||||
if (w->mBounds.Intersects(affectedRect)) {
|
||||
if (w->mWnd && w->mBounds.Intersects(affectedRect)) {
|
||||
if (!ClipRegionContainedInRect(configuration.mClipRegion,
|
||||
affectedRect - (w->mBounds.TopLeft()
|
||||
+ aDelta)) && mWnd) {
|
||||
WinInvalidateRect(mWnd, 0, FALSE);
|
||||
affectedRect -
|
||||
(w->mBounds.TopLeft() + aDelta))) {
|
||||
WinInvalidateRect(w->mWnd, 0, FALSE);
|
||||
}
|
||||
|
||||
// Send a WM_VRNDISABLED to the plugin child of this widget.
|
||||
|
|
Загрузка…
Ссылка в новой задаче