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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user