зеркало из https://github.com/mozilla/pjs.git
Fix for windowless plugins not painting in the right place, bug 118721 patch by mailto:dbrittain@superscape.com r=peterl sr=roc+moz a=asa
This commit is contained in:
Родитель
e3ae592a10
Коммит
3daac54bd1
|
@ -102,6 +102,7 @@
|
|||
#include "nsGfxCIID.h"
|
||||
#include "nsHTMLUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsTransform2D.h"
|
||||
|
||||
// headers for plugin scriptability
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
@ -1763,9 +1764,11 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext,
|
|||
doupdatewindow = PR_TRUE;
|
||||
}
|
||||
|
||||
// check if we need to update window position
|
||||
// Get the offset of the DC
|
||||
nsTransform2D* rcTransform;
|
||||
aRenderingContext.GetCurrentTransform(rcTransform);
|
||||
nsPoint origin;
|
||||
GetWindowOriginInPixels(aPresContext, PR_TRUE, &origin);
|
||||
rcTransform->GetTranslationCoord(&origin.x, &origin.y);
|
||||
|
||||
if((window->x != origin.x) || (window->y != origin.y)) {
|
||||
window->x = origin.x;
|
||||
|
|
|
@ -102,6 +102,7 @@
|
|||
#include "nsGfxCIID.h"
|
||||
#include "nsHTMLUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsTransform2D.h"
|
||||
|
||||
// headers for plugin scriptability
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
@ -1763,9 +1764,11 @@ nsObjectFrame::Paint(nsIPresContext* aPresContext,
|
|||
doupdatewindow = PR_TRUE;
|
||||
}
|
||||
|
||||
// check if we need to update window position
|
||||
// Get the offset of the DC
|
||||
nsTransform2D* rcTransform;
|
||||
aRenderingContext.GetCurrentTransform(rcTransform);
|
||||
nsPoint origin;
|
||||
GetWindowOriginInPixels(aPresContext, PR_TRUE, &origin);
|
||||
rcTransform->GetTranslationCoord(&origin.x, &origin.y);
|
||||
|
||||
if((window->x != origin.x) || (window->y != origin.y)) {
|
||||
window->x = origin.x;
|
||||
|
|
Загрузка…
Ссылка в новой задаче