Backed out changeset 1a0729e5b901 (bug 1151152) for m1 test failures in test_pointerevent_pointerleave_descendant_over-manual.html on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2015-06-19 12:04:52 +02:00
Родитель f40b85b6bc
Коммит f6a8b31777
1 изменённых файлов: 16 добавлений и 18 удалений

Просмотреть файл

@ -7077,11 +7077,9 @@ PresShell::HandleEvent(nsIFrame* aFrame,
return NS_OK;
}
nsIContent* capturingContent = ((aEvent->mClass == ePointerEventClass ||
aEvent->mClass == eWheelEventClass ||
aEvent->HasMouseEventMessage())
? GetCapturingContent()
: nullptr);
nsIContent* capturingContent =
(aEvent->HasMouseEventMessage() ||
aEvent->mClass == eWheelEventClass ? GetCapturingContent() : nullptr);
nsCOMPtr<nsIDocument> retargetEventDoc;
if (!aDontRetargetEvents) {
@ -7489,19 +7487,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.
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();
}
}
}
}
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();
}
}