Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=266829 Reviewed by Chris Dumez. This PR inlines Node::nodeType in Node.h by using the remaining bits in m_typeFlags. To do this optimization, we take the advantage of the fact nodeType is now fast to obtain, and replace two of the existing TypeFlags (IsDocumentFragment and IsText) in favor of checking nodeType instead. * Source/WebCore/dom/Attr.cpp: (WebCore::Attr::Attr): * Source/WebCore/dom/Attr.h: * Source/WebCore/dom/CDATASection.cpp: (WebCore::CDATASection::CDATASection): (WebCore::CDATASection::nodeType const): Deleted. * Source/WebCore/dom/CDATASection.h: * Source/WebCore/dom/CharacterData.h: (WebCore::CharacterData::CharacterData): * Source/WebCore/dom/Comment.cpp: (WebCore::Comment::Comment): (WebCore::Comment::nodeType const): Deleted. * Source/WebCore/dom/Comment.h: * Source/WebCore/dom/ContainerNode.h: (WebCore::ContainerNode::ContainerNode): * Source/WebCore/dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::nodeType const): Deleted. * Source/WebCore/dom/Document.h: * Source/WebCore/dom/DocumentFragment.cpp: (WebCore::DocumentFragment::DocumentFragment): (WebCore::DocumentFragment::create): (WebCore::DocumentFragment::createForInnerOuterHTML): (WebCore::DocumentFragment::nodeType const): Deleted. * Source/WebCore/dom/DocumentFragment.h: * Source/WebCore/dom/DocumentType.cpp: (WebCore::DocumentType::DocumentType): (WebCore::DocumentType::nodeType const): Deleted. * Source/WebCore/dom/DocumentType.h: * Source/WebCore/dom/Element.cpp: (WebCore::Element::Element): (WebCore::Element::nodeType const): Deleted. * Source/WebCore/dom/Element.h: * Source/WebCore/dom/Node.cpp: (WebCore::Node::Node): * Source/WebCore/dom/Node.h: (WebCore::Node::nodeType const): (WebCore::Node::isDocumentNode const): (WebCore::Node::isTreeScope const): (WebCore::Node::isDocumentFragment const): (WebCore::Node::typeFlagsMemoryOffset): (WebCore::Node::constructBitFieldsFromNodeTypeAndFlags): (WebCore::Node::nodeTypeFromBitFields): (WebCore::Node::hasTypeFlag const): * Source/WebCore/dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::ProcessingInstruction): (WebCore::ProcessingInstruction::nodeType const): Deleted. * Source/WebCore/dom/ProcessingInstruction.h: * Source/WebCore/dom/TemplateContentDocumentFragment.h: * Source/WebCore/dom/Text.cpp: (WebCore::Text::create): (WebCore::Text::createEditingText): (WebCore::Text::nodeType const): Deleted. * Source/WebCore/dom/Text.h: (WebCore::Text::Text): Canonical link: https://commits.webkit.org/272482@main
- Loading branch information
Showing
23 changed files
with
45 additions
and
92 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
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
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
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
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
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
Oops, something went wrong.