Bug 619176 - Plugins get Visible state every time when scrolling (:BuildLayer always make them visible). r=roc a=approval2.0
authorOleg Romashin <romaxa@gmail.com>
Thu, 13 Jan 2011 15:20:53 +0200
changeset 60439 b9029c71a63a18fa3222252f14764d40797a4a07
parent 60438 08d4fcb4ebbf5b94e9994a854cfcd9d51ab58476
child 60440 17fae822d2d753587934bec672a9950b2dde6fe5
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, approval2
bugs619176
milestone2.0b10pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 619176 - Plugins get Visible state every time when scrolling (:BuildLayer always make them visible). r=roc a=approval2.0
layout/generic/nsObjectFrame.cpp
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -1472,17 +1472,17 @@ nsObjectFrame::BuildDisplayList(nsDispla
 #endif
 
   nsDisplayList replacedContent;
 
   if (aBuilder->IsForPainting() && mInstanceOwner && mInstanceOwner->UseLayers()) {
     NPWindow* window = nsnull;
     mInstanceOwner->GetWindow(window);
     PRBool isVisible = window && window->width > 0 && window->height > 0;
-    if (isVisible) {
+    if (isVisible && aBuilder->ShouldSyncDecodeImages()) {
   #ifndef XP_MACOSX
       mInstanceOwner->UpdateWindowVisibility(PR_TRUE);
   #endif
     }
 
     ImageContainer* container = GetImageContainer();
     nsRefPtr<Image> currentImage = container ? container->GetCurrentImage() : nsnull;
     if (!currentImage || !isVisible ||