# Copyright (c) 2020-2022 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.

# For internal features:
# The type should be boolean.
# They must include a humanReadableName and humanReadableDescription. This is
#   the text exposed to the user from the WebKit client.

AcceleratedFiltersEnabled:
  type: bool
  webcoreOnChange: setNeedsRelayoutAllFrames
  humanReadableName: "Accelerated Filter Rendering"
  humanReadableDescription: "Accelerated CSS and SVG filter rendering"
  condition: USE(CORE_IMAGE)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

# FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
AllowViewportShrinkToFitContent:
  type: bool
  humanReadableName: "Allow Viewport Shrink to Fit Content"
  humanReadableDescription: "Allow the viewport shrink to fit content heuristic when appropriate"
  condition: PLATFORM(IOS_FAMILY)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: true
    WebCore:
      default: true

AlternateWebMPlayerEnabled:
  type: bool
  humanReadableName: "Alternate WebM Player"
  humanReadableDescription: "Enable Alternate WebM Player"
  condition: ENABLE(ALTERNATE_WEBM_PLAYER)
  defaultValue:
    WebKitLegacy:
     default: false
    WebKit:
      default: false
    WebCore:
      default: false

AlwaysZoomOnDoubleTap:
  type: bool
  humanReadableName: "DTTZ always"
  humanReadableDescription: "Double taps zoom, even if we dispatched a click anywhere"
  webcoreBinding: none
  condition: PLATFORM(IOS_FAMILY)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: false

AsyncFrameScrollingEnabled:
  type: bool
  webcoreOnChange: setNeedsRelayoutAllFrames
  humanReadableName: "Async Frame Scrolling"
  humanReadableDescription: "Perform frame scrolling off the main thread"
  exposed: [ WebKit ]
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "USE(NICOSIA)": true
      "PLATFORM(COCOA)": true
      default: false
    WebCore:
      default: false

AsyncOverflowScrollingEnabled:
  type: bool
  webcoreOnChange: setNeedsRelayoutAllFrames
  humanReadableName: "Async Overflow Scrolling"
  humanReadableDescription: "Perform overflow scrolling off the main thread"
  exposed: [ WebKit ]
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "USE(NICOSIA)": true
      "PLATFORM(COCOA)": true
      default: false
    WebCore:
      default: false

AutomaticLiveResizeEnabled:
  type: bool
  humanReadableName: "Enable Automatic Live Resize"
  humanReadableDescription: "Automatically synchronize web view resize with painting"
  webcoreBinding: none
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      "HAVE(UIKIT_WEBKIT_INTERNALS)": true
      default: false

BlockIOKitInWebContentSandbox:
  type: bool
  humanReadableName: "IOKit blocking in the WebContent sandbox"
  humanReadableDescription: "Block IOKit access in the WebContent sandbox"
  webcoreBinding: none
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: true

CSSLogicalEnabled:
  type: bool
  humanReadableName: "CSS Logical Properties and Values"
  humanReadableDescription: "Enable CSS Logical Properties and Values"
  webcoreBinding: DeprecatedGlobalSettings
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false

CSSOMViewScrollingAPIEnabled:
  type: bool
  humanReadableName: "CSSOM View Scrolling API"
  humanReadableDescription: "Implement standard behavior for scrollLeft, scrollTop, scrollWidth, scrollHeight, scrollTo, scrollBy and scrollingElement."
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      "PLATFORM(IOS_FAMILY)": WebKit::defaultCSSOMViewScrollingAPIEnabled()
      default: true
    WebCore:
      default: false

CaptureAudioInGPUProcessEnabled:
  type: bool
  humanReadableName: "GPU Process: Audio Capture"
  humanReadableDescription: "Enable audio capture in GPU Process"
  webcoreBinding: none
  condition: ENABLE(MEDIA_STREAM)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: WebKit::defaultCaptureAudioInGPUProcessEnabled()

CaptureAudioInUIProcessEnabled:
  type: bool
  humanReadableName: "Capture audio in UI Process"
  humanReadableDescription: "Enable audio capture in UI Process"
  webcoreBinding: none
  condition: ENABLE(MEDIA_STREAM)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: WebKit::defaultCaptureAudioInUIProcessEnabled()

CaptureVideoInGPUProcessEnabled:
  type: bool
  humanReadableName: "GPU Process: Video Capture"
  humanReadableDescription: "Enable video capture in GPU Process"
  webcoreBinding: none
  condition: ENABLE(MEDIA_STREAM)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      "ENABLE(GPU_PROCESS_BY_DEFAULT)": true
      default: false

CaptureVideoInUIProcessEnabled:
  type: bool
  humanReadableName: "Capture video in UI Process"
  humanReadableDescription: "Enable video capture in UI Process"
  webcoreBinding: none
  condition: ENABLE(MEDIA_STREAM)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: false

CookieConsentAPIEnabled:
  type: bool
  humanReadableName: "Cookie Consent API"
  humanReadableDescription: "Enable cookie consent API"
  exposed: [ WebKit ]
  defaultValue:
    WebCore:
      default: false
    WebKitLegacy:
      default: false
    WebKit:
      default: false

DOMPasteAccessRequestsEnabled:
  type: bool
  humanReadableName: "DOM Paste Access Requests"
  humanReadableDescription: "Enable DOM Paste Access Requests"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(IOS) || PLATFORM(MAC)": true
      default: false
    WebCore:
      default: false

# FIXME: This is on by default in WebKit2 (for everything but WatchOS). Perhaps we should consider turning it on for WebKitLegacy as well.
DataListElementEnabled:
  type: bool
  humanReadableName: "DataList Element"
  humanReadableDescription: "Enable datalist elements"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(DATALIST_ELEMENT)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(WATCHOS)": false
      default: true

# FIXME: This is on by default in WebKit2 (for macOS at least). Perhaps we should consider turning it on for WebKitLegacy as well.
DateTimeInputsEditableComponentsEnabled:
  type: bool
  humanReadableName: "Date/Time inputs have editable components"
  humanReadableDescription: "Enable multiple editable components in date/time inputs"
  condition: ENABLE(DATE_AND_TIME_INPUT_TYPES)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(MAC) || PLATFORM(GTK)": true
      default: false
    WebCore:
      default: false

EnterKeyHintEnabled:
  type: bool
  humanReadableName: "Enter Key Hint"
  humanReadableDescription: "Enable the enterKeyHint HTML attribute"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(COCOA)": true
      default: false
    WebCore:
      default: false

EventHandlerDrivenSmoothKeyboardScrollingEnabled:
 type: bool
 humanReadableName: "EventHandler driven smooth keyboard scrolling"
 humanReadableDescription: "Enable EventHandler driven smooth keyboard scrolling"
 defaultValue:
  WebKitLegacy:
   default: false
  WebKit:
   default: false
  WebCore:
   default: false

FasterClicksEnabled:
  type: bool
  humanReadableName: "Fast clicks"
  humanReadableDescription: "Support faster clicks on zoomable pages"
  webcoreBinding: none
  condition: PLATFORM(IOS_FAMILY)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: true

FlexFormattingContextIntegrationEnabled:
  type: bool
  humanReadableName: "Next-generation flex layout integration (FFC)"
  humanReadableDescription: "Enable next-generation flex layout integration (FFC)"
  condition: ENABLE(LAYOUT_FORMATTING_CONTEXT)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

# FIXME: This should be reconciled with 'FrameFlattening' in WebPreferences.yaml .
FrameFlatteningEnabled:
  type: bool
  humanReadableName: "Frame flattening"
  humanReadableDescription: "Enable frame flattening, which adjusts the height of an iframe to fit its contents"
  webcoreBinding: custom
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      "PLATFORM(IOS_FAMILY)": true
      default: false

FullScreenEnabled:
  type: bool
  humanReadableName: "Fullscreen API"
  humanReadableDescription: "Fullscreen API"
  condition: ENABLE(FULLSCREEN_API)
  hidden: EXPERIMENTAL_FULLSCREEN_API_HIDDEN
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

GetUserMediaRequiresFocus:
  type: bool
  humanReadableName: "Require focus to start getUserMedia"
  humanReadableDescription: "Require focus to start getUserMedia"
  condition: ENABLE(MEDIA_STREAM)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true
    WebCore:
      default: true

ICECandidateFilteringEnabled:
  type: bool
  webcoreOnChange: iceCandidateFilteringEnabledChanged
  inspectorOverride: true
  humanReadableName: "Enable ICE Candidate Filtering"
  humanReadableDescription: "Enable ICE Candidate Filtering"
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true
    WebCore:
      default: true

IOSFormControlRefreshEnabled:
  type: bool
  humanReadableName: "iOS Form Control Refresh"
  humanReadableDescription: "Enable the new appearance for form controls on iOS"
  condition: ENABLE(IOS_FORM_CONTROL_REFRESH)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true
    WebCore:
      default: true

IPCTestingAPIEnabled:
  type: bool
  humanReadableName: "IPC Testing API"
  humanReadableDescription: "Enable IPC Testing API for JavaScript"
  webcoreBinding: none
  condition: ENABLE(IPC_TESTING_API)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: false

ImageAnalysisDuringFindInPageEnabled:
  type: bool
  humanReadableName: "Image Analysis for Find-in-Page"
  humanReadableDescription: "Trigger image analysis when performing Find-in-Page"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

InlineFormattingContextIntegrationEnabled:
  type: bool
  humanReadableName: "Next-generation inline layout integration (IFC)"
  humanReadableDescription: "Enable next-generation inline layout integration (IFC)"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(LAYOUT_FORMATTING_CONTEXT)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

InputTypeColorEnabled:
  type: bool
  humanReadableName: "Color Inputs"
  humanReadableDescription: "Enable input elements of type color"
  condition: ENABLE(INPUT_TYPE_COLOR)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(WATCHOS)": false
      default: true
    WebCore:
      default: false

InputTypeDateEnabled:
  type: bool
  humanReadableName: "Date Input"
  humanReadableDescription: "Enable input elements of type date"
  condition: ENABLE(INPUT_TYPE_DATE)
  defaultValue:
    WebKitLegacy:
      "PLATFORM(IOS_FAMILY)": true
      default: false
    WebKit:
      "PLATFORM(APPLETV)": false
      default: true
    WebCore:
      default: false

InputTypeDateTimeLocalEnabled:
  type: bool
  humanReadableName: "datetime-local Inputs"
  humanReadableDescription: "Enable input elements of type datetime-local"
  condition: ENABLE(INPUT_TYPE_DATETIMELOCAL)
  defaultValue:
    WebKitLegacy:
      "PLATFORM(IOS_FAMILY)": true
      default: false
    WebKit:
      "PLATFORM(APPLETV)": false
      default: true
    WebCore:
      default: false

InputTypeMonthEnabled:
  type: bool
  humanReadableName: "Month Input"
  humanReadableDescription: "Enable input elements of type month"
  condition: ENABLE(INPUT_TYPE_MONTH)
  defaultValue:
    WebKitLegacy:
      "PLATFORM(IOS_FAMILY)": true
      default: false
    WebKit:
      "!PLATFORM(MAC) && !PLATFORM(APPLETV)": true
      default: false
    WebCore:
      default: false

InputTypeTimeEnabled:
  type: bool
  humanReadableName: "Time Input"
  humanReadableDescription: "Enable input elements of type time"
  condition: ENABLE(INPUT_TYPE_TIME)
  defaultValue:
    WebKitLegacy:
      "PLATFORM(IOS_FAMILY)": true
      default: false
    WebKit:
      "PLATFORM(APPLETV)": false
      default: true
    WebCore:
      default: false

InputTypeWeekEnabled:
  type: bool
  humanReadableName: "Week Input"
  humanReadableDescription: "Enable input elements of type week"
  condition: ENABLE(INPUT_TYPE_WEEK)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "!PLATFORM(MAC) && !PLATFORM(APPLETV)": true
      default: false
    WebCore:
      default: false

InteractionRegionsEnabled:
  type: bool
  humanReadableName: "Interaction Regions"
  humanReadableDescription: "Generate and visualize interaction regions"
  condition: ENABLE(INTERACTION_REGIONS_IN_EVENT_REGION)
  defaultValue:
    WebKit:
      default: true
    WebKitLegacy:
      default: false
    WebCore:
      default: false

# FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
IsFirstPartyWebsiteDataRemovalLiveOnTestingEnabled:
  type: bool
  humanReadableName: "[ITP Live-On] 1 Hour Timeout For Non-Cookie Data Removal"
  humanReadableDescription: "Remove all non-cookie website data after just one hour of no user interaction when Intelligent Tracking Prevention is enabled"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

# FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
IsFirstPartyWebsiteDataRemovalReproTestingEnabled:
  type: bool
  humanReadableName: "[ITP Repro] 30 Second Timeout For Non-Cookie Data Removal"
  humanReadableDescription: "Remove all non-cookie website data after just 30 seconds of no user interaction when Intelligent Tracking Prevention is enabled"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

LayerBasedSVGEngineEnabled:
  type: bool
  humanReadableName: "Layer-based SVG Engine (LBSE)"
  humanReadableDescription: "Enable next-generation layer-based SVG Engine (LBSE)"
  condition: ENABLE(LAYER_BASED_SVG_ENGINE)
  webcoreOnChange: layerBasedSVGEngineEnabledChanged
  defaultValue:
    WebCore:
      default: false
    WebKitLegacy:
      default: false
    WebKit:
      default: false

LayoutFormattingContextEnabled:
  type: bool
  humanReadableName: "Full next-generation layout (LFC)"
  humanReadableDescription: "Enable full next-generation layout (LFC)"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(LAYOUT_FORMATTING_CONTEXT)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false

LegacyOverflowScrollingTouchEnabled:
  type: bool
  webcoreOnChange: setNeedsRelayoutAllFrames
  humanReadableName: "Legacy -webkit-overflow-scrolling property"
  humanReadableDescription: "Support the legacy -webkit-overflow-scrolling CSS property"
  condition: ENABLE(OVERFLOW_SCROLLING_TOUCH)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true
    WebCore:
      default: true

LineHeightUnitsEnabled:
  type: bool
  humanReadableName: "lh / rlh units"
  humanReadableDescription: "Enable the lh and lhr units"
  webcoreBinding: DeprecatedGlobalSettings
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false

LiveRangeSelectionEnabled:
  type: bool
  humanReadableName: "Live Ranges in Selection"
  humanReadableDescription: "Live range behavior for ranges in the Selection object"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

MediaCaptureRequiresSecureConnection:
  type: bool
  inspectorOverride: true
  humanReadableName: "Limit Media Capture to Secure Sites"
  humanReadableDescription: "Limit Media Capture to Secure Sites"
  condition: ENABLE(MEDIA_STREAM)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true
    WebCore:
      default: true

MockCaptureDevicesEnabled:
  type: bool
  webcoreOnChange: mockCaptureDevicesEnabledChanged
  inspectorOverride: true
  condition: ENABLE(MEDIA_STREAM)
  humanReadableName: "Enable Mock Capture Devices"
  humanReadableDescription: "Enable Mock Capture Devices"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(IOS_FAMILY_SIMULATOR)": true
      default: false
    WebCore:
      default: false

MomentumScrollingAnimatorEnabled:
  type: bool
  humanReadableName: "Momentum Scrolling Animator"
  humanReadableDescription: "Generate momentum events in WebKit instead of using those delivered by the system"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: true
    WebCore:
      default: false

MouseEventsSimulationEnabled:
  type: bool
  humanReadableName: "Mouse events simulation"
  humanReadableDescription: "Enable mouse events dispatch along with touch events on iOS"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(TOUCH_EVENTS)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false

MuteCameraOnMicrophoneInterruptionEnabled:
  type: bool
  humanReadableName: "Mute Camera on Microphone Interruption"
  humanReadableDescription: "Mute Camera on Microphone Interruption"
  condition: ENABLE(MEDIA_STREAM)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(IOS_FAMILY)": true
      default: false
    WebCore:
      default: false

NotificationEventEnabled:
  type: bool
  humanReadableName: "NotificationEvent support"
  humanReadableDescription: "NotificationEvent and ServiceWorkerRegistration.showNotification() support"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(NOTIFICATION_EVENT)
  defaultValue:
    WebCore:
      "ENABLE(NOTIFICATION_EVENT)": true
      default: false
    WebKit:
      "ENABLE(NOTIFICATION_EVENT)": true
      default: false

OffscreenCanvasEnabled:
  type: bool
  humanReadableName: "OffscreenCanvas"
  humanReadableDescription: "Support for the OffscreenCanvas APIs"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(OFFSCREEN_CANVAS)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "ENABLE(EXPERIMENTAL_FEATURES)": true
      default: false

OffscreenCanvasInWorkersEnabled:
  type: bool
  humanReadableName: "OffscreenCanvas in Workers"
  humanReadableDescription: "Support for the OffscreenCanvas APIs in Workers"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(OFFSCREEN_CANVAS_IN_WORKERS)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "ENABLE(EXPERIMENTAL_FEATURES)": true
      default: false

PdfJSViewerEnabled:
  type: bool
  humanReadableName: "Enable PDF.js viewer"
  humanReadableDescription: "Enable PDF.js viewer"
  condition: ENABLE(PDFJS)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(GTK) || PLATFORM(WPE)": true
      default: false
    WebCore:
      default: false

PreferFasterClickOverDoubleTap:
  type: bool
  humanReadableName: "Fast clicks beat DTTZ"
  humanReadableDescription: "Prefer a faster click over a double tap"
  webcoreBinding: none
  condition: PLATFORM(IOS_FAMILY)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      "PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS)": true
      default: false

PreferSandboxedMediaParsing:
  type: bool
  humanReadableName: "Prefer Sandboxed Parsing of Media"
  humanReadableDescription: "Prefer parsing media out-of-process in a sandboxed service"
  condition: ENABLE(VIDEO)
  defaultValue:
    WebCore:
      default: true
    WebKitLegacy:
      default: true
    WebKit:
      default: true

RemoveBackgroundEnabled:
  type: bool
  humanReadableName: "Remove Background"
  humanReadableDescription: "Enable Remove Background"
  condition: ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
  exposed: [ WebKit ]
  defaultValue:
    WebCore:
      default: false
    WebKitLegacy:
      default: false
    WebKit:
      default: defaultRemoveBackgroundEnabled()

ReplayCGDisplayListsIntoBackingStore:
  type: bool
  humanReadableName: "CG Display Lists: Replay for Testing"
  humanReadableDescription: "Replay CG Display Lists into layer contents for testing"
  webcoreBinding: none
  condition: ENABLE(CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: false

ResourceLoadSchedulingEnabled:
  type: bool
  humanReadableName: "Resource Load Scheduling"
  humanReadableDescription: "Network process side priority and visibility based resource load scheduling"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: true
    WebCore:
      default: true

# FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
RestrictedHTTPResponseAccess:
  type: bool
  humanReadableName: "Filter HTTP Response for Web Processes"
  humanReadableDescription: "Enable HTTP Response filtering for Web Processes"
  webcoreBinding: DeprecatedGlobalSettings
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

SampleBufferContentKeySessionSupportEnabled:
  type: bool
  humanReadableName: "ContentKeySession support for SampleBuffer Renderers"
  humanReadableDescription: "ContentKeySession support for SampleBuffer Renderers Enabled"
  condition: HAVE(AVCONTENTKEYSPECIFIER)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

ScrollingPerformanceTestingEnabled:
  type: bool
  humanReadableName: "Scroll Performance Testing Enabled"
  humanReadableDescription: "Enable behaviors used by scrolling performance tests"
  webcoreOnChange: scrollingPerformanceTestingEnabledChanged
  exposed: [ WebKit ]
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

SecureContextChecksEnabled:
  type: bool
  humanReadableName: "Secure Context Checks"
  humanReadableDescription: "Allow access to HTTPS-only Web APIs over HTTP"
  webcoreBinding: DeprecatedGlobalSettings
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

SelectionFlippingEnabled:
  type: bool
  humanReadableName: "Selection Flipping"
  humanReadableDescription: "Enable Selection Flipping"
  webcoreBinding: none
  defaultValue:
    WebKit:
      "HAVE(UIKIT_WEBKIT_INTERNALS)" : false
      default: true

# FIXME: This is not implemented for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
ServiceWorkersEnabled:
  type: bool
  humanReadableName: "Service Workers"
  humanReadableDescription: "Enable Service Workers"
  condition: ENABLE(SERVICE_WORKER)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: true
    WebCore:
      default: false

ServiceWorkersUserGestureEnabled:
  type: bool
  humanReadableName: "Validate UserGesture requirements in Service Workers"
  humanReadableDescription: "Validate UserGesture requirements in Service Workers"
  condition: ENABLE(SERVICE_WORKER)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: true
    WebCore:
      default: true

ShowModalDialogEnabled:
  type: bool
  humanReadableName: "Legacy showModalDialog() API"
  humanReadableDescription: "Legacy showModalDialog() API"
  defaultValue:
    WebKitLegacy:
      "PLATFORM(IOS_FAMILY)": WebKit::defaultShowModalDialogEnabled()
      default: false
    WebKit:
      default: WebKit::defaultShowModalDialogEnabled()
    WebCore:
      default: false

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
SpeakerSelectionRequiresUserGesture:
  type: bool
  humanReadableName: "Require a user gesture for speaker selection"
  humanReadableDescription: "Require a user gesture for speaker selection"
  condition: ENABLE(MEDIA_STREAM)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true
    WebCore:
      default: true

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
TextAutosizingUsesIdempotentMode:
  type: bool
  webcoreOnChange: textAutosizingUsesIdempotentModeChanged
  humanReadableName: "Idempotent Text Autosizing"
  humanReadableDescription: "Use idempotent text autosizing mode"
  condition: ENABLE(TEXT_AUTOSIZING)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(IOS_FAMILY)": defaultTextAutosizingUsesIdempotentMode()
      default: false
    WebCore:
      default: false

TextRecognitionInVideosEnabled:
  type: bool
  humanReadableName: "Text Recognition in Videos"
  humanReadableDescription: "Enable Text Recognition in Videos"
  condition: ENABLE(IMAGE_ANALYSIS)
  exposed: [ WebKit ]
  defaultValue:
    WebCore:
      default: false
    WebKitLegacy:
      default: false
    WebKit:
      default: defaultTextRecognitionInVideosEnabled()

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
UndoManagerAPIEnabled:
  type: bool
  humanReadableName: "UndoManager DOM API"
  humanReadableDescription: "Enable the UndoManager DOM API"
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false
    WebCore:
      default: false

UpgradeKnownHostsToHTTPSEnabled:
  type: bool
  humanReadableName: "Upgrade known hosts to HTTPS"
  humanReadableDescription: "Upgrade known hosts to HTTPS"
  webcoreBinding: none
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: true

UseARKitForModel:
  type: bool
  humanReadableName: "Use ARKit for <model>"
  humanReadableDescription: "Use ARKit for <model>"
  webcoreBinding: none
  exposed: [ WebKit ]
  condition: ENABLE(ARKIT_INLINE_PREVIEW)
  defaultValue:
    WebKit:
      default: true

UseCGDisplayListOutOfLineSurfaces:
  type: bool
  humanReadableName: "CG Display Lists: Out-of-line Surfaces"
  humanReadableDescription: "Encode surfaces out-of-line for CG Display List image buffers."
  webcoreBinding: none
  condition: ENABLE(CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: true

UseCGDisplayListsForDOMRendering:
  type: bool
  humanReadableName: "CG Display Lists: DOM Rendering"
  humanReadableDescription: "Use CG Display Lists for DOM rendering"
  webcoreBinding: none
  condition: ENABLE(CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: true

UseGPUProcessForCanvasRenderingEnabled:
  type: bool
  humanReadableName: "GPU Process: Canvas Rendering"
  humanReadableDescription: "Enable canvas rendering in GPU Process"
  webcoreBinding: none
  condition: ENABLE(GPU_PROCESS) && !(PLATFORM(GTK) || PLATFORM(WPE))
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      "ENABLE(GPU_PROCESS_BY_DEFAULT)": true
      "PLATFORM(WIN)": true
      default: false

UseGPUProcessForMediaEnabled:
  type: bool
  humanReadableName: "GPU Process: Media"
  humanReadableDescription: "Do all media loading and playback in the GPU Process"
  webcoreBinding: none
  condition: ENABLE(GPU_PROCESS) && !USE(GSTREAMER)
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      "ENABLE(GPU_PROCESS_BY_DEFAULT)": true
      default: false

UseGeneralDirectoryForStorage:
  type: bool
  humanReadableName: "Use General Directory For Storage"
  humanReadableDescription: "Use general storage directory for IndexedDB and LocalStorage"
  webcoreBinding: none
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: true

UseSceneKitForModel:
  type: bool
  humanReadableName: "Use SceneKit for <model>"
  humanReadableDescription: "Use SceneKit for <model>"
  webcoreBinding: none
  exposed: [ WebKit ]
  condition: HAVE(SCENEKIT)
  defaultValue:
    WebKit:
      default: false

VisualTranslationEnabled:
  type: bool
  humanReadableName: "Visual Translation"
  humanReadableDescription: "Enable Visual Translation"
  condition: ENABLE(IMAGE_ANALYSIS)
  exposed: [ WebKit ]
  defaultValue:
    WebCore:
      default: false
    WebKitLegacy:
      default: false
    WebKit:
      default: defaultVisualTranslationEnabled()

WebAPIStatisticsEnabled:
  type: bool
  humanReadableName: "Web API Statistics"
  humanReadableDescription: "Enable Web API Statistics"
  webcoreBinding: DeprecatedGlobalSettings
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: false

WebRTCAudioLatencyAdaptationEnabled:
  type: bool
  humanReadableName: "WebRTC Audio Latency Adaptation"
  humanReadableDescription: "Enable WebRTC Audio Latency Adaptation"
  webcoreBinding: DeprecatedGlobalSettings
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
WebRTCDTMFEnabled:
  type: bool
  humanReadableName: "WebRTC DTMF"
  humanReadableDescription: "Enable WebRTC DTMF"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(WEB_RTC)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
WebRTCH264HardwareEncoderEnabled:
  type: bool
  humanReadableName: "WebRTC H264 Hardware encoder"
  humanReadableDescription: "Enable H264 Hardware encoder"
  webcoreBinding: none
  condition: ENABLE(WEB_RTC)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
WebRTCH264SimulcastEnabled:
  type: bool
  humanReadableName: "WebRTC H264 Simulcast"
  humanReadableDescription: "Enable WebRTC H264 Simulcast"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(WEB_RTC)
  defaultValue:
    WebKitLegacy:
      default: true
    WebKit:
      default: true

# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely.
WebRTCMDNSICECandidatesEnabled:
  type: bool
  humanReadableName: "WebRTC mDNS ICE candidates"
  humanReadableDescription: "Enable WebRTC mDNS ICE candidates"
  webcoreBinding: DeprecatedGlobalSettings
  condition: ENABLE(WEB_RTC)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      default: true

# FIXME: This is not relevant for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
WebRTCPlatformCodecsInGPUProcessEnabled:
  type: bool
  humanReadableName: "GPU Process: WebRTC Platform Codecs"
  humanReadableDescription: "Enable WebRTC Platform Codecs in GPU Process"
  condition: ENABLE(WEB_RTC)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "ENABLE(GPU_PROCESS_BY_DEFAULT)": true
      default: false
    WebCore:
      default: false

WebRTCRemoteVideoFrameEnabled:
  type: bool
  humanReadableName: "WebRTC Remote Video Frame"
  humanReadableDescription: "Enable WebRTC Remote Video Frame"
  condition: ENABLE(WEB_RTC)
  defaultValue:
    WebKitLegacy:
      default: false
    WebKit:
      "PLATFORM(COCOA)": true
      default: false
    WebCore:
      default: false

WebSQLEnabled:
  type: bool
  humanReadableName: "Enable WebSQL"
  humanReadableDescription: "Enable WebSQL"
  webcoreBinding: custom
  exposed: [ WebKitLegacy ]
  defaultValue:
    WebKitLegacy:
      "PLATFORM(IOS_FAMILY)": WebKit::defaultWebSQLEnabled()
      default: true

ZoomOnDoubleTapWhenRoot:
  type: bool
  condition: PLATFORM(IOS_FAMILY)
  humanReadableName: "DTTZ also when root"
  humanReadableDescription: "Double taps zoom, even if we dispatched a click on the root nodes"
  webcoreBinding: none
  exposed: [ WebKit ]
  defaultValue:
    WebKit:
      default: false
