chromium/third_party/blink/renderer/platform/BUILD.gn

# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//base/trace_event/tracing.gni")
import("//build/buildflag_header.gni")
import("//build/compiled_action.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//build/nocompile.gni")
import("//media/media_options.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/blink/public/public_features.gni")
import("//third_party/blink/renderer/build/scripts/scripts.gni")
import("//third_party/blink/renderer/config.gni")
import("//third_party/blink/renderer/platform/platform_generated.gni")
import("//third_party/libgav1/options.gni")
import("//third_party/webrtc/webrtc.gni")
import("//ui/gl/features.gni")
import("//v8/gni/v8.gni")

if (is_ios) {
  import("//build/config/ios/bundle_data_from_filelist.gni")
}

# Most targets in this file are private actions so use that as the default.
visibility = [
  ":*",
  "//:gn_all",
  "//third_party/blink/public:all_blink",
  "//third_party/blink/renderer/platform/heap:test_support",
]

blink_platform_avx_files = [
  "audio/cpu/x86/vector_math_avx.cc",
  "audio/cpu/x86/vector_math_avx.h",
]

make_names("font_family_names") {
  in_files = [ "fonts/font_family_names.json5" ]
  output_dir = blink_platform_output_dir
}

blink_python_runner("runtime_enabled_features") {
  script = "../build/scripts/make_runtime_features.py"

  runtime_enabled_features_json5 = "runtime_enabled_features.json5"
  inputs = scripts_for_json5_files + [
             runtime_enabled_features_json5,
             "../build/scripts/templates/runtime_enabled_features.cc.tmpl",
             "../build/scripts/templates/runtime_enabled_features.h.tmpl",
             "../build/scripts/templates/runtime_enabled_features_test_helpers.h.tmpl",
             "../build/scripts/templates/web_runtime_features_base.cc.tmpl",
           ]

  build_scripts_output_dir = "$blink_platform_output_dir/../build/scripts"
  outputs = [
    "$blink_platform_output_dir/exported/web_runtime_features_base.cc",
    "$blink_platform_output_dir/runtime_enabled_features.cc",
    "$blink_platform_output_dir/runtime_enabled_features.h",
    "$blink_platform_output_dir/testing/runtime_enabled_features_test_helpers.h",
    "$build_scripts_output_dir/runtime_enabled_features.pickle",
  ]

  args = [
    rebase_path(runtime_enabled_features_json5, root_build_dir),
    "--output_dir",
    rebase_path(blink_platform_output_dir, root_build_dir),
  ]

  visibility += [
    "//third_party/blink/renderer/bindings/core:interfaces_info_core",
    "//third_party/blink/renderer/bindings/modules:interfaces_info_modules",
  ]
}

blink_python_runner("runtime_feature_state_override_context") {
  script = "../build/scripts/make_runtime_feature_state_override_context.py"

  inputs = scripts_for_json5_files + [
             "../build/scripts/make_runtime_feature_state_override_context.py",
             "runtime_enabled_features.json5",
             "../build/scripts/templates/runtime_feature_state_override_context.h.tmpl",
             "../build/scripts/templates/runtime_feature_state_override_context.cc.tmpl",
           ]
  outputs = [
    "$blink_platform_output_dir/runtime_feature_state/runtime_feature_state_override_context.cc",
    "$blink_platform_output_dir/runtime_feature_state/runtime_feature_state_override_context.h",
  ]

  args = [
    rebase_path("runtime_enabled_features.json5", root_build_dir),
    "--output_dir",
    rebase_path("$blink_platform_output_dir/runtime_feature_state",
                root_build_dir),
  ]
}

blink_python_runner("color_data") {
  script = "../build/scripts/gperf.py"

  color_data_gperf = "color_data.gperf"
  inputs = [ color_data_gperf ]

  output_file = "$blink_platform_output_dir/color_data.cc"
  outputs = [ output_file ]

  args = [
    gperf_exe,
    "--key-positions=*",
    "-D",
    "-s",
    "2",
    rebase_path(color_data_gperf, root_build_dir),
    "--output-file=" + rebase_path(output_file, root_build_dir),
  ]
}

compiled_action("character_data") {
  tool = ":character_data_generator"
  outputs = [
    "$blink_platform_output_dir/character_property_data.cc",
    "$blink_platform_output_dir/text/break_iterator_data_inline_header.h",
  ]
  args = rebase_path(outputs, root_build_dir)
}

executable("character_data_generator") {
  sources = [
    "text/character_property.h",
    "text/character_property_data.h",
    "text/character_property_data_generator.cc",
    "text/han_kerning_char_type.h",
    "wtf/text/character_names.h",
    "wtf/text/wtf_uchar.h",
  ]
  configs += [ "//third_party/blink/renderer:config" ]
  deps = [
    # Default manifest on Windows(a no-op elsewhere).
    "//base",
    "//build/win:default_exe_manifest",
    "//third_party/icu",
  ]
}

# This isn't strictly necessary since we can just add the deps to "platform",
# but it helps to have the targets match the GYP build.
group("make_platform_generated") {
  visibility = []  # Allow re-assignment of list.
  visibility = [
    "//third_party/blink/public:blink_headers",
    "//third_party/blink/renderer/*",
  ]
  public_deps = [
    ":bindings_buildflags",
    ":character_data",
    ":color_data",
    ":font_family_names",
    ":runtime_enabled_features",
    ":runtime_feature_state_override_context",
    "//third_party/blink/public/common:buildflags",
    "//third_party/blink/renderer/platform/heap:blink_heap_buildflags",
    "//third_party/blink/renderer/platform/network:make_generated",
  ]
}

import("//build/config/pch.gni")

config("blink_platform_config") {
  visibility = []
  visibility = [ "./*" ]
  configs = [
    "//third_party/blink/renderer:config",
    "//third_party/blink/renderer:inside_blink",
  ]
}

# Deps and configs required to include platform headers. Applied to all
# platform constituent targets and exported to dependents.
group("blink_platform_public_deps") {
  visibility = []  # Allow re-assignment of list.
  visibility = [ "//third_party/blink/renderer/platform/*" ]
  public_deps = [
    ":make_platform_generated",
    "//base",
    "//cc",
    "//cc/animation",
    "//cc/paint",
    "//gpu/command_buffer/client:client",
    "//gpu/command_buffer/client:gles2_interface",
    "//gpu/command_buffer/common:common",
    "//gpu/command_buffer/common:gles2_utils",
    "//net",
    "//services/device/public/mojom:generic_sensor_blink",
    "//services/device/public/mojom:mojom_blink",
    "//services/network/public/cpp:cpp",
    "//services/network/public/mojom",
    "//services/network/public/mojom:mojom_blink",
    "//services/resource_coordinator/public/mojom:mojom_blink",
    "//services/service_manager/public/mojom:mojom_blink",
    "//skia",
    "//third_party:jpeg",
    "//third_party/blink/public:blink_headers",
    "//third_party/blink/public/common",
    "//third_party/blink/public/common:buildflags",
    "//third_party/blink/public/common:font_enumeration_table_proto",
    "//third_party/blink/public/mojom:mojom_platform_blink",
    "//third_party/blink/public/mojom:web_bluetooth_mojo_bindings_blink",
    "//third_party/blink/renderer/platform/network:make_generated",
    "//third_party/blink/renderer/platform/wtf",
    "//third_party/boringssl",
    "//third_party/libpng",
    "//third_party/libwebp",
    "//third_party/ots",
    "//ui/gfx/animation/keyframe",
    "//url",
    "//v8",
  ]
  public_configs = [ "//third_party/blink/renderer:features" ]

  if (is_android || is_win) {
    public_deps +=
        [ "//third_party/blink/public/common:font_unique_name_table_proto" ]
  }
}

declare_args() {
  runtime_call_stats_count_everything = false

  # Enable TRACE_EVENT instrumentation for Blink bindings.
  # Disabled by default as it increases binary size.
  enable_blink_bindings_tracing = extended_tracing_enabled

  # Enable cooperating scheduling hooks in auto-generated Blink bindings code.
  enable_blink_bindings_cooperating_scheduling = false
}

# ZSTD compression support has a binary size cost, don't include it on
# size-constrained platforms.
#
# TODO(lizeb): Android is not as much size-constrained on high-end ARM64
# devices, enable this later there as well. But since this is an experiment,
# gather data on other platforms first.
_is_size_constrained_platform = is_android || is_fuchsia
has_zstd_compression = !_is_size_constrained_platform

buildflag_header("bindings_buildflags") {
  header = "buildflags.h"
  header_dir = "third_party/blink/renderer/platform/bindings"

  flags = [
    "RCS_COUNT_EVERYTHING=$runtime_call_stats_count_everything",
    "BLINK_BINDINGS_TRACE_ENABLED=$enable_blink_bindings_tracing",
    "BLINK_BINDINGS_COOPERATIVE_SCHEDULING_ENABLED=$enable_blink_bindings_cooperating_scheduling",
    "HAS_ZSTD_COMPRESSION=$has_zstd_compression",
  ]
}

config("blink_platform_implementation") {
  visibility = []
  visibility = [ "./*" ]

  defines = [ "BLINK_PLATFORM_IMPLEMENTATION=1" ]
}

config("blink_platform_pch") {
  visibility = []
  visibility = [ "./*" ]
  if (enable_precompiled_headers) {
    if (is_win) {
      # This is a string rather than a file GN knows about. It has to match
      # exactly what's in the /FI flag below, and what might appear in the
      # source code in quotes for an #include directive.
      precompiled_header = rebase_path("precompile_platform.h", root_build_dir)

      # This is a file that GN will compile with the above header. It will be
      # implicitly added to the sources (potentially multiple times, with one
      # variant for each language used in the target).
      precompiled_source =
          "//third_party/blink/renderer/platform/win/precompile_platform.cc"

      # Force include the header.
      cflags = [ "/FI$precompiled_header" ]
    } else if (is_mac || is_linux) {
      precompiled_source =
          "//third_party/blink/renderer/platform/precompile_platform.h"
    }
  }
}

source_set("platform_export") {
  sources = [ "platform_export.h" ]

  visibility = []  # Allow re-assignment of list.
  visibility = [
    "//mojo/public/cpp/bindings:wtf_support",
    "//third_party/blink/renderer/platform/*",
  ]
}

source_set("allow_discouraged_type") {
  sources = [ "allow_discouraged_type.h" ]

  visibility = []  # Allow re-assignment of list.
  visibility = [ "//third_party/blink/renderer/platform/*" ]
}

source_set("image_headers") {
  visibility = []  # Allow re-assignment of list.
  visibility = [ "//third_party/blink/renderer/platform/image-decoders/*" ]

  sources = [
    "graphics/bitmap_image_metrics.h",
    "graphics/color_behavior.h",
    "graphics/image_orientation_enum.h",
    "graphics/paint/paint_image.h",
  ]

  public_deps = [
    "//base:base",
    "//cc/paint:paint",
    "//third_party/blink/renderer/platform:platform_export",
    "//third_party/blink/renderer/platform/wtf:wtf",
  ]
}

component("platform") {
  visibility = []  # Allow re-assignment of list.
  visibility = [
    "//third_party/blink/*",
    "//tools/privacy_budget/font_indexer:*",
  ]
  output_name = "blink_platform"

  sources = [
    "animation/animation_translation_util.cc",
    "animation/animation_translation_util.h",
    "animation/compositor_animation.cc",
    "animation/compositor_animation.h",
    "animation/compositor_animation_client.cc",
    "animation/compositor_animation_client.h",
    "animation/compositor_animation_delegate.h",
    "animation/timing_function.cc",
    "animation/timing_function.h",
    "audio/audio_array.h",
    "audio/audio_bus.cc",
    "audio/audio_bus.h",
    "audio/audio_callback_metric_reporter.cc",
    "audio/audio_callback_metric_reporter.h",
    "audio/audio_channel.cc",
    "audio/audio_channel.h",
    "audio/audio_destination.cc",
    "audio/audio_destination.h",
    "audio/audio_dsp_kernel.cc",
    "audio/audio_dsp_kernel.h",
    "audio/audio_dsp_kernel_processor.cc",
    "audio/audio_dsp_kernel_processor.h",
    "audio/audio_frame_stats_accumulator.cc",
    "audio/audio_frame_stats_accumulator.h",
    "audio/audio_io_callback.h",
    "audio/audio_processor.cc",
    "audio/audio_processor.h",
    "audio/audio_source_provider.h",
    "audio/audio_source_provider_client.h",
    "audio/audio_utilities.cc",
    "audio/audio_utilities.h",
    "audio/biquad.cc",
    "audio/biquad.h",
    "audio/cone_effect.cc",
    "audio/cone_effect.h",
    "audio/cpu/arm/vector_math_neon.h",
    "audio/cpu/mips/vector_math_msa.h",
    "audio/cpu/x86/vector_math_avx.cc",
    "audio/cpu/x86/vector_math_avx.h",
    "audio/cpu/x86/vector_math_impl.h",
    "audio/cpu/x86/vector_math_sse.cc",
    "audio/cpu/x86/vector_math_sse.h",
    "audio/cpu/x86/vector_math_x86.h",
    "audio/delay.cc",
    "audio/delay.h",
    "audio/denormal_disabler.h",
    "audio/direct_convolver.cc",
    "audio/direct_convolver.h",
    "audio/distance_effect.cc",
    "audio/distance_effect.h",
    "audio/down_sampler.cc",
    "audio/down_sampler.h",
    "audio/dynamics_compressor.cc",
    "audio/dynamics_compressor.h",
    "audio/equal_power_panner.cc",
    "audio/equal_power_panner.h",
    "audio/fft_convolver.cc",
    "audio/fft_convolver.h",
    "audio/fft_frame.cc",
    "audio/fft_frame.h",
    "audio/fft_frame_stub.cc",
    "audio/hrtf_database.cc",
    "audio/hrtf_database.h",
    "audio/hrtf_database_loader.cc",
    "audio/hrtf_database_loader.h",
    "audio/hrtf_elevation.cc",
    "audio/hrtf_elevation.h",
    "audio/hrtf_kernel.cc",
    "audio/hrtf_kernel.h",
    "audio/hrtf_panner.cc",
    "audio/hrtf_panner.h",
    "audio/iir_filter.cc",
    "audio/iir_filter.h",
    "audio/media_multi_channel_resampler.cc",
    "audio/media_multi_channel_resampler.h",
    "audio/panner.cc",
    "audio/panner.h",
    "audio/pffft/fft_frame_pffft.cc",
    "audio/push_pull_fifo.cc",
    "audio/push_pull_fifo.h",
    "audio/reverb.cc",
    "audio/reverb.h",
    "audio/reverb_accumulation_buffer.cc",
    "audio/reverb_accumulation_buffer.h",
    "audio/reverb_convolver.cc",
    "audio/reverb_convolver.h",
    "audio/reverb_convolver_stage.cc",
    "audio/reverb_convolver_stage.h",
    "audio/reverb_input_buffer.cc",
    "audio/reverb_input_buffer.h",
    "audio/simple_fft_convolver.cc",
    "audio/simple_fft_convolver.h",
    "audio/sinc_resampler.cc",
    "audio/sinc_resampler.h",
    "audio/stereo_panner.cc",
    "audio/stereo_panner.h",
    "audio/up_sampler.cc",
    "audio/up_sampler.h",
    "audio/vector_math.cc",
    "audio/vector_math.h",
    "audio/vector_math_scalar.h",
    "back_forward_cache_buffer_limit_tracker.cc",
    "back_forward_cache_buffer_limit_tracker.h",
    "back_forward_cache_utils.cc",
    "back_forward_cache_utils.h",
    "bindings/active_script_wrappable_base.cc",
    "bindings/active_script_wrappable_base.h",
    "bindings/active_script_wrappable_manager.cc",
    "bindings/active_script_wrappable_manager.h",
    "bindings/async_iterator_base.cc",
    "bindings/async_iterator_base.h",
    "bindings/bigint.cc",
    "bindings/bigint.h",
    "bindings/binding_security_for_platform.cc",
    "bindings/binding_security_for_platform.h",
    "bindings/callback_function_base.cc",
    "bindings/callback_function_base.h",
    "bindings/callback_interface_base.cc",
    "bindings/callback_interface_base.h",
    "bindings/callback_method_retriever.cc",
    "bindings/callback_method_retriever.h",
    "bindings/cooperative_scheduling_helpers.h",
    "bindings/cross_thread_copier.h",
    "bindings/dictionary_base.cc",
    "bindings/dictionary_base.h",
    "bindings/dom_data_store.cc",
    "bindings/dom_data_store.h",
    "bindings/dom_wrapper_world.cc",
    "bindings/dom_wrapper_world.h",
    "bindings/enumeration_base.h",
    "bindings/exception_code.h",
    "bindings/exception_context.h",
    "bindings/exception_messages.cc",
    "bindings/exception_messages.h",
    "bindings/exception_state.cc",
    "bindings/exception_state.h",
    "bindings/extensions_registry.cc",
    "bindings/extensions_registry.h",
    "bindings/frozen_array_base.cc",
    "bindings/frozen_array_base.h",
    "bindings/idl_member_installer.cc",
    "bindings/idl_member_installer.h",
    "bindings/multi_worlds_v8_reference.cc",
    "bindings/multi_worlds_v8_reference.h",
    "bindings/name_client.h",
    "bindings/observable_array.cc",
    "bindings/observable_array.h",
    "bindings/origin_trial_features.cc",
    "bindings/origin_trial_features.h",
    "bindings/parkable_string.cc",
    "bindings/parkable_string.h",
    "bindings/parkable_string_manager.cc",
    "bindings/parkable_string_manager.h",
    "bindings/runtime_call_stats.cc",
    "bindings/runtime_call_stats.h",
    "bindings/scoped_persistent.h",
    "bindings/script_forbidden_scope.cc",
    "bindings/script_forbidden_scope.h",
    "bindings/script_regexp.cc",
    "bindings/script_regexp.h",
    "bindings/script_state.cc",
    "bindings/script_state.h",
    "bindings/script_wrappable.cc",
    "bindings/script_wrappable.h",
    "bindings/source_location.cc",
    "bindings/source_location.h",
    "bindings/string_resource.h",
    "bindings/sync_iterator_base.cc",
    "bindings/sync_iterator_base.h",
    "bindings/thread_debugger.cc",
    "bindings/thread_debugger.h",
    "bindings/to_blink_string.cc",
    "bindings/to_blink_string.h",
    "bindings/trace_wrapper_v8_reference.h",
    "bindings/transform_view.h",
    "bindings/union_base.cc",
    "bindings/union_base.h",
    "bindings/v8_binding.cc",
    "bindings/v8_binding.h",
    "bindings/v8_binding_macros.h",
    "bindings/v8_cross_origin_property_support.cc",
    "bindings/v8_cross_origin_property_support.h",
    "bindings/v8_dom_activity_logger.cc",
    "bindings/v8_dom_activity_logger.h",
    "bindings/v8_dom_wrapper.cc",
    "bindings/v8_dom_wrapper.h",
    "bindings/v8_global_value_map.h",
    "bindings/v8_histogram_accumulator.cc",
    "bindings/v8_histogram_accumulator.h",
    "bindings/v8_interface_bridge.h",
    "bindings/v8_interface_bridge_base.cc",
    "bindings/v8_interface_bridge_base.h",
    "bindings/v8_object_constructor.cc",
    "bindings/v8_object_constructor.h",
    "bindings/v8_object_data_store.cc",
    "bindings/v8_object_data_store.h",
    "bindings/v8_per_context_data.cc",
    "bindings/v8_per_context_data.h",
    "bindings/v8_per_isolate_data.cc",
    "bindings/v8_per_isolate_data.h",
    "bindings/v8_private_property.cc",
    "bindings/v8_private_property.h",
    "bindings/v8_set_return_value.cc",
    "bindings/v8_set_return_value.h",
    "bindings/v8_throw_exception.cc",
    "bindings/v8_throw_exception.h",
    "bindings/v8_value_cache.cc",
    "bindings/v8_value_cache.h",
    "bindings/v8_value_or_script_wrappable_adapter.cc",
    "bindings/v8_value_or_script_wrappable_adapter.h",
    "bindings/wrapper_type_info.cc",
    "bindings/wrapper_type_info.h",
    "content_decryption_module_result.h",
    "context_lifecycle_notifier.cc",
    "context_lifecycle_notifier.h",
    "context_lifecycle_observer.cc",
    "context_lifecycle_observer.h",
    "cpu/mips/common_macros_msa.h",
    "crypto.cc",
    "crypto.h",
    "crypto_result.h",
    "cursors.cc",
    "cursors.h",
    "data_resource_helper.cc",
    "data_resource_helper.h",
    "disk_data_allocator.cc",
    "disk_data_allocator.h",
    "disk_data_metadata.cc",
    "disk_data_metadata.h",
    "exported/file_path_conversion.cc",
    "exported/interface_registry.cc",
    "exported/mediastream/web_media_stream.cc",
    "exported/mediastream/web_media_stream_source.cc",
    "exported/mediastream/web_media_stream_track.cc",
    "exported/mediastream/web_platform_media_stream_source.cc",
    "exported/platform.cc",
    "exported/resource_load_info_notifier_wrapper.cc",
    "exported/url_conversion.cc",
    "exported/video_capture/web_video_capture_impl_manager.cc",
    "exported/weak_wrapper_resource_load_info_notifier.cc",
    "exported/web_audio_bus.cc",
    "exported/web_blob_info.cc",
    "exported/web_cache.cc",
    "exported/web_content_decryption_module.cc",
    "exported/web_content_decryption_module_access.cc",
    "exported/web_content_decryption_module_result.cc",
    "exported/web_content_decryption_module_session.cc",
    "exported/web_crypto_algorithm.cc",
    "exported/web_crypto_key.cc",
    "exported/web_crypto_key_algorithm.cc",
    "exported/web_crypto_result.cc",
    "exported/web_data.cc",
    "exported/web_drag_data.cc",
    "exported/web_encrypted_media_client.cc",
    "exported/web_encrypted_media_key_information.cc",
    "exported/web_encrypted_media_request.cc",
    "exported/web_font.cc",
    "exported/web_font_description.cc",
    "exported/web_http_body.cc",
    "exported/web_icon_sizes_parser.cc",
    "exported/web_image_generator.cc",
    "exported/web_media_player_client.cc",
    "exported/web_media_player_encrypted_media_client.cc",
    "exported/web_media_player_source.cc",
    "exported/web_media_stream_audio_sink.cc",
    "exported/web_memory_pressure_listener.cc",
    "exported/web_network_state_notifier.cc",
    "exported/web_runtime_features.cc",
    "exported/web_security_origin.cc",
    "exported/web_string.cc",
    "exported/web_surface_layer_bridge.cc",
    "exported/web_text_input_info.cc",
    "exported/web_text_run.cc",
    "exported/web_thread_safe_data.cc",
    "exported/web_time_range.cc",
    "exported/web_url.cc",
    "exported/web_url_error.cc",
    "exported/web_url_request.cc",
    "exported/web_url_response.cc",
    "exported/web_video_frame_submitter.cc",
    "exported/wrapped_resource_request.h",
    "exported/wrapped_resource_response.h",
    "feature_context.h",
    "file_metadata.cc",
    "file_metadata.h",
    "fonts/alternate_font_family.h",
    "fonts/bitmap_glyphs_block_list.cc",
    "fonts/bitmap_glyphs_block_list.h",
    "fonts/canvas_rotation_in_vertical.h",
    "fonts/character_range.h",
    "fonts/custom_font_data.h",
    "fonts/fallback_list_composite_key.h",
    "fonts/font.cc",
    "fonts/font.h",
    "fonts/font_baseline.h",
    "fonts/font_cache.cc",
    "fonts/font_cache.h",
    "fonts/font_cache_client.h",
    "fonts/font_cache_key.h",
    "fonts/font_cache_memory_dump_provider.cc",
    "fonts/font_cache_memory_dump_provider.h",
    "fonts/font_custom_platform_data.cc",
    "fonts/font_custom_platform_data.h",
    "fonts/font_data.h",
    "fonts/font_data_cache.cc",
    "fonts/font_data_cache.h",
    "fonts/font_data_for_range_set.cc",
    "fonts/font_data_for_range_set.h",
    "fonts/font_description.cc",
    "fonts/font_description.h",
    "fonts/font_face_creation_params.h",
    "fonts/font_fallback_iterator.cc",
    "fonts/font_fallback_iterator.h",
    "fonts/font_fallback_list.cc",
    "fonts/font_fallback_list.h",
    "fonts/font_fallback_map.cc",
    "fonts/font_fallback_map.h",
    "fonts/font_fallback_priority.cc",
    "fonts/font_fallback_priority.h",
    "fonts/font_family.cc",
    "fonts/font_family.h",
    "fonts/font_global_context.cc",
    "fonts/font_global_context.h",
    "fonts/font_height.cc",
    "fonts/font_height.h",
    "fonts/font_invalidation_reason.h",
    "fonts/font_metrics.cc",
    "fonts/font_metrics.h",
    "fonts/font_metrics_override.h",
    "fonts/font_optical_sizing.cc",
    "fonts/font_optical_sizing.h",
    "fonts/font_orientation.cc",
    "fonts/font_orientation.h",
    "fonts/font_palette.cc",
    "fonts/font_palette.h",
    "fonts/font_performance.cc",
    "fonts/font_performance.h",
    "fonts/font_platform_data.cc",
    "fonts/font_platform_data.h",
    "fonts/font_platform_data_cache.cc",
    "fonts/font_platform_data_cache.h",
    "fonts/font_selection_algorithm.cc",
    "fonts/font_selection_algorithm.h",
    "fonts/font_selection_types.cc",
    "fonts/font_selection_types.h",
    "fonts/font_selector.cc",
    "fonts/font_selector.h",
    "fonts/font_selector_client.h",
    "fonts/font_size_adjust.cc",
    "fonts/font_size_adjust.h",
    "fonts/font_smoothing_mode.cc",
    "fonts/font_smoothing_mode.h",
    "fonts/font_unique_name_lookup.cc",
    "fonts/font_unique_name_lookup.h",
    "fonts/font_variant_alternates.cc",
    "fonts/font_variant_alternates.h",
    "fonts/font_variant_east_asian.cc",
    "fonts/font_variant_east_asian.h",
    "fonts/font_variant_emoji.cc",
    "fonts/font_variant_emoji.h",
    "fonts/font_variant_numeric.cc",
    "fonts/font_variant_numeric.h",
    "fonts/font_vertical_position_type.h",
    "fonts/font_width_variant.cc",
    "fonts/font_width_variant.h",
    "fonts/generic_font_family_settings.cc",
    "fonts/generic_font_family_settings.h",
    "fonts/glyph_metrics_map.h",
    "fonts/opentype/font_format_check.cc",
    "fonts/opentype/font_format_check.h",
    "fonts/opentype/font_settings.cc",
    "fonts/opentype/font_settings.h",
    "fonts/opentype/open_type_baseline_metrics.cc",
    "fonts/opentype/open_type_baseline_metrics.h",
    "fonts/opentype/open_type_caps_support.cc",
    "fonts/opentype/open_type_caps_support.h",
    "fonts/opentype/open_type_caps_support_mpl.cc",
    "fonts/opentype/open_type_cpal_lookup.cc",
    "fonts/opentype/open_type_cpal_lookup.h",
    "fonts/opentype/open_type_features.cc",
    "fonts/opentype/open_type_features.h",
    "fonts/opentype/open_type_math_stretch_data.h",
    "fonts/opentype/open_type_math_support.cc",
    "fonts/opentype/open_type_math_support.h",
    "fonts/opentype/open_type_math_test_fonts.cc",
    "fonts/opentype/open_type_math_test_fonts.h",
    "fonts/opentype/open_type_types.h",
    "fonts/opentype/open_type_vertical_data.cc",
    "fonts/opentype/open_type_vertical_data.h",
    "fonts/opentype/variable_axes_names.cc",
    "fonts/opentype/variable_axes_names.h",
    "fonts/orientation_iterator.cc",
    "fonts/orientation_iterator.h",
    "fonts/palette_interpolation.cc",
    "fonts/palette_interpolation.h",
    "fonts/resolved_font_features.h",
    "fonts/script_run_iterator.cc",
    "fonts/script_run_iterator.h",
    "fonts/segmented_font_data.cc",
    "fonts/segmented_font_data.h",
    "fonts/shaping/caching_word_shape_iterator.cc",
    "fonts/shaping/caching_word_shape_iterator.h",
    "fonts/shaping/caching_word_shaper.cc",
    "fonts/shaping/caching_word_shaper.h",
    "fonts/shaping/case_mapping_harfbuzz_buffer_filler.cc",
    "fonts/shaping/case_mapping_harfbuzz_buffer_filler.h",
    "fonts/shaping/font_features.cc",
    "fonts/shaping/font_features.h",
    "fonts/shaping/glyph_bounds_accumulator.h",
    "fonts/shaping/glyph_data.h",
    "fonts/shaping/han_kerning.cc",
    "fonts/shaping/han_kerning.h",
    "fonts/shaping/harfbuzz_face.cc",
    "fonts/shaping/harfbuzz_face.h",
    "fonts/shaping/harfbuzz_face_from_typeface.cc",
    "fonts/shaping/harfbuzz_face_from_typeface.h",
    "fonts/shaping/harfbuzz_font_cache.cc",
    "fonts/shaping/harfbuzz_font_cache.h",
    "fonts/shaping/harfbuzz_font_data.h",
    "fonts/shaping/harfbuzz_shaper.cc",
    "fonts/shaping/harfbuzz_shaper.h",
    "fonts/shaping/ng_shape_cache.h",
    "fonts/shaping/run_segmenter.cc",
    "fonts/shaping/run_segmenter.h",
    "fonts/shaping/shape_cache.h",
    "fonts/shaping/shape_options.h",
    "fonts/shaping/shape_result.cc",
    "fonts/shaping/shape_result.h",
    "fonts/shaping/shape_result_bloberizer.cc",
    "fonts/shaping/shape_result_bloberizer.h",
    "fonts/shaping/shape_result_buffer.cc",
    "fonts/shaping/shape_result_buffer.h",
    "fonts/shaping/shape_result_inline_headers.h",
    "fonts/shaping/shape_result_spacing.cc",
    "fonts/shaping/shape_result_spacing.h",
    "fonts/shaping/shape_result_test_info.cc",
    "fonts/shaping/shape_result_test_info.h",
    "fonts/shaping/shape_result_view.cc",
    "fonts/shaping/shape_result_view.h",
    "fonts/shaping/shaping_line_breaker.cc",
    "fonts/shaping/shaping_line_breaker.h",
    "fonts/shaping/stretchy_operator_shaper.cc",
    "fonts/shaping/stretchy_operator_shaper.h",
    "fonts/shaping/text_auto_space.cc",
    "fonts/shaping/text_auto_space.h",
    "fonts/shaping/text_spacing_trim.h",
    "fonts/shaping/variation_selector_mode.cc",
    "fonts/shaping/variation_selector_mode.h",
    "fonts/simple_font_data.cc",
    "fonts/simple_font_data.h",
    "fonts/skia/font_cache_skia.cc",
    "fonts/skia/skia_text_metrics.cc",
    "fonts/skia/skia_text_metrics.h",
    "fonts/skia/sktypeface_factory.cc",
    "fonts/skia/sktypeface_factory.h",
    "fonts/small_caps_iterator.cc",
    "fonts/small_caps_iterator.h",
    "fonts/string_truncator.cc",
    "fonts/string_truncator.h",
    "fonts/symbols_iterator.cc",
    "fonts/symbols_iterator.h",
    "fonts/text_fragment_paint_info.cc",
    "fonts/text_fragment_paint_info.h",
    "fonts/text_rendering_mode.cc",
    "fonts/text_rendering_mode.h",
    "fonts/text_run_paint_info.h",
    "fonts/typesetting_features.cc",
    "fonts/typesetting_features.h",
    "fonts/unicode_range_set.cc",
    "fonts/unicode_range_set.h",
    "fonts/utf16_ragel_iterator.h",
    "fonts/utf16_text_iterator.cc",
    "fonts/utf16_text_iterator.h",
    "fonts/vdmx_parser.cc",
    "fonts/vdmx_parser.h",
    "fonts/web_font_decoder.cc",
    "fonts/web_font_decoder.h",
    "fonts/web_font_render_style.cc",
    "fonts/web_font_typeface_factory.cc",
    "fonts/web_font_typeface_factory.h",
    "geometry/blend.h",
    "geometry/calculation_expression_node.cc",
    "geometry/calculation_expression_node.h",
    "geometry/calculation_value.cc",
    "geometry/calculation_value.h",
    "geometry/float_polygon.cc",
    "geometry/float_polygon.h",
    "geometry/float_rounded_rect.cc",
    "geometry/float_rounded_rect.h",
    "geometry/geometry_as_json.h",
    "geometry/geometry_hash_traits.h",
    "geometry/infinite_int_rect.h",
    "geometry/layout_point.cc",
    "geometry/layout_point.h",
    "geometry/layout_unit.cc",
    "geometry/layout_unit.h",
    "geometry/length.cc",
    "geometry/length.h",
    "geometry/length_box.h",
    "geometry/length_functions.cc",
    "geometry/length_functions.h",
    "geometry/length_point.h",
    "geometry/length_size.h",
    "geometry/math_functions.h",
    "geometry/physical_direction.h",
    "graphics/accelerated_static_bitmap_image.cc",
    "graphics/accelerated_static_bitmap_image.h",
    "graphics/animation_worklet_mutator.h",
    "graphics/animation_worklet_mutator_dispatcher.h",
    "graphics/animation_worklet_mutator_dispatcher_impl.cc",
    "graphics/animation_worklet_mutator_dispatcher_impl.h",
    "graphics/animation_worklet_mutators_state.h",
    "graphics/apply_viewport_changes.h",
    "graphics/begin_frame_provider.cc",
    "graphics/begin_frame_provider.h",
    "graphics/begin_frame_provider_params.h",
    "graphics/bitmap_image.cc",
    "graphics/bitmap_image.h",
    "graphics/bitmap_image_metrics.cc",
    "graphics/bitmap_image_metrics.h",
    "graphics/box_reflection.cc",
    "graphics/box_reflection.h",
    "graphics/canvas_2d_layer_bridge.cc",
    "graphics/canvas_2d_layer_bridge.h",
    "graphics/canvas_color_params.cc",
    "graphics/canvas_color_params.h",
    "graphics/canvas_hibernation_handler.cc",
    "graphics/canvas_hibernation_handler.h",
    "graphics/canvas_resource.cc",
    "graphics/canvas_resource.h",
    "graphics/canvas_resource_dispatcher.cc",
    "graphics/canvas_resource_dispatcher.h",
    "graphics/canvas_resource_host.cc",
    "graphics/canvas_resource_host.h",
    "graphics/canvas_resource_provider.cc",
    "graphics/canvas_resource_provider.h",
    "graphics/color.cc",
    "graphics/color.h",
    "graphics/color_behavior.h",
    "graphics/color_space_gamut.cc",
    "graphics/color_space_gamut.h",
    "graphics/color_space_profile_data.cc",
    "graphics/color_space_profile_data.h",
    "graphics/compositing/adjust_mask_layer_geometry.cc",
    "graphics/compositing/adjust_mask_layer_geometry.h",
    "graphics/compositing/chunk_to_layer_mapper.cc",
    "graphics/compositing/chunk_to_layer_mapper.h",
    "graphics/compositing/content_layer_client_impl.cc",
    "graphics/compositing/content_layer_client_impl.h",
    "graphics/compositing/layers_as_json.cc",
    "graphics/compositing/layers_as_json.h",
    "graphics/compositing/paint_artifact_compositor.cc",
    "graphics/compositing/paint_artifact_compositor.h",
    "graphics/compositing/paint_chunks_to_cc_layer.cc",
    "graphics/compositing/paint_chunks_to_cc_layer.h",
    "graphics/compositing/pending_layer.cc",
    "graphics/compositing/pending_layer.h",
    "graphics/compositing/property_tree_manager.cc",
    "graphics/compositing/property_tree_manager.h",
    "graphics/compositing_reasons.cc",
    "graphics/compositing_reasons.h",
    "graphics/compositor_element_id.cc",
    "graphics/compositor_element_id.h",
    "graphics/compositor_filter_operations.cc",
    "graphics/compositor_filter_operations.h",
    "graphics/compositor_mutator_client.cc",
    "graphics/compositor_mutator_client.h",
    "graphics/cpu/arm/webgl_image_conversion_neon.h",
    "graphics/cpu/loongarch64/webgl_image_conversion_lsx.h",
    "graphics/cpu/mips/webgl_image_conversion_msa.h",
    "graphics/cpu/x86/webgl_image_conversion_sse.h",
    "graphics/crossfade_generated_image.cc",
    "graphics/crossfade_generated_image.h",
    "graphics/dark_mode_color_classifier.cc",
    "graphics/dark_mode_color_classifier.h",
    "graphics/dark_mode_color_filter.cc",
    "graphics/dark_mode_color_filter.h",
    "graphics/dark_mode_filter.cc",
    "graphics/dark_mode_filter.h",
    "graphics/dark_mode_image_cache.h",
    "graphics/dark_mode_image_classifier.cc",
    "graphics/dark_mode_image_classifier.h",
    "graphics/dark_mode_lab_color_space.h",
    "graphics/dark_mode_settings.h",
    "graphics/dark_mode_settings_builder.cc",
    "graphics/dark_mode_settings_builder.h",
    "graphics/dark_mode_types.h",
    "graphics/darkmode/darkmode_classifier.cc",
    "graphics/darkmode/darkmode_classifier.h",
    "graphics/dash_array.h",
    "graphics/decoding_image_generator.cc",
    "graphics/decoding_image_generator.h",
    "graphics/deferred_image_decoder.cc",
    "graphics/deferred_image_decoder.h",
    "graphics/dom_node_id.h",
    "graphics/draw_looper_builder.cc",
    "graphics/draw_looper_builder.h",
    "graphics/filters/distant_light_source.cc",
    "graphics/filters/distant_light_source.h",
    "graphics/filters/fe_blend.cc",
    "graphics/filters/fe_blend.h",
    "graphics/filters/fe_box_reflect.cc",
    "graphics/filters/fe_box_reflect.h",
    "graphics/filters/fe_color_matrix.cc",
    "graphics/filters/fe_color_matrix.h",
    "graphics/filters/fe_component_transfer.cc",
    "graphics/filters/fe_component_transfer.h",
    "graphics/filters/fe_composite.cc",
    "graphics/filters/fe_composite.h",
    "graphics/filters/fe_convolve_matrix.cc",
    "graphics/filters/fe_convolve_matrix.h",
    "graphics/filters/fe_diffuse_lighting.cc",
    "graphics/filters/fe_diffuse_lighting.h",
    "graphics/filters/fe_displacement_map.cc",
    "graphics/filters/fe_displacement_map.h",
    "graphics/filters/fe_drop_shadow.cc",
    "graphics/filters/fe_drop_shadow.h",
    "graphics/filters/fe_flood.cc",
    "graphics/filters/fe_flood.h",
    "graphics/filters/fe_gaussian_blur.cc",
    "graphics/filters/fe_gaussian_blur.h",
    "graphics/filters/fe_lighting.cc",
    "graphics/filters/fe_lighting.h",
    "graphics/filters/fe_merge.cc",
    "graphics/filters/fe_merge.h",
    "graphics/filters/fe_morphology.cc",
    "graphics/filters/fe_morphology.h",
    "graphics/filters/fe_offset.cc",
    "graphics/filters/fe_offset.h",
    "graphics/filters/fe_specular_lighting.cc",
    "graphics/filters/fe_specular_lighting.h",
    "graphics/filters/fe_tile.cc",
    "graphics/filters/fe_tile.h",
    "graphics/filters/fe_turbulence.cc",
    "graphics/filters/fe_turbulence.h",
    "graphics/filters/filter.cc",
    "graphics/filters/filter.h",
    "graphics/filters/filter_effect.cc",
    "graphics/filters/filter_effect.h",
    "graphics/filters/light_source.cc",
    "graphics/filters/light_source.h",
    "graphics/filters/paint_filter_builder.cc",
    "graphics/filters/paint_filter_builder.h",
    "graphics/filters/paint_filter_effect.cc",
    "graphics/filters/paint_filter_effect.h",
    "graphics/filters/point_light_source.cc",
    "graphics/filters/point_light_source.h",
    "graphics/filters/source_alpha.cc",
    "graphics/filters/source_alpha.h",
    "graphics/filters/source_graphic.cc",
    "graphics/filters/source_graphic.h",
    "graphics/filters/spot_light_source.cc",
    "graphics/filters/spot_light_source.h",
    "graphics/generated_image.cc",
    "graphics/generated_image.h",
    "graphics/gpu/dawn_control_client_holder.cc",
    "graphics/gpu/dawn_control_client_holder.h",
    "graphics/gpu/drawing_buffer.cc",
    "graphics/gpu/drawing_buffer.h",
    "graphics/gpu/extensions_3d_util.cc",
    "graphics/gpu/extensions_3d_util.h",
    "graphics/gpu/graphics_context_3d_utils.cc",
    "graphics/gpu/graphics_context_3d_utils.h",
    "graphics/gpu/image_extractor.cc",
    "graphics/gpu/image_extractor.h",
    "graphics/gpu/image_layer_bridge.cc",
    "graphics/gpu/image_layer_bridge.h",
    "graphics/gpu/shared_context_rate_limiter.cc",
    "graphics/gpu/shared_context_rate_limiter.h",
    "graphics/gpu/shared_gpu_context.cc",
    "graphics/gpu/shared_gpu_context.h",
    "graphics/gpu/webgl_image_conversion.cc",
    "graphics/gpu/webgl_image_conversion.h",
    "graphics/gpu/webgpu_callback.h",
    "graphics/gpu/webgpu_cpp.h",
    "graphics/gpu/webgpu_mailbox_texture.cc",
    "graphics/gpu/webgpu_mailbox_texture.h",
    "graphics/gpu/webgpu_resource_provider_cache.cc",
    "graphics/gpu/webgpu_resource_provider_cache.h",
    "graphics/gpu/webgpu_swap_buffer_provider.cc",
    "graphics/gpu/webgpu_swap_buffer_provider.h",
    "graphics/gpu/webgpu_texture_alpha_clearer.cc",
    "graphics/gpu/webgpu_texture_alpha_clearer.h",
    "graphics/gpu/webgraphics_shared_image_interface_provider_impl.cc",
    "graphics/gpu/webgraphics_shared_image_interface_provider_impl.h",
    "graphics/gpu/xr_frame_transport.cc",
    "graphics/gpu/xr_frame_transport.h",
    "graphics/gpu/xr_webgl_drawing_buffer.cc",
    "graphics/gpu/xr_webgl_drawing_buffer.h",
    "graphics/gradient.cc",
    "graphics/gradient.h",
    "graphics/gradient_generated_image.cc",
    "graphics/gradient_generated_image.h",
    "graphics/graphics_context.cc",
    "graphics/graphics_context.h",
    "graphics/graphics_context_state.cc",
    "graphics/graphics_context_state.h",
    "graphics/graphics_context_state_saver.h",
    "graphics/graphics_types.cc",
    "graphics/graphics_types.h",
    "graphics/graphics_types_3d.h",
    "graphics/image.cc",
    "graphics/image.h",
    "graphics/image_data_buffer.cc",
    "graphics/image_data_buffer.h",
    "graphics/image_decoder_wrapper.cc",
    "graphics/image_decoder_wrapper.h",
    "graphics/image_decoding_store.cc",
    "graphics/image_decoding_store.h",
    "graphics/image_frame_generator.cc",
    "graphics/image_frame_generator.h",
    "graphics/image_observer.cc",
    "graphics/image_observer.h",
    "graphics/image_orientation.cc",
    "graphics/image_orientation.h",
    "graphics/image_orientation_enum.h",
    "graphics/image_pattern.cc",
    "graphics/image_pattern.h",
    "graphics/image_to_buffer_copier.cc",
    "graphics/image_to_buffer_copier.h",
    "graphics/intercepting_canvas.cc",
    "graphics/intercepting_canvas.h",
    "graphics/interpolation_space.cc",
    "graphics/interpolation_space.h",
    "graphics/lcd_text_preference.h",
    "graphics/logging_canvas.cc",
    "graphics/logging_canvas.h",
    "graphics/mailbox_ref.cc",
    "graphics/mailbox_ref.h",
    "graphics/mailbox_texture_backing.cc",
    "graphics/mailbox_texture_backing.h",
    "graphics/main_thread_mutator_client.cc",
    "graphics/main_thread_mutator_client.h",
    "graphics/memory_managed_paint_canvas.cc",
    "graphics/memory_managed_paint_canvas.h",
    "graphics/memory_managed_paint_recorder.cc",
    "graphics/memory_managed_paint_recorder.h",
    "graphics/mutator_client.h",
    "graphics/offscreen_canvas_placeholder.cc",
    "graphics/offscreen_canvas_placeholder.h",
    "graphics/overlay_scrollbar_clip_behavior.h",
    "graphics/paint/clip_paint_property_node.cc",
    "graphics/paint/clip_paint_property_node.h",
    "graphics/paint/cull_rect.cc",
    "graphics/paint/cull_rect.h",
    "graphics/paint/display_item.cc",
    "graphics/paint/display_item.h",
    "graphics/paint/display_item_cache_skipper.h",
    "graphics/paint/display_item_client.cc",
    "graphics/paint/display_item_client.h",
    "graphics/paint/display_item_list.cc",
    "graphics/paint/display_item_list.h",
    "graphics/paint/display_item_raster_invalidator.cc",
    "graphics/paint/display_item_raster_invalidator.h",
    "graphics/paint/drawing_display_item.cc",
    "graphics/paint/drawing_display_item.h",
    "graphics/paint/drawing_recorder.cc",
    "graphics/paint/drawing_recorder.h",
    "graphics/paint/effect_paint_property_node.cc",
    "graphics/paint/effect_paint_property_node.h",
    "graphics/paint/float_clip_rect.h",
    "graphics/paint/foreign_layer_display_item.cc",
    "graphics/paint/foreign_layer_display_item.h",
    "graphics/paint/geometry_mapper.cc",
    "graphics/paint/geometry_mapper.h",
    "graphics/paint/geometry_mapper_clip_cache.cc",
    "graphics/paint/geometry_mapper_clip_cache.h",
    "graphics/paint/geometry_mapper_transform_cache.cc",
    "graphics/paint/geometry_mapper_transform_cache.h",
    "graphics/paint/hit_test_data.cc",
    "graphics/paint/hit_test_data.h",
    "graphics/paint/ignore_paint_timing_scope.cc",
    "graphics/paint/ignore_paint_timing_scope.h",
    "graphics/paint/layer_selection_data.h",
    "graphics/paint/paint_artifact.cc",
    "graphics/paint/paint_artifact.h",
    "graphics/paint/paint_canvas.h",
    "graphics/paint/paint_chunk.cc",
    "graphics/paint/paint_chunk.h",
    "graphics/paint/paint_chunk_subset.cc",
    "graphics/paint/paint_chunk_subset.h",
    "graphics/paint/paint_chunker.cc",
    "graphics/paint/paint_chunker.h",
    "graphics/paint/paint_controller.cc",
    "graphics/paint/paint_controller.h",
    "graphics/paint/paint_controller_debug_data.cc",
    "graphics/paint/paint_filter.h",
    "graphics/paint/paint_property_node.cc",
    "graphics/paint/paint_property_node.h",
    "graphics/paint/paint_record.h",
    "graphics/paint/paint_record_builder.cc",
    "graphics/paint/paint_record_builder.h",
    "graphics/paint/paint_recorder.h",
    "graphics/paint/paint_shader.h",
    "graphics/paint/paint_under_invalidation_checker.cc",
    "graphics/paint/paint_under_invalidation_checker.h",
    "graphics/paint/painted_selection_bound.h",
    "graphics/paint/property_tree_state.cc",
    "graphics/paint/property_tree_state.h",
    "graphics/paint/raster_invalidation_tracking.cc",
    "graphics/paint/raster_invalidation_tracking.h",
    "graphics/paint/raster_invalidator.cc",
    "graphics/paint/raster_invalidator.h",
    "graphics/paint/region_capture_data.cc",
    "graphics/paint/region_capture_data.h",
    "graphics/paint/scoped_display_item_fragment.h",
    "graphics/paint/scoped_effectively_invisible.h",
    "graphics/paint/scoped_paint_chunk_properties.h",
    "graphics/paint/scroll_paint_property_node.cc",
    "graphics/paint/scroll_paint_property_node.h",
    "graphics/paint/scrollbar_display_item.cc",
    "graphics/paint/scrollbar_display_item.h",
    "graphics/paint/subsequence_recorder.h",
    "graphics/paint/transform_paint_property_node.cc",
    "graphics/paint/transform_paint_property_node.h",
    "graphics/paint_generated_image.cc",
    "graphics/paint_generated_image.h",
    "graphics/paint_invalidation_reason.cc",
    "graphics/paint_invalidation_reason.h",
    "graphics/paint_record_pattern.cc",
    "graphics/paint_record_pattern.h",
    "graphics/paint_worklet_paint_dispatcher.cc",
    "graphics/paint_worklet_paint_dispatcher.h",
    "graphics/paint_worklet_painter.h",
    "graphics/parkable_image.cc",
    "graphics/parkable_image.h",
    "graphics/parkable_image_manager.cc",
    "graphics/parkable_image_manager.h",
    "graphics/path.cc",
    "graphics/path.h",
    "graphics/path_traversal_state.cc",
    "graphics/path_traversal_state.h",
    "graphics/pattern.cc",
    "graphics/pattern.h",
    "graphics/picture_snapshot.cc",
    "graphics/picture_snapshot.h",
    "graphics/platform_paint_worklet_layer_painter.cc",
    "graphics/platform_paint_worklet_layer_painter.h",
    "graphics/profiling_canvas.cc",
    "graphics/profiling_canvas.h",
    "graphics/raster_dark_mode_filter_impl.cc",
    "graphics/raster_dark_mode_filter_impl.h",
    "graphics/replaying_canvas.cc",
    "graphics/replaying_canvas.h",
    "graphics/resource_id_traits.h",
    "graphics/scoped_image_rendering_settings.h",
    "graphics/scoped_raster_timer.cc",
    "graphics/scoped_raster_timer.h",
    "graphics/scrollbar_theme_settings.cc",
    "graphics/scrollbar_theme_settings.h",
    "graphics/skia/sk_image_info_hash.h",
    "graphics/skia/sk_size_hash.h",
    "graphics/skia/skia_utils.cc",
    "graphics/skia/skia_utils.h",
    "graphics/static_bitmap_image.cc",
    "graphics/static_bitmap_image.h",
    "graphics/static_bitmap_image_to_video_frame_copier.cc",
    "graphics/static_bitmap_image_to_video_frame_copier.h",
    "graphics/stroke_data.cc",
    "graphics/stroke_data.h",
    "graphics/styled_stroke_data.cc",
    "graphics/styled_stroke_data.h",
    "graphics/subtree_paint_property_update_reason.cc",
    "graphics/subtree_paint_property_update_reason.h",
    "graphics/surface_layer_bridge.cc",
    "graphics/surface_layer_bridge.h",
    "graphics/touch_action.h",
    "graphics/touch_action_rect.cc",
    "graphics/touch_action_rect.h",
    "graphics/unaccelerated_static_bitmap_image.cc",
    "graphics/unaccelerated_static_bitmap_image.h",
    "graphics/video_frame_image_util.cc",
    "graphics/video_frame_image_util.h",
    "graphics/video_frame_resource_provider.cc",
    "graphics/video_frame_resource_provider.h",
    "graphics/video_frame_sink_bundle.cc",
    "graphics/video_frame_sink_bundle.h",
    "graphics/video_frame_submitter.cc",
    "graphics/video_frame_submitter.h",
    "graphics/visual_rect_flags.h",
    "graphics/viz_util.cc",
    "graphics/viz_util.h",
    "graphics/web_graphics_context_3d_provider_util.cc",
    "graphics/web_graphics_context_3d_provider_util.h",
    "graphics/web_graphics_context_3d_provider_wrapper.cc",
    "graphics/web_graphics_context_3d_provider_wrapper.h",
    "graphics/web_graphics_context_3d_video_frame_pool.cc",
    "graphics/web_graphics_context_3d_video_frame_pool.h",
    "heap_observer_set.h",
    "image-encoders/image_encoder.cc",
    "image-encoders/image_encoder.h",
    "image-encoders/image_encoder_utils.cc",
    "image-encoders/image_encoder_utils.h",
    "json/json_parser.cc",
    "json/json_parser.h",
    "json/json_values.cc",
    "json/json_values.h",
    "keyboard_codes.h",
    "language.cc",
    "language.h",
    "language_detection/detect.cc",
    "language_detection/detect.h",
    "link_hash.cc",
    "link_hash.h",
    "media/web_audio_source_provider_client.h",
    "media/web_audio_source_provider_impl.cc",
    "media_capabilities/web_audio_configuration.h",
    "media_capabilities/web_media_capabilities_info.h",
    "media_capabilities/web_media_configuration.h",
    "media_capabilities/web_video_configuration.h",
    "mediastream/aec_dump_agent_impl.cc",
    "mediastream/aec_dump_agent_impl.h",
    "mediastream/audio_service_audio_processor_proxy.cc",
    "mediastream/audio_service_audio_processor_proxy.h",
    "mediastream/media_constraints_consts.cc",
    "mediastream/media_constraints_consts.h",
    "mediastream/media_stream_audio_deliverer.h",
    "mediastream/media_stream_audio_level_calculator.cc",
    "mediastream/media_stream_audio_level_calculator.h",
    "mediastream/media_stream_audio_processor_options.cc",
    "mediastream/media_stream_audio_processor_options.h",
    "mediastream/media_stream_audio_source.cc",
    "mediastream/media_stream_audio_source.h",
    "mediastream/media_stream_audio_track.cc",
    "mediastream/media_stream_audio_track.h",
    "mediastream/media_stream_component.cc",
    "mediastream/media_stream_component.h",
    "mediastream/media_stream_component_impl.cc",
    "mediastream/media_stream_component_impl.h",
    "mediastream/media_stream_descriptor.cc",
    "mediastream/media_stream_descriptor.h",
    "mediastream/media_stream_source.cc",
    "mediastream/media_stream_source.h",
    "mediastream/media_stream_track_platform.cc",
    "mediastream/media_stream_track_platform.h",
    "mediastream/media_stream_web_audio_source.cc",
    "mediastream/media_stream_web_audio_source.h",
    "mediastream/transferred_media_stream_component.cc",
    "mediastream/transferred_media_stream_component.h",
    "mediastream/webaudio_destination_consumer.h",
    "mediastream/webaudio_media_stream_source.cc",
    "mediastream/webaudio_media_stream_source.h",
    "mediastream/webrtc_uma_histograms.cc",
    "mediastream/webrtc_uma_histograms.h",
    "mhtml/archive_resource.cc",
    "mhtml/archive_resource.h",
    "mhtml/mhtml_archive.cc",
    "mhtml/mhtml_archive.h",
    "mhtml/mhtml_parser.cc",
    "mhtml/mhtml_parser.h",
    "mhtml/serialized_resource.h",
    "mhtml/shared_buffer_chunk_reader.cc",
    "mhtml/shared_buffer_chunk_reader.h",
    "mojo/big_string_mojom_traits.h",
    "mojo/bluetooth_mojom_traits.cc",
    "mojo/bluetooth_mojom_traits.h",
    "mojo/browser_interface_broker_proxy_impl.cc",
    "mojo/browser_interface_broker_proxy_impl.h",
    "mojo/drag_mojom_traits.cc",
    "mojo/drag_mojom_traits.h",
    "mojo/fetch_api_request_headers_mojom_traits.h",
    "mojo/heap_mojo_associated_receiver.h",
    "mojo/heap_mojo_associated_receiver_set.h",
    "mojo/heap_mojo_associated_remote.h",
    "mojo/heap_mojo_associated_remote_set.h",
    "mojo/heap_mojo_receiver.h",
    "mojo/heap_mojo_receiver_set.h",
    "mojo/heap_mojo_remote.h",
    "mojo/heap_mojo_remote_set.h",
    "mojo/heap_mojo_unique_receiver_set.h",
    "mojo/heap_mojo_wrapper_mode.h",
    "mojo/kurl_mojom_traits.h",
    "mojo/mojo_binding_context.h",
    "mojo/security_origin_mojom_traits.h",
    "mojo/string16_mojom_traits.cc",
    "mojo/string16_mojom_traits.h",
    "p2p/empty_network_manager.cc",
    "p2p/empty_network_manager.h",
    "p2p/filtering_network_manager.cc",
    "p2p/filtering_network_manager.h",
    "p2p/host_address_request.cc",
    "p2p/host_address_request.h",
    "p2p/ipc_network_manager.cc",
    "p2p/ipc_network_manager.h",
    "p2p/ipc_socket_factory.cc",
    "p2p/ipc_socket_factory.h",
    "p2p/mdns_responder_adapter.cc",
    "p2p/mdns_responder_adapter.h",
    "p2p/network_list_manager.h",
    "p2p/network_list_observer.h",
    "p2p/network_manager_uma.h",
    "p2p/port_allocator.cc",
    "p2p/port_allocator.h",
    "p2p/socket_client.h",
    "p2p/socket_client_delegate.h",
    "p2p/socket_client_impl.cc",
    "p2p/socket_client_impl.h",
    "p2p/socket_dispatcher.cc",
    "p2p/socket_dispatcher.h",
    "peerconnection/audio_codec_factory.cc",
    "peerconnection/audio_codec_factory.h",
    "peerconnection/gpu_codec_support_waiter.cc",
    "peerconnection/gpu_codec_support_waiter.h",
    "peerconnection/instrumented_simulcast_adapter.cc",
    "peerconnection/instrumented_simulcast_adapter.h",
    "peerconnection/instrumented_video_encoder_wrapper.cc",
    "peerconnection/instrumented_video_encoder_wrapper.h",
    "peerconnection/linear_histogram.cc",
    "peerconnection/linear_histogram.h",
    "peerconnection/resolution_monitor.cc",
    "peerconnection/resolution_monitor.h",
    "peerconnection/rtc_answer_options_platform.h",
    "peerconnection/rtc_api_name.h",
    "peerconnection/rtc_dtmf_sender_handler.cc",
    "peerconnection/rtc_dtmf_sender_handler.h",
    "peerconnection/rtc_encoded_audio_stream_transformer.cc",
    "peerconnection/rtc_encoded_audio_stream_transformer.h",
    "peerconnection/rtc_encoded_video_stream_transformer.cc",
    "peerconnection/rtc_encoded_video_stream_transformer.h",
    "peerconnection/rtc_event_log_output_sink.h",
    "peerconnection/rtc_event_log_output_sink_proxy.cc",
    "peerconnection/rtc_event_log_output_sink_proxy.h",
    "peerconnection/rtc_ice_candidate_platform.cc",
    "peerconnection/rtc_ice_candidate_platform.h",
    "peerconnection/rtc_offer_options_platform.h",
    "peerconnection/rtc_peer_connection_handler_client.cc",
    "peerconnection/rtc_peer_connection_handler_client.h",
    "peerconnection/rtc_rtp_receiver_platform.cc",
    "peerconnection/rtc_rtp_receiver_platform.h",
    "peerconnection/rtc_rtp_sender_platform.cc",
    "peerconnection/rtc_rtp_sender_platform.h",
    "peerconnection/rtc_rtp_source.cc",
    "peerconnection/rtc_rtp_source.h",
    "peerconnection/rtc_rtp_transceiver_platform.cc",
    "peerconnection/rtc_rtp_transceiver_platform.h",
    "peerconnection/rtc_scoped_refptr_cross_thread_copier.h",
    "peerconnection/rtc_session_description_platform.cc",
    "peerconnection/rtc_session_description_platform.h",
    "peerconnection/rtc_session_description_request.h",
    "peerconnection/rtc_stats.cc",
    "peerconnection/rtc_stats.h",
    "peerconnection/rtc_video_decoder_adapter.cc",
    "peerconnection/rtc_video_decoder_adapter.h",
    "peerconnection/rtc_video_decoder_factory.cc",
    "peerconnection/rtc_video_decoder_factory.h",
    "peerconnection/rtc_video_decoder_fallback_recorder.cc",
    "peerconnection/rtc_video_decoder_fallback_recorder.h",
    "peerconnection/rtc_video_decoder_stream_adapter.cc",
    "peerconnection/rtc_video_decoder_stream_adapter.h",
    "peerconnection/rtc_video_encoder.cc",
    "peerconnection/rtc_video_encoder.h",
    "peerconnection/rtc_video_encoder_factory.cc",
    "peerconnection/rtc_video_encoder_factory.h",
    "peerconnection/rtc_void_request.h",
    "peerconnection/stats_collecting_decoder.cc",
    "peerconnection/stats_collecting_decoder.h",
    "peerconnection/stats_collecting_encoder.cc",
    "peerconnection/stats_collecting_encoder.h",
    "peerconnection/stats_collector.cc",
    "peerconnection/stats_collector.h",
    "peerconnection/two_keys_adapter_map.h",
    "peerconnection/video_codec_factory.cc",
    "peerconnection/video_codec_factory.h",
    "peerconnection/video_encoder_state_observer.h",
    "peerconnection/video_encoder_state_observer_impl.cc",
    "peerconnection/video_encoder_state_observer_impl.h",
    "peerconnection/vsync_provider.cc",
    "peerconnection/vsync_provider.h",
    "peerconnection/vsync_tick_provider.cc",
    "peerconnection/vsync_tick_provider.h",
    "peerconnection/webrtc_audio_sink.cc",
    "peerconnection/webrtc_audio_sink.h",
    "peerconnection/webrtc_decoding_info_handler.cc",
    "peerconnection/webrtc_decoding_info_handler.h",
    "peerconnection/webrtc_encoding_info_handler.cc",
    "peerconnection/webrtc_encoding_info_handler.h",
    "peerconnection/webrtc_util.cc",
    "peerconnection/webrtc_util.h",
    "peerconnection/webrtc_video_track_source.cc",
    "peerconnection/webrtc_video_track_source.h",
    "privacy_budget/identifiability_digest_helpers.cc",
    "privacy_budget/identifiability_digest_helpers.h",
    "region_capture_crop_id.cc",
    "region_capture_crop_id.h",
    "resolution_units.h",
    "restriction_target_id.h",
    "search_engine_utils.cc",
    "search_engine_utils.h",
    "sparse_vector.h",
    "storage/blink_storage_key.cc",
    "storage/blink_storage_key.h",
    "storage/blink_storage_key_hash.h",
    "storage/blink_storage_key_mojom_traits.cc",
    "supplementable.cc",
    "supplementable.h",
    "text/bidi_paragraph.cc",
    "text/bidi_paragraph.h",
    "text/capitalize.cc",
    "text/capitalize.h",
    "text/character.cc",
    "text/character.h",
    "text/character_emoji.cc",
    "text/character_property.h",
    "text/character_property_data.h",
    "text/character_variation_sequences.cc",
    "text/date_components.cc",
    "text/date_components.h",
    "text/date_time_format.cc",
    "text/date_time_format.h",
    "text/decode_escape_sequences.h",
    "text/emoji_segmentation_category.h",
    "text/emoji_segmentation_category_inline_header.h",
    "text/han_kerning_char_type.h",
    "text/hyphenation.cc",
    "text/hyphenation.h",
    "text/icu_error.cc",
    "text/icu_error.h",
    "text/layout_locale.cc",
    "text/layout_locale.h",
    "text/locale_icu.cc",
    "text/locale_icu.h",
    "text/locale_to_script_mapping.cc",
    "text/locale_to_script_mapping.h",
    "text/mathml_operator_dictionary.cc",
    "text/mathml_operator_dictionary.h",
    "text/platform_locale.cc",
    "text/platform_locale.h",
    "text/quotes_data.cc",
    "text/quotes_data.h",
    "text/segmented_string.cc",
    "text/segmented_string.h",
    "text/suffix_tree.h",
    "text/text_boundaries.cc",
    "text/text_boundaries.h",
    "text/text_break_iterator.cc",
    "text/text_break_iterator.h",
    "text/text_break_iterator_icu.cc",
    "text/text_break_iterator_internal_icu.cc",
    "text/text_break_iterator_internal_icu.h",
    "text/text_direction.cc",
    "text/text_direction.h",
    "text/text_encoding_detector.cc",
    "text/text_encoding_detector.h",
    "text/text_run.cc",
    "text/text_run.h",
    "text/truncation.h",
    "text/unicode_bidi.h",
    "text/unicode_range.cc",
    "text/unicode_range.h",
    "text/unicode_utilities.cc",
    "text/unicode_utilities.h",
    "text/web_entities.cc",
    "text/web_entities.h",
    "text/writing_direction_mode.cc",
    "text/writing_direction_mode.h",
    "text/writing_mode.cc",
    "text/writing_mode.h",
    "text/writing_mode_utils.h",
    "theme/web_theme_engine_conversions.cc",
    "theme/web_theme_engine_conversions.h",
    "theme/web_theme_engine_helper.cc",
    "theme/web_theme_engine_helper.h",
    "timer.cc",
    "timer.h",
    "transforms/affine_transform.cc",
    "transforms/affine_transform.h",
    "transforms/interpolated_transform_operation.cc",
    "transforms/interpolated_transform_operation.h",
    "transforms/matrix_3d_transform_operation.cc",
    "transforms/matrix_3d_transform_operation.h",
    "transforms/matrix_transform_operation.cc",
    "transforms/matrix_transform_operation.h",
    "transforms/perspective_transform_operation.cc",
    "transforms/perspective_transform_operation.h",
    "transforms/rotate_transform_operation.cc",
    "transforms/rotate_transform_operation.h",
    "transforms/rotation.cc",
    "transforms/rotation.h",
    "transforms/scale_transform_operation.cc",
    "transforms/scale_transform_operation.h",
    "transforms/skew_transform_operation.cc",
    "transforms/skew_transform_operation.h",
    "transforms/transform_operations.cc",
    "transforms/transform_operations.h",
    "transforms/translate_transform_operation.cc",
    "transforms/translate_transform_operation.h",
    "video_capture/video_capture_impl.cc",
    "video_capture/video_capture_impl.h",
    "video_capture/video_capturer_source.cc",
    "video_capture/video_capturer_source.h",
    "web_test_support.cc",
    "web_test_support.h",
    "weborigin/known_ports.cc",
    "weborigin/known_ports.h",
    "weborigin/kurl.cc",
    "weborigin/kurl.h",
    "weborigin/kurl_hash.h",
    "weborigin/origin_access_entry.cc",
    "weborigin/origin_access_entry.h",
    "weborigin/referrer.cc",
    "weborigin/referrer.h",
    "weborigin/reporting_disposition.h",
    "weborigin/scheme_registry.cc",
    "weborigin/scheme_registry.h",
    "weborigin/security_origin.cc",
    "weborigin/security_origin.h",
    "weborigin/security_policy.cc",
    "weborigin/security_policy.h",
    "webrtc/convert_to_webrtc_video_frame_buffer.cc",
    "webrtc/convert_to_webrtc_video_frame_buffer.h",
    "webrtc/peer_connection_remote_audio_source.cc",
    "webrtc/peer_connection_remote_audio_source.h",
    "webrtc/track_observer.cc",
    "webrtc/track_observer.h",
    "webrtc/webrtc_logging.cc",
    "webrtc/webrtc_source.h",
    "webrtc/webrtc_video_frame_adapter.cc",
    "webrtc/webrtc_video_frame_adapter.h",
    "webrtc/webrtc_video_utils.cc",
    "webrtc/webrtc_video_utils.h",
    "widget/compositing/blink_categorized_worker_pool_delegate.cc",
    "widget/compositing/blink_categorized_worker_pool_delegate.h",
    "widget/compositing/layer_tree_settings.cc",
    "widget/compositing/layer_tree_settings.h",
    "widget/compositing/layer_tree_view.cc",
    "widget/compositing/layer_tree_view.h",
    "widget/compositing/layer_tree_view_delegate.h",
    "widget/compositing/queue_report_time_swap_promise.cc",
    "widget/compositing/queue_report_time_swap_promise.h",
    "widget/compositing/render_frame_metadata_observer_impl.cc",
    "widget/compositing/render_frame_metadata_observer_impl.h",
    "widget/compositing/widget_compositor.cc",
    "widget/compositing/widget_compositor.h",
    "widget/compositing/widget_swap_queue.cc",
    "widget/compositing/widget_swap_queue.h",
    "widget/frame_widget.cc",
    "widget/frame_widget.h",
    "widget/input/compositor_thread_event_queue.cc",
    "widget/input/compositor_thread_event_queue.h",
    "widget/input/cursor_control_handler.cc",
    "widget/input/cursor_control_handler.h",
    "widget/input/elastic_overscroll_controller.cc",
    "widget/input/elastic_overscroll_controller.h",
    "widget/input/elastic_overscroll_controller_bezier.cc",
    "widget/input/elastic_overscroll_controller_bezier.h",
    "widget/input/elastic_overscroll_controller_exponential.cc",
    "widget/input/elastic_overscroll_controller_exponential.h",
    "widget/input/event_with_callback.cc",
    "widget/input/event_with_callback.h",
    "widget/input/frame_widget_input_handler_impl.cc",
    "widget/input/frame_widget_input_handler_impl.h",
    "widget/input/ime_event_guard.cc",
    "widget/input/ime_event_guard.h",
    "widget/input/input_event_prediction.cc",
    "widget/input/input_event_prediction.h",
    "widget/input/input_handler_proxy.cc",
    "widget/input/input_handler_proxy.h",
    "widget/input/input_handler_proxy_client.h",
    "widget/input/input_metrics.cc",
    "widget/input/input_metrics.h",
    "widget/input/main_thread_event_queue.cc",
    "widget/input/main_thread_event_queue.h",
    "widget/input/main_thread_event_queue_task.h",
    "widget/input/main_thread_event_queue_task_list.cc",
    "widget/input/main_thread_event_queue_task_list.h",
    "widget/input/prediction/filter_factory.cc",
    "widget/input/prediction/filter_factory.h",
    "widget/input/prediction/predictor_factory.cc",
    "widget/input/prediction/predictor_factory.h",
    "widget/input/scroll_predictor.cc",
    "widget/input/scroll_predictor.h",
    "widget/input/widget_base_input_handler.cc",
    "widget/input/widget_base_input_handler.h",
    "widget/input/widget_input_handler_impl.cc",
    "widget/input/widget_input_handler_impl.h",
    "widget/input/widget_input_handler_manager.cc",
    "widget/input/widget_input_handler_manager.h",
    "widget/widget_base.cc",
    "widget/widget_base.h",
    "widget/widget_base_client.h",
    "windows_keyboard_codes.h",
  ]

  sources -= blink_platform_avx_files

  # Add in the generated files.
  sources += get_target_outputs(":character_data") +
             get_target_outputs(":color_data") +
             get_target_outputs(":font_family_names") +
             get_target_outputs(":runtime_feature_state_override_context")

  foreach(_output, get_target_outputs(":runtime_enabled_features")) {
    if (get_path_info(_output, "extension") != "pickle") {
      sources += [ _output ]
    }
  }

  if (current_cpu == "loong64") {
    cflags = [
      "-mlsx",
      "-flax-vector-conversions=all",
    ]
  }

  if (is_apple) {
    sources += [
      "fonts/mac/font_platform_data_mac.h",
      "fonts/mac/font_platform_data_mac.mm",
    ]
  }

  if (is_mac) {
    sources += [
      "audio/mac/fft_frame_mac.cc",
      "audio/mac/vector_math_mac.h",
      "fonts/mac/attributed_string_type_converter.h",
      "fonts/mac/attributed_string_type_converter.mm",
      "fonts/mac/font_cache_mac.mm",
      "fonts/mac/font_matcher_mac.h",
      "fonts/mac/font_matcher_mac.mm",
      "mac/color_mac.h",
      "mac/color_mac.mm",
      "mac/graphics_context_canvas.h",
      "mac/graphics_context_canvas.mm",
      "text/locale_mac.h",
      "text/locale_mac.mm",
      "theme/web_theme_engine_mac.cc",
      "theme/web_theme_engine_mac.h",
    ]
  }

  if (is_ios) {
    sources += [ "fonts/ios/font_cache_ios.mm" ]
  }
  if (is_linux || is_chromeos) {
    sources += [
      "fonts/linux/font_cache_linux.cc",
      "fonts/linux/font_unique_name_lookup_linux.cc",
      "fonts/linux/font_unique_name_lookup_linux.h",
    ]
  }

  if (is_win) {
    sources += [
      "fonts/win/dwrite_font_format_support.cc",
      "fonts/win/dwrite_font_format_support.h",
      "fonts/win/font_cache_skia_win.cc",
      "fonts/win/font_fallback_win.cc",
      "fonts/win/font_fallback_win.h",
      "fonts/win/font_platform_data_win.cc",
      "fonts/win/font_unique_name_lookup_win.cc",
      "fonts/win/font_unique_name_lookup_win.h",
      "text/locale_win.cc",
      "text/locale_win.h",
    ]
  }

  configs += [
    ":blink_platform_pch",
    ":blink_platform_config",
    ":blink_platform_implementation",
    "//third_party/blink/renderer:non_test_config",
  ]

  include_dirs = []

  allow_circular_includes_from = [
    "//third_party/blink/renderer/platform/blob",
    "//third_party/blink/renderer/platform/heap:heap",
    "//third_party/blink/renderer/platform/instrumentation",
    "//third_party/blink/renderer/platform/loader:loader",
    "//third_party/blink/renderer/platform/network:network",
    "//third_party/blink/renderer/platform/scheduler",
  ]

  assert(use_libgav1_parser)

  public_deps = [
    ":allow_discouraged_type",
    ":blink_platform_public_deps",
    ":platform_export",
    "//gpu/command_buffer/client:raster_interface",
    "//media/capture:capture_lib",
    "//mojo/public/cpp/base",
    "//mojo/public/cpp/bindings",
    "//services/network/public/mojom:mojom_headers",
    "//third_party/blink/public/mojom:color_scheme_mojo_bindings",
    "//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings_blink",
    "//third_party/blink/renderer/platform/blob",
    "//third_party/blink/renderer/platform/heap",
    "//third_party/blink/renderer/platform/image-decoders:image_decoders",
    "//third_party/blink/renderer/platform/instrumentation",
    "//third_party/blink/renderer/platform/loader",
    "//third_party/blink/renderer/platform/network",
    "//third_party/blink/renderer/platform/scheduler",
    "//third_party/dawn/include/dawn:cpp_headers",
    "//third_party/fdlibm",
    "//third_party/pffft:pffft",
    "//ui/base/cursor",
    "//ui/gfx",
    "//ui/native_theme:features",
  ]
  deps = [
    "//base:base_static",
    "//base/allocator:buildflags",
    "//build:chromecast_buildflags",
    "//build:chromeos_buildflags",
    "//cc",
    "//cc/ipc",
    "//cc/mojo_embedder",
    "//components/language_detection/core:language_detection",
    "//components/paint_preview/common",
    "//components/search_engines:search_engine_utils",
    "//components/translate/core/language_detection:language_detection",
    "//components/viz/client",
    "//components/viz/common",
    "//components/webrtc:net_address_utils",
    "//crypto",
    "//device/vr/public/mojom:vr_service_blink",
    "//gin",
    "//gpu:gpu",
    "//gpu/command_buffer/client:webgpu_interface",
    "//gpu/webgpu:common",
    "//media",
    "//media/capture:capture_switches",
    "//media/capture/mojom:video_capture",
    "//media/mojo/clients:clients",
    "//media/webrtc:webrtc",
    "//mojo/public/cpp/bindings:wtf_support",
    "//services/metrics/public/cpp:ukm_builders",
    "//services/network/public/mojom:mojom_shared",
    "//services/service_manager/public/cpp",
    "//services/viz/public/cpp/gpu",
    "//skia",
    "//skia:skcms",
    "//third_party:freetype_buildflags",
    "//third_party:freetype_harfbuzz",
    "//third_party/abseil-cpp:absl",
    "//third_party/blink/public:image_resources",
    "//third_party/blink/public/common",
    "//third_party/blink/public/strings",
    "//third_party/blink/renderer/platform/wtf",
    "//third_party/ced",
    "//third_party/emoji-segmenter",
    "//third_party/icu",
    "//third_party/libgav1:libgav1_parser",
    "//third_party/libyuv",
    "//third_party/one_euro_filter",
    "//third_party/snappy:snappy",
    "//third_party/webrtc_overrides:webrtc_component",
    "//third_party/zlib/google:compression_utils",
    "//ui/base/cursor/mojom:cursor_type_blink",
    "//ui/base/prediction",
    "//ui/color",
    "//ui/color:mixers",
    "//ui/events/ipc",
    "//ui/gfx/geometry",
    "//ui/gfx/mojom",
    "//ui/gl:buildflags",
    "//ui/native_theme",
  ]

  if (has_zstd_compression) {
    deps += [
      "//third_party/zstd:compress",
      "//third_party/zstd:decompress",
    ]
  }

  if (use_dawn) {
    deps += [ "//third_party/dawn/src/dawn/wire" ]
  } else {
    # If Dawn is not used, use the proc table. This gives the WebGPU implementation
    # something to link to, though WebGPU won't be supported.
    deps += [ "//third_party/dawn/src/dawn:proc" ]
  }

  if (is_android) {
    deps += [ "//third_party/cpu_features:ndk_compat" ]
    sources += [
      "theme/web_theme_engine_android.cc",
      "theme/web_theme_engine_android.h",
    ]
  } else {
    sources += [
      "theme/web_theme_engine_default.cc",
      "theme/web_theme_engine_default.h",
    ]
  }

  if (is_mac) {
    sources -= [
      "fonts/skia/font_cache_skia.cc",
      "fonts/web_font_render_style.cc",

      # Uses LocaleMac instead.
      "text/locale_icu.cc",
      "text/locale_icu.h",
    ]

    deps += [ "//ui/base/mojom" ]

    frameworks = [
      "AppKit.framework",
      "Accelerate.framework",
      "Carbon.framework",
      "Foundation.framework",
    ]
  }

  if (is_win) {
    sources -= [
      # Uses LocaleWin instead.
      "text/locale_icu.cc",
      "text/locale_icu.h",
    ]
    cflags = [
      "/wd4334",  # Result of 32-bit shift implicitly converted to 64 bits.
      "/wd4724",  # Modulo by 0.
    ]
  }

  if (is_android) {
    sources += [
      "fonts/android/font_cache_android.cc",
      "fonts/android/font_unique_name_lookup_android.cc",
      "fonts/android/font_unique_name_lookup_android.h",
      "widget/input/synchronous_compositor_proxy.cc",
      "widget/input/synchronous_compositor_proxy.h",
    ]
    deps += [ "//third_party/blink/renderer/platform/widget/compositing/android_webview" ]
  }

  if (is_fuchsia) {
    sources += [ "fonts/fuchsia/font_cache_fuchsia.cc" ]
  }

  if (use_minikin_hyphenation) {
    sources += [
      "text/hyphenation/hyphenation_minikin.cc",
      "text/hyphenation/hyphenation_minikin.h",
      "text/hyphenation/hyphenator_aosp.cc",
      "text/hyphenation/hyphenator_aosp.h",
    ]
  } else if (is_apple) {
    sources += [ "text/apple/hyphenation_apple.cc" ]
  } else {
    sources += [ "text/hyphenation/hyphenation_null.cc" ]
  }

  if (current_cpu == "x86" || current_cpu == "x64") {
    deps += [ ":blink_x86_avx" ]
    sources += [ "audio/cpu/x86/delay_sse2.cc" ]
    allow_circular_includes_from += [ ":blink_x86_avx" ]
  }

  if (current_cpu == "arm64" || (current_cpu == "arm" && arm_use_neon)) {
    sources += [ "audio/cpu/arm/delay_neon.cc" ]
  }

  if (use_webaudio_pffft) {
    include_dirs += [ "//third_party/pffft/src" ]
    deps += [ "//third_party/pffft" ]
  }

  if (rtc_use_h265) {
    sources += [
      "peerconnection/h265_parameter_sets_tracker.cc",
      "peerconnection/h265_parameter_sets_tracker.h",
    ]
  }

  if (!is_debug && !optimize_for_size) {
    configs -= [ "//build/config/compiler:default_optimization" ]
    configs += [ "//build/config/compiler:optimize_max" ]
  }

  configs -= [ "//build/config/compiler:default_symbols" ]
  configs += blink_symbols_config
}

static_library("test_support") {
  visibility += [
    "//third_party/blink/*",
    "//tools/privacy_budget/font_indexer:*",
  ]
  testonly = true

  sources = [
    "graphics/color_correction_test_utils.cc",
    "graphics/color_correction_test_utils.h",
    "graphics/gpu/drawing_buffer_test_helpers.h",
    "graphics/paint/paint_controller_test.h",
    "graphics/test/fake_canvas_resource_host.h",
    "graphics/test/fake_gles2_interface.h",
    "graphics/test/fake_web_graphics_context_3d_provider.h",
    "graphics/test/gpu_memory_buffer_test_platform.h",
    "graphics/test/gpu_test_utils.cc",
    "graphics/test/gpu_test_utils.h",
    "graphics/test/mock_compositor_frame_sink.h",
    "graphics/test/mock_compositor_frame_sink_client.h",
    "graphics/test/mock_embedded_frame_sink_provider.h",
    "graphics/test/mock_frame_sink_bundle.h",
    "graphics/test/mock_image_decoder.h",
    "graphics/test/mock_paint_canvas.h",
    "graphics/test/stub_image.h",
    "graphics/test/test_webgraphics_shared_image_interface_provider.h",
    "testing/compositor_test.cc",
    "testing/compositor_test.h",
    "testing/empty_web_media_player.cc",
    "testing/empty_web_media_player.h",
    "testing/exception_state_matchers.cc",
    "testing/exception_state_matchers.h",
    "testing/fake_display_item_client.h",
    "testing/fake_mojo_binding_context.cc",
    "testing/fake_mojo_binding_context.h",
    "testing/find_cc_layer.cc",
    "testing/find_cc_layer.h",
    "testing/font_test_base.cc",
    "testing/font_test_base.h",
    "testing/font_test_helpers.cc",
    "testing/font_test_helpers.h",
    "testing/io_task_runner_testing_platform_support.cc",
    "testing/io_task_runner_testing_platform_support.h",
    "testing/layer_tree_host_embedder.cc",
    "testing/layer_tree_host_embedder.h",
    "testing/main_thread_isolate.cc",
    "testing/main_thread_isolate.h",
    "testing/message_loop_for_mojo.h",
    "testing/mock_context_lifecycle_notifier.h",
    "testing/noop_url_loader.cc",
    "testing/noop_url_loader.h",
    "testing/paint_property_test_helpers.h",
    "testing/paint_test_configurations.h",
    "testing/picture_matchers.cc",
    "testing/picture_matchers.h",
    "testing/renderer_fuzzing_support.cc",
    "testing/renderer_fuzzing_support.h",
    "testing/scoped_fake_ukm_recorder.cc",
    "testing/scoped_fake_ukm_recorder.h",
    "testing/scoped_main_thread_overrider.cc",
    "testing/scoped_main_thread_overrider.h",
    "testing/scoped_mocked_url.cc",
    "testing/scoped_mocked_url.h",
    "testing/scoped_scheduler_overrider.cc",
    "testing/scoped_scheduler_overrider.h",
    "testing/task_environment.cc",
    "testing/task_environment.h",
    "testing/test_paint_artifact.cc",
    "testing/test_paint_artifact.h",
    "testing/testing_platform_support.cc",
    "testing/testing_platform_support.h",
    "testing/testing_platform_support_with_mock_scheduler.cc",
    "testing/testing_platform_support_with_mock_scheduler.h",
    "testing/unit_test_helpers.cc",
    "testing/unit_test_helpers.h",
    "testing/url_loader_mock.cc",
    "testing/url_loader_mock.h",
    "testing/url_loader_mock_factory.h",
    "testing/url_loader_mock_factory_impl.cc",
    "testing/url_loader_mock_factory_impl.h",
    "testing/url_loader_test_delegate.cc",
    "testing/url_loader_test_delegate.h",
    "testing/url_test_helpers.cc",
    "testing/url_test_helpers.h",
    "testing/video_frame_utils.cc",
    "testing/video_frame_utils.h",
    "webrtc/testing/mock_webrtc_video_frame_adapter_shared_resources.h",
  ]

  # fuzzed_data_provider may not work with a custom toolchain.
  if (custom_toolchain == "" && is_clang) {
    sources += [
      "testing/fuzzed_data_provider.cc",
      "testing/fuzzed_data_provider.h",
    ]
  }

  configs += [
    ":blink_platform_pch",
    "//third_party/blink/renderer:config",
    "//third_party/blink/renderer:inside_blink",
    "//third_party/blink/renderer:non_test_config",
  ]

  public_deps = [
    ":platform",
    "//cc",
    "//cc:test_support",
    "//components/viz/test:test_support",
    "//gpu:raster",
    "//testing/gmock",
    "//testing/gtest:gtest",
    "//testing/perf",
    "//third_party/blink/public:test_headers",
    "//third_party/blink/renderer/platform/blob:test_support",
    "//third_party/blink/renderer/platform/heap:test_support",
    "//third_party/blink/renderer/platform/loader:test_support",
    "//third_party/blink/renderer/platform/media:test_support",
    "//third_party/blink/renderer/platform/scheduler:test_support",
    "//ui/gfx:test_support",
  ]

  deps = [
    "//base/test:test_support",
    "//components/ukm:test_support",
    "//gin",
    "//media:test_support",
    "//mojo/core/embedder",
    "//mojo/public/cpp/bindings",
    "//services/service_manager/public/cpp",
    "//skia",
    "//skia:skcms",
    "//testing/libfuzzer:renderer_fuzzing",
    "//third_party/blink/public/common:common",
    "//third_party/blink/renderer/modules:modules",
    "//third_party/blink/renderer/platform/network:test_support",
  ]
  allow_circular_includes_from =
      [ "//third_party/blink/renderer/platform/loader:test_support" ]

  if (is_win) {
    cflags = [ "/wd4267" ]  # Truncation from size_t to int.
  }
}

test("blink_platform_unittests") {
  deps = [ ":blink_platform_unittests_sources" ]

  if (enable_nocompile_tests) {
    deps += [ ":blink_platform_nocompile_tests" ]
  }

  if (is_fuchsia) {
    additional_manifest_fragments = [
      "//build/config/fuchsia/test/test_fonts.shard.test-cml",
      "//build/config/fuchsia/test/mark_vmo_executable.shard.test-cml",
    ]
  }

  if (is_android) {
    deps += [
      # Required because of an indirect dependency on //media/base/android via
      # platform/media:unit_tests.
      "//media/base/android:media_java",

      # Required to disable broken tests.
      "//testing/buildbot/filters:blink_platform_unittests",
    ]
  }
  if (is_ios) {
    bundle_deps = [
      ":blink_platform_unittests_bundle_data",
      "//media:unit_tests_bundle_data",
      "//testing/buildbot/filters:blink_platform_unittests_filters_bundle_data",
    ]
  }
}

if (enable_nocompile_tests) {
  nocompile_source_set("blink_platform_nocompile_tests") {
    sources = [
      "wtf/functional_nocompile.nc",
      "wtf/text/string_view_nocompile.nc",
    ]

    deps = [
      ":platform",
      "//base",
    ]
  }
}

source_set("blink_platform_unittests_sources") {
  visibility = []  # Allow re-assignment of list.
  visibility = [ "*" ]
  testonly = true

  sources = [
    "animation/animation_translation_util_test.cc",
    "animation/compositor_animation_test.cc",
    "animation/timing_function_test.cc",
    "audio/audio_destination_test.cc",
    "audio/audio_frame_stats_accumulator_test.cc",
    "audio/push_pull_fifo_multithread_test.cc",
    "audio/push_pull_fifo_test.cc",
    "audio/vector_math_test.cc",
    "bindings/parkable_string_test.cc",
    "bindings/runtime_call_stats_test.cc",
    "bindings/transform_view_test.cc",
    "disk_data_allocator_test.cc",
    "disk_data_allocator_test_utils.h",
    "exported/file_path_conversion_test.cc",
    "exported/page_zoom_test.cc",
    "exported/video_capture/web_video_capture_impl_manager_test.cc",
    "exported/web_icon_sizes_parser_test.cc",
    "exported/web_screen_info_test.cc",
    "exported/web_string_test.cc",
    "exported/web_vector_test.cc",
    "fonts/bitmap_glyphs_block_list_test.cc",
    "fonts/cursor_position_test.cc",
    "fonts/fallback_list_composite_key_test.cc",
    "fonts/font_cache_test.cc",
    "fonts/font_description_test.cc",
    "fonts/font_fallback_iterator_test.cc",
    "fonts/font_family_test.cc",
    "fonts/font_global_context_test.cc",
    "fonts/font_palette_test.cc",
    "fonts/font_platform_data_test.cc",
    "fonts/font_selection_types_test.cc",
    "fonts/font_size_adjust_test.cc",
    "fonts/font_test.cc",
    "fonts/font_test_utilities.cc",
    "fonts/generic_font_family_settings_test.cc",
    "fonts/opentype/font_format_check_test.cc",
    "fonts/opentype/font_settings_test.cc",
    "fonts/opentype/open_type_baseline_metrics_test.cc",
    "fonts/opentype/open_type_cpal_lookup_test.cc",
    "fonts/opentype/open_type_math_support_test.cc",
    "fonts/opentype/open_type_vertical_data_test.cc",
    "fonts/opentype/variable_axes_names_test.cc",
    "fonts/orientation_iterator_test.cc",
    "fonts/palette_interpolation_test.cc",
    "fonts/script_run_iterator_test.cc",
    "fonts/shaping/caching_word_shaper_test.cc",
    "fonts/shaping/font_features_test.cc",
    "fonts/shaping/han_kerning_test.cc",
    "fonts/shaping/harfbuzz_face_test.cc",
    "fonts/shaping/harfbuzz_shaper_test.cc",
    "fonts/shaping/ng_shape_cache_test.cc",
    "fonts/shaping/run_segmenter_test.cc",
    "fonts/shaping/shape_result_bloberizer_test.cc",
    "fonts/shaping/shape_result_run_info_test.cc",
    "fonts/shaping/shape_result_spacing_test.cc",
    "fonts/shaping/shape_result_test.cc",
    "fonts/shaping/shape_result_view_test.cc",
    "fonts/shaping/shaping_line_breaker_test.cc",
    "fonts/shaping/stretchy_operator_shaper_test.cc",
    "fonts/shaping/text_auto_space_test.cc",
    "fonts/small_caps_iterator_test.cc",
    "fonts/symbols_iterator_test.cc",
    "fonts/typesetting_features_test.cc",
    "fonts/unicode_range_set_test.cc",
    "fonts/utf16_ragel_iterator_test.cc",
    "fonts/web_font_typeface_factory_test.cc",
    "geometry/calculation_expression_node_test.cc",
    "geometry/float_polygon_test.cc",
    "geometry/float_rounded_rect_test.cc",
    "geometry/layout_unit_test.cc",
    "geometry/length_functions_test.cc",
    "geometry/length_test.cc",
    "geometry/math_functions_test.cc",
    "graphics/accelerated_static_bitmap_image_test.cc",
    "graphics/bitmap_image_test.cc",
    "graphics/color_test.cc",
    "graphics/compositing/chunk_to_layer_mapper_test.cc",
    "graphics/compositing/paint_artifact_compositor_test.cc",
    "graphics/compositing/paint_chunks_to_cc_layer_test.cc",
    "graphics/compositing/pending_layer_test.cc",
    "graphics/compositor_element_id_test.cc",
    "graphics/dark_mode_color_classifier_test.cc",
    "graphics/dark_mode_filter_test.cc",
    "graphics/dark_mode_image_cache_test.cc",
    "graphics/dark_mode_image_classifier_test.cc",
    "graphics/dark_mode_lab_color_space_test.cc",
    "graphics/decoding_image_generator_test.cc",
    "graphics/deferred_image_decoder_test_wo_platform.cc",
    "graphics/filters/fe_composite_test.cc",
    "graphics/filters/image_filter_builder_test.cc",
    "graphics/gpu/drawing_buffer_test.cc",
    "graphics/gpu/shared_gpu_context_test.cc",
    "graphics/gpu/webgl_image_conversion_test.cc",
    "graphics/gpu/webgpu_native_test_support.cc",
    "graphics/gpu/webgpu_native_test_support.h",
    "graphics/gpu/webgpu_resource_provider_cache_test.cc",
    "graphics/gpu/webgpu_swap_buffer_provider_test.cc",
    "graphics/graphics_context_test.cc",
    "graphics/paint/cull_rect_test.cc",
    "graphics/paint/display_item_raster_invalidator_test.cc",
    "graphics/paint/display_item_test.cc",
    "graphics/paint/drawing_display_item_test.cc",
    "graphics/paint/drawing_recorder_test.cc",
    "graphics/paint/float_clip_rect_test.cc",
    "graphics/paint/geometry_mapper_test.cc",
    "graphics/paint/geometry_mapper_transform_cache_test.cc",
    "graphics/paint/paint_chunk_test.cc",
    "graphics/paint/paint_chunker_test.cc",
    "graphics/paint/paint_controller_test.cc",
    "graphics/paint/paint_property_node_test.cc",
    "graphics/paint/paint_record_builder_test.cc",
    "graphics/paint/paint_under_invalidation_checker_test.cc",
    "graphics/paint/raster_invalidator_test.cc",
    "graphics/paint/scrollbar_display_item_test.cc",
    "graphics/paint_invalidation_reason_test.cc",
    "graphics/parkable_image_segment_reader_test.cc",
    "graphics/parkable_image_test.cc",
    "graphics/path_test.cc",
    "graphics/raster_dark_mode_filter_impl_test.cc",
    "graphics/video_frame_image_util_test.cc",
    "graphics/video_frame_sink_bundle_test.cc",
    "graphics/video_frame_submitter_test.cc",
    "heap_observer_set_test.cc",
    "json/json_parser_test.cc",
    "json/json_values_test.cc",
    "media/web_audio_source_provider_impl_test.cc",
    "mediastream/audio_service_audio_processor_proxy_test.cc",
    "mediastream/media_stream_audio_processor_options_test.cc",
    "mediastream/media_stream_audio_test.cc",
    "mediastream/media_stream_source_test.cc",
    "mediastream/transferred_media_stream_component_test.cc",
    "mediastream/webrtc_uma_histograms_test.cc",
    "mhtml/mhtml_parser_test.cc",
    "mojo/big_string_mojom_traits_test.cc",
    "mojo/heap_mojo_associated_receiver_set_test.cc",
    "mojo/heap_mojo_associated_receiver_test.cc",
    "mojo/heap_mojo_associated_remote_set_test.cc",
    "mojo/heap_mojo_associated_remote_test.cc",
    "mojo/heap_mojo_receiver_set_test.cc",
    "mojo/heap_mojo_receiver_test.cc",
    "mojo/heap_mojo_remote_set_test.cc",
    "mojo/heap_mojo_remote_test.cc",
    "mojo/heap_mojo_unique_receiver_set_test.cc",
    "mojo/kurl_security_origin_test.cc",
    "mojo/string16_mojom_traits_test.cc",
    "p2p/filtering_network_manager_test.cc",
    "p2p/ipc_network_manager_test.cc",
    "p2p/ipc_socket_factory_test.cc",
    "p2p/socket_client_impl_test.cc",
    "peerconnection/coalesced_tasks_test.cc",
    "peerconnection/instrumented_simulcast_adapter_test.cc",
    "peerconnection/instrumented_video_encoder_wrapper_test.cc",
    "peerconnection/linear_histogram_test.cc",
    "peerconnection/low_precision_timer_test.cc",
    "peerconnection/metronome_source_test.cc",
    "peerconnection/resolution_monitor_unittest.cc",
    "peerconnection/rtc_encoded_audio_stream_transformer_test.cc",
    "peerconnection/rtc_encoded_video_stream_transformer_test.cc",
    "peerconnection/rtc_ice_candidate_platform_test.cc",
    "peerconnection/rtc_rtp_source_test.cc",
    "peerconnection/rtc_video_decoder_adapter_test.cc",
    "peerconnection/rtc_video_decoder_factory_test.cc",
    "peerconnection/rtc_video_decoder_stream_adapter_test.cc",
    "peerconnection/rtc_video_encoder_factory_test.cc",
    "peerconnection/rtc_video_encoder_test.cc",
    "peerconnection/stats_collecting_decoder_test.cc",
    "peerconnection/stats_collecting_encoder_test.cc",
    "peerconnection/stats_collector_test.cc",
    "peerconnection/task_queue_factory_test.cc",
    "peerconnection/timer_based_tick_provider_test.cc",
    "peerconnection/two_keys_adapter_map_unittest.cc",
    "peerconnection/video_codec_factory_test.cc",
    "peerconnection/video_encoder_state_observer_impl_test.cc",
    "peerconnection/vsync_tick_provider_test.cc",
    "peerconnection/webrtc_audio_sink_test.cc",
    "peerconnection/webrtc_decoding_info_handler_test.cc",
    "peerconnection/webrtc_encoding_info_handler_test.cc",
    "peerconnection/webrtc_video_track_source_test.cc",
    "region_capture_crop_id_test.cc",
    "runtime_enabled_features_test.cc",
    "sparse_vector_test.cc",
    "storage/blink_storage_key_mojom_traits_test.cc",
    "storage/blink_storage_key_test.cc",
    "text/bidi_paragraph_test.cc",
    "text/capitalize_test.cc",
    "text/character_test.cc",
    "text/date_time_format_test.cc",
    "text/hyphenation_test.cc",
    "text/icu_error_test.cc",
    "text/layout_locale_test.cc",
    "text/mathml_operator_dictionary_test.cc",
    "text/platform_locale_test.cc",
    "text/segmented_string_test.cc",
    "text/suffix_tree_test.cc",
    "text/text_break_iterator_test.cc",
    "text/text_encoding_detector_test.cc",
    "text/text_run_test.cc",
    "text/unicode_utilities_test.cc",
    "text/writing_direction_mode_test.cc",
    "text/writing_mode_utils_test.cc",
    "theme/web_theme_engine_test.cc",
    "timer_test.cc",
    "transforms/affine_transform_test.cc",
    "transforms/rotation_test.cc",
    "transforms/transform_operations_test.cc",
    "video_capture/gpu_memory_buffer_test_support.cc",
    "video_capture/gpu_memory_buffer_test_support.h",
    "video_capture/video_capture_impl_test.cc",
    "weborigin/known_ports_test.cc",
    "weborigin/kurl_test.cc",
    "weborigin/scheme_registry_test.cc",
    "weborigin/security_origin_test.cc",
    "weborigin/security_policy_test.cc",
    "webrtc/convert_to_webrtc_video_frame_buffer_test.cc",
    "webrtc/webrtc_video_frame_adapter_test.cc",
    "widget/compositing/layer_tree_settings_unittest.cc",
    "widget/compositing/layer_tree_view_unittest.cc",
    "widget/compositing/render_frame_metadata_observer_impl_unittest.cc",
    "widget/compositing/test/stub_layer_tree_view_delegate.h",
    "widget/compositing/widget_compositor_unittest.cc",
    "widget/input/elastic_overscroll_controller_bezier_unittest.cc",
    "widget/input/elastic_overscroll_controller_exponential_unittest.cc",
    "widget/input/input_event_prediction_unittest.cc",
    "widget/input/input_handler_proxy_unittest.cc",
    "widget/input/main_thread_event_queue_unittest.cc",
    "widget/input/prediction/filter_factory_unittests.cc",
    "widget/input/scroll_predictor_unittest.cc",
  ]

  if (rtc_use_h265) {
    sources += [ "peerconnection/h265_parameter_sets_tracker_unittest.cc" ]
  }

  if (is_android) {
    sources += [ "fonts/android/font_cache_android_test.cc" ]
  } else if (is_win) {
    sources += [ "text/locale_win_test.cc" ]
  } else if (is_mac) {
    sources += [
      "fonts/mac/font_cache_mac_test.mm",
      "fonts/mac/font_matcher_mac_test.mm",
      "fonts/mac/font_platform_data_mac_test.mm",
      "fonts/opentype/open_type_caps_support_test.mm",
      "mac/graphics_context_canvas_test.mm",
      "text/locale_mac_test.mm",
    ]
  } else if (is_posix || is_fuchsia) {
    sources += [ "text/locale_icu_test.cc" ]
  }

  sources += [ "testing/run_all_tests.cc" ]

  configs += [
    ":blink_platform_pch",
    "//third_party/blink/renderer/platform/wtf:wtf_config",
    "//third_party/blink/renderer:config",
  ]

  deps = [
    ":platform",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//build:chromeos_buildflags",
    "//cc",
    "//cc:test_support",
    "//gin:gin",
    "//media:test_support",
    "//media/capture/mojom:video_capture",
    "//media/mojo:test_support",
    "//media/webrtc:webrtc",
    "//mojo/core/embedder",
    "//mojo/public/cpp/bindings/tests:for_blink_tests",
    "//mojo/public/cpp/test_support:test_utils",
    "//mojo/public/interfaces/bindings/tests:test_interfaces_blink",
    "//net/traffic_annotation:test_support",
    "//services/network/public/cpp:test_support",
    "//services/viz/public/mojom",
    "//skia",
    "//skia:skcms",
    "//skia:test_fonts",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party:freetype_harfbuzz",
    "//third_party/blink/public:test_headers",
    "//third_party/blink/public/strings:strings",
    "//third_party/blink/renderer/platform/blob:unit_tests",
    "//third_party/blink/renderer/platform/image-decoders:unit_tests",
    "//third_party/blink/renderer/platform/instrumentation:unit_tests",
    "//third_party/blink/renderer/platform/loader:unit_tests",
    "//third_party/blink/renderer/platform/media:unit_tests",
    "//third_party/blink/renderer/platform/network:unit_tests",
    "//third_party/blink/renderer/platform/scheduler:unit_tests",
    "//third_party/blink/renderer/platform/wtf",
    "//third_party/dawn/src/dawn/native",
    "//third_party/dawn/src/dawn/wire",
    "//third_party/libyuv",
    "//third_party/webrtc/api/task_queue:task_queue_test",
    "//third_party/webrtc_overrides:metronome_like_task_queue_test",
    "//third_party/webrtc_overrides:webrtc_component",
    "//ui/base:features",
    "//ui/base/prediction",
    "//ui/gfx",
    "//ui/gfx:test_support",
    "//ui/gfx/geometry",
    "//ui/gfx/geometry/mojom:test_interfaces_blink",
    "//ui/gfx/mojom:test_interfaces_blink",
    "//url",
    "//url:url_test_support",
    "//url/mojom:test_url_mojom_gurl_blink",
  ]

  deps += [ ":bridge_ice_controller_tests" ]

  data_deps = [ ":blink_platform_unittests_data" ]

  defines = [ "INSIDE_BLINK" ]
  if (use_minikin_hyphenation) {
    defines += [ "USE_MINIKIN_HYPHENATION" ]
  }
}

source_set("bridge_ice_controller_tests") {
  visibility = []  # Allow re-assignment of list.
  visibility = [ ":*" ]
  testonly = true

  sources = [
    "peerconnection/bridge_ice_controller_test.cc",
    "peerconnection/fake_connection_factory_test.cc",
    "peerconnection/fake_connection_test_base.h",
    "peerconnection/ice_proposal_test.cc",
    "peerconnection/webrtc_connection_matchers.h",
  ]

  deps = [
    ":test_support",
    "//components/webrtc:thread_wrapper",
    "//third_party/webrtc_overrides:ice_controller_test_utils",
    "//third_party/webrtc_overrides:webrtc_component",
  ]
}

if (is_ios) {
  bundle_data_from_filelist("blink_platform_unittests_bundle_data") {
    testonly = true
    filelist_name = "blink_platform_unittests_bundle_data.filelist"
  }
}

executable("image_decode_bench") {
  visibility = []  # Allow re-assignment of list.
  visibility = [ "*" ]

  sources = [ "testing/image_decode_bench.cc" ]

  deps = [
    ":platform",
    "//base",
    "//mojo/core/embedder",
    "//third_party/blink/renderer/platform/wtf",
  ]

  configs += [
    "//third_party/blink/renderer/platform/wtf:wtf_config",
    "//third_party/blink/renderer:config",
  ]

  defines = [ "INSIDE_BLINK" ]
}

executable("image_decode_to_nia") {
  visibility = []  # Allow re-assignment of list.
  visibility = [ "*" ]

  sources = [ "testing/image_decode_to_nia.cc" ]

  deps = [
    ":platform",
    "//base",
    "//third_party/blink/renderer/platform/wtf",
  ]

  configs += [
    "//third_party/blink/renderer/platform/wtf:wtf_config",
    "//third_party/blink/renderer:config",
  ]

  defines = [ "INSIDE_BLINK" ]
}

test("blink_platform_perftests") {
  sources = [
    "testing/blink_perf_test_suite.cc",
    "testing/blink_perf_test_suite.h",
    "testing/run_all_perf_tests.cc",
    "testing/shape_result_perf_test.cc",
    "testing/shaping_line_breaker_perf_test.cc",
  ]

  configs += [
    "//third_party/blink/renderer/platform/wtf:wtf_config",
    "//third_party/blink/renderer:config",
  ]

  deps = [
    ":platform",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//gin:gin",
    "//mojo/public/cpp/bindings/tests:for_blink_tests",
    "//mojo/public/cpp/test_support:test_utils",
    "//mojo/public/interfaces/bindings/tests:test_interfaces_blink",
    "//services/network/public/cpp:cpp",
    "//testing/gtest",
    "//testing/perf",
    "//third_party:freetype_harfbuzz",
  ]
}

group("blink_platform_unittests_data") {
  testonly = true

  data = [
    "testing/data/",

    # Required by some image decoder tests.
    "image-decoders/testing/",
    "//third_party/blink/web_tests/images/resources/",
    "//third_party/blink/web_tests/images/bmp-suite/",

    # Required by some font tests.
    "//third_party/blink/web_tests/external/wpt/fonts/",
    "//third_party/blink/web_tests/external/wpt/css/css-fonts/resources",
    "//third_party/blink/web_tests/third_party/",
  ]

  data_deps = [ "//third_party/hyphenation-patterns:test_data" ]
}

if (current_cpu == "x86" || current_cpu == "x64") {
  source_set("blink_x86_avx") {
    sources = blink_platform_avx_files
    configs += [
      ":blink_platform_config",
      ":blink_platform_implementation",
      "//third_party/blink/renderer:non_test_config",
    ]
    public_deps = [ ":blink_platform_public_deps" ]
    if (is_win) {
      cflags = [ "/arch:AVX" ]
    } else {
      cflags = [ "-mavx" ]
    }
  }
}

test("blink_fuzzer_unittests") {
  deps = [
    ":test_support",
    "//base/test:test_support",
    "//gin:gin",
    "//mojo/core/embedder:embedder",
    "//skia:test_fonts",
    "//third_party/blink/public:test_support",
  ]

  sources = [ "testing/run_all_tests.cc" ]

  if (is_linux || is_chromeos || is_fuchsia) {
    deps += [
      "//third_party/blink/renderer/platform/scheduler:scheduler_fuzzer_tests",
    ]
  }

  if (is_fuchsia) {
    additional_manifest_fragments = [
      "//build/config/fuchsia/test/test_fonts.shard.test-cml",
      "//build/config/fuchsia/test/mark_vmo_executable.shard.test-cml",
    ]
  }
}

# This source set is used for fuzzers that need an environment similar to unit
# tests.
source_set("blink_fuzzer_test_support") {
  testonly = true
  visibility = []  # Allow re-assignment of list.
  visibility = [ "*" ]
  sources = [
    "testing/blink_fuzzer_test_support.cc",
    "testing/blink_fuzzer_test_support.h",
  ]
  public_deps = [ ":test_support" ]
  deps = [
    ":platform",
    "//base/test:test_config",
    "//content/test:test_support",
  ]
}

# Fuzzer for WTF::unicode::MathVariant.
fuzzer_test("math_transform_fuzzer") {
  sources = [ "math_transform_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  libfuzzer_options = [ "max_len=10" ]
  dict = "//testing/libfuzzer/fuzzers/dicts/math_transform.dict"
}

fuzzer_test("layout_locale_fuzzer") {
  sources = [ "text/layout_locale_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
}

fuzzer_test("segmented_string_fuzzer") {
  sources = [ "text/segmented_string_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
}

# Fuzzer for blink::FindCategory.
fuzzer_test("mathml_operator_dictionary_fuzzer") {
  sources = [ "text/mathml_operator_dictionary_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  libfuzzer_options = [ "max_len=10" ]
  dict = "//testing/libfuzzer/fuzzers/dicts/mathml_operator_dictionary.dict"
}

if (rtc_use_h265) {
  # Fuzzer for blink::H265ParameterSetsTracker
  fuzzer_test("h265_parameter_sets_tracker_fuzzer") {
    sources = [ "peerconnection/h265_parameter_sets_tracker_fuzzer.cc" ]
    deps = [
      ":blink_fuzzer_test_support",
      ":platform",
    ]
    libfuzzer_options = [ "rss_limit_mb=8192" ]
  }
}

# Fuzzer for blink::OpenTypeMathSupportTest.
fuzzer_test("open_type_math_support_fuzzer") {
  sources = [ "fonts/opentype/open_type_math_support_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [
    "//third_party/blink/web_tests/external/wpt/fonts/math",
    "//testing/libfuzzer/fuzzers/woff2_corpus",
  ]
}

# Fuzzer for blink::StretchyOperatorShaper
fuzzer_test("stretchy_operator_shaper_fuzzer") {
  sources = [ "fonts/shaping/stretchy_operator_shaper_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [
    "//third_party/blink/web_tests/external/wpt/fonts/math",
    "//testing/libfuzzer/fuzzers/woff2_corpus",
  ]
}

# Fuzzer for blink::MHTMLParser.
fuzzer_test("mhtml_parser_fuzzer") {
  sources = [ "mhtml/mhtml_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  dict = "//testing/libfuzzer/fuzzers/dicts/mhtml.dict"
  seed_corpus = "//third_party/blink/web_tests/mhtml"
  additional_configs = [
    "//third_party/blink/renderer/platform/wtf:wtf_config",
    "//third_party/blink/renderer:config",
  ]
}

# Fuzzer for blink::WebIconSizesParser.
fuzzer_test("web_icon_sizes_fuzzer") {
  sources = [ "exported/web_icon_sizes_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  dict = "//testing/libfuzzer/fuzzers/dicts/web_icon_sizes.dict"
}

# Fuzzer for blink::AVIFImageDecoder
fuzzer_test("blink_avif_decoder_fuzzer") {
  sources = [ "image-decoders/avif/avif_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [ "//third_party/blink/web_tests/images/resources/avif" ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

# Fuzzer for blink::CrabbyAVIFImageDecoder
fuzzer_test("blink_crabbyavif_decoder_fuzzer") {
  sources = [ "image-decoders/avif/crabbyavif_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [ "//third_party/blink/web_tests/images/resources/avif" ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

# Fuzzer for blink::ICOImageDecoder.
fuzzer_test("blink_ico_decoder_fuzzer") {
  sources = [ "image-decoders/ico/ico_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [ "//third_party/blink/web_tests/images/resources/icofuzz" ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

# Fuzzer for blink::GIFImageDecoder
fuzzer_test("blink_gif_decoder_fuzzer") {
  sources = [ "image-decoders/gif/gif_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [ "//third_party/blink/web_tests/images/resources/giffuzz" ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

fuzzer_test("blink_png_decoder_fuzzer") {
  sources = [ "image-decoders/png/png_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
    "//third_party/libpng",
  ]
  dict = "//testing/libfuzzer/fuzzers/dicts/png.dict"
  seed_corpuses = [
    "//components/test/data/viz",
    "//third_party/blink/web_tests/images/png-suite/samples",
    "//third_party/blink/web_tests/images/resources/pngfuzz",
  ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

fuzzer_test("blink_jpeg_decoder_fuzzer") {
  sources = [ "image-decoders/jpeg/jpeg_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [ "//third_party/blink/web_tests/images/resources/jpegfuzz" ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

# Fuzzer for blink::WEBPImageDecoder.
fuzzer_test("blink_webp_decoder_fuzzer") {
  sources = [ "image-decoders/webp/webp_image_decoder_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  seed_corpuses = [ "//third_party/blink/web_tests/images/resources/webpfuzz" ]
  libfuzzer_options = [ "rss_limit_mb=8192" ]
}

# Fuzzer for blink::DateTimeFormat.
fuzzer_test("blink_date_time_format_fuzzer") {
  sources = [ "text/date_time_format_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  dict = "//testing/libfuzzer/fuzzers/dicts/date.dict"
  seed_corpus = "text/date_time_format_fuzzer_seed_corpus"
}

# Fuzzer for blink::JSONParser.
fuzzer_test("blink_json_parser_fuzzer") {
  sources = [ "json/json_parser_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  dict = "//testing/libfuzzer/fuzzers/dicts/json.dict"
}

# Fuzzer for blink::SecurityOrigin.
fuzzer_test("blink_security_origin_fuzzer") {
  sources = [ "weborigin/security_origin_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  dict = "//url/gurl_fuzzer.dict"
  defines = [ "INSIDE_BLINK" ]
}

fuzzer_test("blink_harfbuzz_shaper_fuzzer") {
  sources = [ "fonts/shaping/harfbuzz_shaper_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
    "//third_party/icu",
  ]
  libfuzzer_options = [ "max_len=256" ]
}

fuzzer_test("blink_http_parsers_fuzzer") {
  sources = [ "network/http_parsers_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    ":platform",
  ]
  dict = "network/HTTPParsersFuzzer.dict"
}

fuzzer_test("blink_storage_key_fuzzer") {
  sources = [ "storage/blink_storage_key_fuzzer.cc" ]
  deps = [
    ":blink_fuzzer_test_support",
    "//third_party/blink/public/common",
  ]
  seed_corpus = "//third_party/blink/common/storage_key/storage_key_corpus"
}

# Fuzzer template for WTF::TextCodec.
template("blink_text_codec_fuzzer") {
  forward_variables_from(invoker, "*")
  config(target_name + "_config") {
    defines = [ "$target_name" ]
  }
  name = target_name
  fuzzer_test("blink_text_codec_" + name + "_fuzzer") {
    sources = [ "text_codec_fuzzer.cc" ]
    deps = [
      ":blink_fuzzer_test_support",
      ":platform",
    ]
    additional_configs = [ ":" + name + "_config" ]
    seed_corpus = "text_codec_fuzzer_seed_corpus"
  }
}

blink_text_codec_fuzzer("UTF_8") {
}

blink_text_codec_fuzzer("WINDOWS_1252") {
}

# NOTE: These are legacy unit tests and tests that require a Platform
# object. Do not add more unless the test requires a Platform object.
# These tests are a part of the blink_unittests binary.
source_set("unit_tests") {
  testonly = true
  visibility = []
  visibility = [ "//third_party/blink/renderer/*" ]
  sources = [
    "graphics/animation_worklet_mutator_dispatcher_impl_test.cc",
    "graphics/canvas_2d_layer_bridge_test.cc",
    "graphics/canvas_color_params_test.cc",
    "graphics/canvas_hibernation_handler_test.cc",
    "graphics/canvas_resource_dispatcher_test.cc",
    "graphics/canvas_resource_host_test.cc",
    "graphics/canvas_resource_provider_test.cc",
    "graphics/canvas_resource_test.cc",
    "graphics/deferred_image_decoder_test.cc",
    "graphics/gpu/drawing_buffer_software_rendering_test.cc",
    "graphics/image_decoding_store_test.cc",
    "graphics/image_frame_generator_test.cc",
    "graphics/offscreen_canvas_placeholder_test.cc",
    "graphics/paint_worklet_paint_dispatcher_test.cc",
    "graphics/scoped_raster_timer_test.cc",

    # Tests migrated from the web/tests directory.
    "exported/web_url_request_extra_data_test.cc",
    "exported/web_url_response_test.cc",
    "timer_perf_test.cc",
  ]

  configs += [
    ":blink_platform_pch",
    "//third_party/blink/renderer:config",
    "//third_party/blink/renderer:inside_blink",
  ]

  deps = [
    ":platform",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//cc",
    "//components/viz/test:test_support",
    "//skia:skcms",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:test_headers",
  ]
  public_deps = [ "//gpu:raster" ]
}