зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1610171 - Clear animated paths when SVG lengths change. r=jwatt
If we reconstruct frames due to some other reason, we will never get to the DidSetComputedStyle bit that would clear it for us on change. This is all in all very unfortunate, since I think the fact that we reconstruct frames so aggressively is a bug anyway (this comes from this bit in SVGAnimatedTransformList): https://searchfox.org/mozilla-central/rev/a37fc61f172b432e7ae0b6b4c4a12cac2a787a0f/dom/svg/SVGAnimatedTransformList.h#108 I think we are supposed to reconstruct only once at most, but I may be crazy :^) Will look at that in a separate bug though, this is the most minimal change that addresses the regression. An alternative (equally low-risk) would be to clear cached paths also in the case where there's no old computed style in nsSVGGeometryFrame... Differential Revision: https://phabricator.services.mozilla.com/D63802 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0564a48301
Коммит
1b99376255
|
@ -1432,6 +1432,11 @@ void SVGElement::DidChangeLength(uint8_t aAttrEnum,
|
|||
}
|
||||
|
||||
void SVGElement::DidAnimateLength(uint8_t aAttrEnum) {
|
||||
// We need to do this here. Normally the SMIL restyle would also cause us to
|
||||
// do this from DidSetComputedStyle, but we don't have that guarantee if our
|
||||
// frame gets reconstructed.
|
||||
ClearAnyCachedPath();
|
||||
|
||||
if (SVGGeometryProperty::ElementMapsLengthsToStyle(this)) {
|
||||
nsCSSPropertyID propId =
|
||||
SVGGeometryProperty::AttrEnumToCSSPropId(this, aAttrEnum);
|
||||
|
@ -1441,8 +1446,6 @@ void SVGElement::DidAnimateLength(uint8_t aAttrEnum) {
|
|||
return;
|
||||
}
|
||||
|
||||
ClearAnyCachedPath();
|
||||
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
|
||||
if (frame) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче