[webkit-changes] [WebKit/WebKit] 547e70: Avoid unnecessary copy of CSSSelectorList with non...

Matthieu Dubet noreply at github.com
Fri Apr 14 03:51:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 547e70e42ef9715daf53fc649da6899a1f0096ad
      https://github.com/WebKit/WebKit/commit/547e70e42ef9715daf53fc649da6899a1f0096ad
  Author: Matthieu Dubet <m_dubet at apple.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

  Changed paths:
    M Source/WebCore/dom/SelectorQuery.cpp
    M Source/WebCore/style/RuleSetBuilder.cpp

  Log Message:
  -----------
  Avoid unnecessary copy of CSSSelectorList with non nested style rule
https://bugs.webkit.org/show_bug.cgi?id=255443
rdar://108037598

Reviewed by Antti Koivisto.

resolveNestingParent() creates a copy of the selector list
and resolves it.
We should avoid calling it altogether when it's unnecessary
(top level and no & selector).

* Source/WebCore/dom/SelectorQuery.cpp:
(WebCore::SelectorQueryCache::add):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::resolveSelectorListWithNesting):

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




More information about the webkit-changes mailing list