Bug 957391 - Call nsIFrame::SchedulePaint() in ImageLoader::DoRedraw(). r=mattwoodrow
authorSotaro Ikeda <sikeda@mozilla.com>
Mon, 10 Feb 2014 09:34:11 -0500
changeset 167900 64b3f71d79a8812433414b77d70438fb2fa3e219
parent 167899 4c6b94f2a4b56459e52257b48bd6a377d80df91f
child 167901 083e26c547507deb4ffe84604109bf10a64cad54
push id26191
push userryanvm@gmail.com
push dateMon, 10 Feb 2014 20:42:58 +0000
treeherdermozilla-central@d812f80a0f1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs957391
milestone30.0a1
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 957391 - Call nsIFrame::SchedulePaint() in ImageLoader::DoRedraw(). r=mattwoodrow
layout/style/ImageLoader.cpp
--- a/layout/style/ImageLoader.cpp
+++ b/layout/style/ImageLoader.cpp
@@ -317,17 +317,16 @@ void InvalidateImagesCallback(nsIFrame* 
   nsDisplayItem::Type type = nsDisplayItem::GetDisplayItemTypeFromKey(aItem->GetDisplayItemKey());
   uint8_t flags = nsDisplayItem::GetDisplayItemFlagsForType(type);
 
   if (flags & nsDisplayItem::TYPE_RENDERS_NO_IMAGES) {
     return;
   }
 
   aItem->Invalidate();
-  aFrame->SchedulePaint();
 
   // Update ancestor rendering observers (-moz-element etc)
   nsIFrame *f = aFrame;
   while (f && !f->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
     nsSVGEffects::InvalidateDirectRenderingObservers(f);
     f = nsLayoutUtils::GetCrossDocParentFrame(f);
   }
 }
@@ -345,16 +344,17 @@ ImageLoader::DoRedraw(FrameSet* aFrameSe
     if (frame->StyleVisibility()->IsVisible()) {
       if (frame->IsFrameOfType(nsIFrame::eTablePart)) {
         // Tables don't necessarily build border/background display items
         // for the individual table part frames, so IterateRetainedDataFor
         // might not find the right display item.
         frame->InvalidateFrame();
       } else {
         FrameLayerBuilder::IterateRetainedDataFor(frame, InvalidateImagesCallback);
+        frame->SchedulePaint();
       }
     }
   }
 }
 
 NS_IMPL_ADDREF(ImageLoader)
 NS_IMPL_RELEASE(ImageLoader)