Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 865a57c2c9e5255556bb9c2ffb620e24d00907b4
https://github.com/WebKit/WebKit/commit/865a57c2c9e5255556bb9c2ffb620e24d00907b4
Author: Sihui Liu <[email protected]>
Date: 2024-11-23 (Sat, 23 Nov 2024)
Changed paths:
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Scripts/webkit/messages_unittest.py
M Source/WebKit/Scripts/webkit/model.py
M Source/WebKit/Scripts/webkit/parser.py
M Source/WebKit/Scripts/webkit/tests/Makefile
M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
M Source/WebKit/Scripts/webkit/tests/MessageNames.cpp
M Source/WebKit/Scripts/webkit/tests/MessageNames.h
M Source/WebKit/Scripts/webkit/tests/TestWithEnabledByMessageReceiver.cpp
R Source/WebKit/Scripts/webkit/tests/TestWithEnabledIf.messages.in
R Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessageReceiver.cpp
R Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessages.h
A Source/WebKit/Scripts/webkit/tests/TestWithValidator.messages.in
A Source/WebKit/Scripts/webkit/tests/TestWithValidatorMessageReceiver.cpp
A Source/WebKit/Scripts/webkit/tests/TestWithValidatorMessages.h
M Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in
M Source/WebKit/UIProcess/Extensions/WebExtensionController.messages.in
Log Message:
-----------
Rename EnabledIf to Validator and allow it to be specifed together with
EnabledBy
https://bugs.webkit.org/show_bug.cgi?id=283471
rdar://140327105
Reviewed by Timothy Hatcher.
In existing implementation, EnabledIf and EnabledBy are both recognized as
"runtime enablement conditon", and they
cannot co-exist. However, they are a bit different: EnabledBy should be
specifically used for feature flag, and will be
enforced later on new message endpoints for new features; while EnabledIf can
be used for more complicated condition,
like validating the receiver is in an active state. To distinguish between
them, rename EnabledIf to Validator. Also,
allow message endpoints to be annotated with both of them since the purpose can
be different.
* Source/WebKit/Scripts/webkit/messages.py:
(handler_function):
(generate_runtime_enablement):
(async_message_statement):
* Source/WebKit/Scripts/webkit/messages_unittest.py:
* Source/WebKit/Scripts/webkit/model.py:
(Message.__init__):
* Source/WebKit/Scripts/webkit/parser.py:
(parse):
* Source/WebKit/Scripts/webkit/tests/Makefile:
* Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
(IPC::jsValueForArguments):
(IPC::jsValueForReplyArguments):
(IPC::messageArgumentDescriptions):
(IPC::messageReplyArgumentDescriptions):
* Source/WebKit/Scripts/webkit/tests/MessageNames.cpp:
* Source/WebKit/Scripts/webkit/tests/MessageNames.h:
* Source/WebKit/Scripts/webkit/tests/TestWithEnabledByMessageReceiver.cpp:
(WebKit::TestWithEnabledBy::didReceiveMessage):
* Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessageReceiver.cpp:
Removed.
* Source/WebKit/Scripts/webkit/tests/TestWithValidator.messages.in: Renamed
from Source/WebKit/Scripts/webkit/tests/TestWithEnabledIf.messages.in.
* Source/WebKit/Scripts/webkit/tests/TestWithValidatorMessageReceiver.cpp:
Added.
(WebKit::TestWithValidator::didReceiveMessage):
(IPC::jsValueForDecodedMessage<MessageName::TestWithValidator_AlwaysEnabled>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithValidator_EnabledIfPassValidation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithValidator_EnabledIfSomeFeatureEnabledAndPassValidation>):
* Source/WebKit/Scripts/webkit/tests/TestWithValidatorMessages.h: Renamed from
Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessages.h.
(Messages::TestWithValidator::messageReceiverName):
(Messages::TestWithValidator::AlwaysEnabled::name):
(Messages::TestWithValidator::AlwaysEnabled::AlwaysEnabled):
(Messages::TestWithValidator::AlwaysEnabled::arguments):
(Messages::TestWithValidator::EnabledIfPassValidation::name):
(Messages::TestWithValidator::EnabledIfPassValidation::EnabledIfPassValidation):
(Messages::TestWithValidator::EnabledIfPassValidation::arguments):
(Messages::TestWithValidator::EnabledIfSomeFeatureEnabledAndPassValidation::name):
(Messages::TestWithValidator::EnabledIfSomeFeatureEnabledAndPassValidation::EnabledIfSomeFeatureEnabledAndPassValidation):
(Messages::TestWithValidator::EnabledIfSomeFeatureEnabledAndPassValidation::arguments):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in:
* Source/WebKit/UIProcess/Extensions/WebExtensionController.messages.in:
Canonical link: https://commits.webkit.org/287014@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