Bug 907503 - Fix invalidation for SMIL animation in SVG-as-an-image. r=roc

This commit is contained in:
Jonathan Watt 2013-09-04 11:39:31 +01:00
Родитель 774ee65e35
Коммит 7e60ad4ae6
1 изменённых файлов: 14 добавлений и 8 удалений

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

@ -1141,7 +1141,16 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
BuildContainerLayerFor(aBuilder, layerManager, aForFrame, nullptr, *this,
containerParameters, nullptr);
if (widgetTransaction) {
nsIDocument* document = nullptr;
if (presShell) {
document = presShell->GetDocument();
}
if (widgetTransaction ||
// SVG-as-an-image docs don't paint as part of the retained layer tree,
// but they still need the invalidation state bits cleared in order for
// invalidation for CSS/SMIL animation to work properly.
(document && document->IsBeingUsedAsImage())) {
aForFrame->ClearInvalidationStateBits();
}
@ -1177,13 +1186,10 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
}
bool mayHaveTouchListeners = false;
if (presShell) {
nsIDocument* document = presShell->GetDocument();
if (document) {
nsCOMPtr<nsPIDOMWindow> innerWin(document->GetInnerWindow());
if (innerWin) {
mayHaveTouchListeners = innerWin->HasTouchEventListeners();
}
if (document) {
nsCOMPtr<nsPIDOMWindow> innerWin(document->GetInnerWindow());
if (innerWin) {
mayHaveTouchListeners = innerWin->HasTouchEventListeners();
}
}