Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 21b412d91a633311dcd3f5d116b135369cc72e1b
      
https://github.com/WebKit/WebKit/commit/21b412d91a633311dcd3f5d116b135369cc72e1b
  Author: Ryosuke Niwa <[email protected]>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M Source/WebCore/cssjit/SelectorCompiler.cpp
    M Source/WebCore/dom/Attr.cpp
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/DocumentFragment.cpp
    M Source/WebCore/dom/DocumentFragment.h
    M Source/WebCore/dom/DocumentType.cpp
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/dom/Node.h
    M Source/WebCore/dom/PseudoElement.cpp
    M Source/WebCore/dom/ShadowRoot.cpp

  Log Message:
  -----------
  Split NodeFlag into type flags and state flags
https://bugs.webkit.org/show_bug.cgi?id=266738

Reviewed by Tim Nguyen.

Consolidate NodeFlag's which denote a type information into the lowest 14 bits 
of NodeFlag, and assert that
these are only flags set forth the flags passed to ConstructionType flag. Also 
assert that setNodeFlag or
clearNodeFlag is never called with NodeFlag's that denote a type information.

To make these changes, flip the semantics of 
NodeFlag::IsParsingChildrenFinished so that the flag is set
when child nodes are being parsed (and rename the flag to 
NodeFlag::IsParsingChildren). Use setNodeFlag in
the constructors to set IsConnected and IsInShadowTree flags instead of 
including them in ConstructionType.

There should be no observable behavior differences.

* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
* Source/WebCore/dom/Attr.cpp:
(WebCore::Attr::Attr):
* Source/WebCore/dom/Document.cpp:
(WebCore::m_frameIdentifier):
(WebCore::Document::documentFragmentForInnerOuterHTML):
* Source/WebCore/dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::createForInnerOuterHTML):
* Source/WebCore/dom/DocumentFragment.h:
(WebCore::DocumentFragment::setIsDocumentFragmentForInnerOuterHTML): Deleted.
* Source/WebCore/dom/DocumentType.cpp:
(WebCore::DocumentType::DocumentType):
* Source/WebCore/dom/Node.h:
(WebCore::Node::flagIsParsingChildren):
(WebCore::Node::setNodeFlag const):
(WebCore::Node::clearNodeFlag const):
(WebCore::Node::isParsingChildrenFinished const):
(WebCore::Node::setIsParsingChildrenFinished):
(WebCore::Node::clearIsParsingChildrenFinished):
(WebCore::Node::flagIsParsingChildrenFinished): Deleted.
* Source/WebCore/dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
* Source/WebCore/dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):

Canonical link: https://commits.webkit.org/272399@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to