Don't use QueryInterface to get a scrollable view from a view b=258521 r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@165693 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk
2004-11-24 00:19:21 +00:00
parent 54c25d147b
commit df2668e776
32 changed files with 84 additions and 112 deletions

View File

@@ -3586,8 +3586,8 @@ nsPluginInstanceOwner::Destroy()
nsIView* curView = parentWithView ? parentWithView->GetView() : nsnull;
while (curView)
{
nsIScrollableView* scrollingView;
if (NS_SUCCEEDED(CallQueryInterface(curView, &scrollingView)))
nsIScrollableView* scrollingView = curView->ToScrollableView();
if (scrollingView)
scrollingView->RemoveScrollPositionListener((nsIScrollPositionListener *)this);
curView = curView->GetParent();
@@ -3816,8 +3816,8 @@ NS_IMETHODIMP nsPluginInstanceOwner::Init(nsPresContext* aPresContext, nsObjectF
nsIView* curView = parentWithView ? parentWithView->GetView() : nsnull;
while (curView)
{
nsIScrollableView* scrollingView;
if (NS_SUCCEEDED(CallQueryInterface(curView, &scrollingView)))
nsIScrollableView* scrollingView = curView->ToScrollableView();
if (scrollingView)
scrollingView->AddScrollPositionListener((nsIScrollPositionListener *)this);
curView = curView->GetParent();