Bug 409376 - getScreenCTM testcase fails on reload. r+sr=bzbarsky,a1.9=beltzner

This commit is contained in:
longsonr@gmail.com 2007-12-31 05:43:51 -08:00
Родитель d760128fc6
Коммит d3d49b0a77
2 изменённых файлов: 24 добавлений и 0 удалений

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

@ -141,6 +141,12 @@ NS_IMETHODIMP nsSVGGraphicElement::GetCTM(nsIDOMSVGMatrix **_retval)
nsresult rv; nsresult rv;
*_retval = nsnull; *_retval = nsnull;
nsIDocument* currentDoc = GetCurrentDoc();
if (currentDoc) {
// Flush all pending notifications so that our frames are uptodate
currentDoc->FlushPendingNotifications(Flush_Layout);
}
nsBindingManager *bindingManager = nsnull; nsBindingManager *bindingManager = nsnull;
// XXXbz I _think_ this is right. We want to be using the binding manager // XXXbz I _think_ this is right. We want to be using the binding manager
// that would have attached the binding that gives us our anonymous parent. // that would have attached the binding that gives us our anonymous parent.
@ -183,6 +189,12 @@ NS_IMETHODIMP nsSVGGraphicElement::GetScreenCTM(nsIDOMSVGMatrix **_retval)
nsresult rv; nsresult rv;
*_retval = nsnull; *_retval = nsnull;
nsIDocument* currentDoc = GetCurrentDoc();
if (currentDoc) {
// Flush all pending notifications so that our frames are uptodate
currentDoc->FlushPendingNotifications(Flush_Layout);
}
nsBindingManager *bindingManager = nsnull; nsBindingManager *bindingManager = nsnull;
// XXXbz I _think_ this is right. We want to be using the binding manager // XXXbz I _think_ this is right. We want to be using the binding manager
// that would have attached the binding that gives us our anonymous parent. // that would have attached the binding that gives us our anonymous parent.

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

@ -701,6 +701,12 @@ nsSVGSVGElement::GetCTM(nsIDOMSVGMatrix **_retval)
nsresult rv; nsresult rv;
*_retval = nsnull; *_retval = nsnull;
nsIDocument* currentDoc = GetCurrentDoc();
if (currentDoc) {
// Flush all pending notifications so that our frames are uptodate
currentDoc->FlushPendingNotifications(Flush_Layout);
}
// first try to get the "screen" CTM of our nearest SVG ancestor // first try to get the "screen" CTM of our nearest SVG ancestor
nsBindingManager *bindingManager = nsnull; nsBindingManager *bindingManager = nsnull;
@ -817,6 +823,12 @@ nsSVGSVGElement::GetScreenCTM(nsIDOMSVGMatrix **_retval)
nsresult rv; nsresult rv;
*_retval = nsnull; *_retval = nsnull;
nsIDocument* currentDoc = GetCurrentDoc();
if (currentDoc) {
// Flush all pending notifications so that our frames are uptodate
currentDoc->FlushPendingNotifications(Flush_Layout);
}
// first try to get the "screen" CTM of our nearest SVG ancestor // first try to get the "screen" CTM of our nearest SVG ancestor
nsBindingManager *bindingManager = nsnull; nsBindingManager *bindingManager = nsnull;