diff --git a/view/src/nsScrollPortView.cpp b/view/src/nsScrollPortView.cpp index aa70c7d8ceb..0fb774310ff 100644 --- a/view/src/nsScrollPortView.cpp +++ b/view/src/nsScrollPortView.cpp @@ -522,17 +522,9 @@ void nsScrollPortView::Scroll(nsView *aScrolledView, nsPoint aTwipsDelta, nsPoin { nsIWidget *scrollWidget = GetWidget(); nsRegion updateRegion; - PRBool canBitBlit = PR_TRUE; - if (!scrollWidget) { - canBitBlit = PR_FALSE; - } else { - PRUint32 scrolledViewFlags = aScrolledView->GetViewFlags(); - - if ((!(mScrollProperties & NS_SCROLL_PROPERTY_ALWAYS_BLIT) && - !mViewManager->CanScrollWithBitBlt(aScrolledView, aTwipsDelta, &updateRegion))) { - canBitBlit = PR_FALSE; - } - } + PRBool canBitBlit = scrollWidget && + ((mScrollProperties & NS_SCROLL_PROPERTY_ALWAYS_BLIT) || + mViewManager->CanScrollWithBitBlt(aScrolledView, aTwipsDelta, &updateRegion)); if (canBitBlit) { // We're going to bit-blit. Let the viewmanager know so it can