mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1151152
- Change behavior when pointer is dragged out of the document. r=smaug
This commit is contained in:
parent
6f60ab366d
commit
cbb7b8d347
@ -7090,9 +7090,11 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIContent* capturingContent =
|
||||
(aEvent->HasMouseEventMessage() ||
|
||||
aEvent->mClass == eWheelEventClass ? GetCapturingContent() : nullptr);
|
||||
nsIContent* capturingContent = ((aEvent->mClass == ePointerEventClass ||
|
||||
aEvent->mClass == eWheelEventClass ||
|
||||
aEvent->HasMouseEventMessage())
|
||||
? GetCapturingContent()
|
||||
: nullptr);
|
||||
|
||||
nsCOMPtr<nsIDocument> retargetEventDoc;
|
||||
if (!aDontRetargetEvents) {
|
||||
@ -7500,19 +7502,19 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
//
|
||||
// Note, currently for backwards compatibility we don't forward mouse events
|
||||
// to the active document when mouse is over some subdocument.
|
||||
EventStateManager* activeESM =
|
||||
EventStateManager::GetActiveEventStateManager();
|
||||
if (activeESM && aEvent->HasMouseEventMessage() &&
|
||||
activeESM != shell->GetPresContext()->EventStateManager() &&
|
||||
static_cast<EventStateManager*>(activeESM)->GetPresContext()) {
|
||||
nsIPresShell* activeShell =
|
||||
static_cast<EventStateManager*>(activeESM)->GetPresContext()->
|
||||
GetPresShell();
|
||||
if (activeShell &&
|
||||
nsContentUtils::ContentIsCrossDocDescendantOf(activeShell->GetDocument(),
|
||||
shell->GetDocument())) {
|
||||
shell = static_cast<PresShell*>(activeShell);
|
||||
frame = shell->GetRootFrame();
|
||||
if (EventStateManager* activeESM = EventStateManager::GetActiveEventStateManager()) {
|
||||
if (aEvent->mClass == ePointerEventClass || aEvent->HasMouseEventMessage()) {
|
||||
if (activeESM != shell->GetPresContext()->EventStateManager()) {
|
||||
if (nsPresContext* activeContext = activeESM->GetPresContext()) {
|
||||
if (nsIPresShell* activeShell = activeContext->GetPresShell()) {
|
||||
if (nsContentUtils::ContentIsCrossDocDescendantOf(activeShell->GetDocument(),
|
||||
shell->GetDocument())) {
|
||||
shell = static_cast<PresShell*>(activeShell);
|
||||
frame = shell->GetRootFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
||||
SimpleTest.expectAssertions(6);
|
||||
SimpleTest.expectAssertions(12);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user