Bug 1805322: Remove unused InvalidatePluginAsWorkaround. r=bobowen

Differential Revision: https://phabricator.services.mozilla.com/D176795
This commit is contained in:
Brayden S Pohl 2023-05-02 12:39:34 +00:00
parent 70b0f99e92
commit f3c1b2a785
2 changed files with 0 additions and 47 deletions

View File

@ -785,46 +785,6 @@ 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

View File

@ -492,13 +492,6 @@ 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.
*/