[webkit-changes] [WebKit/WebKit] aff386: Introduce ElementStateFlag to Node

Ryosuke Niwa noreply at github.com
Sat Mar 23 12:07:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aff386a1b75b341c341e65c3a20924ebd8c29289
      https://github.com/WebKit/WebKit/commit/aff386a1b75b341c341e65c3a20924ebd8c29289
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2024-03-23 (Sat, 23 Mar 2024)

  Changed paths:
    M Source/WebCore/cssjit/SelectorCompiler.cpp
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/dom/Node.h
    M Source/WebCore/domjit/JSNodeDOMJIT.cpp

  Log Message:
  -----------
  Introduce ElementStateFlag to Node
https://bugs.webkit.org/show_bug.cgi?id=271498

Reviewed by Yusuke Suzuki.

Make Node::m_previous store 16-bit bit flags and use that in Element::~Element to avoid hash map lookup
for the element identifier.

* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacentElement):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::identifier const):
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::~Node):
* Source/WebCore/dom/Node.h:
(WebCore::Node::previousSibling const):
(WebCore::Node::protectedPreviousSibling const):
(WebCore::Node::previousSiblingPointerMask):
(WebCore::Node::setPreviousSibling):
(WebCore::Node::hasElementStateFlag const):
(WebCore::Node::clearElementStateFlag const):
(WebCore::Node::setElementStateFlag const):
* Source/WebCore/domjit/JSNodeDOMJIT.cpp:
(WebCore::createCallDOMGetterForOffsetAccess):
(WebCore::compileNodePreviousSiblingAttribute):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list