forked from mirrors/gecko-dev
Backed out changeset 43282679151a (bug 1805322) for EnumFirstChild related bustages. CLOSED TREE
This commit is contained in:
parent
167da1b7f7
commit
e22d1a4b5b
2 changed files with 47 additions and 0 deletions
|
|
@ -785,6 +785,46 @@ static BOOL WINAPI EnumFirstChild(HWND hwnd, LPARAM lParam) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void WinUtils::InvalidatePluginAsWorkaround(nsIWidget* aWidget,
|
||||
const LayoutDeviceIntRect& aRect) {
|
||||
aWidget->Invalidate(aRect);
|
||||
|
||||
// XXX - Even more evil workaround!! See bug 762948, flash's bottom
|
||||
// level sandboxed window doesn't seem to get our invalidate. We send
|
||||
// an invalidate to it manually. This is totally specialized for this
|
||||
// bug, for other child window structures this will just be a more or
|
||||
// less bogus invalidate but since that should not have any bad
|
||||
// side-effects this will have to do for now.
|
||||
HWND current = (HWND)aWidget->GetNativeData(NS_NATIVE_WINDOW);
|
||||
|
||||
RECT windowRect;
|
||||
RECT parentRect;
|
||||
|
||||
::GetWindowRect(current, &parentRect);
|
||||
|
||||
HWND next = current;
|
||||
do {
|
||||
current = next;
|
||||
::EnumChildWindows(current, &EnumFirstChild, (LPARAM)&next);
|
||||
::GetWindowRect(next, &windowRect);
|
||||
// This is relative to the screen, adjust it to be relative to the
|
||||
// window we're reconfiguring.
|
||||
windowRect.left -= parentRect.left;
|
||||
windowRect.top -= parentRect.top;
|
||||
} while (next != current && windowRect.top == 0 && windowRect.left == 0);
|
||||
|
||||
if (windowRect.top == 0 && windowRect.left == 0) {
|
||||
RECT rect;
|
||||
rect.left = aRect.X();
|
||||
rect.top = aRect.Y();
|
||||
rect.right = aRect.XMost();
|
||||
rect.bottom = aRect.YMost();
|
||||
|
||||
::InvalidateRect(next, &rect, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_PLACES
|
||||
/************************************************************************
|
||||
* Constructs as AsyncFaviconDataReady Object
|
||||
|
|
|
|||
|
|
@ -492,6 +492,13 @@ class WinUtils {
|
|||
*/
|
||||
static LayoutDeviceIntRect ToIntRect(const RECT& aRect);
|
||||
|
||||
/**
|
||||
* Helper used in invalidating flash plugin windows owned
|
||||
* by low rights flash containers.
|
||||
*/
|
||||
static void InvalidatePluginAsWorkaround(nsIWidget* aWidget,
|
||||
const LayoutDeviceIntRect& aRect);
|
||||
|
||||
/**
|
||||
* Returns true if the context or IME state is enabled. Otherwise, false.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue