Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9988108f8b32a9057590e3cacb90b1118a7cd026
https://github.com/WebKit/WebKit/commit/9988108f8b32a9057590e3cacb90b1118a7cd026
Author: Simon Fraser <[email protected]>
Date: 2024-11-23 (Sat, 23 Nov 2024)
Changed paths:
M Source/WTF/wtf/text/TextStream.h
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/Logging.h
A Source/WebCore/platform/text/UnicodeBidi.cpp
M Source/WebCore/platform/text/UnicodeBidi.h
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/style/CounterDirectives.h
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/RenderStyleConstants.cpp
M Source/WebCore/rendering/style/RenderStyleConstants.h
A Source/WebCore/rendering/style/RenderStyleDifference.h
M Source/WebCore/rendering/style/SVGRenderStyle.cpp
M Source/WebCore/rendering/style/SVGRenderStyle.h
M Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
M Source/WebCore/rendering/style/SVGRenderStyleDefs.h
M Source/WebCore/rendering/style/StyleBackgroundData.cpp
M Source/WebCore/rendering/style/StyleBackgroundData.h
M Source/WebCore/rendering/style/StyleBoxData.cpp
M Source/WebCore/rendering/style/StyleBoxData.h
M Source/WebCore/rendering/style/StyleCustomPropertyData.cpp
M Source/WebCore/rendering/style/StyleCustomPropertyData.h
M Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp
M Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h
M Source/WebCore/rendering/style/StyleFilterData.cpp
M Source/WebCore/rendering/style/StyleFilterData.h
M Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp
M Source/WebCore/rendering/style/StyleFlexibleBoxData.h
M Source/WebCore/rendering/style/StyleGridData.cpp
M Source/WebCore/rendering/style/StyleGridData.h
M Source/WebCore/rendering/style/StyleGridItemData.cpp
M Source/WebCore/rendering/style/StyleGridItemData.h
M Source/WebCore/rendering/style/StyleInheritedData.cpp
M Source/WebCore/rendering/style/StyleInheritedData.h
M Source/WebCore/rendering/style/StyleMarqueeData.cpp
M Source/WebCore/rendering/style/StyleMarqueeData.h
M Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleMiscNonInheritedData.h
M Source/WebCore/rendering/style/StyleMultiColData.cpp
M Source/WebCore/rendering/style/StyleMultiColData.h
M Source/WebCore/rendering/style/StyleNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleNonInheritedData.h
M Source/WebCore/rendering/style/StyleRareInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareInheritedData.h
M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
M Source/WebCore/rendering/style/StyleSurroundData.cpp
M Source/WebCore/rendering/style/StyleSurroundData.h
M Source/WebCore/rendering/style/StyleTransformData.cpp
M Source/WebCore/rendering/style/StyleTransformData.h
M Source/WebCore/rendering/style/StyleVisitedLinkColorData.cpp
M Source/WebCore/rendering/style/StyleVisitedLinkColorData.h
Log Message:
-----------
Make it possible to log style changes
https://bugs.webkit.org/show_bug.cgi?id=283592
rdar://140439950
Reviewed by Alan Baradlay.
Add a `Style` log channel. When enabled, `RenderElement::setStyle()` logs the
difference between
the old and new styles.
This requires adding a `dumpDifferences()` member function to each of the
StyleFoo classes.
These use macros from RenderStyleDifference.h to dump values that are
different, making use of
some template magic to handle pointer types, and types which don't yet support
`operator<<(TextStream&...)`.
Dumping is complete for all parts of style, including SVGRenderStyle.
* Source/WTF/wtf/text/TextStream.h:
(WTF::TextStream::isEmpty const):
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/Logging.h:
* Source/WebCore/platform/text/UnicodeBidi.cpp: Added.
(WebCore::operator<<):
* Source/WebCore/platform/text/UnicodeBidi.h:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle):
* Source/WebCore/rendering/style/CounterDirectives.h:
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::rareDataChangeRequiresLayout):
(WebCore::RenderStyle::conservativelyCollectChangedAnimatableProperties const):
(WebCore::RenderStyle::NonInheritedFlags::dumpDifferences const):
(WebCore::RenderStyle::InheritedFlags::dumpDifferences const):
(WebCore::RenderStyle::dumpDifferences const):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::alwaysPageBreak):
(WebCore::transformBoxToCSSBoxType):
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/style/RenderStyleDifference.h: Added.
(WebCore::ValueOrUnstreamableMessage::ValueOrUnstreamableMessage):
(WebCore::operator<<):
(WebCore::logIfDifferent):
* Source/WebCore/rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::InheritedFlags::dumpDifferences const):
(WebCore::SVGRenderStyle::NonInheritedFlags::dumpDifferences const):
(WebCore::SVGRenderStyle::dumpDifferences const):
* Source/WebCore/rendering/style/SVGRenderStyle.h:
* Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleFillData::dumpDifferences const):
(WebCore::StyleStrokeData::dumpDifferences const):
(WebCore::StyleStopData::dumpDifferences const):
(WebCore::StyleMiscData::dumpDifferences const):
(WebCore::StyleShadowSVGData::dumpDifferences const):
(WebCore::StyleInheritedResourceData::dumpDifferences const):
(WebCore::StyleLayoutData::dumpDifferences const):
* Source/WebCore/rendering/style/SVGRenderStyleDefs.h:
* Source/WebCore/rendering/style/StyleBackgroundData.cpp:
(WebCore::StyleBackgroundData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleBackgroundData.h:
* Source/WebCore/rendering/style/StyleBoxData.cpp:
(WebCore::StyleBoxData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleBoxData.h:
* Source/WebCore/rendering/style/StyleCustomPropertyData.cpp:
(WebCore::StyleCustomPropertyData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleCustomPropertyData.h:
* Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp:
(WebCore::StyleDeprecatedFlexibleBoxData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h:
* Source/WebCore/rendering/style/StyleFilterData.cpp:
(WebCore::StyleFilterData::StyleFilterData):
(WebCore::StyleFilterData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleFilterData.h:
* Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp:
(WebCore::StyleFlexibleBoxData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleFlexibleBoxData.h:
* Source/WebCore/rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::operator== const):
(WebCore::StyleGridData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator== const): Deleted.
* Source/WebCore/rendering/style/StyleGridItemData.cpp:
(WebCore::StyleGridItemData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleGridItemData.h:
* Source/WebCore/rendering/style/StyleInheritedData.cpp:
(WebCore::StyleInheritedData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleInheritedData.h:
* Source/WebCore/rendering/style/StyleMarqueeData.cpp:
(WebCore::StyleMarqueeData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleMarqueeData.h:
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp:
(WebCore::StyleMiscNonInheritedData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.h:
* Source/WebCore/rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleMultiColData.h:
* Source/WebCore/rendering/style/StyleNonInheritedData.cpp:
(WebCore::StyleNonInheritedData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleNonInheritedData.h:
* Source/WebCore/rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleRareInheritedData.h:
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::operator== const):
(WebCore::StyleRareNonInheritedData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/style/StyleSurroundData.cpp:
(WebCore::StyleSurroundData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleSurroundData.h:
* Source/WebCore/rendering/style/StyleTransformData.cpp:
(WebCore::StyleTransformData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleTransformData.h:
* Source/WebCore/rendering/style/StyleVisitedLinkColorData.cpp:
(WebCore::StyleVisitedLinkColorData::dumpDifferences const):
* Source/WebCore/rendering/style/StyleVisitedLinkColorData.h:
Canonical link: https://commits.webkit.org/287012@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