void SVGPathElement::pathSegListChanged(SVGPathSegRole role, ListModification listModification) { switch (role) { case PathSegNormalizedRole: // FIXME: https://bugs.webkit.org/show_bug.cgi?id=15412 - Implement normalized path segment lists! break; case PathSegUnalteredRole: if (listModification == ListModificationAppend) { ASSERT(!m_pathSegList.value.isEmpty()); appendSVGPathByteStreamFromSVGPathSeg(m_pathSegList.value.last().copyRef(), m_pathByteStream, UnalteredParsing); } else buildSVGPathByteStreamFromSVGPathSegList(m_pathSegList.value, m_pathByteStream, UnalteredParsing); break; case PathSegUndefinedRole: return; } invalidateSVGAttributes(); RenderSVGPath* renderer = downcast<RenderSVGPath>(this->renderer()); if (!renderer) return; renderer->setNeedsShapeUpdate(); RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); }
void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName) { if (!isSupportedAttribute(attrName)) { SVGGraphicsElement::svgAttributeChanged(attrName); return; } InstanceInvalidationGuard guard(*this); RenderSVGPath* renderer = downcast<RenderSVGPath>(this->renderer()); if (attrName == SVGNames::dAttr) { if (m_pathSegList.shouldSynchronize && !SVGAnimatedProperty::lookupWrapper<SVGPathElement, SVGAnimatedPathSegListPropertyTearOff>(this, dPropertyInfo())->isAnimating()) { SVGPathSegList newList(PathSegUnalteredRole); buildSVGPathSegListFromByteStream(m_pathByteStream, *this, newList, UnalteredParsing); m_pathSegList.value = newList; } if (renderer) renderer->setNeedsShapeUpdate(); invalidateMPathDependencies(); } if (renderer) RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); }