Bug 1092630: Get rid of native widgets for OS X NPAPI plugins, make things work much better under e10s. Patch by Josh Aas, Markus Stange, Steven Michaud, David Parks. r=smichaud/jst/josh (more reviews pending)

This commit is contained in:
Josh Aas
2014-12-11 08:44:07 -06:00
parent 01ebfae7f9
commit 974e19a35e
48 changed files with 1122 additions and 2504 deletions

View File

@@ -830,6 +830,28 @@ PuppetWidget::GetNativeData(uint32_t aDataType)
return nullptr;
}
nsIntPoint
PuppetWidget::GetChromeDimensions()
{
if (!GetOwningTabChild()) {
NS_WARNING("PuppetWidget without Tab does not have chrome information.");
return nsIntPoint();
}
return GetOwningTabChild()->GetChromeDisplacement();
}
nsIntPoint
PuppetWidget::GetWindowPosition()
{
if (!GetOwningTabChild()) {
return nsIntPoint();
}
int32_t winX, winY, winW, winH;
NS_ENSURE_SUCCESS(GetOwningTabChild()->GetDimensions(0, &winX, &winY, &winW, &winH), nsIntPoint());
return nsIntPoint(winX, winY);
}
PuppetScreen::PuppetScreen(void *nativeScreen)
{
}
@@ -846,6 +868,13 @@ ScreenConfig()
return config;
}
nsIntSize
PuppetWidget::GetScreenDimensions()
{
nsIntRect r = ScreenConfig().rect();
return nsIntSize(r.width, r.height);
}
NS_IMETHODIMP
PuppetScreen::GetId(uint32_t *outId)
{