Backing out 3883e79e5a9a and 0653a37b7230 (bug 601064) due to test failures, a=backout

This commit is contained in:
Robert O'Callahan 2011-01-04 17:48:11 +13:00
parent b74be26a4b
commit e6205db57a
3 changed files with 7 additions and 15 deletions

View File

@ -143,7 +143,6 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
, mCurrentAsyncSetWindowTask(nsnull)
, mPendingPluginCall(false)
, mDoAlphaExtraction(false)
, mHasPainted(false)
, mSurfaceDifferenceRect(0,0,0,0)
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
, mMaemoImageRendering(PR_FALSE)
@ -2473,8 +2472,7 @@ PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow)
WINDOWPOS winpos = {
0, 0,
mWindow.x, mWindow.y,
mWindow.width, mWindow.height,
0
mWindow.width, mWindow.height
};
NPEvent pluginEvent = {
WM_WINDOWPOSCHANGED, 0,
@ -2720,7 +2718,6 @@ PluginInstanceChild::ShowPluginFrame()
} else {
PaintRectToSurface(rect, mCurrentSurface, gfxRGBA(0.0, 0.0, 0.0, 0.0));
}
mHasPainted = true;
NPRect r = { (uint16_t)rect.y, (uint16_t)rect.x,
(uint16_t)rect.YMost(), (uint16_t)rect.XMost() };
@ -2818,7 +2815,7 @@ PluginInstanceChild::InvalidateRectDelayed(void)
}
mCurrentInvalidateTask = nsnull;
if (mAccumulatedInvalidRect.IsEmpty() || (mHasPainted && !IsVisible())) {
if (mAccumulatedInvalidRect.IsEmpty() || !IsVisible()) {
return;
}
@ -2830,7 +2827,7 @@ PluginInstanceChild::InvalidateRectDelayed(void)
void
PluginInstanceChild::AsyncShowPluginFrame(void)
{
if (mCurrentInvalidateTask || (mHasPainted && !IsVisible())) {
if (mCurrentInvalidateTask || !IsVisible()) {
return;
}

View File

@ -498,11 +498,6 @@ private:
// supports NPPVpluginTransparentAlphaBool (which is not part of NPAPI yet)
bool mDoAlphaExtraction;
// true when the plugin has painted at least once. We use this to ensure
// that we ask a plugin to paint at least once even if it's invisible;
// some plugin (instances) rely on this in order to work properly.
bool mHasPainted;
// Cached rectangle rendered to previous surface(mBackSurface)
// Used for reading back to current surface and syncing data,
// in plugin coordinates.

View File

@ -69,7 +69,7 @@ function initialize() {
}
function show() {
is(clipped.getPaintCount(), 1, "fully clipped plugin painted exactly once");
is(clipped.getPaintCount(), 0, "fully clipped plugin not painted");
clip.style.height = "10px";
@ -94,9 +94,9 @@ function doubleForDoublePass() {
}
function invalidate() {
var paintCount = 2 * doubleForDoublePass();
var paintCount = 1 * doubleForDoublePass();
is(clipped.getPaintCount(), paintCount, "partially clipped plugin painted twice");
is(clipped.getPaintCount(), paintCount, "partially clipped plugin painted once");
clipped.setColor("FF00FF00"); // plugin invalidates
@ -104,7 +104,7 @@ function invalidate() {
}
function done() {
var paintCount = 3 * doubleForDoublePass();
var paintCount = 2 * doubleForDoublePass();
is(clipped.getPaintCount(), paintCount, "painted after invalidate");
SimpleTest.finish();