Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 68e23c662f549777f47c74fa106f1659c89b6cac
      
https://github.com/WebKit/WebKit/commit/68e23c662f549777f47c74fa106f1659c89b6cac
  Author: Antti Koivisto <[email protected]>
  Date:   2025-10-21 (Tue, 21 Oct 2025)

  Changed paths:
    A 
LayoutTests/http/tests/contentextensions/css-display-none-font-shadow-tree-expected.html
    A 
LayoutTests/http/tests/contentextensions/css-display-none-font-shadow-tree.html
    A 
LayoutTests/http/tests/contentextensions/css-display-none-font-shadow-tree.html.json
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/ExtensionStyleSheets.cpp
    M Source/WebCore/dom/ExtensionStyleSheets.h
    M Source/WebCore/style/StyleScope.cpp
    M Source/WebCore/style/StyleScope.h

  Log Message:
  -----------
  Crash in Style::Scope::createOrFindSharedShadowTreeResolver with content 
extensions
https://bugs.webkit.org/show_bug.cgi?id=301100
rdar://83302107

Reviewed by Alan Baradlay.

Test: http/tests/contentextensions/css-display-none-font-shadow-tree.html
* 
LayoutTests/http/tests/contentextensions/css-display-none-font-shadow-tree-expected.html:
 Added.
* 
LayoutTests/http/tests/contentextensions/css-display-none-font-shadow-tree.html:
 Added.
* 
LayoutTests/http/tests/contentextensions/css-display-none-font-shadow-tree.html.json:
 Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):

Don't invalidate unnecessarily when there are no cached extension stylesheets.

* Source/WebCore/dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::clearPageUserSheet):
(WebCore::ExtensionStyleSheets::updatePageUserSheet):
(WebCore::ExtensionStyleSheets::hasCachedInjectedStyleSheets const):
(WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
(WebCore::ExtensionStyleSheets::addUserStyleSheet):
(WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
(WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
(WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):

Call new didChangeExtensionStyleSheets instead of 
didChangeStyleSheetEnvironment.

* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::createOrFindSharedShadowTreeResolver):
(WebCore::Style::Scope::clearResolver):
(WebCore::Style::Scope::scheduleUpdate):

Release assert that we are not in style or stylesheet update when clearing the 
resolver.

(WebCore::Style::Scope::didChangeStyleSheetEnvironment):
(WebCore::Style::Scope::didChangeExtensionStyleSheets):

Trigger asynchronous full stylesheet update.
Extension stylesheet changes do not require wiping out the style resolver 
synchronously as
they are additive.

* Source/WebCore/style/StyleScope.h:

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