[webkit-changes] [WebKit/WebKit] 894846: querySelectorAll should consult document

Ryosuke Niwa noreply at github.com
Tue Jan 16 17:29:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8948469628f6e2c8cd44d680b2f194371e9b3f97
      https://github.com/WebKit/WebKit/commit/8948469628f6e2c8cd44d680b2f194371e9b3f97
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2024-01-16 (Tue, 16 Jan 2024)

  Changed paths:
    M Source/WebCore/dom/ContainerNode.cpp
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/dom/EventTarget.h
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/dom/SelectorQuery.h
    M Source/WebCore/dom/StaticNodeList.cpp
    M Source/WebCore/dom/StaticNodeList.h
    M Source/WebCore/page/MemoryRelease.cpp

  Log Message:
  -----------
  querySelectorAll should consult document
https://bugs.webkit.org/show_bug.cgi?id=267591

Reviewed by Yusuke Suzuki.

This PR makes querySelectorAll consult with Document.

* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::querySelectorAll):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::resultForSelectorAll): Added.
(WebCore::Document::addResultForSelectorAll): Added.
(WebCore::Document::invalidateQuerySelectorAllResults): Added.
(WebCore::Document::clearQuerySelectorAllResults): Added.
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/EventTarget.h:
(WebCore::EventTarget::hasValidQuerySelectorAllResults const): Added.
(WebCore::EventTarget::setHasValidQuerySelectorAllResults): Added.
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::invalidateNodeListAndCollectionCachesInAncestors):
(WebCore::Node::invalidateNodeListAndCollectionCachesInAncestorsForAttribute):
* Source/WebCore/dom/SelectorQuery.h:
(WebCore::SelectorDataList::shouldStoreInDocument const): Added.
(WebCore::SelectorQuery::shouldStoreInDocument const): Added.
* Source/WebCore/dom/StaticNodeList.cpp:
(WebCore::StaticWrapperNodeList::length const):
(WebCore::StaticWrapperNodeList::item const):
* Source/WebCore/dom/StaticNodeList.h:
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):

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




More information about the webkit-changes mailing list