Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
TextAutoSizingKey should use normal refcounting
https://bugs.webkit.org/show_bug.cgi?id=156893 Reviewed by Andreas Kling. Get rid of special refcounting of style in favor of RefPtr. It also becomes a move-only type to support future switch to non-refcounted RenderStyle. Also general cleanups and modernization. * dom/Document.cpp: (WebCore::TextAutoSizingTraits::constructDeletedValue): (WebCore::TextAutoSizingTraits::isDeletedValue): (WebCore::Document::addAutoSizingNode): (WebCore::Document::validateAutoSizingNodes): (WebCore::Document::resetAutoSizingNodes): Adopt to being move-only. * rendering/TextAutoSizing.cpp: (WebCore::cloneRenderStyleWithState): (WebCore::TextAutoSizingKey::TextAutoSizingKey): Clone the style for safety against mutations. Cloning is cheap. (WebCore::TextAutoSizingValue::numNodes): (WebCore::TextAutoSizingValue::adjustNodeSizes): (WebCore::TextAutoSizingValue::reset): (WebCore::TextAutoSizingKey::~TextAutoSizingKey): Deleted. (WebCore::TextAutoSizingKey::operator=): Deleted. (WebCore::TextAutoSizingKey::ref): Deleted. (WebCore::TextAutoSizingKey::deref): Deleted. * rendering/TextAutoSizing.h: (WebCore::TextAutoSizingKey::TextAutoSizingKey): (WebCore::TextAutoSizingKey::style): (WebCore::TextAutoSizingKey::isDeleted): (WebCore::operator==): (WebCore::TextAutoSizingKey::doc): Deleted. (WebCore::TextAutoSizingKey::isValidDoc): Deleted. (WebCore::TextAutoSizingKey::isValidStyle): Deleted. (WebCore::TextAutoSizingKey::deletedKeyDoc): Deleted. (WebCore::TextAutoSizingKey::deletedKeyStyle): Deleted. m_doc member is not used for anything except deleted value comparisons. Replace it with a bit. Canonical link: https://commits.webkit.org/175020@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
100 additions
and 104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters