зеркало из https://github.com/mozilla/pjs.git
Cleaning up dead code left from fix for bug 118721, patch by dbrittain@superscape.com (David Brittain), bug 132262 r=peterl, sr=attinasi, a=scc
This commit is contained in:
Родитель
48b3a72db7
Коммит
00f5ff72dc
|
@ -1432,7 +1432,7 @@ nsObjectFrame::ContentChanged(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, PRBool aWindowless, nsPoint * aOrigin)
|
||||
nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, nsPoint * aOrigin)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aPresContext);
|
||||
NS_ENSURE_ARG_POINTER(aOrigin);
|
||||
|
@ -1443,29 +1443,6 @@ nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, P
|
|||
|
||||
GetOffsetFromView(aPresContext, origin, &parentWithView);
|
||||
|
||||
// if it's windowless, let's make sure we have our origin set right
|
||||
// it may need to be corrected, like after scrolling
|
||||
if (aWindowless && parentWithView) {
|
||||
nsPoint correction(0,0);
|
||||
nsCOMPtr<nsIViewManager> parentVM;
|
||||
parentWithView->GetViewManager(*getter_AddRefs(parentVM));
|
||||
|
||||
// Walk up all the views and add up their positions. This will give us our
|
||||
// absolute position which is what we want to give the plugin
|
||||
nsIView* theView = parentWithView;
|
||||
while (theView) {
|
||||
nsCOMPtr<nsIViewManager> vm;
|
||||
theView->GetViewManager(*getter_AddRefs(vm));
|
||||
if (vm != parentVM)
|
||||
break;
|
||||
|
||||
theView->GetPosition(&correction.x, &correction.y);
|
||||
origin += correction;
|
||||
|
||||
theView->GetParent(theView);
|
||||
}
|
||||
}
|
||||
|
||||
float t2p;
|
||||
aPresContext->GetTwipsToPixels(&t2p);
|
||||
aOrigin->x = NSTwipsToIntPixels(origin.x, t2p);
|
||||
|
@ -1516,7 +1493,7 @@ nsObjectFrame::DidReflow(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
|
||||
nsPoint origin;
|
||||
GetWindowOriginInPixels(aPresContext, windowless, &origin);
|
||||
GetWindowOriginInPixels(aPresContext, &origin);
|
||||
|
||||
window->x = origin.x;
|
||||
window->y = origin.y;
|
||||
|
|
|
@ -160,7 +160,7 @@ protected:
|
|||
|
||||
nsresult NotifyContentObjectWrapper();
|
||||
|
||||
nsresult GetWindowOriginInPixels(nsIPresContext * aPresContext, PRBool aWindoless, nsPoint* aOrigin);
|
||||
nsresult GetWindowOriginInPixels(nsIPresContext * aPresContext, nsPoint* aOrigin);
|
||||
|
||||
private:
|
||||
nsPluginInstanceOwner *mInstanceOwner;
|
||||
|
|
|
@ -1432,7 +1432,7 @@ nsObjectFrame::ContentChanged(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, PRBool aWindowless, nsPoint * aOrigin)
|
||||
nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, nsPoint * aOrigin)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aPresContext);
|
||||
NS_ENSURE_ARG_POINTER(aOrigin);
|
||||
|
@ -1443,29 +1443,6 @@ nsresult nsObjectFrame::GetWindowOriginInPixels(nsIPresContext * aPresContext, P
|
|||
|
||||
GetOffsetFromView(aPresContext, origin, &parentWithView);
|
||||
|
||||
// if it's windowless, let's make sure we have our origin set right
|
||||
// it may need to be corrected, like after scrolling
|
||||
if (aWindowless && parentWithView) {
|
||||
nsPoint correction(0,0);
|
||||
nsCOMPtr<nsIViewManager> parentVM;
|
||||
parentWithView->GetViewManager(*getter_AddRefs(parentVM));
|
||||
|
||||
// Walk up all the views and add up their positions. This will give us our
|
||||
// absolute position which is what we want to give the plugin
|
||||
nsIView* theView = parentWithView;
|
||||
while (theView) {
|
||||
nsCOMPtr<nsIViewManager> vm;
|
||||
theView->GetViewManager(*getter_AddRefs(vm));
|
||||
if (vm != parentVM)
|
||||
break;
|
||||
|
||||
theView->GetPosition(&correction.x, &correction.y);
|
||||
origin += correction;
|
||||
|
||||
theView->GetParent(theView);
|
||||
}
|
||||
}
|
||||
|
||||
float t2p;
|
||||
aPresContext->GetTwipsToPixels(&t2p);
|
||||
aOrigin->x = NSTwipsToIntPixels(origin.x, t2p);
|
||||
|
@ -1516,7 +1493,7 @@ nsObjectFrame::DidReflow(nsIPresContext* aPresContext,
|
|||
return rv;
|
||||
|
||||
nsPoint origin;
|
||||
GetWindowOriginInPixels(aPresContext, windowless, &origin);
|
||||
GetWindowOriginInPixels(aPresContext, &origin);
|
||||
|
||||
window->x = origin.x;
|
||||
window->y = origin.y;
|
||||
|
|
|
@ -160,7 +160,7 @@ protected:
|
|||
|
||||
nsresult NotifyContentObjectWrapper();
|
||||
|
||||
nsresult GetWindowOriginInPixels(nsIPresContext * aPresContext, PRBool aWindoless, nsPoint* aOrigin);
|
||||
nsresult GetWindowOriginInPixels(nsIPresContext * aPresContext, nsPoint* aOrigin);
|
||||
|
||||
private:
|
||||
nsPluginInstanceOwner *mInstanceOwner;
|
||||
|
|
Загрузка…
Ссылка в новой задаче