Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ff0fdab94ceae40ad1582477eac1b7800a11ba3
      
https://github.com/WebKit/WebKit/commit/4ff0fdab94ceae40ad1582477eac1b7800a11ba3
  Author: Antti Koivisto <[email protected]>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    A LayoutTests/fast/selectors/has-scope-breaking-classification-expected.txt
    A LayoutTests/fast/selectors/has-scope-breaking-classification.html
    M Source/WebCore/style/ChildChangeInvalidation.cpp
    M Source/WebCore/style/RuleFeature.cpp
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl

  Log Message:
  -----------
  REGRESSION (268038@main): :not(:has(:not(foo))) misclassified as scope 
breaking
https://bugs.webkit.org/show_bug.cgi?id=267628
rdar://120492012

Reviewed by Cameron McCormack.

Seen in https://tc39.es/ecma262/#sec-completion-record-specification-type

* LayoutTests/fast/selectors/has-scope-breaking-classification-expected.txt: 
Added.
* LayoutTests/fast/selectors/has-scope-breaking-classification.html: Added.
* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::ChildChangeInvalidation::invalidateForChangeOutsideHasScope):
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):

:not() outside :has() would still put us into CanBreakScope::Yes mode.
Fix by only setting CanBreakScope::Yes if we are actually inside :has().

* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::hasScopeBreakingHasSelectors const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

Add testing support.

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to