Bug 779971 - Make nsSVGTextPathProperty::DoUpdate trigger nsSVGTextFrame::NotifyGlyphMetricsChange() off an asynchronous change hint (to avoid calling nsLayoutUtils::FrameNeedsReflow synchronously under nsISVGChildFrame::ReflowSVG or during frame teardown, and avoid infinite loops caused by using an event queue event). r=jwatt.

This commit is contained in:
Robert Longson
2012-11-07 09:53:44 +00:00
parent 492766236b
commit dd48a6c2c0
5 changed files with 34 additions and 34 deletions

View File

@@ -116,6 +116,7 @@
#include "nsIDOMSVGFilters.h"
#include "DOMSVGTests.h"
#include "nsSVGEffects.h"
#include "nsSVGTextPathFrame.h"
#include "nsSVGUtils.h"
#include "nsRefreshDriver.h"
@@ -7797,6 +7798,12 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
aFrame->InvalidateFrameSubtree();
}
}
if (aChange & nsChangeHint_UpdateTextPath) {
NS_ABORT_IF_FALSE(aFrame->GetType() == nsGkAtoms::svgTextPathFrame,
"textPath frame expected");
// Invalidate and reflow the entire nsSVGTextFrame:
static_cast<nsSVGTextPathFrame*>(aFrame)->NotifyGlyphMetricsChange();
}
if (aChange & nsChangeHint_UpdateOpacityLayer) {
// FIXME/bug 796697: we can get away with empty transactions for
// opacity updates in many cases.