[webkit-changes] [WebKit/WebKit] dccc78: Adopt more smart pointers for SVGDocumentExtensions
Chris Dumez
noreply at github.com
Thu Feb 8 14:51:53 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dccc78696b925690bc34339f8c17ce3d05f572a1
https://github.com/WebKit/WebKit/commit/dccc78696b925690bc34339f8c17ce3d05f572a1
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M Source/WebCore/dom/ContainerNode.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/history/CachedFrame.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/rendering/svg/SVGResourcesCache.cpp
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/svg/SVGDocumentExtensions.h
M Source/WebCore/svg/SVGElement.cpp
M Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
M Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
M Source/WebCore/svg/SVGFitToViewBox.cpp
M Source/WebCore/svg/SVGFontFaceElement.cpp
M Source/WebCore/svg/SVGGeometryElement.cpp
M Source/WebCore/svg/SVGPathElement.cpp
M Source/WebCore/svg/SVGPolyElement.cpp
M Source/WebCore/svg/SVGSVGElement.cpp
M Source/WebCore/svg/SVGUseElement.cpp
M Source/WebCore/testing/Internals.cpp
Log Message:
-----------
Adopt more smart pointers for SVGDocumentExtensions
https://bugs.webkit.org/show_bug.cgi?id=269001
Reviewed by Ryosuke Niwa.
Adopt more smart pointers for SVGDocumentExtensions:
1. Rename `Document::svgExtensions()` to `Document::svgExtensionsIfExists()`
and `Document::accessSVGExtensions()` to `Document::svgExtensions()` for
consistency with our usual naming conventions.
2. Introduce `Document::checkedSVGExtensions()` which returns a `CheckedRef<>`
and adopt where appropriate.
3. Update call site to make sure the `Document` is protected during the scope
of the SVGDocumentExtensions variable, since it owns it.
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::rebuildSVGExtensionsElementsIfNecessary):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::commonTeardown):
(WebCore::Document::implicitClose):
(WebCore::Document::svgExtensions):
(WebCore::Document::checkedSVGExtensions):
(WebCore::Document::accessSVGExtensions): Deleted.
* Source/WebCore/dom/Document.h:
(WebCore::Document::svgExtensionsIfExists):
(WebCore::Document::svgExtensions): Deleted.
* Source/WebCore/history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setIsVisibleInternal):
* Source/WebCore/rendering/svg/SVGResourcesCache.cpp:
(WebCore::resourcesCacheFromRenderer):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::addCurrentSVGFontFaceRules):
* Source/WebCore/svg/SVGDocumentExtensions.h:
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::reportAttributeParsingError):
(WebCore::SVGElement::removedFromAncestor):
(WebCore::SVGElement::attributeChanged):
* Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::attributeChanged):
* Source/WebCore/svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::attributeChanged):
* Source/WebCore/svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseViewBoxGeneric):
* Source/WebCore/svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::insertedIntoAncestor):
(WebCore::SVGFontFaceElement::removedFromAncestor):
* Source/WebCore/svg/SVGGeometryElement.cpp:
(WebCore::SVGGeometryElement::attributeChanged):
* Source/WebCore/svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::attributeChanged):
* Source/WebCore/svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::attributeChanged):
* Source/WebCore/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::~SVGSVGElement):
(WebCore::SVGSVGElement::insertedIntoAncestor):
(WebCore::SVGSVGElement::removedFromAncestor):
* Source/WebCore/svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::toClipPath):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::areSVGAnimationsPaused const):
(WebCore::Internals::svgAnimationsInterval const):
(WebCore::Internals::allSVGSVGElements const):
Canonical link: https://commits.webkit.org/274316@main
More information about the webkit-changes
mailing list