[webkit-changes] [WebKit/WebKit] ade139: [CSS] CSSSelectorList class should have a const_it...

Matthieu Dubet noreply at github.com
Tue Mar 26 10:39:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ade1396f85a02c79312ec9f7ec361f296cf7229d
      https://github.com/WebKit/WebKit/commit/ade1396f85a02c79312ec9f7ec361f296cf7229d
  Author: Matthieu Dubet <m_dubet at apple.com>
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
    M Source/WebCore/css/CSSSelectorList.cpp
    M Source/WebCore/css/CSSSelectorList.h
    M Source/WebCore/cssjit/SelectorCompiler.cpp

  Log Message:
  -----------
  [CSS] CSSSelectorList class should have a const_iterator
https://bugs.webkit.org/show_bug.cgi?id=271672
rdar://125373236

Reviewed by Antti Koivisto.

CSSSelectorList is an optimized contiguous memory
representation of a list.
This patch adds a forward const iterator interface to it
to be able to use range based for-loop.

* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::forEachTagSelector):
(WebCore::forEachSelector):
(WebCore::CSSSelectorList::hasExplicitNestingParent const):
* Source/WebCore/css/CSSSelectorList.h:
(WebCore::CSSSelectorList::const_iterator::operator* const):
(WebCore::CSSSelectorList::const_iterator::operator-> const):
(WebCore::CSSSelectorList::const_iterator::operator!= const):
(WebCore::CSSSelectorList::const_iterator::const_iterator):
(WebCore::CSSSelectorList::const_iterator::operator++):
(WebCore::CSSSelectorList::begin const):
(WebCore::CSSSelectorList::end const):
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addNthChildType):
(WebCore::SelectorCompiler::addPseudoClassType):

Canonical link: https://commits.webkit.org/276697@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