Merge mozilla-central and mozilla-inbound

This commit is contained in:
Ed Morley
2011-10-26 01:04:58 +01:00
69 changed files with 980 additions and 231 deletions

View File

@@ -6043,7 +6043,17 @@ PresShell::HandleEvent(nsIView *aView,
// still get sent to the window properly if nothing is focused or if a
// frame goes away while it is focused.
if (!eventTarget || !eventTarget->GetPrimaryFrame()) {
eventTarget = mDocument->GetRootElement();
nsCOMPtr<nsIDOMHTMLDocument> htmlDoc = do_QueryInterface(mDocument);
if (htmlDoc) {
nsCOMPtr<nsIDOMHTMLElement> body;
htmlDoc->GetBody(getter_AddRefs(body));
eventTarget = do_QueryInterface(body);
if (!eventTarget) {
eventTarget = mDocument->GetRootElement();
}
} else {
eventTarget = mDocument->GetRootElement();
}
}
if (aEvent->message == NS_KEY_DOWN) {