mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 444692. Windowless plugin frames should use frame invalidation so that generic invalidation hooks work. r+sr=dbaron
This commit is contained in:
parent
626428f7fa
commit
c942a1b54e
@ -2398,20 +2398,12 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(nsPluginRect *invalidRect)
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
if (mOwner && invalidRect && mWidgetVisible) {
|
||||
//no reference count on view
|
||||
nsIView* view = mOwner->GetView();
|
||||
|
||||
if (view) {
|
||||
nsPresContext* presContext = mOwner->PresContext();
|
||||
|
||||
nsRect rect(presContext->DevPixelsToAppUnits(invalidRect->left),
|
||||
presContext->DevPixelsToAppUnits(invalidRect->top),
|
||||
presContext->DevPixelsToAppUnits(invalidRect->right - invalidRect->left),
|
||||
presContext->DevPixelsToAppUnits(invalidRect->bottom - invalidRect->top));
|
||||
|
||||
//set flags to not do a synchronous update, force update does the redraw
|
||||
view->GetViewManager()->UpdateView(view, rect, NS_VMREFRESH_NO_SYNC);
|
||||
}
|
||||
nsPresContext* presContext = mOwner->PresContext();
|
||||
nsRect rect(presContext->DevPixelsToAppUnits(invalidRect->left),
|
||||
presContext->DevPixelsToAppUnits(invalidRect->top),
|
||||
presContext->DevPixelsToAppUnits(invalidRect->right - invalidRect->left),
|
||||
presContext->DevPixelsToAppUnits(invalidRect->bottom - invalidRect->top));
|
||||
mOwner->Invalidate(rect);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user