Title: [258482] trunk/Source/WebCore
Revision
258482
Author
[email protected]
Date
2020-03-15 18:17:03 -0700 (Sun, 15 Mar 2020)

Log Message

[DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOptions::enableBackForwardCache
https://bugs.webkit.org/show_bug.cgi?id=207481
<rdar://problem/59331661>

Reviewed by Darin Adler.

Add a support for a new excludeFromInternalSetting option in Settings.yaml and use it for
'usesBackForwardCache' setting. This means that script will no longer be able to toggle
this particular setting via internals.settings JS API. Tests wanting to turn on the
back / forward cache are supposed to use the following:
<!-- webkit-test-runner [ enableBackForwardCache=true ] -->

Using internals.settings JS API to turn on the back/forward cache would not work well
with WebKit2 because of process-swap-on-navigation. Support for it in WK1 / DRT was
causing flakiness because of a conflict between the 2 ways of enabling the setting.

* Scripts/GenerateSettings.rb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
* Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
* page/Settings.yaml:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (258481 => 258482)


--- trunk/Source/WebCore/ChangeLog	2020-03-15 21:28:27 UTC (rev 258481)
+++ trunk/Source/WebCore/ChangeLog	2020-03-16 01:17:03 UTC (rev 258482)
@@ -1,3 +1,27 @@
+2020-03-15  Chris Dumez  <[email protected]>
+
+        [DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOptions::enableBackForwardCache
+        https://bugs.webkit.org/show_bug.cgi?id=207481
+        <rdar://problem/59331661>
+
+        Reviewed by Darin Adler.
+
+        Add a support for a new excludeFromInternalSetting option in Settings.yaml and use it for
+        'usesBackForwardCache' setting. This means that script will no longer be able to toggle
+        this particular setting via internals.settings JS API. Tests wanting to turn on the
+        back / forward cache are supposed to use the following:
+        <!-- webkit-test-runner [ enableBackForwardCache=true ] -->
+
+        Using internals.settings JS API to turn on the back/forward cache would not work well
+        with WebKit2 because of process-swap-on-navigation. Support for it in WK1 / DRT was
+        causing flakiness because of a conflict between the 2 ways of enabling the setting.
+
+        * Scripts/GenerateSettings.rb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
+        * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
+        * page/Settings.yaml:
+
 2020-03-15  Zalan Bujtas  <[email protected]>
 
         [LFC][TFC] Add basic column span support for content box width

Modified: trunk/Source/WebCore/Scripts/GenerateSettings.rb (258481 => 258482)


--- trunk/Source/WebCore/Scripts/GenerateSettings.rb	2020-03-15 21:28:27 UTC (rev 258481)
+++ trunk/Source/WebCore/Scripts/GenerateSettings.rb	2020-03-16 01:17:03 UTC (rev 258482)
@@ -65,6 +65,7 @@
   attr_accessor :name
   attr_accessor :type
   attr_accessor :initial
+  attr_accessor :excludeFromInternalSettings
   attr_accessor :conditional
   attr_accessor :onChange
   attr_accessor :getter
@@ -74,6 +75,7 @@
     @name = name
     @type = opts["type"] || "bool"
     @initial = opts["initial"]
+    @excludeFromInternalSettings = opts["excludeFromInternalSettings"] || false
     @conditional = opts["conditional"]
     @_onChange_ = opts["onChange"]
     @getter = opts["getter"]

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb (258481 => 258482)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb	2020-03-15 21:28:27 UTC (rev 258481)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb	2020-03-16 01:17:03 UTC (rev 258482)
@@ -36,7 +36,7 @@
 InternalSettingsGenerated::InternalSettingsGenerated(Page* page)
     : m_page(page)
 <%- for @setting in @settings do -%>
-<%- if @setting.idlType -%>
+<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 <%- if @setting.conditional -%>
 #if ENABLE(<%= @setting.conditional %>)
 <%- end -%>
@@ -56,7 +56,7 @@
 void InternalSettingsGenerated::resetToConsistentState()
 {
 <%- for @setting in @settings do -%>
-<%- if @setting.idlType -%>
+<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 <%- if @setting.conditional -%>
 #if ENABLE(<%= @setting.conditional %>)
 <%- end -%>
@@ -69,7 +69,7 @@
 }
 
 <%- for @setting in @settings do -%>
-<%- if @setting.idlType -%>
+<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 void InternalSettingsGenerated::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
 {
 <%- if @setting.conditional -%>

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb (258481 => 258482)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb	2020-03-15 21:28:27 UTC (rev 258481)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb	2020-03-16 01:17:03 UTC (rev 258482)
@@ -42,7 +42,7 @@
     void resetToConsistentState();
 
 <%- for @setting in @settings do -%>
-<%- if @setting.idlType -%>
+<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
     void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>);
 <%- end -%>
 <%- end -%>
@@ -51,7 +51,7 @@
     Page* m_page;
 
 <%- for @setting in @settings do -%>
-<%- if @setting.idlType -%>
+<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
 <%- if @setting.conditional -%>
 #if ENABLE(<%= @setting.conditional %>)
 <%- end -%>

Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb (258481 => 258482)


--- trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb	2020-03-15 21:28:27 UTC (rev 258481)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb	2020-03-16 01:17:03 UTC (rev 258482)
@@ -30,7 +30,7 @@
     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
 ] interface InternalSettingsGenerated {
 <%- for @setting in @settings do -%>
-<%- if @setting.idlType -%>
+<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
     void <%= @setting.setterFunctionName %>(<%= @setting.idlType %> <%= @setting.name %>);
 <%- end -%>
 <%- end -%>

Modified: trunk/Source/WebCore/page/Settings.yaml (258481 => 258482)


--- trunk/Source/WebCore/page/Settings.yaml	2020-03-15 21:28:27 UTC (rev 258481)
+++ trunk/Source/WebCore/page/Settings.yaml	2020-03-16 01:17:03 UTC (rev 258482)
@@ -747,6 +747,7 @@
 usesBackForwardCache:
   initial: false
   onChange: usesBackForwardCacheChanged
+  excludeFromInternalSettings: true
 
 dnsPrefetchingEnabled:
   initial: false
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to