We should update the shadow trees of a SVG use element before starting style resolution instead of doing it as a part of willRecalc calls.
<rdar://problem/36009806>
Created attachment 329196 [details] Patch
Comment on attachment 329196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=329196&action=review Nice. I think you could also remove this from Style::TreeResolver::resolveComposedTree: // FIXME: SVG <use> element may cause tree mutations during style recalc. it.dropAssertions(); > Source/WebCore/svg/SVGUseElement.cpp:197 > void SVGUseElement::willRecalcStyle(Style::Change change) > { > - // FIXME: Shadow tree should be updated before style recalc. > - if (m_shadowTreeNeedsUpdate) > - updateShadowTree(); > SVGGraphicsElement::willRecalcStyle(change); > } This function can be removed completely.
Thanks for the review! This was a surprisingly easy/small patch. We should have done it ages ago given how small this patch is! (In reply to Antti Koivisto from comment #3) > Comment on attachment 329196 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=329196&action=review > > Nice. I think you could also remove this from > Style::TreeResolver::resolveComposedTree: > > // FIXME: SVG <use> element may cause tree mutations during style recalc. > it.dropAssertions(); Oh, that's a good point. I'd try running the tests with that. > > Source/WebCore/svg/SVGUseElement.cpp:197 > > void SVGUseElement::willRecalcStyle(Style::Change change) > > { > > - // FIXME: Shadow tree should be updated before style recalc. > > - if (m_shadowTreeNeedsUpdate) > > - updateShadowTree(); > > SVGGraphicsElement::willRecalcStyle(change); > > } > > This function can be removed completely. Good point.
Created attachment 329238 [details] Patch for landing
Comment on attachment 329238 [details] Patch for landing Clearing flags on attachment: 329238 Committed r225868: <https://trac.webkit.org/changeset/225868>
All reviewed patches have been landed. Closing bug.