Bug 1000875 - Give nsDOMWindowUtils::CheckAndClearPaintedState the ability to check paints of canvas frames. r=roc

This commit is contained in:
Markus Stange 2014-05-05 10:23:18 +02:00
parent e050622aff
commit 2f9adce2c3

View File

@ -3076,6 +3076,17 @@ nsDOMWindowUtils::CheckAndClearPaintedState(nsIDOMElement* aElement, bool* aResu
return NS_OK;
}
// Get the outermost frame for the content node, so that we can test
// canvasframe invalidations by observing the documentElement.
for (;;) {
nsIFrame* parentFrame = frame->GetParent();
if (parentFrame && parentFrame->GetContent() == content) {
frame = parentFrame;
} else {
break;
}
}
*aResult = frame->CheckAndClearPaintedState();
return NS_OK;
}