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:
peterlubczynski%netscape.com 2002-03-08 15:49:43 +00:00
Родитель e3ae592a10
Коммит 3daac54bd1
2 изменённых файлов: 10 добавлений и 4 удалений

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

@ -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;