Skip to content

Commit

Permalink
MiniBrowser doesn't respect default enabled-ness of experimental and …
Browse files Browse the repository at this point in the history
…internal debug features

https://bugs.webkit.org/show_bug.cgi?id=189989

Reviewed by Simon Fraser.

When the preference isn't found in user defaults, use the default value of each feature's enabledness.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@236518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa@webkit.org committed Sep 26, 2018
1 parent e4df29d commit 5a7b63e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Tools/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2018-09-26 Ryosuke Niwa <rniwa@webkit.org>

MiniBrowser doesn't respect default enabled-ness of experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189989

Reviewed by Simon Fraser.

When the preference isn't found in user defaults, use the default value of each feature's enabledness.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):

2018-09-26 Philippe Normand <pnormand@igalia.com>

[Flatpak] Bump to apr 1.6.5
Expand Down
12 changes: 10 additions & 2 deletions Tools/MiniBrowser/mac/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,21 @@ - (void)awakeFromNib
#if WK_API_ENABLED
NSArray<_WKExperimentalFeature *> *experimentalFeatures = [WKPreferences _experimentalFeatures];
for (_WKExperimentalFeature *feature in experimentalFeatures) {
BOOL enabled = [[NSUserDefaults standardUserDefaults] boolForKey:feature.key];
BOOL enabled;
if ([[NSUserDefaults standardUserDefaults] objectForKey:feature.key])
enabled = [[NSUserDefaults standardUserDefaults] boolForKey:feature.key];
else
enabled = [feature defaultValue];
[configuration.preferences _setEnabled:enabled forExperimentalFeature:feature];
}

NSArray<_WKInternalDebugFeature *> *internalDebugFeatures = [WKPreferences _internalDebugFeatures];
for (_WKInternalDebugFeature *feature in internalDebugFeatures) {
BOOL enabled = [[NSUserDefaults standardUserDefaults] boolForKey:feature.key];
BOOL enabled;
if ([[NSUserDefaults standardUserDefaults] objectForKey:feature.key])
enabled = [[NSUserDefaults standardUserDefaults] boolForKey:feature.key];
else
enabled = [feature defaultValue];
[configuration.preferences _setEnabled:enabled forInternalDebugFeature:feature];
}
#endif
Expand Down

0 comments on commit 5a7b63e

Please sign in to comment.