Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 73bff01abebed57416a48b73cf105b223ae59049 https://github.com/WebKit/WebKit/commit/73bff01abebed57416a48b73cf105b223ae59049 Author: Ryosuke Niwa <rn...@webkit.org> Date: 2024-03-28 (Thu, 28 Mar 2024)
Changed paths: A LayoutTests/fast/custom-elements/mutation-observer-for-style-attribute-on-custom-elements-expected.txt A LayoutTests/fast/custom-elements/mutation-observer-for-style-attribute-on-custom-elements.html M LayoutTests/fast/dom/MutationObserver/observe-attributes-expected.txt M LayoutTests/fast/dom/MutationObserver/observe-attributes.html M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp A Source/WebCore/css/StyleAttributeMutationScope.cpp A Source/WebCore/css/StyleAttributeMutationScope.h M Source/WebCore/css/typedom/InlineStylePropertyMap.cpp Log Message: ----------- CSS Typed OM doesn't schedule mutation records https://bugs.webkit.org/show_bug.cgi?id=267063 Reviewed by Antti Koivisto. This PR fixes the bug that mutating element's inline style with attributeStyleMap does not enqueue mutation record for mutation observers. To do this, this PR extracts StyleAttributeMutationScope out of PropertySetCSSStyleDeclaration.cpp into its own cpp/h files and generalizes it to support both CSSStyleDeclaration and attributeStyleMap. * LayoutTests/fast/custom-elements/mutation-observer-for-style-attribute-on-custom-elements-expected.txt: Added. * LayoutTests/fast/custom-elements/mutation-observer-for-style-attribute-on-custom-elements.html: Added. * LayoutTests/fast/dom/MutationObserver/observe-attributes-expected.txt: * LayoutTests/fast/dom/MutationObserver/observe-attributes.html: Added test cases. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::InlineCSSStyleDeclaration::didMutate): (WebCore::StyleAttributeMutationScope::StyleAttributeMutationScope): Deleted. (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope): Deleted. (WebCore::StyleAttributeMutationScope::enqueueMutationRecord): Deleted. (WebCore::StyleAttributeMutationScope::didInvalidateStyleAttr): Deleted. * Source/WebCore/css/StyleAttributeMutationScope.cpp: Added. * Source/WebCore/css/StyleAttributeMutationScope.h: Added. (WebCore::StyleAttributeMutationScope::StyleAttributeMutationScope): Added. (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope): Added. (WebCore::StyleAttributeMutationScope::enqueueMutationRecord): Added. * Source/WebCore/css/typedom/InlineStylePropertyMap.cpp: (WebCore::InlineStylePropertyMap::removeProperty): (WebCore::InlineStylePropertyMap::setShorthandProperty): (WebCore::InlineStylePropertyMap::setProperty): (WebCore::InlineStylePropertyMap::setCustomProperty): (WebCore::InlineStylePropertyMap::removeCustomProperty): (WebCore::InlineStylePropertyMap::clear): * Source/WebCore/css/typedom/InlineStylePropertyMap.h: Canonical link: https://commits.webkit.org/276782@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes