Fix for windowless plugins don't draw in the correct place when scrolled bug 93056 patch by dbrittain@superscape.com r=peterl sr=waterson
git-svn-id: svn://10.0.0.236/trunk@100455 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1313,30 +1313,28 @@ nsObjectFrame::DidReflow(nsIPresContext* aPresContext,
|
||||
nsIPluginInstance *inst;
|
||||
float t2p;
|
||||
aPresContext->GetTwipsToPixels(&t2p);
|
||||
nscoord offx, offy;
|
||||
nscoord offx = 0;
|
||||
nscoord offy = 0;
|
||||
|
||||
GetOffsetFromView(aPresContext, origin, &parentWithView);
|
||||
|
||||
// if it's windowless we want to get the offset from the parent frame
|
||||
if (window->type == nsPluginWindowType_Drawable)
|
||||
{
|
||||
nsIFrame* parentFrame;
|
||||
|
||||
nsIWidget* aWidget;
|
||||
parentWithView->GetOffsetFromWidget(&offx, &offy, aWidget);
|
||||
|
||||
nsIFrame* parentFrame;
|
||||
GetParentWithView(aPresContext, &parentFrame);
|
||||
|
||||
if(parentFrame != nsnull)
|
||||
parentFrame->GetOffsetFromView(aPresContext, origin, &parentWithView);
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
// beard: how do we get this?
|
||||
parentWithView->GetScrollOffset(&offx, &offy);
|
||||
#else
|
||||
offx = offy = 0;
|
||||
#endif
|
||||
|
||||
window->x = NSTwipsToIntPixels(origin.x, t2p);
|
||||
window->y = NSTwipsToIntPixels(origin.y, t2p);
|
||||
window->x = NSTwipsToIntPixels(origin.x + offx, t2p);
|
||||
window->y = NSTwipsToIntPixels(origin.y + offy, t2p);
|
||||
// window->width = NSTwipsToIntPixels(aMetrics.width, t2p);
|
||||
// window->height = NSTwipsToIntPixels(aMetrics.height, t2p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user