Changeset 269278 in webkit
- Timestamp:
- Nov 2, 2020, 4:05:20 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKitLegacy/mac/ChangeLog
r269105 r269278 1 2020-11-02 Sam Weinig <weinig@apple.com> 2 3 [Testing] Match WebKitTestRunner and enable all "experimental" features in DumpRenderTree (cocoa) 4 https://bugs.webkit.org/show_bug.cgi?id=218447 5 6 Reviewed by Darin Adler. 7 8 * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.mm.erb: 9 * Scripts/PreferencesTemplates/WebPreferencesInternalFeatures.mm.erb: 10 * WebView/WebFeature.m: 11 (-[WebFeature initWithKey:preferencesKey:name:details:defaultValue:hidden:]): 12 (-[WebFeature initWithKey:name:details:defaultValue:hidden:]): Deleted. 13 * WebView/WebFeatureInternal.h: 14 Handle non-standard preference keys by ensure we initialize WebFeatures with the generated 15 preferenceKey accessor rather than trying to derive it from the key directly. 16 1 17 2020-10-28 Sam Weinig <weinig@apple.com> 2 18 -
trunk/Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.mm.erb
r268719 r269278 42 42 #if <%= @pref.condition %> 43 43 <%- end -%> 44 [[WebFeature alloc] initWithKey:@"<%= @pref.name %>" name:@<%= @pref.humanReadableName %> details:@<%= @pref.humanReadableDescription %> defaultValue:DEFAULT_VALUE_FOR_<%= @pref.name %> hidden:<%= @pref.hidden %>],44 [[WebFeature alloc] initWithKey:@"<%= @pref.name %>" preferenceKey:@"<%= @pref.preferenceKey %>" name:@<%= @pref.humanReadableName %> details:@<%= @pref.humanReadableDescription %> defaultValue:DEFAULT_VALUE_FOR_<%= @pref.name %> hidden:<%= @pref.hidden %>], 45 45 <%- if @pref.condition -%> 46 46 #endif -
trunk/Source/WebKitLegacy/mac/Scripts/PreferencesTemplates/WebPreferencesInternalFeatures.mm.erb
r268719 r269278 42 42 #if <%= @pref.condition %> 43 43 <%- end -%> 44 [[WebFeature alloc] initWithKey:@"<%= @pref.name %>" name:@<%= @pref.humanReadableName %> details:@<%= @pref.humanReadableDescription %> defaultValue:DEFAULT_VALUE_FOR_<%= @pref.name %> hidden:<%= @pref.hidden %>],44 [[WebFeature alloc] initWithKey:@"<%= @pref.name %>" preferenceKey:@"<%= @pref.preferenceKey %>" name:@<%= @pref.humanReadableName %> details:@<%= @pref.humanReadableDescription %> defaultValue:DEFAULT_VALUE_FOR_<%= @pref.name %> hidden:<%= @pref.hidden %>], 45 45 <%- if @pref.condition -%> 46 46 #endif -
trunk/Source/WebKitLegacy/mac/WebView/WebFeature.h
r267575 r269278 31 31 32 32 @property (nonatomic, readonly, copy) NSString *key; 33 @property (nonatomic, readonly, copy) NSString *preference sKey;33 @property (nonatomic, readonly, copy) NSString *preferenceKey; 34 34 @property (nonatomic, readonly, copy) NSString *name; 35 35 @property (nonatomic, readonly, copy) NSString *details; -
trunk/Source/WebKitLegacy/mac/WebView/WebFeature.m
r267575 r269278 28 28 @implementation WebFeature 29 29 30 - (instancetype)initWithKey:(NSString *)key name:(NSString *)name details:(NSString *)details defaultValue:(BOOL)defaultValue hidden:(BOOL)hidden30 - (instancetype)initWithKey:(NSString *)key preferenceKey:(NSString *)preferenceKey name:(NSString *)name details:(NSString *)details defaultValue:(BOOL)defaultValue hidden:(BOOL)hidden 31 31 { 32 32 if (!(self = [super init])) … … 34 34 35 35 _key = key; 36 _preference sKey = [@"WebKit" stringByAppendingString:_key];36 _preferenceKey = preferenceKey; 37 37 _name = name; 38 38 _details = details; -
trunk/Source/WebKitLegacy/mac/WebView/WebFeatureInternal.h
r267575 r269278 28 28 @interface WebFeature (Internal) 29 29 30 - (instancetype)initWithKey:(NSString *)key name:(NSString *)name details:(NSString *)details defaultValue:(BOOL)defaultValue hidden:(BOOL)hidden;30 - (instancetype)initWithKey:(NSString *)key preferenceKey:(NSString *)preferenceKey name:(NSString *)name details:(NSString *)details defaultValue:(BOOL)defaultValue hidden:(BOOL)hidden; 31 31 32 32 @end -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
r269105 r269278 2969 2969 - (BOOL)_isEnabledForFeature:(WebFeature *)feature 2970 2970 { 2971 return [self _boolValueForKey:feature.preference sKey];2971 return [self _boolValueForKey:feature.preferenceKey]; 2972 2972 } 2973 2973 2974 2974 - (void)_setEnabled:(BOOL)value forFeature:(WebFeature *)feature 2975 2975 { 2976 [self _setBoolValue:value forKey:feature.preference sKey];2976 [self _setBoolValue:value forKey:feature.preferenceKey]; 2977 2977 } 2978 2978 -
trunk/Tools/ChangeLog
r269269 r269278 1 2020-11-02 Sam Weinig <weinig@apple.com> 2 3 [Testing] Match WebKitTestRunner and enable all "experimental" features in DumpRenderTree (cocoa) 4 https://bugs.webkit.org/show_bug.cgi?id=218447 5 6 Reviewed by Darin Adler. 7 8 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 9 Add missing file, TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb. 10 11 * DumpRenderTree/mac/DumpRenderTree.mm: 12 (resetWebPreferencesToConsistentValues): 13 (enableExperimentalFeatures): Deleted. 14 Match WebKitTestRunner and enable all experimental features by default. Disable a few of them to 15 keep the current behavior, but added FIXME to figure out why they are exposed but not enabled. Also 16 ensure a few preferences that are not experimental features, but were in the enableExperimentalFeatures 17 function remain set. 18 1 19 2020-11-02 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
r269105 r269278 338 338 7C9893DE25433C8700354EBC /* TestOptionsGeneratedWebKitLegacyKeyMapping.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TestOptionsGeneratedWebKitLegacyKeyMapping.cpp; sourceTree = "<group>"; }; 339 339 7CBBC3221DDFCF9A00786B9D /* TestOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestOptions.h; sourceTree = "<group>"; }; 340 7CD4A69525507EF8007A5382 /* TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb; sourceTree = "<group>"; }; 340 341 7CFF9BBD2533BB240008009F /* TestFeatures.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestFeatures.h; sourceTree = "<group>"; }; 341 342 7CFF9BBE2533BB240008009F /* TestFeatures.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TestFeatures.cpp; sourceTree = "<group>"; }; … … 772 773 isa = PBXGroup; 773 774 children = ( 775 7CD4A69525507EF8007A5382 /* TestOptionsGeneratedWebKitLegacyKeyMapping.cpp.erb */, 774 776 7C44697F25377A020024290A /* TestOptionsGeneratedKeys.h.erb */, 775 777 ); -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r269236 r269278 809 809 } 810 810 811 static void enableExperimentalFeatures(WebPreferences* preferences)812 {813 // FIXME: SpringTimingFunction814 [preferences setGamepadsEnabled:YES];815 [preferences setHighlightAPIEnabled:YES];816 [preferences setLinkPreloadEnabled:YES];817 [preferences setMediaPreloadingEnabled:YES];818 // FIXME: InputEvents819 [preferences setFetchAPIKeepAliveEnabled:YES];820 [preferences setWebAnimationsCompositeOperationsEnabled:YES];821 [preferences setWebAnimationsMutableTimelinesEnabled:YES];822 [preferences setCSSCustomPropertiesAndValuesEnabled:YES];823 [preferences setWebGL2Enabled:YES];824 [preferences setCacheAPIEnabled:NO];825 [preferences setReadableByteStreamAPIEnabled:YES];826 [preferences setWritableStreamAPIEnabled:YES];827 [preferences setTransformStreamAPIEnabled:YES];828 [preferences setEncryptedMediaAPIEnabled:YES];829 [preferences setAccessibilityObjectModelEnabled:YES];830 [preferences setAriaReflectionEnabled:YES];831 [preferences setVisualViewportAPIEnabled:YES];832 [preferences setColorFilterEnabled:YES];833 [preferences setServerTimingEnabled:YES];834 [preferences setIntersectionObserverEnabled:YES];835 [preferences setSourceBufferChangeTypeEnabled:YES];836 [preferences setCSSOMViewScrollingAPIEnabled:YES];837 [preferences setMediaRecorderEnabled:YES];838 [preferences setReferrerPolicyAttributeEnabled:YES];839 [preferences setLinkPreloadResponsiveImagesEnabled:YES];840 [preferences setAspectRatioOfImgFromWidthAndHeightEnabled:YES];841 [preferences setCSSOMViewSmoothScrollingEnabled:YES];842 [preferences setAudioWorkletEnabled:YES];843 [preferences _setSpeechRecognitionEnabled:YES];844 845 for (WebFeature* feature in [WebPreferences _experimentalFeatures]) {846 if ([feature.key isEqual:@"MediaSessionEnabled"])847 [preferences _setEnabled:YES forFeature:feature];848 }849 }850 851 811 // Called before each test. 852 812 static void resetWebPreferencesToConsistentValues(WebPreferences *preferences) 853 813 { 854 enableExperimentalFeatures(preferences); 814 for (WebFeature *feature in [WebPreferences _experimentalFeatures]) 815 [preferences _setEnabled:YES forFeature:feature]; 816 817 // FIXME: These experimental features are currently the only ones not enabled for WebKitLegacy, we 818 // should either enable them or stop exposing them (as we do with with preferences like HTTP3Enabled). 819 [preferences _setBoolPreferenceForTestingWithValue:NO forKey:@"WebKitWebAuthenticationEnabled"]; 820 [preferences _setBoolPreferenceForTestingWithValue:NO forKey:@"WebKitIsLoggedInAPIEnabled"]; 821 [preferences _setBoolPreferenceForTestingWithValue:NO forKey:@"WebKitGenericCueAPIEnabled"]; 822 [preferences _setBoolPreferenceForTestingWithValue:NO forKey:@"WebKitLazyImageLoadingEnabled"]; 823 [preferences _setBoolPreferenceForTestingWithValue:NO forKey:@"WebKitLazyIframeLoadingEnabled"]; 855 824 856 825 [preferences setStandardFontFamily:@"Times"]; … … 912 881 #endif 913 882 [preferences setWebAudioEnabled:YES]; 914 [preferences setModernUnprefixedWebAudioEnabled:YES];915 883 [preferences setMediaSourceEnabled:YES]; 916 884 [preferences setSourceBufferChangeTypeEnabled:YES]; 917 885 [preferences setDataTransferItemsEnabled:YES]; 918 886 [preferences setCustomPasteboardDataEnabled:YES]; 919 [preferences setDialogElementEnabled:YES];920 [preferences setWebGL2Enabled:YES];921 887 [preferences setDownloadAttributeEnabled:YES]; 922 888 [preferences setDirectoryUploadEnabled:YES]; 923 889 [preferences setHiddenPageDOMTimerThrottlingEnabled:NO]; 924 890 [preferences setHiddenPageCSSAnimationSuspensionEnabled:NO]; 925 [preferences setRemotePlaybackEnabled:YES];926 891 [preferences setMediaDevicesEnabled:YES]; 927 892 [preferences setLargeImageAsyncDecodingEnabled:NO]; … … 929 894 [preferences setMediaCapabilitiesEnabled:YES]; 930 895 [preferences setSelectionAcrossShadowBoundariesEnabled:YES]; 931 932 896 [preferences setWebSQLEnabled:YES]; 933 [preferences _setMediaRecorderEnabled:YES]; 897 [preferences setEncryptedMediaAPIEnabled:YES]; 898 [preferences setGamepadsEnabled:YES]; 899 [preferences setLinkPreloadEnabled:YES]; 900 [preferences setMediaPreloadingEnabled:YES]; 901 [preferences setColorFilterEnabled:YES]; 934 902 935 903 [WebPreferences _clearNetworkLoaderSession];
Note:
See TracChangeset
for help on using the changeset viewer.