Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt the new NodeName enumeration more broadly in attributeChanged()…
… overrides https://bugs.webkit.org/show_bug.cgi?id=255466 Reviewed by Darin Adler. Adopt the new NodeName enumeration more broadly in attributeChanged() overrides. Switch statements are more efficient when dealing with a lot of attribute names. It also results in nicer code. * Source/WebCore/html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::attributeChanged): * Source/WebCore/html/HTMLAttachmentElement.cpp: (WebCore::HTMLAttachmentElement::ensureModernShadowTree): (WebCore::HTMLAttachmentElement::setFile): (WebCore::HTMLAttachmentElement::attributeChanged): (WebCore::HTMLAttachmentElement::attachmentSubtitle const): (WebCore::HTMLAttachmentElement::updateAttributes): (WebCore::subtitleAttr): Deleted. (WebCore::saveAttr): Deleted. * Source/WebCore/html/HTMLAttributeNames.in: * Source/WebCore/html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::attributeChanged): * Source/WebCore/html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::attributeChanged): * Source/WebCore/html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::attributeChanged): * Source/WebCore/html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::attributeChanged): * Source/WebCore/html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::attributeChanged): * Source/WebCore/html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::attributeChanged): * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): * Source/WebCore/html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::attributeChanged): * Source/WebCore/html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::attributeChanged): * Source/WebCore/html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::attributeChanged): * Source/WebCore/html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::attributeChanged): * Source/WebCore/html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::attributeChanged): * Source/WebCore/html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::attributeChanged): * Source/WebCore/html/NumberInputType.cpp: (WebCore::NumberInputType::attributeChanged): * Source/WebCore/html/RangeInputType.cpp: (WebCore::RangeInputType::attributeChanged): * Source/WebCore/mathml/MathMLElement.cpp: (WebCore::MathMLElement::attributeChanged): * Source/WebCore/mathml/MathMLFractionElement.cpp: (WebCore::MathMLFractionElement::attributeChanged): * Source/WebCore/mathml/MathMLMathElement.cpp: (WebCore::MathMLMathElement::attributeChanged): * Source/WebCore/mathml/MathMLOperatorElement.cpp: (WebCore::attributeNameToPropertyFlag): (WebCore::MathMLOperatorElement::attributeChanged): * Source/WebCore/mathml/MathMLPaddedElement.cpp: (WebCore::MathMLPaddedElement::attributeChanged): * Source/WebCore/mathml/MathMLPresentationElement.cpp: (WebCore::MathMLPresentationElement::attributeChanged): * Source/WebCore/mathml/MathMLSpaceElement.cpp: (WebCore::MathMLSpaceElement::attributeChanged): * Source/WebCore/svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::attributeChanged): * Source/WebCore/svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::attributeChanged): * Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::attributeChanged): * Source/WebCore/svg/SVGElement.cpp: (WebCore::SVGElement::attributeChanged): * Source/WebCore/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::attributeChanged): * Source/WebCore/svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::attributeChanged): * Source/WebCore/svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::attributeChanged): * Source/WebCore/svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::attributeChanged): (WebCore::SVGFECompositeElement::setFilterEffectAttribute): Deleted. (WebCore::SVGFECompositeElement::svgAttributeChanged): Deleted. (WebCore::SVGFECompositeElement::createFilterEffect const): Deleted. * Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::attributeChanged): * Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::attributeChanged): * Source/WebCore/svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::attributeChanged): * Source/WebCore/svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::attributeChanged): * Source/WebCore/svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::attributeChanged): * Source/WebCore/svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::attributeChanged): * Source/WebCore/svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::attributeChanged): (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute): Deleted. (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Deleted. (WebCore::SVGFEMorphologyElement::isIdentity const): Deleted. (WebCore::SVGFEMorphologyElement::outsets const): Deleted. (WebCore::SVGFEMorphologyElement::createFilterEffect const): Deleted. * Source/WebCore/svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::attributeChanged): * Source/WebCore/svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::attributeChanged): * Source/WebCore/svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::attributeChanged): * Source/WebCore/svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::attributeChanged): * Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::attributeChanged): * Source/WebCore/svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::attributeChanged): * Source/WebCore/svg/SVGGlyphRefElement.cpp: (WebCore::SVGGlyphRefElement::attributeChanged): * Source/WebCore/svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::attributeChanged): * Source/WebCore/svg/SVGImageElement.cpp: (WebCore::SVGImageElement::attributeChanged): * Source/WebCore/svg/SVGLineElement.cpp: (WebCore::SVGLineElement::attributeChanged): * Source/WebCore/svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::attributeChanged): * Source/WebCore/svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::attributeChanged): * Source/WebCore/svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::attributeChanged): * Source/WebCore/svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::attributeChanged): * Source/WebCore/svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::attributeChanged): * Source/WebCore/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::attributeChanged): * Source/WebCore/svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::attributeChanged): * Source/WebCore/svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::attributeChanged): * Source/WebCore/svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::attributeChanged): * Source/WebCore/svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::attributeChanged): * Source/WebCore/svg/SVGUseElement.cpp: (WebCore::SVGUseElement::attributeChanged): * Source/WebCore/svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::attributeChanged): Canonical link: https://commits.webkit.org/262999@main
- Loading branch information