Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5e67bf829346a5749941af115204310fe331e256
https://github.com/WebKit/WebKit/commit/5e67bf829346a5749941af115204310fe331e256
Author: Yury Semikhatsky <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
A LayoutTests/inspector/page/overrideSetting-FullScreenEnabled-expected.txt
A LayoutTests/inspector/page/overrideSetting-FullScreenEnabled.html
A
LayoutTests/inspector/page/overrideSetting-NotificationsEnabled-expected.txt
A LayoutTests/inspector/page/overrideSetting-NotificationsEnabled.html
A LayoutTests/inspector/page/overrideSetting-PointerLockEnabled-expected.txt
A LayoutTests/inspector/page/overrideSetting-PointerLockEnabled.html
M LayoutTests/inspector/page/overrideSetting-expected.txt
M LayoutTests/inspector/page/overrideSetting.html
M LayoutTests/platform/wpe/TestExpectations
M Source/JavaScriptCore/inspector/protocol/Page.json
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/inspector/agents/InspectorPageAgent.cpp
M Source/WebCore/inspector/agents/InspectorPageAgent.h
M Source/WebCore/page/Settings.yaml
Log Message:
-----------
Web Inspector: support overriding more page settings via Page.overrideSetting
https://bugs.webkit.org/show_bug.cgi?id=318270
Reviewed by Devin Rousso.
Web Inspector can only override a fixed set of page Settings via
Page.overrideSetting. Extend that set with seven additional boolean settings:
FixedBackgroundsPaintRelativeToDocument, FullScreenEnabled,
InputTypeMonthEnabled, InputTypeWeekEnabled, NotificationsEnabled,
PointerLockEnabled and PushAPIEnabled.
FixedBackgroundsPaintRelativeToDocument, InputTypeMonthEnabled and
InputTypeWeekEnabled are consumed through their Settings getters, so they use
the existing inspectorOverride mechanism: the generated
set<Name>InspectorOverride accessor, reset in disable() when the frontend
disconnects.
FullScreenEnabled, NotificationsEnabled, PointerLockEnabled and PushAPIEnabled
gate DOM API exposure through [EnabledBySetting], whose generated bindings read
the raw Settings value via settingsValues() rather than the getter. The
set<Name>InspectorOverride accessor does not affect that value, so overriding
those settings has no effect. Override them by writing the setting value
directly instead, remembering the original value so it can be restored when the
override is cleared or the agent is disabled. Settings gated by a feature flag
keep their #if guard inside the switch branch so the Page.Setting enum stays
exhaustive on ports where the feature is disabled.
Settings whose DOM API is gated behind a feature flag are covered by their own
layout tests so each can be skipped on ports where the feature is compiled out
(PointerLock on WPE); the rest are exercised by overrideSetting.html.
* Source/JavaScriptCore/inspector/protocol/Page.json:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::overrideSettingByModifyingValue):
(WebCore::InspectorPageAgent::overrideSetting):
* Source/WebCore/inspector/agents/InspectorPageAgent.h:
* Source/WebCore/page/Settings.yaml:
* LayoutTests/inspector/page/overrideSetting.html:
* LayoutTests/inspector/page/overrideSetting-expected.txt:
* LayoutTests/inspector/page/overrideSetting-FullScreenEnabled.html: Added.
* LayoutTests/inspector/page/overrideSetting-FullScreenEnabled-expected.txt:
Added.
* LayoutTests/inspector/page/overrideSetting-NotificationsEnabled.html: Added.
* LayoutTests/inspector/page/overrideSetting-NotificationsEnabled-expected.txt:
Added.
* LayoutTests/inspector/page/overrideSetting-PointerLockEnabled.html: Added.
* LayoutTests/inspector/page/overrideSetting-PointerLockEnabled-expected.txt:
Added.
* LayoutTests/platform/wpe/TestExpectations:
Canonical link: https://commits.webkit.org/317062@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications