Changeset 233771 in webkit
- Timestamp:
- Jul 12, 2018 10:03:41 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r233770 r233771 1 2018-07-12 Jer Noble <jer.noble@apple.com> 2 3 REGRESSION (r230163): Videos cannot be seen full screen in Complete Anatomy app 4 https://bugs.webkit.org/show_bug.cgi?id=187527 5 <rdar://problem/40511527> 6 7 Reviewed by Ryosuke Niwa. 8 9 Do not enable element fullscreen mode unless apps specifically opt-in. The Fullscreen API is 10 an experimental feature on iOS, but not on Mac, but we can't simply not return the ExperimentalFeature 11 object from the list of experimental features, as this keeps Safari from being able to apply a 12 NSUserDefault value for that feature. Instead, add a property to API::ExperimentalFeature and 13 _WKExperimentalFeature called "hidden", which signals to clients whether to display the feature 14 in their UI. 15 16 * Scripts/GeneratePreferences.rb: 17 * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb: 18 * Shared/WebPreferences.yaml: 19 * Shared/WebPreferencesDefaultValues.h: 20 * UIProcess/API/APIExperimentalFeature.cpp: 21 (API::ExperimentalFeature::create): 22 (API::ExperimentalFeature::ExperimentalFeature): 23 * UIProcess/API/APIExperimentalFeature.h: 24 * UIProcess/API/Cocoa/_WKExperimentalFeature.h: 25 * UIProcess/API/Cocoa/_WKExperimentalFeature.mm: 26 (-[_WKExperimentalFeature isHidden]): 27 1 28 2018-07-12 Alexey Proskuryakov <ap@apple.com> 2 29 -
trunk/Source/WebKit/Scripts/GeneratePreferences.rb
r229680 r233771 71 71 attr_accessor :webcoreBinding 72 72 attr_accessor :condition 73 attr_accessor : visibleCondition73 attr_accessor :hidden 74 74 75 75 def initialize(name, opts) … … 84 84 @webcoreName = opts["webcoreName"] 85 85 @condition = opts["condition"] 86 @ visibleCondition = opts["visibleCondition"]86 @hidden = opts["hidden"] || false 87 87 end 88 88 -
trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
r229680 r233771 54 54 #if <%= @pref.condition %> 55 55 <%- end -%> 56 <%- if @pref.visibleCondition -%> 57 #if <%= @pref.visibleCondition %> 58 <%- end -%> 59 API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>), 60 <%- if @pref.visibleCondition -%> 61 #endif 62 <%- end -%> 56 API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>, <%= @pref.hidden %>), 63 57 <%- if @pref.condition -%> 64 58 #endif -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r233746 r233771 1269 1269 FullScreenEnabled: 1270 1270 type: bool 1271 defaultValue: DEFAULT_ENABLE_FULLSCREEN_API1271 defaultValue: false 1272 1272 condition: ENABLE(FULLSCREEN_API) 1273 visibleCondition: PLATFORM(IOS)1273 hidden: EXPERIMENTAL_FULLSCREEN_API_HIDDEN 1274 1274 humanReadableName: "Fullscreen API" 1275 1275 humanReadableDescription: "Fullscreen API" -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h
r233203 r233771 76 76 #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true 77 77 #define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 1 78 #define DEFAULT_ENABLE_FULLSCREEN_APIfalse78 #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN false 79 79 #else 80 80 #define DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK false … … 95 95 #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK false 96 96 #define DEFAULT_INTERACTIVE_MEDIA_CAPTURE_STREAM_REPROMPT_INTERVAL_IN_MINUTES 10 97 #define DEFAULT_ENABLE_FULLSCREEN_APItrue97 #define EXPERIMENTAL_FULLSCREEN_API_HIDDEN true 98 98 #endif 99 99 -
trunk/Source/WebKit/UIProcess/API/APIExperimentalFeature.cpp
r209443 r233771 29 29 namespace API { 30 30 31 Ref<ExperimentalFeature> ExperimentalFeature::create(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue )31 Ref<ExperimentalFeature> ExperimentalFeature::create(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue, bool hidden) 32 32 { 33 return adoptRef(*new ExperimentalFeature(name, key, details, defaultValue ));33 return adoptRef(*new ExperimentalFeature(name, key, details, defaultValue, hidden)); 34 34 } 35 35 36 ExperimentalFeature::ExperimentalFeature(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue )36 ExperimentalFeature::ExperimentalFeature(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue, bool hidden) 37 37 : m_name(name) 38 38 , m_key(key) 39 39 , m_details(details) 40 40 , m_defaultValue(defaultValue) 41 , m_hidden(hidden) 41 42 { 42 43 } -
trunk/Source/WebKit/UIProcess/API/APIExperimentalFeature.h
r209443 r233771 34 34 class ExperimentalFeature final : public ObjectImpl<Object::Type::ExperimentalFeature> { 35 35 public: 36 static Ref<ExperimentalFeature> create(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue );36 static Ref<ExperimentalFeature> create(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue, bool hidden); 37 37 virtual ~ExperimentalFeature(); 38 38 … … 41 41 WTF::String details() const { return m_details; } 42 42 bool defaultValue() const { return m_defaultValue; } 43 bool isHidden() const { return m_hidden; } 43 44 44 45 private: 45 explicit ExperimentalFeature(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue );46 explicit ExperimentalFeature(const WTF::String& name, const WTF::String& key, const WTF::String& details, bool defaultValue, bool hidden); 46 47 47 48 WTF::String m_name; … … 49 50 WTF::String m_details; 50 51 bool m_defaultValue; 52 bool m_hidden; 51 53 }; 52 54 -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKExperimentalFeature.h
r209443 r233771 37 37 @property (nonatomic, readonly, copy) NSString *details; 38 38 @property (nonatomic, readonly) BOOL defaultValue; 39 @property (nonatomic, readonly, getter=isHidden) BOOL hidden; 39 40 40 41 @end -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKExperimentalFeature.mm
r209443 r233771 63 63 } 64 64 65 - (BOOL)isHidden 66 { 67 return _experimentalFeature->isHidden(); 68 } 69 65 70 #pragma mark WKObject protocol implementation 66 71
Note: See TracChangeset
for help on using the changeset viewer.