Changeset 258482 in webkit


Ignore:
Timestamp:
Mar 15, 2020 6:17:03 PM (4 years ago)
Author:
Chris Dumez
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:
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r258480 r258482  
     12020-03-15  Chris Dumez  <cdumez@apple.com>
     2
     3        [DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOptions::enableBackForwardCache
     4        https://bugs.webkit.org/show_bug.cgi?id=207481
     5        <rdar://problem/59331661>
     6
     7        Reviewed by Darin Adler.
     8
     9        Add a support for a new excludeFromInternalSetting option in Settings.yaml and use it for
     10        'usesBackForwardCache' setting. This means that script will no longer be able to toggle
     11        this particular setting via internals.settings JS API. Tests wanting to turn on the
     12        back / forward cache are supposed to use the following:
     13        <!-- webkit-test-runner [ enableBackForwardCache=true ] -->
     14
     15        Using internals.settings JS API to turn on the back/forward cache would not work well
     16        with WebKit2 because of process-swap-on-navigation. Support for it in WK1 / DRT was
     17        causing flakiness because of a conflict between the 2 ways of enabling the setting.
     18
     19        * Scripts/GenerateSettings.rb:
     20        * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb:
     21        * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb:
     22        * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb:
     23        * page/Settings.yaml:
     24
    1252020-03-15  Zalan Bujtas  <zalan@apple.com>
    226
  • trunk/Source/WebCore/Scripts/GenerateSettings.rb

    r251298 r258482  
    6666  attr_accessor :type
    6767  attr_accessor :initial
     68  attr_accessor :excludeFromInternalSettings
    6869  attr_accessor :conditional
    6970  attr_accessor :onChange
     
    7576    @type = opts["type"] || "bool"
    7677    @initial = opts["initial"]
     78    @excludeFromInternalSettings = opts["excludeFromInternalSettings"] || false
    7779    @conditional = opts["conditional"]
    7880    @onChange = opts["onChange"]
  • trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb

    r223828 r258482  
    3737    : m_page(page)
    3838<%- for @setting in @settings do -%>
    39 <%- if @setting.idlType -%>
     39<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
    4040<%- if @setting.conditional -%>
    4141#if ENABLE(<%= @setting.conditional %>)
     
    5757{
    5858<%- for @setting in @settings do -%>
    59 <%- if @setting.idlType -%>
     59<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
    6060<%- if @setting.conditional -%>
    6161#if ENABLE(<%= @setting.conditional %>)
     
    7070
    7171<%- for @setting in @settings do -%>
    72 <%- if @setting.idlType -%>
     72<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
    7373void InternalSettingsGenerated::<%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>)
    7474{
  • trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb

    r223828 r258482  
    4343
    4444<%- for @setting in @settings do -%>
    45 <%- if @setting.idlType -%>
     45<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
    4646    void <%= @setting.setterFunctionName %>(<%= @setting.parameterType %> <%= @setting.name %>);
    4747<%- end -%>
     
    5252
    5353<%- for @setting in @settings do -%>
    54 <%- if @setting.idlType -%>
     54<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
    5555<%- if @setting.conditional -%>
    5656#if ENABLE(<%= @setting.conditional %>)
  • trunk/Source/WebCore/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb

    r223828 r258482  
    3131] interface InternalSettingsGenerated {
    3232<%- for @setting in @settings do -%>
    33 <%- if @setting.idlType -%>
     33<%- if @setting.excludeFromInternalSettings == false and @setting.idlType -%>
    3434    void <%= @setting.setterFunctionName %>(<%= @setting.idlType %> <%= @setting.name %>);
    3535<%- end -%>
  • trunk/Source/WebCore/page/Settings.yaml

    r258268 r258482  
    748748  initial: false
    749749  onChange: usesBackForwardCacheChanged
     750  excludeFromInternalSettings: true
    750751
    751752dnsPrefetchingEnabled:
Note: See TracChangeset for help on using the changeset viewer.