[webkit-changes] [WebKit/WebKit] 264120: Handle custom property applying in Style::Builder
Antti Koivisto
noreply at github.com
Wed Mar 6 23:51:46 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 264120dc6a7eede1bfa2399da6db11f255b0efa9
https://github.com/WebKit/WebKit/commit/264120dc6a7eede1bfa2399da6db11f255b0efa9
Author: Antti Koivisto <antti at apple.com>
Date: 2024-03-06 (Wed, 06 Mar 2024)
Changed paths:
M Source/WebCore/css/process-css-properties.py
M Source/WebCore/style/StyleBuilder.cpp
M Source/WebCore/style/StyleBuilder.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StyleBuilderGenerated.h
M Source/WebCore/style/StyleBuilderState.h
Log Message:
-----------
Handle custom property applying in Style::Builder
https://bugs.webkit.org/show_bug.cgi?id=270581
rdar://124149638
Reviewed by Alan Baradlay.
Move it outside the giant switch. This simplifies the code.
* Source/WebCore/css/process-css-properties.py:
Generate switch instead of a series of ifs for value/initial/inherit.
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):
We no longer need to pass the registered property to the normal apply function.
Also pass the value/initial/inherit as a three-value enum rather than as separate bits (which were mutually exclusive).
(WebCore::Style::Builder::applyCustomPropertyValue):
Apply custom properties here.
* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialCustomProperty): Deleted.
(WebCore::Style::BuilderCustom::applyInheritCustomProperty): Deleted.
(WebCore::Style::BuilderCustom::applyValueCustomProperty): Deleted.
* Source/WebCore/style/StyleBuilderGenerated.h:
* Source/WebCore/style/StyleBuilderState.h:
Canonical link: https://commits.webkit.org/275774@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list