Bug 1082510 - When we detect a chrome popup at the current event coordinates and remote content has the mouse captured, release capture. r=Enn

This commit is contained in:
Jim Mathies 2015-03-12 14:32:20 -05:00
parent d2e1438a01
commit d6d7d5c6d6

View File

@ -7368,6 +7368,12 @@ PresShell::HandleEvent(nsIFrame* aFrame,
frame == mFrameConstructor->GetRootFrame()) {
nsIFrame* popupFrame =
nsLayoutUtils::GetPopupFrameForEventCoordinates(rootPresContext, aEvent);
// If a remote browser is currently capturing input break out if we
// detect a chrome generated popup.
if (popupFrame && capturingContent &&
EventStateManager::IsRemoteTarget(capturingContent)) {
capturingContent = nullptr;
}
// If the popupFrame is an ancestor of the 'frame', the frame should
// handle the event, otherwise, the popup should handle it.
if (popupFrame &&