Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e37afd3cf5cf2058c4c9ddb63dad6ab5509af0a2
https://github.com/WebKit/WebKit/commit/e37afd3cf5cf2058c4c9ddb63dad6ab5509af0a2
Author: Aditya Keerthi <[email protected]>
Date: 2025-05-16 (Fri, 16 May 2025)
Changed paths:
A LayoutTests/fast/forms/color/color-style-resolution-crash-expected.txt
A LayoutTests/fast/forms/color/color-style-resolution-crash.html
M Source/WebCore/rendering/RenderTheme.cpp
M Source/WebCore/rendering/RenderTheme.h
M Source/WebCore/style/StyleAdjuster.cpp
M Source/WebCore/style/StyleAdjuster.h
Log Message:
-----------
REGRESSION (293442@main): Crash when resolving style for color inputs
https://bugs.webkit.org/show_bug.cgi?id=292946
rdar://149686209
Reviewed by Richard Robinson.
293442@main introduced a call to `computedStyle()` in the middle of style
adjustment, in order to support propagating `appearance: none` across the
color input subtree.
This is incorrect, as it introduces re-entrancy during style calculation,
and is caught by a RELEASE_ASSERT.
Fix by passing down the parent style from `StyleAdjuster` and checking its
used appearance. Note that the shadow host style is not checked, since the
children of the shadow tree can also be styled, and their children should
be able to lose appearance too.
Thanks to Pratiksha Choudhury for the test case.
* LayoutTests/fast/forms/color/color-style-resolution-crash-expected.txt: Added.
* LayoutTests/fast/forms/color/color-style-resolution-crash.html: Added.
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustAppearanceForElement const):
(WebCore::RenderTheme::hasAppearanceForElementTypeFromUAStyle):
(WebCore::parentOfElementUsesPrimitiveAppearance): Deleted.
* Source/WebCore/rendering/RenderTheme.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
(WebCore::Style::Adjuster::adjustThemeStyle const):
* Source/WebCore/style/StyleAdjuster.h:
Canonical link: https://commits.webkit.org/295035@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