diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp
index 1cecc46665d..3bf2f4f04e5 100644
--- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp
+++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp
@@ -338,9 +338,11 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
// If the frame has a fixed background attachment, then indicate that the
// view's contents should repainted and not bitblt'd
- PRUint32 viewFlags;
- view->GetViewFlags(&viewFlags);
- view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
+ if (fixedBackgroundAttachment) {
+ PRUint32 viewFlags;
+ view->GetViewFlags(&viewFlags);
+ view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
+ }
// Insert the view into the view hierarchy. If the parent view is a
// scrolling view we need to do this differently
diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp
index 1cecc46665d..3bf2f4f04e5 100644
--- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp
+++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp
@@ -338,9 +338,11 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
// If the frame has a fixed background attachment, then indicate that the
// view's contents should repainted and not bitblt'd
- PRUint32 viewFlags;
- view->GetViewFlags(&viewFlags);
- view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
+ if (fixedBackgroundAttachment) {
+ PRUint32 viewFlags;
+ view->GetViewFlags(&viewFlags);
+ view->SetViewFlags(viewFlags | NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
+ }
// Insert the view into the view hierarchy. If the parent view is a
// scrolling view we need to do this differently