зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
fa31d73bc9
Коммит
d5e3df046e
|
@ -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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче