Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 290124606c2a9c70c255bd80361642fd1fff4e8a
      
https://github.com/WebKit/WebKit/commit/290124606c2a9c70c255bd80361642fd1fff4e8a
  Author: Antti Koivisto <[email protected]>
  Date:   2025-09-19 (Fri, 19 Sep 2025)

  Changed paths:
    M Source/WebCore/css/CSSSelector.cpp
    M Source/WebCore/css/CSSSelector.h
    M Source/WebCore/css/parser/CSSSelectorParser.cpp
    M Source/WebCore/css/parser/MutableCSSSelector.cpp
    M Source/WebCore/css/parser/MutableCSSSelector.h

  Log Message:
  -----------
  Use MutableCSSSelector for resolving nested selector lists
https://bugs.webkit.org/show_bug.cgi?id=299101
rdar://problem/160871018

Reviewed by Matthieu Dubet.

Mutating const CSSSelectors was pretty ugly. Also this will allow optimizing
nesting better in future.

* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::resolveNestingParentSelectors): Deleted.
(WebCore::CSSSelector::replaceNestingParentByPseudoClassScope): Deleted.

Remove the mutating functions.

* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::resolveNestingParent):

Construct the resolved elector list using MutableCSSSelectors which is how the 
parser works in general.

* Source/WebCore/css/parser/MutableCSSSelector.cpp:
(WebCore::MutableCSSSelector::MutableCSSSelector):

Add a new constructor that just wraps a simple selector.

* Source/WebCore/css/parser/MutableCSSSelector.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to