Bug 1114526 - Make sure that CSS image invalidation also notifies rendering observers even if the image isn't visible (because the rendering observers might be visible). r=mattwoodrow

There is no retained rendering data for non-visible images, so FrameLayerBuilder::IterateRetainedData never calls it's callback, the callback is the only thing that calls nsSVGEffects::InvalidateDirectRenderingObservers. We need to call nsSVGEffects::InvalidateDirectRenderingObservers always.
This commit is contained in:
Timothy Nikkel 2015-06-25 13:46:00 -04:00
Родитель fa31d73bc9
Коммит d5e3df046e
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -354,13 +354,6 @@ void InvalidateImagesCallback(nsIFrame* aFrame,
}
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);
}
}
void
@ -381,6 +374,14 @@ ImageLoader::DoRedraw(FrameSet* aFrameSet, bool aForcePaint)
frame->InvalidateFrame();
} else {
FrameLayerBuilder::IterateRetainedDataFor(frame, InvalidateImagesCallback);
// Update ancestor rendering observers (-moz-element etc)
nsIFrame *f = frame;
while (f && !f->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
nsSVGEffects::InvalidateDirectRenderingObservers(f);
f = nsLayoutUtils::GetCrossDocParentFrame(f);
}
if (aForcePaint) {
frame->SchedulePaint();
}