Summary: | Remove the SVG tear off objects for SVGColorAnimator | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||
Component: | SVG | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | jonlee, simon.fraser, webkit-bug-importer, zimmermann | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 195960 | ||||||
Bug Blocks: | 191237, 196037 | ||||||
Attachments: |
|
Description
Said Abou-Hallawa
2019-03-20 13:13:57 PDT
Created attachment 365394 [details]
Patch
Comment on attachment 365394 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365394&action=review > Source/WebCore/ChangeLog:44 > + -- SVGPropertyAnimatorCreator checks its HashMap it has an entry for the checks whether its HashMap has an entry > Source/WebCore/ChangeLog:53 > + SVGElement about that which will notify its SVGPropertyAnimatorCreator. Remove "about that" > Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.cpp:38 > + static NeverDestroyed<const AtomicString> currentColor("currentColor", AtomicString::ConstructFromLiteral); > + > + if (string != currentColor.get()) Not sure why this uses AtomicString; this code does an explicit string compare, so doesn't atomic-ness. > Source/WebCore/svg/properties/SVGPropertyAnimatorCreator.h:33 > +class SVGPropertyAnimatorCreator { Classes that make things are usually called "factories". So SVGPropertyAnimatorFactory > Source/WebCore/svg/properties/SVGPropertyAnimatorCreator.h:63 > + // If refCount = 1 (in the animator) + 1 (in m_attributeProperty) = 2, the entry can be deleted. > + if (iterator->value->refCount() == 2) > + m_attributeProperty.remove(iterator); Removing based on looking at refCounts feels a bit icky. Comment on attachment 365394 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365394&action=review >> Source/WebCore/ChangeLog:44 >> + -- SVGPropertyAnimatorCreator checks its HashMap it has an entry for the > > checks whether its HashMap has an entry Fixed. >> Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.cpp:38 >> + if (string != currentColor.get()) > > Not sure why this uses AtomicString; this code does an explicit string compare, so doesn't atomic-ness. static variable is converted to NeverDestroyed<const String>. >> Source/WebCore/svg/properties/SVGPropertyAnimatorCreator.h:33 >> +class SVGPropertyAnimatorCreator { > > Classes that make things are usually called "factories". So SVGPropertyAnimatorFactory Done. >> Source/WebCore/svg/properties/SVGPropertyAnimatorCreator.h:63 >> + m_attributeProperty.remove(iterator); > > Removing based on looking at refCounts feels a bit icky. I will think about it. Committed r243259: <https://trac.webkit.org/changeset/243259> |