Merge mc->Maple

This commit is contained in:
Benoit Girard
2012-03-13 11:05:28 -04:00
578 changed files with 12639 additions and 4868 deletions

View File

@@ -445,11 +445,23 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
break;
nsCOMPtr<nsIDOMWindow> domWindow;
mBrowserApp->GetWindowForTab(curEvent->MetaState(), getter_AddRefs(domWindow));
nsCOMPtr<nsIBrowserTab> tab;
float scale;
mBrowserApp->GetBrowserTab(curEvent->MetaState(), getter_AddRefs(tab));
if (!tab)
break;
tab->GetWindow(getter_AddRefs(domWindow));
if (!domWindow)
break;
if (NS_FAILED(tab->GetScale(&scale)))
break;
nsTArray<nsIntPoint> points = curEvent->Points();
NS_ASSERTION(points.Length() == 2, "Screenshot event does not have enough coordinates");
if (domWindow)
bridge->TakeScreenshot(domWindow, 0, 0, points[0].x, points[0].y, points[1].x, points[1].y, curEvent->MetaState());
bridge->TakeScreenshot(domWindow, 0, 0, points[0].x, points[0].y, points[1].x, points[1].y, curEvent->MetaState(), scale);
break;
}