mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 1000875 - Give nsDOMWindowUtils::CheckAndClearPaintedState the ability to check paints of canvas frames. r=roc
This commit is contained in:
parent
c3c2709899
commit
691caf748b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user