Bug 604303 - Fixup linux expose quirk to use PluginModuleChild quirks system. r=karlt, a=betaN.

This commit is contained in:
Jim Mathies 2010-12-06 18:50:53 -06:00
Родитель 3703c3e1d9
Коммит 9d9fba2a68
3 изменённых файлов: 8 добавлений и 9 удалений

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

@ -144,9 +144,6 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
, mPendingPluginCall(false)
, mDoAlphaExtraction(false)
, mSurfaceDifferenceRect(0,0,0,0)
#ifdef MOZ_X11
, mFlash10Quirks(false)
#endif
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
, mMaemoImageRendering(PR_FALSE)
#endif
@ -171,7 +168,9 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
&description);
if (description) {
NS_NAMED_LITERAL_CSTRING(flash10Head, "Shockwave Flash 10.");
mFlash10Quirks = StringBeginsWith(nsDependentCString(description), flash10Head);
if (StringBeginsWith(nsDependentCString(description), flash10Head)) {
PluginModuleChild::current()->AddQuirk(PluginModuleChild::QUIRK_FLASH_EXPOSE_COORD_TRANSLATION);
}
}
#endif
}
@ -2599,7 +2598,7 @@ PluginInstanceChild::PaintRectToSurface(const nsIntRect& aRect,
nsIntRect plPaintRect(aRect);
nsRefPtr<gfxASurface> renderSurface = aSurface;
#ifdef MOZ_X11
if (mIsTransparent && mFlash10Quirks) {
if (mIsTransparent && (GetQuirks() & PluginModuleChild::QUIRK_FLASH_EXPOSE_COORD_TRANSLATION)) {
// Work around a bug in Flash up to 10.1 d51 at least, where expose event
// top left coordinates within the plugin-rect and not at the drawable
// origin are misinterpreted. (We can move the top left coordinate

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

@ -503,10 +503,6 @@ private:
// in plugin coordinates.
nsIntRect mSurfaceDifferenceRect;
#ifdef MOZ_X11
// Used with windowless flash plugin only, see bug 574583
bool mFlash10Quirks;
#endif
#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
// Maemo5 Flash does not remember WindowlessLocal state
// we should listen for NPP values negotiation and remember it

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

@ -221,6 +221,10 @@ public:
QUIRK_FLASH_THROTTLE_WMUSER_EVENTS = 1 << 2,
// Win32: Catch resets on our subclass by hooking SetWindowLong.
QUIRK_FLASH_HOOK_SETLONGPTR = 1 << 3,
// X11: Work around a bug in Flash up to 10.1 d51 at least, where
// expose event top left coordinates within the plugin-rect and
// not at the drawable origin are misinterpreted.
QUIRK_FLASH_EXPOSE_COORD_TRANSLATION = 1 << 4,
};
int GetQuirks() { return mQuirks; }