- Revision
- 229680
- Author
- [email protected]
- Date
- 2018-03-16 13:06:58 -0700 (Fri, 16 Mar 2018)
Log Message
Make Fullscreen API an Experimental Feature
https://bugs.webkit.org/show_bug.cgi?id=183662
Reviewed by Jon Lee.
Source/WebCore:
The Fullscreen APIs should be guarded by a Setting, so they are not present in the DOM when the
Experimental Feature is disabled.
* dom/Document.idl:
* dom/Element.idl:
Source/WebKit:
Add the ability to have a conditional for whether an Experimental Feature is "visible", separate from
whether the preference is available, for definining platform-specific Experimental Features.
* Scripts/GeneratePreferences.rb:
* Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
* Shared/WebPreferences.yaml:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (229679 => 229680)
--- trunk/Source/WebCore/ChangeLog 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebCore/ChangeLog 2018-03-16 20:06:58 UTC (rev 229680)
@@ -1,3 +1,16 @@
+2018-03-16 Jer Noble <[email protected]>
+
+ Make Fullscreen API an Experimental Feature
+ https://bugs.webkit.org/show_bug.cgi?id=183662
+
+ Reviewed by Jon Lee.
+
+ The Fullscreen APIs should be guarded by a Setting, so they are not present in the DOM when the
+ Experimental Feature is disabled.
+
+ * dom/Document.idl:
+ * dom/Element.idl:
+
2018-03-16 Megan Gardner <[email protected]>
Ensure that style is updated when the effective appearance changes
Modified: trunk/Source/WebCore/dom/Document.idl (229679 => 229680)
--- trunk/Source/WebCore/dom/Document.idl 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebCore/dom/Document.idl 2018-03-16 20:06:58 UTC (rev 229680)
@@ -144,15 +144,15 @@
// Extensions from FullScreen API (https://fullscreen.spec.whatwg.org/#api).
// FIXME: Should probably be unprefixed.
- [Conditional=FULLSCREEN_API] readonly attribute boolean webkitFullscreenEnabled;
- [Conditional=FULLSCREEN_API, ImplementedAs=webkitFullscreenElementForBindings] readonly attribute Element? webkitFullscreenElement;
- [Conditional=FULLSCREEN_API] void webkitExitFullscreen();
- [Conditional=FULLSCREEN_API] readonly attribute boolean webkitIsFullScreen; // Mozilla version.
- [Conditional=FULLSCREEN_API] readonly attribute boolean webkitFullScreenKeyboardInputAllowed; // Mozilla version.
- [Conditional=FULLSCREEN_API, ImplementedAs=webkitCurrentFullScreenElementForBindings] readonly attribute Element webkitCurrentFullScreenElement; // Mozilla version.
- [Conditional=FULLSCREEN_API] void webkitCancelFullScreen(); // Mozilla version.
- [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenchange;
- [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenerror;
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] readonly attribute boolean webkitFullscreenEnabled;
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitFullscreenElementForBindings] readonly attribute Element? webkitFullscreenElement;
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] void webkitExitFullscreen();
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] readonly attribute boolean webkitIsFullScreen; // Mozilla version.
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] readonly attribute boolean webkitFullScreenKeyboardInputAllowed; // Mozilla version.
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitCurrentFullScreenElementForBindings] readonly attribute Element webkitCurrentFullScreenElement; // Mozilla version.
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] void webkitCancelFullScreen(); // Mozilla version.
+ [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenchange;
+ [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenerror;
// Extensions from Pointer Lock API (https://www.w3.org/TR/pointerlock/#extensions-to-the-document-interface).
[NotEnumerable, Conditional=POINTER_LOCK] attribute EventHandler onpointerlockchange; // FIXME: Should be enumerable.
Modified: trunk/Source/WebCore/dom/Element.idl (229679 => 229680)
--- trunk/Source/WebCore/dom/Element.idl 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebCore/dom/Element.idl 2018-03-16 20:06:58 UTC (rev 229680)
@@ -94,8 +94,8 @@
// Extensions from Full Screen API (https://fullscreen.spec.whatwg.org/#api).
// FIXME: Should we add unprefixed versions?
- [Conditional=FULLSCREEN_API, ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen(); // Prefixed Mozilla version.
- [Conditional=FULLSCREEN_API] void webkitRequestFullscreen(); // Prefixed W3C version.
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen(); // Prefixed Mozilla version.
+ [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] void webkitRequestFullscreen(); // Prefixed W3C version.
// Extensions from Pointer Lock API (https://w3c.github.io/pointerlock/#extensions-to-the-element-interface).
[Conditional=POINTER_LOCK] void requestPointerLock();
@@ -119,8 +119,8 @@
[NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend;
// FIXME: These event handlers should only be on Document (https://fullscreen.spec.whatwg.org/#api).
- [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenchange;
- [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventHandler onwebkitfullscreenerror;
+ [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenchange;
+ [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenerror;
// FIXME: Cannot find those EventHandlers in the latest specification (https://w3c.github.io/uievents/#events-focus-types).
[NotEnumerable] attribute EventHandler onfocusin;
Modified: trunk/Source/WebKit/ChangeLog (229679 => 229680)
--- trunk/Source/WebKit/ChangeLog 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebKit/ChangeLog 2018-03-16 20:06:58 UTC (rev 229680)
@@ -1,3 +1,17 @@
+2018-03-16 Jer Noble <[email protected]>
+
+ Make Fullscreen API an Experimental Feature
+ https://bugs.webkit.org/show_bug.cgi?id=183662
+
+ Reviewed by Jon Lee.
+
+ Add the ability to have a conditional for whether an Experimental Feature is "visible", separate from
+ whether the preference is available, for definining platform-specific Experimental Features.
+
+ * Scripts/GeneratePreferences.rb:
+ * Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
+ * Shared/WebPreferences.yaml:
+
2018-03-16 Megan Gardner <[email protected]>
Ensure that style is updated when the effective appearance changes
Modified: trunk/Source/WebKit/Scripts/GeneratePreferences.rb (229679 => 229680)
--- trunk/Source/WebKit/Scripts/GeneratePreferences.rb 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebKit/Scripts/GeneratePreferences.rb 2018-03-16 20:06:58 UTC (rev 229680)
@@ -70,6 +70,7 @@
attr_accessor :category
attr_accessor :webcoreBinding
attr_accessor :condition
+ attr_accessor :visibleCondition
def initialize(name, opts)
@name = name
@@ -82,6 +83,7 @@
@webcoreBinding = opts["webcoreBinding"]
@webcoreName = opts["webcoreName"]
@condition = opts["condition"]
+ @visibleCondition = opts["visibleCondition"]
end
def nameLower
Modified: trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb (229679 => 229680)
--- trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb 2018-03-16 20:06:58 UTC (rev 229680)
@@ -53,7 +53,13 @@
<%- if @pref.condition -%>
#if <%= @pref.condition %>
<%- end -%>
+<%- if @pref.visibleCondition -%>
+#if <%= @pref.visibleCondition %>
+<%- end -%>
API::ExperimentalFeature::create(<%= @pref.humanReadableName %>, "<%= @pref.name %>", <%= @pref.humanReadableDescription %>, <%= @pref.defaultValue %>),
+<%- if @pref.visibleCondition -%>
+#endif
+<%- end -%>
<%- if @pref.condition -%>
#endif
<%- end -%>
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (229679 => 229680)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-03-16 18:47:44 UTC (rev 229679)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-03-16 20:06:58 UTC (rev 229680)
@@ -167,6 +167,10 @@
type: bool
defaultValue: false
condition: ENABLE(FULLSCREEN_API)
+ visibleCondition: PLATFORM(IOS)
+ humanReadableName: "Fullscreen API"
+ humanReadableDescription: "Fullscreen API"
+ category: experimental
AsynchronousSpellCheckingEnabled:
type: bool
@@ -1203,3 +1207,4 @@
humanReadableDescription: "Intelligent Tracking Prevention Debug Mode"
category: experimental
webcoreBinding: RuntimeEnabledFeatures
+