New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a 'status' field to feature flags denoting their use case #6945
Add a 'status' field to feature flags denoting their use case #6945
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there is no new input file yet, so I imagine the new ruby code doesn't run as part of the build. So this seems safe to land without affecting other work.
statuses = ["embedder", "unstable", "internal", "developer", "testable", "preview", "stable"] | ||
options["status"] ||= defaultStatus | ||
if !statuses.include? options["status"] | ||
raise "ERROR: #{options["status"]} not one of the known statuses: #{statuses}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this logging -- I was worried about typos!
5dbe895
to
72ad7c4
Compare
https://bugs.webkit.org/show_bug.cgi?id=247926 rdar://92112770 Reviewed by Brent Fulgham. Add enum types representing different semantic labels for feature flags. Add status fields to our various feature flag types: - Cross-platform WebKit: API::ExperimentalFeature.status() and API::InternalDebugFeature.status() - Cocoa WebKit SPI: -[_WKExperimentalFeature status] and -[_WKInternalDebugFeature status] - WebKitLegacy: -[WebFeature status] Update GeneratePreferences.rb to read a "status" field from WebPreferences yamls, and update its templates to pass this through to the feature instantiation site. Currently, individual preferences do not declare their own status; instead, the generator picks an appropriate status based on which file the preference is declared in. Eventually, we will merge these files into a single preferences manifest, and use the status field to determine where a feature gets exposed. * Source/WTF/Scripts/GeneratePreferences.rb: * Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb: * Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb: * Source/WebKit/UIProcess/API/APIExperimentalFeature.cpp: (API::ExperimentalFeature::create): (API::ExperimentalFeature::ExperimentalFeature): * Source/WebKit/UIProcess/API/APIExperimentalFeature.h: * Source/WebKit/UIProcess/API/APIFeatureStatus.h: Copied from Source/WebKitLegacy/mac/WebView/WebFeatureInternal.h. * Source/WebKit/UIProcess/API/APIInternalDebugFeature.cpp: (API::InternalDebugFeature::create): (API::InternalDebugFeature::InternalDebugFeature): * Source/WebKit/UIProcess/API/APIInternalDebugFeature.h: * Source/WebKit/UIProcess/API/Cocoa/_WKExperimentalFeature.h: * Source/WebKit/UIProcess/API/Cocoa/_WKExperimentalFeature.mm: (-[_WKExperimentalFeature status]): * Source/WebKit/UIProcess/API/Cocoa/_WKInternalDebugFeature.h: * Source/WebKit/UIProcess/API/Cocoa/_WKInternalDebugFeature.mm: (-[_WKInternalDebugFeature status]): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.mm.erb: * Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesInternalFeatures.mm.erb: * Source/WebKitLegacy/mac/WebView/WebFeature.h: * Source/WebKitLegacy/mac/WebView/WebFeature.m: (-[WebFeature initWithKey:preferenceKey:name:status:details:defaultValue:hidden:]): (-[WebFeature initWithKey:preferenceKey:name:details:defaultValue:hidden:]): Deleted. * Source/WebKitLegacy/mac/WebView/WebFeatureInternal.h: Canonical link: https://commits.webkit.org/257166@main
72ad7c4
to
429cc4c
Compare
Committed 257166@main (429cc4c): https://commits.webkit.org/257166@main Reviewed commits have been landed. Closing PR #6945 and removing active labels. |
429cc4c
5dbe895
π gtkπ§ͺ ios-wk2π§ͺ api-macπ§ͺ api-gtkπ§ͺ mac-wk1π§ͺ mac-wk2π§ͺ mac-AS-debug-wk2