WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP
bug-230296-20210914214556.patch (text/plain), 67.63 KB, created by
Said Abou-Hallawa
on 2021-09-14 21:45:56 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2021-09-14 21:45:56 PDT
Size:
67.63 KB
patch
obsolete
>Subversion Revision: 282350 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 26d4ff9a101c0886bef128d571be417a570c450d..d95e574297d9abbcb7c2bb9c819fac2e59e71504 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,137 @@ >+2021-09-14 Said Abou-Hallawa <said@apple.com> >+ >+ setNeedsLayout() should not be called when changing the SVG properties >+ https://bugs.webkit.org/show_bug.cgi?id=230296 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WIP >+ >+ * rendering/svg/RenderSVGImage.cpp: >+ (WebCore::RenderSVGImage::imageChanged): >+ * rendering/svg/RenderSVGResource.cpp: >+ (WebCore::removeFromCacheAndInvalidateDependencies): >+ * rendering/svg/SVGResourcesCache.cpp: >+ (WebCore::SVGResourcesCache::removeRendererFromResources): >+ * rendering/svg/SVGResourcesCache.h: >+ * rendering/updating/RenderTreeUpdater.cpp: >+ (WebCore::RenderTreeUpdater::updateRenderTree): >+ * svg/SVGAnimateMotionElement.cpp: >+ (WebCore::SVGAnimateMotionElement::applyResultsToTarget): >+ * svg/SVGCircleElement.cpp: >+ (WebCore::SVGCircleElement::svgAttributeChanged): >+ * svg/SVGClipPathElement.cpp: >+ (WebCore::SVGClipPathElement::svgAttributeChanged): >+ * svg/SVGComponentTransferFunctionElement.cpp: >+ (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): >+ * svg/SVGElement.cpp: >+ (WebCore::SVGElement::commitPropertyChange): >+ (WebCore::SVGElement::setPresentationalHintStyleIsDirty): >+ (WebCore::SVGElement::setNeedsParentAndResourceInvalidation): >+ (WebCore::SVGElement::invalidateParentAndResourceIfNeeded): >+ * svg/SVGElement.h: >+ (WebCore::SVGElement::setAnimatedSVGAttributesAreDirty): >+ (WebCore::SVGElement::invalidateSVGAttributes): Deleted. >+ (WebCore::SVGElement::invalidateSVGPresentationalHintStyle): Deleted. >+ * svg/SVGEllipseElement.cpp: >+ (WebCore::SVGEllipseElement::svgAttributeChanged): >+ * svg/SVGFEBlendElement.cpp: >+ (WebCore::SVGFEBlendElement::svgAttributeChanged): >+ * svg/SVGFEColorMatrixElement.cpp: >+ (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): >+ * svg/SVGFEComponentTransferElement.cpp: >+ (WebCore::SVGFEComponentTransferElement::svgAttributeChanged): >+ * svg/SVGFEComponentTransferElement.h: >+ * svg/SVGFECompositeElement.cpp: >+ (WebCore::SVGFECompositeElement::svgAttributeChanged): >+ * svg/SVGFEConvolveMatrixElement.cpp: >+ (WebCore::SVGFEConvolveMatrixElement::setOrder): >+ (WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength): >+ (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): >+ * svg/SVGFEDiffuseLightingElement.cpp: >+ (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): >+ * svg/SVGFEDisplacementMapElement.cpp: >+ (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): >+ * svg/SVGFEDropShadowElement.cpp: >+ (WebCore::SVGFEDropShadowElement::setStdDeviation): >+ (WebCore::SVGFEDropShadowElement::svgAttributeChanged): >+ * svg/SVGFEGaussianBlurElement.cpp: >+ (WebCore::SVGFEGaussianBlurElement::setStdDeviation): >+ (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): >+ * svg/SVGFEImageElement.cpp: >+ (WebCore::SVGFEImageElement::buildPendingResource): >+ (WebCore::SVGFEImageElement::svgAttributeChanged): >+ (WebCore::SVGFEImageElement::notifyFinished): >+ * svg/SVGFELightElement.cpp: >+ (WebCore::SVGFELightElement::childrenChanged): >+ * svg/SVGFEMergeNodeElement.cpp: >+ (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): >+ * svg/SVGFEMorphologyElement.cpp: >+ (WebCore::SVGFEMorphologyElement::setRadius): >+ (WebCore::SVGFEMorphologyElement::svgAttributeChanged): >+ * svg/SVGFEOffsetElement.cpp: >+ (WebCore::SVGFEOffsetElement::svgAttributeChanged): >+ * svg/SVGFESpecularLightingElement.cpp: >+ (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): >+ * svg/SVGFETileElement.cpp: >+ (WebCore::SVGFETileElement::svgAttributeChanged): >+ * svg/SVGFilterElement.cpp: >+ (WebCore::SVGFilterElement::svgAttributeChanged): >+ * svg/SVGFilterPrimitiveStandardAttributes.cpp: >+ (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): >+ (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged): >+ (WebCore::invalidateFilterPrimitiveParent): >+ * svg/SVGFilterPrimitiveStandardAttributes.h: >+ (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate): Deleted. >+ * svg/SVGForeignObjectElement.cpp: >+ (WebCore::SVGForeignObjectElement::svgAttributeChanged): >+ * svg/SVGGeometryElement.cpp: >+ (WebCore::SVGGeometryElement::svgAttributeChanged): >+ * svg/SVGGradientElement.cpp: >+ (WebCore::SVGGradientElement::svgAttributeChanged): >+ * svg/SVGGraphicsElement.cpp: >+ (WebCore::SVGGraphicsElement::svgAttributeChanged): >+ * svg/SVGImageElement.cpp: >+ (WebCore::SVGImageElement::svgAttributeChanged): >+ * svg/SVGLineElement.cpp: >+ (WebCore::SVGLineElement::svgAttributeChanged): >+ * svg/SVGLinearGradientElement.cpp: >+ (WebCore::SVGLinearGradientElement::svgAttributeChanged): >+ * svg/SVGMarkerElement.cpp: >+ (WebCore::SVGMarkerElement::svgAttributeChanged): >+ * svg/SVGMaskElement.cpp: >+ (WebCore::SVGMaskElement::svgAttributeChanged): >+ * svg/SVGPathElement.cpp: >+ (WebCore::SVGPathElement::svgAttributeChanged): >+ * svg/SVGPatternElement.cpp: >+ (WebCore::SVGPatternElement::svgAttributeChanged): >+ * svg/SVGPolyElement.cpp: >+ (WebCore::SVGPolyElement::svgAttributeChanged): >+ * svg/SVGRadialGradientElement.cpp: >+ (WebCore::SVGRadialGradientElement::svgAttributeChanged): >+ * svg/SVGRectElement.cpp: >+ (WebCore::SVGRectElement::svgAttributeChanged): >+ * svg/SVGSVGElement.cpp: >+ (WebCore::SVGSVGElement::svgAttributeChanged): >+ (WebCore::SVGSVGElement::scrollToFragment): >+ (WebCore::SVGSVGElement::resetScrollAnchor): >+ * svg/SVGStopElement.cpp: >+ (WebCore::SVGStopElement::svgAttributeChanged): >+ * svg/SVGTRefElement.cpp: >+ (WebCore::SVGTRefElement::svgAttributeChanged): >+ * svg/SVGTextContentElement.cpp: >+ (WebCore::SVGTextContentElement::svgAttributeChanged): >+ * svg/SVGTextPathElement.cpp: >+ (WebCore::SVGTextPathElement::svgAttributeChanged): >+ * svg/SVGTextPositioningElement.cpp: >+ (WebCore::SVGTextPositioningElement::svgAttributeChanged): >+ * svg/SVGUseElement.cpp: >+ (WebCore::SVGUseElement::svgAttributeChanged): >+ * svg/SVGViewElement.cpp: >+ (WebCore::SVGViewElement::svgAttributeChanged): >+ * svg/properties/SVGAttributeAnimator.cpp: >+ (WebCore::SVGAttributeAnimator::invalidateStyle): >+ > 2021-09-13 Alan Bujtas <zalan@apple.com> > > [LFC] Rename LayoutState::established*FormattingState to formattingStateFor*FormattingContext >diff --git a/Source/WebCore/rendering/svg/RenderSVGImage.cpp b/Source/WebCore/rendering/svg/RenderSVGImage.cpp >index ea5b8513e6e478af5d9f7e59ea7a418a867ba7b6..8b2bce4cd9e22130d8858d0c0a3cd405eaa8319d 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGImage.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGImage.cpp >@@ -243,19 +243,14 @@ void RenderSVGImage::imageChanged(WrappedImagePtr, const IntRect*) > // This empty image may be cached by SVG resources which must be invalidated. > if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this)) > resources->removeClientFromCache(*this); >- >- // Eventually notify parent resources, that we've changed. >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*this, false); >- >+ > // Update the SVGImageCache sizeAndScales entry in case image loading finished after layout. > // (https://bugs.webkit.org/show_bug.cgi?id=99489) > m_objectBoundingBox = FloatRect(); >- if (updateImageViewport()) >- setNeedsLayout(); > > invalidateBufferedForeground(); > >- repaint(); >+ imageElement().setNeedsParentAndResourceInvalidation(); > } > > void RenderSVGImage::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&, const RenderLayerModelObject*) >diff --git a/Source/WebCore/rendering/svg/RenderSVGResource.cpp b/Source/WebCore/rendering/svg/RenderSVGResource.cpp >index 9fd33f3c0b91f71456ba25a2efd06dd02d39a6ad..405fc47a4faffc03047f6c0e3aa0ea177d0ec5fc 100644 >--- a/Source/WebCore/rendering/svg/RenderSVGResource.cpp >+++ b/Source/WebCore/rendering/svg/RenderSVGResource.cpp >@@ -156,16 +156,7 @@ RenderSVGResourceSolidColor* RenderSVGResource::sharedSolidPaintingResource() > > static void removeFromCacheAndInvalidateDependencies(RenderElement& renderer, bool needsLayout) > { >- if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer)) { >- if (RenderSVGResourceFilter* filter = resources->filter()) >- filter->removeClientFromCache(renderer); >- >- if (RenderSVGResourceMasker* masker = resources->masker()) >- masker->removeClientFromCache(renderer); >- >- if (RenderSVGResourceClipper* clipper = resources->clipper()) >- clipper->removeClientFromCache(renderer); >- } >+ SVGResourcesCache::removeRendererFromResources(renderer); > > if (!is<SVGElement>(renderer.element())) > return; >diff --git a/Source/WebCore/rendering/svg/SVGResourcesCache.cpp b/Source/WebCore/rendering/svg/SVGResourcesCache.cpp >index ad9e2242fe9dfccc0a64e45ca323c7c45d9a1056..4be0df47c2e2748e4085e44d5565ae8e86ad4b64 100644 >--- a/Source/WebCore/rendering/svg/SVGResourcesCache.cpp >+++ b/Source/WebCore/rendering/svg/SVGResourcesCache.cpp >@@ -169,6 +169,22 @@ void SVGResourcesCache::resourceDestroyed(RenderSVGResourceContainer& resource) > } > } > >+void SVGResourcesCache::removeRendererFromResources(RenderElement& renderer) >+{ >+ auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer); >+ if (!resources) >+ return; >+ >+ if (auto filter = resources->filter()) >+ filter->removeClientFromCache(renderer); >+ >+ if (auto masker = resources->masker()) >+ masker->removeClientFromCache(renderer); >+ >+ if (auto clipper = resources->clipper()) >+ clipper->removeClientFromCache(renderer); >+} >+ > SVGResourcesCache::SetStyleForScope::SetStyleForScope(RenderElement& renderer, const RenderStyle& scopedStyle, const RenderStyle& newStyle) > : m_renderer(renderer) > , m_scopedStyle(scopedStyle) >diff --git a/Source/WebCore/rendering/svg/SVGResourcesCache.h b/Source/WebCore/rendering/svg/SVGResourcesCache.h >index 58c91474dbb035eb35d3ac6717bf4ffdd1852bad..7b6bc9d2db034d2bde2c150425293b73a180a1ed 100644 >--- a/Source/WebCore/rendering/svg/SVGResourcesCache.h >+++ b/Source/WebCore/rendering/svg/SVGResourcesCache.h >@@ -58,6 +58,8 @@ public: > // Called from RenderSVGResourceContainer::willBeDestroyed(). > static void resourceDestroyed(RenderSVGResourceContainer&); > >+ static void removeRendererFromResources(RenderElement&); >+ > class SetStyleForScope { > WTF_MAKE_NONCOPYABLE(SetStyleForScope); > public: >diff --git a/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp b/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >index 8c2bc4ef4c497031900218bd06f75da97c85d114..445a039bf97df7106ecbaf6dacc3602f4db5555a 100644 >--- a/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >+++ b/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >@@ -193,6 +193,9 @@ void RenderTreeUpdater::updateRenderTree(ContainerNode& root) > if (elementUpdates) > updateElementRenderer(element, *elementUpdates); > >+ if (is<SVGElement>(element)) >+ downcast<SVGElement>(element).invalidateParentAndResourceIfNeeded(); >+ > storePreviousRenderer(element); > > bool mayHaveRenderedDescendants = element.renderer() || (element.hasDisplayContents() && shouldCreateRenderer(element, renderTreePosition().parent())); >diff --git a/Source/WebCore/svg/SVGAnimateMotionElement.cpp b/Source/WebCore/svg/SVGAnimateMotionElement.cpp >index 377d79a0d31e0afb5bc8d82e4fd0e6126dcd3d8c..6c5ae580c77ff30139ea9dfda4ec5681e81ff567 100644 >--- a/Source/WebCore/svg/SVGAnimateMotionElement.cpp >+++ b/Source/WebCore/svg/SVGAnimateMotionElement.cpp >@@ -248,11 +248,14 @@ void SVGAnimateMotionElement::applyResultsToTarget() > if (!targetElement) > return; > >- if (RenderElement* renderer = targetElement->renderer()) { >- renderer->setNeedsTransformUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >- >+ auto invalidate = [](SVGElement& element) { >+ if (auto renderer = element.renderer()) >+ renderer->setNeedsTransformUpdate(); >+ element.setNeedsParentAndResourceInvalidation(); >+ }; >+ >+ invalidate(*targetElement); >+ > AffineTransform* targetSupplementalTransform = targetElement->supplementalTransform(); > if (!targetSupplementalTransform) > return; >@@ -263,10 +266,7 @@ void SVGAnimateMotionElement::applyResultsToTarget() > if (!transform || *transform == *targetSupplementalTransform) > continue; > *transform = *targetSupplementalTransform; >- if (RenderElement* renderer = instance->renderer()) { >- renderer->setNeedsTransformUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >+ invalidate(instance); > } > } > >diff --git a/Source/WebCore/svg/SVGCircleElement.cpp b/Source/WebCore/svg/SVGCircleElement.cpp >index cd81d398ce5334ecb988f6ceb41b22e266624820..1669aaa128fe41a841252aff50957177c03d602e 100644 >--- a/Source/WebCore/svg/SVGCircleElement.cpp >+++ b/Source/WebCore/svg/SVGCircleElement.cpp >@@ -67,8 +67,9 @@ void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomStrin > void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { >+ ASSERT(PropertyRegistry::isAnimatedLengthAttribute(attrName)); > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >+ setPresentationalHintStyleIsDirty(); > return; > } > >diff --git a/Source/WebCore/svg/SVGClipPathElement.cpp b/Source/WebCore/svg/SVGClipPathElement.cpp >index b4e79958c5b130355f79994b1183c53f92ced69b..0e6043ff2dc25a1f137b7cc3921622d08a9a52db 100644 >--- a/Source/WebCore/svg/SVGClipPathElement.cpp >+++ b/Source/WebCore/svg/SVGClipPathElement.cpp >@@ -66,9 +66,7 @@ void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp >index 0cd4fd41e53ad15828328e3b13f82ee6065e2d9d..8ddc8dbd7e2d415facc8381a2080f5cdea688933 100644 >--- a/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp >+++ b/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp >@@ -92,7 +92,7 @@ void SVGComponentTransferFunctionElement::svgAttributeChanged(const QualifiedNam > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidateFilterPrimitiveParent(this); >+ invalidateFilterPrimitiveParent(*this); > return; > } > >diff --git a/Source/WebCore/svg/SVGElement.cpp b/Source/WebCore/svg/SVGElement.cpp >index ba542606bb09ba698873dbd7ae08a13e22aafdbf..8d21116482effda7a721bdb8d2d51cb0773923a7 100644 >--- a/Source/WebCore/svg/SVGElement.cpp >+++ b/Source/WebCore/svg/SVGElement.cpp >@@ -585,7 +585,7 @@ void SVGElement::commitPropertyChange(SVGProperty* property) > // SVGLengthList and not the SVGLength. > property->setDirty(); > >- invalidateSVGAttributes(); >+ setAnimatedSVGAttributesAreDirty(); > svgAttributeChanged(propertyRegistry().propertyAttributeName(*property)); > } > >@@ -601,7 +601,7 @@ void SVGElement::commitPropertyChange(SVGAnimatedProperty& animatedProperty) > else > setSynchronizedLazyAttribute(attributeName, animatedProperty.baseValAsString()); > >- invalidateSVGAttributes(); >+ setAnimatedSVGAttributesAreDirty(); > svgAttributeChanged(attributeName); > } > >@@ -634,7 +634,7 @@ RefPtr<SVGAttributeAnimator> SVGElement::createAnimator(const QualifiedName& att > instance->propertyRegistry().appendAnimatedInstance(attributeName, *animator); > return animator; > } >- >+ > void SVGElement::animatorWillBeDeleted(const QualifiedName& attributeName) > { > propertyAnimatorFactory().animatorWillBeDeleted(attributeName); >@@ -855,6 +855,29 @@ void SVGElement::collectPresentationalHintsForAttribute(const QualifiedName& nam > addPropertyToPresentationalHintStyle(style, propertyID, value); > } > >+void SVGElement::setPresentationalHintStyleIsDirty() >+{ >+ ensureUniqueElementData().setPresentationalHintStyleIsDirty(true); >+ // Trigger style recalculation for "elements as resource" (e.g. referenced by feImage). >+ invalidateStyle(); >+} >+ >+void SVGElement::setNeedsParentAndResourceInvalidation() >+{ >+ m_NeedsParentAndResourceInvalidation = true; >+ invalidateStyle(); >+} >+ >+void SVGElement::invalidateParentAndResourceIfNeeded() >+{ >+ if (!m_NeedsParentAndResourceInvalidation) >+ return; >+ >+ if (auto renderer = this->renderer()) >+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ m_NeedsParentAndResourceInvalidation = false; >+} >+ > void SVGElement::svgAttributeChanged(const QualifiedName& attrName) > { > CSSPropertyID propId = cssPropertyIdForSVGAttributeName(attrName); >diff --git a/Source/WebCore/svg/SVGElement.h b/Source/WebCore/svg/SVGElement.h >index 704ae80a97b1d4a439ca2ec0171ae3068ee72dd8..e32f320cd8359b0824fd8a2542df6d820f637e00 100644 >--- a/Source/WebCore/svg/SVGElement.h >+++ b/Source/WebCore/svg/SVGElement.h >@@ -81,13 +81,10 @@ public: > > virtual AffineTransform* supplementalTransform() { return nullptr; } > >- void invalidateSVGAttributes() { ensureUniqueElementData().setAnimatedSVGAttributesAreDirty(true); } >- void invalidateSVGPresentationalHintStyle() >- { >- ensureUniqueElementData().setPresentationalHintStyleIsDirty(true); >- // Trigger style recalculation for "elements as resource" (e.g. referenced by feImage). >- invalidateStyle(); >- } >+ void setAnimatedSVGAttributesAreDirty() { ensureUniqueElementData().setAnimatedSVGAttributesAreDirty(true); } >+ void setPresentationalHintStyleIsDirty(); >+ void setNeedsParentAndResourceInvalidation(); >+ void invalidateParentAndResourceIfNeeded(); > > // The instances of an element are clones made in shadow trees to implement <use>. > const WeakHashSet<SVGElement>& instances() const; >@@ -197,6 +194,8 @@ private: > > void invalidateInstances(); > >+ bool m_NeedsParentAndResourceInvalidation { false }; >+ > std::unique_ptr<SVGElementRareData> m_svgRareData; > > WeakHashSet<SVGElement> m_elementsWithRelativeLengths; >diff --git a/Source/WebCore/svg/SVGEllipseElement.cpp b/Source/WebCore/svg/SVGEllipseElement.cpp >index 34748f38e76e354c6f7368f7d363f3affa99743a..004ba36ecb190caa8733551d07808218eeb4e7a9 100644 >--- a/Source/WebCore/svg/SVGEllipseElement.cpp >+++ b/Source/WebCore/svg/SVGEllipseElement.cpp >@@ -70,8 +70,9 @@ void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomStri > void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { >+ ASSERT(PropertyRegistry::isAnimatedLengthAttribute(attrName)); > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >+ setPresentationalHintStyleIsDirty(); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEBlendElement.cpp b/Source/WebCore/svg/SVGFEBlendElement.cpp >index 7bcf041800f799f1174cfe04b822d6d06431f686..b3b080f63918cfa49802f207c76c0f724d70486c 100644 >--- a/Source/WebCore/svg/SVGFEBlendElement.cpp >+++ b/Source/WebCore/svg/SVGFEBlendElement.cpp >@@ -85,15 +85,12 @@ bool SVGFEBlendElement::setFilterEffectAttribute(FilterEffect* effect, const Qua > > void SVGFEBlendElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::modeAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEColorMatrixElement.cpp b/Source/WebCore/svg/SVGFEColorMatrixElement.cpp >index 05248578c274c8fa2b3e1f244e4367868f42ba9c..f9d8b15ee02f85acd7160080a3cb6af3c2401ac9 100644 >--- a/Source/WebCore/svg/SVGFEColorMatrixElement.cpp >+++ b/Source/WebCore/svg/SVGFEColorMatrixElement.cpp >@@ -85,15 +85,12 @@ bool SVGFEColorMatrixElement::setFilterEffectAttribute(FilterEffect* effect, con > > void SVGFEColorMatrixElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::typeAttr || attrName == SVGNames::valuesAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEComponentTransferElement.cpp b/Source/WebCore/svg/SVGFEComponentTransferElement.cpp >index e89267ce7d34146d2a65d6f01dce5def49c82f78..dc8a3b47ab447aa814db86279113cb05b3a12565 100644 >--- a/Source/WebCore/svg/SVGFEComponentTransferElement.cpp >+++ b/Source/WebCore/svg/SVGFEComponentTransferElement.cpp >@@ -62,6 +62,17 @@ void SVGFEComponentTransferElement::parseAttribute(const QualifiedName& name, co > SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); > } > >+void SVGFEComponentTransferElement::svgAttributeChanged(const QualifiedName& attrName) >+{ >+ if (PropertyRegistry::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); >+ invalidateFilterPrimitiveParent(*this); >+ return; >+ } >+ >+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); >+} >+ > RefPtr<FilterEffect> SVGFEComponentTransferElement::build(SVGFilterBuilder* filterBuilder, Filter& filter) const > { > auto input1 = filterBuilder->getEffectById(in1()); >diff --git a/Source/WebCore/svg/SVGFEComponentTransferElement.h b/Source/WebCore/svg/SVGFEComponentTransferElement.h >index bb589347d8826dfb3609edac6e8b993a4dd54863..6b7feabcf0b960d9d921a30f19567003c0b55279 100644 >--- a/Source/WebCore/svg/SVGFEComponentTransferElement.h >+++ b/Source/WebCore/svg/SVGFEComponentTransferElement.h >@@ -40,8 +40,8 @@ private: > using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEComponentTransferElement, SVGFilterPrimitiveStandardAttributes>; > const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; } > >- // FIXME: svgAttributeChanged missing. > void parseAttribute(const QualifiedName&, const AtomString&) override; >+ void svgAttributeChanged(const QualifiedName&) override; > > RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) const override; > >diff --git a/Source/WebCore/svg/SVGFECompositeElement.cpp b/Source/WebCore/svg/SVGFECompositeElement.cpp >index 3ca99b875708bbd8a6baf653dc06fe205ac98235..84ac84372388ac724b7cc08ec6c35c0220a326bf 100644 >--- a/Source/WebCore/svg/SVGFECompositeElement.cpp >+++ b/Source/WebCore/svg/SVGFECompositeElement.cpp >@@ -116,15 +116,12 @@ bool SVGFECompositeElement::setFilterEffectAttribute(FilterEffect* effect, const > > void SVGFECompositeElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::operatorAttr || attrName == SVGNames::k1Attr || attrName == SVGNames::k2Attr || attrName == SVGNames::k3Attr || attrName == SVGNames::k4Attr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp b/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp >index f7505815decabb4ea34b435b47ea5a80c6a26df1..24aa72dcdfa2a51ae9c11825d947b32a18c1420e 100644 >--- a/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp >+++ b/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp >@@ -164,27 +164,24 @@ void SVGFEConvolveMatrixElement::setOrder(float x, float y) > { > m_orderX->setBaseValInternal(x); > m_orderY->setBaseValInternal(y); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFEConvolveMatrixElement::setKernelUnitLength(float x, float y) > { > m_kernelUnitLengthX->setBaseValInternal(x); > m_kernelUnitLengthY->setBaseValInternal(y); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::edgeModeAttr || attrName == SVGNames::divisorAttr || attrName == SVGNames::biasAttr || attrName == SVGNames::targetXAttr || attrName == SVGNames::targetYAttr || attrName == SVGNames::kernelUnitLengthAttr || attrName == SVGNames::preserveAlphaAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr || attrName == SVGNames::orderAttr || attrName == SVGNames::kernelMatrixAttr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr || attrName == SVGNames::orderAttr || attrName == SVGNames::kernelMatrixAttr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp >index 751adac128a8b3f8f801793075823beecfd94bce..9505c40e4d0dea4b3201a0bbaf90ffe80bede5b7 100644 >--- a/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp >+++ b/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp >@@ -127,15 +127,12 @@ bool SVGFEDiffuseLightingElement::setFilterEffectAttribute(FilterEffect* effect, > > void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::surfaceScaleAttr || attrName == SVGNames::diffuseConstantAttr || attrName == SVGNames::kernelUnitLengthAttr || attrName == SVGNames::lighting_colorAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp b/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp >index 0c5e825bc82560f36a269ea6d722dfd05173d8c2..729a6d438189e1de474f239a6bd3ca5dd31c8c03 100644 >--- a/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp >+++ b/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp >@@ -100,15 +100,12 @@ bool SVGFEDisplacementMapElement::setFilterEffectAttribute(FilterEffect* effect, > > void SVGFEDisplacementMapElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::xChannelSelectorAttr || attrName == SVGNames::yChannelSelectorAttr || attrName == SVGNames::scaleAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEDropShadowElement.cpp b/Source/WebCore/svg/SVGFEDropShadowElement.cpp >index 22bce1d33317c9571fe5d79f4b326a89bfc5b681..e0d60d3c20b2dd54d0664cefe3d79fc93b421ff0 100644 >--- a/Source/WebCore/svg/SVGFEDropShadowElement.cpp >+++ b/Source/WebCore/svg/SVGFEDropShadowElement.cpp >@@ -55,7 +55,7 @@ void SVGFEDropShadowElement::setStdDeviation(float x, float y) > { > m_stdDeviationX->setBaseValInternal(x); > m_stdDeviationY->setBaseValInternal(y); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const AtomString& value) >@@ -90,7 +90,7 @@ void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp b/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp >index 7a998224c9219555244a869ca78a830d563c599d..9838adcb7f1e87d45d8ad76b2a094f5d7cc2e88c 100644 >--- a/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp >+++ b/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp >@@ -54,7 +54,7 @@ void SVGFEGaussianBlurElement::setStdDeviation(float x, float y) > { > m_stdDeviationX->setBaseValInternal(x); > m_stdDeviationY->setBaseValInternal(y); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFEGaussianBlurElement::parseAttribute(const QualifiedName& name, const AtomString& value) >@@ -88,7 +88,7 @@ void SVGFEGaussianBlurElement::svgAttributeChanged(const QualifiedName& attrName > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEImageElement.cpp b/Source/WebCore/svg/SVGFEImageElement.cpp >index 18f7809fae0292474bff05fb14017c2de661d346..c25690e3b00aa6f051299852fc72274e63b5f0e8 100644 >--- a/Source/WebCore/svg/SVGFEImageElement.cpp >+++ b/Source/WebCore/svg/SVGFEImageElement.cpp >@@ -108,7 +108,7 @@ void SVGFEImageElement::buildPendingResource() > } else if (is<SVGElement>(*target.element)) > downcast<SVGElement>(*target.element).addReferencingElement(*this); > >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomString& value) >@@ -124,9 +124,9 @@ void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomStri > > void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::preserveAspectRatioAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >@@ -162,16 +162,11 @@ void SVGFEImageElement::notifyFinished(CachedResource&, const NetworkLoadMetrics > if (!isConnected()) > return; > >- auto parent = makeRefPtr(parentElement()); >- >+ auto parent = parentElement(); > if (!parent || !parent->hasTagName(SVGNames::filterTag)) > return; > >- RenderElement* parentRenderer = parent->renderer(); >- if (!parentRenderer) >- return; >- >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*parentRenderer); >+ downcast<SVGElement>(*parent).setNeedsParentAndResourceInvalidation(); > } > > RefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter& filter) const >diff --git a/Source/WebCore/svg/SVGFELightElement.cpp b/Source/WebCore/svg/SVGFELightElement.cpp >index 3d13d16e107fe44cf20b579a5f176952d8586a83..d70201c8b85c9204b7ae9f688cfdb0d2f622229a 100644 >--- a/Source/WebCore/svg/SVGFELightElement.cpp >+++ b/Source/WebCore/svg/SVGFELightElement.cpp >@@ -150,15 +150,9 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName) > void SVGFELightElement::childrenChanged(const ChildChange& change) > { > SVGElement::childrenChanged(change); >- > if (change.source == ChildChange::Source::Parser) > return; >- auto parent = makeRefPtr(parentNode()); >- if (!parent) >- return; >- RenderElement* renderer = parent->renderer(); >- if (renderer && renderer->isSVGResourceFilterPrimitive()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ invalidateFilterPrimitiveParent(*this); > } > > } >diff --git a/Source/WebCore/svg/SVGFEMergeNodeElement.cpp b/Source/WebCore/svg/SVGFEMergeNodeElement.cpp >index 4be907826dba06193684e0a4daf5ba2b5fa94afa..91a6c14041d157d86f6abfa6265c19d53c3abcef 100644 >--- a/Source/WebCore/svg/SVGFEMergeNodeElement.cpp >+++ b/Source/WebCore/svg/SVGFEMergeNodeElement.cpp >@@ -60,9 +60,9 @@ void SVGFEMergeNodeElement::parseAttribute(const QualifiedName& name, const Atom > > void SVGFEMergeNodeElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::inAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidateFilterPrimitiveParent(this); >+ invalidateFilterPrimitiveParent(*this); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEMorphologyElement.cpp b/Source/WebCore/svg/SVGFEMorphologyElement.cpp >index d6fb95c8e3776e6d2093beace35e2ed1795d321b..28588c4e523e739ec53ca8869de88eb60f50d1e4 100644 >--- a/Source/WebCore/svg/SVGFEMorphologyElement.cpp >+++ b/Source/WebCore/svg/SVGFEMorphologyElement.cpp >@@ -53,7 +53,7 @@ void SVGFEMorphologyElement::setRadius(float x, float y) > { > m_radiusX->setBaseValInternal(x); > m_radiusY->setBaseValInternal(y); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFEMorphologyElement::parseAttribute(const QualifiedName& name, const AtomString& value) >@@ -99,15 +99,12 @@ bool SVGFEMorphologyElement::setFilterEffectAttribute(FilterEffect* effect, cons > > void SVGFEMorphologyElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFEOffsetElement.cpp b/Source/WebCore/svg/SVGFEOffsetElement.cpp >index 038268b89b2f19f9be568739d1230354100a5ee7..508fc1b58fa1bc3b55f8b5e3aca5a90e843747a9 100644 >--- a/Source/WebCore/svg/SVGFEOffsetElement.cpp >+++ b/Source/WebCore/svg/SVGFEOffsetElement.cpp >@@ -74,7 +74,7 @@ void SVGFEOffsetElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGFESpecularLightingElement.cpp b/Source/WebCore/svg/SVGFESpecularLightingElement.cpp >index 264d197ef3656bbfb841b676043b6031d1cecd81..e8b9fdf416918fa4b5ddfc042ac633aee61ea22e 100644 >--- a/Source/WebCore/svg/SVGFESpecularLightingElement.cpp >+++ b/Source/WebCore/svg/SVGFESpecularLightingElement.cpp >@@ -136,15 +136,12 @@ bool SVGFESpecularLightingElement::setFilterEffectAttribute(FilterEffect* effect > > void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::surfaceScaleAttr || attrName == SVGNames::specularConstantAttr || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::kernelUnitLengthAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- primitiveAttributeChanged(attrName); >- return; >- } >- >- if (attrName == SVGNames::inAttr) { >- InstanceInvalidationGuard guard(*this); >- invalidate(); >+ if (attrName == SVGNames::inAttr) >+ setNeedsParentAndResourceInvalidation(); >+ else >+ primitiveAttributeChanged(attrName); > return; > } > >diff --git a/Source/WebCore/svg/SVGFETileElement.cpp b/Source/WebCore/svg/SVGFETileElement.cpp >index 39bdcc77359665036e1ae747612ead6f9ac37370..0ee04da93f9ffe478986135c40def6e742282ce3 100644 >--- a/Source/WebCore/svg/SVGFETileElement.cpp >+++ b/Source/WebCore/svg/SVGFETileElement.cpp >@@ -61,9 +61,9 @@ void SVGFETileElement::parseAttribute(const QualifiedName& name, const AtomStrin > > void SVGFETileElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::inAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGFilterElement.cpp b/Source/WebCore/svg/SVGFilterElement.cpp >index 813bcbd0820cac677a797f27bcce8ce10912bc47..5567d1449683ce2b115a1696fd884c0fb0b0ef2b 100644 >--- a/Source/WebCore/svg/SVGFilterElement.cpp >+++ b/Source/WebCore/svg/SVGFilterElement.cpp >@@ -91,16 +91,17 @@ void SVGFilterElement::parseAttribute(const QualifiedName& name, const AtomStrin > > void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >- return; >+ if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) >+ setPresentationalHintStyleIsDirty(); >+ else >+ setNeedsParentAndResourceInvalidation(); > } > >- if (PropertyRegistry::isKnownAttribute(attrName) || SVGURIReference::isKnownAttribute(attrName)) { >- if (auto* renderer = this->renderer()) >- renderer->setNeedsLayout(); >- return; >+ if (SVGURIReference::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); >+ setNeedsParentAndResourceInvalidation(); > } > > SVGElement::svgAttributeChanged(attrName); >diff --git a/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp b/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp >index f2a6ee08db7a0d2df3bd8cc5375d31798b5121e2..7f3f91b2eb2c51b365b22a5801ee9f31e16b8493 100644 >--- a/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp >+++ b/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp >@@ -77,8 +77,7 @@ void SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(const QualifiedNa > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidate(); >- return; >+ setNeedsParentAndResourceInvalidation(); > } > > SVGElement::svgAttributeChanged(attrName); >@@ -90,7 +89,7 @@ void SVGFilterPrimitiveStandardAttributes::childrenChanged(const ChildChange& ch > > if (change.source == ChildChange::Source::Parser) > return; >- invalidate(); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGFilterPrimitiveStandardAttributes::setStandardAttributes(FilterEffect* filterEffect) const >@@ -122,21 +121,12 @@ bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const RenderStyle& s > return false; > } > >-void invalidateFilterPrimitiveParent(SVGElement* element) >+void invalidateFilterPrimitiveParent(SVGElement& element) > { >- if (!element) >- return; >- >- auto parent = makeRefPtr(element->parentNode()); >- >- if (!parent) >+ auto parent = element.parentNode(); >+ if (!is<SVGFilterPrimitiveStandardAttributes>(parent)) > return; >- >- RenderElement* renderer = parent->renderer(); >- if (!renderer || !renderer->isSVGResourceFilterPrimitive()) >- return; >- >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer, false); >+ downcast<SVGFilterPrimitiveStandardAttributes>(parent)->setNeedsParentAndResourceInvalidation(); > } > > } >diff --git a/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h b/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h >index c98b13ed96276af9e14f642811a6fd746772aca7..a48da220b2b2e1d740acac456195bae083e2ecc9 100644 >--- a/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h >+++ b/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h >@@ -63,7 +63,6 @@ protected: > void svgAttributeChanged(const QualifiedName&) override; > void childrenChanged(const ChildChange&) override; > >- void invalidate(); > void primitiveAttributeChanged(const QualifiedName& attributeName); > > private: >@@ -82,13 +81,7 @@ private: > Ref<SVGAnimatedString> m_result { SVGAnimatedString::create(this) }; > }; > >-void invalidateFilterPrimitiveParent(SVGElement*); >- >-inline void SVGFilterPrimitiveStandardAttributes::invalidate() >-{ >- if (auto* primitiveRenderer = renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*primitiveRenderer); >-} >+void invalidateFilterPrimitiveParent(SVGElement&); > > inline void SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged(const QualifiedName& attribute) > { >diff --git a/Source/WebCore/svg/SVGForeignObjectElement.cpp b/Source/WebCore/svg/SVGForeignObjectElement.cpp >index 3a514cb3841c428e62de12a651bcd60f5e5ee63d..427c61b4b88a7205ec5a52687ee79cf72fa4e7c0 100644 >--- a/Source/WebCore/svg/SVGForeignObjectElement.cpp >+++ b/Source/WebCore/svg/SVGForeignObjectElement.cpp >@@ -73,15 +73,14 @@ void SVGForeignObjectElement::parseAttribute(const QualifiedName& name, const At > > void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) { >- invalidateSVGPresentationalHintStyle(); >- return; >- } >- >- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) { >- updateRelativeLengthsInformation(); >- if (auto renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ if (PropertyRegistry::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); >+ if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) >+ setPresentationalHintStyleIsDirty(); >+ else { >+ updateRelativeLengthsInformation(); >+ setNeedsParentAndResourceInvalidation(); >+ } > return; > } > >diff --git a/Source/WebCore/svg/SVGGeometryElement.cpp b/Source/WebCore/svg/SVGGeometryElement.cpp >index d5ee0c88838309f837c2b572beb0c9ce62402482..710d7b50b6fe1cede96da7e43fc576900e3886f3 100644 >--- a/Source/WebCore/svg/SVGGeometryElement.cpp >+++ b/Source/WebCore/svg/SVGGeometryElement.cpp >@@ -112,9 +112,7 @@ void SVGGeometryElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (attrName == SVGNames::pathLengthAttr) { > InstanceInvalidationGuard guard(*this); >- if (auto* renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- return; >+ setNeedsParentAndResourceInvalidation(); > } > > SVGGraphicsElement::svgAttributeChanged(attrName); >diff --git a/Source/WebCore/svg/SVGGradientElement.cpp b/Source/WebCore/svg/SVGGradientElement.cpp >index 3da0f3309752aff328cb80bdc8f4369fcdb010e6..6c4880bbeb587994bf9d19182b73c0f6ee4fb11f 100644 >--- a/Source/WebCore/svg/SVGGradientElement.cpp >+++ b/Source/WebCore/svg/SVGGradientElement.cpp >@@ -77,10 +77,15 @@ void SVGGradientElement::parseAttribute(const QualifiedName& name, const AtomStr > > void SVGGradientElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (PropertyRegistry::isKnownAttribute(attrName) || SVGURIReference::isKnownAttribute(attrName)) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ setNeedsParentAndResourceInvalidation(); >+ return; >+ } >+ >+ if (SVGURIReference::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGGraphicsElement.cpp b/Source/WebCore/svg/SVGGraphicsElement.cpp >index 567c4056386974b1af92b398f7c46199979ec13e..7bc2ec17065347aa40cff57a35188db3f6ef88f8 100644 >--- a/Source/WebCore/svg/SVGGraphicsElement.cpp >+++ b/Source/WebCore/svg/SVGGraphicsElement.cpp >@@ -146,14 +146,12 @@ void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomStr > > void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::transformAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { >+ ASSERT(attrName == SVGNames::transformAttr); > InstanceInvalidationGuard guard(*this); >- >- if (auto renderer = this->renderer()) { >+ if (auto renderer = this->renderer()) > renderer->setNeedsTransformUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >- >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGImageElement.cpp b/Source/WebCore/svg/SVGImageElement.cpp >index 15aec2b0d7d903e7699df80d2eb65e96d63fa148..1d63faa4a23bd08fe1b957d19cc07bdb936cd50a 100644 >--- a/Source/WebCore/svg/SVGImageElement.cpp >+++ b/Source/WebCore/svg/SVGImageElement.cpp >@@ -97,22 +97,22 @@ void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName) > updateRelativeLengthsInformation(); > > if (auto* renderer = this->renderer()) { >- if (downcast<RenderSVGImage>(*renderer).updateImageViewport()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ if (!downcast<RenderSVGImage>(*renderer).updateImageViewport()) >+ return; >+ setNeedsParentAndResourceInvalidation(); > } > return; > } > > if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) { > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >+ setPresentationalHintStyleIsDirty(); > return; > } > > if (attrName == SVGNames::preserveAspectRatioAttr) { > InstanceInvalidationGuard guard(*this); >- if (auto* renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGLineElement.cpp b/Source/WebCore/svg/SVGLineElement.cpp >index a42eae54a0e0f1cf7f125373d75e0ab5ac2aef2c..193bccd35ca0fb9e972a50003c4aa420d24bc6a3 100644 >--- a/Source/WebCore/svg/SVGLineElement.cpp >+++ b/Source/WebCore/svg/SVGLineElement.cpp >@@ -71,12 +71,10 @@ void SVGLineElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- updateRelativeLengthsInformation(); >- >- if (auto* renderer = downcast<RenderSVGShape>(this->renderer())) { >+ if (auto* renderer = downcast<RenderSVGShape>(this->renderer())) > renderer->setNeedsShapeUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >+ updateRelativeLengthsInformation(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGLinearGradientElement.cpp b/Source/WebCore/svg/SVGLinearGradientElement.cpp >index bc2a1890b244ca563f5f4f5008646e213e64bd79..2095e3da05573d7889dcab7142d2ebd6c017add1 100644 >--- a/Source/WebCore/svg/SVGLinearGradientElement.cpp >+++ b/Source/WebCore/svg/SVGLinearGradientElement.cpp >@@ -82,8 +82,7 @@ void SVGLinearGradientElement::svgAttributeChanged(const QualifiedName& attrName > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); > updateRelativeLengthsInformation(); >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGMarkerElement.cpp b/Source/WebCore/svg/SVGMarkerElement.cpp >index 0b43bb842e5e362aaef879fd6063aa576eae21ab..29d2c5b9527d2a3633b606fc6415a7b90834e501 100644 >--- a/Source/WebCore/svg/SVGMarkerElement.cpp >+++ b/Source/WebCore/svg/SVGMarkerElement.cpp >@@ -98,14 +98,13 @@ void SVGMarkerElement::svgAttributeChanged(const QualifiedName& attrName) > InstanceInvalidationGuard guard(*this); > if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) > updateRelativeLengthsInformation(); >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ setNeedsParentAndResourceInvalidation(); > return; > } >- >+ > if (SVGFitToViewBox::isKnownAttribute(attrName)) { >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ InstanceInvalidationGuard guard(*this); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGMaskElement.cpp b/Source/WebCore/svg/SVGMaskElement.cpp >index 48fd37bf3d62a18779138851802c4a8c93ea7f7d..cacb8d8462155295aa088511df1ee2c1e868df43 100644 >--- a/Source/WebCore/svg/SVGMaskElement.cpp >+++ b/Source/WebCore/svg/SVGMaskElement.cpp >@@ -97,15 +97,12 @@ void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomString& > > void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) { >- InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >- return; >- } >- > if (PropertyRegistry::isKnownAttribute(attrName)) { >- if (auto* renderer = this->renderer()) >- renderer->setNeedsLayout(); >+ InstanceInvalidationGuard guard(*this); >+ if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) >+ setPresentationalHintStyleIsDirty(); >+ else >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGPathElement.cpp b/Source/WebCore/svg/SVGPathElement.cpp >index 1076619bea1074a175fee6c7b05c6b5f8952d121..237122ef980f8bdee15a7c7af82cafb3394fbc42 100644 >--- a/Source/WebCore/svg/SVGPathElement.cpp >+++ b/Source/WebCore/svg/SVGPathElement.cpp >@@ -64,15 +64,12 @@ void SVGPathElement::parseAttribute(const QualifiedName& name, const AtomString& > > void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::dAttr) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidateMPathDependencies(); >- >- if (auto* renderer = downcast<RenderSVGPath>(this->renderer())) { >+ if (auto* renderer = downcast<RenderSVGPath>(this->renderer())) > renderer->setNeedsShapeUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >- >+ invalidateMPathDependencies(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGPatternElement.cpp b/Source/WebCore/svg/SVGPatternElement.cpp >index 397692486e20275cd058c431b7af60bcd96b3acb..db98a01b73ad55c1077acd87dec9ce723a5378f2 100644 >--- a/Source/WebCore/svg/SVGPatternElement.cpp >+++ b/Source/WebCore/svg/SVGPatternElement.cpp >@@ -110,15 +110,18 @@ void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomStri > > void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) { >+ if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >+ if (PropertyRegistry::isAnimatedLengthAttribute(attrName)) >+ setPresentationalHintStyleIsDirty(); >+ else >+ setNeedsParentAndResourceInvalidation(); > return; > } > >- if (PropertyRegistry::isKnownAttribute(attrName) || SVGFitToViewBox::isKnownAttribute(attrName) || SVGURIReference::isKnownAttribute(attrName)) { >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ if (SVGFitToViewBox::isKnownAttribute(attrName) || SVGURIReference::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGPolyElement.cpp b/Source/WebCore/svg/SVGPolyElement.cpp >index ea1fe092a1623713c93833a5d957adce1e639100..a6296625ed98ad906d39faf3a18960f89ea9586b 100644 >--- a/Source/WebCore/svg/SVGPolyElement.cpp >+++ b/Source/WebCore/svg/SVGPolyElement.cpp >@@ -55,12 +55,12 @@ void SVGPolyElement::parseAttribute(const QualifiedName& name, const AtomString& > > void SVGPolyElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::pointsAttr) { >- if (auto* renderer = downcast<RenderSVGPath>(this->renderer())) { >- InstanceInvalidationGuard guard(*this); >+ if (PropertyRegistry::isKnownAttribute(attrName)) { >+ ASSERT(attrName == SVGNames::pointsAttr); >+ InstanceInvalidationGuard guard(*this); >+ if (auto* renderer = downcast<RenderSVGPath>(this->renderer())) > renderer->setNeedsShapeUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGRadialGradientElement.cpp b/Source/WebCore/svg/SVGRadialGradientElement.cpp >index 78fafb51a1aa46b5220a575faef4e8f0495cdf6f..c5c162edd414cba598994a76f0cdd7733651dd75 100644 >--- a/Source/WebCore/svg/SVGRadialGradientElement.cpp >+++ b/Source/WebCore/svg/SVGRadialGradientElement.cpp >@@ -88,8 +88,7 @@ void SVGRadialGradientElement::svgAttributeChanged(const QualifiedName& attrName > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); > updateRelativeLengthsInformation(); >- if (RenderObject* object = renderer()) >- object->setNeedsLayout(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGRectElement.cpp b/Source/WebCore/svg/SVGRectElement.cpp >index ca8dba2f6f27755cfd0cce72d650bd62cc3d2568..d2089b1606a909e4e910d7715547ad337d6a5c11 100644 >--- a/Source/WebCore/svg/SVGRectElement.cpp >+++ b/Source/WebCore/svg/SVGRectElement.cpp >@@ -77,8 +77,9 @@ void SVGRectElement::parseAttribute(const QualifiedName& name, const AtomString& > void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { >+ ASSERT(PropertyRegistry::isAnimatedLengthAttribute(attrName)); > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >+ setPresentationalHintStyleIsDirty(); > return; > } > >diff --git a/Source/WebCore/svg/SVGSVGElement.cpp b/Source/WebCore/svg/SVGSVGElement.cpp >index 90c1cff45d1432816201136b1ce8f59c5b8d648f..2aeb42dadf8960c52c66d986ae1fc86927ab958e 100644 >--- a/Source/WebCore/svg/SVGSVGElement.cpp >+++ b/Source/WebCore/svg/SVGSVGElement.cpp >@@ -207,7 +207,7 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- invalidateSVGPresentationalHintStyle(); >+ setPresentationalHintStyleIsDirty(); > > if (auto renderer = this->renderer()) { > if (is<RenderSVGRoot>(renderer) && downcast<RenderSVGRoot>(*renderer).isEmbeddedThroughFrameContainingSVGDocument()) >@@ -217,11 +217,9 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) > } > > if (SVGFitToViewBox::isKnownAttribute(attrName)) { >- if (auto* renderer = this->renderer()) { >+ if (auto* renderer = this->renderer()) > renderer->setNeedsTransformUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >- return; >+ setNeedsParentAndResourceInvalidation(); > } > > SVGGraphicsElement::svgAttributeChanged(attrName); >@@ -569,7 +567,6 @@ SVGSVGElement* SVGSVGElement::findRootAnchor(StringView fragmentIdentifier) cons > > bool SVGSVGElement::scrollToFragment(StringView fragmentIdentifier) > { >- auto renderer = this->renderer(); > auto view = m_viewSpec; > if (view) > view->reset(); >@@ -579,8 +576,8 @@ bool SVGSVGElement::scrollToFragment(StringView fragmentIdentifier) > > if (fragmentIdentifier.startsWith("xpointer(")) { > // FIXME: XPointer references are ignored (https://bugs.webkit.org/show_bug.cgi?id=17491) >- if (renderer && hadUseCurrentView) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ if (hadUseCurrentView) >+ setNeedsParentAndResourceInvalidation(); > return false; > } > >@@ -591,8 +588,8 @@ bool SVGSVGElement::scrollToFragment(StringView fragmentIdentifier) > m_useCurrentView = true; > else > view->reset(); >- if (renderer && (hadUseCurrentView || m_useCurrentView)) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ if ((hadUseCurrentView || m_useCurrentView)) >+ setNeedsParentAndResourceInvalidation(); > return m_useCurrentView; > } > >@@ -616,8 +613,7 @@ bool SVGSVGElement::scrollToFragment(StringView fragmentIdentifier) > } > > rootElement->inheritViewAttributes(*viewElement); >- if (auto* renderer = rootElement->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ rootElement->setNeedsParentAndResourceInvalidation(); > m_currentViewFragmentIdentifier = fragmentIdentifier.toString(); > return true; > } >@@ -647,8 +643,7 @@ void SVGSVGElement::resetScrollAnchor() > } > > m_useCurrentView = false; >- if (renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer()); >+ setNeedsParentAndResourceInvalidation(); > } > > void SVGSVGElement::inheritViewAttributes(const SVGViewElement& viewElement) >diff --git a/Source/WebCore/svg/SVGStopElement.cpp b/Source/WebCore/svg/SVGStopElement.cpp >index 195700ebf7ba741943c317c96f52eed57eb29a3c..7aa786b798eb71fa2a345bf0da28d21347226054 100644 >--- a/Source/WebCore/svg/SVGStopElement.cpp >+++ b/Source/WebCore/svg/SVGStopElement.cpp >@@ -64,11 +64,10 @@ void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomString& > > void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName) > { >- if (attrName == SVGNames::offsetAttr) { >- if (auto renderer = this->renderer()) { >- InstanceInvalidationGuard guard(*this); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >+ if (PropertyRegistry::isKnownAttribute(attrName)) { >+ ASSERT(attrName == SVGNames::offsetAttr); >+ InstanceInvalidationGuard guard(*this); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGTRefElement.cpp b/Source/WebCore/svg/SVGTRefElement.cpp >index 769aa1a12dfecb95e86c6189200c1d7eb6286660..8a005892796439fe0bcbcc02ee5267a4d77221e0 100644 >--- a/Source/WebCore/svg/SVGTRefElement.cpp >+++ b/Source/WebCore/svg/SVGTRefElement.cpp >@@ -183,8 +183,7 @@ void SVGTRefElement::svgAttributeChanged(const QualifiedName& attrName) > if (SVGURIReference::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); > buildPendingResource(); >- if (auto renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGTextContentElement.cpp b/Source/WebCore/svg/SVGTextContentElement.cpp >index 9e9b2dcb91b8bd48950e734ce490e2a6d5e47bc2..c68c21f7021aac5b7c0f56e48c679815ec20eb76 100644 >--- a/Source/WebCore/svg/SVGTextContentElement.cpp >+++ b/Source/WebCore/svg/SVGTextContentElement.cpp >@@ -179,13 +179,10 @@ void SVGTextContentElement::parseAttribute(const QualifiedName& name, const Atom > void SVGTextContentElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); > if (attrName == SVGNames::textLengthAttr) > m_specifiedTextLength = m_textLength->baseVal()->value(); >- >- if (auto renderer = this->renderer()) { >- InstanceInvalidationGuard guard(*this); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGTextPathElement.cpp b/Source/WebCore/svg/SVGTextPathElement.cpp >index 6587dd6b0bad84e6a06499b02ef8fc914dcdf356..10838285ad02db822fd76f5478e0f3c4639bd134 100644 >--- a/Source/WebCore/svg/SVGTextPathElement.cpp >+++ b/Source/WebCore/svg/SVGTextPathElement.cpp >@@ -88,19 +88,15 @@ void SVGTextPathElement::svgAttributeChanged(const QualifiedName& attrName) > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- > if (attrName == SVGNames::startOffsetAttr) > updateRelativeLengthsInformation(); >- >- if (auto renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- return; >+ setNeedsParentAndResourceInvalidation(); > } > > if (SVGURIReference::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); > buildPendingResource(); >- if (auto renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGTextPositioningElement.cpp b/Source/WebCore/svg/SVGTextPositioningElement.cpp >index 9caf01234aa0877b174a56b60ef3a79dd6c4ed49..920c2caa0a130b2df609cb3833a247cefc3ddf19 100644 >--- a/Source/WebCore/svg/SVGTextPositioningElement.cpp >+++ b/Source/WebCore/svg/SVGTextPositioningElement.cpp >@@ -98,16 +98,13 @@ void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrNam > { > if (PropertyRegistry::isKnownAttribute(attrName)) { > InstanceInvalidationGuard guard(*this); >- > if (attrName != SVGNames::rotateAttr) > updateRelativeLengthsInformation(); > >- if (auto renderer = this->renderer()) { >- if (auto* textAncestor = RenderSVGText::locateRenderSVGTextAncestor(*renderer)) >- textAncestor->setNeedsPositioningValuesUpdate(); >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >+ if (auto* textAncestor = renderer() ? RenderSVGText::locateRenderSVGTextAncestor(*renderer()) : nullptr) >+ textAncestor->setNeedsPositioningValuesUpdate(); > >+ setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/SVGUseElement.cpp b/Source/WebCore/svg/SVGUseElement.cpp >index b2b02635c4067a10c9ffc6b549d1998c03da81ee..17c9406edc123d35f7059dfb2a4503b1fd5ce0a6 100644 >--- a/Source/WebCore/svg/SVGUseElement.cpp >+++ b/Source/WebCore/svg/SVGUseElement.cpp >@@ -155,21 +155,21 @@ void SVGUseElement::transferSizeAttributesToTargetClone(SVGElement& shadowElemen > > void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName) > { >- InstanceInvalidationGuard guard(*this); >- > if (PropertyRegistry::isKnownAttribute(attrName)) { >- updateRelativeLengthsInformation(); > if (attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) { > // FIXME: It's unnecessarily inefficient to update both width and height each time either is changed. > if (auto targetClone = this->targetClone()) > transferSizeAttributesToTargetClone(*targetClone); > } >- if (auto* renderer = this->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >+ >+ InstanceInvalidationGuard guard(*this); >+ updateRelativeLengthsInformation(); >+ setNeedsParentAndResourceInvalidation(); > return; > } > > if (SVGURIReference::isKnownAttribute(attrName)) { >+ InstanceInvalidationGuard guard(*this); > updateExternalDocument(); > invalidateShadowTree(); > return; >diff --git a/Source/WebCore/svg/SVGViewElement.cpp b/Source/WebCore/svg/SVGViewElement.cpp >index 22abee93982313f4d80fdb1843e64c7c9a0884a9..8ab2da0e138f46531969c69d4db2668b834858e6 100644 >--- a/Source/WebCore/svg/SVGViewElement.cpp >+++ b/Source/WebCore/svg/SVGViewElement.cpp >@@ -53,17 +53,13 @@ void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomString& > > void SVGViewElement::svgAttributeChanged(const QualifiedName& attrName) > { >- // We ignore changes to SVGNames::viewTargetAttr, which is deprecated and unused in WebCore. >- if (PropertyRegistry::isKnownAttribute(attrName)) >- return; >- > if (SVGFitToViewBox::isKnownAttribute(attrName)) { >- if (m_targetElement) { >- m_targetElement->inheritViewAttributes(*this); >- if (auto* renderer = m_targetElement->renderer()) >- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer); >- } >- >+ if (!m_targetElement) >+ return; >+ m_targetElement->inheritViewAttributes(*this); >+ >+ InstanceInvalidationGuard guard(*m_targetElement); >+ m_targetElement->setNeedsParentAndResourceInvalidation(); > return; > } > >diff --git a/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp b/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp >index 6984427604a460ef4ae169e93edb0366eaa4bb91..c5814ed7428728af1d0de6ce2d8097498b2b92e4 100644 >--- a/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp >+++ b/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp >@@ -40,7 +40,7 @@ bool SVGAttributeAnimator::isAnimatedStylePropertyAniamtor(const SVGElement& tar > void SVGAttributeAnimator::invalidateStyle(SVGElement& targetElement) > { > SVGElement::InstanceInvalidationGuard guard(targetElement); >- targetElement.invalidateSVGPresentationalHintStyle(); >+ targetElement.setPresentationalHintStyleIsDirty(); > } > > void SVGAttributeAnimator::applyAnimatedStylePropertyChange(SVGElement& element, CSSPropertyID id, const String& value)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 230296
:
438211
|
438212
|
453188
|
453194
|
453199
|
453292
|
454103
|
454469
|
454482
|
454834
|
455357
|
455372
|
455394
|
455553