Fix review comments from bug 583109 (changeset 6ff3fcbb7845), comment 46.

This commit is contained in:
Benjamin Smedberg 2010-11-09 09:36:33 -05:00
Родитель 214fdc2150
Коммит 2630a2b7e0
3 изменённых файлов: 15 добавлений и 34 удалений

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

@ -141,7 +141,6 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface,
, mAccumulatedInvalidRect(0,0,0,0)
, mIsTransparent(false)
, mSurfaceType(gfxASurface::SurfaceTypeMax)
, mPendingForcePaint(false)
, mCurrentInvalidateTask(nsnull)
, mPendingPluginCall(false)
, mDoAlphaExtraction(false)
@ -2177,6 +2176,7 @@ PluginInstanceChild::RecvAsyncSetWindow(const gfxSurfaceType& aSurfaceType,
mWindow.clipRect.left != aWindow.clipRect.left ||
mWindow.clipRect.bottom != aWindow.clipRect.bottom ||
mWindow.clipRect.right != aWindow.clipRect.right)
mAccumulatedInvalidRect = nsIntRect(0, 0, aWindow.width, aWindow.height);
mWindow.x = aWindow.x;
mWindow.y = aWindow.y;

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

@ -492,10 +492,6 @@ private:
// Surface type optimized of parent process
gfxSurfaceType mSurfaceType;
// set TRUE if plugin surface dropped in asyncSetWindow
// if TRUE then initiate full repaint in RecvPaintFinished
bool mPendingForcePaint;
// Keep InvalidateRect task pointer to be able Cancel it on Destroy
CancelableTask *mCurrentInvalidateTask;

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

@ -1772,17 +1772,6 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
layer = aManager->CreateImageLayer();
}
#if 0
nsCOMPtr<nsIPluginInstance> pi;
mInstanceOwner->GetInstance(*getter_AddRefs(pi));
// Give plugin info about layer paint
if (pi) {
if (NS_FAILED(pi->NotifyPainted())) {
return nsnull;
}
}
#endif
if (!layer)
return nsnull;
@ -2025,26 +2014,22 @@ nsObjectFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
nsIntPoint origin = GetWindowOriginInPixels(PR_TRUE);
nsIntRect winlessRect = nsIntRect(origin, nsIntSize(window->width, window->height));
// XXX I don't think we can be certain that the location wrt to
// the window only changes when the location wrt to the drawable
// changes, but the hdc probably changes on every paint.
if (mWindowlessRect != winlessRect) {
mWindowlessRect = winlessRect;
WINDOWPOS winpos;
memset(&winpos, 0, sizeof(winpos));
winpos.x = mWindowlessRect.x;
winpos.y = mWindowlessRect.y;
winpos.cx = mWindowlessRect.width;
winpos.cy = mWindowlessRect.height;
mWindowlessRect = winlessRect;
// finally, update the plugin by sending it a WM_WINDOWPOSCHANGED event
NPEvent pluginEvent;
pluginEvent.event = WM_WINDOWPOSCHANGED;
pluginEvent.wParam = 0;
pluginEvent.lParam = (LPARAM)&winpos;
inst->HandleEvent(&pluginEvent, nsnull);
}
WINDOWPOS winpos;
memset(&winpos, 0, sizeof(winpos));
winpos.x = mWindowlessRect.x;
winpos.y = mWindowlessRect.y;
winpos.cx = mWindowlessRect.width;
winpos.cy = mWindowlessRect.height;
// finally, update the plugin by sending it a WM_WINDOWPOSCHANGED event
NPEvent pluginEvent;
pluginEvent.event = WM_WINDOWPOSCHANGED;
pluginEvent.wParam = 0;
pluginEvent.lParam = (LPARAM)&winpos;
inst->HandleEvent(&pluginEvent, nsnull);
inst->SetWindow(window);
}