Don't ref-count nsIScrollableViewProvider. b=385286 r+sr=roc

This commit is contained in:
mats.palmgren@bredband.net 2007-06-23 00:39:40 -07:00
parent 3832520367
commit 105302b88e
2 changed files with 7 additions and 6 deletions

View File

@ -1869,8 +1869,8 @@ nsEventStateManager::DoScrollText(nsPresContext* aPresContext,
// operation, even if the mouse hasn't moved.
nsIFrame* lastScrollFrame = nsMouseWheelTransaction::GetTargetFrame();
if (lastScrollFrame) {
nsCOMPtr<nsIScrollableViewProvider> svp =
do_QueryInterface(lastScrollFrame);
nsIScrollableViewProvider* svp;
CallQueryInterface(lastScrollFrame, &svp);
if (svp) {
scrollView = svp->GetScrollableView();
nsMouseWheelTransaction::UpdateTransaction();
@ -1885,7 +1885,8 @@ nsEventStateManager::DoScrollText(nsPresContext* aPresContext,
scrollFrame = GetParentFrameToScroll(aPresContext, scrollFrame)) {
// Check whether the frame wants to provide us with a scrollable view.
scrollView = nsnull;
nsCOMPtr<nsIScrollableViewProvider> svp = do_QueryInterface(scrollFrame);
nsIScrollableViewProvider* svp;
CallQueryInterface(scrollFrame, &svp);
if (svp) {
scrollView = svp->GetScrollableView();
}

View File

@ -3206,7 +3206,8 @@ PresShell::GetViewToScroll(nsLayoutUtils::Direction aDirection)
if (focusedContent) {
nsIFrame* startFrame = GetPrimaryFrameFor(focusedContent);
if (startFrame) {
nsCOMPtr<nsIScrollableViewProvider> svp = do_QueryInterface(startFrame);
nsIScrollableViewProvider* svp;
CallQueryInterface(startFrame, &svp);
// If this very frame provides a scroll view, start there instead of frame's
// closest view, because the scroll view may be inside a child frame.
// For example, this happens in the case of overflow:scroll.
@ -5351,7 +5352,7 @@ PresShell::HandleEvent(nsIView *aView,
if (shell != this) {
// Handle the event in the correct shell.
// Prevent deletion until we're done with event handling (bug 336582).
nsRefPtr<nsIPresShell> kungFuDeathGrip(shell);
nsCOMPtr<nsIPresShell> kungFuDeathGrip(shell);
nsIView* subshellRootView;
shell->GetViewManager()->GetRootView(subshellRootView);
// We pass the subshell's root view as the view to start from. This is
@ -6127,7 +6128,6 @@ PresShell::ProcessReflowCommands(PRBool aInterruptible)
DidDoReflow();
#ifdef DEBUG
nsIFrame* rootFrame = FrameManager()->GetRootFrame();
if (VERIFY_REFLOW_DUMP_COMMANDS & gVerifyReflowFlags) {
printf("\nPresShell::ProcessReflowCommands() finished: this=%p\n", (void*)this);
}