Bug 1053716 - Mouse events over content-process area need to set capturing so that the entire mouse interaction is forwarded to the child. r=smaug

This commit is contained in:
Felipe Gomes 2014-09-02 15:31:12 -04:00
parent efcf6304b0
commit c17f999509

View File

@ -2704,6 +2704,15 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
break;
}
// For remote content, capture the event in the parent process at the
// <xul:browser remote> element. This will ensure that subsequent mousemove/mouseup
// events will continue to be dispatched to this element and therefore forwarded
// to the child.
if (dispatchedToContentProcess && !nsIPresShell::GetCapturingContent()) {
nsIContent* content = mCurrentTarget ? mCurrentTarget->GetContent() : nullptr;
nsIPresShell::SetCapturingContent(content, 0);
}
nsCOMPtr<nsIContent> activeContent;
if (nsEventStatus_eConsumeNoDefault != *aStatus) {
nsCOMPtr<nsIContent> newFocus;