[webkit-reviews] review granted: [Bug 196895] ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element : [Attachment 367383] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 13 07:52:48 PDT 2019


Darin Adler <darin at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 196895: ASSERT fires when removing a disallowed clone from the shadow tree
without reseting its corresponding element
https://bugs.webkit.org/show_bug.cgi?id=196895

Attachment 367383: Patch

https://bugs.webkit.org/attachment.cgi?id=367383&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 367383
  --> https://bugs.webkit.org/attachment.cgi?id=367383
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367383&action=review

> Source/WebCore/svg/SVGUseElement.cpp:325
>	   for (auto& descendant : descendantsOfType<SVGElement>(*clone))
>	       descendant.setCorrespondingElement(nullptr);
> +	   if (is<SVGElement>(clone))
> +	       downcast<SVGElement>(*clone).setCorrespondingElement(nullptr);

Too bad there’s not a more elegant way to writing this. Just need a version of
descendantsOfType that also includes the item itself if it has the right type.


More information about the webkit-reviews mailing list