Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b380bdb5e474414c07bdee71f33357e8ded048f
      
https://github.com/WebKit/WebKit/commit/9b380bdb5e474414c07bdee71f33357e8ded048f
  Author: Jonathan Hammer <[email protected]>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M Source/WebCore/page/LocalDOMWindow.cpp
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/mac/GetMatchedCSSRules.mm

  Log Message:
  -----------
  LocalDOMWindow::getMatchedCSSRules asserts when passed null/empty 
pseudoElement

https://bugs.webkit.org/show_bug.cgi?id=276677

Reviewed by Tim Nguyen.

As of 4d69396, it is no longer valid to pass PseudoId::None to 
pseudoStyleRulesForElement,
because it triggers an assertion failure in the ctor for PseudoElementRequest. 
This changes
getMatchedCSSRules to pass std::nullopt instead of PseudoId::None.

Test: Tools/TestWebKitAPI/Tests/mac/GetMatchedCSSRules.mm

* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::getMatchedCSSRules const):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/mac/GetMatchedCSSRules.mm: Added.
(-[GetMatchedCSSRulesTest webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST(WebKitLegacy, GetMatchedCSSRulesTest)):

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