Skip to content

Commit

Permalink
Bug 1844733 - Revert "Bug 1292701, 1366330 - Fix popup hiding while n…
Browse files Browse the repository at this point in the history
…avigating file picker" r=cmartin

Backed out changeset 0c47c1159e0a (bug 1292701).

Differential Revision: https://phabricator.services.mozilla.com/D184418
  • Loading branch information
selenography committed Jul 25, 2023
1 parent 8af4489 commit d058fed
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions widget/windows/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7951,12 +7951,6 @@ bool nsWindow::DealWithPopups(HWND aWnd, UINT aMessage, WPARAM aWParam,
return false;
}

// Don't rollup a popup if it has an open file picker
nsWindow* window = WinUtils::GetNSWindowPtr(aWnd);
if (!window || window->mPickerDisplayCount) {
return false;
}

static bool sSendingNCACTIVATE = false;
static bool sPendingNCACTIVATE = false;
uint32_t popupsToRollup = UINT32_MAX;
Expand Down Expand Up @@ -8054,6 +8048,7 @@ bool nsWindow::DealWithPopups(HWND aWnd, UINT aMessage, WPARAM aWParam,
// NOTE: Don't handle WA_INACTIVE for preventing popup taking focus
// because we cannot distinguish it's caused by mouse or not.
if (LOWORD(aWParam) == WA_ACTIVE && aLParam) {
nsWindow* window = WinUtils::GetNSWindowPtr(aWnd);
if (window && window->IsPopup()) {
// Cancel notifying widget listeners of deactivating the previous
// active window (see WM_KILLFOCUS case in ProcessMessage()).
Expand Down Expand Up @@ -8197,14 +8192,6 @@ bool nsWindow::DealWithPopups(HWND aWnd, UINT aMessage, WPARAM aWParam,
return false;
}

// Only exit if the touchpoint is within the browser window
// EventIsInsideWindow handles for Maybe conditions
// It does not matter if not a touch because otherwise it justs gets the event
// message
if (!EventIsInsideWindow(window, touchPoint)) {
return false;
}

// Only need to deal with the last rollup for left mouse down events.
NS_ASSERTION(!nsAutoRollup::GetLastRollup(), "last rollup is null");

Expand Down

0 comments on commit d058fed

Please sign in to comment.