summaryrefslogtreecommitdiff
path: root/chromium
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-08 13:07:32 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-08 13:40:10 +0000
commit818d9aed569afd192f6d4f6d9b28b72912df8b93 (patch)
treefa30cbdffa3e8fdc09dbbe37ffc0a721b40fced1 /chromium
parent66a2147d838e293f4a5db7711c8eba4e6faaaf0f (diff)
downloadqtwebengine-chromium-818d9aed569afd192f6d4f6d9b28b72912df8b93.tar.gz
BASELINE: Update Chromium to 65.0.3325.151
Change-Id: I3c71dd500483eb29491ac3eee4123714dda52da9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Diffstat (limited to 'chromium')
-rw-r--r--chromium/DEPS14
-rw-r--r--chromium/android_webview/BUILD.gn2
-rw-r--r--chromium/base/allocator/partition_allocator/spin_lock.cc18
-rw-r--r--chromium/base/files/file_util.h6
-rw-r--r--chromium/base/files/file_util_posix.cc33
-rw-r--r--chromium/base/memory/shared_memory.h9
-rw-r--r--chromium/base/memory/shared_memory_fuchsia.cc3
-rw-r--r--chromium/base/memory/shared_memory_helper.cc7
-rw-r--r--chromium/base/memory/shared_memory_mac.cc1
-rw-r--r--chromium/base/memory/shared_memory_nacl.cc3
-rw-r--r--chromium/base/memory/shared_memory_posix.cc3
-rw-r--r--chromium/base/memory/shared_memory_win.cc3
-rwxr-xr-xchromium/build/android/gyp/process_resources.py15
-rw-r--r--chromium/build/util/LASTCHANGE2
-rw-r--r--chromium/cc/ipc/cc_param_traits.cc9
-rw-r--r--chromium/cc/layers/picture_layer_impl.cc13
-rw-r--r--chromium/cc/layers/picture_layer_impl_unittest.cc41
-rw-r--r--chromium/cc/paint/paint_filter.cc197
-rw-r--r--chromium/cc/paint/paint_filter.h38
-rw-r--r--chromium/cc/paint/paint_flags.cc15
-rw-r--r--chromium/cc/paint/paint_flags.h2
-rw-r--r--chromium/cc/paint/paint_op_buffer_unittest.cc63
-rw-r--r--chromium/cc/paint/paint_op_reader.cc4
-rw-r--r--chromium/cc/paint/paint_op_writer.cc79
-rw-r--r--chromium/cc/paint/paint_op_writer.h9
-rw-r--r--chromium/cc/paint/paint_shader.cc24
-rw-r--r--chromium/cc/paint/paint_shader.h2
-rw-r--r--chromium/chrome/VERSION2
-rw-r--r--chromium/chrome/app/resources/chromium_strings_ca.xtb4
-rw-r--r--chromium/chrome/app/resources/chromium_strings_mr.xtb14
-rw-r--r--chromium/chrome/app/resources/chromium_strings_tr.xtb6
-rw-r--r--chromium/chrome/app/resources/generated_resources_ca.xtb16
-rw-r--r--chromium/chrome/app/resources/generated_resources_cs.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_da.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_de.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_en-GB.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_es.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_et.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_fil.xtb8
-rw-r--r--chromium/chrome/app/resources/generated_resources_fr.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_gu.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_hr.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_it.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_iw.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_kn.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_ko.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_lt.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_ml.xtb6
-rw-r--r--chromium/chrome/app/resources/generated_resources_mr.xtb26
-rw-r--r--chromium/chrome/app/resources/generated_resources_pl.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_pt-BR.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_pt-PT.xtb20
-rw-r--r--chromium/chrome/app/resources/generated_resources_ro.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_ru.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_sk.xtb26
-rw-r--r--chromium/chrome/app/resources/generated_resources_sv.xtb18
-rw-r--r--chromium/chrome/app/resources/generated_resources_sw.xtb4
-rw-r--r--chromium/chrome/app/resources/generated_resources_th.xtb18
-rw-r--r--chromium/chrome/app/resources/generated_resources_tr.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_uk.xtb2
-rw-r--r--chromium/chrome/app/resources/generated_resources_vi.xtb38
-rw-r--r--chromium/chrome/app/resources/generated_resources_zh-TW.xtb2
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_ca.xtb4
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_mr.xtb14
-rw-r--r--chromium/chrome/app/resources/google_chrome_strings_tr.xtb6
-rw-r--r--chromium/chrome/browser/printing/pdf_to_emf_converter.cc28
-rw-r--r--chromium/chrome/browser/printing/pdf_to_emf_converter.h10
-rw-r--r--chromium/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc14
-rw-r--r--chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json3
-rw-r--r--chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json6
-rw-r--r--chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json6
-rw-r--r--chromium/chrome/browser/resources/plugin_metadata/plugins_win.json6
-rw-r--r--chromium/chrome/browser/resources/print_preview/print_preview.js3
-rw-r--r--chromium/chrome/browser/resources/settings/about_page/about_page.html28
-rw-r--r--chromium/chrome/browser/resources/settings/about_page/about_page.js72
-rw-r--r--chromium/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js12
-rw-r--r--chromium/chrome/browser/resources/settings/icons.html1
-rw-r--r--chromium/chrome/browser/resources/settings/internet_page/compiled_resources2.gyp1
-rw-r--r--chromium/chrome/browser/resources/settings/internet_page/internet_config.html11
-rw-r--r--chromium/chrome/browser/resources/settings/internet_page/internet_config.js21
-rw-r--r--chromium/chrome/browser/resources/settings/internet_page/internet_page.js4
-rw-r--r--chromium/chrome/browser/resources/settings/internet_page/tether_connection_dialog.js5
-rw-r--r--chromium/chrome/browser/resources/welcome/welcome_win10.html13
-rw-r--r--chromium/chrome/browser/resources/welcome/welcome_win10.js11
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc17
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h10
-rw-r--r--chromium/chrome/browser/ui/webui/help/version_updater.h4
-rw-r--r--chromium/chrome/browser/ui/webui/help/version_updater_chromeos.cc11
-rw-r--r--chromium/chrome/browser/ui/webui/help/version_updater_chromeos.h4
-rw-r--r--chromium/chrome/browser/ui/webui/print_preview/printer_capabilities.cc2
-rw-r--r--chromium/chrome/browser/ui/webui/settings/about_handler.cc27
-rw-r--r--chromium/chrome/browser/ui/webui/settings/about_handler.h10
-rw-r--r--chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc35
-rw-r--r--chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.h14
-rw-r--r--chromium/chrome/browser/ui/webui/welcome_win10_ui.cc8
-rw-r--r--chromium/chrome/common/page_load_metrics/page_load_metrics.mojom7
-rw-r--r--chromium/chrome/service/BUILD.gn14
-rw-r--r--chromium/chrome/test/BUILD.gn1
-rw-r--r--chromium/components/autofill/content/renderer/password_autofill_agent.cc7
-rw-r--r--chromium/components/autofill/ios/browser/autofill_agent.mm3
-rw-r--r--chromium/components/password_manager/core/browser/credentials_filter.h3
-rw-r--r--chromium/components/password_manager/core/browser/form_fetcher_impl_unittest.cc5
-rw-r--r--chromium/components/password_manager/core/browser/password_manager.cc3
-rw-r--r--chromium/components/password_manager/core/browser/password_manager_unittest.cc10
-rw-r--r--chromium/components/password_manager/core/browser/stub_credentials_filter.cc4
-rw-r--r--chromium/components/password_manager/core/browser/stub_credentials_filter.h3
-rw-r--r--chromium/components/password_manager/sync/browser/sync_credentials_filter.cc14
-rw-r--r--chromium/components/password_manager/sync/browser/sync_credentials_filter.h3
-rw-r--r--chromium/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc13
-rw-r--r--chromium/components/strings/components_strings_de.xtb2
-rw-r--r--chromium/components/strings/components_strings_es.xtb2
-rw-r--r--chromium/components/strings/components_strings_fil.xtb6
-rw-r--r--chromium/components/strings/components_strings_id.xtb2
-rw-r--r--chromium/components/strings/components_strings_mr.xtb10
-rw-r--r--chromium/components/strings/components_strings_pl.xtb2
-rw-r--r--chromium/components/strings/components_strings_sk.xtb4
-rw-r--r--chromium/components/strings/components_strings_sv.xtb2
-rw-r--r--chromium/components/strings/components_strings_sw.xtb2
-rw-r--r--chromium/components/strings/components_strings_vi.xtb12
-rw-r--r--chromium/components/ukm/ukm_service.cc1
-rw-r--r--chromium/content/app/strings/translations/content_strings_ca.xtb4
-rw-r--r--chromium/content/app/strings/translations/content_strings_mr.xtb4
-rw-r--r--chromium/content/app/strings/translations/content_strings_sk.xtb4
-rw-r--r--chromium/content/browser/accessibility/dump_accessibility_tree_browsertest.cc5
-rw-r--r--chromium/content/browser/appcache/appcache_dispatcher_host.cc23
-rw-r--r--chromium/content/browser/appcache/appcache_dispatcher_host.h3
-rw-r--r--chromium/content/browser/appcache/chrome_appcache_service.cc10
-rw-r--r--chromium/content/browser/appcache/chrome_appcache_service.h8
-rw-r--r--chromium/content/browser/child_process_launcher_helper_mac.cc9
-rw-r--r--chromium/content/browser/frame_host/render_frame_host_impl.cc41
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl.cc6
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl.h2
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl_private.cc6
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_impl_private.h1
-rw-r--r--chromium/content/browser/gpu/gpu_data_manager_testing_autogen.cc20
-rw-r--r--chromium/content/browser/gpu/gpu_internals_ui.cc6
-rw-r--r--chromium/content/browser/quota_dispatcher_host.h2
-rw-r--r--chromium/content/browser/renderer_host/render_message_filter.cc2
-rw-r--r--chromium/content/browser/renderer_host/render_process_host_browsertest.cc5
-rw-r--r--chromium/content/browser/renderer_host/render_view_host_impl.cc3
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_impl.cc22
-rw-r--r--chromium/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc143
-rw-r--r--chromium/content/browser/renderer_host/render_widget_targeter.cc8
-rw-r--r--chromium/content/browser/renderer_host/render_widget_targeter.h3
-rw-r--r--chromium/content/browser/service_manager/common_browser_interfaces.cc2
-rw-r--r--chromium/content/browser/service_worker/service_worker_browsertest.cc33
-rw-r--r--chromium/content/browser/site_per_process_browsertest.cc71
-rw-r--r--chromium/content/browser/storage_partition_impl.cc6
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl.cc19
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl.h7
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl_browsertest.cc58
-rw-r--r--chromium/content/browser/webrtc/webrtc_getusermedia_browsertest.cc7
-rw-r--r--chromium/content/child/child_thread_impl.h2
-rw-r--r--chromium/content/child/runtime_features.cc4
-rw-r--r--chromium/content/common/BUILD.gn6
-rw-r--r--chromium/content/common/font_cache_dispatcher_win.cc14
-rw-r--r--chromium/content/common/swapped_out_messages.cc3
-rw-r--r--chromium/content/public/app/mojo/content_renderer_manifest.json2
-rw-r--r--chromium/content/public/common/BUILD.gn5
-rw-r--r--chromium/content/public/common/content_features.cc2
-rw-r--r--chromium/content/public/common/font_cache_dispatcher_win.h (renamed from chromium/content/common/font_cache_dispatcher_win.h)10
-rw-r--r--chromium/content/public/common/font_cache_win.mojom (renamed from chromium/content/common/font_cache_win.mojom)8
-rw-r--r--chromium/content/renderer/input/render_widget_input_handler.cc10
-rw-r--r--chromium/content/renderer/media/gpu/rtc_video_decoder.cc5
-rw-r--r--chromium/content/renderer/media/media_stream_video_renderer_sink.cc3
-rw-r--r--chromium/content/renderer/media/rtc_peer_connection_handler.cc6
-rw-r--r--chromium/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc8
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc3
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h1
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map_unittest.cc5
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc5
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc5
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h3
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc3
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_set_remote_description_observer_unittest.cc5
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc136
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.h4
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc51
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.cc22
-rw-r--r--chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.h10
-rw-r--r--chromium/content/renderer/render_frame_impl.cc5
-rw-r--r--chromium/content/renderer/render_view_impl.cc6
-rw-r--r--chromium/content/renderer/render_widget.cc27
-rw-r--r--chromium/content/renderer/render_widget.h6
-rw-r--r--chromium/device/bluetooth/strings/bluetooth_strings_mr.xtb2
-rw-r--r--chromium/extensions/browser/api/media_perception_private/conversion_utils.cc43
-rw-r--r--chromium/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc28
-rw-r--r--chromium/extensions/common/api/media_perception_private.idl21
-rw-r--r--chromium/google_apis/gaia/gaia_auth_util.cc11
-rw-r--r--chromium/google_apis/gaia/gaia_auth_util.h5
-rw-r--r--chromium/google_apis/gaia/gaia_urls.cc4
-rw-r--r--chromium/gpu/command_buffer/service/context_state.cc34
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc4
-rw-r--r--chromium/gpu/config/gpu_blacklist_unittest.cc2
-rw-r--r--chromium/gpu/config/gpu_control_list.cc13
-rw-r--r--chromium/gpu/config/gpu_control_list.h4
-rw-r--r--chromium/gpu/config/gpu_control_list_testing_autogen.cc132
-rw-r--r--chromium/gpu/config/gpu_driver_bug_list.json44
-rw-r--r--chromium/gpu/config/gpu_feature_info.h2
-rw-r--r--chromium/gpu/config/gpu_lists_version.h2
-rw-r--r--chromium/gpu/config/gpu_util.cc10
-rwxr-xr-xchromium/gpu/config/process_json.py26
-rw-r--r--chromium/gpu/ipc/common/gpu_feature_info.mojom3
-rw-r--r--chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h6
-rw-r--r--chromium/gpu/ipc/service/gpu_channel_manager.cc4
-rw-r--r--chromium/ios/chrome/browser/ui/BUILD.gn2
-rw-r--r--chromium/ios/chrome/browser/ui/main/BUILD.gn1
-rw-r--r--chromium/ios/chrome/browser/web/BUILD.gn3
-rw-r--r--chromium/media/capture/video/chromeos/camera_device_delegate.cc15
-rw-r--r--chromium/media/capture/video/chromeos/camera_device_delegate.h4
-rw-r--r--chromium/media/capture/video/chromeos/camera_device_delegate_unittest.cc42
-rw-r--r--chromium/media/capture/video/chromeos/video_capture_device_arc_chromeos.cc3
-rw-r--r--chromium/media/filters/ffmpeg_demuxer.cc15
-rw-r--r--chromium/media/gpu/v4l2/v4l2_video_decode_accelerator.cc11
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names.dat162
-rw-r--r--chromium/net/base/registry_controlled_domains/effective_tld_names.gperf120
-rw-r--r--chromium/net/data/ssl/certificate_transparency/log_list.json94
-rw-r--r--chromium/net/tools/tld_cleanup/README4
-rw-r--r--chromium/sandbox/mac/seatbelt_exec.cc105
-rw-r--r--chromium/sandbox/mac/seatbelt_exec.h2
-rw-r--r--chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.cc19
-rw-r--r--chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.h6
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor.cc11
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor.h4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.cc4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.h2
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.cc4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.h2
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_android.cc4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_android.h2
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_fusion.cc24
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_fusion.h4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_fusion_unittest.cc5
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_linux.cc4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_linux.h2
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_android.cc29
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_android.h8
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_base.cc44
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_base.h5
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_linux.cc24
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_linux.h6
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_mac.cc10
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_mac.h2
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_win.cc13
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_provider_win.h4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_win.cc4
-rw-r--r--chromium/services/device/generic_sensor/platform_sensor_win.h2
-rw-r--r--chromium/services/service_manager/sandbox/mac/BUILD.gn1
-rw-r--r--chromium/services/service_manager/sandbox/mac/pdf_compositor.sb15
-rw-r--r--chromium/services/viz/public/cpp/compositing/paint_filter_struct_traits.h7
-rw-r--r--chromium/skia/ext/skia_commit_hash.h2
-rw-r--r--chromium/storage/browser/fileapi/file_writer_delegate.cc46
-rw-r--r--chromium/storage/browser/fileapi/file_writer_delegate.h10
-rw-r--r--chromium/storage/browser/fileapi/file_writer_delegate_unittest.cc105
-rw-r--r--chromium/third_party/WebKit/Source/core/DEPS2
-rw-r--r--chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp2
-rw-r--r--chromium/third_party/WebKit/Source/core/events/PointerEventFactory.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp14
-rw-r--r--chromium/third_party/WebKit/Source/core/exported/WebPerformance.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/exported/WebViewImpl.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/exported/WebViewTest.cpp204
-rw-r--r--chromium/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/fetch/RequestInit.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/LocalFrame.cpp4
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/LocalFrame.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Settings.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/Settings.h10
-rw-r--r--chromium/third_party/WebKit/Source/core/frame/UseCounter.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp12
-rw-r--r--chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp375
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h29
-rw-r--r--chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl13
-rw-r--r--chromium/third_party/WebKit/Source/core/input/PointerEventManagerTest.cpp98
-rw-r--r--chromium/third_party/WebKit/Source/core/input/ScrollManager.cpp19
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp85
-rw-r--r--chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.h3
-rw-r--r--chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp27
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.cpp84
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.h28
-rw-r--r--chromium/third_party/WebKit/Source/core/loader/InteractiveDetectorTest.cpp114
-rw-r--r--chromium/third_party/WebKit/Source/core/messaging/BlinkCloneableMessageStructTraits.cpp5
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FrameTree.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/core/page/FrameTree.h5
-rw-r--r--chromium/third_party/WebKit/Source/core/page/PageWidgetDelegate.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.cpp6
-rw-r--r--chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.h4
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp17
-rw-r--r--chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.h6
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js3
-rw-r--r--chromium/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js2
-rw-r--r--chromium/third_party/WebKit/Source/modules/accessibility/AXObject.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/modules/accessibility/AXObject.h6
-rw-r--r--chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialManagerTypeConverters.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp3
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/BUILD.gn4
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/DEPS1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp30
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp13
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h1
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.cpp70
-rw-r--r--chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.h22
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp8
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp11
-rw-r--r--chromium/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp7
-rw-r--r--chromium/third_party/WebKit/Source/platform/runtime_enabled_features.json52
-rw-r--r--chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc40
-rw-r--r--chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc36
-rw-r--r--chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h19
-rw-r--r--chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc111
-rw-r--r--chromium/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc4
-rw-r--r--chromium/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc4
-rw-r--r--chromium/third_party/WebKit/public/web/WebPerformance.h2
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/README17
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/h264_cavlc.c1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mov.c9
-rw-r--r--chromium/third_party/pdfium/core/fxge/win32/cfx_psrenderer.cpp13
-rw-r--r--chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp2
-rw-r--r--chromium/third_party/pdfium/fxjs/cjs_publicmethods_embeddertest.cpp36
-rw-r--r--chromium/third_party/skia/src/gpu/SkGr.cpp3
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc6
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h5
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h1
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc122
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h3
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc2
-rw-r--r--chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h2
-rw-r--r--chromium/third_party/webrtc/video/video_send_stream.cc4
-rw-r--r--chromium/tools/metrics/histograms/enums.xml2
-rw-r--r--chromium/tools/metrics/histograms/histograms.xml29
-rw-r--r--chromium/tools/metrics/ukm/ukm.xml15
-rw-r--r--chromium/ui/accessibility/extensions/strings/accessibility_extensions_strings_sk.xtb2
-rw-r--r--chromium/ui/app_list/BUILD.gn2
-rw-r--r--chromium/ui/aura/window_tree_host.cc2
-rw-r--r--chromium/ui/aura/window_tree_host_unittest.cc2
-rw-r--r--chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc4
-rw-r--r--chromium/ui/login/display_manager.js26
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html29
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js101
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.html2
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js8
-rw-r--r--chromium/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp1
-rw-r--r--chromium/ui/webui/resources/cr_elements/chromeos/network/cr_onc_types.js9
-rw-r--r--chromium/v8/include/v8-version.h2
-rw-r--r--chromium/v8/src/compiler/access-builder.cc2
-rw-r--r--chromium/v8/src/compiler/effect-control-linearizer.cc6
-rw-r--r--chromium/v8/src/flag-definitions.h2
-rw-r--r--chromium/v8/src/heap/spaces.cc2
-rw-r--r--chromium/v8/src/ic/handler-configuration.cc10
-rw-r--r--chromium/v8/src/objects.cc133
-rw-r--r--chromium/v8/src/objects.h1
-rw-r--r--chromium/v8/src/runtime/runtime-test.cc6
-rw-r--r--chromium/v8/src/wasm/module-compiler.cc17
-rw-r--r--chromium/v8/src/wasm/wasm-code-manager.cc63
-rw-r--r--chromium/v8/tools/testrunner/local/variants.py1
-rw-r--r--chromium/v8/tools/whitespace.txt2
361 files changed, 4496 insertions, 1680 deletions
diff --git a/chromium/DEPS b/chromium/DEPS
index 36012f92844..6bb2d382500 100644
--- a/chromium/DEPS
+++ b/chromium/DEPS
@@ -279,8 +279,10 @@ deps = {
'url':
(Var("chromium_git")) + '/chromium/third_party/errorprone.git@ecc57c2b00627667874744b9ad8efe10734d97a8'
},
- 'src/third_party/ffmpeg':
- (Var("chromium_git")) + '/chromium/third_party/ffmpeg.git@3e444ad8860b5d90d40a5c6e19947aba376a976b',
+ 'src/third_party/ffmpeg': {
+ 'url':
+ '{chromium_git}/chromium/third_party/ffmpeg.git@19a1302b214c62c56409b69ab5e936796d96209f'
+ },
'src/third_party/findbugs': {
'condition':
'checkout_android',
@@ -475,7 +477,7 @@ deps = {
(Var("webrtc_git")) + '/deps/third_party/openmax.git@b611996df3b8f6b151339d22c12c21f167009cb6',
'src/third_party/pdfium': {
'url':
- '{pdfium_git}/pdfium.git@ad3e2461b811a70c433e9f62c75f8ddb1d1253ab'
+ '{pdfium_git}/pdfium.git@e839a6adb305467759e0d22fe7532a72fe4d8fa7'
},
'src/third_party/pefile': {
'condition':
@@ -521,7 +523,7 @@ deps = {
(Var("chromium_git")) + '/external/github.com/google/shaderc.git@cd8793c34907073025af2622c28bcee64e9879a4',
'src/third_party/skia': {
'url':
- '{skia_git}/skia.git@567bd716a9ae4051c8629cc4e8c047be69e84cd6'
+ '{skia_git}/skia.git@bd0dafbc8112f6cfa92a8096d8cb5696d8535ef9'
},
'src/third_party/smhasher/src':
(Var("chromium_git")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f',
@@ -563,7 +565,7 @@ deps = {
(Var("chromium_git")) + '/external/khronosgroup/webgl.git@d458ada06171a85af00367251a4ed55db7fe2018',
'src/third_party/webrtc': {
'url':
- '{webrtc_git}/src.git@1512bd5f912c37ac88a07fb27dbc42190a4cce58'
+ '{webrtc_git}/src.git@9f7e2a90da243288657e1802af85168e87daab01'
},
'src/third_party/xdg-utils': {
'condition':
@@ -581,7 +583,7 @@ deps = {
(Var("chromium_git")) + '/infra/luci/client-py.git@88229872dd17e71658fe96763feaa77915d8cbd6',
'src/v8': {
'url':
- '{chromium_git}/v8/v8.git@9239b67b799f23961552d5f7538d001063f335c2'
+ '{chromium_git}/v8/v8.git@2bc5f566416da419601d55ffc83f92374be50779'
}
}
diff --git a/chromium/android_webview/BUILD.gn b/chromium/android_webview/BUILD.gn
index 2b5eebd3932..4e12f9a38c0 100644
--- a/chromium/android_webview/BUILD.gn
+++ b/chromium/android_webview/BUILD.gn
@@ -617,6 +617,8 @@ source_set("common") {
"browser/surfaces_instance.cc",
"browser/surfaces_instance.h",
"browser/token_binding_manager_bridge.cc",
+ "browser/tracing/aw_trace_event_args_whitelist.cc",
+ "browser/tracing/aw_trace_event_args_whitelist.h",
"browser/tracing/aw_tracing_controller.cc",
"browser/tracing/aw_tracing_controller.h",
"browser/tracing/aw_tracing_delegate.cc",
diff --git a/chromium/base/allocator/partition_allocator/spin_lock.cc b/chromium/base/allocator/partition_allocator/spin_lock.cc
index c30d6cd43ad..fd062c33b4a 100644
--- a/chromium/base/allocator/partition_allocator/spin_lock.cc
+++ b/chromium/base/allocator/partition_allocator/spin_lock.cc
@@ -10,6 +10,8 @@
#include <sched.h>
#endif
+#include "base/threading/platform_thread.h"
+
// The YIELD_PROCESSOR macro wraps an architecture specific-instruction that
// informs the processor we're in a busy wait, so it can handle the branch more
// intelligently and e.g. reduce power to our core or give more resources to the
@@ -67,6 +69,9 @@ void SpinLock::LockSlow() {
// critical section defaults, and various other recommendations.
// TODO(jschuh): Further tuning may be warranted.
static const int kYieldProcessorTries = 1000;
+ // The value of |kYieldThreadTries| is completely made up.
+ static const int kYieldThreadTries = 10;
+ int yield_thread_count = 0;
do {
do {
for (int count = 0; count < kYieldProcessorTries; ++count) {
@@ -77,8 +82,17 @@ void SpinLock::LockSlow() {
return;
}
- // Give the OS a chance to schedule something on this core.
- YIELD_THREAD;
+ if (yield_thread_count < kYieldThreadTries) {
+ ++yield_thread_count;
+ // Give the OS a chance to schedule something on this core.
+ YIELD_THREAD;
+ } else {
+ // At this point, it's likely that the lock is held by a lower priority
+ // thread that is unavailable to finish its work because of higher
+ // priority threads spinning here. Sleeping should ensure that they make
+ // progress.
+ PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1));
+ }
} while (lock_.load(std::memory_order_relaxed));
} while (UNLIKELY(lock_.exchange(true, std::memory_order_acquire)));
}
diff --git a/chromium/base/files/file_util.h b/chromium/base/files/file_util.h
index 780bb22cbf5..cd8a1ba5953 100644
--- a/chromium/base/files/file_util.h
+++ b/chromium/base/files/file_util.h
@@ -185,6 +185,12 @@ BASE_EXPORT bool ReadFileToStringWithMaxSize(const FilePath& path,
// Returns true iff |bytes| bytes have been successfully read from |fd|.
BASE_EXPORT bool ReadFromFD(int fd, char* buffer, size_t bytes);
+// Performs the same function as CreateAndOpenTemporaryFileInDir(), but returns
+// the file-descriptor directly, rather than wrapping it into a FILE. Returns
+// -1 on failure.
+BASE_EXPORT int CreateAndOpenFdForTemporaryFileInDir(const FilePath& dir,
+ FilePath* path);
+
// The following functions use POSIX functionality that isn't supported by
// Fuchsia.
#if !defined(OS_FUCHSIA)
diff --git a/chromium/base/files/file_util_posix.cc b/chromium/base/files/file_util_posix.cc
index 27cd58a9df3..d2eb4531d8e 100644
--- a/chromium/base/files/file_util_posix.cc
+++ b/chromium/base/files/file_util_posix.cc
@@ -142,19 +142,6 @@ std::string TempFileName() {
#endif
}
-// Creates and opens a temporary file in |directory|, returning the
-// file descriptor. |path| is set to the temporary file path.
-// This function does NOT unlink() the file.
-int CreateAndOpenFdForTemporaryFile(FilePath directory, FilePath* path) {
- AssertBlockingAllowed(); // For call to mkstemp().
- *path = directory.Append(base::TempFileName());
- const std::string& tmpdir_string = path->value();
- // this should be OK since mkstemp just replaces characters in place
- char* buffer = const_cast<char*>(tmpdir_string.c_str());
-
- return HANDLE_EINTR(mkstemp(buffer));
-}
-
#if defined(OS_LINUX) || defined(OS_AIX)
// Determine if /dev/shm files can be mapped and then mprotect'd PROT_EXEC.
// This depends on the mount options used for /dev/shm, which vary among
@@ -165,7 +152,8 @@ bool DetermineDevShmExecutable() {
bool result = false;
FilePath path;
- ScopedFD fd(CreateAndOpenFdForTemporaryFile(FilePath("/dev/shm"), &path));
+ ScopedFD fd(
+ CreateAndOpenFdForTemporaryFileInDir(FilePath("/dev/shm"), &path));
if (fd.is_valid()) {
DeleteFile(path, false);
long sysconf_result = sysconf(_SC_PAGESIZE);
@@ -540,6 +528,17 @@ bool ReadFromFD(int fd, char* buffer, size_t bytes) {
#if !defined(OS_NACL_NONSFI)
+int CreateAndOpenFdForTemporaryFileInDir(const FilePath& directory,
+ FilePath* path) {
+ AssertBlockingAllowed(); // For call to mkstemp().
+ *path = directory.Append(TempFileName());
+ const std::string& tmpdir_string = path->value();
+ // this should be OK since mkstemp just replaces characters in place
+ char* buffer = const_cast<char*>(tmpdir_string.c_str());
+
+ return HANDLE_EINTR(mkstemp(buffer));
+}
+
#if !defined(OS_FUCHSIA)
bool CreateSymbolicLink(const FilePath& target_path,
const FilePath& symlink_path) {
@@ -668,7 +667,7 @@ bool CreateTemporaryFile(FilePath* path) {
FilePath directory;
if (!GetTempDir(&directory))
return false;
- int fd = CreateAndOpenFdForTemporaryFile(directory, path);
+ int fd = CreateAndOpenFdForTemporaryFileInDir(directory, path);
if (fd < 0)
return false;
close(fd);
@@ -676,7 +675,7 @@ bool CreateTemporaryFile(FilePath* path) {
}
FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path) {
- int fd = CreateAndOpenFdForTemporaryFile(dir, path);
+ int fd = CreateAndOpenFdForTemporaryFileInDir(dir, path);
if (fd < 0)
return nullptr;
@@ -688,7 +687,7 @@ FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path) {
bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file) {
AssertBlockingAllowed(); // For call to close().
- int fd = CreateAndOpenFdForTemporaryFile(dir, temp_file);
+ int fd = CreateAndOpenFdForTemporaryFileInDir(dir, temp_file);
return ((fd >= 0) && !IGNORE_EINTR(close(fd)));
}
diff --git a/chromium/base/memory/shared_memory.h b/chromium/base/memory/shared_memory.h
index 2ab7870f4f0..2eb9ee29223 100644
--- a/chromium/base/memory/shared_memory.h
+++ b/chromium/base/memory/shared_memory.h
@@ -189,11 +189,10 @@ class BASE_EXPORT SharedMemory {
// identifier is not portable.
SharedMemoryHandle handle() const;
- // Returns the underlying OS handle for this segment. The caller also gets
- // ownership of the handle. This is logically equivalent to:
- // SharedMemoryHandle dup = DuplicateHandle(handle());
- // Close();
- // return dup;
+ // Returns the underlying OS handle for this segment. The caller takes
+ // ownership of the handle and memory is unmapped. This is equivalent to
+ // duplicating the handle and then calling Unmap() and Close() on this object,
+ // without the overhead of duplicating the handle.
SharedMemoryHandle TakeHandle();
// Closes the open shared memory segment. The memory will remain mapped if
diff --git a/chromium/base/memory/shared_memory_fuchsia.cc b/chromium/base/memory/shared_memory_fuchsia.cc
index 15211d9fbac..4036bf6f2e1 100644
--- a/chromium/base/memory/shared_memory_fuchsia.cc
+++ b/chromium/base/memory/shared_memory_fuchsia.cc
@@ -138,9 +138,8 @@ SharedMemoryHandle SharedMemory::handle() const {
SharedMemoryHandle SharedMemory::TakeHandle() {
SharedMemoryHandle handle(shm_);
handle.SetOwnershipPassesToIPC(true);
+ Unmap();
shm_ = SharedMemoryHandle();
- memory_ = nullptr;
- mapped_size_ = 0;
return handle;
}
diff --git a/chromium/base/memory/shared_memory_helper.cc b/chromium/base/memory/shared_memory_helper.cc
index 91893d335e2..f98b734fb7f 100644
--- a/chromium/base/memory/shared_memory_helper.cc
+++ b/chromium/base/memory/shared_memory_helper.cc
@@ -41,13 +41,12 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
// A: Because they're limited to 4mb on OS X. FFFFFFFUUUUUUUUUUU
FilePath directory;
ScopedPathUnlinker path_unlinker;
- ScopedFILE fp;
if (!GetShmemTempDir(options.executable, &directory))
return false;
- fp.reset(base::CreateAndOpenTemporaryFileInDir(directory, path));
+ fd->reset(base::CreateAndOpenFdForTemporaryFileInDir(directory, path));
- if (!fp)
+ if (!fd->is_valid())
return false;
// Deleting the file prevents anyone else from mapping it in (making it
@@ -60,10 +59,10 @@ bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
readonly_fd->reset(HANDLE_EINTR(open(path->value().c_str(), O_RDONLY)));
if (!readonly_fd->is_valid()) {
DPLOG(ERROR) << "open(\"" << path->value() << "\", O_RDONLY) failed";
+ fd->reset();
return false;
}
}
- fd->reset(fileno(fp.release()));
return true;
}
diff --git a/chromium/base/memory/shared_memory_mac.cc b/chromium/base/memory/shared_memory_mac.cc
index e2735f7f963..0a233e5fb02 100644
--- a/chromium/base/memory/shared_memory_mac.cc
+++ b/chromium/base/memory/shared_memory_mac.cc
@@ -229,6 +229,7 @@ SharedMemoryHandle SharedMemory::handle() const {
SharedMemoryHandle SharedMemory::TakeHandle() {
SharedMemoryHandle dup = DuplicateHandle(handle());
+ Unmap();
Close();
return dup;
}
diff --git a/chromium/base/memory/shared_memory_nacl.cc b/chromium/base/memory/shared_memory_nacl.cc
index 442c0360f29..4bcbb547d38 100644
--- a/chromium/base/memory/shared_memory_nacl.cc
+++ b/chromium/base/memory/shared_memory_nacl.cc
@@ -117,9 +117,8 @@ SharedMemoryHandle SharedMemory::handle() const {
SharedMemoryHandle SharedMemory::TakeHandle() {
SharedMemoryHandle handle_copy = shm_;
handle_copy.SetOwnershipPassesToIPC(true);
+ Unmap();
shm_ = SharedMemoryHandle();
- memory_ = nullptr;
- mapped_size_ = 0;
return handle_copy;
}
diff --git a/chromium/base/memory/shared_memory_posix.cc b/chromium/base/memory/shared_memory_posix.cc
index f9d71f4739c..d3163e5a640 100644
--- a/chromium/base/memory/shared_memory_posix.cc
+++ b/chromium/base/memory/shared_memory_posix.cc
@@ -336,9 +336,8 @@ SharedMemoryHandle SharedMemory::handle() const {
SharedMemoryHandle SharedMemory::TakeHandle() {
SharedMemoryHandle handle_copy = shm_;
handle_copy.SetOwnershipPassesToIPC(true);
+ Unmap();
shm_ = SharedMemoryHandle();
- memory_ = nullptr;
- mapped_size_ = 0;
return handle_copy;
}
diff --git a/chromium/base/memory/shared_memory_win.cc b/chromium/base/memory/shared_memory_win.cc
index 5540004730b..cf06dd39c76 100644
--- a/chromium/base/memory/shared_memory_win.cc
+++ b/chromium/base/memory/shared_memory_win.cc
@@ -373,9 +373,8 @@ SharedMemoryHandle SharedMemory::handle() const {
SharedMemoryHandle SharedMemory::TakeHandle() {
SharedMemoryHandle handle(shm_);
handle.SetOwnershipPassesToIPC(true);
+ Unmap();
shm_ = SharedMemoryHandle();
- memory_ = nullptr;
- mapped_size_ = 0;
return handle;
}
diff --git a/chromium/build/android/gyp/process_resources.py b/chromium/build/android/gyp/process_resources.py
index 72c9728ffd2..558ec5b4e95 100755
--- a/chromium/build/android/gyp/process_resources.py
+++ b/chromium/build/android/gyp/process_resources.py
@@ -107,6 +107,16 @@ _DENSITY_SPLITS = {
),
}
+# Pngs that we shouldn't convert to webp. Please add rationale when updating.
+_PNG_WEBP_BLACKLIST_PATTERN = re.compile('|'.join([
+ # Crashes on Galaxy S5 running L (https://crbug.com/807059).
+ r'.*star_gray\.png',
+ # Android requires pngs for 9-patch images.
+ r'.*\.9\.png',
+ # Daydream (*.dd) requires pngs for icon files.
+ r'.*\.dd\.png']))
+
+
class _ResourceWhitelist(object):
def __init__(self, entries=None):
self._entries = None
@@ -750,8 +760,9 @@ def _ConvertToWebP(webp_binary, png_files):
'-lossless', '-o', webp_path]
subprocess.check_call(args)
os.remove(png_path)
- # Android requires pngs for 9-patch images.
- pool.map(convert_image, [f for f in png_files if not f.endswith('.9.png')])
+
+ pool.map(convert_image, [f for f in png_files
+ if not _PNG_WEBP_BLACKLIST_PATTERN.match(f)])
pool.close()
pool.join()
diff --git a/chromium/build/util/LASTCHANGE b/chromium/build/util/LASTCHANGE
index 48795aa613c..58b54769aeb 100644
--- a/chromium/build/util/LASTCHANGE
+++ b/chromium/build/util/LASTCHANGE
@@ -1 +1 @@
-LASTCHANGE=a0bb379a4de011b41ea07da28716e685a1cf4579-
+LASTCHANGE=2b81d816997306dfdd0c2168d67028502f1cdee2-
diff --git a/chromium/cc/ipc/cc_param_traits.cc b/chromium/cc/ipc/cc_param_traits.cc
index cf3a6dd9da5..ea3ed9f159f 100644
--- a/chromium/cc/ipc/cc_param_traits.cc
+++ b/chromium/cc/ipc/cc_param_traits.cc
@@ -271,15 +271,16 @@ void ParamTraits<sk_sp<cc::PaintFilter>>::Write(base::Pickle* m,
const param_type& p) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug.ipc"),
"ParamTraits::PaintFilter::Write");
- static const size_t kBufferSize = 8 * 1024;
- std::vector<char> memory(kBufferSize);
- cc::PaintOpWriter writer(memory.data(), kBufferSize, nullptr, nullptr,
+ std::vector<uint8_t> memory;
+ memory.resize(cc::PaintOpWriter::HeaderBytes() +
+ cc::PaintFilter::GetFilterSize(p.get()));
+ cc::PaintOpWriter writer(memory.data(), memory.size(), nullptr, nullptr,
true /* enable_security_constraints */);
writer.Write(p.get());
if (writer.size() == 0u)
m->WriteData(nullptr, 0);
else
- m->WriteData(static_cast<const char*>(memory.data()), writer.size());
+ m->WriteData(reinterpret_cast<const char*>(memory.data()), writer.size());
}
bool ParamTraits<sk_sp<cc::PaintFilter>>::Read(const base::Pickle* m,
diff --git a/chromium/cc/layers/picture_layer_impl.cc b/chromium/cc/layers/picture_layer_impl.cc
index 6b9a3458126..bd84a630446 100644
--- a/chromium/cc/layers/picture_layer_impl.cc
+++ b/chromium/cc/layers/picture_layer_impl.cc
@@ -277,13 +277,14 @@ void PictureLayerImpl::AppendQuads(viz::RenderPass* render_pass,
gfx::Rect scaled_visible_layer_rect =
shared_quad_state->visible_quad_layer_rect;
- Occlusion scaled_occlusion =
- draw_properties()
- .occlusion_in_content_space.GetOcclusionWithGivenDrawTransform(
- shared_quad_state->quad_to_target_transform);
+ Occlusion occlusion;
+ // TODO(sunxd): Compute the correct occlusion for mask layers.
+ if (mask_type_ == Layer::LayerMaskType::NOT_MASK) {
+ occlusion = draw_properties().occlusion_in_content_space;
+ }
SolidColorLayerImpl::AppendSolidQuads(
- render_pass, scaled_occlusion, shared_quad_state,
- scaled_visible_layer_rect, raster_source_->GetSolidColor(),
+ render_pass, occlusion, shared_quad_state, scaled_visible_layer_rect,
+ raster_source_->GetSolidColor(),
!layer_tree_impl()->settings().enable_edge_anti_aliasing,
append_quads_data);
return;
diff --git a/chromium/cc/layers/picture_layer_impl_unittest.cc b/chromium/cc/layers/picture_layer_impl_unittest.cc
index 34e4f19abff..327e479e9b1 100644
--- a/chromium/cc/layers/picture_layer_impl_unittest.cc
+++ b/chromium/cc/layers/picture_layer_impl_unittest.cc
@@ -3366,6 +3366,39 @@ TEST_F(PictureLayerImplTest, OcclusionOnSolidColorPictureLayer) {
scoped_refptr<FakeRasterSource> pending_raster_source =
FakeRasterSource::CreateFilledSolidColor(layer_bounds);
SetupPendingTree(std::move(pending_raster_source), gfx::Size(), Region(),
+ Layer::LayerMaskType::NOT_MASK);
+ // Device scale factor should not affect a non-mask solid color layer.
+ host_impl()->pending_tree()->SetDeviceScaleFactor(2.f);
+ ActivateTree();
+
+ {
+ SCOPED_TRACE("Scaled occlusion");
+ gfx::Rect occluded(300, 0, 400, 2000);
+ impl.AppendQuadsWithOcclusion(active_layer(), occluded);
+
+ size_t partial_occluded_count = 0;
+ LayerTestCommon::VerifyQuadsAreOccluded(impl.quad_list(), occluded,
+ &partial_occluded_count);
+ // Because of the implementation of test helper AppendQuadsWithOcclusion,
+ // the occlusion will have a scale transform resulted from the device scale
+ // factor. However, the AppendQuads function will try to tile a solid color
+ // layer ignoring the scale factor, and its visible layer bounds is 500x500.
+ // So we end up having 4 partially occluded quads.
+ EXPECT_EQ(4u, impl.quad_list().size());
+ EXPECT_EQ(4u, partial_occluded_count);
+ }
+}
+
+TEST_F(PictureLayerImplTest, IgnoreOcclusionOnSolidColorMask) {
+ gfx::Size layer_bounds(1000, 1000);
+ gfx::Size viewport_size(1000, 1000);
+
+ LayerTestCommon::LayerImplTest impl;
+ host_impl()->SetViewportSize(viewport_size);
+
+ scoped_refptr<FakeRasterSource> pending_raster_source =
+ FakeRasterSource::CreateFilledSolidColor(layer_bounds);
+ SetupPendingTree(std::move(pending_raster_source), gfx::Size(), Region(),
Layer::LayerMaskType::MULTI_TEXTURE_MASK);
host_impl()->pending_tree()->SetDeviceScaleFactor(2.f);
ActivateTree();
@@ -3376,12 +3409,12 @@ TEST_F(PictureLayerImplTest, OcclusionOnSolidColorPictureLayer) {
impl.AppendQuadsWithOcclusion(active_layer(), occluded);
size_t partial_occluded_count = 0;
- LayerTestCommon::VerifyQuadsAreOccluded(impl.quad_list(), occluded,
+ LayerTestCommon::VerifyQuadsAreOccluded(impl.quad_list(), gfx::Rect(),
&partial_occluded_count);
- // None of the quads shall be occluded and half of them are partially
- // occluded.
+ // None of the quads shall be occluded because mask layers ignores
+ // occlusion.
EXPECT_EQ(16u, impl.quad_list().size());
- EXPECT_EQ(8u, partial_occluded_count);
+ EXPECT_EQ(0u, partial_occluded_count);
}
}
diff --git a/chromium/cc/paint/paint_filter.cc b/chromium/cc/paint/paint_filter.cc
index 469b107bd5d..c05fb3d51e5 100644
--- a/chromium/cc/paint/paint_filter.cc
+++ b/chromium/cc/paint/paint_filter.cc
@@ -5,6 +5,7 @@
#include "cc/paint/paint_filter.h"
#include "cc/paint/filter_operations.h"
+#include "cc/paint/paint_op_writer.h"
#include "cc/paint/paint_record.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkMath.h"
@@ -93,6 +94,27 @@ std::string PaintFilter::TypeToString(Type type) {
return "Unknown";
}
+size_t PaintFilter::GetFilterSize(const PaintFilter* filter) {
+ // A null type is used to indicate no filter.
+ if (!filter)
+ return sizeof(uint32_t);
+ return filter->SerializedSize() + PaintOpWriter::Alignment();
+}
+
+size_t PaintFilter::BaseSerializedSize() const {
+ size_t total_size = 0u;
+ // Filter type.
+ total_size += sizeof(uint32_t);
+ // Bool to indicate whether crop exists.
+ total_size += sizeof(uint32_t);
+ if (crop_rect_) {
+ // CropRect.
+ total_size += sizeof(crop_rect_->flags());
+ total_size += sizeof(crop_rect_->rect());
+ }
+ return total_size;
+}
+
bool PaintFilter::operator==(const PaintFilter& other) const {
if (type_ != other.type_)
return false;
@@ -194,6 +216,14 @@ ColorFilterPaintFilter::ColorFilterPaintFilter(
ColorFilterPaintFilter::~ColorFilterPaintFilter() = default;
+size_t ColorFilterPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size = 0u;
+ total_size += BaseSerializedSize();
+ total_size += PaintOpWriter::GetFlattenableSize(color_filter_.get());
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool ColorFilterPaintFilter::operator==(
const ColorFilterPaintFilter& other) const {
return PaintOp::AreSkFlattenablesEqual(color_filter_.get(),
@@ -217,6 +247,14 @@ BlurPaintFilter::BlurPaintFilter(SkScalar sigma_x,
BlurPaintFilter::~BlurPaintFilter() = default;
+size_t BlurPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(sigma_x_) + sizeof(sigma_y_) +
+ sizeof(tile_mode_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool BlurPaintFilter::operator==(const BlurPaintFilter& other) const {
return PaintOp::AreEqualEvenIfNaN(sigma_x_, other.sigma_x_) &&
PaintOp::AreEqualEvenIfNaN(sigma_y_, other.sigma_y_) &&
@@ -247,6 +285,14 @@ DropShadowPaintFilter::DropShadowPaintFilter(SkScalar dx,
DropShadowPaintFilter::~DropShadowPaintFilter() = default;
+size_t DropShadowPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(dx_) + sizeof(dy_) + sizeof(sigma_x_) +
+ sizeof(sigma_y_) + sizeof(color_) + sizeof(shadow_mode_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool DropShadowPaintFilter::operator==(
const DropShadowPaintFilter& other) const {
return PaintOp::AreEqualEvenIfNaN(dx_, other.dx_) &&
@@ -271,6 +317,13 @@ MagnifierPaintFilter::MagnifierPaintFilter(const SkRect& src_rect,
MagnifierPaintFilter::~MagnifierPaintFilter() = default;
+size_t MagnifierPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(src_rect_) + sizeof(inset_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool MagnifierPaintFilter::operator==(const MagnifierPaintFilter& other) const {
return PaintOp::AreSkRectsEqual(src_rect_, other.src_rect_) &&
PaintOp::AreEqualEvenIfNaN(inset_, other.inset_) &&
@@ -288,6 +341,13 @@ ComposePaintFilter::ComposePaintFilter(sk_sp<PaintFilter> outer,
ComposePaintFilter::~ComposePaintFilter() = default;
+size_t ComposePaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size = BaseSerializedSize();
+ total_size += GetFilterSize(outer_.get());
+ total_size += GetFilterSize(inner_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool ComposePaintFilter::operator==(const ComposePaintFilter& other) const {
return AreFiltersEqual(outer_.get(), other.outer_.get()) &&
AreFiltersEqual(inner_.get(), other.inner_.get());
@@ -309,6 +369,15 @@ AlphaThresholdPaintFilter::AlphaThresholdPaintFilter(const SkRegion& region,
AlphaThresholdPaintFilter::~AlphaThresholdPaintFilter() = default;
+size_t AlphaThresholdPaintFilter::SerializedSize() const {
+ size_t region_size = region_.writeToMemory(nullptr);
+ base::CheckedNumeric<size_t> total_size;
+ total_size = BaseSerializedSize() + sizeof(region_size) + region_size +
+ sizeof(inner_min_) + sizeof(outer_max_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool AlphaThresholdPaintFilter::operator==(
const AlphaThresholdPaintFilter& other) const {
return region_ == other.region_ &&
@@ -332,6 +401,14 @@ XfermodePaintFilter::XfermodePaintFilter(SkBlendMode blend_mode,
XfermodePaintFilter::~XfermodePaintFilter() = default;
+size_t XfermodePaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(blend_mode_);
+ total_size += GetFilterSize(background_.get());
+ total_size += GetFilterSize(foreground_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool XfermodePaintFilter::operator==(const XfermodePaintFilter& other) const {
return blend_mode_ == other.blend_mode_ &&
AreFiltersEqual(background_.get(), other.background_.get()) &&
@@ -361,6 +438,15 @@ ArithmeticPaintFilter::ArithmeticPaintFilter(float k1,
ArithmeticPaintFilter::~ArithmeticPaintFilter() = default;
+size_t ArithmeticPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(k1_) + sizeof(k2_) + sizeof(k3_) +
+ sizeof(k4_) + sizeof(enforce_pm_color_);
+ total_size += GetFilterSize(background_.get());
+ total_size += GetFilterSize(foreground_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool ArithmeticPaintFilter::operator==(
const ArithmeticPaintFilter& other) const {
return PaintOp::AreEqualEvenIfNaN(k1_, other.k1_) &&
@@ -403,6 +489,15 @@ MatrixConvolutionPaintFilter::MatrixConvolutionPaintFilter(
MatrixConvolutionPaintFilter::~MatrixConvolutionPaintFilter() = default;
+size_t MatrixConvolutionPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(kernel_size_) + sizeof(size_t) +
+ kernel_->size() * sizeof(SkScalar) + sizeof(gain_) + sizeof(bias_) +
+ sizeof(kernel_offset_) + sizeof(tile_mode_) + sizeof(convolve_alpha_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool MatrixConvolutionPaintFilter::operator==(
const MatrixConvolutionPaintFilter& other) const {
return kernel_size_ == other.kernel_size_ &&
@@ -435,6 +530,15 @@ DisplacementMapEffectPaintFilter::DisplacementMapEffectPaintFilter(
DisplacementMapEffectPaintFilter::~DisplacementMapEffectPaintFilter() = default;
+size_t DisplacementMapEffectPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size = BaseSerializedSize() +
+ sizeof(uint32_t) +
+ sizeof(uint32_t) + sizeof(scale_);
+ total_size += GetFilterSize(displacement_.get());
+ total_size += GetFilterSize(color_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool DisplacementMapEffectPaintFilter::operator==(
const DisplacementMapEffectPaintFilter& other) const {
return channel_x_ == other.channel_x_ && channel_y_ == other.channel_y_ &&
@@ -458,6 +562,14 @@ ImagePaintFilter::ImagePaintFilter(PaintImage image,
ImagePaintFilter::~ImagePaintFilter() = default;
+size_t ImagePaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(src_rect_) + sizeof(dst_rect_) +
+ sizeof(filter_quality_);
+ total_size += PaintOpWriter::GetImageSize(image_);
+ return total_size.ValueOrDefault(0u);
+}
+
bool ImagePaintFilter::operator==(const ImagePaintFilter& other) const {
return !!image_ == !!other.image_ &&
PaintOp::AreSkRectsEqual(src_rect_, other.src_rect_) &&
@@ -476,6 +588,13 @@ RecordPaintFilter::RecordPaintFilter(sk_sp<PaintRecord> record,
RecordPaintFilter::~RecordPaintFilter() = default;
+size_t RecordPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(record_bounds_);
+ total_size += PaintOpWriter::GetRecordSize(record_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool RecordPaintFilter::operator==(const RecordPaintFilter& other) const {
return !!record_ == !!other.record_ &&
PaintOp::AreSkRectsEqual(record_bounds_, other.record_bounds_);
@@ -499,6 +618,15 @@ MergePaintFilter::MergePaintFilter(sk_sp<PaintFilter>* const filters,
MergePaintFilter::~MergePaintFilter() = default;
+size_t MergePaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size = 0u;
+ for (size_t i = 0; i < input_count(); ++i)
+ total_size += GetFilterSize(input_at(i));
+ total_size += BaseSerializedSize();
+ total_size += sizeof(input_count());
+ return total_size.ValueOrDefault(0u);
+}
+
bool MergePaintFilter::operator==(const MergePaintFilter& other) const {
if (inputs_->size() != other.inputs_->size())
return false;
@@ -533,6 +661,14 @@ MorphologyPaintFilter::MorphologyPaintFilter(MorphType morph_type,
MorphologyPaintFilter::~MorphologyPaintFilter() = default;
+size_t MorphologyPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(morph_type_) + sizeof(radius_x_) +
+ sizeof(radius_y_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool MorphologyPaintFilter::operator==(
const MorphologyPaintFilter& other) const {
return morph_type_ == other.morph_type_ && radius_x_ == other.radius_x_ &&
@@ -554,6 +690,13 @@ OffsetPaintFilter::OffsetPaintFilter(SkScalar dx,
OffsetPaintFilter::~OffsetPaintFilter() = default;
+size_t OffsetPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(dx_) + sizeof(dy_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool OffsetPaintFilter::operator==(const OffsetPaintFilter& other) const {
return PaintOp::AreEqualEvenIfNaN(dx_, other.dx_) &&
PaintOp::AreEqualEvenIfNaN(dy_, other.dy_) &&
@@ -573,6 +716,13 @@ TilePaintFilter::TilePaintFilter(const SkRect& src,
TilePaintFilter::~TilePaintFilter() = default;
+size_t TilePaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(src_) + sizeof(dst_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool TilePaintFilter::operator==(const TilePaintFilter& other) const {
return PaintOp::AreSkRectsEqual(src_, other.src_) &&
PaintOp::AreSkRectsEqual(dst_, other.dst_) &&
@@ -614,6 +764,12 @@ TurbulencePaintFilter::TurbulencePaintFilter(TurbulenceType turbulence_type,
TurbulencePaintFilter::~TurbulencePaintFilter() = default;
+size_t TurbulencePaintFilter::SerializedSize() const {
+ return BaseSerializedSize() + sizeof(turbulence_type_) +
+ sizeof(base_frequency_x_) + sizeof(base_frequency_y_) +
+ sizeof(num_octaves_) + sizeof(seed_) + sizeof(tile_size_);
+}
+
bool TurbulencePaintFilter::operator==(
const TurbulencePaintFilter& other) const {
return turbulence_type_ == other.turbulence_type_ &&
@@ -634,6 +790,12 @@ PaintFlagsPaintFilter::PaintFlagsPaintFilter(PaintFlags flags,
PaintFlagsPaintFilter::~PaintFlagsPaintFilter() = default;
+size_t PaintFlagsPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size = BaseSerializedSize();
+ total_size += flags_.GetSerializedSize();
+ return total_size.ValueOrDefault(0u);
+}
+
bool PaintFlagsPaintFilter::operator==(
const PaintFlagsPaintFilter& other) const {
return flags_ == other.flags_;
@@ -652,6 +814,13 @@ MatrixPaintFilter::MatrixPaintFilter(const SkMatrix& matrix,
MatrixPaintFilter::~MatrixPaintFilter() = default;
+size_t MatrixPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(matrix_) + sizeof(filter_quality_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool MatrixPaintFilter::operator==(const MatrixPaintFilter& other) const {
return PaintOp::AreSkMatricesEqual(matrix_, other.matrix_) &&
filter_quality_ == other.filter_quality_ &&
@@ -691,6 +860,15 @@ LightingDistantPaintFilter::LightingDistantPaintFilter(
LightingDistantPaintFilter::~LightingDistantPaintFilter() = default;
+size_t LightingDistantPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(lighting_type_) + sizeof(direction_) +
+ sizeof(light_color_) + sizeof(surface_scale_) + sizeof(kconstant_) +
+ sizeof(shininess_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool LightingDistantPaintFilter::operator==(
const LightingDistantPaintFilter& other) const {
return lighting_type_ == other.lighting_type_ &&
@@ -734,6 +912,15 @@ LightingPointPaintFilter::LightingPointPaintFilter(LightingType lighting_type,
LightingPointPaintFilter::~LightingPointPaintFilter() = default;
+size_t LightingPointPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(lighting_type_) + sizeof(location_) +
+ sizeof(light_color_) + sizeof(surface_scale_) + sizeof(kconstant_) +
+ sizeof(shininess_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool LightingPointPaintFilter::operator==(
const LightingPointPaintFilter& other) const {
return lighting_type_ == other.lighting_type_ &&
@@ -784,6 +971,16 @@ LightingSpotPaintFilter::LightingSpotPaintFilter(LightingType lighting_type,
LightingSpotPaintFilter::~LightingSpotPaintFilter() = default;
+size_t LightingSpotPaintFilter::SerializedSize() const {
+ base::CheckedNumeric<size_t> total_size =
+ BaseSerializedSize() + sizeof(lighting_type_) + sizeof(location_) +
+ sizeof(target_) + sizeof(specular_exponent_) + sizeof(cutoff_angle_) +
+ sizeof(light_color_) + sizeof(surface_scale_) + sizeof(kconstant_) +
+ sizeof(shininess_);
+ total_size += GetFilterSize(input_.get());
+ return total_size.ValueOrDefault(0u);
+}
+
bool LightingSpotPaintFilter::operator==(
const LightingSpotPaintFilter& other) const {
return lighting_type_ == other.lighting_type_ &&
diff --git a/chromium/cc/paint/paint_filter.h b/chromium/cc/paint/paint_filter.h
index 716a153834e..107289bf0af 100644
--- a/chromium/cc/paint/paint_filter.h
+++ b/chromium/cc/paint/paint_filter.h
@@ -29,7 +29,7 @@ namespace cc {
class CC_PAINT_EXPORT PaintFilter : public SkRefCnt {
public:
- enum class Type : uint8_t {
+ enum class Type : uint32_t {
// For serialization purposes, we reserve one enum to indicate that there
// was no PaintFilter, ie the filter is "null".
kNullFilter,
@@ -58,7 +58,7 @@ class CC_PAINT_EXPORT PaintFilter : public SkRefCnt {
// Update the following if kLightingSpot is not the max anymore.
kMaxFilterType = kLightingSpot
};
- enum class LightingType : uint8_t {
+ enum class LightingType : uint32_t {
kDiffuse,
kSpecular,
// Update the following if kSpecular is not the max anymore.
@@ -72,6 +72,10 @@ class CC_PAINT_EXPORT PaintFilter : public SkRefCnt {
static std::string TypeToString(Type type);
+ // Returns the size required to serialize the |filter|. Note that |filter| can
+ // be nullptr.
+ static size_t GetFilterSize(const PaintFilter* filter);
+
Type type() const { return type_; }
SkIRect filter_bounds(const SkIRect& src,
const SkMatrix& ctm,
@@ -88,6 +92,8 @@ class CC_PAINT_EXPORT PaintFilter : public SkRefCnt {
return crop_rect_ ? &*crop_rect_ : nullptr;
}
+ virtual size_t SerializedSize() const = 0;
+
// Note that this operation is potentially slow. It also only compares things
// that are easy to compare. As an example, it doesn't compare equality of
// images, rather only its existence. This is meant to be used only by tests
@@ -107,6 +113,8 @@ class CC_PAINT_EXPORT PaintFilter : public SkRefCnt {
return cached_sk_filter_;
}
+ size_t BaseSerializedSize() const;
+
// This should be created by each sub-class at construction time, to ensure
// that subsequent access to the filter is thread-safe.
sk_sp<SkImageFilter> cached_sk_filter_;
@@ -135,6 +143,7 @@ class CC_PAINT_EXPORT ColorFilterPaintFilter final : public PaintFilter {
const sk_sp<SkColorFilter>& color_filter() const { return color_filter_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const ColorFilterPaintFilter& other) const;
private:
@@ -159,6 +168,7 @@ class CC_PAINT_EXPORT BlurPaintFilter final : public PaintFilter {
SkScalar sigma_y() const { return sigma_y_; }
TileMode tile_mode() const { return tile_mode_; }
+ size_t SerializedSize() const override;
bool operator==(const BlurPaintFilter& other) const;
private:
@@ -190,6 +200,7 @@ class CC_PAINT_EXPORT DropShadowPaintFilter final : public PaintFilter {
ShadowMode shadow_mode() const { return shadow_mode_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const DropShadowPaintFilter& other) const;
private:
@@ -215,6 +226,7 @@ class CC_PAINT_EXPORT MagnifierPaintFilter final : public PaintFilter {
SkScalar inset() const { return inset_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const MagnifierPaintFilter& other) const;
private:
@@ -232,6 +244,7 @@ class CC_PAINT_EXPORT ComposePaintFilter final : public PaintFilter {
const sk_sp<PaintFilter>& outer() const { return outer_; }
const sk_sp<PaintFilter>& inner() const { return inner_; }
+ size_t SerializedSize() const override;
bool operator==(const ComposePaintFilter& other) const;
private:
@@ -254,6 +267,7 @@ class CC_PAINT_EXPORT AlphaThresholdPaintFilter final : public PaintFilter {
SkScalar outer_max() const { return outer_max_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const AlphaThresholdPaintFilter& other) const;
private:
@@ -276,6 +290,7 @@ class CC_PAINT_EXPORT XfermodePaintFilter final : public PaintFilter {
const sk_sp<PaintFilter>& background() const { return background_; }
const sk_sp<PaintFilter>& foreground() const { return foreground_; }
+ size_t SerializedSize() const override;
bool operator==(const XfermodePaintFilter& other) const;
private:
@@ -305,6 +320,7 @@ class CC_PAINT_EXPORT ArithmeticPaintFilter final : public PaintFilter {
const sk_sp<PaintFilter>& background() const { return background_; }
const sk_sp<PaintFilter>& foreground() const { return foreground_; }
+ size_t SerializedSize() const override;
bool operator==(const ArithmeticPaintFilter& other) const;
private:
@@ -341,6 +357,7 @@ class CC_PAINT_EXPORT MatrixConvolutionPaintFilter final : public PaintFilter {
bool convolve_alpha() const { return convolve_alpha_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const MatrixConvolutionPaintFilter& other) const;
private:
@@ -373,6 +390,7 @@ class CC_PAINT_EXPORT DisplacementMapEffectPaintFilter final
const sk_sp<PaintFilter>& displacement() const { return displacement_; }
const sk_sp<PaintFilter>& color() const { return color_; }
+ size_t SerializedSize() const override;
bool operator==(const DisplacementMapEffectPaintFilter& other) const;
private:
@@ -397,6 +415,7 @@ class CC_PAINT_EXPORT ImagePaintFilter final : public PaintFilter {
const SkRect& dst_rect() const { return dst_rect_; }
SkFilterQuality filter_quality() const { return filter_quality_; }
+ size_t SerializedSize() const override;
bool operator==(const ImagePaintFilter& other) const;
private:
@@ -415,6 +434,7 @@ class CC_PAINT_EXPORT RecordPaintFilter final : public PaintFilter {
const sk_sp<PaintRecord>& record() const { return record_; }
SkRect record_bounds() const { return record_bounds_; }
+ size_t SerializedSize() const override;
bool operator==(const RecordPaintFilter& other) const;
private:
@@ -436,6 +456,7 @@ class CC_PAINT_EXPORT MergePaintFilter final : public PaintFilter {
return inputs_[i].get();
}
+ size_t SerializedSize() const override;
bool operator==(const MergePaintFilter& other) const;
private:
@@ -444,7 +465,7 @@ class CC_PAINT_EXPORT MergePaintFilter final : public PaintFilter {
class CC_PAINT_EXPORT MorphologyPaintFilter final : public PaintFilter {
public:
- enum class MorphType : uint8_t { kDilate, kErode, kMaxMorphType = kErode };
+ enum class MorphType : uint32_t { kDilate, kErode, kMaxMorphType = kErode };
static constexpr Type kType = Type::kMorphology;
MorphologyPaintFilter(MorphType morph_type,
int radius_x,
@@ -458,6 +479,7 @@ class CC_PAINT_EXPORT MorphologyPaintFilter final : public PaintFilter {
int radius_y() const { return radius_y_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const MorphologyPaintFilter& other) const;
private:
@@ -480,6 +502,7 @@ class CC_PAINT_EXPORT OffsetPaintFilter final : public PaintFilter {
SkScalar dy() const { return dy_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const OffsetPaintFilter& other) const;
private:
@@ -500,6 +523,7 @@ class CC_PAINT_EXPORT TilePaintFilter final : public PaintFilter {
const SkRect& dst() const { return dst_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const TilePaintFilter& other) const;
private:
@@ -511,7 +535,7 @@ class CC_PAINT_EXPORT TilePaintFilter final : public PaintFilter {
class CC_PAINT_EXPORT TurbulencePaintFilter final : public PaintFilter {
public:
static constexpr Type kType = Type::kTurbulence;
- enum class TurbulenceType : uint8_t {
+ enum class TurbulenceType : uint32_t {
kTurbulence,
kFractalNoise,
kMaxTurbulenceType = kFractalNoise
@@ -532,6 +556,7 @@ class CC_PAINT_EXPORT TurbulencePaintFilter final : public PaintFilter {
SkScalar seed() const { return seed_; }
SkISize tile_size() const { return tile_size_; }
+ size_t SerializedSize() const override;
bool operator==(const TurbulencePaintFilter& other) const;
private:
@@ -552,6 +577,7 @@ class CC_PAINT_EXPORT PaintFlagsPaintFilter final : public PaintFilter {
const PaintFlags& flags() const { return flags_; }
+ size_t SerializedSize() const override;
bool operator==(const PaintFlagsPaintFilter& other) const;
private:
@@ -570,6 +596,7 @@ class CC_PAINT_EXPORT MatrixPaintFilter final : public PaintFilter {
SkFilterQuality filter_quality() const { return filter_quality_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const MatrixPaintFilter& other) const;
private:
@@ -602,6 +629,7 @@ class CC_PAINT_EXPORT LightingDistantPaintFilter final : public PaintFilter {
SkScalar shininess() const { return shininess_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const LightingDistantPaintFilter& other) const;
private:
@@ -638,6 +666,7 @@ class CC_PAINT_EXPORT LightingPointPaintFilter final : public PaintFilter {
SkScalar shininess() const { return shininess_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const LightingPointPaintFilter& other) const;
private:
@@ -680,6 +709,7 @@ class CC_PAINT_EXPORT LightingSpotPaintFilter final : public PaintFilter {
SkScalar shininess() const { return shininess_; }
const sk_sp<PaintFilter>& input() const { return input_; }
+ size_t SerializedSize() const override;
bool operator==(const LightingSpotPaintFilter& other) const;
private:
diff --git a/chromium/cc/paint/paint_flags.cc b/chromium/cc/paint/paint_flags.cc
index a08298b2d94..3a75c09ff9d 100644
--- a/chromium/cc/paint/paint_flags.cc
+++ b/chromium/cc/paint/paint_flags.cc
@@ -6,6 +6,7 @@
#include "cc/paint/paint_filter.h"
#include "cc/paint/paint_op_buffer.h"
+#include "cc/paint/paint_op_writer.h"
namespace {
@@ -207,4 +208,18 @@ bool PaintFlags::HasDiscardableImages() const {
return false;
}
+size_t PaintFlags::GetSerializedSize() const {
+ return sizeof(text_size_) + sizeof(color_) + sizeof(width_) +
+ sizeof(miter_limit_) + sizeof(blend_mode_) + sizeof(bitfields_uint_) +
+ PaintOpWriter::GetFlattenableSize(path_effect_.get()) +
+ PaintOpWriter::Alignment() +
+ PaintOpWriter::GetFlattenableSize(mask_filter_.get()) +
+ PaintOpWriter::Alignment() +
+ PaintOpWriter::GetFlattenableSize(color_filter_.get()) +
+ PaintOpWriter::Alignment() +
+ PaintOpWriter::GetFlattenableSize(draw_looper_.get()) +
+ PaintFilter::GetFilterSize(image_filter_.get()) +
+ PaintShader::GetSerializedSize(shader_.get());
+}
+
} // namespace cc
diff --git a/chromium/cc/paint/paint_flags.h b/chromium/cc/paint/paint_flags.h
index b15292585cc..a132fd702bd 100644
--- a/chromium/cc/paint/paint_flags.h
+++ b/chromium/cc/paint/paint_flags.h
@@ -221,6 +221,8 @@ class CC_PAINT_EXPORT PaintFlags {
bool HasDiscardableImages() const;
+ size_t GetSerializedSize() const;
+
private:
friend class PaintOpReader;
friend class PaintOpWriter;
diff --git a/chromium/cc/paint/paint_op_buffer_unittest.cc b/chromium/cc/paint/paint_op_buffer_unittest.cc
index 8833e3538b9..2b4ce80f232 100644
--- a/chromium/cc/paint/paint_op_buffer_unittest.cc
+++ b/chromium/cc/paint/paint_op_buffer_unittest.cc
@@ -2853,7 +2853,13 @@ TEST(PaintOpBufferTest, ReplacesImagesFromProvider) {
buffer.Playback(&canvas, PlaybackParams(&image_provider));
}
-TEST(PaintOpBufferTest, FilterSerialization) {
+class PaintFilterSerializationTest : public ::testing::TestWithParam<bool> {};
+
+INSTANTIATE_TEST_CASE_P(PaintFilterSerializationTests,
+ PaintFilterSerializationTest,
+ ::testing::Values(true, false));
+
+TEST_P(PaintFilterSerializationTest, Basic) {
SkScalar scalars[9] = {1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f};
std::vector<sk_sp<PaintFilter>> filters = {
sk_sp<PaintFilter>{new ColorFilterPaintFilter(
@@ -2871,9 +2877,6 @@ TEST(PaintOpBufferTest, FilterSerialization) {
SkISize::Make(3, 3), scalars, 30.f, 123.f, SkIPoint::Make(0, 0),
SkMatrixConvolutionImageFilter::kClampToBlack_TileMode, true,
nullptr)},
- sk_sp<PaintFilter>{
- new RecordPaintFilter(sk_sp<PaintRecord>{new PaintRecord},
- SkRect::MakeXYWH(10, 15, 20, 25))},
sk_sp<PaintFilter>{new MorphologyPaintFilter(
MorphologyPaintFilter::MorphType::kErode, 15, 30, nullptr)},
sk_sp<PaintFilter>{new OffsetPaintFilter(-1.f, -2.f, nullptr)},
@@ -2909,41 +2912,33 @@ TEST(PaintOpBufferTest, FilterSerialization) {
SkDisplacementMapEffect::kG_ChannelSelectorType, 10, filters[6],
filters[7]));
filters.emplace_back(new MergePaintFilter(filters.data(), filters.size()));
+ filters.emplace_back(new RecordPaintFilter(
+ sk_sp<PaintRecord>{new PaintRecord}, SkRect::MakeXYWH(10, 15, 20, 25)));
- std::unique_ptr<char, base::AlignedFreeDeleter> memory(
- static_cast<char*>(base::AlignedAlloc(PaintOpBuffer::kInitialBufferSize,
- PaintOpBuffer::PaintOpAlign)));
TestOptionsProvider options_provider;
for (size_t i = 0; i < filters.size(); ++i) {
SCOPED_TRACE(i);
- auto& filter = filters[i];
-
- PaintFlags flags;
- flags.setImageFilter(filter);
- PaintOpBuffer buffer;
- buffer.push<DrawRectOp>(SkRect::MakeXYWH(1, 2, 3, 4), flags);
- SimpleBufferSerializer serializer(memory.get(),
- PaintOpBuffer::kInitialBufferSize,
- options_provider.image_provider(),
- options_provider.transfer_cache_helper());
- serializer.Serialize(&buffer);
- ASSERT_TRUE(serializer.valid());
- ASSERT_GT(serializer.written(), 0u);
-
- auto deserialized_buffer =
- PaintOpBuffer::MakeFromMemory(memory.get(), serializer.written(),
- options_provider.deserialize_options());
- ASSERT_TRUE(deserialized_buffer);
- PaintOpBuffer::Iterator it(deserialized_buffer.get());
- ASSERT_TRUE(it);
- auto* op = *it;
- ASSERT_TRUE(op->GetType() == PaintOpType::DrawRect);
- auto* rect_op = static_cast<DrawRectOp*>(op);
- EXPECT_FLOAT_RECT_EQ(rect_op->rect, SkRect::MakeXYWH(1, 2, 3, 4));
- EXPECT_TRUE(*filter == *rect_op->flags.getImageFilter());
- ++it;
- EXPECT_FALSE(it);
+ auto& filter = filters[i];
+ std::vector<uint8_t> memory;
+ size_t buffer_size = filter->type() == PaintFilter::Type::kPaintRecord
+ ? PaintOpBuffer::kInitialBufferSize
+ : PaintFilter::GetFilterSize(filter.get());
+ buffer_size += PaintOpWriter::HeaderBytes();
+ memory.resize(buffer_size);
+
+ PaintOpWriter writer(memory.data(), memory.size(),
+ options_provider.transfer_cache_helper(),
+ options_provider.image_provider(), GetParam());
+ writer.Write(filter.get());
+ ASSERT_GT(writer.size(), 0u) << PaintFilter::TypeToString(filter->type());
+
+ sk_sp<PaintFilter> deserialized_filter;
+ PaintOpReader reader(memory.data(), writer.size(),
+ options_provider.transfer_cache_helper(), GetParam());
+ reader.Read(&deserialized_filter);
+ ASSERT_TRUE(deserialized_filter);
+ EXPECT_TRUE(*filter == *deserialized_filter);
}
}
diff --git a/chromium/cc/paint/paint_op_reader.cc b/chromium/cc/paint/paint_op_reader.cc
index 3beadab336f..3e726ec037d 100644
--- a/chromium/cc/paint/paint_op_reader.cc
+++ b/chromium/cc/paint/paint_op_reader.cc
@@ -265,9 +265,13 @@ void PaintOpReader::Read(PaintImage* image) {
auto serialized_type =
static_cast<PaintOp::SerializedImageType>(serialized_type_int);
+ if (serialized_type == PaintOp::SerializedImageType::kNoImage)
+ return;
+
if (enable_security_constraints_) {
switch (serialized_type) {
case PaintOp::SerializedImageType::kNoImage:
+ NOTREACHED();
return;
case PaintOp::SerializedImageType::kImageData: {
SkColorType color_type;
diff --git a/chromium/cc/paint/paint_op_writer.cc b/chromium/cc/paint/paint_op_writer.cc
index 8940574891d..7b89776de52 100644
--- a/chromium/cc/paint/paint_op_writer.cc
+++ b/chromium/cc/paint/paint_op_writer.cc
@@ -22,6 +22,46 @@ void TypefaceCataloger(SkTypeface* typeface, void* ctx) {
}
} // namespace
+// static
+size_t PaintOpWriter::GetFlattenableSize(const SkFlattenable* flattenable) {
+ // The first bit is always written to indicate the serialized size of the
+ // flattenable, or zero if it doesn't exist.
+ size_t total_size = sizeof(size_t);
+ if (!flattenable)
+ return total_size;
+
+ // There is no method to know the serialized size of a flattenable without
+ // serializing it.
+ sk_sp<SkData> data = flattenable->serialize();
+ total_size += data->isEmpty() ? 0u : data->size();
+ return total_size;
+}
+
+// static
+size_t PaintOpWriter::GetImageSize(const PaintImage& image) {
+ // Image Serialization type.
+ size_t image_size = sizeof(PaintOp::SerializedImageType);
+ if (image) {
+ auto info = SkImageInfo::Make(image.width(), image.height(),
+ kN32_SkColorType, kPremul_SkAlphaType);
+ image_size += sizeof(info.colorType());
+ image_size += sizeof(info.width());
+ image_size += sizeof(info.height());
+ image_size += sizeof(size_t);
+ image_size += info.computeMinByteSize();
+ }
+ return image_size;
+}
+
+// static
+size_t PaintOpWriter::GetRecordSize(const PaintRecord* record) {
+ // Zero size indicates no record.
+ // TODO(khushalsagar): Querying the size of a PaintRecord is not supported.
+ // This works only for security constrained serialization which ignores
+ // records.
+ return sizeof(size_t);
+}
+
PaintOpWriter::PaintOpWriter(void* memory,
size_t size,
TransferCacheSerializeHelper* transfer_cache,
@@ -36,13 +76,13 @@ PaintOpWriter::PaintOpWriter(void* memory,
// Leave space for header of type/skip.
DCHECK_GE(size, HeaderBytes());
}
+
PaintOpWriter::~PaintOpWriter() = default;
template <typename T>
void PaintOpWriter::WriteSimple(const T& val) {
static_assert(base::is_trivially_copyable<T>::value, "");
- if (remaining_bytes_ < sizeof(T))
- valid_ = false;
+ EnsureBytes(sizeof(T));
if (!valid_)
return;
@@ -106,8 +146,7 @@ void PaintOpWriter::Write(const SkRRect& rect) {
void PaintOpWriter::Write(const SkPath& path) {
AlignMemory(4);
size_t bytes = path.writeToMemory(nullptr);
- if (bytes > remaining_bytes_)
- valid_ = false;
+ EnsureBytes(bytes);
if (!valid_)
return;
@@ -262,8 +301,7 @@ void PaintOpWriter::Write(SkColorType color_type) {
}
void PaintOpWriter::WriteData(size_t bytes, const void* input) {
- if (bytes > remaining_bytes_)
- valid_ = false;
+ EnsureBytes(bytes);
if (!valid_)
return;
if (bytes == 0)
@@ -290,8 +328,9 @@ void PaintOpWriter::AlignMemory(size_t alignment) {
// because alignment is a power of two. This doesn't use modulo operator
// however, since it can be slow.
size_t padding = ((memory + alignment - 1) & ~(alignment - 1)) - memory;
- if (padding > remaining_bytes_)
- valid_ = false;
+ EnsureBytes(padding);
+ if (!valid_)
+ return;
memory_ += padding;
remaining_bytes_ -= padding;
@@ -488,7 +527,7 @@ void PaintOpWriter::Write(const MergePaintFilter& filter) {
}
void PaintOpWriter::Write(const MorphologyPaintFilter& filter) {
- WriteSimple(static_cast<uint32_t>(filter.morph_type()));
+ WriteSimple(filter.morph_type());
WriteSimple(filter.radius_x());
WriteSimple(filter.radius_y());
Write(filter.input().get());
@@ -507,7 +546,7 @@ void PaintOpWriter::Write(const TilePaintFilter& filter) {
}
void PaintOpWriter::Write(const TurbulencePaintFilter& filter) {
- WriteSimple(static_cast<uint32_t>(filter.turbulence_type()));
+ WriteSimple(filter.turbulence_type());
WriteSimple(filter.base_frequency_x());
WriteSimple(filter.base_frequency_y());
WriteSimple(filter.num_octaves());
@@ -526,7 +565,7 @@ void PaintOpWriter::Write(const MatrixPaintFilter& filter) {
}
void PaintOpWriter::Write(const LightingDistantPaintFilter& filter) {
- WriteSimple(static_cast<uint32_t>(filter.lighting_type()));
+ WriteSimple(filter.lighting_type());
WriteSimple(filter.direction());
WriteSimple(filter.light_color());
WriteSimple(filter.surface_scale());
@@ -536,7 +575,7 @@ void PaintOpWriter::Write(const LightingDistantPaintFilter& filter) {
}
void PaintOpWriter::Write(const LightingPointPaintFilter& filter) {
- WriteSimple(static_cast<uint32_t>(filter.lighting_type()));
+ WriteSimple(filter.lighting_type());
WriteSimple(filter.location());
WriteSimple(filter.light_color());
WriteSimple(filter.surface_scale());
@@ -546,7 +585,7 @@ void PaintOpWriter::Write(const LightingPointPaintFilter& filter) {
}
void PaintOpWriter::Write(const LightingSpotPaintFilter& filter) {
- WriteSimple(static_cast<uint32_t>(filter.lighting_type()));
+ WriteSimple(filter.lighting_type());
WriteSimple(filter.location());
WriteSimple(filter.target());
WriteSimple(filter.specular_exponent());
@@ -563,10 +602,9 @@ void PaintOpWriter::Write(const PaintRecord* record) {
// information until we do the serialization. So, skip the amount needed
// before writing.
size_t size_offset = sizeof(size_t);
- if (size_offset > remaining_bytes_) {
- valid_ = false;
+ EnsureBytes(size_offset);
+ if (!valid_)
return;
- }
char* size_memory = memory_;
@@ -607,9 +645,7 @@ void PaintOpWriter::Write(const PaintRecord* record) {
void PaintOpWriter::Write(const PaintImage& image) {
if (!image) {
- Write(static_cast<uint8_t>(
- PaintOp::SerializedImageType::kTransferCacheEntry));
- Write(kInvalidImageTransferCacheEntryId);
+ Write(static_cast<uint8_t>(PaintOp::SerializedImageType::kNoImage));
return;
}
// Note that the filter quality doesn't matter here, since it's not
@@ -631,4 +667,9 @@ void PaintOpWriter::Write(const SkRegion& region) {
WriteData(bytes_written, data.get());
}
+inline void PaintOpWriter::EnsureBytes(size_t required_bytes) {
+ if (remaining_bytes_ < required_bytes)
+ valid_ = false;
+}
+
} // namespace cc
diff --git a/chromium/cc/paint/paint_op_writer.h b/chromium/cc/paint/paint_op_writer.h
index 04587c2381b..d66b61bf1bf 100644
--- a/chromium/cc/paint/paint_op_writer.h
+++ b/chromium/cc/paint/paint_op_writer.h
@@ -32,6 +32,10 @@ class CC_PAINT_EXPORT PaintOpWriter {
~PaintOpWriter();
static size_t constexpr HeaderBytes() { return 4u; }
+ static size_t constexpr Alignment() { return 4u; }
+ static size_t GetFlattenableSize(const SkFlattenable* flattenable);
+ static size_t GetImageSize(const PaintImage& image);
+ static size_t GetRecordSize(const PaintRecord* record);
// Write a sequence of arbitrary bytes.
void WriteData(size_t bytes, const void* input);
@@ -123,19 +127,20 @@ class CC_PAINT_EXPORT PaintOpWriter {
void Write(const PaintImage& image);
void Write(const SkRegion& region);
+ void EnsureBytes(size_t required_bytes);
+
char* memory_ = nullptr;
size_t size_ = 0u;
size_t remaining_bytes_ = 0u;
- bool valid_ = true;
TransferCacheSerializeHelper* transfer_cache_;
ImageProvider* image_provider_;
+ bool valid_ = true;
// Indicates that the following security constraints must be applied during
// serialization:
// 1) PaintRecords and SkDrawLoopers must be ignored.
// 2) Codec backed images must be decoded and only the bitmap should be
// serialized.
-
const bool enable_security_constraints_;
};
diff --git a/chromium/cc/paint/paint_shader.cc b/chromium/cc/paint/paint_shader.cc
index eb5a1232b9e..fe3f6ab0331 100644
--- a/chromium/cc/paint/paint_shader.cc
+++ b/chromium/cc/paint/paint_shader.cc
@@ -5,6 +5,7 @@
#include "cc/paint/paint_shader.h"
#include "base/memory/ptr_util.h"
+#include "cc/paint/paint_op_writer.h"
#include "cc/paint/paint_record.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
@@ -159,6 +160,29 @@ sk_sp<PaintShader> PaintShader::MakePaintRecord(
return shader;
}
+// static
+size_t PaintShader::GetSerializedSize(const PaintShader* shader) {
+ size_t bool_size = sizeof(bool);
+ if (!shader)
+ return bool_size;
+
+ return bool_size + sizeof(shader->shader_type_) + sizeof(shader->flags_) +
+ sizeof(shader->end_radius_) + sizeof(shader->start_radius_) +
+ sizeof(shader->tx_) + sizeof(shader->ty_) +
+ sizeof(shader->fallback_color_) + sizeof(shader->scaling_behavior_) +
+ bool_size + sizeof(*shader->local_matrix_) + sizeof(shader->center_) +
+ sizeof(shader->tile_) + sizeof(shader->start_point_) +
+ sizeof(shader->end_point_) + sizeof(shader->start_degrees_) +
+ sizeof(shader->end_degrees_) +
+ PaintOpWriter::GetImageSize(shader->image_) +
+ PaintOpWriter::GetImageSize(shader->image_) + bool_size +
+ PaintOpWriter::GetRecordSize(shader->record_.get()) +
+ sizeof(shader->colors_.size()) +
+ shader->colors_.size() * sizeof(SkColor) +
+ sizeof(shader->positions_.size()) +
+ shader->positions_.size() * sizeof(SkScalar);
+}
+
PaintShader::PaintShader(Type type) : shader_type_(type) {}
PaintShader::~PaintShader() = default;
diff --git a/chromium/cc/paint/paint_shader.h b/chromium/cc/paint/paint_shader.h
index 919141fe34e..e6bcdc6ffd0 100644
--- a/chromium/cc/paint/paint_shader.h
+++ b/chromium/cc/paint/paint_shader.h
@@ -100,6 +100,8 @@ class CC_PAINT_EXPORT PaintShader : public SkRefCnt {
const SkMatrix* local_matrix,
ScalingBehavior scaling_behavior = ScalingBehavior::kRasterAtScale);
+ static size_t GetSerializedSize(const PaintShader* shader);
+
~PaintShader() override;
SkMatrix GetLocalMatrix() const {
diff --git a/chromium/chrome/VERSION b/chromium/chrome/VERSION
index 8355e122f99..b118fa66a94 100644
--- a/chromium/chrome/VERSION
+++ b/chromium/chrome/VERSION
@@ -1,4 +1,4 @@
MAJOR=65
MINOR=0
BUILD=3325
-PATCH=75
+PATCH=151
diff --git a/chromium/chrome/app/resources/chromium_strings_ca.xtb b/chromium/chrome/app/resources/chromium_strings_ca.xtb
index d0bc06d7614..a34058594dc 100644
--- a/chromium/chrome/app/resources/chromium_strings_ca.xtb
+++ b/chromium/chrome/app/resources/chromium_strings_ca.xtb
@@ -157,9 +157,9 @@
<translation id="6403826409255603130">Chromium és un navegador web que executa les pàgines web i les aplicacions a gran velocitat. És ràpid, estable i fàcil d'utilitzar. Navegueu per Internet amb més seguretat amb protecció inserida a Chromium contra el programari maliciós i contra la pesca (suplantació d'identitat).</translation>
<translation id="6475912303565314141">També controla la pàgina que es mostra quan inicieu Chromium.</translation>
<translation id="6485906693002546646">Utilitzeu <ph name="PROFILE_EMAIL" /> per sincronitzar el contingut de Chromium. Per modificar la preferència de sincronització o per utilitzar Chromium sense cap compte de Google, dirigiu-vos a <ph name="SETTINGS_LINK" />.</translation>
-<translation id="6505742536731484931">Chromium necessita accés a la teva ubicació per compartir-la amb aquest lloc web.</translation>
+<translation id="6505742536731484931">Chromium necessita accedir a la teva ubicació per compartir-la amb aquest lloc web.</translation>
<translation id="6510925080656968729">Desinstal·la Chromium</translation>
-<translation id="6526111688217511984">Chromium necessita tenir accés a l'emmagatzematge per poder baixar fitxers.</translation>
+<translation id="6526111688217511984">Chromium necessita accedir a l'emmagatzematge per poder baixar fitxers.</translation>
<translation id="6598877126913850652">Ves a la configuració de notificacions de Chromium</translation>
<translation id="6676384891291319759">Accedeix a Internet</translation>
<translation id="6717134281241384636">El vostre perfil no es pot utilitzar perquè es va crear amb una versió més recent de Chromium.
diff --git a/chromium/chrome/app/resources/chromium_strings_mr.xtb b/chromium/chrome/app/resources/chromium_strings_mr.xtb
index 9b14af05103..4cd0e926f5e 100644
--- a/chromium/chrome/app/resources/chromium_strings_mr.xtb
+++ b/chromium/chrome/app/resources/chromium_strings_mr.xtb
@@ -6,7 +6,7 @@
<translation id="1115445892567829615">Chromium आपला डेटा संकालित करू शकले नाही. कृपया आपला संकालन वाक्यांश अपडेट करा.</translation>
<translation id="113122355610423240">Chromium आपला डीफॉल्ट ब्राउझर आहे</translation>
<translation id="1170115874949214249">आपल्या फोनवर Chromium इंस्टॉल करा. आम्ही आपल्या खाते पुनर्प्राप्ती फोन नंबरवर एक SMS पाठवू.</translation>
-<translation id="1174473354587728743">एक संगणक सामायिक करायचा? आपल्याला आवडते त्या प्रकारे आपण आता Chromium सेट करू शकता.</translation>
+<translation id="1174473354587728743">एक कॉंप्युटर सामायिक करायचा? आपल्याला आवडते त्या प्रकारे आपण आता Chromium सेट करू शकता.</translation>
<translation id="1185134272377778587">Chromium बद्दल</translation>
<translation id="1298199220304005244">Chromium OS वापरून मदत मिळवा</translation>
<translation id="1396446129537741364">Chromium पासवर्ड दर्शविण्याचा प्रयत्न करत आहे.</translation>
@@ -31,12 +31,12 @@
<translation id="2077129598763517140">उपलब्ध असेल तेव्हा हार्डवेअर ऍक्सीलरेशन वापरा</translation>
<translation id="2119636228670142020">&amp;Chromium OS बद्दल</translation>
<translation id="2158734852934720349">Chromium OS खुला स्त्रोत परवाने</translation>
-<translation id="2241627712206172106">आपण संगणक सामायिक केल्यास, मित्र आणि कुटुंब स्वतंत्रपणे ब्राउझ करू शकतात आणि त्यांना पाहिजे तसे Chromium सेट अप करू शकतात.</translation>
+<translation id="2241627712206172106">आपण कॉंप्युटर सामायिक केल्यास, मित्र आणि कुटुंब स्वतंत्रपणे ब्राउझ करू शकतात आणि त्यांना पाहिजे तसे Chromium सेट अप करू शकतात.</translation>
<translation id="2265088490657775772">Chromium तुमच्या iPhone वर मिळवा</translation>
<translation id="2316129865977710310">नाही, नको</translation>
-<translation id="2347108572062610441">आपण Chromium प्रारंभ करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे या विस्ताराने बदलले आहे.</translation>
+<translation id="2347108572062610441">आपण Chromium सुरू करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे या विस्ताराने बदलले आहे.</translation>
<translation id="2389622953163669926">{NUM_DOWNLOAD,plural, =1{एक डाउनलोड सध्या प्रगतीपथावर आहे. आपण डाउनलोड रद्द करू आणि Chromium च्या बाहेर पडू इच्छिता?}one{सध्या # डाउनलोड प्रगतीपथावर आहे. आपण डाउनलोड रद्द करू आणि Chromium च्या बाहेर पडू इच्छिता?}other{सध्या # डाउनलोड प्रगतीपथावर आहेत. आपण डाउनलोड रद्द करू आणि Chromium च्या बाहेर पडू इच्छिता?}}</translation>
-<translation id="2396765026452590966">आपण Chromium प्रारंभ करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे "<ph name="EXTENSION_NAME" />" विस्ताराने बदलले आहे.</translation>
+<translation id="2396765026452590966">आपण Chromium सुरू करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे "<ph name="EXTENSION_NAME" />" विस्ताराने बदलले आहे.</translation>
<translation id="2483889755041906834">Chromium मध्ये</translation>
<translation id="2485422356828889247">अनइन्स्टॉल करणे</translation>
<translation id="2486653164587200256">Chromium यापुढे Windows XP किंवा Windows Vista वर समर्थित नसल्याने कदाचित ते योग्यरित्या कार्य करू शकत नाही.</translation>
@@ -156,7 +156,7 @@
<translation id="6394232988457703198">आपण आता Chromium रीस्टार्ट करावे.</translation>
<translation id="6400072781405947421">Mac OS X 10.9 वर Chromium ला सपोर्ट नसल्यामुळे ते कदाचित नीट चालणार नाही.</translation>
<translation id="6403826409255603130">Chromium हे एक वेबब्राउझर असून ते वेबपृष्ठे आणि अॅप्लिकेशन अतिशय वेगात चालवते. हे वापरण्यास जलद, स्थिर आणि सोपे आहे. Chromium मध्ये तयार करण्यासाठी मालवेयर आणि फिशिंग संरक्षणासह वेब अधिक सुरक्षितपणे ब्राउझ करा.</translation>
-<translation id="6475912303565314141">आपण Chromium प्रारंभ करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
+<translation id="6475912303565314141">आपण Chromium सुरू करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
<translation id="6485906693002546646">आपण आपली Chromium सामग्री संकालित करण्यासाठी <ph name="PROFILE_EMAIL" /> वापरत आहात. आपले संकालन प्राधान्य अपडेट करण्यासाठी किंवा Google खाते न सोडता Chromium वापरण्यासाठी, <ph name="SETTINGS_LINK" /> ला भेट द्या.</translation>
<translation id="6505742536731484931">या साइटसह तुमचे स्थान शेअर करण्यासाठी Chromium ला तुमच्या स्थानामध्ये अॅक्सेस हवा आहे.</translation>
<translation id="6510925080656968729">Chromium विस्‍थापित करा</translation>
@@ -230,13 +230,13 @@ Chromium आपली सेटिंग्ज पुनर्प्राप्
<translation id="8621669128220841554">अनिर्दिष्ट त्रुटीमुळे स्थापना अयशस्वी झाली. कृपया Chromium पुन्‍हा डाउनलोड करा.</translation>
<translation id="8628626585870903697">Chromium कार्य करण्यासाठी प्रिंट पूर्वावलोकनास आवश्यक असलेले PDF viewer समाविष्ट करीत नाही.</translation>
<translation id="8667808506758191620">आपले <ph name="DEVICE_TYPE" /> अद्ययावत आहे.</translation>
-<translation id="8697124171261953979">आपण Chromium प्रारंभ करता किंवा ओम्निबॉक्समधून शोध घेता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
+<translation id="8697124171261953979">आपण Chromium सुरू करता किंवा ओम्निबॉक्समधून शोध घेता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
<translation id="8704119203788522458">हे आपले Chromium आहे</translation>
<translation id="872034308864968620">Chromium पार्श्वभूमीवर चालू द्या</translation>
<translation id="8803635938069941624">Chromium OS अटी</translation>
<translation id="8821041990367117597">आपले खाते साइन इन तपशील कालबाह्य झाल्यामुळे Chromium आपला डेटा संकालित करू शकले नाही.</translation>
<translation id="8862326446509486874">आपल्‍याकडे सिस्टम-स्तर स्थापनेसाठी उचित अधिकार नाहीत. प्रशासक म्हणून पुन्हा इन्स्टॉलर चालविण्याचा प्रयत्न करा.</translation>
-<translation id="8897323336392112261">आपण Chromium प्रारंभ करता किंवा होम बटण क्लिक करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
+<translation id="8897323336392112261">आपण Chromium सुरू करता किंवा होम बटण क्लिक करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
<translation id="8907580949721785412">Chromium संकेतशब्‍द दर्शविण्‍याचा प्रयत्‍न करत आहे. यास अनुमती देण्‍यासाठी आपला Windows संकेतशब्‍द टाइप करा.</translation>
<translation id="8941642502866065432">Chromium अपडेट करू शकत नाही</translation>
<translation id="894903460958736500">आपल्या संगणकावर चालत असलेले सॉफ्टवेअर Chromium सह विसंगत आहे.</translation>
diff --git a/chromium/chrome/app/resources/chromium_strings_tr.xtb b/chromium/chrome/app/resources/chromium_strings_tr.xtb
index fddad4516b9..fbb1c528471 100644
--- a/chromium/chrome/app/resources/chromium_strings_tr.xtb
+++ b/chromium/chrome/app/resources/chromium_strings_tr.xtb
@@ -7,7 +7,7 @@
<translation id="1170115874949214249">Chromium'u telefonunuza yükleyin. Hesap kurtarma telefon numaranıza SMS göndereceğiz.</translation>
<translation id="1174473354587728743">Bilgisayarı paylaşıyor musunuz? Artık Chromium'u tam olarak istediğiniz gibi kurabilirsiniz.</translation>
<translation id="1185134272377778587">Chromium hakkında</translation>
-<translation id="1298199220304005244">Chromium OS'u kullanma konusunda yardım alın</translation>
+<translation id="1298199220304005244">Chromium OS'i kullanma konusunda yardım alın</translation>
<translation id="1396446129537741364">Chromium, şifreleri göstermeye çalışıyor.</translation>
<translation id="1414495520565016063">Chromium'da oturum açtınız!</translation>
<translation id="1444754455097148408">Chromium açık kaynak lisansları</translation>
@@ -72,7 +72,7 @@
<translation id="3479552764303398839">Şimdi değil</translation>
<translation id="3509308970982693815">Lütfen tüm Chromium pencerelerini kapatıp tekrar deneyin.</translation>
<translation id="352783484088404971">Chromium'dan Kaldır...</translation>
-<translation id="3549345495227188780">Chromium OS'yi Kullanmaya Başlayın</translation>
+<translation id="3549345495227188780">Chromium OS'i Kullanmaya Başlayın</translation>
<translation id="3582788516608077514">Chromium güncelleniyor...</translation>
<translation id="358997566136285270">Chromium logosu</translation>
<translation id="3713809861844741608">Bağlantıyı yeni Chromium &amp;sekmesinde aç</translation>
@@ -178,7 +178,7 @@ Bazı özellikler kullanılamayabilir. Lütfen farklı bir profil dizini belirti
<translation id="7205698830395646142">Chromium Menüsünde Gizle</translation>
<translation id="7223968959479464213">Görev Yöneticisi - Chromium</translation>
<translation id="722928257909516027">Chromium menüsünü göster</translation>
-<translation id="731644333568559921">&amp;Chromium OS'u güncelle</translation>
+<translation id="731644333568559921">&amp;Chromium OS'i güncelle</translation>
<translation id="731795002583552498">Chromium güncelleniyor</translation>
<translation id="7318036098707714271">Tercihler dosyanız bozuk veya geçersiz.
diff --git a/chromium/chrome/app/resources/generated_resources_ca.xtb b/chromium/chrome/app/resources/generated_resources_ca.xtb
index 90abe3ec4e0..38ff179df80 100644
--- a/chromium/chrome/app/resources/generated_resources_ca.xtb
+++ b/chromium/chrome/app/resources/generated_resources_ca.xtb
@@ -66,7 +66,7 @@
<translation id="1093457606523402488">Xarxes visibles:</translation>
<translation id="1094607894174825014">S'ha sol·licitat una operació de lectura o escriptura amb un decalatge no vàlid a <ph name="DEVICE_NAME" />.</translation>
<translation id="1097507499312291972"><ph name="BEGIN_SIGN_IN_LINK" />Inicieu la sessió<ph name="END_SIGN_IN_LINK" /> per controlar i consultar els llocs web que aquesta persona visita.</translation>
-<translation id="109758035718544977">Deixa de silenciar els llocs web</translation>
+<translation id="109758035718544977">Activa el so dels llocs web</translation>
<translation id="1097658378307015415">Abans d'iniciar la sessió amb el vostre usuari, entreu com a convidat per activar la xarxa <ph name="NETWORK_ID" /></translation>
<translation id="1103523840287552314">Tradueix sempre el text en <ph name="LANGUAGE" /></translation>
<translation id="1108164192735968833">Connexió d'SMS</translation>
@@ -172,7 +172,7 @@
<translation id="1235458158152011030">Xarxes conegudes</translation>
<translation id="123578888592755962">El disc és ple</translation>
<translation id="1238191093934674082">VPN oberta</translation>
-<translation id="1240892293903523606">Inspector DOM</translation>
+<translation id="1240892293903523606">Inspector de DOM</translation>
<translation id="1241753985463165747">Llegir i modificar totes les teves dades del lloc web que estàs visitant quan s'invoqui</translation>
<translation id="1242633766021457174"><ph name="THIRD_PARTY_TOOL_NAME" /> vol restablir la vostra configuració.</translation>
<translation id="1243314992276662751">Penja</translation>
@@ -196,7 +196,7 @@
<translation id="1285320974508926690">No tradueixis mai aquest lloc</translation>
<translation id="1285484354230578868">Emmagatzema les dades al compte de Google Drive</translation>
<translation id="1288037062697528143">La funció Llum nocturna s'activarà automàticament quan es pongui el sol</translation>
-<translation id="1293177648337752319">Deixa de silenciar el lloc web</translation>
+<translation id="1293177648337752319">Activa el so del lloc web</translation>
<translation id="1293509594570842875">No s'ha pogut crear l'usuari supervisat. Comproveu la connexió a la xarxa i torneu-ho a provar més tard.</translation>
<translation id="1293556467332435079">Fitxers</translation>
<translation id="1295794900245526845">Trieu el compte desat a <ph name="PASSWORD_MANAGER_BRAND" /> per iniciar la sessió</translation>
@@ -264,7 +264,7 @@
<translation id="1390548061267426325">Obre com a pestanya normal</translation>
<translation id="1391807639023934267">S'ha carregat una pàgina més ràpidament.</translation>
<translation id="1393283411312835250">Sol i núvols</translation>
-<translation id="1395262318152388157">Control lliscant de cerca</translation>
+<translation id="1395262318152388157">Control lliscant de reproducció</translation>
<translation id="1395730723686586365">S'ha iniciat l'actualitzador.</translation>
<translation id="1396139853388185343">S'ha produït un error en configurar la impressora</translation>
<translation id="1396963298126346194">El nom d’usuari i la contrasenya que has introduït no coincideixen</translation>
@@ -2577,7 +2577,7 @@ Per obtenir més informació sobre els usuaris supervisats, consulteu el <ph nam
<translation id="4990343175649730969">Baixa l'Eina per netejar Chrome</translation>
<translation id="4991420928586866460">Tracta les tecles de la fila superior com a tecles de funció</translation>
<translation id="499165176004408815">Utilitza el mode d'alt contrast</translation>
-<translation id="4992066212339426712">Deixa de silenciar</translation>
+<translation id="4992066212339426712">Activa el so</translation>
<translation id="4992458225095111526">Confirmació de Powerwash</translation>
<translation id="4994474651455208930">Permet que els llocs sol·licitin convertir-se en gestors predeterminats de protocols</translation>
<translation id="4994754230098574403">S'està configurant</translation>
@@ -2663,7 +2663,7 @@ Per obtenir més informació sobre els usuaris supervisats, consulteu el <ph nam
<translation id="5137501176474113045">Suprimeix aquest element</translation>
<translation id="5139955368427980650">&amp;Obre</translation>
<translation id="5143374789336132547">L'extensió <ph name="EXTENSION_NAME" /> ha canviat la pàgina que es mostra quan feu clic al botó Pàgina d'inici.</translation>
-<translation id="5143712164865402236">Visualitza en pantalla completa</translation>
+<translation id="5143712164865402236">Passa a pantalla completa</translation>
<translation id="5145331109270917438">Data de modificació</translation>
<translation id="514561958218673757">Per activar les notificacions als teus dispositius, segueix aquests passos:</translation>
<translation id="5150254825601720210">Nom del servidor SSL de certificats de Netscape</translation>
@@ -3303,7 +3303,7 @@ Assegureu-vos que no es pugui accedir a informació confidencial.</translation>
<translation id="6122875415561139701">L'operació d'escriptura no es permet a <ph name="DEVICE_NAME" />.</translation>
<translation id="6124650939968185064">D'aquesta extensió en depenen les extensions següents:</translation>
<translation id="6125479973208104919">Cal que tornis a afegir el teu compte en aquest <ph name="DEVICE_TYPE" />.</translation>
-<translation id="612596694132302162">Deixa de silenciar el lloc web</translation>
+<translation id="612596694132302162">Activa el so del lloc web</translation>
<translation id="6129691635767514872">Les dades seleccionades s'han suprimit de Chrome i dels dispositius sincronitzats. És possible que el teu compte de Google tingui altres formes de l'historial de navegació, com ara les cerques i l'activitat d'altres serveis de Google a <ph name="BEGIN_LINK" />myactivity.google.com<ph name="END_LINK" />.</translation>
<translation id="6129938384427316298">Comentari de certificat de Netscape</translation>
<translation id="6129953537138746214">Espai</translation>
@@ -3717,7 +3717,7 @@ Assegureu-vos que no es pugui accedir a informació confidencial.</translation>
<translation id="6771503742377376720">És una entitat emissora de certificats</translation>
<translation id="6773575010135450071">Més accions...</translation>
<translation id="6777817260680419853">S'ha bloquejat la redirecció</translation>
-<translation id="6778959797435875428">Deixa de silenciar els llocs web</translation>
+<translation id="6778959797435875428">Activa el so dels llocs web</translation>
<translation id="677965093459947883">Molt petita</translation>
<translation id="6780439250949340171">gestiona una altra configuració</translation>
<translation id="6782111308708962316">Impedeix que els llocs web de tercers desin i llegeixin les dades de les galetes</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_cs.xtb b/chromium/chrome/app/resources/generated_resources_cs.xtb
index 061655fc241..b1b6b875397 100644
--- a/chromium/chrome/app/resources/generated_resources_cs.xtb
+++ b/chromium/chrome/app/resources/generated_resources_cs.xtb
@@ -2397,7 +2397,7 @@ Pokud nezměníte výchozí nastavení, uživatel <ph name="USER_DISPLAY_NAME" /
<translation id="4722920479021006856"><ph name="APP_NAME" /> sdílí vaši obrazovku.</translation>
<translation id="4724450788351008910">Přidružení změněno</translation>
<translation id="4724850507808590449">Počet zálohovaných fotek: <ph name="FILE_COUNT" /></translation>
-<translation id="4726710629007580002">Při pokusu o instalaci rozšíření se spustila varování:</translation>
+<translation id="4726710629007580002">Při pokusu o instalaci rozšíření se spustila upozornění:</translation>
<translation id="4728558894243024398">Platforma</translation>
<translation id="4731422630970790516">Položka č. 3 v poličce</translation>
<translation id="4732760563705710320">Je nám líto, ale vaše zařízení Cast toto video nepodporuje.</translation>
@@ -4185,7 +4185,7 @@ Pokud nezměníte výchozí nastavení, uživatel <ph name="USER_DISPLAY_NAME" /
<translation id="7543104066686362383">Aktivovat v tomto zařízení <ph name="IDS_SHORT_PRODUCT_NAME" /> funkce ladění</translation>
<translation id="7544853251252956727">Přehrávat náhodně</translation>
<translation id="7545415673537747415">Způsob, jakým Google používá vaši historii procházení k přizpůsobení Vyhledávání, reklam a dalších služeb Google, můžete ovládat pomocí <ph name="BEGIN_LINK" />Ovládacích prvků aktivity Google<ph name="END_LINK" />.</translation>
-<translation id="7547317915858803630">Varování: Vaše nastavení aplikace <ph name="PRODUCT_NAME" /> jsou uložena na síťovém disku. To může vést ke zpomalení, chybám nebo ztrátě dat.</translation>
+<translation id="7547317915858803630">Upozornění: Vaše nastavení aplikace <ph name="PRODUCT_NAME" /> jsou uložena na síťovém disku. To může vést ke zpomalení, chybám nebo ztrátě dat.</translation>
<translation id="7548856833046333824">Limonáda</translation>
<translation id="7550830279652415241">záložky_<ph name="DATESTAMP" />.html</translation>
<translation id="7551059576287086432">Stažení souboru <ph name="FILE_NAME" /> bylo úspěšné</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_da.xtb b/chromium/chrome/app/resources/generated_resources_da.xtb
index 20bc6001e29..a5aaa26da89 100644
--- a/chromium/chrome/app/resources/generated_resources_da.xtb
+++ b/chromium/chrome/app/resources/generated_resources_da.xtb
@@ -924,7 +924,7 @@ Jeg synes ikke, dette website skal blokeres.</translation>
<translation id="2445081178310039857">Udvidelsens rodmappe er påkrævet.</translation>
<translation id="2448312741937722512">Type</translation>
<translation id="2450223707519584812">Du vil ikke kunne tilføje brugere, da der mangler Google API-nøgler. Se <ph name="DETAILS_URL" /> for at få flere oplysninger.</translation>
-<translation id="2450849356604136918">Der er ingen aktive visninger</translation>
+<translation id="2450849356604136918">Ingen aktive visninger</translation>
<translation id="2453021845418314664">Avancerede indstillinger for synkronisering</translation>
<translation id="2453576648990281505">Filen findes allerede</translation>
<translation id="2453860139492968684">Udfør</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_de.xtb b/chromium/chrome/app/resources/generated_resources_de.xtb
index 6d2552ae02e..51891098cbb 100644
--- a/chromium/chrome/app/resources/generated_resources_de.xtb
+++ b/chromium/chrome/app/resources/generated_resources_de.xtb
@@ -3722,7 +3722,7 @@ Möchten Sie <ph name="CONTROL_PANEL_APPLET_NAME" /> starten?</translation>
<translation id="6787839852456839824">Tastenkombinationen</translation>
<translation id="6788210894632713004">Entpackte Erweiterung</translation>
<translation id="6790428901817661496">Wiedergabe</translation>
-<translation id="6790497603648687708"><ph name="EXTENSION_NAME" /> wurde per Remote-Zugriff hinzugefügt</translation>
+<translation id="6790497603648687708"><ph name="EXTENSION_NAME" /> wurde per Remotezugriff hinzugefügt</translation>
<translation id="6790820461102226165">Person hinzufügen...</translation>
<translation id="6792072150955115067"><ph name="APP_NAME" /> möchte die Inhalte Ihres Bildschirms mit <ph name="TARGET_NAME" /> teilen. Wählen Sie aus, was geteilt werden soll.</translation>
<translation id="6793604637258913070">Textcursor hervorheben, wenn er erscheint oder sich bewegt</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_en-GB.xtb b/chromium/chrome/app/resources/generated_resources_en-GB.xtb
index 2d2bbe49a59..a1ef7a1952d 100644
--- a/chromium/chrome/app/resources/generated_resources_en-GB.xtb
+++ b/chromium/chrome/app/resources/generated_resources_en-GB.xtb
@@ -1734,7 +1734,7 @@ For more information, visit our <ph name="BEGIN_LINK" />Help Centre<ph name="END
<translation id="3603533104205588786">You can click the star to bookmark a page</translation>
<translation id="3603622770190368340">Obtain network certificate</translation>
<translation id="3604048165392640554">No mobile connection found. Turn on Instant Tethering on your other devices and try again. &lt;a target="_blank" href="<ph name="URL" />"&gt;Learn more&lt;/a&gt;</translation>
-<translation id="3605780360466892872">Smartboy</translation>
+<translation id="3605780360466892872">Businessman</translation>
<translation id="3608454375274108141">F10</translation>
<translation id="3608576286259426129">User image preview</translation>
<translation id="3609785682760573515">Syncing...</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_es.xtb b/chromium/chrome/app/resources/generated_resources_es.xtb
index 02a9ef4bee1..2f108651316 100644
--- a/chromium/chrome/app/resources/generated_resources_es.xtb
+++ b/chromium/chrome/app/resources/generated_resources_es.xtb
@@ -2018,7 +2018,7 @@ Si no cambias la configuración predeterminada, <ph name="USER_DISPLAY_NAME" />
<translation id="4031179711345676612">Micrófono permitido</translation>
<translation id="4031910098617850788">F5</translation>
<translation id="4033471457476425443">Añadir nueva carpeta</translation>
-<translation id="4034042927394659004">Disminuir brillo de teclado</translation>
+<translation id="4034042927394659004">Reducir brillo de teclado</translation>
<translation id="4035758313003622889">Adminis&amp;trador de tareas</translation>
<translation id="4037084878352560732">Caballo</translation>
<translation id="4037889604535939429">Cambiar persona</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_et.xtb b/chromium/chrome/app/resources/generated_resources_et.xtb
index b659ebd3ab6..3207a58a380 100644
--- a/chromium/chrome/app/resources/generated_resources_et.xtb
+++ b/chromium/chrome/app/resources/generated_resources_et.xtb
@@ -191,7 +191,7 @@
<translation id="1274997165432133392">Küpsised ja muud saidi andmed</translation>
<translation id="127668050356036882">Sule kõik aknad</translation>
<translation id="1277908057200820621">Kuva seadmete loend</translation>
-<translation id="1278049586634282054">Uurige vaatamisi:</translation>
+<translation id="1278049586634282054">Kuvade inspekteerimine:</translation>
<translation id="1280820357415527819">Mobiilsidevõrkude otsimine</translation>
<translation id="1285320974508926690">Ära kunagi seda saiti tõlgi</translation>
<translation id="1285484354230578868">Salvestage andmed oma Google Drive'i kontole</translation>
@@ -927,7 +927,7 @@ Ma arvan, et see sait ei tohiks olla blokeeritud.</translation>
<translation id="2445081178310039857">Laienduse juurkaust on nõutav.</translation>
<translation id="2448312741937722512">Tüüp</translation>
<translation id="2450223707519584812">Te ei saa kasutajaid lisada, kuna Google API võtmed puuduvad. Üksikasju vt <ph name="DETAILS_URL" />.</translation>
-<translation id="2450849356604136918">Aktiivseid kuvamisi ei ole</translation>
+<translation id="2450849356604136918">Aktiivsed kuvad puuduvad</translation>
<translation id="2453021845418314664">Täpsemad sünkroonimisseaded</translation>
<translation id="2453576648990281505">Fail on juba olemas</translation>
<translation id="2453860139492968684">Valmis</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_fil.xtb b/chromium/chrome/app/resources/generated_resources_fil.xtb
index 722ae91ae71..837630245f8 100644
--- a/chromium/chrome/app/resources/generated_resources_fil.xtb
+++ b/chromium/chrome/app/resources/generated_resources_fil.xtb
@@ -297,7 +297,7 @@
<translation id="1434696352799406980">Ire-reset nito ang iyong page sa pagsisimula, page ng bagong tab, search engine at mga naka-pin na tab. Idi-disable din nito ang lahat ng extension at iki-clear ang pansamantalang data tulad ng cookies. Hindi iki-clear ang iyong mga bookmark, history at naka-save na password.</translation>
<translation id="1434886155212424586">Ang homepage ay ang pahina ng Bagong Tab</translation>
<translation id="1436784010935106834">Inalis</translation>
-<translation id="1438632560381091872">Mag-alis ng mga tab sa pagkaka-mute</translation>
+<translation id="1438632560381091872">Mag-unmute ng mga tab</translation>
<translation id="1442392616396121389">Routing prefix</translation>
<translation id="144283815522798837"><ph name="NUMBER_OF_ITEMS_SELECTED" /> ang napili</translation>
<translation id="1444628761356461360">Ang setting na ito ay pinamamahalaan ng may-ari ng device, <ph name="OWNER_EMAIL" />.</translation>
@@ -1366,7 +1366,7 @@ Para sa higit pang impormasyon, bisitahin ang aming <ph name="BEGIN_LINK" />Help
<translation id="3039828483675273919">Naglilipat ng $1 (na) item...</translation>
<translation id="304567287000691532">Ibinabahagi ang screen</translation>
<translation id="3046910703532196514">Webpage, Kumpleto</translation>
-<translation id="304826556400666995">Mag-alis ng Mga Tab sa Pagkaka-mute</translation>
+<translation id="304826556400666995">Mag-unmute ng Mga Tab</translation>
<translation id="3051523411789012618">Itaas ang window</translation>
<translation id="3053013834507634016">Paggamit ng Certificate Key </translation>
<translation id="3057861065630527966">I-back up ang iyong mga larawan at video</translation>
@@ -2345,7 +2345,7 @@ Para sa higit pang impormasyon, bisitahin ang aming <ph name="BEGIN_LINK" />Help
<translation id="4628948037717959914">Larawan</translation>
<translation id="4630590996962964935">Di-wastong character: $1</translation>
<translation id="4631887759990505102">Artist</translation>
-<translation id="4632483769545853758">Alisin sa Pagkaka-mute ang Tab</translation>
+<translation id="4632483769545853758">I-unmute ang Tab</translation>
<translation id="4634771451598206121">Muling mag-sign in...</translation>
<translation id="4636315944522859212">Nakita ang printer</translation>
<translation id="4640525840053037973">Mag-sign in gamit ang iyong Google Account</translation>
@@ -5208,7 +5208,7 @@ Ilagay ang iyong key file sa ligtas na lugar. Kailangan mo ito upang lumikha ng
<translation id="920045321358709304">Maghanap sa <ph name="SEARCH_ENGINE" /></translation>
<translation id="9201220332032049474">Mga opsyon sa lock ng screen</translation>
<translation id="9203398526606335860">&amp;Pinagana ang pag-profile</translation>
-<translation id="9203478404496196495">Alisin sa pagkaka-mute ang tab</translation>
+<translation id="9203478404496196495">I-unmute ang tab</translation>
<translation id="9203962528777363226">Hindi pinagana ng administrator ng device na ito ang pagdaragdag ng mga bagong user</translation>
<translation id="9214520840402538427">Oops! Nag-time out ang pagpapasimula sa mga katangian ng pag-install at panahon. Mangyaring makipag-ugnay sa iyong kinatawan ng suporta.</translation>
<translation id="9214695392875603905">Cupcake</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_fr.xtb b/chromium/chrome/app/resources/generated_resources_fr.xtb
index 7d5a16af0c0..6bb837f49db 100644
--- a/chromium/chrome/app/resources/generated_resources_fr.xtb
+++ b/chromium/chrome/app/resources/generated_resources_fr.xtb
@@ -1274,7 +1274,7 @@ Je ne pense pas que ce site devrait être bloqué.</translation>
<translation id="2911898792135283060">Créer un mot de passe…</translation>
<translation id="2912905526406334195"><ph name="HOST" /> veut utiliser votre micro.</translation>
<translation id="2913331724188855103">Autoriser les sites à enregistrer et à lire les données des cookies (recommandé)</translation>
-<translation id="2916073183900451334">Sur le Web, Tab permet de sélectionner les liens, ainsi que les champs de formulaire.</translation>
+<translation id="2916073183900451334">La touche TAB permet de sélectionner des liens et d'accéder à des champs de formulaire sur une page Web.</translation>
<translation id="2916745397441987255">Rechercher dans les extensions</translation>
<translation id="291886813706048071">Vous pouvez effectuer des recherches à partir d'ici à l'aide de <ph name="SEARCH_ENGINE" /></translation>
<translation id="2921081876747860777">Veuillez créer un mot de passe pour protéger vos données locales</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_gu.xtb b/chromium/chrome/app/resources/generated_resources_gu.xtb
index eb765d72459..a69f65c62ed 100644
--- a/chromium/chrome/app/resources/generated_resources_gu.xtb
+++ b/chromium/chrome/app/resources/generated_resources_gu.xtb
@@ -923,7 +923,7 @@
<translation id="2445081178310039857">એક્સ્ટેંશન રૂટ ડાયરેક્ટરી આવશ્યક છે.</translation>
<translation id="2448312741937722512">પ્રકાર</translation>
<translation id="2450223707519584812">તમે વપરાશકર્તાઓને ઉમેરવામાં સમર્થ થશો નહીં કારણ કે Google API કીઝ ખૂટે છે. વિગતો માટે <ph name="DETAILS_URL" /> જુઓ.</translation>
-<translation id="2450849356604136918">કોઈ સક્રિય દૃશ્ય નથી</translation>
+<translation id="2450849356604136918">કોઈ દૃશ્ય નથી</translation>
<translation id="2453021845418314664">વિગતવાર સમન્વયન સેટિંગ્સ</translation>
<translation id="2453576648990281505">ફાઇલ પહેલાથી જ અસ્તિત્વમાં છે</translation>
<translation id="2453860139492968684">સમાપ્ત</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_hr.xtb b/chromium/chrome/app/resources/generated_resources_hr.xtb
index cfb201e6aaa..572641cc08c 100644
--- a/chromium/chrome/app/resources/generated_resources_hr.xtb
+++ b/chromium/chrome/app/resources/generated_resources_hr.xtb
@@ -927,7 +927,7 @@ Mislim da ta web-lokacija ne bi trebala biti blokirana!</translation>
<translation id="2445081178310039857">Obavezan je korijenski direktorij proširenja.</translation>
<translation id="2448312741937722512">Vrsta</translation>
<translation id="2450223707519584812">Nećete moći dodati korisnike zato što nedostaju ključevi Google API-ja. Pojedinosti možete saznati na web-lokaciji <ph name="DETAILS_URL" />.</translation>
-<translation id="2450849356604136918">Nema aktivnih prikaza</translation>
+<translation id="2450849356604136918">nema aktivnih prikaza</translation>
<translation id="2453021845418314664">Napredne postavke sinkronizacije</translation>
<translation id="2453576648990281505">Datoteka već postoji</translation>
<translation id="2453860139492968684">Završi</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_it.xtb b/chromium/chrome/app/resources/generated_resources_it.xtb
index dc1d923ee85..79295ca82e7 100644
--- a/chromium/chrome/app/resources/generated_resources_it.xtb
+++ b/chromium/chrome/app/resources/generated_resources_it.xtb
@@ -927,7 +927,7 @@ Non credo che questo sito debba essere bloccato.</translation>
<translation id="2445081178310039857">La directory principale dell'estensione è obbligatoria.</translation>
<translation id="2448312741937722512">Tipo</translation>
<translation id="2450223707519584812">Non potrai aggiungere utenti perché mancano le chiavi dell'API di Google. Per informazioni dettagliate, visita la pagina <ph name="DETAILS_URL" />.</translation>
-<translation id="2450849356604136918">Nessuna vista attiva</translation>
+<translation id="2450849356604136918">Nessuna visualizzazione attiva</translation>
<translation id="2453021845418314664">Impostazioni di sincronizzazione avanzate</translation>
<translation id="2453576648990281505">File già esistente</translation>
<translation id="2453860139492968684">Termina</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_iw.xtb b/chromium/chrome/app/resources/generated_resources_iw.xtb
index 9e796869587..7a016822b4f 100644
--- a/chromium/chrome/app/resources/generated_resources_iw.xtb
+++ b/chromium/chrome/app/resources/generated_resources_iw.xtb
@@ -800,7 +800,7 @@
<translation id="222949136907494149"><ph name="URL" /> רוצה להשתמש במיקום המחשב שלך.</translation>
<translation id="2230051135190148440">CHAP</translation>
<translation id="2230062665678605299">לא ניתן ליצור את התיקיה "<ph name="FOLDER_NAME" />". <ph name="ERROR_MESSAGE" /></translation>
-<translation id="223106756035922488">לחיצה תציג את הדודל היומי</translation>
+<translation id="223106756035922488">לצפייה בדודל היומי</translation>
<translation id="2231238007119540260">אם אתה מוחק אישור שרת, אתה משחזר את בדיקות האבטחה הרגילות לשרת זה ודורש שהוא ישתמש באישור חוקי.</translation>
<translation id="2232876851878324699">הקובץ הכיל אישור אחד, שלא יובא:</translation>
<translation id="2233502537820838181">&amp;מידע נוסף</translation>
@@ -1026,7 +1026,7 @@
והנתונים של המשתמש בפיקוח לא יעברו איתו למכשירים אחרים באמצעות סנכרון Chrome. הגדרת משתמש בפיקוח חלה על מכשיר זה בלבד.</translation>
<translation id="258932246702879617">בחר באפשרות <ph name="BEGIN_BOLD" />הצמד לשורת המשימות<ph name="END_BOLD" /></translation>
<translation id="259421303766146093">בטל הגדלה</translation>
-<translation id="2594999711683503743">‏חפש ב-Google או הקלד כתובת אתר</translation>
+<translation id="2594999711683503743">זה המקום לחפש את מה שמעניין אותך או להקליד כתובת של אתר ספציפי</translation>
<translation id="2597852038534460976">‏Chrome לא יכול לגשת לטפטים. התחבר לרשת.</translation>
<translation id="2600115369439982409">קבצים ותוכנות:</translation>
<translation id="2603115962224169880">ניקוי המחשב</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_kn.xtb b/chromium/chrome/app/resources/generated_resources_kn.xtb
index 413752bc47e..1e08e25856d 100644
--- a/chromium/chrome/app/resources/generated_resources_kn.xtb
+++ b/chromium/chrome/app/resources/generated_resources_kn.xtb
@@ -924,7 +924,7 @@
<translation id="2445081178310039857">ವಿಸ್ತರಣೆ ಮೂಲ ಡೈರೆಕ್ಟರಿ ಅಗತ್ಯವಿದೆ.</translation>
<translation id="2448312741937722512">ಪ್ರಕಾರ</translation>
<translation id="2450223707519584812">Google API ಕೀಗಳು ಕಾಣೆಯಾಗಿರುವ ಕಾರಣ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಲು ನಿಮಗೆ ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ. ವಿವರಗಳಿಗೆ <ph name="DETAILS_URL" /> ನೋಡಿ.</translation>
-<translation id="2450849356604136918">ಯಾವುದೇ ಸಕ್ರಿಯ ವೀಕ್ಷಣೆಗಳಿಲ್ಲ</translation>
+<translation id="2450849356604136918">ಸಕ್ರಿಯ ವೀಕ್ಷಣೆಗಳಿಲ್ಲ</translation>
<translation id="2453021845418314664">ಸುಧಾರಿತ ಸಿಂಕ್ ಸೆಟ್ಟಿಂಗ್‌ಗಳು</translation>
<translation id="2453576648990281505">ಈಗಾಗಲೇ ಫೈಲ್ ಅಸ್ತಿತ್ವದಲ್ಲಿದೆ</translation>
<translation id="2453860139492968684">ಪೂರ್ಣಗೊಳಿಸು</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_ko.xtb b/chromium/chrome/app/resources/generated_resources_ko.xtb
index 9d0fabaabee..1ae4a339fe4 100644
--- a/chromium/chrome/app/resources/generated_resources_ko.xtb
+++ b/chromium/chrome/app/resources/generated_resources_ko.xtb
@@ -191,7 +191,7 @@
<translation id="1274997165432133392">쿠키 및 기타 사이트 데이터</translation>
<translation id="127668050356036882">모든 창 닫기</translation>
<translation id="1277908057200820621">기기 목록 보기</translation>
-<translation id="1278049586634282054">조회 내용 검사:</translation>
+<translation id="1278049586634282054">뷰 검사:</translation>
<translation id="1280820357415527819">모바일 네트워크 검색 중</translation>
<translation id="1285320974508926690">이 사이트 번역 안함</translation>
<translation id="1285484354230578868">Google 드라이브 계정에 데이터 저장</translation>
@@ -928,7 +928,7 @@
<translation id="2445081178310039857">확장 프로그램 루트 디렉토리가 필요합니다.</translation>
<translation id="2448312741937722512">유형</translation>
<translation id="2450223707519584812">Google API 키가 누락되었으므로 사용자를 추가할 수 없습니다. 자세한 내용은 <ph name="DETAILS_URL" /> 페이지를 참조하세요.</translation>
-<translation id="2450849356604136918">활성화된 보기 없음</translation>
+<translation id="2450849356604136918">활성화된 뷰 없음</translation>
<translation id="2453021845418314664">고급 동기화 설정</translation>
<translation id="2453576648990281505">이미 존재하는 파일입니다.</translation>
<translation id="2453860139492968684">완료</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_lt.xtb b/chromium/chrome/app/resources/generated_resources_lt.xtb
index eae0fc7036e..46f84a7f32e 100644
--- a/chromium/chrome/app/resources/generated_resources_lt.xtb
+++ b/chromium/chrome/app/resources/generated_resources_lt.xtb
@@ -927,7 +927,7 @@ Nemanau, kad ši svetainė turėtų būti užblokuota!</translation>
<translation id="2445081178310039857">Reikalingas plėtinio šakninis katalogas.</translation>
<translation id="2448312741937722512">Tipas</translation>
<translation id="2450223707519584812">Negalėsite pridėti naudotojų, nes trūksta „Google“ API raktų. Jei reikia išsamios informacijos, žr. <ph name="DETAILS_URL" />.</translation>
-<translation id="2450849356604136918">Aktyvių rodinių nėra</translation>
+<translation id="2450849356604136918">aktyvių rodinių nėra</translation>
<translation id="2453021845418314664">Išplėstiniai sinchronizavimo nustatymai</translation>
<translation id="2453576648990281505">Failas jau yra</translation>
<translation id="2453860139492968684">Užbaigti</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_ml.xtb b/chromium/chrome/app/resources/generated_resources_ml.xtb
index 1b7bca09ce8..b7e6762cedf 100644
--- a/chromium/chrome/app/resources/generated_resources_ml.xtb
+++ b/chromium/chrome/app/resources/generated_resources_ml.xtb
@@ -52,7 +52,7 @@
<ph name="EXTENSION_NAME" /></translation>
<translation id="1071917609930274619">ഡാറ്റ എന്‍‌സിഫെര്‍‌മെന്‍റ്</translation>
-<translation id="1074944608454986967">ഉള്ളടക്കം ഉറക്കെ വായിക്കാൻ, തിരയൽ അമർത്തിപ്പിടിക്കുക, എന്നിട്ട് ഉള്ളടക്കം തിരഞ്ഞെടുക്കാന്‍ ക്ലിക്ക് ചെയ്യുകയോ വലിച്ചിടുകയോ ചെയ്യുക. അല്ലെങ്കിൽ ഒരു മേഖല തിരഞ്ഞെടുക്കുക, 'തിരയുക + S' ഉപയോഗിക്കുക.</translation>
+<translation id="1074944608454986967">ഉള്ളടക്കം ഉറക്കെ വായിക്കാൻ, തിരയൽ അമർത്തിപ്പിടിക്കുക, എന്നിട്ട് ഉള്ളടക്കം തിരഞ്ഞെടുക്കാൻ ക്ലിക്ക് ചെയ്യുകയോ വലിച്ചിടുകയോ ചെയ്യുക. അല്ലെങ്കിൽ ഒരു മേഖല തിരഞ്ഞെടുക്കുക, 'തിരയുക + S' ഉപയോഗിക്കുക.</translation>
<translation id="1076698951459398590">തീം പ്രവർത്തനക്ഷമമാക്കുക</translation>
<translation id="1076818208934827215">Microsoft Internet Explorer</translation>
<translation id="1077946062898560804">എല്ലാ ഉപയോക്താക്കള്‍ക്കും ഓട്ടോമാറ്റിക്ക് അപ്ഡേറ്റുകള്‍ ക്രമീകരിക്കുക</translation>
@@ -818,7 +818,7 @@
<translation id="2255317897038918278">Microsoft Time Stamping</translation>
<translation id="225614027745146050">സ്വാഗതം</translation>
<translation id="225692081236532131">സജീവമാക്കല്‍ സ്റ്റാറ്റസ്</translation>
-<translation id="2261323523305321874">ചില പഴയ പ്രൊഫൈലുകളെ പ്രവർത്തനരഹിതമാക്കുന്ന തരത്തില്‍ അഡ്‌മിനിസ്ട്രേറ്റർ നിങ്ങളുടെ സിസ്റ്റത്തിലാകമാനം മാറ്റം വരുത്തിയിരിക്കുന്നു.</translation>
+<translation id="2261323523305321874">ചില പഴയ പ്രൊഫൈലുകളെ പ്രവർത്തനരഹിതമാക്കുന്ന തരത്തിൽ അഡ്‌മിനിസ്ട്രേറ്റർ നിങ്ങളുടെ സിസ്റ്റത്തിലാകമാനം മാറ്റം വരുത്തിയിരിക്കുന്നു.</translation>
<translation id="2262477216570151239">ആവർത്തിക്കുന്നതിന് മുമ്പുള്ള സമയം</translation>
<translation id="2263189956353037928">സൈൻ ഔട്ട് ചെ‌യ്‌ത് വീണ്ടും സൈൻ ഇൻ ചെയ്യുക</translation>
<translation id="2263497240924215535">(അപ്രാപ്‌തമാക്കി)</translation>
@@ -925,7 +925,7 @@
<translation id="2445081178310039857">വിപുലീകരണ റൂട്ട് ഡയറക്‌ടറി ആവശ്യമാണ്.</translation>
<translation id="2448312741937722512">തരം</translation>
<translation id="2450223707519584812">Google API കീകൾ നഷ്‌ടമായതിനാൽ നിങ്ങൾക്ക് ഉപയോക്താക്കളെ ചേർക്കാനാവില്ല. വിശദാംശങ്ങൾക്ക്, <ph name="DETAILS_URL" /> കാണുക.</translation>
-<translation id="2450849356604136918">സജീവ കാഴ്ചകൾ ഒന്നുമില്ല</translation>
+<translation id="2450849356604136918">വിവരങ്ങളുടെ പ്രദർശമൊന്നും ഇപ്പോൾ സജീവമല്ല</translation>
<translation id="2453021845418314664">വിപുലമായ സമന്വയ ക്രമീകരണം</translation>
<translation id="2453576648990281505">ഫയൽ ഇതിനകം നിലനിൽക്കുന്നു</translation>
<translation id="2453860139492968684">പൂര്‍ത്തിയാക്കുക</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_mr.xtb b/chromium/chrome/app/resources/generated_resources_mr.xtb
index 07b592396ec..d10fcf049fe 100644
--- a/chromium/chrome/app/resources/generated_resources_mr.xtb
+++ b/chromium/chrome/app/resources/generated_resources_mr.xtb
@@ -27,7 +27,7 @@
<translation id="1036982837258183574">संपूर्ण स्क्रीनमधून बाहेर पडण्यासाठी |<ph name="ACCELERATOR" />| दाबा</translation>
<translation id="1038168778161626396">केवळ एनसिफर</translation>
<translation id="1039337018183941703">अवैध किंवा दूषित फाइल</translation>
-<translation id="1042174272890264476">आपला संगणक देखील <ph name="SHORT_PRODUCT_NAME" />च्या RLZ वाचनालयासह अंगभूत आला आहे. एका विशिष्ट जाहिरात मोहीमेद्वारे चालविलेला शोध आणि <ph name="SHORT_PRODUCT_NAME" /> वापर मोजण्यासाठी RLZ एक अद्वितीय-नसलेला, वैयक्तिकरित्या-ओळखता न येणारा टॅग नियुक्त करते. <ph name="PRODUCT_NAME" /> मधील Google शोध क्वेरींमध्ये ही लेबल काहीवेळा दिसतात.</translation>
+<translation id="1042174272890264476">आपला कॉंप्युटर देखील <ph name="SHORT_PRODUCT_NAME" />च्या RLZ वाचनालयासह अंगभूत आला आहे. एका विशिष्ट जाहिरात मोहीमेद्वारे चालविलेला शोध आणि <ph name="SHORT_PRODUCT_NAME" /> वापर मोजण्यासाठी RLZ एक अद्वितीय-नसलेला, वैयक्तिकरित्या-ओळखता न येणारा टॅग नियुक्त करते. <ph name="PRODUCT_NAME" /> मधील Google शोध क्वेरींमध्ये ही लेबल काहीवेळा दिसतात.</translation>
<translation id="1042574203789536285"><ph name="URL" /> आपल्या डिव्हाइसवर मोठ्या प्रमाणावर डेटा कायमचा संचयित करू इच्छित आहे.</translation>
<translation id="1046059554679513793">अरेरे, हे नाव आधीच वापरात आहे!</translation>
<translation id="1047431265488717055">दुवा मजकूर कॉपी करा</translation>
@@ -814,7 +814,7 @@
<translation id="2249605167705922988">उदा. 1-5, 8, 11-13</translation>
<translation id="2251218783371366160">सिस्टम दर्शकासह उघडा</translation>
<translation id="225163402930830576">नेटवर्क रिफ्रेश करा</translation>
-<translation id="225240747099314620">संरक्षित सामग्रीसाठी अभिज्ञापकांना अनुमती द्या (संगणक रीस्टार्ट करणे आवश्यक असू शकते)</translation>
+<translation id="225240747099314620">संरक्षित सामग्रीसाठी अभिज्ञापकांना अनुमती द्या (कॉंप्युटर रीस्टार्ट करणे आवश्यक असू शकते)</translation>
<translation id="2254681226363050822">सहमत आहे</translation>
<translation id="2255317897038918278">Microsoft Time Stamping</translation>
<translation id="225614027745146050">सुस्वागतम</translation>
@@ -926,7 +926,7 @@
<translation id="2445081178310039857">विस्तार मूळ निर्देशिका आवश्यक आहे.</translation>
<translation id="2448312741937722512">प्रकार</translation>
<translation id="2450223707519584812">Google API की गहाळ असल्याने आपण वापरकर्ते जोडण्‍यात सक्षम असणार नाही. तपशीलांसाठी <ph name="DETAILS_URL" /> पहा.</translation>
-<translation id="2450849356604136918">कोणतेही व्ह्यू सक्रिय नाहीत</translation>
+<translation id="2450849356604136918">कोणतेही सक्रिय व्ह्यू नाहीत</translation>
<translation id="2453021845418314664">प्रगत समक्रमण सेटिंग्ज</translation>
<translation id="2453576648990281505">फाइल याआधीच विद्यमान आहे</translation>
<translation id="2453860139492968684">समाप्त</translation>
@@ -1025,7 +1025,7 @@
<translation id="2586657967955657006">क्लिपबोर्ड</translation>
<translation id="2586672484245266891">कृपया एक लहान URL टाका</translation>
<translation id="2587922270115112871">पर्यवेक्षी वापरकर्ता तयार करण्याने Google खाते तयार होत नाही आणि त्यांच्या सेटिंग्ज आणि डेटा
- Chrome Sync सह इतर डिव्हाइसवर त्यांचे अनुसरण करणार नाही. पर्यवेक्षी वापरकर्ता केवळ या डिव्हाइसवर लागू होतो.</translation>
+ Chrome Sync सह इतर डिव्हाइसवर त्यांचे फॉलो करणार नाही. पर्यवेक्षी वापरकर्ता केवळ या डिव्हाइसवर लागू होतो.</translation>
<translation id="258932246702879617"><ph name="BEGIN_BOLD" />टास्कबारवर पिन करा<ph name="END_BOLD" /> निवडा</translation>
<translation id="259421303766146093">विशालित करू नका</translation>
<translation id="2594999711683503743">Google वर शोधा किंवा URL टाइप करा</translation>
@@ -1350,7 +1350,7 @@
• विशिष्ट वेबसाइटना अनुमती देणे किंवा प्रतिबंधित करणे
• पर्यवेक्षी वापरकर्त्याने भेट दिलेल्या वेबसाइटचे पुनरावलोकन करणे आणि
• अन्य सेटिंग्ज व्यवस्थापित करणे.
-पर्यवेक्षी वापरकर्ता तयार केल्यामुळे Google खाते तयार होत नाही आणि त्यांचे बुकमार्क, ब्राउझिंग इतिहास आणि अन्य प्राधान्ये Chrome संकालन असलेल्या इतर डिव्हाइसेसवर त्यांचे अनुसरण करणार नाही. आपण एक नवीन पर्यवेक्षी वापरकर्ता तयार केल्यानंतर, आपण त्यांच्या सेटिंग्ज कधीही, कोणत्याही डिव्हाइस वरून, <ph name="BEGIN_MANAGE_LINK" /><ph name="DISPLAY_LINK" /><ph name="END_MANAGE_LINK" /> येथे व्यवस्थापित करू शकता. अधिक माहितीसाठी, आमच्या <ph name="BEGIN_LINK" /> मदत केंद्रास<ph name="END_LINK" /> भेट द्या.</translation>
+पर्यवेक्षी वापरकर्ता तयार केल्यामुळे Google खाते तयार होत नाही आणि त्यांचे बुकमार्क, ब्राउझिंग इतिहास आणि अन्य प्राधान्ये Chrome संकालन असलेल्या इतर डिव्हाइसेसवर त्यांचे फॉलो करणार नाही. आपण एक नवीन पर्यवेक्षी वापरकर्ता तयार केल्यानंतर, आपण त्यांच्या सेटिंग्ज कधीही, कोणत्याही डिव्हाइस वरून, <ph name="BEGIN_MANAGE_LINK" /><ph name="DISPLAY_LINK" /><ph name="END_MANAGE_LINK" /> येथे व्यवस्थापित करू शकता. अधिक माहितीसाठी, आमच्या <ph name="BEGIN_LINK" /> मदत केंद्रास<ph name="END_LINK" /> भेट द्या.</translation>
<translation id="3031417829280473749">एजंट X</translation>
<translation id="3031557471081358569">आयात करण्यासाठी आयटम निवडा:</translation>
<translation id="3031601332414921114">प्रिंट पुन्हा सुरू करा</translation>
@@ -1879,7 +1879,7 @@
<translation id="3813296892522778813">आपण जे शोधत आहात ते आपल्याला सापडले नसेल तर <ph name="BEGIN_LINK_CHROMIUM" />Google Chrome मदत<ph name="END_LINK_CHROMIUM" /> वर जा</translation>
<translation id="3819007103695653773">सर्व साइटना पार्श्वभूमी पुश संदेश पाठविण्यासाठी अनुमती द्या</translation>
<translation id="3819497457291599334">सेटिंग्‍ज &gt; अॅप्‍स आणि सूचना &gt; सर्व अॅप्‍स &gt; Google Play सेवा वर जा.</translation>
-<translation id="3819752733757735746">प्रवेश स्विच करा (केवळ एक किंवा दोन स्विचसह संगणक नियंत्रित करा)</translation>
+<translation id="3819752733757735746">प्रवेश स्विच करा (केवळ एक किंवा दोन स्विचसह कॉंप्युटर नियंत्रित करा)</translation>
<translation id="3819800052061700452">&amp;पूर्ण स्क्रीन</translation>
<translation id="3820172043799983114">अवैध पिन.</translation>
<translation id="3820749202859700794">SECG एल्लिपटिक कर्व्ह secp521r1 (aka NIST P-521)</translation>
@@ -2351,7 +2351,7 @@
<translation id="4648491805942548247">अपुर्‍या परवानग्या</translation>
<translation id="4648499713050786492">कृपया एखाद्या व्यक्तीस जोडण्यापूर्वी आपले प्रोफाईल अनलॉक करा.</translation>
<translation id="465499440663162826">Chrome वेब स्टोअरशी कनेक्ट करणे शक्य झाले नाही.</translation>
-<translation id="4656293982926141856">हा संगणक</translation>
+<translation id="4656293982926141856">हा कॉंप्युटर</translation>
<translation id="4658312088164718891">Smart Lock चालू करण्यासाठी तुमचा पासवर्ड टाका. पुढच्या वेळेस तुमचा फोन तुमचे <ph name="DEVICE_TYPE" /> अनलॉक करेल. सेटिंग्जमधून Smart Lock बंद करा.</translation>
<translation id="4662788913887017617">हा बुकमार्क आपल्या iPhone सह शेअर करा</translation>
<translation id="4663373278480897665">कॅमेऱ्याला अनुमती आहे</translation>
@@ -2463,7 +2463,7 @@
<translation id="4840150926623932060">{NUM_DOWNLOAD,plural, =1{आणखी 1}one{आणखी #}other{आणखी #}}</translation>
<translation id="4842976633412754305">हे पृष्ठ अप्रमाणिकृत स्त्रोतांवरून स्क्रिप्ट लोड करण्याचा प्रयत्न करत आहे.</translation>
<translation id="4844333629810439236">अन्य कीबोर्ड</translation>
-<translation id="4846680374085650406">आपण या सेटिंगसाठी प्रशासकाच्या शिफारसीचे अनुसरण करत आहात.</translation>
+<translation id="4846680374085650406">आपण या सेटिंगसाठी प्रशासकाच्या शिफारसीचे फॉलो करत आहात.</translation>
<translation id="4848518990323155912">सिम कार्ड लॉक सक्षम करा (मोबाईल डेटा वापरण्यासाठी पिन आवश्यक आहे)</translation>
<translation id="484921817528146567">अंतिम शेल्फ आयटम</translation>
<translation id="4849286518551984791">समन्वित वैश्विक वेळ (UTC/GMT)</translation>
@@ -2977,7 +2977,7 @@
<translation id="5608580678041221894">क्रॉप करण्‍याचे क्षेत्र समायोजित करण्‍यासाठी किंवा हलविण्‍यासाठी खालील की टॅप करा</translation>
<translation id="5609231933459083978">अॅप्लिकेशन अवैध असल्याचे दिसते.</translation>
<translation id="5610038042047936818">कॅमेरा मोडवर स्विच करा</translation>
-<translation id="5612734644261457353">क्षमस्व, आपला पासवर्ड अद्याप सत्यापित होऊ शकला नाही. टिप: आपण अलीकडेच आपला पासवर्ड बदलला असल्यास, एकदा आपण साइन आउट केल्यानंतर आपला नवीन पासवर्ड लागू केला जाईल, कृपया येथे जुना पासवर्ड वापरा.</translation>
+<translation id="5612734644261457353">क्षमस्व, आपला पासवर्ड अद्याप सत्यापित होऊ शकला नाही. टीप: आपण अलीकडेच आपला पासवर्ड बदलला असल्यास, एकदा आपण साइन आउट केल्यानंतर आपला नवीन पासवर्ड लागू केला जाईल, कृपया येथे जुना पासवर्ड वापरा.</translation>
<translation id="5613695965848159202">अनामित ओळख:</translation>
<translation id="5614190747811328134">वापरकर्ता सूचना</translation>
<translation id="561698261642843490">Firefox बंद करा</translation>
@@ -3261,7 +3261,7 @@
<translation id="6060435378291459521"><ph name="PLUGIN_NAME" /> क्रॅश झाला आहे.</translation>
<translation id="6064217302520318294">स्क्रीन लॉक</translation>
<translation id="6065289257230303064">प्रमाणपत्र विषय निर्देशिका विशेषता</translation>
-<translation id="6068338049763724728">रीमोट नोंदणी चालू करा</translation>
+<translation id="6068338049763724728">रिमोट नोंदणी चालू करा</translation>
<translation id="6071181508177083058">संकेतशब्दाची पुष्टी करा</translation>
<translation id="6073903501322152803">प्रवेशयोग्यता वैशिष्ट्ये जोडा</translation>
<translation id="6074825444536523002">Google फॉर्म</translation>
@@ -3444,7 +3444,7 @@
<translation id="6354918092619878358">SECG एल्लिपटिक कर्व्ह secp256r1 (aka ANSI X9.62 prime256v1, NIST P-256)</translation>
<translation id="6356138805250111037">ब्राउझरमध्ये आपण जे टाइप करता ते Google कडे पाठवून आणखी स्मार्ट शब्दलेखन-तपासणी</translation>
<translation id="63566973648609420">फक्त आपला सांकेतिक वाक्यांश असलेली एखादी व्यक्ती आपला कूटबद्ध डेटा वाचू शकते. सांकेतिक वाक्यांश Google कडे पाठविला किंवा त्याद्वारे संचयित केला जात नाही. आपण आपला सांकेतिक वाक्यांश विसरल्यास किंवा हे सेटिंग बदलू इच्छित असल्यास, आपल्याला <ph name="BEGIN_LINK" />संकालन रीसेट करण्याची आवश्यकता असेल<ph name="END_LINK" />.</translation>
-<translation id="6357619544108132570"><ph name="SHORT_PRODUCT_NAME" /> कुटुंबात आपले स्वागत आहे. हा नेहमीचा संगणक नाहीये.</translation>
+<translation id="6357619544108132570"><ph name="SHORT_PRODUCT_NAME" /> कुटुंबात आपले स्वागत आहे. हा नेहमीचा कॉंप्युटर नाहीये.</translation>
<translation id="6361850914223837199">एरर तपशील:</translation>
<translation id="6362853299801475928">&amp;समस्या नोंदवणे...</translation>
<translation id="6365411474437319296">कुटुंब आणि मित्र जोडा</translation>
@@ -3644,7 +3644,7 @@
<translation id="6655458902729017087">खाती लपवा</translation>
<translation id="6657585470893396449">पासवर्ड</translation>
<translation id="6659213950629089752">हे पृष्ठ "<ph name="NAME" />" विस्ताराद्वारे झूम केले होते</translation>
-<translation id="6664237456442406323">दुर्दैवाने, आपला संगणक एका विकृत हार्डवेअर आयडी सह कॉन्फिगर केला आहे. हे नवीनतम सुरक्षितता निराकरणे अपडेट करण्यापासून Chrome OS ला प्रतिबंध करते आणि आपल्या संगणकावर <ph name="BEGIN_BOLD" />दुर्भावनापूर्ण आक्रमणांमुळे सहज परिणाम होऊ शकतो<ph name="END_BOLD" />.</translation>
+<translation id="6664237456442406323">दुर्दैवाने, आपला कॉंप्युटर एका विकृत हार्डवेअर आयडी सह कॉन्फिगर केला आहे. हे नवीनतम सुरक्षितता निराकरणे अपडेट करण्यापासून Chrome OS ला प्रतिबंध करते आणि आपल्या कॉंप्युटरावर <ph name="BEGIN_BOLD" />दुर्भावनापूर्ण आक्रमणांमुळे सहज परिणाम होऊ शकतो<ph name="END_BOLD" />.</translation>
<translation id="6664774537677393800">आपले प्रोफाईल उघडताना काहीतरी चूक झाली. कृपया साइन आउट करा नंतर पुन्हा साइन इन करा.</translation>
<translation id="6673391612973410118"><ph name="PRINTER_MAKE_OR_MODEL" /> (USB)</translation>
<translation id="667517062706956822">Google ने हे पृष्ठ <ph name="SOURCE_LANGUAGE" /> मधून <ph name="TARGET_LANGUAGE" /> मध्ये भाषांतरित करावे असे आपण इच्छिता?</translation>
@@ -5041,7 +5041,7 @@
<translation id="8933960630081805351">फाइंडर मध्ये &amp;दर्शवा</translation>
<translation id="8934732568177537184">सुरु ठेवा</translation>
<translation id="8938356204940892126">मी सोडून देतो</translation>
-<translation id="8940081510938872932">आपले संगणक यावेळी असंख्य गोष्‍टी करीत आहे. नंतर पुन्हा प्रयत्न करा.</translation>
+<translation id="8940081510938872932">आपले कॉंप्युटर यावेळी असंख्य गोष्‍टी करीत आहे. नंतर पुन्हा प्रयत्न करा.</translation>
<translation id="8941173171815156065">'<ph name="PERMISSION" />' परवानगी मागे घ्या</translation>
<translation id="8941882480823041320">मागील शब्द</translation>
<translation id="894360074127026135">Netscape International Step-Up</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_pl.xtb b/chromium/chrome/app/resources/generated_resources_pl.xtb
index 0de3ab1cb5b..68686425198 100644
--- a/chromium/chrome/app/resources/generated_resources_pl.xtb
+++ b/chromium/chrome/app/resources/generated_resources_pl.xtb
@@ -5122,7 +5122,7 @@ Osoby z wolnym połączeniem mogą nie zobaczyć treści, które przesyłasz.</
<translation id="9064142312330104323">Zdjęcie z profilu Google (ładowanie)</translation>
<translation id="9064275926664971810">Włącz autouzupełnianie, by jednym kliknięciem wypełniać formularze</translation>
<translation id="9064939804718829769">Przetwarzam...</translation>
-<translation id="9065203028668620118">Edycja</translation>
+<translation id="9065203028668620118">Edytuj</translation>
<translation id="9066782832737749352">Zamiana tekstu na mowę</translation>
<translation id="9070219033670098627">Przełącz osobę</translation>
<translation id="907148966137935206">Nie zezwalaj na wyskakujące okienka w żadnej witrynie (zalecane)</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_pt-BR.xtb b/chromium/chrome/app/resources/generated_resources_pt-BR.xtb
index d46fa1de2a9..c08a54f14fd 100644
--- a/chromium/chrome/app/resources/generated_resources_pt-BR.xtb
+++ b/chromium/chrome/app/resources/generated_resources_pt-BR.xtb
@@ -387,7 +387,7 @@
<translation id="1559235587769913376">Entrada de caracteres Unicode</translation>
<translation id="1566049601598938765">Website</translation>
<translation id="1567993339577891801">Console JavaScript</translation>
-<translation id="1568067597247500137">Ignorar site</translation>
+<translation id="1568067597247500137">Desativar som do site</translation>
<translation id="1568323446248056064">Abrir configurações de exibição do dispositivo</translation>
<translation id="1568822834048182062">Seus favoritos, histórico, senhas e outras configurações serão sincronizados com sua Conta do Google.</translation>
<translation id="1571313460229786892">&amp;Configurações do site</translation>
@@ -1307,7 +1307,7 @@ Não acho que este site deva ser bloqueado.</translation>
<translation id="2972557485845626008">Firmware</translation>
<translation id="2972581237482394796">&amp;Refazer</translation>
<translation id="2972642118232180842">Executar apenas conteúdos importantes (recomendado)</translation>
-<translation id="2973324205039581528">Ignorar site</translation>
+<translation id="2973324205039581528">Desativar som do site</translation>
<translation id="2979639724566107830">Abrir em uma nova janela</translation>
<translation id="2981113813906970160">Mostrar cursor grande do mouse</translation>
<translation id="2982970937345031">Enviar feedback anonimamente</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_pt-PT.xtb b/chromium/chrome/app/resources/generated_resources_pt-PT.xtb
index 093d8fbe6fd..23b0a19401f 100644
--- a/chromium/chrome/app/resources/generated_resources_pt-PT.xtb
+++ b/chromium/chrome/app/resources/generated_resources_pt-PT.xtb
@@ -928,7 +928,7 @@ Acho que este site não deveria estar bloqueado.</translation>
<translation id="2445081178310039857">É necessário o directório de raiz da extensão.</translation>
<translation id="2448312741937722512">Tipo</translation>
<translation id="2450223707519584812">Não pode adicionar utilizadores porque as chaves da API do Google estão em falta. Consulte <ph name="DETAILS_URL" /> para obter detalhes.</translation>
-<translation id="2450849356604136918">Sem vistas ativas.</translation>
+<translation id="2450849356604136918">Sem vistas ativas</translation>
<translation id="2453021845418314664">Definições de sincronização avançadas</translation>
<translation id="2453576648990281505">O ficheiro já existe</translation>
<translation id="2453860139492968684">Concluir</translation>
@@ -1371,7 +1371,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="304826556400666995">Reativar Som dos Separadores</translation>
<translation id="3051523411789012618">Mover a janela para cima</translation>
<translation id="3053013834507634016">Utilização de chave de certificado</translation>
-<translation id="3057861065630527966">Fazer uma cópia de segurança de fotografias e vídeos</translation>
+<translation id="3057861065630527966">Fazer uma cópia de segurança de fotos e vídeos</translation>
<translation id="3060379269883947824">Ativar Selecionar para ativar voz</translation>
<translation id="3061707000357573562">Serviço de patch</translation>
<translation id="3064410671692449875">Dados insuficientes</translation>
@@ -1501,7 +1501,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="3269093882174072735">Carregar imagem</translation>
<translation id="3269889795238950578">Esta página pode ver o texto e as imagens copiados para a área de transferência.</translation>
<translation id="326999365752735949">A transferir dif.</translation>
-<translation id="3270965368676314374">Ler, alterar e eliminar fotografias, música e outros elementos multimédia do computador</translation>
+<translation id="3270965368676314374">Ler, alterar e eliminar fotos, música e outros elementos multimédia do computador</translation>
<translation id="327147043223061465">Ver todos os cookies e os dados de sites</translation>
<translation id="3271648667212143903"><ph name="ORIGIN" /> pretende estabelecer ligação</translation>
<translation id="327444463633065042">Nome de computador inválido</translation>
@@ -1644,7 +1644,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="3466147780910026086">A analisar o dispositivo multimédia...</translation>
<translation id="3467267818798281173">Pedir sugestões ao Google</translation>
<translation id="3468275649641751422">Transmitir um vídeo ou um ficheiro de áudio em fluxo contínuo</translation>
-<translation id="3468522857997926824">Foi feita uma cópia de segurança de <ph name="FILE_COUNT" /> fotografias no <ph name="BEGIN_LINK" />Google Drive<ph name="END_LINK" /></translation>
+<translation id="3468522857997926824">Foi feita uma cópia de segurança de <ph name="FILE_COUNT" /> fotos no <ph name="BEGIN_LINK" />Google Drive<ph name="END_LINK" /></translation>
<translation id="3468745736289470383">Partilhar o ecrã</translation>
<translation id="3470442499439619530">Remover Este Utilizador</translation>
<translation id="3470502288861289375">A copiar...</translation>
@@ -1720,7 +1720,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="3576324189521867626">Instalação com êxito</translation>
<translation id="3578594933904494462">O conteúdo deste separador está a ser partilhado.</translation>
<translation id="357886715122934472">&lt;strong&gt;<ph name="SENDER" />&lt;/strong&gt; pretende partilhar uma impressora &lt;strong&gt;<ph name="PRINTER_NAME" />&lt;/strong&gt; com um grupo de que é proprietário: &lt;strong&gt;<ph name="GROUP_NAME" />&lt;/strong&gt;. Se aceitar, todos os membros do grupo poderão utilizar a impressora.</translation>
-<translation id="3584169441612580296">Ler e alterar fotografias, música e outros elementos multimédia a partir do computador</translation>
+<translation id="3584169441612580296">Ler e alterar fotos, música e outros elementos multimédia a partir do computador</translation>
<translation id="3587482841069643663">Tudo</translation>
<translation id="358796204584394954">Introduza este código no "<ph name="DEVICE_NAME" />" para sincronizar:</translation>
<translation id="3589766037099229847">Conteúdo inseguro bloqueado</translation>
@@ -1825,7 +1825,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="3738924763801731196"><ph name="OID" />:</translation>
<translation id="3739254215541673094">Pretende abrir <ph name="APPLICATION" />?</translation>
<translation id="3741158646617793859"><ph name="DEVICE_NAME" /> será agora apresentado na Consola do gestor.</translation>
-<translation id="3741243925913727067">Faça uma cópia de segurança das fotografias e dos vídeos do seu dispositivo multimédia no Google Drive.</translation>
+<translation id="3741243925913727067">Faça uma cópia de segurança das fotos e dos vídeos do seu dispositivo multimédia no Google Drive.</translation>
<translation id="3742055079367172538">Captura de ecrã efetuada</translation>
<translation id="3744111561329211289">Sincronização em segundo plano</translation>
<translation id="3745016858329272300">Informações gerais</translation>
@@ -2085,7 +2085,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="413121957363593859">Componentes</translation>
<translation id="4131410914670010031">Preto e branco</translation>
<translation id="4136203100490971508">A Luz noturna irá desativar-se automaticamente ao nascer do sol.</translation>
-<translation id="4138267921960073861">Mostrar nomes de utilizador e fotografias no ecrã de início de sessão</translation>
+<translation id="4138267921960073861">Mostrar nomes de utilizador e fotos no ecrã de início de sessão</translation>
<translation id="4140559601186535628">Mensagens push</translation>
<translation id="4146026355784316281">Abrir sempre com o visualizador do sistema</translation>
<translation id="4146785383423576110">Repor e limpar</translation>
@@ -2400,7 +2400,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="4720185134442950733">Rede de dados móveis</translation>
<translation id="4722920479021006856"><ph name="APP_NAME" /> está a partilhar o seu ecrã.</translation>
<translation id="4724450788351008910">A afiliação mudou</translation>
-<translation id="4724850507808590449">Foi feita uma cópia de segurança de <ph name="FILE_COUNT" /> fotografias</translation>
+<translation id="4724850507808590449">Foi feita uma cópia de segurança de <ph name="FILE_COUNT" /> fotos</translation>
<translation id="4726710629007580002">Foram obtidos avisos ao tentar instalar esta extensão:</translation>
<translation id="4728558894243024398">Plataforma</translation>
<translation id="4731422630970790516">Artigo de prateleira 3</translation>
@@ -2878,7 +2878,7 @@ Para obter mais informações, aceda ao nosso <ph name="BEGIN_LINK" />Centro de
<translation id="5453029940327926427">Fechar separadores</translation>
<translation id="5454166040603940656">com <ph name="PROVIDER" /></translation>
<translation id="5457113250005438886">Inválido</translation>
-<translation id="5457459357461771897">Ler e eliminar fotografias, música e outros elementos multimédia a partir do computador</translation>
+<translation id="5457459357461771897">Ler e eliminar fotos, música e outros elementos multimédia a partir do computador</translation>
<translation id="5457599981699367932">Navegar como convidado</translation>
<translation id="5457950659230097883">JavaScript bloqueado</translation>
<translation id="5458998536542739734">Notas no ecrã de bloqueio</translation>
@@ -4406,7 +4406,7 @@ Certifique-se de que não revela informações confidenciais.</translation>
<translation id="7887864092952184874">Rato Bluetooth sincronizado</translation>
<translation id="7889966925761734854">Procurar</translation>
<translation id="7892100671754994880">Utilizador seguinte</translation>
-<translation id="7893008570150657497">Aceder a fotografias, música e outros elementos multimédia a partir do seu computador</translation>
+<translation id="7893008570150657497">Aceder a fotos, música e outros elementos multimédia a partir do seu computador</translation>
<translation id="7893153962594818789">O Bluetooth está desativado neste <ph name="DEVICE_TYPE" />. Introduza a palavra-passe e ative o Bluetooth.</translation>
<translation id="7893393459573308604"><ph name="ENGINE_NAME" /> (Predefinição)</translation>
<translation id="78957024357676568">esquerda</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_ro.xtb b/chromium/chrome/app/resources/generated_resources_ro.xtb
index 0393d59e802..98d2eb340a1 100644
--- a/chromium/chrome/app/resources/generated_resources_ro.xtb
+++ b/chromium/chrome/app/resources/generated_resources_ro.xtb
@@ -191,7 +191,7 @@
<translation id="1274997165432133392">Cookie-urile și alte date privind site-ul</translation>
<translation id="127668050356036882">Închide toate ferestrele</translation>
<translation id="1277908057200820621">Vezi lista cu dispozitive</translation>
-<translation id="1278049586634282054">Inspectați afișările:</translation>
+<translation id="1278049586634282054">Inspectează afișările:</translation>
<translation id="1280820357415527819">Se caută rețele mobile</translation>
<translation id="1285320974508926690">Nu traduce niciodată acest site</translation>
<translation id="1285484354230578868">Stocați datele în contul Google Drive</translation>
@@ -927,7 +927,7 @@ Nu cred că acest site ar trebui blocat!</translation>
<translation id="2445081178310039857">Este necesar directorul rădăcină pentru extensie.</translation>
<translation id="2448312741937722512">Tipul</translation>
<translation id="2450223707519584812">Nu vei putea adăuga utilizatori, deoarece lipsesc cheile pentru API-ul Google. Pentru detalii, consultă <ph name="DETAILS_URL" />.</translation>
-<translation id="2450849356604136918">Nu există vizionări active</translation>
+<translation id="2450849356604136918">Nu există afișări active</translation>
<translation id="2453021845418314664">Setări de sincronizare avansate</translation>
<translation id="2453576648990281505">Fișierul există deja</translation>
<translation id="2453860139492968684">Terminați</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_ru.xtb b/chromium/chrome/app/resources/generated_resources_ru.xtb
index ba69a6be27a..58b9f02539c 100644
--- a/chromium/chrome/app/resources/generated_resources_ru.xtb
+++ b/chromium/chrome/app/resources/generated_resources_ru.xtb
@@ -926,7 +926,7 @@
<translation id="2445081178310039857">Требуется корневой каталог расширения.</translation>
<translation id="2448312741937722512">Тип</translation>
<translation id="2450223707519584812">Отсутствуют ключи API Google. Вы не сможете добавлять пользователей. Подробная информация: <ph name="DETAILS_URL" />.</translation>
-<translation id="2450849356604136918">Нет активных режимов просмотра.</translation>
+<translation id="2450849356604136918">нет активных режимов просмотра.</translation>
<translation id="2453021845418314664">Дополнительные настройки синхронизации</translation>
<translation id="2453576648990281505">Файл уже существует</translation>
<translation id="2453860139492968684">Закрыть</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_sk.xtb b/chromium/chrome/app/resources/generated_resources_sk.xtb
index 55df3867599..ccb48691d11 100644
--- a/chromium/chrome/app/resources/generated_resources_sk.xtb
+++ b/chromium/chrome/app/resources/generated_resources_sk.xtb
@@ -1003,7 +1003,7 @@ Tieto webové stránky by podľa mňa nemali byť blokované.</translation>
<translation id="2562685439590298522">Dokumenty</translation>
<translation id="2562743677925229011">Nie ste prihlásený/-á v prehliadači <ph name="SHORT_PRODUCT_NAME" /></translation>
<translation id="2563856802393254086">Gratulujeme! Dátová služba <ph name="NAME" /> sa aktivovala a je pripravená na použitie.</translation>
-<translation id="2566124945717127842">Funkcia PowerWash obnoví zariadenie <ph name="IDS_SHORT_PRODUCT_NAME" /> tak, aby bolo ako nové.</translation>
+<translation id="2566124945717127842">Funkcia PowerWash resetuje zariadenie <ph name="IDS_SHORT_PRODUCT_NAME" /> tak, aby bolo ako nové.</translation>
<translation id="2567257616420533738">Heslo bolo uložené. Uložené heslá môžete zobraziť a spravovať na adrese <ph name="SAVED_PASSWORDS_LINK" /></translation>
<translation id="2568774940984945469">Kontajner informačného panela</translation>
<translation id="2570000010887652771">Uložené dáta.</translation>
@@ -1358,7 +1358,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
Ďalšie informácie nájdete v našom <ph name="BEGIN_LINK" />centre pomoci<ph name="END_LINK" />.</translation>
<translation id="3031417829280473749">Agent X</translation>
<translation id="3031557471081358569">Vyberte položky na import:</translation>
-<translation id="3031601332414921114">Obnoviť tlač</translation>
+<translation id="3031601332414921114">Pokračovať v tlači</translation>
<translation id="303198083543495566">Geografia</translation>
<translation id="3036546437875325427">Povoliť Flash</translation>
<translation id="3038612606416062604">Manuálne pridanie tlačiarne</translation>
@@ -1406,7 +1406,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
<translation id="3115147772012638511">Čakanie na vyrovnávaciu pamäť...</translation>
<translation id="3118319026408854581">Pomocník aplikácie <ph name="PRODUCT_NAME" /></translation>
<translation id="3120430004221004537">Nedostatočné šifrovanie pre danú operáciu na zariadení <ph name="DEVICE_NAME" />.</translation>
-<translation id="3121793941267913344">Obnovenie tohto zariadenia <ph name="IDS_SHORT_PRODUCT_NAME" /></translation>
+<translation id="3121793941267913344">Resetovanie tohto zariadenia <ph name="IDS_SHORT_PRODUCT_NAME" /></translation>
<translation id="3122464029669770682">CPU</translation>
<translation id="3122496702278727796">Nedal sa vytvoriť údajový adresár</translation>
<translation id="3123569374670379335">(kontrolovaný)</translation>
@@ -2029,7 +2029,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
<translation id="404493185430269859">Predvolený vyhľadávač</translation>
<translation id="4047112090469382184">Aké zabezpečenie funkcia poskytuje?</translation>
<translation id="4052120076834320548">Drobné</translation>
-<translation id="4055023634561256217">Pred obnovením zariadenia pomocou funkcie Powerwash sa vyžaduje jeho reštart.</translation>
+<translation id="4055023634561256217">Pred resetovaním zariadenia pomocou funkcie Powerwash sa vyžaduje jeho reštart.</translation>
<translation id="4057041477816018958"><ph name="SPEED" /> – <ph name="RECEIVED_AMOUNT" /></translation>
<translation id="4057896668975954729">Zobraziť v Obchode</translation>
<translation id="4058720513957747556">AppSocket (TCP/IP)</translation>
@@ -2086,7 +2086,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
<translation id="4138267921960073861">Zobraziť používateľské mená a fotografie na prihlasovacej obrazovke</translation>
<translation id="4140559601186535628">Správy push</translation>
<translation id="4146026355784316281">Vždy otvárať pomocou systémového zobrazovača</translation>
-<translation id="4146785383423576110">Obnoviť a vyčistiť</translation>
+<translation id="4146785383423576110">Resetovať a vyčistiť</translation>
<translation id="4150201353443180367">Displej</translation>
<translation id="4152670763139331043">{NUM_TABS,plural, =1{1 karta}few{# karty}many{# karty}other{# kariet}}</translation>
<translation id="4154664944169082762">Odtlačky</translation>
@@ -2316,7 +2316,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
<translation id="4579581181964204535">Nie je možné prenášať hostiteľskú službu <ph name="HOST_NAME" />.</translation>
<translation id="4580526846085481512">Naozaj chcete odstrániť položky ($1)?</translation>
<translation id="458150753955139441">Stlačením tohto tlačidla prejdete späť, históriu si zobrazíte pomocou kontextovej ponuky</translation>
-<translation id="4582563038311694664">Obnoviť všetky nastavenia</translation>
+<translation id="4582563038311694664">Resetovať všetky nastavenia</translation>
<translation id="4585793705637313973">Úprava stránky</translation>
<translation id="4589268276914962177">Nový terminál</translation>
<translation id="4590324241397107707">Ukladací priestor databázy</translation>
@@ -2579,7 +2579,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
<translation id="4990343175649730969">Stiahnuť Chrome Cleanup Tool</translation>
<translation id="4991420928586866460">Považovať klávesy v hornom riadku za funkčné klávesy</translation>
<translation id="499165176004408815">Použiť režim s vysokým kontrastom</translation>
-<translation id="4992066212339426712">Obnoviť zvuk</translation>
+<translation id="4992066212339426712">Zapnúť zvuk</translation>
<translation id="4992458225095111526">Potvrdenia obnovenia Powerwash</translation>
<translation id="4994474651455208930">Povoliť stránkam požiadať o nastavenie za predvolené obslužné nástroje protokolov</translation>
<translation id="4994754230098574403">Nastavuje sa</translation>
@@ -2709,7 +2709,7 @@ Pri vytvorení kontrolovaného používateľa sa nevytvorí účet Google a jeh
<translation id="5222676887888702881">Odhlásiť sa</translation>
<translation id="52232769093306234">Nepodarilo sa zbaliť.</translation>
<translation id="5225324770654022472">Zobrazovať odkaz aplikácií</translation>
-<translation id="5225360179303283478">Obnoviť nastavenia webu</translation>
+<translation id="5225360179303283478">Resetovať nastavenia webu</translation>
<translation id="5227679487546032910">Predvolený modrozelený avatar</translation>
<translation id="5227808808023563348">Nájsť predchádzajúci text</translation>
<translation id="5228076606934445476">V zariadení sa vyskytol problém. Ak chcete opraviť túto chybu, musíte zariadenie reštartovať a skúsiť to znova.</translation>
@@ -3189,7 +3189,7 @@ s ostatnými, a to všetko na jednom mieste.<ph name="MARKUP_9" /></translatio
<translation id="5932881020239635062">Sériové č.</translation>
<translation id="5933376509899483611">Časové pásmo</translation>
<translation id="5934281776477898549">Žiadna aktualizácia</translation>
-<translation id="5939518447894949180">Obnoviť</translation>
+<translation id="5939518447894949180">Resetovať</translation>
<translation id="5941153596444580863">Pridať osobu...</translation>
<translation id="5941343993301164315">Prihláste sa do <ph name="TOKEN_NAME" />.</translation>
<translation id="5941711191222866238">Minimalizovať</translation>
@@ -3388,7 +3388,7 @@ s ostatnými, a to všetko na jednom mieste.<ph name="MARKUP_9" /></translatio
<translation id="6259104249628300056">Objavovať zariadenia vo vašej miestnej sieti</translation>
<translation id="6263082573641595914">Certifikačná autorita spoločnosti Microsoft – verzia</translation>
<translation id="6263284346895336537">Nie je kritický</translation>
-<translation id="6263541650532042179">obnoviť synchronizáciu</translation>
+<translation id="6263541650532042179">resetovať synchronizáciu</translation>
<translation id="6264365405983206840">Vybrať &amp;všetko</translation>
<translation id="6265930187414222160">Hotovo! Škodlivý softvér bol odstránený.</translation>
<translation id="6267166720438879315">Vyberte certifikát, ktorý overí vašu osobu pre <ph name="HOST_NAME" /></translation>
@@ -3504,7 +3504,7 @@ s ostatnými, a to všetko na jednom mieste.<ph name="MARKUP_9" /></translatio
<translation id="6435285122322546452">Spravovať aplikácie pre režim verejného terminálu...</translation>
<translation id="6436164536244065364">Zobraziť v Internetovom obchode</translation>
<translation id="6437213622978068772">Znova načítať (Ctrl+R)</translation>
-<translation id="6438234780621650381">Obnovenie nastavení</translation>
+<translation id="6438234780621650381">Resetovanie nastavení</translation>
<translation id="6438992844451964465"><ph name="WINDOW_TITLE" /> – Prehráva sa zvuk</translation>
<translation id="6442187272350399447">Skvelý</translation>
<translation id="6442697326824312960">Odopnúť kartu</translation>
@@ -3583,7 +3583,7 @@ s ostatnými, a to všetko na jednom mieste.<ph name="MARKUP_9" /></translatio
<translation id="6550675742724504774">Možnosti</translation>
<translation id="6551508934388063976">Príkaz nie je k dispozícii. Stlačením kombinácie klávesov CTRL + N otvoríte nové okno.</translation>
<translation id="655384502888039633">Počet používateľov: <ph name="USER_COUNT" /></translation>
-<translation id="6555432686520421228">Odstráňte všetky používateľské účty a obnovte zariadenie <ph name="IDS_SHORT_PRODUCT_NAME" />, aby bolo ako nové.</translation>
+<translation id="6555432686520421228">Odstráni všetky používateľské účty a resetuje zariadenie <ph name="IDS_SHORT_PRODUCT_NAME" /> na výrobné nastavenia.</translation>
<translation id="6555810572223193255">Vyčistenie momentálne nie je k dispozícii</translation>
<translation id="6556866813142980365">Znova</translation>
<translation id="6558280019477628686">Vyskytla sa chyba. Niektoré položky sa nemuseli odstrániť.</translation>
@@ -3679,7 +3679,7 @@ s ostatnými, a to všetko na jednom mieste.<ph name="MARKUP_9" /></translatio
<translation id="6716704051134091292">Konvertor PDF</translation>
<translation id="6718273304615422081">Prebieha komprimovanie...</translation>
<translation id="671928215901716392">Uzamknúť obrazovku</translation>
-<translation id="67211069045302358">Obnoviť nastavenia tohto webu?</translation>
+<translation id="67211069045302358">Chcete resetovať nastavenia tohto webu?</translation>
<translation id="6721972322305477112">&amp;Súbor</translation>
<translation id="672213144943476270">Skôr než začnete prehliadať ako hosť, odomknite svoj profil.</translation>
<translation id="6723354935081862304">Tlačte do služby Dokumenty Google a ďalších cieľov v cloude. Ak chcete tlačiť do služby Google Cloud Print, <ph name="BEGIN_LINK" />prihláste sa<ph name="END_LINK" />.</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_sv.xtb b/chromium/chrome/app/resources/generated_resources_sv.xtb
index e4dd4313430..5837462c17b 100644
--- a/chromium/chrome/app/resources/generated_resources_sv.xtb
+++ b/chromium/chrome/app/resources/generated_resources_sv.xtb
@@ -865,7 +865,7 @@
<translation id="2332131598580221120">Visa i butik</translation>
<translation id="2332742915001411729">Återställ standardvärden</translation>
<translation id="2335122562899522968">Den här sidan angav cookies.</translation>
-<translation id="2336228925368920074">Lägg till bokmärke på alla flikar...</translation>
+<translation id="2336228925368920074">Skapa bokmärken för alla flikar ...</translation>
<translation id="2336381494582898602">Powerwash</translation>
<translation id="2339120501444485379">Skriv ett nytt namn</translation>
<translation id="2339641773402824483">Söker efter uppdateringar...</translation>
@@ -2248,7 +2248,7 @@ Besök vårt <ph name="BEGIN_LINK" />hjälpcenter<ph name="END_LINK" /> om du vi
<translation id="4462159676511157176">Anpassade namnservrar</translation>
<translation id="4467100756425880649">Chrome Web Store Gallery</translation>
<translation id="4467101674048705704">Utöka <ph name="FOLDER_NAME" /></translation>
-<translation id="4474155171896946103">Lägg till bokmärke på alla flikar...</translation>
+<translation id="4474155171896946103">Skapa bokmärken för alla flikar ...</translation>
<translation id="4474381447165623168">Ställ in automatiskt via Wi-Fi-nätverket</translation>
<translation id="4475552974751346499">Sök i nedladdningar</translation>
<translation id="4476590490540813026">Idrottare</translation>
@@ -2352,7 +2352,7 @@ Besök vårt <ph name="BEGIN_LINK" />hjälpcenter<ph name="END_LINK" /> om du vi
<translation id="4643612240819915418">&amp;Öppna video i ny flik</translation>
<translation id="4645676300727003670">&amp;Behåll</translation>
<translation id="4647090755847581616">&amp;Stäng flik</translation>
-<translation id="4647697156028544508">Ange PIN-koden för <ph name="DEVICE_NAME" />:</translation>
+<translation id="4647697156028544508">Ange pinkoden för <ph name="DEVICE_NAME" />:</translation>
<translation id="4648491805942548247">Otillräckliga behörigheter</translation>
<translation id="4648499713050786492">Du måste låsa upp din profil innan du kan lägga till en person.</translation>
<translation id="465499440663162826">Det gick inte att ansluta till Chrome Web Store.</translation>
@@ -2624,7 +2624,7 @@ Besök vårt <ph name="BEGIN_LINK" />hjälpcenter<ph name="END_LINK" /> om du vi
<translation id="5072836811783999860">Visa hanterade bokmärken</translation>
<translation id="5074318175948309511">Den här sidan kan behöva läsas in igen innan den nya inställningen börjar gälla.</translation>
<translation id="5075131525758602494">Ange SIM-kortets pinkod</translation>
-<translation id="5078638979202084724">Lägg till bokmärke på alla flikar</translation>
+<translation id="5078638979202084724">Skapa bokmärken för alla flikar</translation>
<translation id="5085162214018721575">Söker efter uppdateringar</translation>
<translation id="5086082738160935172">HID</translation>
<translation id="5086874064903147617">Vill du återställa standardinställningen för startsidan?</translation>
@@ -2684,7 +2684,7 @@ Besök vårt <ph name="BEGIN_LINK" />hjälpcenter<ph name="END_LINK" /> om du vi
<translation id="5163869187418756376">Delningen misslyckades. Kontrollera anslutningen och försök igen senare.</translation>
<translation id="5170477580121653719">Lagringsutrymme som finns kvar i Google Drive: <ph name="SPACE_AVAILABLE" /> .</translation>
<translation id="5170568018924773124">Visa i mapp</translation>
-<translation id="5171045022955879922">Ange eller sök efter webbadress</translation>
+<translation id="5171045022955879922">Sök eller ange webbadress</translation>
<translation id="5171343362375269016">Bytt minne</translation>
<translation id="5175870427301879686"><ph name="URL" /> vill lagra data permanent på din lokala dator.</translation>
<translation id="5177479852722101802">Fortsätt blockera tillgång till kamera och mikrofon</translation>
@@ -2869,7 +2869,7 @@ Besök vårt <ph name="BEGIN_LINK" />hjälpcenter<ph name="END_LINK" /> om du vi
<translation id="5446983216438178612">Visa organisationens certifikat</translation>
<translation id="5448293924669608770">Det uppstod problem vid inloggningen</translation>
<translation id="5449551289610225147">Ogiltigt lösenord</translation>
-<translation id="5449588825071916739">Lägg till bokmärke på alla flikar ...</translation>
+<translation id="5449588825071916739">Skapa bokmärken för alla flikar</translation>
<translation id="5449716055534515760">Stäng fön&amp;ster</translation>
<translation id="5451285724299252438">textruta för sidintervall</translation>
<translation id="5453029940327926427">Stäng flikar</translation>
@@ -4483,13 +4483,13 @@ Spara nyckelfilen på ett säkert ställe. Den behövs om du ska skapa nya versi
<translation id="8005600846065423578">Ge alltid <ph name="HOST" /> tillgång till Urklipp</translation>
<translation id="8008356846765065031">Internetanslutningen har avbrutits. Kontrollera internetanslutningen.</translation>
<translation id="8008765610824028412">Det gick inte att läsa in <ph name="PLUGIN_NAME" />.</translation>
-<translation id="8008818777654712271">Viss information om systemet och innehåll på sidan skickas automatiskt till Google i syfte att identifiera skadliga appar och webbplatser.</translation>
+<translation id="8008818777654712271">Skicka automatiskt viss information om systemet och sidors innehåll till Google i syfte att identifiera skadliga appar och webbplatser.</translation>
<translation id="8012382203418782830">Sidan har översatts.</translation>
<translation id="8014154204619229810">Uppdateringsprogrammet körs. Uppdatera sidan om en minut och kolla igen.</translation>
<translation id="8014206674403687691"><ph name="IDS_SHORT_PRODUCT_NAME" /> kan inte återställas till den föregående installerade versionen. Försök använda Powerwash på enheten igen.</translation>
<translation id="8016266267177410919">Tillfällig lagring</translation>
<translation id="8017335670460187064"><ph name="LABEL" /></translation>
-<translation id="8018313076035239964">Styr vilket slags innehåll som får visas på webbplatser och vilken information webbplatserna får ta del av</translation>
+<translation id="8018313076035239964">Styr vilken information som webbplatser kan ta del av och vilket innehåll de kan visa</translation>
<translation id="8023801379949507775">Uppdatera tillägg nu</translation>
<translation id="8024483450737722621">Appar som du har laddat ned på Google Play tas bort från Chromebook.
<ph name="LINE_BREAKS1" />
@@ -4875,7 +4875,7 @@ Spara nyckelfilen på ett säkert ställe. Den behövs om du ska skapa nya versi
<translation id="8669284339312441707">Varmare</translation>
<translation id="8669949407341943408">Flyttar …</translation>
<translation id="8671210955687109937">Kan kommentera</translation>
-<translation id="8673026256276578048">Söka på Internet...</translation>
+<translation id="8673026256276578048">Sök på webben ...</translation>
<translation id="8673383193459449849">Serverfel</translation>
<translation id="8674241889607553858">Vill du att sidan ska översättas?</translation>
<translation id="8675354002693747642">I förväg delad nyckel</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_sw.xtb b/chromium/chrome/app/resources/generated_resources_sw.xtb
index f9ac01f583a..f90e472d763 100644
--- a/chromium/chrome/app/resources/generated_resources_sw.xtb
+++ b/chromium/chrome/app/resources/generated_resources_sw.xtb
@@ -113,7 +113,7 @@
<translation id="1164899421101904659">Weka Ufunguo wa Kufungua PIN</translation>
<translation id="1165039591588034296">Hitilafu</translation>
<translation id="1166212789817575481">Funga Vichupo vilivyo Upande wa Kulia</translation>
-<translation id="1168020859489941584">Inafungua katika <ph name="TIME_REMAINING" />...</translation>
+<translation id="1168020859489941584">Inafungua baada ya <ph name="TIME_REMAINING" />...</translation>
<translation id="1168100932582989117">Seva za jina la Google</translation>
<translation id="1171135284592304528">Angazia kipengee kilicholengwa kwa kibodi kinapobadilika</translation>
<translation id="1173894706177603556">Ipe jina jipya</translation>
@@ -191,7 +191,7 @@
<translation id="1274997165432133392">Vidakuzi na data ya tovuti nyingine</translation>
<translation id="127668050356036882">Funga madirisha yako yote</translation>
<translation id="1277908057200820621">Angalia orodha ya vifaa</translation>
-<translation id="1278049586634282054">Kagua maoni:</translation>
+<translation id="1278049586634282054">Kagua idadi ya kutazamwa:</translation>
<translation id="1280820357415527819">Inatafuta mitandao ya simu</translation>
<translation id="1285320974508926690">Kamwe usitafsiri tovuti hii</translation>
<translation id="1285484354230578868">Hifadhi data katika akaunti yako ya Hifadhi ya Google</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_th.xtb b/chromium/chrome/app/resources/generated_resources_th.xtb
index 025cd9d0428..eb6b01092e3 100644
--- a/chromium/chrome/app/resources/generated_resources_th.xtb
+++ b/chromium/chrome/app/resources/generated_resources_th.xtb
@@ -393,7 +393,7 @@
<translation id="1571313460229786892">และการตั้งค่าเว็บไซต์</translation>
<translation id="1572266655485775982">เปิดใช้ Wi-Fi</translation>
<translation id="1572876035008611720">ป้อนอีเมล</translation>
-<translation id="1576594961618857597">อวาตาร์เริ่มต้นสีขาว</translation>
+<translation id="1576594961618857597">รูปโปรไฟล์เริ่มต้นสีขาว</translation>
<translation id="1580652505892042215">บริบท:</translation>
<translation id="1581962803218266616">แสดงใน Finder</translation>
<translation id="1584990664401018068">เครือข่าย Wi-Fi ที่คุณใช้ (<ph name="NETWORK_ID" />) อาจต้องการการตรวจสอบสิทธิ์</translation>
@@ -608,7 +608,7 @@
<translation id="1909880997794698664">คุณต้องการเก็บอุปกรณ์นี้ไว้ในโหมดคีออสก์อย่างถาวรหรือไม่</translation>
<translation id="1910721550319506122">ยินดีต้อนรับ!</translation>
<translation id="1915073950770830761">Canary</translation>
-<translation id="1916502483199172559">อวาตาร์เริ่มต้นสีแดง</translation>
+<translation id="1916502483199172559">รูปโปรไฟล์เริ่มต้นสีแดง</translation>
<translation id="1918141783557917887">เ&amp;ล็กลง</translation>
<translation id="1919345977826869612">โฆษณา</translation>
<translation id="1919814239594435008">อนุญาตปลั๊กอินที่ไม่ได้อยู่ในแซนด์บ็อกซ์</translation>
@@ -927,7 +927,7 @@
<translation id="2445081178310039857">จำเป็นต้องระบุไดเรกทอรีหลักของส่วนขยาย</translation>
<translation id="2448312741937722512">ประเภท</translation>
<translation id="2450223707519584812">คุณจะไม่สามารถเพิ่มผู้ใช้เนื่องจากไม่มีคีย์ของ Google API ดูรายละเอียดได้ที่ <ph name="DETAILS_URL" /></translation>
-<translation id="2450849356604136918">ไม่มีมุมมองที่ใช้งานอยู่</translation>
+<translation id="2450849356604136918">ไม่มีมุมมองที่เปิดอยู่</translation>
<translation id="2453021845418314664">การตั้งค่าการซิงค์ขั้นสูง</translation>
<translation id="2453576648990281505">มีไฟล์นี้อยู่แล้ว</translation>
<translation id="2453860139492968684">เสร็จสิ้น</translation>
@@ -1420,7 +1420,7 @@
<translation id="3130528281680948470">ระบบจะรีเซ็ตอุปกรณ์ของคุณ บัญชีผู้ใช้ทั้งหมดและข้อมูลในเครื่องจะถูกนำออก ซึ่งขั้นตอนนี้ไม่สามารถยกเลิกได้</translation>
<translation id="313205617302240621">ลืมรหัสผ่าน</translation>
<translation id="3135204511829026971">หมุนหน้าจอ</translation>
-<translation id="3139925690611372679">อวาตาร์เริ่มต้นสีเหลือง</translation>
+<translation id="3139925690611372679">รูปโปรไฟล์เริ่มต้นสีเหลือง</translation>
<translation id="3140353188828248647">โฟกัสแถบที่อยู่</translation>
<translation id="3141318088920353606">กำลังฟัง...</translation>
<translation id="3141917231319778873">คำขอที่ระบุไม่สามารถใช้ได้ใน "<ph name="DEVICE_NAME" />"</translation>
@@ -1468,7 +1468,7 @@
<translation id="3220586366024592812">การทำงานของตัวเชื่อมต่อ <ph name="CLOUD_PRINT_NAME" /> ขัดข้อง จะรีสตาร์ทหรือไม่</translation>
<translation id="3221634914176615296">สำรวจเนื้อหาของอุปกรณ์ในแอป Files</translation>
<translation id="3222066309010235055">Prerender: <ph name="PRERENDER_CONTENTS_NAME" /></translation>
-<translation id="3225084153129302039">อวาตาร์เริ่มต้นสีม่วง</translation>
+<translation id="3225084153129302039">รูปโปรไฟล์เริ่มต้นสีม่วง</translation>
<translation id="3225319735946384299">การรับรองโค้ด</translation>
<translation id="3227137524299004712">ไมโครโฟน</translation>
<translation id="32279126412636473">โหลดซ้ำ (⌘R)</translation>
@@ -2285,7 +2285,7 @@
<translation id="4542520061254486227">อ่านข้อมูลใน <ph name="WEBSITE_1" /> และ <ph name="WEBSITE_2" /></translation>
<translation id="4543733025292526486">Esc</translation>
<translation id="4543778593405494224">ตัวจัดการใบรับรอง</translation>
-<translation id="4544174279960331769">อวาตาร์เริ่มต้นสีฟ้า</translation>
+<translation id="4544174279960331769">รูปโปรไฟล์เริ่มต้นสีฟ้า</translation>
<translation id="4545028762441890696">หากต้องการเปิดใช้อีกครั้ง ให้ยอมรับสิทธิ์ใหม่:</translation>
<translation id="454547174531670764">ซิงค์กับอีกบัญชีหนึ่ง</translation>
<translation id="4545759655004063573">ไม่สามารถบันทึกเนื่องจากสิทธิ์ไม่เพียงพอ โปรดบันทึกลงในตำแหน่งอื่น</translation>
@@ -2549,7 +2549,7 @@
<translation id="494286511941020793">ความช่วยเหลือในการกำหนดค่าพร็อกซี</translation>
<translation id="494660967831069720">ข้อมูลบางส่วน</translation>
<translation id="4953689047182316270">ตอบสนองต่อเหตุการณ์การเข้าถึงพิเศษ</translation>
-<translation id="4953808748584563296">อวาตาร์เริ่มต้นสีส้ม</translation>
+<translation id="4953808748584563296">รูปโปรไฟล์เริ่มต้นสีส้ม</translation>
<translation id="4955814292505481804">รายปี</translation>
<translation id="4958834709409349617">ในโทรศัพท์ "<ph name="PHONE_NAME_1" />" และ "<ph name="PHONE_NAME_2" />" ให้เปิดใช้การแจ้งเตือนด้วยการทำตามขั้นตอนเหล่านี้</translation>
<translation id="495931528404527476">ใน Chrome</translation>
@@ -2710,7 +2710,7 @@
<translation id="52232769093306234">การบรรจุล้มเหลว</translation>
<translation id="5225324770654022472">แสดงทางลัดแอป</translation>
<translation id="5225360179303283478">รีเซ็ตการตั้งค่าไซต์</translation>
-<translation id="5227679487546032910">อวาตาร์เริ่มต้นสีน้ำเงินอมเขียว</translation>
+<translation id="5227679487546032910">รูปโปรไฟล์เริ่มต้นสีน้ำเงินอมเขียว</translation>
<translation id="5227808808023563348">ค้นหาข้อความก่อนหน้า</translation>
<translation id="5228076606934445476">มีบางอย่างผิดปกติกับอุปกรณ์ ในการกู้คืนจากข้อผิดพลาดนี้ คุณจะต้องรีบูตเครื่องและลองอีกครั้ง</translation>
<translation id="5229189185761556138">จัดการวิธีป้อนข้อมูล</translation>
@@ -4527,7 +4527,7 @@
<translation id="8059417245945632445">&amp;ตรวจสอบอุปกรณ์</translation>
<translation id="8061298200659260393">ไม่อนุญาตให้ไซต์ส่งข้อความพุช</translation>
<translation id="8061820249063924643">จัดการผู้ใช้ภายใต้การดูแล</translation>
-<translation id="8063235345342641131">อวาตาร์เริ่มต้นสีเขียว</translation>
+<translation id="8063235345342641131">รูปโปรไฟล์เริ่มต้นสีเขียว</translation>
<translation id="8064671687106936412">คีย์:</translation>
<translation id="806812017500012252">จัดลำดับใหม่ตามชื่อ</translation>
<translation id="8068253693380742035">แตะเพื่อลงชื่อเข้าใช้</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_tr.xtb b/chromium/chrome/app/resources/generated_resources_tr.xtb
index 426575b5c47..e901b2e9ae2 100644
--- a/chromium/chrome/app/resources/generated_resources_tr.xtb
+++ b/chromium/chrome/app/resources/generated_resources_tr.xtb
@@ -4845,7 +4845,7 @@ Anahtar dosyanızı güvenli bir yerde saklayın. Uzantınızın yeni sürümler
<translation id="8628085465172583869">Sunucu ana makine adı:</translation>
<translation id="8630903300770275248">Denetlenen kullanıcıyı içe aktar</translation>
<translation id="8631032106121706562">Çiçek</translation>
-<translation id="8637542770513281060">Bilgisayarınızda, Chrome OS'taki pek çok kritik güvenlik özelliğini uygulamak için kullanılan bir güvenli modül bulunmaktadır. Daha fazla bilgi edinmek için Chromebook Yardım Merkezi'ni ziyaret edin: https://support.google.com/chromebook/?p=sm</translation>
+<translation id="8637542770513281060">Bilgisayarınızda, Chrome OS'teki pek çok kritik güvenlik özelliğini uygulamak için kullanılan bir güvenli modül bulunmaktadır. Daha fazla bilgi edinmek için Chromebook Yardım Merkezi'ni ziyaret edin: https://support.google.com/chromebook/?p=sm</translation>
<translation id="8637688295594795546">Kullanılabilir sistem güncellemesi mevcut. İndirmeye hazırlanılıyor...</translation>
<translation id="8639047128869322042">Zararlı yazılımlar denetleniyor...</translation>
<translation id="8639963783467694461">Otomatik doldurma ayarları</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_uk.xtb b/chromium/chrome/app/resources/generated_resources_uk.xtb
index 0b148d7a754..aa110d79eca 100644
--- a/chromium/chrome/app/resources/generated_resources_uk.xtb
+++ b/chromium/chrome/app/resources/generated_resources_uk.xtb
@@ -3413,7 +3413,7 @@
<translation id="6290556621549272952">З цією функцією ви можете транслювати вміст із Chromium на телевізор чи інші пристрої.</translation>
<translation id="6291953229176937411">&amp;Показати в програмі Finder</translation>
<translation id="6295158916970320988">Усі сайти</translation>
-<translation id="6295855836753816081">Збереження…</translation>
+<translation id="6295855836753816081">Зберігання…</translation>
<translation id="6298962879096096191">Установлювати додатки Android із Google Play</translation>
<translation id="630065524203833229">В&amp;ийти</translation>
<translation id="6305607932814307878">Глобальна політика:</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_vi.xtb b/chromium/chrome/app/resources/generated_resources_vi.xtb
index e019677641b..1095e919e70 100644
--- a/chromium/chrome/app/resources/generated_resources_vi.xtb
+++ b/chromium/chrome/app/resources/generated_resources_vi.xtb
@@ -57,7 +57,7 @@
<translation id="1076818208934827215">Microsoft Internet Explorer</translation>
<translation id="1077946062898560804">Thiết lập Cập nhật Tự động cho Tất cả Người dùng</translation>
<translation id="1079766198702302550">Luôn chặn quyền truy cập máy ảnh</translation>
-<translation id="1082398631555931481"><ph name="THIRD_PARTY_TOOL_NAME" /> muốn khôi phục cài đặt Chrome của bạn về mặc định ban đầu. Thao tác này sẽ đặt lại trang chủ, trang tab mới và công cụ tìm kiếm, vô hiệu hóa các tiện ích của bạn và bỏ ghim tất cả các tab. Hành động này cũng xóa dữ liệu tạm thời và được lưu trong bộ nhớ cache khác, chẳng hạn như cookie, nội dung và dữ liệu trang web.</translation>
+<translation id="1082398631555931481"><ph name="THIRD_PARTY_TOOL_NAME" /> muốn khôi phục cài đặt Chrome của bạn về mặc định ban đầu. Thao tác này sẽ đặt lại trang chủ, trang tab mới và công cụ tìm kiếm, vô hiệu hóa các tiện ích của bạn và bỏ ghim tất cả các tab. Hành động này cũng xóa dữ liệu tạm thời và được lưu trong bộ nhớ đệm khác, chẳng hạn như cookie, nội dung và dữ liệu trang web.</translation>
<translation id="1082725763867769612">Tệp ngoại tuyến</translation>
<translation id="1084824384139382525">S&amp;ao chép địa chỉ liên kết</translation>
<translation id="1089439967362294234">Thay đổi mật khẩu</translation>
@@ -124,7 +124,7 @@
<translation id="1178581264944972037">Tạm dừng</translation>
<translation id="1179803038870941185"><ph name="URL" /> muốn có quyền kiểm soát toàn bộ thiết bị MIDI của bạn.</translation>
<translation id="1181037720776840403">Xóa</translation>
-<translation id="1183237619868651138">Không thể cài đặt <ph name="EXTERNAL_CRX_FILE" /> trong bộ nhớ cache cục bộ.</translation>
+<translation id="1183237619868651138">Không thể cài đặt <ph name="EXTERNAL_CRX_FILE" /> trong bộ nhớ đệm cục bộ.</translation>
<translation id="1185924365081634987">Bạn cũng có thể thử <ph name="GUEST_SIGNIN_LINK_START" />duyệt với tư cách khách<ph name="GUEST_SIGNIN_LINK_END" /> để khắc phục lỗi mạng này.</translation>
<translation id="1186771945450942097">Xóa phần mềm độc hại</translation>
<translation id="1187722533808055681">Đánh thức khỏi chế độ rảnh</translation>
@@ -323,7 +323,7 @@
<translation id="1476607407192946488">&amp;Cài đặt ngôn ngữ</translation>
<translation id="1476949146811612304">Đặt công cụ tìm kiếm được sử dụng khi tìm kiếm từ
<ph name="BEGIN_LINK" />thanh địa chỉ<ph name="END_LINK" />.</translation>
-<translation id="1477301030751268706">Lưu bộ nhớ cache mã thông báo API nhận dạng</translation>
+<translation id="1477301030751268706">Lưu bộ nhớ đệm mã thông báo API nhận dạng</translation>
<translation id="1478233201128522094">Lần tới, một điện thoại mới sẽ mở khóa <ph name="DEVICE_TYPE" /> này. Hãy tắt Smart Lock trong Cài đặt.</translation>
<translation id="1478340334823509079">Chi tiết: <ph name="FILE_NAME" /></translation>
<translation id="1483493594462132177">Gửi</translation>
@@ -407,7 +407,7 @@
<translation id="1588870296199743671">Mở liên kết bằng...</translation>
<translation id="1589055389569595240">Hiển thị Chính tả và Ngữ pháp</translation>
<translation id="1593594475886691512">Đang định dạng...</translation>
-<translation id="159359590073980872">Bộ nhớ cache hình ảnh</translation>
+<translation id="159359590073980872">Bộ nhớ đệm hình ảnh</translation>
<translation id="1594233345027811150">{NUM_DOWNLOAD,plural, =1{Đang tải xuống}other{Đang tải xuống}}</translation>
<translation id="1598233202702788831">Quản trị viên của bạn đã tắt bản cập nhật.</translation>
<translation id="1600857548979126453">Truy cập chương trình phụ trợ trình gỡ lỗi trang</translation>
@@ -1280,7 +1280,7 @@ Tôi không cho rằng nên chặn trang web này!</translation>
<translation id="291886813706048071">Bạn có thể tìm kiếm từ đây bằng <ph name="SEARCH_ENGINE" /></translation>
<translation id="2921081876747860777">Vui lòng tạo mật khẩu để bảo vệ dữ liệu cục bộ của bạn.</translation>
<translation id="2925966894897775835">Bảng tính</translation>
-<translation id="2927017729816812676">Bộ nhớ cache</translation>
+<translation id="2927017729816812676">Bộ nhớ đệm</translation>
<translation id="2932330436172705843"><ph name="PROFILE_DISPLAY_NAME" /> (Tài khoản cho trẻ em)</translation>
<translation id="2932483646085333864">Đăng xuất sau đó đăng nhập lại để bắt đầu đồng bộ hóa</translation>
<translation id="2932883381142163287">Báo cáo lạm dụng</translation>
@@ -1321,7 +1321,7 @@ Tôi không cho rằng nên chặn trang web này!</translation>
<translation id="299483336428448530">Do phụ huynh của bạn cài đặt.</translation>
<translation id="3002017044809397427">Đã phát hiện thấy <ph name="PHONE_TYPE" /> của bạn. Nhưng Smart Lock chỉ hoạt động trên các thiết bị chạy Android 5.0 trở lên. &lt;a&gt;Tìm hiểu thêm&lt;/a&gt;</translation>
<translation id="3003144360685731741">Mạng ưa thích</translation>
-<translation id="3003623123441819449">Bộ nhớ cache CSS</translation>
+<translation id="3003623123441819449">Bộ nhớ đệm CSS</translation>
<translation id="3003633581067744647">Chuyển sang chế độ xem hình thu nhỏ</translation>
<translation id="3003967365858406397"><ph name="PHONE_NAME" /> của bạn sẽ tạo kết nối Wi-Fi riêng tư.</translation>
<translation id="3004391367407090544">Vui lòng quay lại sau</translation>
@@ -1347,7 +1347,7 @@ Tôi không cho rằng nên chặn trang web này!</translation>
<translation id="3021678814754966447">&amp;Xem Nguồn Khung</translation>
<translation id="3022978424994383087">Không hiểu được.</translation>
<translation id="3024374909719388945">Sử dụng đồng hồ 24 giờ</translation>
-<translation id="302781076327338683">Tải lại bộ nhớ cache bỏ qua</translation>
+<translation id="302781076327338683">Tải lại bộ nhớ đệm bỏ qua</translation>
<translation id="3030243755303701754">Người dùng được giám sát có thể khám phá web dưới sự hướng dẫn của bạn. Là người quản lý của người dùng được giám sát trong Chrome, bạn có thể:
 • cho phép hoặc cấm các trang web nhất định,
@@ -1404,7 +1404,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="3101709781009526431">Ngày và giờ</translation>
<translation id="3108967419958202225">Chọn...</translation>
<translation id="3115128645424181617">Không thể tìm thấy điện thoại của bạn. Hãy đảm bảo rằng điện thoại ở trong tầm tay và Bluetooth đang bật.</translation>
-<translation id="3115147772012638511">Đang chờ bộ nhớ cache…</translation>
+<translation id="3115147772012638511">Đang chờ bộ nhớ đệm…</translation>
<translation id="3118319026408854581">Trợ giúp <ph name="PRODUCT_NAME" /></translation>
<translation id="3120430004221004537">Mã hóa không đầy đủ đối với một tác vụ cụ thể trên: "<ph name="DEVICE_NAME" />".</translation>
<translation id="3121793941267913344">Đặt lại thiết bị <ph name="IDS_SHORT_PRODUCT_NAME" /> này</translation>
@@ -1432,7 +1432,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="3150927491400159470">Tải lại cứng</translation>
<translation id="315116470104423982">Dữ liệu di động</translation>
<translation id="3151539355209957474">Thời gian khởi động</translation>
-<translation id="3151562827395986343">Xóa lịch sử, cookie, bộ nhớ cache, v.v.</translation>
+<translation id="3151562827395986343">Xóa lịch sử, cookie, bộ nhớ đệm, v.v.</translation>
<translation id="3151786313568798007">Hướng</translation>
<translation id="3153177132960373163">Cho phép tất cả các trang web sử dụng plugin để truy cập vào máy tính của bạn</translation>
<translation id="3153862085237805241">Lưu thẻ</translation>
@@ -2382,7 +2382,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="469230890969474295">Thư mục OEM</translation>
<translation id="4692623383562244444">Công cụ tìm kiếm</translation>
<translation id="4697551882387947560">Khi phiên duyệt kết thúc</translation>
-<translation id="4699172675775169585">Tệp và hình ảnh được lưu trong bộ nhớ cache</translation>
+<translation id="4699172675775169585">Tệp và hình ảnh được lưu trong bộ nhớ đệm</translation>
<translation id="4699357559218762027">(tự động chạy)</translation>
<translation id="4707302005824653064">Người quản lý (<ph name="CUSTODIAN_EMAIL" />) có thể xem lại mức sử dụng và lịch sử trên chrome.com.</translation>
<translation id="4707579418881001319">L2TP/IPsec + chứng chỉ người dùng</translation>
@@ -2794,7 +2794,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="5331069282670671859">Bạn không có chứng chỉ nào thuộc loại này</translation>
<translation id="5331425616433531170">"<ph name="CHROME_EXTENSION_NAME" />" muốn ghép nối</translation>
<translation id="5332624210073556029">Múi giờ:</translation>
-<translation id="5334142896108694079">Bộ nhớ cache tập lệnh</translation>
+<translation id="5334142896108694079">Bộ nhớ đệm tập lệnh</translation>
<translation id="533433379391851622">Phiên bản mong muốn "<ph name="EXPECTED_VERSION" />", nhưng phiên bản là "<ph name="NEW_ID" />".</translation>
<translation id="5334844597069022743">Xem nguồn</translation>
<translation id="5335458522276292100">Đang sao lưu <ph name="FILE_COUNT" /> vào <ph name="BEGIN_LINK" />Google Drive<ph name="END_LINK" /></translation>
@@ -2955,7 +2955,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="55601339223879446">Điều chỉnh các ranh giới của màn hình trong vòng hiển thị</translation>
<translation id="5562781907504170924">Tab này được kết nối với thiết bị Bluetooth.</translation>
<translation id="5565871407246142825">Thẻ tín dụng</translation>
-<translation id="5567989639534621706">Bộ nhớ cache của ứng dụng</translation>
+<translation id="5567989639534621706">Bộ nhớ đệm của ứng dụng</translation>
<translation id="5568069709869097550">Không thể đăng nhập</translation>
<translation id="5568144734023334204">Bộ nhớ Android</translation>
<translation id="5569544776448152862">Đang đăng ký <ph name="BEGIN_BOLD" /><ph name="DOMAIN_NAME" /><ph name="END_BOLD" />...</translation>
@@ -3325,7 +3325,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="615436196126345398">Giao thức</translation>
<translation id="6154697846084421647">Hiện đã đăng nhập</translation>
<translation id="6156323911414505561">Hiển thị thanh dấu trang</translation>
-<translation id="6156863943908443225">Bộ nhớ cache tập lệnh</translation>
+<translation id="6156863943908443225">Bộ nhớ đệm tập lệnh</translation>
<translation id="6156960295318603523">Cài đặt ngôn ngữ</translation>
<translation id="6159608117266492208">&amp;Cài đặt trang web</translation>
<translation id="6160625263637492097">Cung cấp chứng chỉ để xác thực</translation>
@@ -4190,7 +4190,7 @@ Tạo người dùng được giám sát sẽ không tạo Tài khoản Google,
<translation id="7540972813190816353">Đã xảy ra lỗi khi kiểm tra cập nhật: <ph name="ERROR" /></translation>
<translation id="7543104066686362383">Bật tính năng gỡ lỗi trên thiết bị <ph name="IDS_SHORT_PRODUCT_NAME" /> này</translation>
<translation id="7544853251252956727">Phát ngẫu nhiên</translation>
-<translation id="7545415673537747415">Kiểm soát cách Google sử dụng lịch sử duyệt web của bạn để cá nhân hóa Tìm kiếm, quảng cáo và các dịch vụ khác của Google từ <ph name="BEGIN_LINK" />Kiểm soát hoạt động của Google<ph name="END_LINK" />.</translation>
+<translation id="7545415673537747415">Kiểm soát cách Google sử dụng lịch sử duyệt web của bạn để cá nhân hóa Tìm kiếm, quảng cáo và các dịch vụ khác của Google từ <ph name="BEGIN_LINK" />Kiểm soát hoạt động trên Google<ph name="END_LINK" />.</translation>
<translation id="7547317915858803630">Cảnh báo: cài đặt <ph name="PRODUCT_NAME" /> của bạn được lưu trữ trên ổ đĩa mạng. Điều này có thể dẫn đến giảm tốc độ, trục trặc hoặc thậm chí là mất dữ liệu.</translation>
<translation id="7548856833046333824">Nước chanh</translation>
<translation id="7550830279652415241">bookmarks_<ph name="DATESTAMP" />.html</translation>
@@ -4655,7 +4655,7 @@ Giữ tệp khóa của bạn ở nơi an toàn. Bạn sẽ cần tệp khóa đ
<translation id="8274332263553132018">Truyền tệp</translation>
<translation id="8274924778568117936">Không tắt hoặc đóng <ph name="DEVICE_TYPE" /> cho đến khi cập nhật xong. <ph name="DEVICE_TYPE" /> của bạn sẽ khởi động lại sau khi cài đặt xong.</translation>
<translation id="8275038454117074363">Nhập</translation>
-<translation id="8276560076771292512">Làm trống bộ nhớ cache và tải lại cứng</translation>
+<translation id="8276560076771292512">Làm trống bộ nhớ đệm và tải lại cứng</translation>
<translation id="8281886186245836920">Bỏ qua</translation>
<translation id="8282947398454257691">Biết số nhận dạng thiết bị duy nhất của bạn</translation>
<translation id="8283475148136688298">Mã xác thực bị từ chối trong khi kết nối với "<ph name="DEVICE_NAME" />".</translation>
@@ -4793,7 +4793,7 @@ Giữ tệp khóa của bạn ở nơi an toàn. Bạn sẽ cần tệp khóa đ
<translation id="8545107379349809705">Ẩn thông tin...</translation>
<translation id="8545575359873600875">Rất tiếc, không thể xác minh mật khẩu của bạn. Người quản lý của người dùng được giám sát này gần đây có thể đã thay đổi mật khẩu. Nếu vậy, mật khẩu mới sẽ được áp dụng vào lần tới khi bạn đăng nhập Hãy thử sử dụng mật khẩu cũ của bạn.</translation>
<translation id="8546186510985480118">Thiết bị sắp hết dung lượng</translation>
-<translation id="8546306075665861288">Bộ nhớ cache hình ảnh</translation>
+<translation id="8546306075665861288">Bộ nhớ đệm hình ảnh</translation>
<translation id="8546541260734613940">[*.]example.com</translation>
<translation id="854655314928502177">URL tự động phát hiện proxy web:</translation>
<translation id="8546930481464505581">Tùy chỉnh Thanh cảm ứng</translation>
@@ -4840,7 +4840,7 @@ Giữ tệp khóa của bạn ở nơi an toàn. Bạn sẽ cần tệp khóa đ
<translation id="862542460444371744">&amp;Tiện ích mở rộng</translation>
<translation id="8627151598708688654">Chọn nguồn</translation>
<translation id="862727964348362408">Bị tạm ngưng</translation>
-<translation id="862750493060684461">Bộ nhớ cache CSS</translation>
+<translation id="862750493060684461">Bộ nhớ đệm CSS</translation>
<translation id="8627795981664801467">Chỉ kết nối an toàn</translation>
<translation id="8628085465172583869">Tên máy chủ:</translation>
<translation id="8630903300770275248">Nhập người dùng được giám sát</translation>
@@ -5196,7 +5196,7 @@ Giữ tệp khóa của bạn ở nơi an toàn. Bạn sẽ cần tệp khóa đ
<translation id="9170848237812810038">H&amp;oàn tác</translation>
<translation id="9170884462774788842">Một chương trình khác trên máy tính của bạn đã thêm một chủ đề có thể thay đổi cách Chrome hoạt động.</translation>
<translation id="9173995187295789444">Đang quét tìm thiết bị Bluetooth...</translation>
-<translation id="9174212595744391062">Thao tác này sẽ xóa cookie và bộ nhớ cache cho tất cả các trang web, bao gồm</translation>
+<translation id="9174212595744391062">Thao tác này sẽ xóa cookie và bộ nhớ đệm cho tất cả các trang web, bao gồm</translation>
<translation id="9176611096776448349"><ph name="WINDOW_TITLE" /> - Đã kết nối thiết bị Bluetooth</translation>
<translation id="9177499212658576372">Bạn hiện kết nối với mạng <ph name="NETWORK_TYPE" />.</translation>
<translation id="9183836083779743117"><ph name="DOWNLOAD_RECEIVED" /> từ <ph name="DOWNLOAD_DOMAIN" />, <ph name="TIME_LEFT" /></translation>
@@ -5240,7 +5240,7 @@ Giữ tệp khóa của bạn ở nơi an toàn. Bạn sẽ cần tệp khóa đ
<translation id="960719561871045870">Mã của nhà mạng</translation>
<translation id="960987915827980018">Còn khoảng 1 giờ</translation>
<translation id="962802172452141067">Cây thư mục dấu trang</translation>
-<translation id="968174221497644223">Bộ nhớ cache của ứng dụng</translation>
+<translation id="968174221497644223">Bộ nhớ đệm của ứng dụng</translation>
<translation id="969096075394517431">Thay đổi ngôn ngữ</translation>
<translation id="970047733946999531">{NUM_TABS,plural, =1{1 tab}other{# tab}}</translation>
<translation id="971774202801778802">URL dấu trang</translation>
diff --git a/chromium/chrome/app/resources/generated_resources_zh-TW.xtb b/chromium/chrome/app/resources/generated_resources_zh-TW.xtb
index 306f2cc2cc1..eaa4877e54e 100644
--- a/chromium/chrome/app/resources/generated_resources_zh-TW.xtb
+++ b/chromium/chrome/app/resources/generated_resources_zh-TW.xtb
@@ -927,7 +927,7 @@
<translation id="2445081178310039857">請指定擴充功能根目錄。</translation>
<translation id="2448312741937722512">類型</translation>
<translation id="2450223707519584812">找不到 Google API 金鑰,因此您無法新增使用者。詳情請參閱 <ph name="DETAILS_URL" />。</translation>
-<translation id="2450849356604136918">沒有運作中的檢視</translation>
+<translation id="2450849356604136918">沒有運作中的檢視畫面</translation>
<translation id="2453021845418314664">進階同步處理設定</translation>
<translation id="2453576648990281505">檔案已存在</translation>
<translation id="2453860139492968684">結束</translation>
diff --git a/chromium/chrome/app/resources/google_chrome_strings_ca.xtb b/chromium/chrome/app/resources/google_chrome_strings_ca.xtb
index 5fd1704a77d..9bdba6c09c2 100644
--- a/chromium/chrome/app/resources/google_chrome_strings_ca.xtb
+++ b/chromium/chrome/app/resources/google_chrome_strings_ca.xtb
@@ -161,7 +161,7 @@ Per obtenir més instruccions, consulteu el correu electrònic a <ph name="ACCOU
<translation id="557283862590186398">Per visitar aquest lloc web, Chrome necessita permís per accedir al teu micròfon.</translation>
<translation id="565744775970812598">Chrome ha bloquejat <ph name="FILE_NAME" /> perquè pot ser perillós.</translation>
<translation id="573759479754913123">Sobre Chrome OS</translation>
-<translation id="5749068826913805084">Chrome necessita tenir accés a l'emmagatzematge per poder baixar fitxers.</translation>
+<translation id="5749068826913805084">Chrome necessita accedir a l'emmagatzematge per poder baixar fitxers.</translation>
<translation id="5774845247549698882">Chrome OS es mostra en aquest idioma</translation>
<translation id="5855036575689098185">El programari que s'executa al vostre ordinador no és compatible amb Google Chrome.</translation>
<translation id="5877064549588274448">El canal ha canviat. Reinicieu el dispositiu perquè s'apliquin els canvis.</translation>
@@ -188,7 +188,7 @@ Per obtenir més instruccions, consulteu el correu electrònic a <ph name="ACCOU
<translation id="6600954340915313787">Copiada de Chrome</translation>
<translation id="6634887557811630702">Google Chrome està actualitzat.</translation>
<translation id="6676384891291319759">Accedeix a Internet</translation>
-<translation id="6697947395630195233">Chrome necessita accés a la teva ubicació per compartir-la amb aquest lloc web.</translation>
+<translation id="6697947395630195233">Chrome necessita accedir a la teva ubicació per compartir-la amb aquest lloc web.</translation>
<translation id="683440813066116847">Regla d'entrada de Google Chrome Canary per permetre el trànsit de mDNS.</translation>
<translation id="686561893457936865">Emporta't Chrome on vagis</translation>
<translation id="6885412569789873916">Aplicacions de Chrome Beta</translation>
diff --git a/chromium/chrome/app/resources/google_chrome_strings_mr.xtb b/chromium/chrome/app/resources/google_chrome_strings_mr.xtb
index 2a7f8c6f2de..5960427d2fe 100644
--- a/chromium/chrome/app/resources/google_chrome_strings_mr.xtb
+++ b/chromium/chrome/app/resources/google_chrome_strings_mr.xtb
@@ -68,7 +68,7 @@
<translation id="2652691236519827073">लिंक नवीन Chrome &amp;टॅबमध्ये उघडा</translation>
<translation id="2664962310688259219">Chrome OS खुला स्त्रोत परवाने</translation>
<translation id="2665296953892887393">Google कडे क्रॅश अहवाल आणि <ph name="UMA_LINK" /> पाठवून Google Chrome ला</translation>
-<translation id="2689103672227170538">आपण Chrome प्रारंभ करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे या विस्ताराने बदलले आहे.</translation>
+<translation id="2689103672227170538">आपण Chrome सुरू करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे या विस्ताराने बदलले आहे.</translation>
<translation id="2705403826523567092">सर्व डिव्हाइसवर सिंक केलेला, पर्सनलाइझ केलेला ब्राउझिंग अनुभव मिळवण्यासाठी साइन इन करा</translation>
<translation id="2769762047821873045">Google Chrome आपला डीफॉल्ट ब्राउझर नाही.</translation>
<translation id="2770231113462710648">डीफॉल्ट ब्राउझर यावर बदला:</translation>
@@ -101,7 +101,7 @@
<translation id="3637702109597584617">Google Chrome OS <ph name="TERMS_OF_SERVICE_LINK" />सेवा अटी<ph name="END_TERMS_OF_SERVICE_LINK" /></translation>
<translation id="3716182511346448902">हे पेज खूपच जास्त मेमरी वापरत असल्यामुळे Chrome ने ते थांबवून ठेवलेले आहे.</translation>
<translation id="3718181793972440140">हे या डिव्‍हाइस मधून 1 आयटम हटवेल. नंतर आपला डेटा पुनर्प्राप्त करण्‍यासाठी, Chrome मध्ये <ph name="USER_EMAIL" /> म्हणून साइन इन करा.</translation>
-<translation id="3735758079232443276">आपण Chrome प्रारंभ करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे "<ph name="EXTENSION_NAME" />" विस्ताराने बदलले आहे.</translation>
+<translation id="3735758079232443276">आपण Chrome सुरू करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे "<ph name="EXTENSION_NAME" />" विस्ताराने बदलले आहे.</translation>
<translation id="3780814664026482060">Chrome - <ph name="PAGE_TITLE" /></translation>
<translation id="3784527566857328444">Chrome मधून काढा...</translation>
<translation id="386202838227397562">कृपया सर्व Google Chrome विंडो बंद करा आणि पुन्हा प्रयत्न करा.</translation>
@@ -138,7 +138,7 @@
<translation id="4804732725083176494">या डीव्हाइसच्या प्रशासकाने Chrome मध्ये साइन इन करणे बंद केले आहे.</translation>
<translation id="4891791193823137474">पार्श्वभूमीत Google Chrome चालू द्या</translation>
<translation id="4895437082222824641">लिंक नवीन Chrome &amp;टॅबमध्ये उघडा</translation>
-<translation id="4921569541910214635">एक संगणक सामायिक करायचा? आपल्याला आवडते त्या प्रकारे आपण आता Chrome सेट करू शकता.</translation>
+<translation id="4921569541910214635">एक कॉंप्युटर सामायिक करायचा? आपल्याला आवडते त्या प्रकारे आपण आता Chrome सेट करू शकता.</translation>
<translation id="4953650215774548573">आपला डीफॉल्ट ब्राउझर म्हणून Google Chrome सेट करा</translation>
<translation id="495931528404527476">Chrome मध्ये</translation>
<translation id="4965682129423310439">Chrome ला तुमच्या काँप्युटरवर धोकादायक सॉफ्टवेअर आढळले. Chrome ते काढून टाकून तुमचा ब्राउझर पुन्हा नीट चालावा यासाठी तुमच्या सेटिंग्ज रीस्टोअर करू शकते.</translation>
@@ -155,7 +155,7 @@
<translation id="5284703908158630707">{SECONDS,plural, =1{Google Chrome 1 सेकंदात रीस्टार्ट होईल.}one{Google Chrome # सेकंदात रीस्टार्ट होईल.}other{Google Chrome # सेकंदांंमध्ये रीस्टार्ट होईल.}}</translation>
<translation id="532046782124376502">चेतावणी: Google Chrome हे एक्स्टेंशनना तुमचा ब्राउझिंग इतिहास रेकॉर्ड करून ठेवण्यापासून रोखू शकत नाही. हे एक्स्टेंशन बंद करण्यासाठी गुप्त मोडमधील या पर्यायाची निवड रद्द करा.</translation>
<translation id="5334545119300433702">हे मॉड्यूल Google Chrome सह विरोध असण्यासाठी ज्ञात आहे.</translation>
-<translation id="5386244825306882791">आपण Chrome प्रारंभ करता किंवा ओम्निबॉक्समधून शोध घेता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
+<translation id="5386244825306882791">आपण Chrome सुरू करता किंवा ओम्निबॉक्समधून शोध घेता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
<translation id="5430073640787465221">आपली प्राधान्ये फाइल दूषित किंवा अवैध आहेत.
Google Chrome आपली सेटिंग्ज पुर्नप्राप्त करण्‍यात अक्षम आहे.</translation>
@@ -231,7 +231,7 @@ Google Chrome आपली सेटिंग्ज पुर्नप्रा
<translation id="7825851276765848807">अनिर्दिष्ट त्रुटीमुळे स्थापना अयशस्वी. कृपया Google Chrome पुन्हा डाउनलोड करा.</translation>
<translation id="7855730255114109580">Google Chrome अद्ययावत झाले आहे</translation>
<translation id="7888186132678118370">Chrome ला आपल्या टास्कबार वर पिन करा</translation>
-<translation id="7890208801193284374">आपण संगणक सामायिक केल्यास, मित्र आणि कुटुंब स्वतंत्रपणे ब्राउझ करू शकतात आणि त्यांना पाहिजे तसे Chrome सेट अप करू शकतात.</translation>
+<translation id="7890208801193284374">आपण कॉंप्युटर सामायिक केल्यास, मित्र आणि कुटुंब स्वतंत्रपणे ब्राउझ करू शकतात आणि त्यांना पाहिजे तसे Chrome सेट अप करू शकतात.</translation>
<translation id="7896673875602241923">कोणीतरी यापूर्वी <ph name="ACCOUNT_EMAIL_LAST" /> म्हणून या संंगणकावरील Chrome मध्ये साइन इन केले आहे. कृपया आपली माहिती स्वतंत्र ठेवण्यासाठी एक नवीन Chrome वापरकर्ता तयार करा.</translation>
<translation id="7908168227788431038">जवळजवळ अद्ययावत पूर्ण झाले! अपडेट समाप्त करण्यासाठी Google Chrome रीलाँच करा.</translation>
<translation id="795025003224538582">पुन्हा एकदा सुरु करु नका</translation>
@@ -260,12 +260,12 @@ Google Chrome आपली सेटिंग्ज पुर्नप्रा
<translation id="8614913330719544658">Google Chrome प्रतिसाद देत नाही. त्वरित पुन्हा लाँच करायचा?</translation>
<translation id="8667808506758191620">आपले <ph name="DEVICE_TYPE" /> अद्ययावत आहे.</translation>
<translation id="8669527147644353129">Google Chrome मदतनीस</translation>
-<translation id="8679801911857917785">आपण Chrome प्रारंभ करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
+<translation id="8679801911857917785">आपण Chrome सुरू करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
<translation id="870251953148363156">&amp;Google Chrome अपडेट करा</translation>
<translation id="873133009373065397">Google Chrome डीफॉल्ट ब्राउझर निर्धारित करू शकत नाही किंवा सेट करू शकत नाही</translation>
<translation id="8796108026289707191">आपण आता Google Chrome रीस्टार्ट करावे.</translation>
<translation id="8823341990149967727">Chrome कालबाह्य आहे</translation>
-<translation id="884296878221830158">आपण Chrome प्रारंभ करता किंवा होम बटण क्लिक करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
+<translation id="884296878221830158">आपण Chrome सुरू करता किंवा होम बटण क्लिक करता तेव्हा कोणते पृष्ठ दर्शविले जाते हे देखील हे नियंत्रित करते.</translation>
<translation id="8862326446509486874">आपल्‍याकडे सिस्टम-स्तर स्थापनेसाठी उचित अधिकार नाहीत. प्रशासक म्हणून पुन्हा इन्स्टॉलर चालविण्याचा प्रयत्न करा.</translation>
<translation id="8914504000324227558">Chrome रीलाँच करा</translation>
<translation id="9026991721384951619">आपले खाते साइन इन तपशील कालबाह्य झाल्यामुळे Chrome OS आपला डेटा संकालित करू शकले नाही.</translation>
diff --git a/chromium/chrome/app/resources/google_chrome_strings_tr.xtb b/chromium/chrome/app/resources/google_chrome_strings_tr.xtb
index fa1470b6d57..e5fa80029e1 100644
--- a/chromium/chrome/app/resources/google_chrome_strings_tr.xtb
+++ b/chromium/chrome/app/resources/google_chrome_strings_tr.xtb
@@ -24,7 +24,7 @@
<translation id="1587325591171447154"><ph name="FILE_NAME" /> tehlikeli olduğu için Chrome tarafından engellendi.</translation>
<translation id="1619887657840448962">Chrome'u daha güvenli bir hale getirmek için <ph name="IDS_EXTENSION_WEB_STORE_TITLE" /> altında listelenmeyen ve bilginiz dışında eklenmiş olabilecek aşağıdaki uzantıyı devre dışı bıraktık.</translation>
<translation id="1628000112320670027">Chrome'la ilgili yardım alın</translation>
-<translation id="163860049029591106">Chrome OS'yi Kullanmaya Başlayın</translation>
+<translation id="163860049029591106">Chrome OS'i Kullanmaya Başlayın</translation>
<translation id="1653828314016431939">Tamam - Şimdi yeniden başlat</translation>
<translation id="1674870198290878346">Bağlantıyı Chrome &amp;Gizli Penceresinde Aç</translation>
<translation id="1682634494516646069">Google Chrome, veri dizini üzerinde okuma ve yazma işlemi yapamıyor: <ph name="USER_DATA_DIRECTORY" /></translation>
@@ -32,7 +32,7 @@
<translation id="1718131156967340976"><ph name="SMALL_PRODUCT_LOGO" /> <ph name="BEGIN_BOLD" />Google Chrome<ph name="END_BOLD" />'u seçin</translation>
<translation id="174539241580958092">Oturum açmadaki bir hata nedeniyle Google Chrome, verilerinizi senkronize edemedi.</translation>
<translation id="1759842336958782510">Chrome</translation>
-<translation id="1773601347087397504">Chrome OS'u kullanma konusunda yardım alın</translation>
+<translation id="1773601347087397504">Chrome OS'i kullanma konusunda yardım alın</translation>
<translation id="1795405610103747296">Chrome'u telefonunuza yükleyin. Telefonunuza SMS göndereceğiz: <ph name="PHONE_NUMBER" /></translation>
<translation id="1874309113135274312">Google Chrome Beta (mDNS-In)</translation>
<translation id="1877026089748256423">Chrome sürümü eski</translation>
@@ -177,7 +177,7 @@ Bazı özellikler kullanılamayabilir. Lütfen farklı bir profil dizini belirti
<translation id="6070348360322141662">Google Chrome ek güvenlik sağlamak için verilerinizi şifreler</translation>
<translation id="6113794647360055231">Chrome daha da iyi bir hale geldi</translation>
<translation id="6169866489629082767"><ph name="PAGE_TITLE" /> - Google Chrome</translation>
-<translation id="61852838583753520">&amp;Chrome OS'u güncelle</translation>
+<translation id="61852838583753520">&amp;Chrome OS'i güncelle</translation>
<translation id="6235018212288296708">Google Chrome'un mDNS trafiğine izin vermeyi sağlayan gelen trafik kuralı.</translation>
<translation id="6291089322031436445">Chrome Dev Uygulamaları</translation>
<translation id="6291549208091401781">Google Chrome zaten bilgisayarınızdaki tüm kullanıcılar için yüklendi.</translation>
diff --git a/chromium/chrome/browser/printing/pdf_to_emf_converter.cc b/chromium/chrome/browser/printing/pdf_to_emf_converter.cc
index b2e4d2bbd79..358341995d0 100644
--- a/chromium/chrome/browser/printing/pdf_to_emf_converter.cc
+++ b/chromium/chrome/browser/printing/pdf_to_emf_converter.cc
@@ -212,6 +212,14 @@ class PdfConverterImpl : public PdfConverter {
StartCallback start_callback);
~PdfConverterImpl() override;
+ static void set_fail_when_creating_temp_file_for_tests(bool fail) {
+ simulate_failure_creating_temp_file_ = fail;
+ }
+
+ static bool fail_when_creating_temp_file_for_tests() {
+ return simulate_failure_creating_temp_file_;
+ }
+
private:
class GetPageCallbackData {
public:
@@ -287,9 +295,14 @@ class PdfConverterImpl : public PdfConverter {
base::WeakPtrFactory<PdfConverterImpl> weak_ptr_factory_;
+ static bool simulate_failure_creating_temp_file_;
+
DISALLOW_COPY_AND_ASSIGN(PdfConverterImpl);
};
+// static
+bool PdfConverterImpl::simulate_failure_creating_temp_file_ = false;
+
std::unique_ptr<MetafilePlayer> PdfConverterImpl::GetFileFromTemp(
ScopedTempFile temp_file) {
if (settings_.mode == PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2 ||
@@ -302,6 +315,9 @@ std::unique_ptr<MetafilePlayer> PdfConverterImpl::GetFileFromTemp(
}
ScopedTempFile CreateTempFile(scoped_refptr<RefCountedTempDir>* temp_dir) {
+ if (PdfConverterImpl::fail_when_creating_temp_file_for_tests())
+ return ScopedTempFile();
+
if (!temp_dir->get())
*temp_dir = base::MakeRefCounted<RefCountedTempDir>();
ScopedTempFile file;
@@ -540,7 +556,7 @@ void PdfConverterImpl::OnFailed(const std::string& error_message) {
LOG(ERROR) << "Failed to convert PDF: " << error_message;
base::WeakPtr<PdfConverterImpl> weak_this = weak_ptr_factory_.GetWeakPtr();
if (!start_callback_.is_null()) {
- OnPageCount(mojom::PdfToEmfConverterPtr(), 0);
+ std::move(start_callback_).Run(/*page_count=*/0);
if (!weak_this)
return; // Protect against the |start_callback_| deleting |this|.
}
@@ -570,4 +586,14 @@ std::unique_ptr<PdfConverter> PdfConverter::StartPdfConverter(
std::move(start_callback));
}
+ScopedSimulateFailureCreatingTempFileForTests::
+ ScopedSimulateFailureCreatingTempFileForTests() {
+ PdfConverterImpl::set_fail_when_creating_temp_file_for_tests(true);
+}
+
+ScopedSimulateFailureCreatingTempFileForTests::
+ ~ScopedSimulateFailureCreatingTempFileForTests() {
+ PdfConverterImpl::set_fail_when_creating_temp_file_for_tests(false);
+}
+
} // namespace printing
diff --git a/chromium/chrome/browser/printing/pdf_to_emf_converter.h b/chromium/chrome/browser/printing/pdf_to_emf_converter.h
index 1263c44001a..5aa61f7a2b0 100644
--- a/chromium/chrome/browser/printing/pdf_to_emf_converter.h
+++ b/chromium/chrome/browser/printing/pdf_to_emf_converter.h
@@ -38,6 +38,16 @@ class PdfConverter {
virtual void GetPage(int page_number,
const GetPageCallback& get_page_callback) = 0;
};
+
+// Object used by tests to exercise the temporary file creation failure code
+// path. As long as this object is alive, the PdfConverter will fail when
+// creating temporary files.
+class ScopedSimulateFailureCreatingTempFileForTests {
+ public:
+ ScopedSimulateFailureCreatingTempFileForTests();
+ ~ScopedSimulateFailureCreatingTempFileForTests();
+};
+
} // namespace printing
#endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
diff --git a/chromium/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc b/chromium/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc
index bcd515a4e01..c0ab2f79d47 100644
--- a/chromium/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc
+++ b/chromium/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc
@@ -79,7 +79,19 @@ void CompareEMFHeaders(const ENHMETAHEADER& expected_header,
} // namespace
-IN_PROC_BROWSER_TEST_F(PDFToEMFConverterBrowserTest, TestFailure) {
+IN_PROC_BROWSER_TEST_F(PDFToEMFConverterBrowserTest, TestFailureNoTempFile) {
+ ScopedSimulateFailureCreatingTempFileForTests fail_creating_temp_file;
+
+ base::RunLoop run_loop;
+ int page_count = -1;
+ std::unique_ptr<PdfConverter> pdf_converter = PdfConverter::StartPdfConverter(
+ base::MakeRefCounted<base::RefCountedStaticMemory>(), PdfRenderSettings(),
+ base::Bind(&StartCallbackImpl, run_loop.QuitClosure(), &page_count));
+ run_loop.Run();
+ EXPECT_EQ(0, page_count);
+}
+
+IN_PROC_BROWSER_TEST_F(PDFToEMFConverterBrowserTest, TestFailureBadPdf) {
scoped_refptr<base::RefCountedStaticMemory> bad_pdf_data =
base::MakeRefCounted<base::RefCountedStaticMemory>("0123456789", 10);
diff --git a/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json b/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json
index 3478c1cc9d3..456a43640de 100644
--- a/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json
+++ b/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json
@@ -22,7 +22,8 @@
"directory"
]
},
- "notifications"
+ "notifications",
+ "storage"
],
"file_system_provider_capabilities": {
"multipleMounts": true,
diff --git a/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json b/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json
index 99b6cf673f3..9d4b50b6b41 100644
--- a/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json
+++ b/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json
@@ -1,5 +1,5 @@
{
- "x-version": 26,
+ "x-version": 28,
"google-talk": {
"mime_types": [
],
@@ -80,9 +80,9 @@
],
"versions": [
{
- "version": "27.0.0.187",
+ "version": "28.0.0.161",
"status": "up_to_date",
- "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-33.html"
+ "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-03.html"
}
],
"lang": "en-US",
diff --git a/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json b/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json
index a85342825f9..5a7f063708f 100644
--- a/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json
+++ b/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json
@@ -1,5 +1,5 @@
{
- "x-version": 32,
+ "x-version": 34,
"google-talk": {
"mime_types": [
],
@@ -115,9 +115,9 @@
],
"versions": [
{
- "version": "27.0.0.187",
+ "version": "28.0.0.161",
"status": "requires_authorization",
- "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-33.html"
+ "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-03.html"
}
],
"lang": "en-US",
diff --git a/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json b/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json
index c5b325b08c2..4d356b256f0 100644
--- a/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json
+++ b/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json
@@ -1,5 +1,5 @@
{
- "x-version": 41,
+ "x-version": 43,
"google-talk": {
"mime_types": [
],
@@ -137,9 +137,9 @@
],
"versions": [
{
- "version": "27.0.0.187",
+ "version": "28.0.0.161",
"status": "requires_authorization",
- "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-33.html"
+ "reference": "https://helpx.adobe.com/security/products/flash-player/apsb18-03.html"
}
],
"lang": "en-US",
diff --git a/chromium/chrome/browser/resources/print_preview/print_preview.js b/chromium/chrome/browser/resources/print_preview/print_preview.js
index 0a8f1d34329..918f2ad7db4 100644
--- a/chromium/chrome/browser/resources/print_preview/print_preview.js
+++ b/chromium/chrome/browser/resources/print_preview/print_preview.js
@@ -566,7 +566,8 @@ cr.define('print_preview', function() {
}
const destination = assert(this.destinationStore_.selectedDestination);
const whenPrintDone = this.sendPrintRequest_(destination);
- if (destination.isLocal) {
+ if (destination.isLocal ||
+ this.uiState_ == PrintPreviewUiState_.OPENING_PDF_PREVIEW) {
const onError = destination.id ==
print_preview.Destination.GooglePromotedId.SAVE_AS_PDF ?
this.onFileSelectionCancel_.bind(this) :
diff --git a/chromium/chrome/browser/resources/settings/about_page/about_page.html b/chromium/chrome/browser/resources/settings/about_page/about_page.html
index 42a110c6acf..4f2f097bbe7 100644
--- a/chromium/chrome/browser/resources/settings/about_page/about_page.html
+++ b/chromium/chrome/browser/resources/settings/about_page/about_page.html
@@ -96,12 +96,22 @@
</div>
<div class="settings-box two-line">
<!-- TODO(dpapad): Investigate why vulcanize does not handle well
- a new line after "getIconSrc_(", causes incorrect src URL -->
+ a new line after "getThrobberSrcIfUpdating_(", causes incorrect
+ src URL -->
+ <!-- Set the icon from the iconset (when it's obsolete/EOL and
+ when update is done) or set the src (when it's updating). -->
<iron-icon
- hidden="[[!showUpdateStatus_]]"
- icon$="[[getIcon_(
+ hidden="[[!shouldShowIcons_(showUpdateStatus_)]]"
+<if expr="not chromeos">
+ icon$="[[getUpdateStatusIcon_(
obsoleteSystemInfo_, currentUpdateStatusEvent_)]]"
- src="[[getIconSrc_(obsoleteSystemInfo_, currentUpdateStatusEvent_)]]">
+ src="[[getThrobberSrcIfUpdating_(obsoleteSystemInfo_, currentUpdateStatusEvent_)]]">
+</if>
+<if expr="chromeos">
+ icon$="[[getUpdateStatusIcon_(
+ hasEndOfLife_, currentUpdateStatusEvent_)]]"
+ src="[[getThrobberSrcIfUpdating_(hasEndOfLife_, currentUpdateStatusEvent_)]]">
+</if>
</iron-icon>
<div class="start padded">
<div id="updateStatusMessage" hidden="[[!showUpdateStatus_]]">
@@ -121,6 +131,7 @@
$i18n{learnMore}
</a>
</div>
+<if expr="not chromeos">
<span id="deprecationWarning"
hidden="[[!obsoleteSystemInfo_.obsolete]]">
$i18n{aboutObsoleteSystem}
@@ -128,6 +139,15 @@
$i18n{learnMore}
</a>
</span>
+</if>
+<if expr="chromeos">
+ <div id="endOfLifeMessageContainer" hidden="[[!hasEndOfLife_]]">
+ $i18n{endOfLifeMessage}
+ <a href="$i18n{endOfLifeLearnMoreURL}" target="_blank">
+ $i18n{learnMore}
+ </a>
+ </div>
+</if>
<div class="secondary">$i18n{aboutBrowserVersion}</div>
</div>
<div class="separator" hidden="[[!showButtonContainer_]]"></div>
diff --git a/chromium/chrome/browser/resources/settings/about_page/about_page.js b/chromium/chrome/browser/resources/settings/about_page/about_page.js
index beecac15534..d2dbea9b66e 100644
--- a/chromium/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chromium/chrome/browser/resources/settings/about_page/about_page.js
@@ -34,6 +34,9 @@ Polymer({
/** @private {?RegulatoryInfo} */
regulatoryInfo_: Object,
+
+ /** @private */
+ hasEndOfLife_: Boolean,
// </if>
// <if expr="_google_chrome and is_macosx">
@@ -41,6 +44,7 @@ Polymer({
promoteUpdaterStatus_: Object,
// </if>
+ // <if expr="not chromeos">
/** @private {!{obsolete: boolean, endOfLine: boolean}} */
obsoleteSystemInfo_: {
type: Object,
@@ -51,6 +55,7 @@ Polymer({
};
},
},
+ // </if>
/** @private */
showUpdateStatus_: Boolean,
@@ -73,7 +78,7 @@ Polymer({
showCheckUpdates_: {
type: Boolean,
computed: 'computeShowCheckUpdates_(' +
- 'currentUpdateStatusEvent_, hasCheckedForUpdates_)',
+ 'currentUpdateStatusEvent_, hasCheckedForUpdates_, hasEndOfLife_)',
},
/** @private {!Map<string, string>} */
@@ -117,7 +122,7 @@ Polymer({
// <if expr="chromeos">
'updateShowUpdateStatus_(' +
- 'obsoleteSystemInfo_, currentUpdateStatusEvent_,' +
+ 'hasEndOfLife_, currentUpdateStatusEvent_,' +
'hasCheckedForUpdates_)',
'updateShowRelaunch_(currentUpdateStatusEvent_, targetChannel_,' +
'currentChannel_)',
@@ -155,6 +160,10 @@ Polymer({
this.aboutBrowserProxy_.getRegulatoryInfo().then(info => {
this.regulatoryInfo_ = info;
});
+
+ this.aboutBrowserProxy_.getHasEndOfLife().then(result => {
+ this.hasEndOfLife_ = result;
+ });
// </if>
// <if expr="not chromeos">
this.startListening_();
@@ -250,10 +259,22 @@ Polymer({
this.showUpdateStatus_ = false;
return;
}
+
+ // Do not show "updated" status if the device is end of life.
+ if (this.hasEndOfLife_) {
+ this.showUpdateStatus_ = false;
+ return;
+ }
+ // </if>
+
+ // <if expr="not chromeos">
+ if (this.obsoleteSystemInfo_.endOfLine) {
+ this.showUpdateStatus_ = false;
+ return;
+ }
// </if>
this.showUpdateStatus_ =
- this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED &&
- !this.obsoleteSystemInfo_.endOfLine;
+ this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED;
},
/**
@@ -353,11 +374,21 @@ Polymer({
* @return {?string}
* @private
*/
- getIcon_: function() {
+ getUpdateStatusIcon_: function() {
+ // <if expr="chromeos">
+ // If Chrome OS has reached end of life, display a special icon and
+ // ignore UpdateStatus.
+ if (this.hasEndOfLife_) {
+ return 'settings:end-of-life';
+ }
+ // </if>
+
+ // <if expr="not chromeos">
// If this platform has reached the end of the line, display an error icon
// and ignore UpdateStatus.
if (this.obsoleteSystemInfo_.endOfLine)
return 'settings:error';
+ // </if>
switch (this.currentUpdateStatusEvent_.status) {
case UpdateStatus.DISABLED_BY_ADMIN:
@@ -376,9 +407,17 @@ Polymer({
* @return {?string}
* @private
*/
- getIconSrc_: function() {
+ getThrobberSrcIfUpdating_: function() {
+ // <if expr="chromeos">
+ if (this.hasEndOfLife_) {
+ return null;
+ }
+ // </if>
+
+ // <if expr="not chromeos">
if (this.obsoleteSystemInfo_.endOfLine)
return null;
+ // </if>
switch (this.currentUpdateStatusEvent_.status) {
case UpdateStatus.CHECKING:
@@ -440,6 +479,11 @@ Polymer({
* @private
*/
computeShowCheckUpdates_: function() {
+ // Disable update button if the device is end of life.
+ if (this.hasEndOfLife_) {
+ return false;
+ }
+
// Enable the update button if we are in a stale 'updated' status or
// update has failed. Disable it otherwise.
const staleUpdatedStatus =
@@ -501,4 +545,20 @@ Polymer({
this.aboutBrowserProxy_.openFeedbackDialog();
},
// </if>
+
+ /**
+ * @return {boolean}
+ * @private
+ */
+ shouldShowIcons_: function() {
+ // <if expr="chromeos">
+ if (this.hasEndOfLife_)
+ return true;
+ // </if>
+ // <if expr="not chromeos">
+ if (this.obsoleteSystemInfo_.endOfLine)
+ return true;
+ // </if>
+ return this.showUpdateStatus_;
+ },
});
diff --git a/chromium/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js b/chromium/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
index 78a656563a1..c074d7e2c16 100644
--- a/chromium/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
+++ b/chromium/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
@@ -198,6 +198,13 @@ cr.define('settings', function() {
getRegulatoryInfo() {}
/**
+ * Checks if the device has reached end-of-life status and will no longer
+ * receive updates.
+ * @return {!Promise<boolean>}
+ */
+ getHasEndOfLife() {}
+
+ /**
* Request TPM firmware update status from the browser. It results in one or
* more 'tpm-firmware-update-status-changed' WebUI events.
*/
@@ -279,6 +286,11 @@ cr.define('settings', function() {
}
/** @override */
+ getHasEndOfLife() {
+ return cr.sendWithPromise('getHasEndOfLife');
+ }
+
+ /** @override */
refreshTPMFirmwareUpdateStatus() {
chrome.send('refreshTPMFirmwareUpdateStatus');
}
diff --git a/chromium/chrome/browser/resources/settings/icons.html b/chromium/chrome/browser/resources/settings/icons.html
index 5c035d852d8..c15dd7ba4a7 100644
--- a/chromium/chrome/browser/resources/settings/icons.html
+++ b/chromium/chrome/browser/resources/settings/icons.html
@@ -126,6 +126,7 @@ List icons here rather than importing large sets of (e.g. Polymer) icons.
<g id="volume-up"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"></path></g>
<if expr="chromeos">
<g id="warning"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g>
+ <g id="end-of-life"><path d="M4.574 2.916H4.55l.01.01.014-.01zM2.5 4.968v.023a.18.18 0 0 1 .01-.013l-.01-.01zm14.585 10.49v-.024l-.01.013.01.01zm.223 1.817l-.933-.95-4.106-4.11L8.026 7.99 3.675 3.635l-.942-.941-.712-.713L1 3.002l1.733 1.733A9.056 9.056 0 0 0 1.05 9.98c0 1.95.628 3.748 1.683 5.22.574.8 1.274 1.501 2.074 2.075a8.918 8.918 0 0 0 5.218 1.684 8.918 8.918 0 0 0 5.218-1.684L16.991 19l1.02-1.021-.703-.704zM15.243 2.684A8.922 8.922 0 0 0 10.025 1a8.922 8.922 0 0 0-5.218 1.684c-.005.003 4.135 4.16 4.135 4.16l1.083-1.814L15.042 11h-1.846l4.11 4.214a8.939 8.939 0 0 0 .011-10.456 9.021 9.021 0 0 0-2.074-2.074zM12 15H7.012v-3.989L4.5 11l2.227-1.876L12 14.6v.4z" fill="#DB4437" fill-rule="evenodd"></path></g>
</if>
<if expr="not chromeos">
<g id="web"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"></path></g>
diff --git a/chromium/chrome/browser/resources/settings/internet_page/compiled_resources2.gyp b/chromium/chrome/browser/resources/settings/internet_page/compiled_resources2.gyp
index 7ffb7c767f7..cec4fe353b2 100644
--- a/chromium/chrome/browser/resources/settings/internet_page/compiled_resources2.gyp
+++ b/chromium/chrome/browser/resources/settings/internet_page/compiled_resources2.gyp
@@ -37,6 +37,7 @@
'<(DEPTH)/ui/webui/resources/cr_elements/cr_dialog/compiled_resources2.gyp:cr_dialog',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
'<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:util',
'<(EXTERNS_GYP):networking_private',
'<(INTERFACES_GYP):networking_private_interface',
],
diff --git a/chromium/chrome/browser/resources/settings/internet_page/internet_config.html b/chromium/chrome/browser/resources/settings/internet_page/internet_config.html
index 22a7b87c97c..4fa0a79d5e8 100644
--- a/chromium/chrome/browser/resources/settings/internet_page/internet_config.html
+++ b/chromium/chrome/browser/resources/settings/internet_page/internet_config.html
@@ -14,6 +14,11 @@
dialog {
width: 460px;
}
+
+ .error {
+ color: red;
+ font-weight: 500;
+ }
</style>
<dialog is="cr-dialog" id="dialog" close-text="$i18n{close}">
@@ -26,11 +31,15 @@
enable-connect="{{enableConnect_}}" enable-save="{{enableSave_}}"
share-allow-enable="[[shareAllowEnable_]]"
share-default="[[shareDefault_]]"
+ error="{{error_}}"
on-close="close">
</network-config>
</div>
- <div slot="button-container">
+ <div class="layout horizontal center" slot="button-container">
+ <template is="dom-if" if="[[error_]]" restamp>
+ <div class="flex error">[[getError_(error_)]]</div>
+ </template>
<paper-button class="cancel-button" on-tap="onCancelTap_">
$i18n{cancel}
</paper-button>
diff --git a/chromium/chrome/browser/resources/settings/internet_page/internet_config.js b/chromium/chrome/browser/resources/settings/internet_page/internet_config.js
index b77d68088b9..b6bda81171f 100644
--- a/chromium/chrome/browser/resources/settings/internet_page/internet_config.js
+++ b/chromium/chrome/browser/resources/settings/internet_page/internet_config.js
@@ -69,6 +69,15 @@ Polymer({
* @private {!chrome.networkingPrivate.NetworkProperties}
*/
networkProperties_: Object,
+
+ /**
+ * Set by network-config when a configuration error occurs.
+ * @private
+ */
+ error_: {
+ type: String,
+ value: '',
+ },
},
open: function() {
@@ -100,12 +109,22 @@ Polymer({
getDialogTitle_: function() {
const name = this.networkProperties_.Name;
if (name)
- return this.i18n('internetConfigName', name);
+ return this.i18n('internetConfigName', HTMLEscape(name));
const type = this.i18n('OncType' + this.networkProperties_.Type);
return this.i18n('internetJoinType', type);
},
/**
+ * @return {string}
+ * @private
+ */
+ getError_: function() {
+ if (this.i18nExists(this.error_))
+ return this.i18n(this.error_);
+ return this.i18n('networkErrorUnknown');
+ },
+
+ /**
* @return {boolean}
* @private
*/
diff --git a/chromium/chrome/browser/resources/settings/internet_page/internet_page.js b/chromium/chrome/browser/resources/settings/internet_page/internet_page.js
index b834ac31498..3b8126607c7 100644
--- a/chromium/chrome/browser/resources/settings/internet_page/internet_page.js
+++ b/chromium/chrome/browser/resources/settings/internet_page/internet_page.js
@@ -283,6 +283,10 @@ Polymer({
* @private
*/
showConfig_: function(type, guid, name) {
+ if (!loadTimeData.getBoolean('networkSettingsConfig')) {
+ chrome.send('configureNetwork', [guid]);
+ return;
+ }
const configDialog =
/** @type {!InternetConfigElement} */ (this.$.configDialog);
configDialog.type =
diff --git a/chromium/chrome/browser/resources/settings/internet_page/tether_connection_dialog.js b/chromium/chrome/browser/resources/settings/internet_page/tether_connection_dialog.js
index 00a9bc025b7..a6bc7f9fef8 100644
--- a/chromium/chrome/browser/resources/settings/internet_page/tether_connection_dialog.js
+++ b/chromium/chrome/browser/resources/settings/internet_page/tether_connection_dialog.js
@@ -138,7 +138,8 @@ Polymer({
*/
getExplanation_: function(networkProperties) {
return this.i18n(
- 'tetherConnectionExplanation', CrOnc.getNetworkName(networkProperties));
+ 'tetherConnectionExplanation',
+ CrOnc.getEscapedNetworkName(networkProperties));
},
/**
@@ -149,7 +150,7 @@ Polymer({
getDescriptionTitle_: function(networkProperties) {
return this.i18n(
'tetherConnectionDescriptionTitle',
- CrOnc.getNetworkName(networkProperties));
+ CrOnc.getEscapedNetworkName(networkProperties));
},
/**
diff --git a/chromium/chrome/browser/resources/welcome/welcome_win10.html b/chromium/chrome/browser/resources/welcome/welcome_win10.html
index a7003874889..84b8c28c5a0 100644
--- a/chromium/chrome/browser/resources/welcome/welcome_win10.html
+++ b/chromium/chrome/browser/resources/welcome/welcome_win10.html
@@ -8,9 +8,12 @@
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/html/cr.html">
+ <link rel="import" href="chrome://resources/html/load_time_data.html">
+ <link rel="import" href="chrome://resources/html/util.html">
+
<link rel="import" href="chrome://resources/html/action_link.html">
<link rel="import" href="chrome://resources/html/action_link_css.html">
- <link rel="import" href="chrome://resources/html/util.html">
+
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
@@ -18,6 +21,8 @@
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css">
<link rel="stylesheet" href="/welcome_win10.css">
+ <script src="strings.js"></script>
+
<dom-module id="welcome-win10">
<template>
<style include="action-link">
@@ -31,6 +36,10 @@
transition: opacity 300ms;
}
+ :host(.accelerated) {
+ --expandable-section-height: 26.375em;
+ }
+
a {
color: var(--google-blue-500);
text-decoration: none;
@@ -274,7 +283,7 @@
}
</style>
<div class="header-logo" role="presentation"></div>
- <div class="heading">$i18n{headerText}</div>
+ <div class="heading" role="heading" aria-level="1">$i18n{headerText}</div>
<div class="sections">
<div class$="[[computeClasses(isCombined)]]">
<template is="dom-if" if="[[isCombined]]">
diff --git a/chromium/chrome/browser/resources/welcome/welcome_win10.js b/chromium/chrome/browser/resources/welcome/welcome_win10.js
index a961634a306..91a5bacbc42 100644
--- a/chromium/chrome/browser/resources/welcome/welcome_win10.js
+++ b/chromium/chrome/browser/resources/welcome/welcome_win10.js
@@ -31,18 +31,15 @@ Polymer({
ready: function() {
this.isCombined = false;
- this.isAccelerated = false;
+ this.isAccelerated = loadTimeData.getBoolean('accelerated_flow_enabled');
+ // The accelerated flow can be overridden with a query parameter.
const FLOWTYPE_KEY = 'flowtype';
const FLOW_TYPE_MAP = {'regular': false, 'accelerated': true};
var params = new URLSearchParams(location.search);
if (params.has(FLOWTYPE_KEY)) {
if (params.get(FLOWTYPE_KEY) in FLOW_TYPE_MAP) {
this.isAccelerated = FLOW_TYPE_MAP[params.get(FLOWTYPE_KEY)];
-
- // Adjust the height since the accelerated flow contains fewer steps.
- this.customStyle['--expandable-section-height'] = '26.375em';
- this.updateStyles();
} else {
console.log(
'Found invalid value for the \'flowtype\' parameter: %s',
@@ -50,6 +47,10 @@ Polymer({
}
}
+ // The accelerated flow contains fewer steps. To account for this, toggle
+ // the 'accelerated' class which reduces the height of the steps section.
+ this.classList.toggle('accelerated', this.isAccelerated);
+
// Asynchronously check if Chrome is pinned to the taskbar.
cr.sendWithPromise('getPinnedToTaskbarState')
.then(this.receivePinnedState_.bind(this));
diff --git a/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc b/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
index 82e6fe19c33..df9f8651a17 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/chromeos/tpm_firmware_update.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/ui/ash/ash_util.h"
+#include "chrome/browser/ui/ash/tablet_mode_client.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
#include "chrome/common/channel_info.h"
@@ -97,9 +98,14 @@ CoreOobeHandler::CoreOobeHandler(OobeUI* oobe_ui,
} else {
NOTIMPLEMENTED();
}
+
+ TabletModeClient* tablet_mode_client = TabletModeClient::Get();
+ tablet_mode_client->AddObserver(this);
}
-CoreOobeHandler::~CoreOobeHandler() {}
+CoreOobeHandler::~CoreOobeHandler() {
+ TabletModeClient::Get()->RemoveObserver(this);
+}
void CoreOobeHandler::DeclareLocalizedValues(
::login::LocalizedValuesBuilder* builder) {
@@ -152,6 +158,11 @@ void CoreOobeHandler::Initialize() {
UpdateClientAreaSize();
}
+void CoreOobeHandler::GetAdditionalParameters(base::DictionaryValue* dict) {
+ dict->SetKey("isInTabletMode",
+ base::Value(TabletModeClient::Get()->tablet_mode_enabled()));
+}
+
void CoreOobeHandler::RegisterMessages() {
AddCallback("screenStateInitialize", &CoreOobeHandler::HandleInitialized);
AddCallback("skipUpdateEnrollAfterEula",
@@ -497,6 +508,10 @@ void CoreOobeHandler::UpdateKeyboardState() {
}
}
+void CoreOobeHandler::OnTabletModeToggled(bool enabled) {
+ CallJSOrDefer("setTabletModeState", enabled);
+}
+
void CoreOobeHandler::UpdateClientAreaSize() {
const gfx::Size size =
display::Screen::GetScreen()->GetPrimaryDisplay().size();
diff --git a/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h b/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
index 33ec23663aa..2579735ea1f 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
+++ b/chromium/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
@@ -16,6 +16,7 @@
#include "chrome/browser/chromeos/login/demo_mode/demo_mode_detector.h"
#include "chrome/browser/chromeos/login/screens/core_oobe_view.h"
#include "chrome/browser/chromeos/login/version_info_updater.h"
+#include "chrome/browser/ui/ash/tablet_mode_client_observer.h"
#include "chrome/browser/ui/webui/chromeos/login/base_webui_handler.h"
#include "ui/events/event_source.h"
@@ -36,7 +37,8 @@ class OobeUI;
class CoreOobeHandler : public BaseWebUIHandler,
public VersionInfoUpdater::Delegate,
public CoreOobeView,
- public ui::EventSource {
+ public ui::EventSource,
+ public TabletModeClientObserver {
public:
explicit CoreOobeHandler(OobeUI* oobe_ui,
JSCallsContainer* js_calls_container);
@@ -47,6 +49,9 @@ class CoreOobeHandler : public BaseWebUIHandler,
::login::LocalizedValuesBuilder* builder) override;
void Initialize() override;
+ // BaseScreenHandler implementation:
+ void GetAdditionalParameters(base::DictionaryValue* dict) override;
+
// WebUIMessageHandler implementation.
void RegisterMessages() override;
@@ -103,6 +108,9 @@ class CoreOobeHandler : public BaseWebUIHandler,
void StopDemoModeDetection() override;
void UpdateKeyboardState() override;
+ // TabletModeClientObserver:
+ void OnTabletModeToggled(bool enabled) override;
+
// Handlers for JS WebUI messages.
void HandleEnableLargeCursor(bool enabled);
void HandleEnableHighContrast(bool enabled);
diff --git a/chromium/chrome/browser/ui/webui/help/version_updater.h b/chromium/chrome/browser/ui/webui/help/version_updater.h
index bbf32c32a9f..2bfc0d51f94 100644
--- a/chromium/chrome/browser/ui/webui/help/version_updater.h
+++ b/chromium/chrome/browser/ui/webui/help/version_updater.h
@@ -48,7 +48,7 @@ class VersionUpdater {
// types.
#if defined(OS_CHROMEOS)
typedef base::Callback<void(const std::string&)> ChannelCallback;
- typedef base::Callback<void(update_engine::EndOfLifeStatus status)>
+ typedef base::OnceCallback<void(update_engine::EndOfLifeStatus status)>
EolStatusCallback;
#endif
@@ -91,7 +91,7 @@ class VersionUpdater {
bool is_powerwash_allowed) = 0;
virtual void GetChannel(bool get_current_channel,
const ChannelCallback& callback) = 0;
- virtual void GetEolStatus(const EolStatusCallback& callback) = 0;
+ virtual void GetEolStatus(EolStatusCallback callback) = 0;
// Sets a one time permission on a certain update in Update Engine.
// - update_version: the Chrome OS version we want to update to.
diff --git a/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.cc b/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.cc
index 6f1d85c8592..9a61c4f79d7 100644
--- a/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.cc
+++ b/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.cc
@@ -243,19 +243,20 @@ void VersionUpdaterCros::OnGetChannel(const ChannelCallback& cb,
cb.Run(current_channel);
}
-void VersionUpdaterCros::GetEolStatus(const EolStatusCallback& cb) {
+void VersionUpdaterCros::GetEolStatus(EolStatusCallback cb) {
UpdateEngineClient* update_engine_client =
DBusThreadManager::Get()->GetUpdateEngineClient();
// Request the Eol Status. Bind to a weak_ptr bound method rather than passing
// |cb| directly so that |cb| does not outlive |this|.
- update_engine_client->GetEolStatus(base::Bind(
- &VersionUpdaterCros::OnGetEolStatus, weak_ptr_factory_.GetWeakPtr(), cb));
+ update_engine_client->GetEolStatus(
+ base::BindOnce(&VersionUpdaterCros::OnGetEolStatus,
+ weak_ptr_factory_.GetWeakPtr(), std::move(cb)));
}
-void VersionUpdaterCros::OnGetEolStatus(const EolStatusCallback& cb,
+void VersionUpdaterCros::OnGetEolStatus(EolStatusCallback cb,
update_engine::EndOfLifeStatus status) {
- cb.Run(status);
+ std::move(cb).Run(status);
}
VersionUpdaterCros::VersionUpdaterCros(content::WebContents* web_contents)
diff --git a/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.h b/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.h
index 7defbfa5492..ec6ea7da17e 100644
--- a/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.h
+++ b/chromium/chrome/browser/ui/webui/help/version_updater_chromeos.h
@@ -33,7 +33,7 @@ class VersionUpdaterCros : public VersionUpdater,
// Gets the last update status, without triggering a new check or download.
void GetUpdateStatus(const StatusCallback& callback);
- void GetEolStatus(const EolStatusCallback& callback) override;
+ void GetEolStatus(EolStatusCallback callback) override;
protected:
friend class VersionUpdater;
@@ -58,7 +58,7 @@ class VersionUpdaterCros : public VersionUpdater,
const std::string& current_channel);
// Callback from UpdateEngineClient::GetEolStatus().
- void OnGetEolStatus(const EolStatusCallback& cb,
+ void OnGetEolStatus(EolStatusCallback cb,
update_engine::EndOfLifeStatus status);
// BrowserContext in which the class was instantiated.
diff --git a/chromium/chrome/browser/ui/webui/print_preview/printer_capabilities.cc b/chromium/chrome/browser/ui/webui/print_preview/printer_capabilities.cc
index 6205ef5ca36..ffef1099d74 100644
--- a/chromium/chrome/browser/ui/webui/print_preview/printer_capabilities.cc
+++ b/chromium/chrome/browser/ui/webui/print_preview/printer_capabilities.cc
@@ -309,7 +309,7 @@ void StartLocalPrint(const std::string& ticket_json,
dialog_controller ? dialog_controller->GetInitiator(preview_web_contents)
: nullptr;
PrintViewManager* print_view_manager =
- PrintViewManager::FromWebContents(initiator);
+ initiator ? PrintViewManager::FromWebContents(initiator) : nullptr;
if (!print_view_manager) {
std::move(callback).Run(base::Value("Initiator closed"));
return;
diff --git a/chromium/chrome/browser/ui/webui/settings/about_handler.cc b/chromium/chrome/browser/ui/webui/settings/about_handler.cc
index 1920f85c03a..11da4972a25 100644
--- a/chromium/chrome/browser/ui/webui/settings/about_handler.cc
+++ b/chromium/chrome/browser/ui/webui/settings/about_handler.cc
@@ -335,6 +335,10 @@ AboutHandler* AboutHandler::Create(content::WebUIDataSource* html_source,
html_source->AddString("aboutUserAgent", GetUserAgent());
html_source->AddString("aboutJsEngineVersion", V8_VERSION_STRING);
html_source->AddString("aboutBlinkVersion", content::GetWebKitVersion());
+ html_source->AddString("endOfLifeMessage",
+ l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_EOL));
+ html_source->AddString("endOfLifeLearnMoreURL",
+ base::ASCIIToUTF16(chrome::kEolNotificationURL));
#endif
return new AboutHandler();
@@ -378,6 +382,10 @@ void AboutHandler::RegisterMessages() {
"refreshTPMFirmwareUpdateStatus",
base::Bind(&AboutHandler::HandleRefreshTPMFirmwareUpdateStatus,
base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ "getHasEndOfLife",
+ base::BindRepeating(&AboutHandler::HandleGetHasEndOfLife,
+ base::Unretained(this)));
#endif
#if defined(OS_MACOSX)
web_ui()->RegisterMessageCallback(
@@ -602,6 +610,25 @@ void AboutHandler::RefreshTPMFirmwareUpdateStatus(bool update_available) {
event->SetBoolean("updateAvailable", update_available);
FireWebUIListener("tpm-firmware-update-status-changed", *event);
}
+
+void AboutHandler::HandleGetHasEndOfLife(const base::ListValue* args) {
+ CHECK_EQ(1U, args->GetSize());
+ std::string callback_id;
+ CHECK(args->GetString(0, &callback_id));
+ version_updater_->GetEolStatus(
+ base::BindOnce(&AboutHandler::OnGetEndOfLifeStatus,
+ weak_factory_.GetWeakPtr(), callback_id));
+}
+
+void AboutHandler::OnGetEndOfLifeStatus(std::string callback_id,
+ update_engine::EndOfLifeStatus status) {
+ // Check for EndOfLifeStatus::kEol only because
+ // EndOfLifeStatus::kSecurityOnly state is no longer supported.
+ ResolveJavascriptCallback(
+ base::Value(callback_id),
+ base::Value(status == update_engine::EndOfLifeStatus::kEol));
+}
+
#endif // defined(OS_CHROMEOS)
void AboutHandler::RequestUpdate() {
diff --git a/chromium/chrome/browser/ui/webui/settings/about_handler.h b/chromium/chrome/browser/ui/webui/settings/about_handler.h
index 3127e9740f8..0e47e2580e1 100644
--- a/chromium/chrome/browser/ui/webui/settings/about_handler.h
+++ b/chromium/chrome/browser/ui/webui/settings/about_handler.h
@@ -147,6 +147,16 @@ class AboutHandler : public settings::SettingsPageUIHandler,
void OnRegulatoryLabelTextRead(std::string callback_id,
const base::FilePath& label_dir_path,
const std::string& text);
+
+ // Retrieves device end of life status.
+ // Will asynchronously resolve the provided callback with a boolean
+ // indicating whether the device has reached end-of-life status (will no
+ // longer receive updates).
+ void HandleGetHasEndOfLife(const base::ListValue* args);
+
+ // Callbacks for version_updater_->GetEolStatus calls.
+ void OnGetEndOfLifeStatus(std::string callback_id,
+ update_engine::EndOfLifeStatus status);
#endif
// Specialized instance of the VersionUpdater used to update the browser.
diff --git a/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc b/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
index 6b171c720f1..a1962a59807 100644
--- a/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
+++ b/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
@@ -376,10 +376,41 @@ void DiceTurnSyncOnHelper::SigninAndShowSyncConfirmationUI() {
signin_metrics::LogSigninReason(signin_reason_);
base::RecordAction(base::UserMetricsAction("Signin_Signin_Succeed"));
- // Show Sync confirmation.
browser_sync::ProfileSyncService* sync_service = GetProfileSyncService();
- if (sync_service)
+ if (sync_service) {
+ // Take a SyncSetupInProgressHandle, so that the UI code can use
+ // IsFirstSyncSetupInProgress() as a way to know if there is a signin in
+ // progress.
+ // TODO(https://crbug.com/811211): Remove this handle.
sync_blocker_ = sync_service->GetSetupInProgressHandle();
+ if (SyncStartupTracker::GetSyncServiceState(profile_) ==
+ SyncStartupTracker::SYNC_STARTUP_PENDING) {
+ // Wait until sync is initialized so that the confirmation UI can be
+ // aware of startup errors. This is needed to make sure that the sync
+ // confirmation dialog is shown only after the sync service had a chance
+ // to check whether sync was disabled by admin.
+ // See http://crbug.com/812546
+ sync_startup_tracker_.reset(new SyncStartupTracker(profile_, this));
+ return;
+ }
+ }
+
+ ShowSyncConfirmationUI();
+}
+
+void DiceTurnSyncOnHelper::SyncStartupCompleted() {
+ DCHECK(sync_startup_tracker_);
+ sync_startup_tracker_.reset();
+ ShowSyncConfirmationUI();
+}
+
+void DiceTurnSyncOnHelper::SyncStartupFailed() {
+ DCHECK(sync_startup_tracker_);
+ sync_startup_tracker_.reset();
+ ShowSyncConfirmationUI();
+}
+
+void DiceTurnSyncOnHelper::ShowSyncConfirmationUI() {
scoped_login_ui_service_observer_.Add(
LoginUIServiceFactory::GetForProfile(profile_));
browser_ = EnsureBrowser(browser_, profile_);
diff --git a/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.h b/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.h
index d1ef87b93fe..85ef34e80f9 100644
--- a/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.h
+++ b/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.h
@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/sync_startup_tracker.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
@@ -33,7 +34,8 @@ class SyncSetupInProgressHandle;
// Handles details of signing the user in with SigninManager and turning on
// sync for an account that is already present in the token service.
class DiceTurnSyncOnHelper : public BrowserListObserver,
- public LoginUIService::Observer {
+ public LoginUIService::Observer,
+ public SyncStartupTracker::Observer {
public:
// Behavior when the signin is aborted (by an error or cancelled by the user).
enum class SigninAbortedMode {
@@ -52,6 +54,10 @@ class DiceTurnSyncOnHelper : public BrowserListObserver,
const std::string& account_id,
SigninAbortedMode signin_aborted_mode);
+ // SyncStartupTracker::Observer:
+ void SyncStartupCompleted() override;
+ void SyncStartupFailed() override;
+
private:
enum class ProfileMode {
// Attempts to sign the user in |profile_|. Note that if the account to be
@@ -121,6 +127,11 @@ class DiceTurnSyncOnHelper : public BrowserListObserver,
// UI.
void SigninAndShowSyncConfirmationUI();
+ // Displays the Sync confirmation UI.
+ // Note: If sync fails to start (e.g. sync is disabled by admin), the sync
+ // confirmation dialog will be updated accordingly.
+ void ShowSyncConfirmationUI();
+
// LoginUIService::Observer override. Deletes this object.
void OnSyncConfirmationUIClosed(
LoginUIService::SyncConfirmationUIClosedResult result) override;
@@ -156,6 +167,7 @@ class DiceTurnSyncOnHelper : public BrowserListObserver,
scoped_browser_list_observer_;
ScopedObserver<LoginUIService, LoginUIService::Observer>
scoped_login_ui_service_observer_;
+ std::unique_ptr<SyncStartupTracker> sync_startup_tracker_;
base::WeakPtrFactory<DiceTurnSyncOnHelper> weak_pointer_factory_;
DISALLOW_COPY_AND_ASSIGN(DiceTurnSyncOnHelper);
diff --git a/chromium/chrome/browser/ui/webui/welcome_win10_ui.cc b/chromium/chrome/browser/ui/webui/welcome_win10_ui.cc
index c1a27b163b3..ff736d62084 100644
--- a/chromium/chrome/browser/ui/webui/welcome_win10_ui.cc
+++ b/chromium/chrome/browser/ui/webui/welcome_win10_ui.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/welcome_win10_handler.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
@@ -87,8 +88,15 @@ WelcomeWin10UI::WelcomeWin10UI(content::WebUI* web_ui, const GURL& url)
content::WebUIDataSource* html_source =
content::WebUIDataSource::Create(url.host());
+ html_source->SetJsonPath("strings.js");
+
AddLocalizedStrings(html_source, is_first_run);
+ // Controls the accelerated default browser flow experiment.
+ html_source->AddBoolean("accelerated_flow_enabled",
+ base::FeatureList::IsEnabled(
+ features::kWin10AcceleratedDefaultBrowserFlow));
+
html_source->AddResourcePath("welcome_win10.css", IDR_WELCOME_WIN10_CSS);
html_source->AddResourcePath("welcome_win10.js", IDR_WELCOME_WIN10_JS);
html_source->AddResourcePath("default.webp", IDR_WELCOME_WIN10_DEFAULT_WEBP);
diff --git a/chromium/chrome/common/page_load_metrics/page_load_metrics.mojom b/chromium/chrome/common/page_load_metrics/page_load_metrics.mojom
index dbfc654096e..acc85802bb4 100644
--- a/chromium/chrome/common/page_load_metrics/page_load_metrics.mojom
+++ b/chromium/chrome/common/page_load_metrics/page_load_metrics.mojom
@@ -103,6 +103,13 @@ struct InteractiveTiming {
// This is a page load metrics internal value and not generally intended for
// consumption by observers.
mojo.common.mojom.TimeDelta? first_invalidating_input;
+
+ // Queueing Time of the first click, tap, key press, cancellable touchstart,
+ // or pointer down followed by a pointer up.
+ mojo.common.mojom.TimeDelta? first_input_delay;
+
+ // The timestamp of the event whose delay is reported by GetFirstInputDelay().
+ mojo.common.mojom.TimeDelta? first_input_timestamp;
};
diff --git a/chromium/chrome/service/BUILD.gn b/chromium/chrome/service/BUILD.gn
index f4dcb264f14..291c3bc455a 100644
--- a/chromium/chrome/service/BUILD.gn
+++ b/chromium/chrome/service/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/features.gni")
import("//printing/features/features.gni")
+import("//services/catalog/public/tools/catalog.gni")
assert(!is_chromeos)
@@ -54,6 +55,7 @@ static_library("service") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
+ ":service_process_catalog_source",
"//base",
"//chrome:strings",
"//chrome/common",
@@ -84,3 +86,15 @@ static_library("service") {
]
}
}
+
+catalog("service_process_catalog") {
+ embedded_services = [
+ "//content/public/app:browser_manifest",
+ "//content/public/app:utility_manifest",
+ ]
+}
+
+catalog_cpp_source("service_process_catalog_source") {
+ catalog = ":service_process_catalog"
+ generated_function_name = "CreateServiceProcessCatalog"
+}
diff --git a/chromium/chrome/test/BUILD.gn b/chromium/chrome/test/BUILD.gn
index 4eef3ce30d3..540a6b0a3da 100644
--- a/chromium/chrome/test/BUILD.gn
+++ b/chromium/chrome/test/BUILD.gn
@@ -1256,7 +1256,6 @@ test("browser_tests") {
"../browser/extensions/extension_unload_browsertest.cc",
"../browser/extensions/extension_url_rewrite_browsertest.cc",
"../browser/extensions/extension_view_host_factory_browsertest.cc",
- "../browser/extensions/extension_web_ui_browsertest.cc",
"../browser/extensions/extension_websocket_apitest.cc",
"../browser/extensions/extension_webui_apitest.cc",
"../browser/extensions/extension_with_management_policy_apitest.cc",
diff --git a/chromium/components/autofill/content/renderer/password_autofill_agent.cc b/chromium/components/autofill/content/renderer/password_autofill_agent.cc
index b8f64d41912..daa25e605b0 100644
--- a/chromium/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/chromium/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1543,15 +1543,18 @@ std::unique_ptr<PasswordForm> PasswordAutofillAgent::GetPasswordFormFromWebForm(
std::unique_ptr<PasswordForm>
PasswordAutofillAgent::GetPasswordFormFromUnownedInputElements() {
- blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
// The element's frame might have been detached in the meantime (see
// http://crbug.com/585363, comments 5 and 6), in which case |frame| will
// be null. This was hardly caused by form submission (unless the user is
// supernaturally quick), so it is OK to drop the ball here.
+ content::RenderFrame* frame = render_frame();
if (!frame)
return nullptr;
+ blink::WebLocalFrame* web_frame = frame->GetWebFrame();
+ if (!web_frame)
+ return nullptr;
return CreatePasswordFormFromUnownedInputElements(
- *frame, &field_value_and_properties_map_, &form_predictions_,
+ *web_frame, &field_value_and_properties_map_, &form_predictions_,
&username_detector_cache_);
}
diff --git a/chromium/components/autofill/ios/browser/autofill_agent.mm b/chromium/components/autofill/ios/browser/autofill_agent.mm
index a4ca360894a..53851ff4097 100644
--- a/chromium/components/autofill/ios/browser/autofill_agent.mm
+++ b/chromium/components/autofill/ios/browser/autofill_agent.mm
@@ -427,6 +427,9 @@ void GetFormAndField(autofill::FormData* form,
return NO;
}
+ // main_frame_origin is used for logging UKM.
+ form.main_frame_origin = url::Origin::Create(pageURL);
+
// Action is optional.
base::string16 action;
formData->GetString("action", &action);
diff --git a/chromium/components/password_manager/core/browser/credentials_filter.h b/chromium/components/password_manager/core/browser/credentials_filter.h
index aec30291a22..03bce524158 100644
--- a/chromium/components/password_manager/core/browser/credentials_filter.h
+++ b/chromium/components/password_manager/core/browser/credentials_filter.h
@@ -25,7 +25,8 @@ class CredentialsFilter {
std::vector<std::unique_ptr<autofill::PasswordForm>> results) const = 0;
// Should |form| be offered to be saved?
- virtual bool ShouldSave(const autofill::PasswordForm& form) const = 0;
+ virtual bool ShouldSave(const autofill::PasswordForm& form,
+ const GURL& main_frame_url) const = 0;
// Call this if the form associated with |form_manager| was filled, and the
// subsequent sign-in looked like a success.
diff --git a/chromium/components/password_manager/core/browser/form_fetcher_impl_unittest.cc b/chromium/components/password_manager/core/browser/form_fetcher_impl_unittest.cc
index d0975d27457..d07e911f86d 100644
--- a/chromium/components/password_manager/core/browser/form_fetcher_impl_unittest.cc
+++ b/chromium/components/password_manager/core/browser/form_fetcher_impl_unittest.cc
@@ -78,12 +78,13 @@ class NameFilter : public StubCredentialsFilter {
std::vector<std::unique_ptr<PasswordForm>> FilterResults(
std::vector<std::unique_ptr<PasswordForm>> results) const override {
base::EraseIf(results, [this](const std::unique_ptr<PasswordForm>& form) {
- return !ShouldSave(*form);
+ return !ShouldSave(*form, form->origin);
});
return results;
}
- bool ShouldSave(const PasswordForm& form) const override {
+ bool ShouldSave(const PasswordForm& form,
+ const GURL& main_frame_url) const override {
return form.username_value != name_;
}
diff --git a/chromium/components/password_manager/core/browser/password_manager.cc b/chromium/components/password_manager/core/browser/password_manager.cc
index c4beff277c1..cd1133eac35 100644
--- a/chromium/components/password_manager/core/browser/password_manager.cc
+++ b/chromium/components/password_manager/core/browser/password_manager.cc
@@ -848,7 +848,8 @@ void PasswordManager::OnLoginSuccessful() {
DCHECK(provisional_save_manager_->submitted_form());
if (!client_->GetStoreResultFilter()->ShouldSave(
- *provisional_save_manager_->submitted_form())) {
+ *provisional_save_manager_->submitted_form(),
+ client_->GetMainFrameURL())) {
#if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
// When |username_value| is empty, it's not clear whether the submitted
// credentials are really sync credentials. Don't save sync password hash
diff --git a/chromium/components/password_manager/core/browser/password_manager_unittest.cc b/chromium/components/password_manager/core/browser/password_manager_unittest.cc
index ac1a60eaab9..5c09f502787 100644
--- a/chromium/components/password_manager/core/browser/password_manager_unittest.cc
+++ b/chromium/components/password_manager/core/browser/password_manager_unittest.cc
@@ -48,7 +48,9 @@ namespace {
class MockStoreResultFilter : public StubCredentialsFilter {
public:
- MOCK_CONST_METHOD1(ShouldSave, bool(const autofill::PasswordForm& form));
+ MOCK_CONST_METHOD2(ShouldSave,
+ bool(const autofill::PasswordForm& form,
+ const GURL& main_frame_url));
MOCK_CONST_METHOD1(ReportFormLoginSuccess,
void(const PasswordFormManager& form_manager));
};
@@ -59,7 +61,7 @@ class MockPasswordManagerClient : public StubPasswordManagerClient {
EXPECT_CALL(*this, GetStoreResultFilter())
.Times(AnyNumber())
.WillRepeatedly(Return(&filter_));
- ON_CALL(filter_, ShouldSave(_)).WillByDefault(Return(true));
+ ON_CALL(filter_, ShouldSave(_, _)).WillByDefault(Return(true));
}
MOCK_CONST_METHOD0(IsSavingAndFillingEnabledForCurrentPage, bool());
@@ -98,7 +100,7 @@ class MockPasswordManagerClient : public StubPasswordManagerClient {
}
void FilterAllResultsForSaving() {
- EXPECT_CALL(filter_, ShouldSave(_)).WillRepeatedly(Return(false));
+ EXPECT_CALL(filter_, ShouldSave(_, _)).WillRepeatedly(Return(false));
}
private:
@@ -807,7 +809,7 @@ TEST_F(PasswordManagerTest, ReportFormLoginSuccessAndShouldSaveCalled) {
PasswordForm submitted_form = observed_form;
submitted_form.preferred = true;
- EXPECT_CALL(*client_.GetStoreResultFilter(), ShouldSave(submitted_form));
+ EXPECT_CALL(*client_.GetStoreResultFilter(), ShouldSave(submitted_form, _));
EXPECT_CALL(*store_, UpdateLogin(_));
observed.clear();
manager()->OnPasswordFormsParsed(&driver_, observed);
diff --git a/chromium/components/password_manager/core/browser/stub_credentials_filter.cc b/chromium/components/password_manager/core/browser/stub_credentials_filter.cc
index 8782cc324f9..233e4d92f70 100644
--- a/chromium/components/password_manager/core/browser/stub_credentials_filter.cc
+++ b/chromium/components/password_manager/core/browser/stub_credentials_filter.cc
@@ -17,8 +17,8 @@ StubCredentialsFilter::FilterResults(
return results;
}
-bool StubCredentialsFilter::ShouldSave(
- const autofill::PasswordForm& form) const {
+bool StubCredentialsFilter::ShouldSave(const autofill::PasswordForm& form,
+ const GURL& main_frame_url) const {
return true;
}
diff --git a/chromium/components/password_manager/core/browser/stub_credentials_filter.h b/chromium/components/password_manager/core/browser/stub_credentials_filter.h
index 03fcd34c671..09fc10f40f2 100644
--- a/chromium/components/password_manager/core/browser/stub_credentials_filter.h
+++ b/chromium/components/password_manager/core/browser/stub_credentials_filter.h
@@ -22,7 +22,8 @@ class StubCredentialsFilter : public CredentialsFilter {
std::vector<std::unique_ptr<autofill::PasswordForm>> FilterResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results)
const override;
- bool ShouldSave(const autofill::PasswordForm& form) const override;
+ bool ShouldSave(const autofill::PasswordForm& form,
+ const GURL& main_frame_url) const override;
void ReportFormLoginSuccess(
const PasswordFormManager& form_manager) const override;
diff --git a/chromium/components/password_manager/sync/browser/sync_credentials_filter.cc b/chromium/components/password_manager/sync/browser/sync_credentials_filter.cc
index ce09894033d..73300eeaabe 100644
--- a/chromium/components/password_manager/sync/browser/sync_credentials_filter.cc
+++ b/chromium/components/password_manager/sync/browser/sync_credentials_filter.cc
@@ -14,6 +14,7 @@
#include "components/password_manager/core/browser/password_manager_util.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/password_manager/sync/browser/password_sync_util.h"
+#include "google_apis/gaia/gaia_auth_util.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/url_util.h"
@@ -64,7 +65,7 @@ std::vector<std::unique_ptr<PasswordForm>> SyncCredentialsFilter::FilterResults(
auto begin_of_removed =
std::partition(results.begin(), results.end(),
[this](const std::unique_ptr<PasswordForm>& form) {
- return ShouldSave(*form);
+ return ShouldSave(*form, form->origin);
});
UMA_HISTOGRAM_BOOLEAN("PasswordManager.SyncCredentialFiltered",
@@ -75,11 +76,12 @@ std::vector<std::unique_ptr<PasswordForm>> SyncCredentialsFilter::FilterResults(
return results;
}
-bool SyncCredentialsFilter::ShouldSave(
- const autofill::PasswordForm& form) const {
- return !sync_util::IsSyncAccountCredential(
- form, sync_service_factory_function_.Run(),
- signin_manager_factory_function_.Run());
+bool SyncCredentialsFilter::ShouldSave(const autofill::PasswordForm& form,
+ const GURL& main_frame_url) const {
+ return !gaia::ShouldSkipSavePasswordForGaiaURL(main_frame_url) &&
+ !sync_util::IsSyncAccountCredential(
+ form, sync_service_factory_function_.Run(),
+ signin_manager_factory_function_.Run());
}
void SyncCredentialsFilter::ReportFormLoginSuccess(
diff --git a/chromium/components/password_manager/sync/browser/sync_credentials_filter.h b/chromium/components/password_manager/sync/browser/sync_credentials_filter.h
index ecabd5e0ae4..9a40d511e62 100644
--- a/chromium/components/password_manager/sync/browser/sync_credentials_filter.h
+++ b/chromium/components/password_manager/sync/browser/sync_credentials_filter.h
@@ -43,7 +43,8 @@ class SyncCredentialsFilter : public CredentialsFilter {
std::vector<std::unique_ptr<autofill::PasswordForm>> FilterResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results)
const override;
- bool ShouldSave(const autofill::PasswordForm& form) const override;
+ bool ShouldSave(const autofill::PasswordForm& form,
+ const GURL& main_frame_url) const override;
void ReportFormLoginSuccess(
const PasswordFormManager& form_manager) const override;
diff --git a/chromium/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc b/chromium/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc
index a6a3759f930..0e4b743e4ba 100644
--- a/chromium/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc
+++ b/chromium/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc
@@ -28,6 +28,7 @@
#include "components/password_manager/core/browser/stub_password_manager_driver.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/password_manager/sync/browser/sync_username_test_base.h"
+#include "google_apis/gaia/gaia_urls.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -339,7 +340,7 @@ TEST_F(CredentialsFilterTest, ShouldSave_NotSyncCredential) {
ASSERT_NE("user@example.org",
signin_manager()->GetAuthenticatedAccountInfo().email);
SetSyncingPasswords(true);
- EXPECT_TRUE(filter_.ShouldSave(form));
+ EXPECT_TRUE(filter_.ShouldSave(form, GURL("https://example.org")));
}
TEST_F(CredentialsFilterTest, ShouldSave_SyncCredential) {
@@ -347,7 +348,7 @@ TEST_F(CredentialsFilterTest, ShouldSave_SyncCredential) {
FakeSigninAs("user@example.org");
SetSyncingPasswords(true);
- EXPECT_FALSE(filter_.ShouldSave(form));
+ EXPECT_FALSE(filter_.ShouldSave(form, GURL("https://example.org")));
}
TEST_F(CredentialsFilterTest, ShouldSave_SyncCredential_NotSyncingPasswords) {
@@ -355,7 +356,13 @@ TEST_F(CredentialsFilterTest, ShouldSave_SyncCredential_NotSyncingPasswords) {
FakeSigninAs("user@example.org");
SetSyncingPasswords(false);
- EXPECT_TRUE(filter_.ShouldSave(form));
+ EXPECT_TRUE(filter_.ShouldSave(form, GURL("https://example.org")));
+}
+
+TEST_F(CredentialsFilterTest, ShouldSave_ChomeSigninURLForDice) {
+ PasswordForm form = SimpleGaiaForm("user@gmail.com");
+ EXPECT_FALSE(filter_.ShouldSave(
+ form, GaiaUrls::GetInstance()->signin_chrome_sync_dice()));
}
TEST_F(CredentialsFilterTest, ShouldFilterOneForm) {
diff --git a/chromium/components/strings/components_strings_de.xtb b/chromium/components/strings/components_strings_de.xtb
index 2e8383e921a..e506f70e058 100644
--- a/chromium/components/strings/components_strings_de.xtb
+++ b/chromium/components/strings/components_strings_de.xtb
@@ -1013,7 +1013,7 @@
<translation id="8903921497873541725">Vergrößern</translation>
<translation id="8931333241327730545">Möchten Sie diese Karte in Ihrem Google-Konto speichern?</translation>
<translation id="8932102934695377596">Ihre Uhr geht nach.</translation>
-<translation id="893332455753468063">Name hinzufügen</translation>
+<translation id="893332455753468063">Namen hinzufügen</translation>
<translation id="8938939909778640821">Akzeptierte Kredit- und Prepaidkarten</translation>
<translation id="8952525071319348207">Geben Sie das Ablaufdatum und den CVC für <ph name="CREDIT_CARD" /> ein, um Ihre Kartendetails zu aktualisieren. Nach erfolgter Bestätigung werden die Kartendetails Ihres Google Payments-Kontos an diese Website weitergegeben.</translation>
<translation id="8957210676456822347">Erfassungsportal-Autorisierung</translation>
diff --git a/chromium/components/strings/components_strings_es.xtb b/chromium/components/strings/components_strings_es.xtb
index 224494c4230..2b949f86446 100644
--- a/chromium/components/strings/components_strings_es.xtb
+++ b/chromium/components/strings/components_strings_es.xtb
@@ -814,7 +814,7 @@
<translation id="7260504762447901703">Revoca el acceso</translation>
<translation id="7271803869921933038">Tarjetas prepago aceptadas</translation>
<translation id="7275334191706090484">Marcadores administrados</translation>
-<translation id="7298195798382681320">Recomendadas</translation>
+<translation id="7298195798382681320">Recomendada</translation>
<translation id="7309308571273880165">Informe sobre fallos registrado el <ph name="CRASH_TIME" /> (el usuario ha solicitado que se suba, pero aún no se ha hecho)</translation>
<translation id="7334320624316649418">&amp;Rehacer reorganización</translation>
<translation id="733923710415886693">El certificado del servidor no se ha revelado a través de la Transparencia en los Certificados.</translation>
diff --git a/chromium/components/strings/components_strings_fil.xtb b/chromium/components/strings/components_strings_fil.xtb
index 099262c8557..0d84e914074 100644
--- a/chromium/components/strings/components_strings_fil.xtb
+++ b/chromium/components/strings/components_strings_fil.xtb
@@ -364,7 +364,7 @@
<translation id="3539171420378717834">Magtago ng kopya ng card na ito sa device na ito</translation>
<translation id="3542684924769048008">Gamitin ang password para sa:</translation>
<translation id="3549644494707163724">I-encrypt ang lahat ng naka-sync na data gamit ang sarili mong passphrase sa pag-sync</translation>
-<translation id="3556433843310711081">Maaari itong alisin sa pagkaka-block ng iyong manager para sa iyo</translation>
+<translation id="3556433843310711081">Maaari itong i-unblock ng iyong manager para sa iyo</translation>
<translation id="3566021033012934673">Hindi pribado ang iyong koneksyon</translation>
<translation id="3574305903863751447"><ph name="CITY" />, <ph name="STATE" /> <ph name="COUNTRY" /></translation>
<translation id="358285529439630156">Tinatanggap ang mga credit at prepaid card.</translation>
@@ -646,7 +646,7 @@
<translation id="5710435578057952990">Ang pagkilala ng website na ito ay hindi natukoy.</translation>
<translation id="5719499550583120431">Tinatanggap ang mga prepaid card.</translation>
<translation id="5720705177508910913">Kasalukuyang user</translation>
-<translation id="5732392974455271431">Maaari itong alisin sa pagkaka-block ng iyong mga magulang para sa iyo</translation>
+<translation id="5732392974455271431">Maaari itong i-unblock ng iyong mga magulang para sa iyo</translation>
<translation id="5763042198335101085">Maglagay ng wastong email address</translation>
<translation id="5765072501007116331">Upang makita ang mga pamamaraan at kinakailangan sa paghahatid, pumili ng address</translation>
<translation id="5770114862687765385">Mukhang sira ang file. I-click ang button na 'I-reset' upang i-reset ang session.</translation>
@@ -879,7 +879,7 @@
<translation id="7723047071702270851">I-edit ang Card</translation>
<translation id="774634243536837715">Na-block ang mapanganib na content.</translation>
<translation id="7752995774971033316">Hindi pinamamahalaan</translation>
-<translation id="7755287808199759310">Maaari itong alisin sa pagkaka-block ng iyong magulang para sa iyo</translation>
+<translation id="7755287808199759310">Maaari itong i-unblock ng iyong magulang para sa iyo</translation>
<translation id="7758069387465995638">Maaaring na-block ng firewall o antivirus software ang koneksyon.</translation>
<translation id="7759163816903619567">Display domain:</translation>
<translation id="7761701407923456692">Hindi tumutugma sa URL ang certificate ng server.</translation>
diff --git a/chromium/components/strings/components_strings_id.xtb b/chromium/components/strings/components_strings_id.xtb
index b72b1d51b6e..0e1700f03fe 100644
--- a/chromium/components/strings/components_strings_id.xtb
+++ b/chromium/components/strings/components_strings_id.xtb
@@ -339,7 +339,7 @@
<ph name="LIST_ITEM" />Informasi yang dimasukkan dalam formulir
<ph name="END_LIST" /></translation>
<translation id="3369192424181595722">Kesalahan jam</translation>
-<translation id="337363190475750230">Tidak ditetapkan</translation>
+<translation id="337363190475750230">Di-deprovision</translation>
<translation id="3377188786107721145">Kesalahan penguraian kebijakan</translation>
<translation id="3380365263193509176">Kesalahan tidak dikenal</translation>
<translation id="3380864720620200369">ID Klien:</translation>
diff --git a/chromium/components/strings/components_strings_mr.xtb b/chromium/components/strings/components_strings_mr.xtb
index 67145b8dfcd..a3d66e20da7 100644
--- a/chromium/components/strings/components_strings_mr.xtb
+++ b/chromium/components/strings/components_strings_mr.xtb
@@ -94,7 +94,7 @@
<translation id="1644184664548287040">नेटवर्क कॉन्फिगरेशन अवैध आहे आणि आयात केले जाऊ शकले नाही.</translation>
<translation id="1644574205037202324">इतिहास</translation>
<translation id="1645368109819982629">असमर्थित प्रोटोकॉल</translation>
-<translation id="1655462015569774233">{1,plural, =1{हा सर्व्हर हे <ph name="DOMAIN" /> असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र काल कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले संगणक सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}one{हा सर्व्हर हे <ph name="DOMAIN" />असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र # दिवसांपूर्वी कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले संगणक सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}other{हा सर्व्हर हे <ph name="DOMAIN" />असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र # दिवसांपूर्वी कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले संगणक सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}}</translation>
+<translation id="1655462015569774233">{1,plural, =1{हा सर्व्हर हे <ph name="DOMAIN" /> असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र काल कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले कॉंप्युटर सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}one{हा सर्व्हर हे <ph name="DOMAIN" />असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र # दिवसांपूर्वी कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले कॉंप्युटर सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}other{हा सर्व्हर हे <ph name="DOMAIN" />असल्याचे सिद्ध करू शकला नाही; त्याचे सुरक्षा प्रमाणपत्र # दिवसांपूर्वी कालबाह्य झाले. हे कदाचित एका चुकीच्या कॉन्फिगरेशनमुळे किंवा आक्रमणकर्त्याने आपले कनेक्शन आंतरखंडित केल्यामुळे झाले असू शकते. आपले कॉंप्युटर सध्या <ph name="CURRENT_DATE" /> वर सेट आहे. ते योग्य दिसते आहे? नसल्यास, आपण आपल्या सिस्टीमचे घड्याळ दुरूस्त करावे आणि त्यानंतर हे पृष्ठ रिफ्रेश करा.}}</translation>
<translation id="1656489000284462475">घेणे</translation>
<translation id="1663943134801823270">कार्ड आणि पत्ते Chrome कडील आहेत. आपण त्यांना <ph name="BEGIN_LINK" />सेटिंग्‍ज<ph name="END_LINK" /> मधून व्यवस्थापित करू शकता.</translation>
<translation id="1676269943528358898"><ph name="SITE" /> आपली माहिती संरक्षित करण्यासाठी सामान्यतः कूटबद्धीकरण वापरते. Google Chrome ने यावेळी <ph name="SITE" /> शी कनेक्‍ट करण्‍याचा प्रयत्न केला तेव्‍हा, वेबसाइटने असामान्य आणि अयोग्य क्रेडेन्शियल परत पाठविले. एकतर आक्रमणकर्ता <ph name="SITE" /> असल्याची बतावणी करण्याचा प्रयत्न करतो तेव्‍हा किंवा Wi-Fi साइन इन स्क्रीनने कनेक्शनमध्ये व्यत्यय आणले तेव्‍हा हे घडू शकते. कोणत्याही डेटाची अदलाबदल करण्यापूर्वी Google Chrome ने कनेक्शन थांबविल्यामुळे आपली माहिती अद्याप सुरक्षित आहे.</translation>
@@ -152,7 +152,7 @@
<translation id="2091887806945687916">ध्वनी</translation>
<translation id="2094505752054353250">डोमेन जुळत नाही</translation>
<translation id="2096368010154057602">विभाग</translation>
-<translation id="2108755909498034140">आपला संगणक रीस्टार्ट करा</translation>
+<translation id="2108755909498034140">आपला कॉंप्युटर रीस्टार्ट करा</translation>
<translation id="2113977810652731515">कार्ड</translation>
<translation id="2114841414352855701">दुर्लक्ष केले कारण ते <ph name="POLICY_NAME" /> कडून अधिलिखित झाले होते.</translation>
<translation id="2138201775715568214">जवळपासची वास्तविक वेब पृष्ठे शोधत आहात</translation>
@@ -572,7 +572,7 @@
<translation id="5230733896359313003">पाठविण्याचा पत्ता</translation>
<translation id="5251803541071282808">क्लाउड</translation>
<translation id="5277279256032773186">कार्यस्थानी Chrome वापरत आहात? व्यवसाय त्यांच्या कर्मचार्‍यांंसाठी Chrome सेटिंग्ज व्यवस्थापित करू शकतात. अधिक जाणनू घ्या</translation>
-<translation id="5281113152797308730"><ph name="BEGIN_PARAGRAPH" />सॉफ्टवेअर तात्पुरते बंद करून ठेवण्यासाठी खालील पायर्‍यांचे अनुसरण करा, ज्यामुळे तुम्ही वेबशी कनेक्ट होऊ शकाल. तुम्हाला प्रशासकीय हक्क असणे आवश्यक असेल.<ph name="END_PARAGRAPH" />
+<translation id="5281113152797308730"><ph name="BEGIN_PARAGRAPH" />सॉफ्टवेअर तात्पुरते बंद करून ठेवण्यासाठी खालील पायर्‍यांचे फॉलो करा, ज्यामुळे तुम्ही वेबशी कनेक्ट होऊ शकाल. तुम्हाला प्रशासकीय हक्क असणे आवश्यक असेल.<ph name="END_PARAGRAPH" />
<ph name="BEGIN_LIST" />
<ph name="LIST_ITEM" />सुरुवात<ph name="BEGIN_BOLD" /> करा<ph name="END_BOLD" /> वर क्लिक करा, त्यानंतर<ph name="BEGIN_BOLD" />"स्थानिक सेवा पहा"<ph name="END_BOLD" /> शोधा आणि निवडा
@@ -930,7 +930,7 @@
<translation id="8118489163946903409">पेमेंट पद्धत</translation>
<translation id="8127301229239896662">"<ph name="SOFTWARE_NAME" />" तुमच्या काँप्युटरवर किंवा नेटवर्कवर योग्य रीतीने इंस्टॉल केले नव्हते. तुमच्या अ‍ॅडमिनिस्ट्रेटरला ही समस्या सोडवण्यास सांगा.</translation>
<translation id="8131740175452115882">पुष्टी करा</translation>
-<translation id="8149426793427495338">आपला संगणक निष्क्रीय झाला.</translation>
+<translation id="8149426793427495338">आपला कॉंप्युटर निष्क्रीय झाला.</translation>
<translation id="8150722005171944719"><ph name="URL" /> येथील फाइल वाचनीय नाही. ती काढून टाकलेली, हलविलेली असू शकते किंवा फाइल परवानग्या प्रवेश प्रतिबंधित करत असू शकतात.</translation>
<translation id="8184538546369750125">सार्वत्रिक डीफॉल्‍ट वापरा (अनुमती द्या)</translation>
<translation id="8191494405820426728">स्थानिक क्रॅश आयडी <ph name="CRASH_LOCAL_ID" /></translation>
@@ -939,7 +939,7 @@
<translation id="8202097416529803614">ऑर्डर सारांश</translation>
<translation id="8205463626947051446">साइट अनाहूत जाहिराती दाखवणे चालू ठेवेल</translation>
<translation id="8218327578424803826">नियुक्त केलेले स्थान:</translation>
-<translation id="8225771182978767009">ज्या व्यक्तीने हा संगणक सेट केला त्या व्यक्तीने ही साइट अवरोधित करण्याचे निवडले आहे.</translation>
+<translation id="8225771182978767009">ज्या व्यक्तीने हा कॉंप्युटर सेट केला त्या व्यक्तीने ही साइट अवरोधित करण्याचे निवडले आहे.</translation>
<translation id="822964464349305906"><ph name="TYPE_1" />, <ph name="TYPE_2" /></translation>
<translation id="8238581221633243064">पेज नवीन गुप्त टॅबमध्ये उघडा</translation>
<translation id="8241707690549784388">आपण जे पृष्ठ शोधत आहत ते आपण एंटर केलेली माहिती वापरत आहे. त्या पृष्ठाकडे परत गेल्यास कदाचित आपण केलेल्या कोणत्याही क्रियेची पुनरावृत्ती होईल. आपण सुरू ठेवू इच्छिता?</translation>
diff --git a/chromium/components/strings/components_strings_pl.xtb b/chromium/components/strings/components_strings_pl.xtb
index a2bba354434..385d6e76f0e 100644
--- a/chromium/components/strings/components_strings_pl.xtb
+++ b/chromium/components/strings/components_strings_pl.xtb
@@ -1034,7 +1034,7 @@
<translation id="9039213469156557790">Ta strona zawiera także niezabezpieczone zasoby. Podczas przesyłania mogą je wyświetlić inni użytkownicy, a osoby atakujące mogą je zmodyfikować, by zmienić sposób działania strony.</translation>
<translation id="9049981332609050619">Podjęto próbę nawiązania połączenia z witryną <ph name="DOMAIN" />, jednak serwer przedstawił nieprawidłowy certyfikat.</translation>
<translation id="9050666287014529139">Hasło</translation>
-<translation id="9065203028668620118">Edycja</translation>
+<translation id="9065203028668620118">Edytuj</translation>
<translation id="9069693763241529744">Zablokowane przez rozszerzenie</translation>
<translation id="9076283476770535406">Może zawierać treści dla dorosłych</translation>
<translation id="9078964945751709336">Potrzebujemy więcej informacji</translation>
diff --git a/chromium/components/strings/components_strings_sk.xtb b/chromium/components/strings/components_strings_sk.xtb
index 458df10af3e..72c688e671b 100644
--- a/chromium/components/strings/components_strings_sk.xtb
+++ b/chromium/components/strings/components_strings_sk.xtb
@@ -248,7 +248,7 @@
<translation id="2744590937989388266">Z vloženej stránky na tejto stránke</translation>
<translation id="277133753123645258">Spôsob dodania</translation>
<translation id="277499241957683684">Chýbajúci záznam zariadenia</translation>
-<translation id="2784949926578158345">Spojenie bolo obnovené.</translation>
+<translation id="2784949926578158345">Spojenie bolo resetované.</translation>
<translation id="2788784517760473862">Akceptované kreditné karty</translation>
<translation id="2794233252405721443">Web je blokovaný</translation>
<translation id="2795286477369100655">Chcete tento web opustiť?</translation>
@@ -661,7 +661,7 @@
<translation id="5893752035575986141">Kreditné karty sú akceptované.</translation>
<translation id="5908541034548427511"><ph name="TYPE_1" /> (synchronizované)</translation>
<translation id="5920262536204764679">{NUM_COOKIES,plural, =1{Používa sa 1}few{Používajú sa #}many{Používa sa #}other{Používa sa #}}</translation>
-<translation id="5939518447894949180">Obnoviť</translation>
+<translation id="5939518447894949180">Resetovať</translation>
<translation id="5959728338436674663">Automaticky odosielať <ph name="BEGIN_WHITEPAPER_LINK" />niektoré informácie o systéme a obsah stránok<ph name="END_WHITEPAPER_LINK" /> do Googlu s cieľom pomôcť rozpoznávať nebezpečné aplikácie a weby. <ph name="PRIVACY_PAGE_LINK" /></translation>
<translation id="5967592137238574583">Úprava kontaktných informácií</translation>
<translation id="5967867314010545767">Odstrániť z histórie</translation>
diff --git a/chromium/components/strings/components_strings_sv.xtb b/chromium/components/strings/components_strings_sv.xtb
index 0837eb9fbdf..efe25ea7256 100644
--- a/chromium/components/strings/components_strings_sv.xtb
+++ b/chromium/components/strings/components_strings_sv.xtb
@@ -562,7 +562,7 @@
<translation id="5141240743006678641">Kryptera synkroniserade lösenord med dina inloggningsuppgifter för Google</translation>
<translation id="5145883236150621069">Felkoden ingår i policysvaret</translation>
<translation id="5159010409087891077">Öppna sidan i ett nytt inkognitofönster (⇧⌘N)</translation>
-<translation id="5171045022955879922">Ange eller sök efter webbadress</translation>
+<translation id="5171045022955879922">Sök eller ange webbadress</translation>
<translation id="5172758083709347301">Dator</translation>
<translation id="5179510805599951267">Inte på <ph name="ORIGINAL_LANGUAGE" />? Rapportera felet</translation>
<translation id="5190835502935405962">Bokmärkesfältet</translation>
diff --git a/chromium/components/strings/components_strings_sw.xtb b/chromium/components/strings/components_strings_sw.xtb
index a743def4c10..2160df18791 100644
--- a/chromium/components/strings/components_strings_sw.xtb
+++ b/chromium/components/strings/components_strings_sw.xtb
@@ -660,7 +660,7 @@
<translation id="5813119285467412249">Rudia Kuongeza</translation>
<translation id="5838278095973806738">Hupaswi kuweka maelezo nyeti kwenye tovuti hii (kwa mfano, manenosiri au kadi za mikopo), kwa sababu wavamizi wanaweza kuyaiba.</translation>
<translation id="5866257070973731571">Ongeza Nambari ya Simu</translation>
-<translation id="5869405914158311789">Tovuti hii haiwezi kufikiwa</translation>
+<translation id="5869405914158311789">Imeshindwa kufungua tovuti hii</translation>
<translation id="5869522115854928033">Manenosiri yaliyohifadhiwa</translation>
<translation id="5893752035575986141">Kadi za mikopo zinakubaliwa.</translation>
<translation id="5908541034548427511"><ph name="TYPE_1" /> (imesawazishwa)</translation>
diff --git a/chromium/components/strings/components_strings_vi.xtb b/chromium/components/strings/components_strings_vi.xtb
index ef269a41931..5d5f710d88f 100644
--- a/chromium/components/strings/components_strings_vi.xtb
+++ b/chromium/components/strings/components_strings_vi.xtb
@@ -20,11 +20,11 @@
<translation id="1111153019813902504">Dấu trang gần đây</translation>
<translation id="1113869188872983271">&amp;Hoàn tác sắp xếp lại</translation>
<translation id="1126551341858583091">Kích thước trên bộ nhớ cục bộ là <ph name="CRASH_SIZE" />.</translation>
-<translation id="112840717907525620">Bộ nhớ cache chính sách OK</translation>
+<translation id="112840717907525620">Bộ nhớ đệm chính sách OK</translation>
<translation id="1132774398110320017">Cài đặt tự động điền trên Chrome...</translation>
<translation id="1150979032973867961">Máy chủ này không chứng minh được rằng đó là <ph name="DOMAIN" />; chứng chỉ bảo mật của máy chủ này không được hệ điều hành máy tính của bạn tin cậy. Điều này có thể do định cấu hình sai hoặc có kẻ tấn công chặn kết nối của bạn.</translation>
<translation id="1151972924205500581">Mật khẩu bắt buộc</translation>
-<translation id="1152921474424827756">Truy cập <ph name="BEGIN_LINK" />bản sao được lưu trong bộ nhớ cache<ph name="END_LINK" /> của <ph name="URL" /></translation>
+<translation id="1152921474424827756">Truy cập <ph name="BEGIN_LINK" />bản sao được lưu trong bộ nhớ đệm<ph name="END_LINK" /> của <ph name="URL" /></translation>
<translation id="1158211211994409885"><ph name="HOST_NAME" /> đã bất ngờ đóng kết nối.</translation>
<translation id="1161325031994447685">Kết nối lại với Wi-Fi</translation>
<translation id="1165039591588034296">Lỗi</translation>
@@ -180,7 +180,7 @@
<translation id="2270484714375784793">Số điện thoại</translation>
<translation id="2292556288342944218">Quyền truy cập Internet của bạn bị chặn</translation>
<translation id="230155334948463882">Thẻ mới?</translation>
-<translation id="2316887270356262533">Bộ nhớ cache còn chưa đầy 1 MB. Một số trang web có thể tải chậm hơn vào lần tới bạn truy cập.</translation>
+<translation id="2316887270356262533">Bộ nhớ đệm còn chưa đầy 1 MB. Một số trang web có thể tải chậm hơn vào lần tới bạn truy cập.</translation>
<translation id="2317259163369394535"><ph name="DOMAIN" /> yêu cầu tên người dùng và mật khẩu.</translation>
<translation id="2317583587496011522">Thẻ ghi nợ được chấp nhận.</translation>
<translation id="2337852623177822836">Cài đặt do quản trị viên kiểm soát</translation>
@@ -234,7 +234,7 @@
<translation id="2702801445560668637">Danh sách đọc</translation>
<translation id="2704283930420550640">Giá trị không khớp với định dạng.</translation>
<translation id="2704951214193499422">Chromium không thể xác nhận thẻ của bạn tại thời điểm này. Vui lòng thử lại sau.</translation>
-<translation id="2705137772291741111">Không thể đọc được bản sao đã lưu (đã lưu vào bộ nhớ cache) của trang web này.</translation>
+<translation id="2705137772291741111">Không thể đọc được bản sao đã lưu (đã lưu vào bộ nhớ đệm) của trang web này.</translation>
<translation id="2709516037105925701">Tự động điền</translation>
<translation id="2710942282213947212">Phần mềm trên máy tính của bạn hiện không cho Chromium kết nối an toàn với web</translation>
<translation id="2712173769900027643">Xin phép</translation>
@@ -714,7 +714,7 @@
<translation id="6321917430147971392">Kiểm tra cài đặt DNS của bạn</translation>
<translation id="6328639280570009161">Thử tắt dự đoán mạng</translation>
<translation id="6328786501058569169">Đây là trang web lừa đảo</translation>
-<translation id="6337133576188860026">Bộ nhớ cache còn chưa đầy <ph name="SIZE" />. Một số trang web có thể tải chậm hơn vào lần tới bạn truy cập.</translation>
+<translation id="6337133576188860026">Bộ nhớ đệm còn chưa đầy <ph name="SIZE" />. Một số trang web có thể tải chậm hơn vào lần tới bạn truy cập.</translation>
<translation id="6337534724793800597">Lọc chính sách theo tên</translation>
<translation id="6342069812937806050">Vừa mới</translation>
<translation id="6355080345576803305">Ghi đè phiên công khai</translation>
@@ -875,7 +875,7 @@
<translation id="7704050614460855821"><ph name="BEGIN_LINK" />Tiếp tục truy cập <ph name="SITE" /> (không an toàn)<ph name="END_LINK" /></translation>
<translation id="7714464543167945231">Chứng chỉ</translation>
<translation id="7716147886133743102">Bị quản trị viên của bạn chặn</translation>
-<translation id="7716424297397655342">Không thể tải trang web này từ bộ nhớ cache</translation>
+<translation id="7716424297397655342">Không thể tải trang web này từ bộ nhớ đệm</translation>
<translation id="7723047071702270851">Chỉnh sửa thẻ</translation>
<translation id="774634243536837715">Đã chặn nội dung nguy hiểm.</translation>
<translation id="7752995774971033316">Không được quản lý</translation>
diff --git a/chromium/components/ukm/ukm_service.cc b/chromium/components/ukm/ukm_service.cc
index 90a43fc3bba..31bb4a2f09e 100644
--- a/chromium/components/ukm/ukm_service.cc
+++ b/chromium/components/ukm/ukm_service.cc
@@ -221,6 +221,7 @@ void UkmService::RotateLog() {
if (!reporting_service_.ukm_log_store()->has_unsent_logs())
BuildAndStoreLog();
reporting_service_.Start();
+ scheduler_->RotationFinished();
}
void UkmService::BuildAndStoreLog() {
diff --git a/chromium/content/app/strings/translations/content_strings_ca.xtb b/chromium/content/app/strings/translations/content_strings_ca.xtb
index 66069746170..422ed220d8d 100644
--- a/chromium/content/app/strings/translations/content_strings_ca.xtb
+++ b/chromium/content/app/strings/translations/content_strings_ca.xtb
@@ -89,7 +89,7 @@
<translation id="479989351350248267">cerca</translation>
<translation id="4812940957355064477">Introduïu un número.</translation>
<translation id="4975562563186953947">Elements seleccionats: <ph name="SELECTED_COUNT" /></translation>
-<translation id="4992066212339426712">Deixa de silenciar</translation>
+<translation id="4992066212339426712">Activa el so</translation>
<translation id="49969490063480558">Introduïu un domini precedit per "<ph name="ATSIGN" />". "<ph name="INVALIDADDRESS" />" no és una adreça electrònica completa.</translation>
<translation id="5034860022980953847">indicador de progrés</translation>
<translation id="5117590920725113268">Mostra el mes següent</translation>
@@ -123,7 +123,7 @@
<translation id="6404546809543547843">barra de moment de l'àudio</translation>
<translation id="648732519525291180">selector d'hora</translation>
<translation id="6550675742724504774">Opcions</translation>
-<translation id="658823671542763450">visualitza en pantalla completa</translation>
+<translation id="658823671542763450">passa a pantalla completa</translation>
<translation id="663493177488814956">El meu tauler</translation>
<translation id="6637586476836377253">registre</translation>
<translation id="6643016212128521049">Esborra</translation>
diff --git a/chromium/content/app/strings/translations/content_strings_mr.xtb b/chromium/content/app/strings/translations/content_strings_mr.xtb
index 44b3db8d98c..942c1688cdc 100644
--- a/chromium/content/app/strings/translations/content_strings_mr.xtb
+++ b/chromium/content/app/strings/translations/content_strings_mr.xtb
@@ -83,14 +83,14 @@
<translation id="4522570452068850558">तपशील</translation>
<translation id="4597532268155981612">फॉर्म</translation>
<translation id="4661075872484491155">tree</translation>
-<translation id="4664250907885839816">'<ph name="ATSIGN" />' चे अनुसरण करणार्‍या भागामध्ये '<ph name="INVALIDCHARACTER" />' चिन्ह नसावे.</translation>
+<translation id="4664250907885839816">'<ph name="ATSIGN" />' चे फॉलो करणार्‍या भागामध्ये '<ph name="INVALIDCHARACTER" />' चिन्ह नसावे.</translation>
<translation id="4757246831282535685">टॅब पॅनेल</translation>
<translation id="4763480195061959176">व्हिडिओ</translation>
<translation id="479989351350248267">search</translation>
<translation id="4812940957355064477">कृपया एक नंबर एंटर करा.</translation>
<translation id="4975562563186953947"><ph name="SELECTED_COUNT" /> निवडले</translation>
<translation id="4992066212339426712">सशब्द करा</translation>
-<translation id="49969490063480558">कृपया '<ph name="ATSIGN" />' चे अनुसरण करणारा भाग एंटर करा. '<ph name="INVALIDADDRESS" />' अपूर्ण आहे.</translation>
+<translation id="49969490063480558">कृपया '<ph name="ATSIGN" />' चे फॉलो करणारा भाग एंटर करा. '<ph name="INVALIDADDRESS" />' अपूर्ण आहे.</translation>
<translation id="5034860022980953847">प्रगती सूचक</translation>
<translation id="5117590920725113268">पुढील महिना दर्शवा</translation>
<translation id="512758898067543763">पंक्ती शीर्षलेख</translation>
diff --git a/chromium/content/app/strings/translations/content_strings_sk.xtb b/chromium/content/app/strings/translations/content_strings_sk.xtb
index 805d32a0f2c..1c1a62cf846 100644
--- a/chromium/content/app/strings/translations/content_strings_sk.xtb
+++ b/chromium/content/app/strings/translations/content_strings_sk.xtb
@@ -89,7 +89,7 @@
<translation id="479989351350248267">search</translation>
<translation id="4812940957355064477">Zadajte číslo.</translation>
<translation id="4975562563186953947">Počet vybraných položiek: <ph name="SELECTED_COUNT" /></translation>
-<translation id="4992066212339426712">Obnoviť zvuk</translation>
+<translation id="4992066212339426712">Zapnúť zvuk</translation>
<translation id="49969490063480558">Zadajte časť za znakom <ph name="ATSIGN" />. Adresa <ph name="INVALIDADDRESS" /> je neúplná.</translation>
<translation id="5034860022980953847">indikátor priebehu</translation>
<translation id="5117590920725113268">Zobraziť ďalší mesiac</translation>
@@ -112,7 +112,7 @@
<translation id="5860033963881614850">Vypnuté</translation>
<translation id="588258955323874662">Celá obrazovka</translation>
<translation id="5888666972993069672">Prenáša sa do zariadenia <ph name="DEVICE_FRIENDLY_NAME" /></translation>
-<translation id="5939518447894949180">Obnoviť</translation>
+<translation id="5939518447894949180">Resetovať</translation>
<translation id="5966707198760109579">Týždeň</translation>
<translation id="5987525920412732405">tlačidlo otáčania</translation>
<translation id="6015796118275082299">Rok</translation>
diff --git a/chromium/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/chromium/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index 8730105f5ac..12127ab774e 100644
--- a/chromium/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/chromium/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -297,6 +297,11 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityActions) {
RunHtmlTest(FILE_PATH_LITERAL("actions.html"));
}
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityAddClickListener) {
+ RunHtmlTest(FILE_PATH_LITERAL("add-click-listener.html"));
+}
+
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAddress) {
RunHtmlTest(FILE_PATH_LITERAL("address.html"));
}
diff --git a/chromium/content/browser/appcache/appcache_dispatcher_host.cc b/chromium/content/browser/appcache/appcache_dispatcher_host.cc
index 91068572304..d5c6a6f1266 100644
--- a/chromium/content/browser/appcache/appcache_dispatcher_host.cc
+++ b/chromium/content/browser/appcache/appcache_dispatcher_host.cc
@@ -12,7 +12,6 @@
#include "content/browser/bad_message.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/browser_side_navigation_policy.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
namespace content {
@@ -33,13 +32,13 @@ AppCacheDispatcherHost::~AppCacheDispatcherHost() = default;
void AppCacheDispatcherHost::Create(ChromeAppCacheService* appcache_service,
int process_id,
mojom::AppCacheBackendRequest request) {
- mojo::MakeStrongBinding(
+ appcache_service->Bind(
std::make_unique<AppCacheDispatcherHost>(appcache_service, process_id),
std::move(request));
}
void AppCacheDispatcherHost::RegisterHost(int32_t host_id) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
// PlzNavigate
// The AppCacheHost could have been precreated in which case we want to
// register it with the backend here.
@@ -58,7 +57,7 @@ void AppCacheDispatcherHost::RegisterHost(int32_t host_id) {
}
void AppCacheDispatcherHost::UnregisterHost(int32_t host_id) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (!backend_impl_.UnregisterHost(host_id)) {
mojo::ReportBadMessage("ACDH_UNREGISTER");
}
@@ -67,7 +66,7 @@ void AppCacheDispatcherHost::UnregisterHost(int32_t host_id) {
void AppCacheDispatcherHost::SetSpawningHostId(int32_t host_id,
int spawning_host_id) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (!backend_impl_.SetSpawningHostId(host_id, spawning_host_id))
mojo::ReportBadMessage("ACDH_SET_SPAWNING");
}
@@ -77,7 +76,7 @@ void AppCacheDispatcherHost::SelectCache(int32_t host_id,
const GURL& document_url,
int64_t cache_document_was_loaded_from,
const GURL& opt_manifest_url) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (!backend_impl_.SelectCache(host_id, document_url,
cache_document_was_loaded_from,
opt_manifest_url)) {
@@ -90,7 +89,7 @@ void AppCacheDispatcherHost::SelectCache(int32_t host_id,
void AppCacheDispatcherHost::SelectCacheForSharedWorker(int32_t host_id,
int64_t appcache_id) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (!backend_impl_.SelectCacheForSharedWorker(host_id, appcache_id))
mojo::ReportBadMessage("ACDH_SELECT_CACHE_FOR_SHARED_WORKER");
} else {
@@ -102,7 +101,7 @@ void AppCacheDispatcherHost::MarkAsForeignEntry(
int32_t host_id,
const GURL& document_url,
int64_t cache_document_was_loaded_from) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (!backend_impl_.MarkAsForeignEntry(host_id, document_url,
cache_document_was_loaded_from)) {
mojo::ReportBadMessage("ACDH_MARK_AS_FOREIGN_ENTRY");
@@ -114,7 +113,7 @@ void AppCacheDispatcherHost::GetResourceList(int32_t host_id,
GetResourceListCallback callback) {
std::vector<AppCacheResourceInfo> params;
std::vector<mojom::AppCacheResourceInfoPtr> out;
- if (appcache_service_.get()) {
+ if (appcache_service_) {
backend_impl_.GetResourceList(host_id, &params);
// Box up params for output.
@@ -128,7 +127,7 @@ void AppCacheDispatcherHost::GetResourceList(int32_t host_id,
void AppCacheDispatcherHost::GetStatus(int32_t host_id,
GetStatusCallback callback) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (backend_impl_.GetStatusWithCallback(host_id, &callback)) {
return;
} else {
@@ -140,7 +139,7 @@ void AppCacheDispatcherHost::GetStatus(int32_t host_id,
void AppCacheDispatcherHost::StartUpdate(int32_t host_id,
StartUpdateCallback callback) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (backend_impl_.StartUpdateWithCallback(host_id, &callback)) {
return;
} else {
@@ -152,7 +151,7 @@ void AppCacheDispatcherHost::StartUpdate(int32_t host_id,
void AppCacheDispatcherHost::SwapCache(int32_t host_id,
SwapCacheCallback callback) {
- if (appcache_service_.get()) {
+ if (appcache_service_) {
if (backend_impl_.SwapCacheWithCallback(host_id, &callback)) {
return;
} else {
diff --git a/chromium/content/browser/appcache/appcache_dispatcher_host.h b/chromium/content/browser/appcache/appcache_dispatcher_host.h
index be83670e8db..0b9e7d5657b 100644
--- a/chromium/content/browser/appcache/appcache_dispatcher_host.h
+++ b/chromium/content/browser/appcache/appcache_dispatcher_host.h
@@ -56,7 +56,8 @@ class AppCacheDispatcherHost : public mojom::AppCacheBackend {
void GetResourceList(int32_t host_id,
GetResourceListCallback callback) override;
- scoped_refptr<ChromeAppCacheService> appcache_service_;
+ // This object is owned by the |ChromeAppCacheService|, so this is safe.
+ ChromeAppCacheService* appcache_service_;
AppCacheFrontendProxy frontend_proxy_;
AppCacheBackendImpl backend_impl_;
diff --git a/chromium/content/browser/appcache/chrome_appcache_service.cc b/chromium/content/browser/appcache/chrome_appcache_service.cc
index db7f04b2cc4..d639909ef0d 100644
--- a/chromium/content/browser/appcache/chrome_appcache_service.cc
+++ b/chromium/content/browser/appcache/chrome_appcache_service.cc
@@ -43,6 +43,16 @@ void ChromeAppCacheService::InitializeOnIOThread(
set_special_storage_policy(special_storage_policy.get());
}
+void ChromeAppCacheService::Bind(
+ std::unique_ptr<mojom::AppCacheBackend> backend,
+ mojom::AppCacheBackendRequest request) {
+ bindings_.AddBinding(std::move(backend), std::move(request));
+}
+
+void ChromeAppCacheService::Shutdown() {
+ bindings_.CloseAllBindings();
+}
+
bool ChromeAppCacheService::CanLoadAppCache(const GURL& manifest_url,
const GURL& first_party) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
diff --git a/chromium/content/browser/appcache/chrome_appcache_service.h b/chromium/content/browser/appcache/chrome_appcache_service.h
index d4a2430c5ee..7845936ea43 100644
--- a/chromium/content/browser/appcache/chrome_appcache_service.h
+++ b/chromium/content/browser/appcache/chrome_appcache_service.h
@@ -11,7 +11,9 @@
#include "base/sequenced_task_runner_helpers.h"
#include "content/browser/appcache/appcache_policy.h"
#include "content/browser/appcache/appcache_service_impl.h"
+#include "content/common/appcache.mojom.h"
#include "content/common/content_export.h"
+#include "mojo/public/cpp/bindings/strong_binding_set.h"
#include "storage/browser/quota/special_storage_policy.h"
namespace base {
@@ -53,6 +55,11 @@ class CONTENT_EXPORT ChromeAppCacheService
net::URLRequestContextGetter* request_context_getter,
scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy);
+ void Bind(std::unique_ptr<mojom::AppCacheBackend> backend,
+ mojom::AppCacheBackendRequest request);
+
+ void Shutdown();
+
// AppCachePolicy overrides
bool CanLoadAppCache(const GURL& manifest_url,
const GURL& first_party) override;
@@ -72,6 +79,7 @@ class CONTENT_EXPORT ChromeAppCacheService
ResourceContext* resource_context_;
base::FilePath cache_path_;
+ mojo::StrongBindingSet<mojom::AppCacheBackend> bindings_;
DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService);
};
diff --git a/chromium/content/browser/child_process_launcher_helper_mac.cc b/chromium/content/browser/child_process_launcher_helper_mac.cc
index fe69395324b..ebd44341ef2 100644
--- a/chromium/content/browser/child_process_launcher_helper_mac.cc
+++ b/chromium/content/browser/child_process_launcher_helper_mac.cc
@@ -25,6 +25,7 @@
#include "services/service_manager/sandbox/mac/common_v2.sb.h"
#include "services/service_manager/sandbox/mac/gpu_v2.sb.h"
#include "services/service_manager/sandbox/mac/nacl_loader.sb.h"
+#include "services/service_manager/sandbox/mac/pdf_compositor.sb.h"
#include "services/service_manager/sandbox/mac/ppapi_v2.sb.h"
#include "services/service_manager/sandbox/mac/renderer_v2.sb.h"
#include "services/service_manager/sandbox/mac/utility.sb.h"
@@ -113,8 +114,10 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
case service_manager::SANDBOX_TYPE_RENDERER:
profile += service_manager::kSeatbeltPolicyString_renderer_v2;
break;
- case service_manager::SANDBOX_TYPE_UTILITY:
case service_manager::SANDBOX_TYPE_PDF_COMPOSITOR:
+ profile += service_manager::kSeatbeltPolicyString_pdf_compositor;
+ break;
+ case service_manager::SANDBOX_TYPE_UTILITY:
case service_manager::SANDBOX_TYPE_PROFILING:
profile += service_manager::kSeatbeltPolicyString_utility;
break;
@@ -137,10 +140,10 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
case service_manager::SANDBOX_TYPE_NACL_LOADER:
case service_manager::SANDBOX_TYPE_PPAPI:
case service_manager::SANDBOX_TYPE_RENDERER:
+ case service_manager::SANDBOX_TYPE_PDF_COMPOSITOR:
SetupCommonSandboxParameters(seatbelt_exec_client_.get());
break;
case service_manager::SANDBOX_TYPE_UTILITY:
- case service_manager::SANDBOX_TYPE_PDF_COMPOSITOR:
case service_manager::SANDBOX_TYPE_PROFILING:
SetupUtilitySandboxParameters(seatbelt_exec_client_.get(),
*command_line_.get());
@@ -151,7 +154,7 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
int pipe = seatbelt_exec_client_->SendProfileAndGetFD();
if (pipe < 0) {
- LOG(ERROR) << "pipe for sending sandbox profile is an invalid FD";
+ LOG(ERROR) << "Sending the seatbelt profile failed.";
return false;
}
diff --git a/chromium/content/browser/frame_host/render_frame_host_impl.cc b/chromium/content/browser/frame_host/render_frame_host_impl.cc
index 1879ab63097..bbb9f413e99 100644
--- a/chromium/content/browser/frame_host/render_frame_host_impl.cc
+++ b/chromium/content/browser/frame_host/render_frame_host_impl.cc
@@ -3670,26 +3670,29 @@ void RenderFrameHostImpl::FailedNavigation(
// completing an unload handler.
ResetWaitingState();
- StoragePartitionImpl* storage_partition =
- static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
- GetSiteInstance()->GetBrowserContext(), GetSiteInstance()));
-
- network::mojom::URLLoaderFactoryPtr default_factory;
- if (g_url_loader_factory_callback_for_test.Get().is_null()) {
- storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
- mojo::MakeRequest(&default_factory), GetProcess()->GetID());
- } else {
- network::mojom::URLLoaderFactoryPtr original_factory;
- storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
- mojo::MakeRequest(&original_factory), GetProcess()->GetID());
- g_url_loader_factory_callback_for_test.Get().Run(
- mojo::MakeRequest(&default_factory), GetProcess()->GetID(),
- original_factory.PassInterface());
- }
-
base::Optional<URLLoaderFactoryBundle> subresource_loader_factories;
- subresource_loader_factories.emplace();
- subresource_loader_factories->SetDefaultFactory(std::move(default_factory));
+ if (base::FeatureList::IsEnabled(features::kNetworkService)) {
+ StoragePartitionImpl* storage_partition =
+ static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
+ GetSiteInstance()->GetBrowserContext(), GetSiteInstance()));
+
+ network::mojom::URLLoaderFactoryPtr default_factory;
+ if (g_url_loader_factory_callback_for_test.Get().is_null()) {
+ storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
+ mojo::MakeRequest(&default_factory), GetProcess()->GetID());
+ } else {
+ network::mojom::URLLoaderFactoryPtr original_factory;
+ storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
+ mojo::MakeRequest(&original_factory), GetProcess()->GetID());
+ g_url_loader_factory_callback_for_test.Get().Run(
+ mojo::MakeRequest(&default_factory), GetProcess()->GetID(),
+ original_factory.PassInterface());
+ }
+
+
+ subresource_loader_factories.emplace();
+ subresource_loader_factories->SetDefaultFactory(std::move(default_factory));
+ }
GetNavigationControl()->CommitFailedNavigation(
common_params, request_params, has_stale_copy_in_cache, error_code,
diff --git a/chromium/content/browser/gpu/gpu_data_manager_impl.cc b/chromium/content/browser/gpu/gpu_data_manager_impl.cc
index 2ca8d121957..f1fecdc1ae4 100644
--- a/chromium/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/chromium/content/browser/gpu/gpu_data_manager_impl.cc
@@ -117,6 +117,12 @@ void GpuDataManagerImpl::SetGpuInfo(const gpu::GPUInfo& gpu_info) {
private_->SetGpuInfo(gpu_info);
}
+void GpuDataManagerImpl::GetDisabledWebGLExtensions(
+ std::string* disabled_webgl_extensions) const {
+ base::AutoLock auto_lock(lock_);
+ private_->GetDisabledWebGLExtensions(disabled_webgl_extensions);
+}
+
void GpuDataManagerImpl::Initialize() {
base::AutoLock auto_lock(lock_);
private_->Initialize();
diff --git a/chromium/content/browser/gpu/gpu_data_manager_impl.h b/chromium/content/browser/gpu/gpu_data_manager_impl.h
index 54e4e79e917..6342bde752c 100644
--- a/chromium/content/browser/gpu/gpu_data_manager_impl.h
+++ b/chromium/content/browser/gpu/gpu_data_manager_impl.h
@@ -89,6 +89,8 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager {
void GetDisabledExtensions(std::string* disabled_extensions) const override;
void SetGpuInfo(const gpu::GPUInfo& gpu_info) override;
+ void GetDisabledWebGLExtensions(std::string* disabled_webgl_extensions) const;
+
bool IsGpuFeatureInfoAvailable() const;
gpu::GpuFeatureStatus GetFeatureStatus(gpu::GpuFeatureType feature) const;
diff --git a/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc b/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc
index f5f51f69042..a399375e3cd 100644
--- a/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/chromium/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -861,6 +861,12 @@ void GpuDataManagerImplPrivate::GetDisabledExtensions(
*disabled_extensions = gpu_feature_info_.disabled_extensions;
}
+void GpuDataManagerImplPrivate::GetDisabledWebGLExtensions(
+ std::string* disabled_webgl_extensions) const {
+ DCHECK(disabled_webgl_extensions);
+ *disabled_webgl_extensions = gpu_feature_info_.disabled_webgl_extensions;
+}
+
void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs(
const GURL& url, GpuDataManagerImpl::DomainGuilt guilt) {
BlockDomainFrom3DAPIsAtTime(url, guilt, base::Time::Now());
diff --git a/chromium/content/browser/gpu/gpu_data_manager_impl_private.h b/chromium/content/browser/gpu/gpu_data_manager_impl_private.h
index b1d1f19e0a7..bfebf68e830 100644
--- a/chromium/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/chromium/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -88,6 +88,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
void HandleGpuSwitch();
void GetDisabledExtensions(std::string* disabled_extensions) const;
+ void GetDisabledWebGLExtensions(std::string* disabled_webgl_extensions) const;
void BlockDomainFrom3DAPIs(
const GURL& url, GpuDataManagerImpl::DomainGuilt guilt);
diff --git a/chromium/content/browser/gpu/gpu_data_manager_testing_autogen.cc b/chromium/content/browser/gpu/gpu_data_manager_testing_autogen.cc
index 05c1e100eb4..160cadaf50a 100644
--- a/chromium/content/browser/gpu/gpu_data_manager_testing_autogen.cc
+++ b/chromium/content/browser/gpu/gpu_data_manager_testing_autogen.cc
@@ -23,6 +23,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry1, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -49,6 +51,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry2, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -75,6 +79,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry3, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -101,6 +107,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry4, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -127,6 +135,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry5, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -153,6 +163,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry6, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -179,6 +191,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry7, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -205,6 +219,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry8, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -231,6 +247,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry9, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -257,6 +275,8 @@ const GpuControlList::Entry kGpuDataManagerTestingEntries[] = {
kFeatureListForEntry10, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
diff --git a/chromium/content/browser/gpu/gpu_internals_ui.cc b/chromium/content/browser/gpu/gpu_internals_ui.cc
index faa2948051f..2861a054395 100644
--- a/chromium/content/browser/gpu/gpu_internals_ui.cc
+++ b/chromium/content/browser/gpu/gpu_internals_ui.cc
@@ -182,6 +182,10 @@ std::unique_ptr<base::DictionaryValue> GpuInfoAsDictionaryValue() {
GpuDataManagerImpl::GetInstance()->GetDisabledExtensions(
&disabled_extensions);
+ std::string disabled_webgl_extensions;
+ GpuDataManagerImpl::GetInstance()->GetDisabledWebGLExtensions(
+ &disabled_webgl_extensions);
+
basic_info->Append(
NewDescriptionValuePair("Driver vendor", gpu_info.driver_vendor));
basic_info->Append(NewDescriptionValuePair("Driver version",
@@ -208,6 +212,8 @@ std::unique_ptr<base::DictionaryValue> GpuInfoAsDictionaryValue() {
gpu_info.gl_extensions));
basic_info->Append(NewDescriptionValuePair("Disabled Extensions",
disabled_extensions));
+ basic_info->Append(NewDescriptionValuePair("Disabled WebGL Extensions",
+ disabled_webgl_extensions));
basic_info->Append(NewDescriptionValuePair("Window system binding vendor",
gpu_info.gl_ws_vendor));
basic_info->Append(NewDescriptionValuePair("Window system binding version",
diff --git a/chromium/content/browser/quota_dispatcher_host.h b/chromium/content/browser/quota_dispatcher_host.h
index e850077aecd..681409e56ad 100644
--- a/chromium/content/browser/quota_dispatcher_host.h
+++ b/chromium/content/browser/quota_dispatcher_host.h
@@ -77,7 +77,7 @@ class QuotaDispatcherHost : public blink::mojom::QuotaDispatcherHost {
// The ID of this process.
int process_id_;
- storage::QuotaManager* quota_manager_;
+ scoped_refptr<storage::QuotaManager> quota_manager_;
scoped_refptr<QuotaPermissionContext> permission_context_;
base::WeakPtrFactory<QuotaDispatcherHost> weak_factory_;
diff --git a/chromium/content/browser/renderer_host/render_message_filter.cc b/chromium/content/browser/renderer_host/render_message_filter.cc
index a9dc1297bb4..216d3799fb8 100644
--- a/chromium/content/browser/renderer_host/render_message_filter.cc
+++ b/chromium/content/browser/renderer_host/render_message_filter.cc
@@ -67,7 +67,7 @@
#include "url/origin.h"
#if defined(OS_WIN)
-#include "content/common/font_cache_dispatcher_win.h"
+#include "content/public/common/font_cache_dispatcher_win.h"
#endif
#if defined(OS_POSIX)
diff --git a/chromium/content/browser/renderer_host/render_process_host_browsertest.cc b/chromium/content/browser/renderer_host/render_process_host_browsertest.cc
index 9a53e0170c6..d845ca2e1ec 100644
--- a/chromium/content/browser/renderer_host/render_process_host_browsertest.cc
+++ b/chromium/content/browser/renderer_host/render_process_host_browsertest.cc
@@ -148,6 +148,11 @@ class RenderProcessHostWithKeepAliveOptionEnabledTest
RenderProcessHostTest::SetUp();
}
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ command_line->AppendSwitch(
+ switches::kEnableExperimentalWebPlatformFeatures);
+ }
+
private:
base::test::ScopedFeatureList feature_list_;
};
diff --git a/chromium/content/browser/renderer_host/render_view_host_impl.cc b/chromium/content/browser/renderer_host/render_view_host_impl.cc
index 6d465203cbc..2666aecad29 100644
--- a/chromium/content/browser/renderer_host/render_view_host_impl.cc
+++ b/chromium/content/browser/renderer_host/render_view_host_impl.cc
@@ -813,8 +813,7 @@ void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) {
}
void RenderViewHostImpl::OnUpdateTargetURL(const GURL& url) {
- if (is_active_)
- delegate_->UpdateTargetURL(this, url);
+ delegate_->UpdateTargetURL(this, url);
// Send a notification back to the renderer that we are ready to
// receive more target urls.
diff --git a/chromium/content/browser/renderer_host/render_widget_host_impl.cc b/chromium/content/browser/renderer_host/render_widget_host_impl.cc
index 2ee0858b2df..71e87977be5 100644
--- a/chromium/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/chromium/content/browser/renderer_host/render_widget_host_impl.cc
@@ -14,6 +14,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/containers/hash_tables.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/i18n/rtl.h"
#include "base/lazy_instance.h"
#include "base/location.h"
@@ -2709,13 +2710,24 @@ void RenderWidgetHostImpl::SubmitCompositorFrame(
if (local_surface_id == last_local_surface_id_ &&
SurfacePropertiesMismatch(new_surface_properties,
last_surface_properties_)) {
+ std::string error = base::StringPrintf(
+ "[OOPIF? %d] %s\n", view_ && view_->IsRenderWidgetHostViewChildFrame(),
+ new_surface_properties.ToDiffString(last_surface_properties_).c_str());
+ LOG(ERROR) << "Surface invariants violation: " << error;
+
static auto* crash_key = base::debug::AllocateCrashKeyString(
"surface-invariants-violation", base::debug::CrashKeySize::Size256);
- base::debug::ScopedCrashKeyString key_value(
- crash_key,
- new_surface_properties.ToDiffString(last_surface_properties_));
- bad_message::ReceivedBadMessage(
- GetProcess(), bad_message::RWH_SURFACE_INVARIANTS_VIOLATION);
+ base::debug::ScopedCrashKeyString key_value(crash_key, error);
+ base::debug::DumpWithoutCrashing();
+
+ if (view_) {
+ frame.metadata.begin_frame_ack.has_damage = false;
+ view_->OnDidNotProduceFrame(frame.metadata.begin_frame_ack);
+ }
+ std::vector<viz::ReturnedResource> resources =
+ viz::TransferableResource::ReturnResources(frame.resource_list);
+ renderer_compositor_frame_sink_->DidReceiveCompositorFrameAck(resources);
+
return;
}
diff --git a/chromium/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc b/chromium/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
index 2c81b9db02b..06517661144 100644
--- a/chromium/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
+++ b/chromium/content/browser/renderer_host/render_widget_host_input_event_router_unittest.cc
@@ -7,11 +7,13 @@
#include "base/run_loop.h"
#include "base/test/scoped_task_environment.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/browser/renderer_host/render_widget_targeter.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/mock_render_widget_host_delegate.h"
#include "content/test/mock_widget_impl.h"
#include "content/test/test_render_view_host.h"
+#include "services/viz/public/interfaces/hit_test/input_target_client.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -56,13 +58,17 @@ class MockRootRenderWidgetHostView : public MockRenderWidgetHostView {
MockRootRenderWidgetHostView(
RenderWidgetHost* rwh,
std::map<MockRenderWidgetHostView*, viz::FrameSinkId>& frame_sink_id_map)
- : MockRenderWidgetHostView(rwh), frame_sink_id_map_(frame_sink_id_map) {}
+ : MockRenderWidgetHostView(rwh),
+ frame_sink_id_map_(frame_sink_id_map),
+ force_query_renderer_on_hit_test_(false) {}
~MockRootRenderWidgetHostView() override {}
viz::FrameSinkId FrameSinkIdAtPoint(viz::SurfaceHittestDelegate*,
const gfx::PointF&,
gfx::PointF*,
- bool*) override {
+ bool* query_renderer) override {
+ if (force_query_renderer_on_hit_test_)
+ *query_renderer = true;
return frame_sink_id_map_[current_hittest_result_];
}
@@ -77,9 +83,14 @@ class MockRootRenderWidgetHostView : public MockRenderWidgetHostView {
current_hittest_result_ = view;
}
+ void set_force_query_renderer_on_hit_test(bool force) {
+ force_query_renderer_on_hit_test_ = force;
+ }
+
private:
std::map<MockRenderWidgetHostView*, viz::FrameSinkId>& frame_sink_id_map_;
MockRenderWidgetHostView* current_hittest_result_;
+ bool force_query_renderer_on_hit_test_;
};
} // namespace
@@ -288,4 +299,132 @@ TEST_F(RenderWidgetHostInputEventRouterTest, EnsureDroppedTouchEventsAreAcked) {
EXPECT_EQ(view_root_->last_id_for_touch_ack(), 2lu);
}
+TEST_F(RenderWidgetHostInputEventRouterTest, DoNotCoalesceTouchEvents) {
+ RenderWidgetTargeter* targeter = rwhier_.GetRenderWidgetTargeterForTests();
+ view_root_->SetHittestResult(view_root_.get());
+ view_root_->set_force_query_renderer_on_hit_test(true);
+
+ // We need to set up a comm pipe, or else the targeter will crash when it
+ // tries to query the renderer. It doesn't matter that the pipe isn't
+ // connected on the other end, as we really don't want it to respond anyways.
+ std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces =
+ std::make_unique<service_manager::InterfaceProvider>();
+ viz::mojom::InputTargetClientPtr input_target_client;
+ remote_interfaces->GetInterface(&input_target_client);
+ widget_host1_->SetInputTargetClient(std::move(input_target_client));
+
+ // Send TouchStart, TouchMove, TouchMove, TouchMove, TouchEnd and make sure
+ // the targeter doesn't attempt to coalesce.
+ blink::WebTouchEvent touch_event(blink::WebInputEvent::kTouchStart,
+ blink::WebInputEvent::kNoModifiers,
+ blink::WebInputEvent::kTimeStampForTesting);
+ touch_event.touches_length = 1;
+ touch_event.touches[0].state = blink::WebTouchPoint::kStatePressed;
+ touch_event.unique_touch_event_id = 1;
+
+ EXPECT_EQ(0u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_FALSE(targeter->is_request_in_flight_for_testing());
+ rwhier_.RouteTouchEvent(view_root_.get(), &touch_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(0u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ touch_event.SetType(blink::WebInputEvent::kTouchMove);
+ touch_event.touches[0].state = blink::WebTouchPoint::kStateMoved;
+ touch_event.unique_touch_event_id += 1;
+ rwhier_.RouteTouchEvent(view_root_.get(), &touch_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(1u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ touch_event.unique_touch_event_id += 1;
+ rwhier_.RouteTouchEvent(view_root_.get(), &touch_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(2u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ touch_event.SetType(blink::WebInputEvent::kTouchEnd);
+ touch_event.touches[0].state = blink::WebTouchPoint::kStateReleased;
+ touch_event.unique_touch_event_id += 1;
+ rwhier_.RouteTouchEvent(view_root_.get(), &touch_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+
+ EXPECT_EQ(3u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+}
+
+TEST_F(RenderWidgetHostInputEventRouterTest, DoNotCoalesceGestureEvents) {
+ RenderWidgetTargeter* targeter = rwhier_.GetRenderWidgetTargeterForTests();
+ view_root_->SetHittestResult(view_root_.get());
+ view_root_->set_force_query_renderer_on_hit_test(true);
+
+ // We need to set up a comm pipe, or else the targeter will crash when it
+ // tries to query the renderer. It doesn't matter that the pipe isn't
+ // connected on the other end, as we really don't want it to respond anyways.
+ std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces =
+ std::make_unique<service_manager::InterfaceProvider>();
+ viz::mojom::InputTargetClientPtr input_target_client;
+ remote_interfaces->GetInterface(&input_target_client);
+ widget_host1_->SetInputTargetClient(std::move(input_target_client));
+
+ // Send TouchStart, GestureTapDown, TouchEnd, GestureScrollBegin,
+ // GestureScrollUpdate (x2), GestureScrollEnd and make sure
+ // the targeter doesn't attempt to coalesce.
+ blink::WebTouchEvent touch_event(blink::WebInputEvent::kTouchStart,
+ blink::WebInputEvent::kNoModifiers,
+ blink::WebInputEvent::kTimeStampForTesting);
+ touch_event.touches_length = 1;
+ touch_event.touches[0].state = blink::WebTouchPoint::kStatePressed;
+ touch_event.unique_touch_event_id = 1;
+
+ EXPECT_EQ(0u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_FALSE(targeter->is_request_in_flight_for_testing());
+ rwhier_.RouteTouchEvent(view_root_.get(), &touch_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(0u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ blink::WebGestureEvent gesture_event(
+ blink::WebInputEvent::kGestureTapDown, blink::WebInputEvent::kNoModifiers,
+ blink::WebInputEvent::kTimeStampForTesting);
+ gesture_event.source_device = blink::kWebGestureDeviceTouchscreen;
+ gesture_event.unique_touch_event_id = touch_event.unique_touch_event_id;
+ rwhier_.RouteGestureEvent(view_root_.get(), &gesture_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(1u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ touch_event.SetType(blink::WebInputEvent::kTouchEnd);
+ touch_event.touches[0].state = blink::WebTouchPoint::kStateReleased;
+ touch_event.unique_touch_event_id += 1;
+ rwhier_.RouteTouchEvent(view_root_.get(), &touch_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(2u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ gesture_event.SetType(blink::WebInputEvent::kGestureScrollBegin);
+ rwhier_.RouteGestureEvent(view_root_.get(), &gesture_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(3u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ gesture_event.SetType(blink::WebInputEvent::kGestureScrollUpdate);
+ rwhier_.RouteGestureEvent(view_root_.get(), &gesture_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(4u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ gesture_event.SetType(blink::WebInputEvent::kGestureScrollUpdate);
+ rwhier_.RouteGestureEvent(view_root_.get(), &gesture_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(5u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+
+ gesture_event.SetType(blink::WebInputEvent::kGestureScrollEnd);
+ rwhier_.RouteGestureEvent(view_root_.get(), &gesture_event,
+ ui::LatencyInfo(ui::SourceEventType::TOUCH));
+ EXPECT_EQ(6u, targeter->num_requests_in_queue_for_testing());
+ EXPECT_TRUE(targeter->is_request_in_flight_for_testing());
+}
+
} // namespace content
diff --git a/chromium/content/browser/renderer_host/render_widget_targeter.cc b/chromium/content/browser/renderer_host/render_widget_targeter.cc
index db94eea33af..40549b7e067 100644
--- a/chromium/content/browser/renderer_host/render_widget_targeter.cc
+++ b/chromium/content/browser/renderer_host/render_widget_targeter.cc
@@ -17,7 +17,9 @@ namespace {
bool MergeEventIfPossible(const blink::WebInputEvent& event,
ui::WebScopedInputEvent* blink_event) {
- if (ui::CanCoalesce(event, **blink_event)) {
+ if (!blink::WebInputEvent::IsTouchEventType(event.GetType()) &&
+ !blink::WebInputEvent::IsGestureEventType(event.GetType()) &&
+ ui::CanCoalesce(event, **blink_event)) {
ui::Coalesce(event, blink_event->get());
return true;
}
@@ -258,7 +260,9 @@ void RenderWidgetTargeter::FoundTarget(
const blink::WebInputEvent& event,
const ui::LatencyInfo& latency,
const base::Optional<gfx::PointF>& target_location) {
- if (!root_view)
+ // RenderWidgetHostViewMac can be deleted asynchronously, in which case the
+ // View will be valid but there will no longer be a RenderWidgetHostImpl.
+ if (!root_view || !root_view->GetRenderWidgetHost())
return;
// TODO: Unify position conversion for all event types.
if (blink::WebInputEvent::IsMouseEventType(event.GetType())) {
diff --git a/chromium/content/browser/renderer_host/render_widget_targeter.h b/chromium/content/browser/renderer_host/render_widget_targeter.h
index a3a4f648b5f..7aac783ab05 100644
--- a/chromium/content/browser/renderer_host/render_widget_targeter.h
+++ b/chromium/content/browser/renderer_host/render_widget_targeter.h
@@ -86,6 +86,9 @@ class RenderWidgetTargeter {
async_hit_test_timeout_delay_ = delay;
}
+ unsigned num_requests_in_queue_for_testing() { return requests_.size(); }
+ bool is_request_in_flight_for_testing() { return request_in_flight_; }
+
private:
// Attempts to target and dispatch all events in the queue. It stops if it has
// to query a client, or if the queue becomes empty.
diff --git a/chromium/content/browser/service_manager/common_browser_interfaces.cc b/chromium/content/browser/service_manager/common_browser_interfaces.cc
index caa62521975..25170497efa 100644
--- a/chromium/content/browser/service_manager/common_browser_interfaces.cc
+++ b/chromium/content/browser/service_manager/common_browser_interfaces.cc
@@ -24,7 +24,7 @@
#if defined(OS_WIN)
#include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h"
-#include "content/common/font_cache_dispatcher_win.h"
+#include "content/public/common/font_cache_dispatcher_win.h"
#endif
namespace content {
diff --git a/chromium/content/browser/service_worker/service_worker_browsertest.cc b/chromium/content/browser/service_worker/service_worker_browsertest.cc
index 5ac5504ff07..76cdd7e5081 100644
--- a/chromium/content/browser/service_worker/service_worker_browsertest.cc
+++ b/chromium/content/browser/service_worker/service_worker_browsertest.cc
@@ -16,6 +16,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
+#include "base/metrics/statistics_recorder.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string16.h"
@@ -969,6 +970,38 @@ IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, StartAndStop) {
stop_run_loop.Run();
}
+IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest,
+ DropCountsOnBlinkUseCounter) {
+ StartServerAndNavigateToSetup();
+ RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread,
+ base::Unretained(this),
+ "/service_worker/worker.js"));
+ // Start a worker.
+ ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED;
+ base::RunLoop start_run_loop;
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&self::StartOnIOThread, base::Unretained(this),
+ start_run_loop.QuitClosure(), &status));
+ start_run_loop.Run();
+ ASSERT_EQ(SERVICE_WORKER_OK, status);
+
+ // Expect no PageVisits count.
+ EXPECT_EQ(nullptr, base::StatisticsRecorder::FindHistogram(
+ "Blink.UseCounter.Features"));
+
+ // Stop the worker.
+ base::RunLoop stop_run_loop;
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&self::StopOnIOThread, base::Unretained(this),
+ stop_run_loop.QuitClosure()));
+ stop_run_loop.Run();
+ // Expect no PageVisits count.
+ EXPECT_EQ(nullptr, base::StatisticsRecorder::FindHistogram(
+ "Blink.UseCounter.Features"));
+}
+
IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, StartNotFound) {
StartServerAndNavigateToSetup();
RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread,
diff --git a/chromium/content/browser/site_per_process_browsertest.cc b/chromium/content/browser/site_per_process_browsertest.cc
index 0565e9ddfa0..645960a3262 100644
--- a/chromium/content/browser/site_per_process_browsertest.cc
+++ b/chromium/content/browser/site_per_process_browsertest.cc
@@ -1983,6 +1983,77 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
}
}
+// Ensure that the scrollability of a local subframe in an OOPIF is considered
+// when acknowledging GestureScrollBegin events sent to OOPIFs.
+IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ScrollLocalSubframeInOOPIF) {
+ ui::GestureConfiguration::GetInstance()->set_scroll_debounce_interval_in_ms(
+ 0);
+
+ // This must be tall enough such that the outer iframe is not scrollable.
+ GURL main_url(embedded_test_server()->GetURL(
+ "a.com", "/frame_tree/page_with_tall_positioned_frame.html"));
+ EXPECT_TRUE(NavigateToURL(shell(), main_url));
+
+ // It is safe to obtain the root frame tree node here, as it doesn't change.
+ FrameTreeNode* root = web_contents()->GetFrameTree()->root();
+ ASSERT_EQ(1U, root->child_count());
+
+ FrameTreeNode* parent_iframe_node = root->child_at(0);
+ GURL outer_frame_url(embedded_test_server()->GetURL(
+ "baz.com", "/frame_tree/page_with_positioned_frame.html"));
+ NavigateFrameToURL(parent_iframe_node, outer_frame_url);
+
+ // This must be tall enough such that the inner iframe is scrollable.
+ FrameTreeNode* nested_iframe_node = parent_iframe_node->child_at(0);
+ GURL inner_frame_url(
+ embedded_test_server()->GetURL("baz.com", "/tall_page.html"));
+ NavigateFrameToURL(nested_iframe_node, inner_frame_url);
+
+ ASSERT_EQ(
+ " Site A ------------ proxies for B\n"
+ " +--Site B ------- proxies for A\n"
+ " +--Site B -- proxies for A\n"
+ "Where A = http://a.com/\n"
+ " B = http://baz.com/",
+ DepictFrameTree(root));
+
+ RenderWidgetHostViewBase* rwhv_child = static_cast<RenderWidgetHostViewBase*>(
+ nested_iframe_node->current_frame_host()
+ ->GetRenderWidgetHost()
+ ->GetView());
+
+ WaitForChildFrameSurfaceReady(parent_iframe_node->current_frame_host());
+
+ // When we scroll the inner frame, we should have the GSB be consumed.
+ // The outer iframe not being scrollable should not cause the GSB to go
+ // unconsumed.
+ InputEventAckWaiter ack_observer(
+ parent_iframe_node->current_frame_host()->GetRenderWidgetHost(),
+ base::BindRepeating([](content::InputEventAckSource,
+ content::InputEventAckState state,
+ const blink::WebInputEvent& event) {
+ return event.GetType() == blink::WebGestureEvent::kGestureScrollBegin &&
+ state == content::INPUT_EVENT_ACK_STATE_CONSUMED;
+ }));
+
+ // Wait until renderer's compositor thread is synced. Otherwise the non fast
+ // scrollable regions won't be set when the event arrives.
+ MainThreadFrameObserver observer(rwhv_child->GetRenderWidgetHost());
+ observer.Wait();
+
+ // Now scroll the inner frame downward,
+ blink::WebMouseWheelEvent scroll_event(
+ blink::WebInputEvent::kMouseWheel, blink::WebInputEvent::kNoModifiers,
+ blink::WebInputEvent::kTimeStampForTesting);
+ scroll_event.SetPositionInWidget(90, 110);
+ scroll_event.delta_x = 0.0f;
+ scroll_event.delta_y = -50.0f;
+ scroll_event.phase = blink::WebMouseWheelEvent::kPhaseBegan;
+ scroll_event.has_precise_scrolling_deltas = true;
+ rwhv_child->ProcessMouseWheelEvent(scroll_event, ui::LatencyInfo());
+ ack_observer.Wait();
+}
+
// This test verifies that scrolling an element to view works across OOPIFs.
IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ScrollElementIntoView) {
GURL url_domain_a(
diff --git a/chromium/content/browser/storage_partition_impl.cc b/chromium/content/browser/storage_partition_impl.cc
index 375eccf87f2..f9a87e8a264 100644
--- a/chromium/content/browser/storage_partition_impl.cc
+++ b/chromium/content/browser/storage_partition_impl.cc
@@ -487,6 +487,12 @@ StoragePartitionImpl::~StoragePartitionImpl() {
if (GetPaymentAppContext())
GetPaymentAppContext()->Shutdown();
+ if (GetAppCacheService()) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&ChromeAppCacheService::Shutdown, appcache_service_));
+ }
+
BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE,
std::move(network_context_owner_));
}
diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc
index 3484edd8578..829401d6438 100644
--- a/chromium/content/browser/web_contents/web_contents_impl.cc
+++ b/chromium/content/browser/web_contents/web_contents_impl.cc
@@ -3777,7 +3777,7 @@ void WebContentsImpl::DidNavigateMainFramePostCommit(
// clicking on a link); see bugs 1184641 and 980803. We don't want to
// clear the bubble when a user navigates to a named anchor in the same
// page.
- UpdateTargetURL(render_frame_host->GetRenderViewHost(), GURL());
+ ClearTargetURL();
RenderWidgetHostViewBase* rwhvb =
static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
@@ -4939,16 +4939,29 @@ void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
void WebContentsImpl::UpdateTargetURL(RenderViewHost* render_view_host,
const GURL& url) {
if (fullscreen_widget_routing_id_ != MSG_ROUTING_NONE) {
- // If we're fullscreen only update the url if it's from the fullscreen
- // renderer.
+ // If we're in flash fullscreen (i.e. Pepper plugin fullscreen) only update
+ // the url if it's from the fullscreen renderer.
RenderWidgetHostView* fs = GetFullscreenRenderWidgetHostView();
if (fs && fs->GetRenderWidgetHost() != render_view_host->GetWidget())
return;
}
+
+ // In case of racey updates from multiple RenderViewHosts, the last URL should
+ // be shown - see also some discussion in https://crbug.com/807776.
+ if (!url.is_valid() && render_view_host != view_that_set_last_target_url_)
+ return;
+ view_that_set_last_target_url_ = url.is_valid() ? render_view_host : nullptr;
+
if (delegate_)
delegate_->UpdateTargetURL(this, url);
}
+void WebContentsImpl::ClearTargetURL() {
+ view_that_set_last_target_url_ = nullptr;
+ if (delegate_)
+ delegate_->UpdateTargetURL(this, GURL());
+}
+
void WebContentsImpl::Close(RenderViewHost* rvh) {
#if defined(OS_MACOSX)
// The UI may be in an event-tracking loop, such as between the
diff --git a/chromium/content/browser/web_contents/web_contents_impl.h b/chromium/content/browser/web_contents/web_contents_impl.h
index 18f4c9f12ad..3d24182d36a 100644
--- a/chromium/content/browser/web_contents/web_contents_impl.h
+++ b/chromium/content/browser/web_contents/web_contents_impl.h
@@ -1326,6 +1326,10 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// Reattaches this inner WebContents to its outer WebContents.
void ReattachToOuterWebContentsFrame();
+ // A helper for clearing the link status bubble after navigating away.
+ // See also UpdateTargetURL.
+ void ClearTargetURL();
+
// Data for core operation ---------------------------------------------------
// Delegate for notifying our owner about stuff. Not owned by us.
@@ -1664,6 +1668,9 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
bool was_ever_audible_ = false;
+ // Helper variable for resolving races in UpdateTargetURL / ClearTargetURL.
+ RenderViewHost* view_that_set_last_target_url_ = nullptr;
+
base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
base::WeakPtrFactory<WebContentsImpl> weak_factory_;
diff --git a/chromium/content/browser/web_contents/web_contents_impl_browsertest.cc b/chromium/content/browser/web_contents/web_contents_impl_browsertest.cc
index 3463fdb35fb..92ceacb36b4 100644
--- a/chromium/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/chromium/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -5,11 +5,14 @@
#include <utility>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/optional.h"
#include "base/run_loop.h"
#include "base/strings/pattern.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
+#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -25,6 +28,8 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/resource_dispatcher_host.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/url_constants.h"
@@ -39,6 +44,7 @@
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "url/gurl.h"
namespace content {
@@ -1599,4 +1605,56 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
ASSERT_EQ(title, base::ASCIIToUTF16("done"));
}
+class UpdateTargetURLWaiter : public WebContentsDelegate {
+ public:
+ UpdateTargetURLWaiter(WebContents* web_contents) {
+ web_contents->SetDelegate(this);
+ }
+
+ const GURL& WaitForUpdatedTargetURL() {
+ if (updated_target_url_.has_value())
+ return updated_target_url_.value();
+
+ runner_ = new MessageLoopRunner();
+ runner_->Run();
+ return updated_target_url_.value();
+ }
+
+ private:
+ void UpdateTargetURL(WebContents* source, const GURL& url) override {
+ updated_target_url_ = url;
+ if (runner_.get())
+ runner_->QuitClosure().Run();
+ }
+
+ base::Optional<GURL> updated_target_url_;
+ scoped_refptr<MessageLoopRunner> runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(UpdateTargetURLWaiter);
+};
+
+// Verifies that focusing a link in a cross-site frame will correctly tell
+// WebContentsDelegate to show a link status bubble. This is a regression test
+// for https://crbug.com/807776.
+IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, UpdateTargetURL) {
+ // Navigate to a test page.
+ ASSERT_TRUE(embedded_test_server()->Start());
+ WebContentsImpl* web_contents =
+ static_cast<WebContentsImpl*>(shell()->web_contents());
+ GURL url = embedded_test_server()->GetURL(
+ "a.com", "/cross_site_iframe_factory.html?a(b)");
+ EXPECT_TRUE(NavigateToURL(shell(), url));
+ FrameTreeNode* subframe = web_contents->GetFrameTree()->root()->child_at(0);
+ GURL subframe_url =
+ embedded_test_server()->GetURL("b.com", "/simple_links.html");
+ NavigateFrameToURL(subframe, subframe_url);
+
+ // Focusing the link should fire the UpdateTargetURL notification.
+ UpdateTargetURLWaiter target_url_waiter(web_contents);
+ EXPECT_TRUE(ExecuteScript(
+ subframe, "document.getElementById('cross_site_link').focus();"));
+ EXPECT_EQ(GURL("http://foo.com/title2.html"),
+ target_url_waiter.WaitForUpdatedTargetURL());
+}
+
} // namespace content
diff --git a/chromium/content/browser/webrtc/webrtc_getusermedia_browsertest.cc b/chromium/content/browser/webrtc/webrtc_getusermedia_browsertest.cc
index be18d3ce17e..6b4f0a6dc3c 100644
--- a/chromium/content/browser/webrtc/webrtc_getusermedia_browsertest.cc
+++ b/chromium/content/browser/webrtc/webrtc_getusermedia_browsertest.cc
@@ -796,13 +796,6 @@ IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
ExecuteJavascriptAndWaitForOk("concurrentGetUserMediaStop()");
}
-IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest, DisabledTrackVideoSize) {
- ASSERT_TRUE(embedded_test_server()->Start());
- GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
- NavigateToURL(shell(), url);
- ExecuteJavascriptAndWaitForOk("disabledTrackVideoSize()");
-}
-
IN_PROC_BROWSER_TEST_F(WebRtcGetUserMediaBrowserTest,
GetUserMediaAfterStopElementCapture) {
ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chromium/content/child/child_thread_impl.h b/chromium/content/child/child_thread_impl.h
index 54bf2504c07..fa8049f7a1d 100644
--- a/chromium/content/child/child_thread_impl.h
+++ b/chromium/content/child/child_thread_impl.h
@@ -32,7 +32,7 @@
#include "services/resource_coordinator/public/cpp/tracing/chrome_trace_event_agent.h"
#if defined(OS_WIN)
-#include "content/common/font_cache_win.mojom.h"
+#include "content/public/common/font_cache_win.mojom.h"
#endif
namespace base {
diff --git a/chromium/content/child/runtime_features.cc b/chromium/content/child/runtime_features.cc
index 964f02b3d39..97d52787106 100644
--- a/chromium/content/child/runtime_features.cc
+++ b/chromium/content/child/runtime_features.cc
@@ -302,9 +302,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (base::FeatureList::IsEnabled(features::kGamepadExtensions))
WebRuntimeFeatures::EnableGamepadExtensions(true);
- if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition))
+ if (base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition))
WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueFixedPosition",
- false);
+ true);
if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers))
WebRuntimeFeatures::EnableFeatureFromString("CompositeOpaqueScrollers",
diff --git a/chromium/content/common/BUILD.gn b/chromium/content/common/BUILD.gn
index eab8f4dacf7..56482152ab0 100644
--- a/chromium/content/common/BUILD.gn
+++ b/chromium/content/common/BUILD.gn
@@ -119,7 +119,6 @@ source_set("common") {
"fileapi/file_system_messages.h",
"fileapi/webblob_messages.h",
"font_cache_dispatcher_win.cc",
- "font_cache_dispatcher_win.h",
"font_config_ipc_linux.cc",
"font_config_ipc_linux.h",
"font_list.cc",
@@ -580,10 +579,7 @@ mojom("mojo_bindings") {
]
if (is_win) {
- sources += [
- "dwrite_font_proxy.mojom",
- "font_cache_win.mojom",
- ]
+ sources += [ "dwrite_font_proxy.mojom" ]
}
import_dirs = [ "//mojo/services" ]
diff --git a/chromium/content/common/font_cache_dispatcher_win.cc b/chromium/content/common/font_cache_dispatcher_win.cc
index 49fd1e96204..9337781bfdd 100644
--- a/chromium/content/common/font_cache_dispatcher_win.cc
+++ b/chromium/content/common/font_cache_dispatcher_win.cc
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/common/font_cache_dispatcher_win.h"
+#include "content/public/common/font_cache_dispatcher_win.h"
#include <map>
+#include <memory>
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -130,7 +132,7 @@ class FontCache {
DISALLOW_COPY_AND_ASSIGN(FontCache);
};
-}
+} // namespace
FontCacheDispatcher::FontCacheDispatcher() {}
@@ -145,7 +147,8 @@ void FontCacheDispatcher::Create(
std::move(request));
}
-void FontCacheDispatcher::PreCacheFont(const LOGFONT& font) {
+void FontCacheDispatcher::PreCacheFont(const LOGFONT& log_font,
+ PreCacheFontCallback callback) {
// If a child process is running in a sandbox, GetTextMetrics()
// can sometimes fail. If a font has not been loaded
// previously, GetTextMetrics() will try to load the font
@@ -159,7 +162,10 @@ void FontCacheDispatcher::PreCacheFont(const LOGFONT& font) {
// need to load that file, hence no permission issues there. Therefore,
// when a font is asked to be cached, we always recreates the font object
// to avoid the case that an in-cache font is swapped out by GDI.
- FontCache::GetInstance()->PreCacheFont(font, this);
+ FontCache::GetInstance()->PreCacheFont(log_font, this);
+
+ // Run |callback| to indicate this synchronous handler finished.
+ std::move(callback).Run();
}
void FontCacheDispatcher::ReleaseCachedFonts() {
diff --git a/chromium/content/common/swapped_out_messages.cc b/chromium/content/common/swapped_out_messages.cc
index 74b51acf7c9..488943ab4f6 100644
--- a/chromium/content/common/swapped_out_messages.cc
+++ b/chromium/content/common/swapped_out_messages.cc
@@ -28,6 +28,7 @@ bool SwappedOutMessages::CanSendWhileSwappedOut(const IPC::Message* msg) {
case ViewHostMsg_Focus::ID:
case ViewHostMsg_ShowFullscreenWidget::ID:
case ViewHostMsg_ShowWidget::ID:
+ case ViewHostMsg_UpdateTargetURL::ID:
// Allow cross-process JavaScript calls.
case ViewHostMsg_RouteCloseEvent::ID:
// Send page scale factor reset notification upon cross-process navigations.
@@ -55,8 +56,6 @@ bool SwappedOutMessages::CanHandleWhileSwappedOut(
// Note that synchronous messages that are not handled will receive an
// error reply instead, to avoid leaving the renderer in a stuck state.
switch (msg.type()) {
- // Sends an ACK.
- case ViewHostMsg_UpdateTargetURL::ID:
// We allow closing even if we are in the process of swapping out.
case ViewHostMsg_Close::ID:
// Sends an ACK.
diff --git a/chromium/content/public/app/mojo/content_renderer_manifest.json b/chromium/content/public/app/mojo/content_renderer_manifest.json
index 5efdd84bc08..a0e53cf8b19 100644
--- a/chromium/content/public/app/mojo/content_renderer_manifest.json
+++ b/chromium/content/public/app/mojo/content_renderer_manifest.json
@@ -56,7 +56,7 @@
"content::mojom::ImageDownloader",
"content::mojom::FrameInputHandler",
"content::mojom::FullscreenVideoElementHandler",
- "content::mojom::MediaStreamDispatcher",
+ "content::mojom::MediaStreamDeviceObserver",
"content::mojom::Widget",
"viz::mojom::InputTargetClient"
]
diff --git a/chromium/content/public/common/BUILD.gn b/chromium/content/public/common/BUILD.gn
index 3898737926a..05cce08860c 100644
--- a/chromium/content/public/common/BUILD.gn
+++ b/chromium/content/public/common/BUILD.gn
@@ -147,6 +147,7 @@ jumbo_source_set("common_sources") {
"file_chooser_file_info.h",
"file_chooser_params.cc",
"file_chooser_params.h",
+ "font_cache_dispatcher_win.h",
"frame_navigate_params.cc",
"frame_navigate_params.h",
"injection_test_mac.h",
@@ -374,6 +375,10 @@ mojom("interfaces") {
"window_container_type.mojom",
]
+ if (is_win) {
+ sources += [ "font_cache_win.mojom" ]
+ }
+
public_deps = [
":resource_type_bindings",
"//mojo/common:common_custom_types",
diff --git a/chromium/content/public/common/content_features.cc b/chromium/content/public/common/content_features.cc
index cf9b28c6237..e74d8608745 100644
--- a/chromium/content/public/common/content_features.cc
+++ b/chromium/content/public/common/content_features.cc
@@ -73,7 +73,7 @@ const base::Feature kCheckerImaging{"CheckerImaging",
// Enables the compositing of fixed position content that is opaque and can
// preserve LCD text.
const base::Feature kCompositeOpaqueFixedPosition{
- "CompositeOpaqueFixedPosition", base::FEATURE_ENABLED_BY_DEFAULT};
+ "CompositeOpaqueFixedPosition", base::FEATURE_DISABLED_BY_DEFAULT};
// Enables the compositing of scrolling content that supports painting the
// background with the foreground, such that LCD text will still be enabled.
diff --git a/chromium/content/common/font_cache_dispatcher_win.h b/chromium/content/public/common/font_cache_dispatcher_win.h
index e817c3dcc79..c046fda9757 100644
--- a/chromium/content/common/font_cache_dispatcher_win.h
+++ b/chromium/content/public/common/font_cache_dispatcher_win.h
@@ -9,7 +9,8 @@
#include "base/macros.h"
#include "base/memory/singleton.h"
-#include "content/common/font_cache_win.mojom.h"
+#include "content/common/content_export.h"
+#include "content/public/common/font_cache_win.mojom.h"
namespace service_manager {
struct BindSourceInfo;
@@ -20,7 +21,7 @@ namespace content {
// Dispatches messages used for font caching on Windows. This is needed because
// Windows can't load fonts into its kernel cache in sandboxed processes. So the
// sandboxed process asks the browser process to do this for it.
-class FontCacheDispatcher : public mojom::FontCacheWin {
+class CONTENT_EXPORT FontCacheDispatcher : public mojom::FontCacheWin {
public:
FontCacheDispatcher();
~FontCacheDispatcher() override;
@@ -29,8 +30,9 @@ class FontCacheDispatcher : public mojom::FontCacheWin {
const service_manager::BindSourceInfo& source_info);
private:
- // mojom::FontCacheWin
- void PreCacheFont(const LOGFONT&) override;
+ // mojom::FontCacheWin:
+ void PreCacheFont(const LOGFONT& log_font,
+ PreCacheFontCallback callback) override;
void ReleaseCachedFonts() override;
DISALLOW_COPY_AND_ASSIGN(FontCacheDispatcher);
diff --git a/chromium/content/common/font_cache_win.mojom b/chromium/content/public/common/font_cache_win.mojom
index 8fd25748a4f..46fa04c9784 100644
--- a/chromium/content/common/font_cache_win.mojom
+++ b/chromium/content/public/common/font_cache_win.mojom
@@ -9,9 +9,11 @@ import "mojo/common/logfont_win.mojom";
// Messages sent from child processes to the browser on Windows only. This file
// will not be built on other platforms.
interface FontCacheWin {
- // Request that the given font be loaded by the host so it's cached by the
- // OS. Please see ChildProcessHost::PreCacheFont for details.
- PreCacheFont(mojo.common.mojom.LOGFONT log_font);
+ // Request that the given font be loaded by the browser so it's cached by the
+ // OS. This must wait for the browser to finish to guarantee the font has been
+ // cached. See ChildProcessHost::PreCacheFont() for details.
+ [Sync]
+ PreCacheFont(mojo.common.mojom.LOGFONT log_font) => ();
// Release the cached fonts.
ReleaseCachedFonts();
diff --git a/chromium/content/renderer/input/render_widget_input_handler.cc b/chromium/content/renderer/input/render_widget_input_handler.cc
index d3b2e17a19a..a75513fd94f 100644
--- a/chromium/content/renderer/input/render_widget_input_handler.cc
+++ b/chromium/content/renderer/input/render_widget_input_handler.cc
@@ -186,11 +186,15 @@ viz::FrameSinkId RenderWidgetInputHandler::GetFrameSinkIdAtPoint(
blink::WebFrame* result_frame =
blink::WebFrame::FromFrameOwnerElement(result_node);
if (result_frame && result_frame->IsWebRemoteFrame()) {
- return RenderFrameProxy::FromWebFrame(result_frame->ToWebRemoteFrame())
- ->frame_sink_id();
+ viz::FrameSinkId frame_sink_id =
+ RenderFrameProxy::FromWebFrame(result_frame->ToWebRemoteFrame())
+ ->frame_sink_id();
+ if (frame_sink_id.is_valid())
+ return frame_sink_id;
}
// Return the FrameSinkId for the current widget if the point did not hit
- // test to a remote frame.
+ // test to a remote frame, or the remote frame doesn't have a valid
+ // FrameSinkId yet.
return viz::FrameSinkId(RenderThread::Get()->GetClientId(),
widget_->routing_id());
}
diff --git a/chromium/content/renderer/media/gpu/rtc_video_decoder.cc b/chromium/content/renderer/media/gpu/rtc_video_decoder.cc
index c0756fb61b8..48202fd643a 100644
--- a/chromium/content/renderer/media/gpu/rtc_video_decoder.cc
+++ b/chromium/content/renderer/media/gpu/rtc_video_decoder.cc
@@ -421,9 +421,8 @@ void RTCVideoDecoder::PictureReady(const media::Picture& picture) {
// Create a WebRTC video frame.
webrtc::VideoFrame decoded_image(
- new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(
- frame, WebRtcVideoFrameAdapter::CopyTextureFrameCallback()),
- timestamp, 0, webrtc::kVideoRotation_0);
+ new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(frame), timestamp, 0,
+ webrtc::kVideoRotation_0);
// Invoke decode callback. WebRTC expects no callback after Release.
{
diff --git a/chromium/content/renderer/media/media_stream_video_renderer_sink.cc b/chromium/content/renderer/media/media_stream_video_renderer_sink.cc
index b51707998b5..cefaec12b4f 100644
--- a/chromium/content/renderer/media/media_stream_video_renderer_sink.cc
+++ b/chromium/content/renderer/media/media_stream_video_renderer_sink.cc
@@ -200,7 +200,8 @@ void MediaStreamVideoRendererSink::Start() {
true);
if (video_track_.Source().GetReadyState() ==
- blink::WebMediaStreamSource::kReadyStateEnded) {
+ blink::WebMediaStreamSource::kReadyStateEnded ||
+ !video_track_.IsEnabled()) {
io_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&FrameDeliverer::RenderEndOfStream,
base::Unretained(frame_deliverer_.get())));
diff --git a/chromium/content/renderer/media/rtc_peer_connection_handler.cc b/chromium/content/renderer/media/rtc_peer_connection_handler.cc
index b8109b9420d..b3fbc42c312 100644
--- a/chromium/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/chromium/content/renderer/media/rtc_peer_connection_handler.cc
@@ -1300,10 +1300,12 @@ RTCPeerConnectionHandler::RTCPeerConnectionHandler(
is_closed_(false),
dependency_factory_(dependency_factory),
track_adapter_map_(
- new WebRtcMediaStreamTrackAdapterMap(dependency_factory_)),
+ new WebRtcMediaStreamTrackAdapterMap(dependency_factory_,
+ task_runner)),
stream_adapter_map_(new WebRtcMediaStreamAdapterMap(dependency_factory_,
+ task_runner,
track_adapter_map_)),
- task_runner_(task_runner),
+ task_runner_(std::move(task_runner)),
weak_factory_(this) {
CHECK(client_);
GetPeerConnectionHandlers()->insert(this);
diff --git a/chromium/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc b/chromium/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc
index 5574baec603..95713b3ca6f 100644
--- a/chromium/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc
+++ b/chromium/content/renderer/media/webrtc/rtc_rtp_sender_unittest.cc
@@ -20,6 +20,7 @@
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
#include "third_party/WebKit/public/platform/WebRTCVoidRequest.h"
#include "third_party/WebKit/public/platform/WebString.h"
+#include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/WebKit/public/web/WebHeap.h"
#include "third_party/webrtc/api/test/mock_rtpsender.h"
@@ -32,10 +33,11 @@ class RTCRtpSenderTest : public ::testing::Test {
public:
void SetUp() override {
dependency_factory_.reset(new MockPeerConnectionDependencyFactory());
- main_thread_ = base::ThreadTaskRunnerHandle::Get();
+ main_thread_ = blink::scheduler::GetSingleThreadTaskRunnerForTesting();
stream_map_ = new WebRtcMediaStreamAdapterMap(
- dependency_factory_.get(),
- new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get()));
+ dependency_factory_.get(), main_thread_,
+ new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get(),
+ main_thread_));
mock_webrtc_sender_ = new rtc::RefCountedObject<webrtc::MockRtpSender>();
}
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc
index 89ef430708b..c7452c31386 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc
@@ -66,9 +66,10 @@ WebRtcMediaStreamAdapterMap::AdapterRef::Copy() const {
WebRtcMediaStreamAdapterMap::WebRtcMediaStreamAdapterMap(
PeerConnectionDependencyFactory* const factory,
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread,
scoped_refptr<WebRtcMediaStreamTrackAdapterMap> track_adapter_map)
: factory_(factory),
- main_thread_(base::ThreadTaskRunnerHandle::Get()),
+ main_thread_(std::move(main_thread)),
track_adapter_map_(std::move(track_adapter_map)) {
DCHECK(factory_);
DCHECK(main_thread_);
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h
index 1d7ab4ca59e..be9eac07599 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h
@@ -78,6 +78,7 @@ class CONTENT_EXPORT WebRtcMediaStreamAdapterMap
// Must be invoked on the main thread.
WebRtcMediaStreamAdapterMap(
PeerConnectionDependencyFactory* const factory,
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread,
scoped_refptr<WebRtcMediaStreamTrackAdapterMap> track_adapter_map);
// Gets a new reference to the local stream adapter, or null if no such
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map_unittest.cc b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map_unittest.cc
index 9a01fa4cb9a..8cbd8744e6a 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map_unittest.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_map_unittest.cc
@@ -39,8 +39,9 @@ class WebRtcMediaStreamAdapterMapTest : public ::testing::Test {
dependency_factory_.reset(new MockPeerConnectionDependencyFactory());
main_thread_ = blink::scheduler::GetSingleThreadTaskRunnerForTesting();
map_ = new WebRtcMediaStreamAdapterMap(
- dependency_factory_.get(),
- new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get()));
+ dependency_factory_.get(), main_thread_,
+ new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get(),
+ main_thread_));
}
void TearDown() override { blink::WebHeap::CollectAllGarbageForTesting(); }
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
index b07bb6a89e6..cb0e7f28dd9 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
@@ -41,8 +41,9 @@ class WebRtcMediaStreamAdapterTest : public ::testing::Test {
public:
void SetUp() override {
dependency_factory_.reset(new MockPeerConnectionDependencyFactory());
- track_adapter_map_ =
- new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get());
+ track_adapter_map_ = new WebRtcMediaStreamTrackAdapterMap(
+ dependency_factory_.get(),
+ blink::scheduler::GetSingleThreadTaskRunnerForTesting());
}
void TearDown() override {
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc b/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc
index 66b8406340a..183d53f5bc2 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc
@@ -60,8 +60,9 @@ WebRtcMediaStreamTrackAdapterMap::AdapterRef::Copy() const {
}
WebRtcMediaStreamTrackAdapterMap::WebRtcMediaStreamTrackAdapterMap(
- PeerConnectionDependencyFactory* const factory)
- : factory_(factory), main_thread_(base::ThreadTaskRunnerHandle::Get()) {
+ PeerConnectionDependencyFactory* const factory,
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread)
+ : factory_(factory), main_thread_(std::move(main_thread)) {
DCHECK(factory_);
DCHECK(main_thread_);
}
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h b/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h
index 0616c63f26c..870d018c1f8 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h
@@ -71,7 +71,8 @@ class CONTENT_EXPORT WebRtcMediaStreamTrackAdapterMap
// Must be invoked on the main thread.
WebRtcMediaStreamTrackAdapterMap(
- PeerConnectionDependencyFactory* const factory);
+ PeerConnectionDependencyFactory* const factory,
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread);
// Gets a new reference to the local track adapter, or null if no such adapter
// was found. When all references are destroyed the adapter is disposed and
diff --git a/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc b/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
index 5ea62f99fd7..7a98eca2b20 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
@@ -27,7 +27,8 @@ class WebRtcMediaStreamTrackAdapterMapTest : public ::testing::Test {
void SetUp() override {
dependency_factory_.reset(new MockPeerConnectionDependencyFactory());
main_thread_ = blink::scheduler::GetSingleThreadTaskRunnerForTesting();
- map_ = new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get());
+ map_ = new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get(),
+ main_thread_);
}
void TearDown() override { blink::WebHeap::CollectAllGarbageForTesting(); }
diff --git a/chromium/content/renderer/media/webrtc/webrtc_set_remote_description_observer_unittest.cc b/chromium/content/renderer/media/webrtc/webrtc_set_remote_description_observer_unittest.cc
index 64ceefae066..395be689bd2 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_set_remote_description_observer_unittest.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_set_remote_description_observer_unittest.cc
@@ -68,8 +68,9 @@ class WebRtcSetRemoteDescriptionObserverHandlerTest : public ::testing::Test {
main_thread_ = blink::scheduler::GetSingleThreadTaskRunnerForTesting();
scoped_refptr<WebRtcMediaStreamAdapterMap> map =
new WebRtcMediaStreamAdapterMap(
- dependency_factory_.get(),
- new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get()));
+ dependency_factory_.get(), main_thread_,
+ new WebRtcMediaStreamTrackAdapterMap(dependency_factory_.get(),
+ main_thread_));
observer_ = new WebRtcSetRemoteDescriptionObserverForTest();
observer_handler_ = WebRtcSetRemoteDescriptionObserverHandler::Create(
main_thread_, pc_, map, observer_);
diff --git a/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc b/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
index b5eaa2416da..9982c2523d3 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
@@ -5,19 +5,12 @@
#include "content/renderer/media/webrtc/webrtc_video_capturer_adapter.h"
#include "base/bind.h"
-#include "base/memory/ref_counted.h"
-#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "cc/paint/skia_paint_canvas.h"
#include "content/renderer/media/webrtc/webrtc_video_frame_adapter.h"
-#include "content/renderer/render_thread_impl.h"
#include "media/base/timestamp_constants.h"
#include "media/base/video_util.h"
-#include "media/renderers/paint_canvas_video_renderer.h"
-#include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
-#include "skia/ext/platform_canvas.h"
-#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/convert_from.h"
#include "third_party/libyuv/include/libyuv/scale.h"
#include "third_party/webrtc/api/video/video_rotation.h"
@@ -32,127 +25,12 @@ namespace {
void CapturerReleaseOriginalFrame(
const scoped_refptr<media::VideoFrame>& frame) {}
-// Helper class that signals a WaitableEvent when it goes out of scope.
-class ScopedWaitableEvent {
- public:
- explicit ScopedWaitableEvent(base::WaitableEvent* event) : event_(event) {}
- ~ScopedWaitableEvent() {
- if (event_)
- event_->Signal();
- }
-
- private:
- base::WaitableEvent* const event_;
-};
-
} // anonymous namespace
-// Initializes the GL context environment and provides a method for copying
-// texture backed frames into CPU mappable memory.
-// The class is created and destroyed on the main render thread.
-class WebRtcVideoCapturerAdapter::TextureFrameCopier
- : public base::RefCounted<WebRtcVideoCapturerAdapter::TextureFrameCopier> {
- public:
- TextureFrameCopier()
- : main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
- canvas_video_renderer_(new media::PaintCanvasVideoRenderer) {
- RenderThreadImpl* const main_thread = RenderThreadImpl::current();
- if (main_thread)
- provider_ = main_thread->SharedMainThreadContextProvider();
- }
-
- // Synchronous call to copy a texture backed |frame| into a CPU mappable
- // |new_frame|. If it is not called on the main render thread, this call posts
- // a task on main thread by calling CopyTextureFrameOnMainThread() and blocks
- // until it is completed.
- void CopyTextureFrame(const scoped_refptr<media::VideoFrame>& frame,
- scoped_refptr<media::VideoFrame>* new_frame) {
- if (main_thread_task_runner_->BelongsToCurrentThread()) {
- CopyTextureFrameOnMainThread(frame, new_frame, nullptr);
- return;
- }
-
- base::WaitableEvent waiter(base::WaitableEvent::ResetPolicy::MANUAL,
- base::WaitableEvent::InitialState::NOT_SIGNALED);
- main_thread_task_runner_->PostTask(
- FROM_HERE,
- base::BindOnce(&TextureFrameCopier::CopyTextureFrameOnMainThread, this,
- frame, new_frame, &waiter));
- waiter.Wait();
- }
-
- private:
- friend class base::RefCounted<TextureFrameCopier>;
- ~TextureFrameCopier() {
- // |canvas_video_renderer_| should be deleted on the thread it was created.
- if (!main_thread_task_runner_->BelongsToCurrentThread()) {
- main_thread_task_runner_->DeleteSoon(FROM_HERE,
- canvas_video_renderer_.release());
- }
- }
-
- void CopyTextureFrameOnMainThread(
- const scoped_refptr<media::VideoFrame>& frame,
- scoped_refptr<media::VideoFrame>* new_frame,
- base::WaitableEvent* waiter) {
- DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
- DCHECK(frame->format() == media::PIXEL_FORMAT_ARGB ||
- frame->format() == media::PIXEL_FORMAT_XRGB ||
- frame->format() == media::PIXEL_FORMAT_I420 ||
- frame->format() == media::PIXEL_FORMAT_UYVY ||
- frame->format() == media::PIXEL_FORMAT_NV12);
- ScopedWaitableEvent event(waiter);
-
- if (!provider_) {
- // Return a black frame (yuv = {0, 0x80, 0x80}).
- *new_frame = media::VideoFrame::CreateColorFrame(
- frame->visible_rect().size(), 0u, 0x80, 0x80, frame->timestamp());
- return;
- }
-
- SkBitmap bitmap;
- bitmap.allocPixels(SkImageInfo::MakeN32Premul(
- frame->visible_rect().width(), frame->visible_rect().height()));
- cc::SkiaPaintCanvas paint_canvas(bitmap);
-
- *new_frame = media::VideoFrame::CreateFrame(
- media::PIXEL_FORMAT_I420, frame->coded_size(), frame->visible_rect(),
- frame->natural_size(), frame->timestamp());
- DCHECK(provider_->ContextGL());
- canvas_video_renderer_->Copy(
- frame.get(), &paint_canvas,
- media::Context3D(provider_->ContextGL(), provider_->GrContext()));
-
- SkPixmap pixmap;
- const bool result = bitmap.peekPixels(&pixmap);
- DCHECK(result) << "Error trying to access SkBitmap's pixels";
- const uint32 source_pixel_format =
- (kN32_SkColorType == kRGBA_8888_SkColorType) ? cricket::FOURCC_ABGR
- : cricket::FOURCC_ARGB;
- libyuv::ConvertToI420(
- static_cast<const uint8*>(pixmap.addr(0, 0)), pixmap.computeByteSize(),
- (*new_frame)->visible_data(media::VideoFrame::kYPlane),
- (*new_frame)->stride(media::VideoFrame::kYPlane),
- (*new_frame)->visible_data(media::VideoFrame::kUPlane),
- (*new_frame)->stride(media::VideoFrame::kUPlane),
- (*new_frame)->visible_data(media::VideoFrame::kVPlane),
- (*new_frame)->stride(media::VideoFrame::kVPlane), 0 /* crop_x */,
- 0 /* crop_y */, pixmap.width(), pixmap.height(),
- (*new_frame)->visible_rect().width(),
- (*new_frame)->visible_rect().height(), libyuv::kRotate0,
- source_pixel_format);
- }
-
- const scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
- scoped_refptr<ui::ContextProviderCommandBuffer> provider_;
- std::unique_ptr<media::PaintCanvasVideoRenderer> canvas_video_renderer_;
-};
-
WebRtcVideoCapturerAdapter::WebRtcVideoCapturerAdapter(
bool is_screencast,
blink::WebMediaStreamTrack::ContentHintType content_hint)
- : texture_copier_(new WebRtcVideoCapturerAdapter::TextureFrameCopier()),
- is_screencast_(is_screencast),
+ : is_screencast_(is_screencast),
content_hint_(content_hint),
running_(false) {
thread_checker_.DetachFromThread();
@@ -203,9 +81,7 @@ void WebRtcVideoCapturerAdapter::OnFrameCaptured(
// cropping support for texture yet. See http://crbug/503653.
if (frame->HasTextures()) {
OnFrame(webrtc::VideoFrame(
- new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(
- frame, base::Bind(&TextureFrameCopier::CopyTextureFrame,
- texture_copier_)),
+ new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(frame),
webrtc::kVideoRotation_0, translated_camera_time_us),
orig_width, orig_height);
return;
@@ -233,9 +109,7 @@ void WebRtcVideoCapturerAdapter::OnFrameCaptured(
// If no scaling is needed, return a wrapped version of |frame| directly.
if (video_frame->natural_size() == video_frame->visible_rect().size()) {
OnFrame(webrtc::VideoFrame(
- new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(
- video_frame,
- WebRtcVideoFrameAdapter::CopyTextureFrameCallback()),
+ new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(video_frame),
webrtc::kVideoRotation_0, translated_camera_time_us),
orig_width, orig_height);
return;
@@ -274,9 +148,7 @@ void WebRtcVideoCapturerAdapter::OnFrameCaptured(
}
OnFrame(webrtc::VideoFrame(
- new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(
- scaled_frame,
- WebRtcVideoFrameAdapter::CopyTextureFrameCallback()),
+ new rtc::RefCountedObject<WebRtcVideoFrameAdapter>(scaled_frame),
webrtc::kVideoRotation_0, translated_camera_time_us),
orig_width, orig_height);
}
diff --git a/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.h b/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.h
index 4e5c55d41c8..bd81bff0f8e 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.h
+++ b/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter.h
@@ -58,10 +58,6 @@ class CONTENT_EXPORT WebRtcVideoCapturerAdapter
bool ShouldAdaptResolution() const;
- // Helper class used for copying texture backed frames.
- class TextureFrameCopier;
- const scoped_refptr<TextureFrameCopier> texture_copier_;
-
// |thread_checker_| is bound to the libjingle worker thread.
base::ThreadChecker thread_checker_;
diff --git a/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc b/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
index 2133e8a293c..e076b3de238 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
@@ -4,21 +4,13 @@
#include <algorithm>
-#include "base/bind.h"
-#include "base/optional.h"
#include "base/single_thread_task_runner.h"
#include "base/test/scoped_task_environment.h"
-#include "content/child/child_process.h"
#include "content/renderer/media/webrtc/webrtc_video_capturer_adapter.h"
#include "content/renderer/media/webrtc/webrtc_video_frame_adapter.h"
-#include "gpu/command_buffer/common/mailbox_holder.h"
#include "media/base/video_frame.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-static void ReleaseMailboxCB(const gpu::SyncToken& sync_token) {}
-} // anonymous namespace
-
namespace content {
class WebRtcVideoCapturerAdapterTest
@@ -26,9 +18,7 @@ class WebRtcVideoCapturerAdapterTest
public ::testing::Test {
public:
WebRtcVideoCapturerAdapterTest()
- : scoped_task_environment_(
- base::test::ScopedTaskEnvironment::MainThreadType::IO),
- adapter_(new WebRtcVideoCapturerAdapter(
+ : adapter_(new WebRtcVideoCapturerAdapter(
false,
blink::WebMediaStreamTrack::ContentHintType::kNone)),
output_frame_width_(0),
@@ -57,37 +47,8 @@ class WebRtcVideoCapturerAdapterTest
EXPECT_EQ(natural_height, output_frame_height_);
}
- void TestSourceTextureFrame() {
- EXPECT_TRUE(scoped_task_environment_.GetMainThreadTaskRunner()
- ->BelongsToCurrentThread());
- gpu::MailboxHolder holders[media::VideoFrame::kMaxPlanes] = {
- gpu::MailboxHolder(gpu::Mailbox::Generate(), gpu::SyncToken(), 5)};
- scoped_refptr<media::VideoFrame> frame =
- media::VideoFrame::WrapNativeTextures(
- media::PIXEL_FORMAT_ARGB, holders, base::Bind(&ReleaseMailboxCB),
- gfx::Size(10, 10), gfx::Rect(10, 10), gfx::Size(10, 10),
- base::TimeDelta());
- adapter_->OnFrameCaptured(frame);
- ASSERT_TRUE(output_frame_);
- rtc::scoped_refptr<webrtc::VideoFrameBuffer> texture_frame =
- output_frame_->video_frame_buffer();
- EXPECT_EQ(webrtc::VideoFrameBuffer::Type::kNative, texture_frame->type());
- EXPECT_EQ(media::VideoFrame::STORAGE_OPAQUE,
- static_cast<WebRtcVideoFrameAdapter*>(texture_frame.get())
- ->getMediaVideoFrame()
- ->storage_type());
-
- rtc::scoped_refptr<webrtc::I420BufferInterface> copied_frame =
- texture_frame->ToI420();
- EXPECT_TRUE(copied_frame);
- EXPECT_TRUE(copied_frame->DataY());
- EXPECT_TRUE(copied_frame->DataU());
- EXPECT_TRUE(copied_frame->DataV());
- }
-
// rtc::VideoSinkInterface
void OnFrame(const webrtc::VideoFrame& frame) override {
- output_frame_ = base::Optional<webrtc::VideoFrame>(frame);
output_frame_width_ = frame.width();
output_frame_height_ = frame.height();
}
@@ -139,13 +100,7 @@ class WebRtcVideoCapturerAdapterTest
}
private:
- // The ScopedTaskEnvironment prevents the ChildProcess from leaking a
- // TaskScheduler.
- base::test::ScopedTaskEnvironment scoped_task_environment_;
- const ChildProcess child_process_;
-
std::unique_ptr<WebRtcVideoCapturerAdapter> adapter_;
- base::Optional<webrtc::VideoFrame> output_frame_;
int output_frame_width_;
int output_frame_height_;
};
@@ -162,10 +117,6 @@ TEST_F(WebRtcVideoCapturerAdapterTest, Scale720To640360) {
TestSourceCropFrame(1280, 720, 1280, 720, 640, 360);
}
-TEST_F(WebRtcVideoCapturerAdapterTest, SendsWithCopyTextureFrameCallback) {
- TestSourceTextureFrame();
-}
-
TEST_F(WebRtcVideoCapturerAdapterTest,
NonScreencastAdapterDoesNotAdaptContentHintDetail) {
// Non-screenshare adapter should not adapt frames when detail is set.
diff --git a/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.cc b/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.cc
index d65c73fa2f7..bfa7ba1de2f 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.cc
+++ b/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.cc
@@ -86,9 +86,8 @@ void IsValidFrame(const scoped_refptr<media::VideoFrame>& frame) {
namespace content {
WebRtcVideoFrameAdapter::WebRtcVideoFrameAdapter(
- const scoped_refptr<media::VideoFrame>& frame,
- const CopyTextureFrameCallback& copy_texture_callback)
- : frame_(frame), copy_texture_callback_(copy_texture_callback) {}
+ const scoped_refptr<media::VideoFrame>& frame)
+ : frame_(frame) {}
WebRtcVideoFrameAdapter::~WebRtcVideoFrameAdapter() {
}
@@ -107,17 +106,14 @@ int WebRtcVideoFrameAdapter::height() const {
rtc::scoped_refptr<webrtc::I420BufferInterface>
WebRtcVideoFrameAdapter::ToI420() {
+ // We cant convert texture synchronously due to threading issues, see
+ // https://crbug.com/663452. Instead, return a black frame (yuv = {0, 0x80,
+ // 0x80}).
if (frame_->HasTextures()) {
- if (copy_texture_callback_.is_null()) {
- DLOG(ERROR) << "Texture backed frame cannot be copied.";
- return nullptr;
- }
-
- scoped_refptr<media::VideoFrame> new_frame;
- copy_texture_callback_.Run(frame_, &new_frame);
- if (!new_frame)
- return nullptr;
- frame_ = new_frame;
+ DLOG(ERROR) << "Texture backed frame cannot be accessed.";
+ return new rtc::RefCountedObject<FrameAdapter<webrtc::I420BufferInterface>>(
+ media::VideoFrame::CreateColorFrame(frame_->visible_rect().size(), 0u,
+ 0x80, 0x80, frame_->timestamp()));
}
IsValidFrame(frame_);
diff --git a/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.h b/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.h
index 1f1f836c9db..e20b215c965 100644
--- a/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.h
+++ b/chromium/content/renderer/media/webrtc/webrtc_video_frame_adapter.h
@@ -7,7 +7,6 @@
#include <stdint.h>
-#include "base/callback.h"
#include "media/base/video_frame.h"
#include "third_party/webrtc/api/video/video_frame_buffer.h"
@@ -18,13 +17,7 @@ namespace content {
// different threads, but that's safe since it's read-only.
class WebRtcVideoFrameAdapter : public webrtc::VideoFrameBuffer {
public:
- using CopyTextureFrameCallback =
- base::Callback<void(const scoped_refptr<media::VideoFrame>&,
- scoped_refptr<media::VideoFrame>*)>;
-
- WebRtcVideoFrameAdapter(
- const scoped_refptr<media::VideoFrame>& frame,
- const CopyTextureFrameCallback& copy_texture_callback);
+ WebRtcVideoFrameAdapter(const scoped_refptr<media::VideoFrame>& frame);
scoped_refptr<media::VideoFrame> getMediaVideoFrame() const { return frame_; }
@@ -39,7 +32,6 @@ class WebRtcVideoFrameAdapter : public webrtc::VideoFrameBuffer {
~WebRtcVideoFrameAdapter() override;
scoped_refptr<media::VideoFrame> frame_;
- const CopyTextureFrameCallback copy_texture_callback_;
};
} // namespace content
diff --git a/chromium/content/renderer/render_frame_impl.cc b/chromium/content/renderer/render_frame_impl.cc
index 03f713d5ff9..956085eaaf1 100644
--- a/chromium/content/renderer/render_frame_impl.cc
+++ b/chromium/content/renderer/render_frame_impl.cc
@@ -5985,7 +5985,10 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
info.url_request.CheckForBrowserSideNavigation() &&
// No need to dispatch beforeunload if the frame has not committed a
// navigation and contains an empty initial document.
- (has_accessed_initial_document_ || !current_history_item_.IsNull());
+ (has_accessed_initial_document_ || !current_history_item_.IsNull()) &&
+ // Don't dispatch beforeunload if the navigation might end up as a
+ // download.
+ !info.url_request.GetSuggestedFilename().has_value();
if (should_dispatch_before_unload) {
// Execute the BeforeUnload event. If asked not to proceed or the frame is
diff --git a/chromium/content/renderer/render_view_impl.cc b/chromium/content/renderer/render_view_impl.cc
index 6b128219c76..fae44e8b7e3 100644
--- a/chromium/content/renderer/render_view_impl.cc
+++ b/chromium/content/renderer/render_view_impl.cc
@@ -1940,6 +1940,8 @@ void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) {
if (!webview())
return;
auto_resize_mode_ = false;
+ auto_resize_ack_callback_.Cancel();
+ need_resize_ack_for_auto_resize_ = false;
webview()->DisableAutoResizeMode();
if (!new_size.IsEmpty()) {
@@ -1964,8 +1966,10 @@ void RenderViewImpl::OnSetLocalSurfaceIdForAutoResize(
const gfx::Size& max_size,
const content::ScreenInfo& screen_info,
const viz::LocalSurfaceId& local_surface_id) {
- if (!auto_resize_mode_ || resize_or_repaint_ack_num_ != sequence_number)
+ if (!auto_resize_mode_ || resize_or_repaint_ack_num_ != sequence_number) {
+ DidResizeOrRepaintAck();
return;
+ }
SetLocalSurfaceIdForAutoResize(sequence_number, screen_info,
local_surface_id);
diff --git a/chromium/content/renderer/render_widget.cc b/chromium/content/renderer/render_widget.cc
index b4f2716e358..7a3ba6a154f 100644
--- a/chromium/content/renderer/render_widget.cc
+++ b/chromium/content/renderer/render_widget.cc
@@ -618,10 +618,8 @@ void RenderWidget::SetLocalSurfaceIdForAutoResize(
bool screen_info_changed = screen_info_ != screen_info;
screen_info_ = screen_info;
- if (device_scale_factor_ != screen_info_.device_scale_factor) {
- device_scale_factor_ = screen_info_.device_scale_factor;
- OnDeviceScaleFactorChanged();
- }
+ device_scale_factor_ = screen_info_.device_scale_factor;
+ OnDeviceScaleFactorChanged();
if (screen_info_changed) {
for (auto& observer : render_frame_proxies_)
@@ -812,8 +810,10 @@ void RenderWidget::OnSetLocalSurfaceIdForAutoResize(
const gfx::Size& max_size,
const content::ScreenInfo& screen_info,
const viz::LocalSurfaceId& local_surface_id) {
- if (!auto_resize_mode_ || resize_or_repaint_ack_num_ != sequence_number)
+ if (!auto_resize_mode_ || resize_or_repaint_ack_num_ != sequence_number) {
+ DidResizeOrRepaintAck();
return;
+ }
SetLocalSurfaceIdForAutoResize(sequence_number, screen_info,
local_surface_id);
@@ -1319,10 +1319,8 @@ void RenderWidget::Resize(const ResizeParams& params) {
if (render_thread)
render_thread->SetRenderingColorSpace(screen_info_.color_space);
- if (device_scale_factor_ != screen_info_.device_scale_factor) {
- device_scale_factor_ = screen_info_.device_scale_factor;
- OnDeviceScaleFactorChanged();
- }
+ device_scale_factor_ = screen_info_.device_scale_factor;
+ OnDeviceScaleFactorChanged();
if (resizing_mode_selector_->NeverUsesSynchronousResize()) {
// A resize ack shouldn't be requested if we have not ACK'd the previous
@@ -1856,7 +1854,7 @@ void RenderWidget::OnDeviceScaleFactorChanged() {
if (IsUseZoomForDSFEnabled())
compositor_->SetPaintedDeviceScaleFactor(GetOriginalDeviceScaleFactor());
else
- compositor_->SetDeviceScaleFactor(device_scale_factor_);
+ compositor_->SetDeviceScaleFactor(GetOriginalDeviceScaleFactor());
}
void RenderWidget::OnRepaint(gfx::Size size_to_paint) {
@@ -2274,8 +2272,13 @@ void RenderWidget::DidAutoResize(const gfx::Size& new_size) {
// on, that notification will not arrive here because the compositor is
// deferring commits and thus submission of CompositorFrames.
if (!size_.IsEmpty() && compositor_ &&
- compositor_->IsSurfaceSynchronizationEnabled()) {
- DidResizeOrRepaintAck();
+ compositor_->IsSurfaceSynchronizationEnabled() &&
+ !auto_resize_ack_callback_.callback()) {
+ auto_resize_ack_callback_.Reset(
+ base::BindOnce(&RenderWidget::DidResizeOrRepaintAck,
+ weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, auto_resize_ack_callback_.callback());
}
}
}
diff --git a/chromium/content/renderer/render_widget.h b/chromium/content/renderer/render_widget.h
index d1f298d2d2d..2fb833b13ce 100644
--- a/chromium/content/renderer/render_widget.h
+++ b/chromium/content/renderer/render_widget.h
@@ -15,6 +15,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/cancelable_callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -727,6 +728,11 @@ class CONTENT_EXPORT RenderWidget
// The sequence number used for ViewHostMsg_UpdateRect.
uint64_t resize_or_repaint_ack_num_ = 0;
+ // A pending ResizeOrRepaintAck callback in response to an auto-resize
+ // initiated by Blink. If auto-resize mode is canceled with an in-flight
+ // Ack, then the Ack will be canceled.
+ base::CancelableOnceClosure auto_resize_ack_callback_;
+
// Set to true if we should ignore RenderWidget::Show calls.
bool did_show_;
diff --git a/chromium/device/bluetooth/strings/bluetooth_strings_mr.xtb b/chromium/device/bluetooth/strings/bluetooth_strings_mr.xtb
index 087f04d7fd4..aa0767949c3 100644
--- a/chromium/device/bluetooth/strings/bluetooth_strings_mr.xtb
+++ b/chromium/device/bluetooth/strings/bluetooth_strings_mr.xtb
@@ -9,7 +9,7 @@
<translation id="5271696982761495740">टॅबलेट (<ph name="ADDRESS" />)</translation>
<translation id="5376363957846771741">अज्ञात किंवा असमर्थित डिव्हाइस (<ph name="ADDRESS" />)</translation>
<translation id="654594702871184195">ऑडिओ (<ph name="ADDRESS" />)</translation>
-<translation id="6744468237221042970">संगणक (<ph name="ADDRESS" />)</translation>
+<translation id="6744468237221042970">कॉंप्युटर (<ph name="ADDRESS" />)</translation>
<translation id="7501330106833014351">गेमपॅड (<ph name="ADDRESS" />)</translation>
<translation id="8866374292072238753">व्हिडिओ (<ph name="ADDRESS" />)</translation>
<translation id="8952558712545617651">माउस (<ph name="ADDRESS" />)</translation>
diff --git a/chromium/extensions/browser/api/media_perception_private/conversion_utils.cc b/chromium/extensions/browser/api/media_perception_private/conversion_utils.cc
index d106312bf01..6d86f29826d 100644
--- a/chromium/extensions/browser/api/media_perception_private/conversion_utils.cc
+++ b/chromium/extensions/browser/api/media_perception_private/conversion_utils.cc
@@ -133,6 +133,35 @@ VideoHumanPresenceDetectionProtoToIdl(
return detection_result;
}
+std::unique_ptr<AudioVisualHumanPresenceDetection>
+AudioVisualHumanPresenceDetectionProtoToIdl(
+ const mri::AudioVisualHumanPresenceDetection& detection) {
+ std::unique_ptr<AudioVisualHumanPresenceDetection> detection_result =
+ std::make_unique<AudioVisualHumanPresenceDetection>();
+
+ if (detection.has_human_presence_likelihood()) {
+ detection_result->human_presence_likelihood =
+ std::make_unique<double>(detection.human_presence_likelihood());
+ }
+
+ return detection_result;
+}
+
+AudioVisualPerception AudioVisualPerceptionProtoToIdl(
+ const mri::AudioVisualPerception& perception) {
+ AudioVisualPerception perception_result;
+ if (perception.has_timestamp_us()) {
+ perception_result.timestamp_us =
+ std::make_unique<double>(perception.timestamp_us());
+ }
+ if (perception.has_audio_visual_human_presence_detection()) {
+ perception_result.audio_visual_human_presence_detection =
+ AudioVisualHumanPresenceDetectionProtoToIdl(
+ perception.audio_visual_human_presence_detection());
+ }
+ return perception_result;
+}
+
std::unique_ptr<Point> PointProtoToIdl(const mri::Point& point) {
std::unique_ptr<Point> point_result = std::make_unique<Point>();
if (point.has_x())
@@ -342,6 +371,11 @@ PerceptionSample PerceptionSampleProtoToIdl(
std::make_unique<AudioPerception>(
AudioPerceptionProtoToIdl(perception_sample.audio_perception()));
}
+ if (perception_sample.has_audio_visual_perception()) {
+ perception_sample_result.audio_visual_perception =
+ std::make_unique<AudioVisualPerception>(AudioVisualPerceptionProtoToIdl(
+ perception_sample.audio_visual_perception()));
+ }
return perception_sample_result;
}
@@ -471,6 +505,15 @@ MediaPerception MediaPerceptionProtoToIdl(
}
}
+ if (media_perception.audio_visual_perception_size() > 0) {
+ media_perception_result.audio_visual_perceptions =
+ std::make_unique<std::vector<AudioVisualPerception>>();
+ for (const auto& perception : media_perception.audio_visual_perception()) {
+ media_perception_result.audio_visual_perceptions->emplace_back(
+ AudioVisualPerceptionProtoToIdl(perception));
+ }
+ }
+
return media_perception_result;
}
diff --git a/chromium/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc b/chromium/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc
index 483898e02c8..d6b91dcd865 100644
--- a/chromium/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc
+++ b/chromium/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc
@@ -63,6 +63,15 @@ void InitializeFakeAudioPerception(mri::AudioPerception* audio_perception) {
frame_spectrogram->add_values(0.3);
}
+void InitializeFakeAudioVisualPerception(
+ mri::AudioVisualPerception* audio_visual_perception) {
+ audio_visual_perception->set_timestamp_us(91008);
+
+ mri::AudioVisualHumanPresenceDetection* detection =
+ audio_visual_perception->mutable_audio_visual_human_presence_detection();
+ detection->set_human_presence_likelihood(0.5);
+}
+
void InitializeFakeFramePerception(const int index,
mri::FramePerception* frame_perception) {
frame_perception->set_frame_id(index);
@@ -259,6 +268,20 @@ void ValidateAudioPerceptionResult(
EXPECT_EQ(frame_spectrogram->values->at(0), 0.3);
}
+void ValidateAudioVisualPerceptionResult(
+ const media_perception::AudioVisualPerception& perception_result) {
+ ASSERT_TRUE(perception_result.timestamp_us);
+ EXPECT_EQ(*perception_result.timestamp_us, 91008);
+
+ // Validate audio-visual human presence detection.
+ const media_perception::AudioVisualHumanPresenceDetection*
+ presence_detection =
+ perception_result.audio_visual_human_presence_detection.get();
+ ASSERT_TRUE(presence_detection);
+ ASSERT_TRUE(presence_detection->human_presence_likelihood);
+ EXPECT_EQ(*presence_detection->human_presence_likelihood, 0.5);
+}
+
void InitializeFakeImageFrameData(mri::ImageFrame* image_frame) {
image_frame->set_width(1);
image_frame->set_height(2);
@@ -296,6 +319,9 @@ TEST(MediaPerceptionConversionUtilsTest, MediaPerceptionProtoToIdl) {
mri::AudioPerception* audio_perception =
media_perception.add_audio_perception();
InitializeFakeAudioPerception(audio_perception);
+ mri::AudioVisualPerception* audio_visual_perception =
+ media_perception.add_audio_visual_perception();
+ InitializeFakeAudioVisualPerception(audio_visual_perception);
media_perception::MediaPerception media_perception_result =
media_perception::MediaPerceptionProtoToIdl(media_perception);
EXPECT_EQ(*media_perception_result.timestamp, 1);
@@ -307,6 +333,8 @@ TEST(MediaPerceptionConversionUtilsTest, MediaPerceptionProtoToIdl) {
kFrameId, media_perception_result.frame_perceptions->at(0));
ValidateAudioPerceptionResult(
media_perception_result.audio_perceptions->at(0));
+ ValidateAudioVisualPerceptionResult(
+ media_perception_result.audio_visual_perceptions->at(0));
}
TEST(MediaPerceptionConversionUtilsTest, DiagnosticsProtoToIdl) {
diff --git a/chromium/extensions/common/api/media_perception_private.idl b/chromium/extensions/common/api/media_perception_private.idl
index 0d196d0f200..ed4e9ce09e4 100644
--- a/chromium/extensions/common/api/media_perception_private.idl
+++ b/chromium/extensions/common/api/media_perception_private.idl
@@ -298,6 +298,21 @@ namespace mediaPerceptionPrivate {
AudioHumanPresenceDetection? audioHumanPresenceDetection;
};
+ // Detection of human presence based on both audio and video inputs.
+ dictionary AudioVisualHumanPresenceDetection {
+ // Indicates a probability in [0, 1] interval that a human is present.
+ double? humanPresenceLikelihood;
+ };
+
+ // Perception results based on both audio and video inputs.
+ dictionary AudioVisualPerception {
+ // A timestamp in microseconds attached when this message was generated.
+ double? timestampUs;
+
+ // Human presence detection results.
+ AudioVisualHumanPresenceDetection? audioVisualHumanPresenceDetection;
+ };
+
dictionary MediaPerception {
// The time the media perception data was emitted by the media processing
// pipeline. This value will be greater than the timestamp stored within
@@ -310,6 +325,9 @@ namespace mediaPerceptionPrivate {
// An array of audio perceptions.
AudioPerception[]? audioPerceptions;
+
+ // An array of audio-visual perceptions.
+ AudioVisualPerception[]? audioVisualPerceptions;
};
enum ImageFormat {
@@ -341,6 +359,9 @@ namespace mediaPerceptionPrivate {
// The audio perception results for an audio frame.
AudioPerception? audioPerception;
+
+ // Perception results based on both audio and video inputs.
+ AudioVisualPerception? audioVisualPerception;
};
dictionary Diagnostics {
diff --git a/chromium/google_apis/gaia/gaia_auth_util.cc b/chromium/google_apis/gaia/gaia_auth_util.cc
index 38aefdccfbc..537016deb66 100644
--- a/chromium/google_apis/gaia/gaia_auth_util.cc
+++ b/chromium/google_apis/gaia/gaia_auth_util.cc
@@ -16,6 +16,7 @@
#include "base/strings/string_util.h"
#include "base/values.h"
#include "google_apis/gaia/gaia_urls.h"
+#include "net/base/url_util.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request.h"
#include "url/gurl.h"
@@ -195,4 +196,14 @@ void MarkURLFetcherAsGaia(net::URLFetcher* fetcher) {
base::Bind(&GaiaURLRequestUserData::Create));
}
+bool ShouldSkipSavePasswordForGaiaURL(const GURL& url) {
+ if (!IsGaiaSignonRealm(url.GetOrigin()))
+ return false;
+
+ std::string should_skip_password;
+ if (!net::GetValueForKeyInQuery(url, "ssp", &should_skip_password))
+ return false;
+ return should_skip_password == "1";
+}
+
} // namespace gaia
diff --git a/chromium/google_apis/gaia/gaia_auth_util.h b/chromium/google_apis/gaia/gaia_auth_util.h
index 4322a3626d7..44ce1096087 100644
--- a/chromium/google_apis/gaia/gaia_auth_util.h
+++ b/chromium/google_apis/gaia/gaia_auth_util.h
@@ -52,8 +52,13 @@ bool AreEmailsSame(const std::string& email1, const std::string& email2);
// Extract the domain part from the canonical form of the given email.
std::string ExtractDomainName(const std::string& email);
+// Returns true if |url| matches the GAIA origin URL.
bool IsGaiaSignonRealm(const GURL& url);
+// Returns true if the URL corresponds to a URL used during a Chrome sign-in
+// flow.
+bool ShouldSkipSavePasswordForGaiaURL(const GURL& url);
+
// Parses JSON data returned by /ListAccounts call, returning a vector of
// email/valid pairs. An email addresses is considered valid if a passive
// login would succeed (i.e. the user does not need to reauthenticate).
diff --git a/chromium/google_apis/gaia/gaia_urls.cc b/chromium/google_apis/gaia/gaia_urls.cc
index 8f0b23349c8..f05af2c27e9 100644
--- a/chromium/google_apis/gaia/gaia_urls.cc
+++ b/chromium/google_apis/gaia/gaia_urls.cc
@@ -22,7 +22,9 @@ const char kClientLoginUrlSuffix[] = "ClientLogin";
const char kServiceLoginUrlSuffix[] = "ServiceLogin";
const char kEmbeddedSetupChromeOsUrlSuffixV1[] = "embedded/setup/chromeos";
const char kEmbeddedSetupChromeOsUrlSuffixV2[] = "embedded/setup/v2/chromeos";
-const char kSigninChromeSyncDice[] = "signin/chrome/sync";
+// Paramter "ssp=1" is used to skip showing the password bubble when a user
+// signs in to Chrome.
+const char kSigninChromeSyncDice[] = "signin/chrome/sync?ssp=1";
const char kServiceLoginAuthUrlSuffix[] = "ServiceLoginAuth";
const char kServiceLogoutUrlSuffix[] = "Logout";
const char kIssueAuthTokenUrlSuffix[] = "IssueAuthToken";
diff --git a/chromium/gpu/command_buffer/service/context_state.cc b/chromium/gpu/command_buffer/service/context_state.cc
index 3f9a348428f..324f4613f15 100644
--- a/chromium/gpu/command_buffer/service/context_state.cc
+++ b/chromium/gpu/command_buffer/service/context_state.cc
@@ -29,6 +29,16 @@ GLuint Get2dServiceId(const TextureUnit& unit) {
? unit.bound_texture_2d->service_id() : 0;
}
+GLuint Get2dArrayServiceId(const TextureUnit& unit) {
+ return unit.bound_texture_2d_array.get()
+ ? unit.bound_texture_2d_array->service_id()
+ : 0;
+}
+
+GLuint Get3dServiceId(const TextureUnit& unit) {
+ return unit.bound_texture_3d.get() ? unit.bound_texture_3d->service_id() : 0;
+}
+
GLuint GetCubeServiceId(const TextureUnit& unit) {
return unit.bound_texture_cube_map.get()
? unit.bound_texture_cube_map->service_id() : 0;
@@ -237,6 +247,8 @@ void ContextState::RestoreTextureUnitBindings(
DCHECK_LT(unit, texture_units.size());
const TextureUnit& texture_unit = texture_units[unit];
GLuint service_id_2d = Get2dServiceId(texture_unit);
+ GLuint service_id_2d_array = Get2dArrayServiceId(texture_unit);
+ GLuint service_id_3d = Get3dServiceId(texture_unit);
GLuint service_id_cube = GetCubeServiceId(texture_unit);
GLuint service_id_oes = GetOesServiceId(texture_unit);
GLuint service_id_arb = GetArbServiceId(texture_unit);
@@ -247,10 +259,22 @@ void ContextState::RestoreTextureUnitBindings(
feature_info_->feature_flags().oes_egl_image_external ||
feature_info_->feature_flags().nv_egl_stream_consumer_external;
bool bind_texture_arb = feature_info_->feature_flags().arb_texture_rectangle;
+ // TEXTURE_2D_ARRAY and TEXTURE_3D are only applicable from ES3 version.
+ // So set it to FALSE by default.
+ bool bind_texture_2d_array = false;
+ bool bind_texture_3d = false;
+ // set the variables to true only if the application is ES3 or newer
+ if (feature_info_->IsES3Capable()) {
+ bind_texture_2d_array = true;
+ bind_texture_3d = true;
+ }
if (prev_state) {
const TextureUnit& prev_unit = prev_state->texture_units[unit];
bind_texture_2d = service_id_2d != Get2dServiceId(prev_unit);
+ bind_texture_2d_array =
+ service_id_2d_array != Get2dArrayServiceId(prev_unit);
+ bind_texture_3d = service_id_3d != Get3dServiceId(prev_unit);
bind_texture_cube = service_id_cube != GetCubeServiceId(prev_unit);
bind_texture_oes =
bind_texture_oes && service_id_oes != GetOesServiceId(prev_unit);
@@ -259,8 +283,8 @@ void ContextState::RestoreTextureUnitBindings(
}
// Early-out if nothing has changed from the previous state.
- if (!bind_texture_2d && !bind_texture_cube
- && !bind_texture_oes && !bind_texture_arb) {
+ if (!bind_texture_2d && !bind_texture_2d_array && !bind_texture_3d &&
+ !bind_texture_cube && !bind_texture_oes && !bind_texture_arb) {
return;
}
@@ -277,6 +301,12 @@ void ContextState::RestoreTextureUnitBindings(
if (bind_texture_arb) {
api()->glBindTextureFn(GL_TEXTURE_RECTANGLE_ARB, service_id_arb);
}
+ if (bind_texture_2d_array) {
+ api()->glBindTextureFn(GL_TEXTURE_2D_ARRAY, service_id_2d_array);
+ }
+ if (bind_texture_3d) {
+ api()->glBindTextureFn(GL_TEXTURE_3D, service_id_3d);
+ }
}
void ContextState::RestoreSamplerBinding(GLuint unit,
diff --git a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
index 3765e690cf6..78c18320f5e 100644
--- a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
+++ b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
@@ -418,6 +418,8 @@ TEST_P(GLES2DecoderRestoreStateTest, ES3NullPreviousStateWithSampler) {
AddExpectationsForActiveTexture(GL_TEXTURE0);
AddExpectationsForBindTexture(GL_TEXTURE_2D, kServiceTextureId);
AddExpectationsForBindTexture(GL_TEXTURE_CUBE_MAP, 0);
+ AddExpectationsForBindTexture(GL_TEXTURE_2D_ARRAY, 0);
+ AddExpectationsForBindTexture(GL_TEXTURE_3D, 0);
// Expect to restore sampler binding for unit GL_TEXTURE0.
AddExpectationsForBindSampler(0, kServiceSamplerId);
@@ -426,6 +428,8 @@ TEST_P(GLES2DecoderRestoreStateTest, ES3NullPreviousStateWithSampler) {
AddExpectationsForActiveTexture(GL_TEXTURE0 + i);
AddExpectationsForBindTexture(GL_TEXTURE_2D, 0);
AddExpectationsForBindTexture(GL_TEXTURE_CUBE_MAP, 0);
+ AddExpectationsForBindTexture(GL_TEXTURE_2D_ARRAY, 0);
+ AddExpectationsForBindTexture(GL_TEXTURE_3D, 0);
AddExpectationsForBindSampler(i, 0);
}
diff --git a/chromium/gpu/config/gpu_blacklist_unittest.cc b/chromium/gpu/config/gpu_blacklist_unittest.cc
index 45bfe72cb27..17f2bf80c1c 100644
--- a/chromium/gpu/config/gpu_blacklist_unittest.cc
+++ b/chromium/gpu/config/gpu_blacklist_unittest.cc
@@ -30,6 +30,8 @@ class GpuBlacklistTest : public testing::Test {
kFeatureListForEntry1, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
diff --git a/chromium/gpu/config/gpu_control_list.cc b/chromium/gpu/config/gpu_control_list.cc
index a1a29a05c5f..f93c1d21951 100644
--- a/chromium/gpu/config/gpu_control_list.cc
+++ b/chromium/gpu/config/gpu_control_list.cc
@@ -605,6 +605,19 @@ std::vector<std::string> GpuControlList::GetDisabledExtensions() {
disabled_extensions.end());
}
+std::vector<std::string> GpuControlList::GetDisabledWebGLExtensions() {
+ std::set<std::string> disabled_webgl_extensions;
+ for (auto index : active_entries_) {
+ DCHECK_LT(index, entry_count_);
+ const Entry& entry = entries_[index];
+ for (size_t ii = 0; ii < entry.disabled_webgl_extension_size; ++ii) {
+ disabled_webgl_extensions.insert(entry.disabled_webgl_extensions[ii]);
+ }
+ }
+ return std::vector<std::string>(disabled_webgl_extensions.begin(),
+ disabled_webgl_extensions.end());
+}
+
void GpuControlList::GetReasons(base::ListValue* problem_list,
const std::string& tag,
const std::vector<uint32_t>& entries) const {
diff --git a/chromium/gpu/config/gpu_control_list.h b/chromium/gpu/config/gpu_control_list.h
index de98ea830de..416386d72fe 100644
--- a/chromium/gpu/config/gpu_control_list.h
+++ b/chromium/gpu/config/gpu_control_list.h
@@ -191,6 +191,8 @@ class GPU_EXPORT GpuControlList {
const int* features;
size_t disabled_extension_size;
const char* const* disabled_extensions;
+ size_t disabled_webgl_extension_size;
+ const char* const* disabled_webgl_extensions;
size_t cr_bug_size;
const uint32_t* cr_bugs;
Conditions conditions;
@@ -243,6 +245,8 @@ class GPU_EXPORT GpuControlList {
// Collects all disabled extensions.
std::vector<std::string> GetDisabledExtensions();
+ // Collects all disabled WebGL extensions.
+ std::vector<std::string> GetDisabledWebGLExtensions();
// Returns the description and bugs from active entries provided.
// Each problems has:
diff --git a/chromium/gpu/config/gpu_control_list_testing_autogen.cc b/chromium/gpu/config/gpu_control_list_testing_autogen.cc
index 55257433999..72408aeb7e8 100644
--- a/chromium/gpu/config/gpu_control_list_testing_autogen.cc
+++ b/chromium/gpu/config/gpu_control_list_testing_autogen.cc
@@ -23,8 +23,10 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry1, // features
arraysize(kDisabledExtensionsForEntry1), // DisabledExtensions size
kDisabledExtensionsForEntry1, // DisabledExtensions
- arraysize(kCrBugsForEntry1), // CrBugs size
- kCrBugsForEntry1, // CrBugs
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
+ arraysize(kCrBugsForEntry1), // CrBugs size
+ kCrBugsForEntry1, // CrBugs
{
GpuControlList::kOsMacosx, // os_type
{GpuControlList::kEQ, GpuControlList::kVersionStyleNumerical,
@@ -49,6 +51,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry2, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -75,6 +79,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry3, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -101,6 +107,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry4, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -127,6 +135,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry5, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -153,6 +163,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry6, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -179,6 +191,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry7, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -205,6 +219,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry8, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -231,6 +247,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry9, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -257,6 +275,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry10, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -283,6 +303,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry11, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -309,6 +331,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry12, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -335,6 +359,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry13, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -361,6 +387,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry14, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -387,6 +415,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry15, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -413,6 +443,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry16, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -439,6 +471,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry17, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -465,6 +499,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry18, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -491,6 +527,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry19, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -517,6 +555,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry20, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -543,6 +583,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry21, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -569,6 +611,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry22, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -595,6 +639,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry23, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -621,6 +667,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry24, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -647,6 +695,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry25, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -673,6 +723,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry26, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -699,6 +751,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry27, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -725,6 +779,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry28, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -751,6 +807,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry29, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -777,6 +835,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry30, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -803,6 +863,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry31, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -829,6 +891,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry32, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -855,6 +919,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry33, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -881,6 +947,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry34, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -907,6 +975,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry35, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -933,6 +1003,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry36, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -959,6 +1031,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry37, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -985,6 +1059,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry38, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1011,6 +1087,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry39, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1037,6 +1115,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry40, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1063,6 +1143,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry41, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1089,6 +1171,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry42, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1115,6 +1199,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry43, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1141,6 +1227,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry44, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1167,6 +1255,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry45, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1193,6 +1283,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry46, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1220,6 +1312,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry47, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1247,6 +1341,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry48, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1273,6 +1369,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry49, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1299,6 +1397,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry50, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1325,6 +1425,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry51, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1351,6 +1453,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry52, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1377,6 +1481,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry53, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1403,6 +1509,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry54, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1429,8 +1537,10 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
nullptr, // features
arraysize(kDisabledExtensionsForEntry55), // DisabledExtensions size
kDisabledExtensionsForEntry55, // DisabledExtensions
- 0, // CrBugs size
- nullptr, // CrBugs
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
+ 0, // CrBugs size
+ nullptr, // CrBugs
{
GpuControlList::kOsWin, // os_type
{GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical,
@@ -1455,8 +1565,10 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
nullptr, // features
arraysize(kDisabledExtensionsForEntry56), // DisabledExtensions size
kDisabledExtensionsForEntry56, // DisabledExtensions
- 0, // CrBugs size
- nullptr, // CrBugs
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
+ 0, // CrBugs size
+ nullptr, // CrBugs
{
GpuControlList::kOsWin, // os_type
{GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical,
@@ -1481,6 +1593,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry57, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1507,6 +1621,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry58, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1533,6 +1649,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry59, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
@@ -1559,6 +1677,8 @@ const GpuControlList::Entry kGpuControlListTestingEntries[] = {
kFeatureListForEntry60, // features
0, // DisabledExtensions size
nullptr, // DisabledExtensions
+ 0, // DisabledWebGLExtensions size
+ nullptr, // DisabledWebGLExtensions
0, // CrBugs size
nullptr, // CrBugs
{
diff --git a/chromium/gpu/config/gpu_driver_bug_list.json b/chromium/gpu/config/gpu_driver_bug_list.json
index ad57eb8ca40..0b1ed081cc6 100644
--- a/chromium/gpu/config/gpu_driver_bug_list.json
+++ b/chromium/gpu/config/gpu_driver_bug_list.json
@@ -2788,6 +2788,50 @@
"features": [
"max_msaa_sample_count_4"
]
+ },
+ {
+ "id": 256,
+ "description": "Don't expose disjoint_timer_query extensions to WebGL",
+ "cr_bugs": [808744],
+ "disabled_webgl_extensions": [
+ "EXT_disjoint_timer_query",
+ "EXT_disjoint_timer_query_webgl2"
+ ]
+ },
+ {
+ "id": 257,
+ "description": "Fake entry for testing disabling of WebGL extensions",
+ "cr_bugs": [808744],
+ "test_group": 2,
+ "disabled_webgl_extensions": [
+ "WEBGL_lose_context"
+ ]
+ },
+ {
+ "id": 258,
+ "description": "Shader variable initialization in a loop caused perf regression on Mac Intel.",
+ "cr_bugs": [809422],
+ "os": {
+ "type": "macosx"
+ },
+ "vendor_id": "0x8086",
+ "multi_gpu_category": "any",
+ "features": [
+ "dont_use_loops_to_initialize_variables"
+ ]
+ },
+ {
+ "id": 259,
+ "description": "8x MSAA is slow for alpha:false WebGL contexts on Mac Intel",
+ "cr_bugs": [812071],
+ "os": {
+ "type": "macosx"
+ },
+ "vendor_id": "0x8086",
+ "multi_gpu_category": "primary",
+ "features": [
+ "max_msaa_sample_count_4"
+ ]
}
]
}
diff --git a/chromium/gpu/config/gpu_feature_info.h b/chromium/gpu/config/gpu_feature_info.h
index f26572d414b..51138ae81b3 100644
--- a/chromium/gpu/config/gpu_feature_info.h
+++ b/chromium/gpu/config/gpu_feature_info.h
@@ -52,6 +52,8 @@ struct GPU_EXPORT GpuFeatureInfo {
std::vector<int32_t> enabled_gpu_driver_bug_workarounds;
// Disabled extensions separated by whitespaces.
std::string disabled_extensions;
+ // Disabled WebGL extensions separated by whitespaces.
+ std::string disabled_webgl_extensions;
// Applied gpu blacklist entry indices.
std::vector<uint32_t> applied_gpu_blacklist_entries;
// Applied gpu driver bug list entry indices.
diff --git a/chromium/gpu/config/gpu_lists_version.h b/chromium/gpu/config/gpu_lists_version.h
index ad3a5e431c5..3d89bf18a19 100644
--- a/chromium/gpu/config/gpu_lists_version.h
+++ b/chromium/gpu/config/gpu_lists_version.h
@@ -3,6 +3,6 @@
#ifndef GPU_CONFIG_GPU_LISTS_VERSION_H_
#define GPU_CONFIG_GPU_LISTS_VERSION_H_
-#define GPU_LISTS_VERSION "a0bb379a4de011b41ea07da28716e685a1cf4579"
+#define GPU_LISTS_VERSION "2b81d816997306dfdd0c2168d67028502f1cdee2"
#endif // GPU_CONFIG_GPU_LISTS_VERSION_H_
diff --git a/chromium/gpu/config/gpu_util.cc b/chromium/gpu/config/gpu_util.cc
index 2d039f3c951..d68eef65ed5 100644
--- a/chromium/gpu/config/gpu_util.cc
+++ b/chromium/gpu/config/gpu_util.cc
@@ -418,6 +418,16 @@ GpuFeatureInfo ComputeGpuFeatureInfo(const GPUInfo& gpu_info,
driver_bug_disabled_extensions = list->GetDisabledExtensions();
all_disabled_extensions.insert(driver_bug_disabled_extensions.begin(),
driver_bug_disabled_extensions.end());
+
+ // Disabling WebGL extensions only occurs via the blacklist, so
+ // the logic is simpler.
+ gl::ExtensionSet disabled_webgl_extensions;
+ std::vector<std::string> disabled_webgl_extension_list =
+ list->GetDisabledWebGLExtensions();
+ disabled_webgl_extensions.insert(disabled_webgl_extension_list.begin(),
+ disabled_webgl_extension_list.end());
+ gpu_feature_info.disabled_webgl_extensions =
+ gl::MakeExtensionString(disabled_webgl_extensions);
}
gpu::GpuDriverBugList::AppendWorkaroundsFromCommandLine(
&enabled_driver_bug_workarounds, *command_line);
diff --git a/chromium/gpu/config/process_json.py b/chromium/gpu/config/process_json.py
index bc67ce3bdbc..03910fc36c9 100755
--- a/chromium/gpu/config/process_json.py
+++ b/chromium/gpu/config/process_json.py
@@ -127,9 +127,10 @@ def write_features(entry_id, feature_set, feature_name_prefix,
data_helper_file.write('};\n\n')
-def write_disabled_extension_list(entry_id, data, data_file, data_helper_file):
+def write_disabled_extension_list(entry_kind, entry_id, data, data_file,
+ data_helper_file):
if data:
- var_name = 'kDisabledExtensionsForEntry' + str(entry_id)
+ var_name = 'k%sForEntry%d' % (entry_kind, entry_id)
# define the list
data_helper_file.write(
'const char* const %s[%d] = {\n' % (var_name, len(data)))
@@ -138,11 +139,11 @@ def write_disabled_extension_list(entry_id, data, data_file, data_helper_file):
data_helper_file.write(',\n')
data_helper_file.write('};\n\n')
# use the list
- data_file.write('arraysize(%s), // DisabledExtensions size\n' % var_name)
- data_file.write('%s, // DisabledExtensions\n' % var_name)
+ data_file.write('arraysize(%s), // %s size\n' % (var_name, entry_kind))
+ data_file.write('%s, // %s\n' % (var_name, entry_kind))
else:
- data_file.write('0, // DisabledExtensions size\n')
- data_file.write('nullptr, // DisabledExtensions\n')
+ data_file.write('0, // %s size\n' % entry_kind)
+ data_file.write('nullptr, // %s\n' % entry_kind)
def write_gl_strings(entry_id, is_exception, exception_id, data,
@@ -381,6 +382,9 @@ def write_conditions(entry_id, is_exception, exception_id, entry,
elif key == 'disabled_extensions':
assert not is_exception
continue
+ elif key == 'disabled_webgl_extensions':
+ assert not is_exception
+ continue
elif key == 'comment':
continue
elif key == 'webkit_bugs':
@@ -526,10 +530,12 @@ def write_entry(entry, total_feature_set, feature_name_prefix,
data_file.write('0, // feature size\n')
data_file.write('nullptr, // features\n')
# Disabled extensions
- disabled_extensions = None
- if 'disabled_extensions' in entry:
- disabled_extensions = entry['disabled_extensions']
- write_disabled_extension_list(entry_id, disabled_extensions,
+ write_disabled_extension_list('DisabledExtensions', entry_id,
+ entry.get('disabled_extensions', None),
+ data_file, data_helper_file)
+ # Disabled WebGL extensions
+ write_disabled_extension_list('DisabledWebGLExtensions', entry_id,
+ entry.get('disabled_webgl_extensions', None),
data_file, data_helper_file)
# webkit_bugs are skipped because there is only one entry that has it.
# cr_bugs
diff --git a/chromium/gpu/ipc/common/gpu_feature_info.mojom b/chromium/gpu/ipc/common/gpu_feature_info.mojom
index 72fe15315d6..01cf4e627f9 100644
--- a/chromium/gpu/ipc/common/gpu_feature_info.mojom
+++ b/chromium/gpu/ipc/common/gpu_feature_info.mojom
@@ -30,6 +30,9 @@ struct GpuFeatureInfo {
// GL extensions disabled by GpuDriverBugWorkarounds, separated by ' '.
string disabled_extensions;
+ // WebGL extensions disabled by GpuDriverBugWorkarounds, separated by ' '.
+ string disabled_webgl_extensions;
+
// The array contains a list of gpu blacklist entry indices that apply in the
// current platform. The entries are defined in
// gpu/config/software_rendering_list.json.
diff --git a/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h b/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h
index 79f959c96b0..c7b0a07b5c8 100644
--- a/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h
+++ b/chromium/gpu/ipc/common/gpu_feature_info_struct_traits.h
@@ -71,6 +71,7 @@ struct StructTraits<gpu::mojom::GpuFeatureInfoDataView, gpu::GpuFeatureInfo> {
return data.ReadEnabledGpuDriverBugWorkarounds(
&out->enabled_gpu_driver_bug_workarounds) &&
data.ReadDisabledExtensions(&out->disabled_extensions) &&
+ data.ReadDisabledWebglExtensions(&out->disabled_webgl_extensions) &&
data.ReadAppliedGpuBlacklistEntries(
&out->applied_gpu_blacklist_entries) &&
gpu::GpuBlacklist::AreEntryIndicesValid(
@@ -97,6 +98,11 @@ struct StructTraits<gpu::mojom::GpuFeatureInfoDataView, gpu::GpuFeatureInfo> {
return info.disabled_extensions;
}
+ static const std::string& disabled_webgl_extensions(
+ const gpu::GpuFeatureInfo& info) {
+ return info.disabled_webgl_extensions;
+ }
+
static const std::vector<uint32_t>& applied_gpu_blacklist_entries(
const gpu::GpuFeatureInfo& info) {
return info.applied_gpu_blacklist_entries;
diff --git a/chromium/gpu/ipc/service/gpu_channel_manager.cc b/chromium/gpu/ipc/service/gpu_channel_manager.cc
index f8bcb0cce52..15ca2459e40 100644
--- a/chromium/gpu/ipc/service/gpu_channel_manager.cc
+++ b/chromium/gpu/ipc/service/gpu_channel_manager.cc
@@ -266,6 +266,10 @@ void GpuChannelManager::DoWakeUpGpu() {
void GpuChannelManager::OnApplicationStateChange(
base::android::ApplicationState state) {
+ // TODO(ericrk): Temporarily disable the context release logic due to
+ // https://crbug.com/792120. Re-enable when the fix lands.
+ return;
+
if (state != base::android::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES ||
!is_running_on_low_end_mode_) {
return;
diff --git a/chromium/ios/chrome/browser/ui/BUILD.gn b/chromium/ios/chrome/browser/ui/BUILD.gn
index 91366e8eb93..123517889d0 100644
--- a/chromium/ios/chrome/browser/ui/BUILD.gn
+++ b/chromium/ios/chrome/browser/ui/BUILD.gn
@@ -231,6 +231,8 @@ source_set("ui_internal") {
"fade_truncated_label.mm",
"key_commands_provider.h",
"key_commands_provider.mm",
+ "new_foreground_tab_fullscreen_disabler.h",
+ "new_foreground_tab_fullscreen_disabler.mm",
"open_in_controller.h",
"open_in_controller.mm",
"open_in_controller_testing.h",
diff --git a/chromium/ios/chrome/browser/ui/main/BUILD.gn b/chromium/ios/chrome/browser/ui/main/BUILD.gn
index 2066f74e8f2..e450a48d94d 100644
--- a/chromium/ios/chrome/browser/ui/main/BUILD.gn
+++ b/chromium/ios/chrome/browser/ui/main/BUILD.gn
@@ -19,6 +19,7 @@ source_set("main") {
deps = [
":feature_flags",
"//base",
+ "//ios/chrome/app/resources:launchscreen_xib",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/browsing_data",
diff --git a/chromium/ios/chrome/browser/web/BUILD.gn b/chromium/ios/chrome/browser/web/BUILD.gn
index bc34096a358..2b64f71e84e 100644
--- a/chromium/ios/chrome/browser/web/BUILD.gn
+++ b/chromium/ios/chrome/browser/web/BUILD.gn
@@ -38,9 +38,12 @@ source_set("web") {
"//components/strings",
"//ios/chrome/app/strings:ios_strings_grit",
"//ios/chrome/browser",
+ "//ios/chrome/browser/browser_state",
"//ios/chrome/browser/snapshots",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/commands:commands",
+ "//ios/chrome/browser/ui/fullscreen",
+ "//ios/chrome/browser/ui/fullscreen:new_fullscreen",
"//ios/chrome/browser/ui/util:util",
"//ios/web",
"//ui/base",
diff --git a/chromium/media/capture/video/chromeos/camera_device_delegate.cc b/chromium/media/capture/video/chromeos/camera_device_delegate.cc
index 0383a05f4c6..1d489a12d33 100644
--- a/chromium/media/capture/video/chromeos/camera_device_delegate.cc
+++ b/chromium/media/capture/video/chromeos/camera_device_delegate.cc
@@ -86,14 +86,13 @@ void CameraDeviceDelegate::AllocateAndStart(
}
void CameraDeviceDelegate::StopAndDeAllocate(
- base::Closure device_close_callback) {
+ base::OnceClosure device_close_callback) {
DCHECK(ipc_task_runner_->BelongsToCurrentThread());
- // StopAndDeAllocate may be called at any state except
- // CameraDeviceContext::State::kStopping.
- DCHECK_NE(device_context_->GetState(), CameraDeviceContext::State::kStopping);
- if (device_context_->GetState() == CameraDeviceContext::State::kStopped ||
- !stream_buffer_manager_) {
+ if (!device_context_ ||
+ device_context_->GetState() == CameraDeviceContext::State::kStopped ||
+ (device_context_->GetState() == CameraDeviceContext::State::kError &&
+ !stream_buffer_manager_)) {
// In case of Mojo connection error the device may be stopped before
// StopAndDeAllocate is called; in case of device open failure, the state
// is set to kError and |stream_buffer_manager_| is uninitialized.
@@ -101,6 +100,10 @@ void CameraDeviceDelegate::StopAndDeAllocate(
return;
}
+ // StopAndDeAllocate may be called at any state except
+ // CameraDeviceContext::State::kStopping.
+ DCHECK_NE(device_context_->GetState(), CameraDeviceContext::State::kStopping);
+
device_close_callback_ = std::move(device_close_callback);
device_context_->SetState(CameraDeviceContext::State::kStopping);
if (!device_ops_.is_bound()) {
diff --git a/chromium/media/capture/video/chromeos/camera_device_delegate.h b/chromium/media/capture/video/chromeos/camera_device_delegate.h
index 9c062e04216..9cff56adbcf 100644
--- a/chromium/media/capture/video/chromeos/camera_device_delegate.h
+++ b/chromium/media/capture/video/chromeos/camera_device_delegate.h
@@ -66,7 +66,7 @@ class CAPTURE_EXPORT CameraDeviceDelegate final {
// Delegation methods for the VideoCaptureDevice interface.
void AllocateAndStart(const VideoCaptureParams& params,
CameraDeviceContext* device_context);
- void StopAndDeAllocate(base::Closure device_close_callback);
+ void StopAndDeAllocate(base::OnceClosure device_close_callback);
void TakePhoto(VideoCaptureDevice::TakePhotoCallback callback);
void GetPhotoState(VideoCaptureDevice::GetPhotoStateCallback callback);
void SetPhotoOptions(mojom::PhotoSettingsPtr settings,
@@ -162,7 +162,7 @@ class CAPTURE_EXPORT CameraDeviceDelegate final {
// Where all the Mojo IPC calls takes place.
const scoped_refptr<base::SingleThreadTaskRunner> ipc_task_runner_;
- base::Closure device_close_callback_;
+ base::OnceClosure device_close_callback_;
base::WeakPtrFactory<CameraDeviceDelegate> weak_ptr_factory_;
diff --git a/chromium/media/capture/video/chromeos/camera_device_delegate_unittest.cc b/chromium/media/capture/video/chromeos/camera_device_delegate_unittest.cc
index 8103886fd20..8a0316b94a2 100644
--- a/chromium/media/capture/video/chromeos/camera_device_delegate_unittest.cc
+++ b/chromium/media/capture/video/chromeos/camera_device_delegate_unittest.cc
@@ -576,4 +576,46 @@ TEST_F(CameraDeviceDelegateTest, FailToOpenDevice) {
ResetDevice();
}
+// Test that the class handles it correctly when StopAndDeAllocate is called
+// multiple times.
+TEST_F(CameraDeviceDelegateTest, DoubleStopAndDeAllocate) {
+ AllocateDeviceWithDescriptor(kDefaultDescriptor);
+
+ VideoCaptureParams params;
+ params.requested_format = kDefaultCaptureFormat;
+
+ auto* mock_client = ResetDeviceContext();
+ mock_client->SetFrameCb(BindToCurrentLoop(base::BindOnce(
+ &CameraDeviceDelegateTest::QuitRunLoop, base::Unretained(this))));
+ mock_client->SetQuitCb(BindToCurrentLoop(base::BindOnce(
+ &CameraDeviceDelegateTest::QuitRunLoop, base::Unretained(this))));
+ SetUpExpectationUntilCapturing(mock_client);
+ SetUpExpectationForCaptureLoop();
+
+ device_delegate_thread_.task_runner()->PostTask(
+ FROM_HERE, base::BindOnce(&CameraDeviceDelegate::AllocateAndStart,
+ camera_device_delegate_->GetWeakPtr(), params,
+ base::Unretained(device_context_.get())));
+
+ // Wait until a frame is received. MockVideoCaptureClient calls QuitRunLoop()
+ // to stop the run loop.
+ DoLoop();
+
+ EXPECT_EQ(CameraDeviceContext::State::kCapturing, GetState());
+
+ SetUpExpectationForClose();
+
+ WaitForDeviceToClose();
+
+ device_delegate_thread_.task_runner()->PostTask(
+ FROM_HERE, base::BindOnce(&CameraDeviceDelegate::StopAndDeAllocate,
+ camera_device_delegate_->GetWeakPtr(),
+ BindToCurrentLoop(base::BindOnce(
+ &CameraDeviceDelegateTest::QuitRunLoop,
+ base::Unretained(this)))));
+ DoLoop();
+
+ ResetDevice();
+}
+
} // namespace media
diff --git a/chromium/media/capture/video/chromeos/video_capture_device_arc_chromeos.cc b/chromium/media/capture/video/chromeos/video_capture_device_arc_chromeos.cc
index 91da489c4a9..934c117cc25 100644
--- a/chromium/media/capture/video/chromeos/video_capture_device_arc_chromeos.cc
+++ b/chromium/media/capture/video/chromeos/video_capture_device_arc_chromeos.cc
@@ -136,6 +136,9 @@ void VideoCaptureDeviceArcChromeOS::SuspendDone(
void VideoCaptureDeviceArcChromeOS::OpenDevice() {
DCHECK(capture_task_runner_->BelongsToCurrentThread());
+ if (!camera_device_delegate_) {
+ return;
+ }
// It's safe to pass unretained |device_context_| here since
// VideoCaptureDeviceArcChromeOS owns |camera_device_delegate_| and makes
// sure |device_context_| outlives |camera_device_delegate_|.
diff --git a/chromium/media/filters/ffmpeg_demuxer.cc b/chromium/media/filters/ffmpeg_demuxer.cc
index 1daed0152f8..2143e474394 100644
--- a/chromium/media/filters/ffmpeg_demuxer.cc
+++ b/chromium/media/filters/ffmpeg_demuxer.cc
@@ -1709,8 +1709,10 @@ void FFmpegDemuxer::OnEnabledAudioTracksChanged(
std::set<FFmpegDemuxerStream*> enabled_streams;
for (const auto& id : track_ids) {
- FFmpegDemuxerStream* stream = track_id_to_demux_stream_map_[id];
- DCHECK(stream);
+ auto it = track_id_to_demux_stream_map_.find(id);
+ if (it == track_id_to_demux_stream_map_.end())
+ continue;
+ FFmpegDemuxerStream* stream = it->second;
DCHECK_EQ(DemuxerStream::AUDIO, stream->type());
// TODO(servolk): Remove after multiple enabled audio tracks are supported
// by the media::RendererImpl.
@@ -1745,9 +1747,12 @@ void FFmpegDemuxer::OnSelectedVideoTrackChanged(
FFmpegDemuxerStream* selected_stream = nullptr;
if (track_id) {
- selected_stream = track_id_to_demux_stream_map_[*track_id];
- DCHECK(selected_stream);
- DCHECK_EQ(DemuxerStream::VIDEO, selected_stream->type());
+ auto it = track_id_to_demux_stream_map_.find(*track_id);
+ if (it != track_id_to_demux_stream_map_.end()) {
+ selected_stream = it->second;
+ DCHECK(selected_stream);
+ DCHECK_EQ(DemuxerStream::VIDEO, selected_stream->type());
+ }
}
// First disable all streams that need to be disabled and then enable the
diff --git a/chromium/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/chromium/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
index 58bc7bf9059..b6b912ee799 100644
--- a/chromium/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
+++ b/chromium/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
@@ -1270,11 +1270,18 @@ void V4L2VideoDecodeAccelerator::Enqueue() {
// change. They implicitly send a V4L2_DEC_CMD_STOP and V4L2_DEC_CMD_START
// to the decoder.
if (input_buffer_queued_count_ == 0) {
- if (!SendDecoderCmdStop())
- return;
input_ready_queue_.pop();
free_input_buffers_.push_back(buffer);
input_record.input_id = -1;
+ if (coded_size_.IsEmpty()) {
+ // If coded_size_.IsEmpty(), no output buffer could have been
+ // allocated and there is nothing to flush. We can NotifyFlushDone()
+ // immediately, without requesting flush to the driver via
+ // SendDecoderCmdStop().
+ NotifyFlushDoneIfNeeded();
+ } else if (!SendDecoderCmdStop()) {
+ return;
+ }
} else {
break;
}
diff --git a/chromium/net/base/registry_controlled_domains/effective_tld_names.dat b/chromium/net/base/registry_controlled_domains/effective_tld_names.dat
index 35c87774e29..efda68a1292 100644
--- a/chromium/net/base/registry_controlled_domains/effective_tld_names.dat
+++ b/chromium/net/base/registry_controlled_domains/effective_tld_names.dat
@@ -7,6 +7,10 @@
// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/.
+// Chromium note: this is based on Mozilla's file:
+// https://publicsuffix.org/list/public_suffix_list.dat
+
+
// ===BEGIN ICANN DOMAINS===
// ac : https://en.wikipedia.org/wiki/.ac
@@ -384,39 +388,86 @@ org.bm
// bn : https://en.wikipedia.org/wiki/.bn
*.bn
-// bo : http://www.nic.bo/
+// bo : https://nic.bo/delegacion2015.php#h-1.10
bo
com.bo
edu.bo
-gov.bo
gob.bo
int.bo
org.bo
net.bo
mil.bo
tv.bo
+web.bo
+// Social Domains
+academia.bo
+agro.bo
+arte.bo
+blog.bo
+bolivia.bo
+ciencia.bo
+cooperativa.bo
+democracia.bo
+deporte.bo
+ecologia.bo
+economia.bo
+empresa.bo
+indigena.bo
+industria.bo
+info.bo
+medicina.bo
+movimiento.bo
+musica.bo
+natural.bo
+nombre.bo
+noticias.bo
+patria.bo
+politica.bo
+profesional.bo
+plurinacional.bo
+pueblo.bo
+revista.bo
+salud.bo
+tecnologia.bo
+tksat.bo
+transporte.bo
+wiki.bo
// br : http://registro.br/dominio/categoria.html
// Submitted by registry <fneves@registro.br>
br
+9guacu.br
+abc.br
adm.br
adv.br
agr.br
+aju.br
am.br
+anani.br
+aparecida.br
arq.br
art.br
ato.br
b.br
belem.br
+bhz.br
bio.br
blog.br
bmd.br
+boavista.br
+bsb.br
+campinagrande.br
+campinas.br
+caxias.br
cim.br
cng.br
cnt.br
com.br
+contagem.br
coop.br
cri.br
+cuiaba.br
+curitiba.br
def.br
ecn.br
eco.br
@@ -427,14 +478,18 @@ esp.br
etc.br
eti.br
far.br
+feira.br
flog.br
floripa.br
fm.br
fnd.br
+fortal.br
fot.br
+foz.br
fst.br
g12.br
ggf.br
+goiania.br
gov.br
// gov.br 26 states + df https://en.wikipedia.org/wiki/States_of_Brazil
ac.gov.br
@@ -464,42 +519,72 @@ sc.gov.br
se.gov.br
sp.gov.br
to.gov.br
+gru.br
imb.br
ind.br
inf.br
+jab.br
jampa.br
+jdf.br
+joinville.br
jor.br
jus.br
leg.br
lel.br
+londrina.br
+macapa.br
+maceio.br
+manaus.br
+maringa.br
mat.br
med.br
mil.br
+morena.br
mp.br
mus.br
+natal.br
net.br
+niteroi.br
*.nom.br
not.br
ntr.br
odo.br
org.br
+osasco.br
+palmas.br
poa.br
ppg.br
pro.br
psc.br
psi.br
+pvh.br
qsl.br
radio.br
rec.br
recife.br
+ribeirao.br
+rio.br
+riobranco.br
+riopreto.br
+salvador.br
+sampa.br
+santamaria.br
+santoandre.br
+saobernardo.br
+saogonca.br
+sjc.br
slg.br
+slz.br
+sorocaba.br
srv.br
taxi.br
teo.br
+the.br
tmp.br
trd.br
tur.br
tv.br
+udi.br
vet.br
vix.br
vlog.br
@@ -3456,8 +3541,17 @@ uenohara.yamanashi.jp
yamanakako.yamanashi.jp
yamanashi.yamanashi.jp
-// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145
-*.ke
+// ke : http://www.kenic.or.ke/index.php/en/ke-domains/ke-domains
+ke
+ac.ke
+co.ke
+go.ke
+info.ke
+me.ke
+mobi.ke
+ne.ke
+or.ke
+sc.ke
// kg : http://www.domain.kg/dmn_n.html
kg
@@ -7484,9 +7578,6 @@ cheap
// chintai : 2015-06-11 CHINTAI Corporation
chintai
-// chloe : 2014-10-16 Richemont DNS Inc.
-chloe
-
// christmas : 2013-11-21 Uniregistry, Corp.
christmas
@@ -8357,9 +8448,6 @@ how
// hsbc : 2014-10-24 HSBC Holdings PLC
hsbc
-// htc : 2015-04-02 HTC corporation
-htc
-
// hughes : 2015-07-30 Hughes Satellite Systems Corporation
hughes
@@ -8813,12 +8901,6 @@ mattel
// mba : 2015-04-02 Lone Hollow, LLC
mba
-// mcd : 2015-07-30 McDonald’s Corporation
-mcd
-
-// mcdonalds : 2015-07-30 McDonald’s Corporation
-mcdonalds
-
// mckinsey : 2015-07-31 McKinsey Holdings, Inc.
mckinsey
@@ -8909,9 +8991,6 @@ money
// monster : 2015-09-11 Monster Worldwide, Inc.
monster
-// montblanc : 2014-06-23 Richemont DNS Inc.
-montblanc
-
// mopar : 2015-07-30 FCA US LLC.
mopar
@@ -9143,9 +9222,6 @@ ovh
// page : 2014-12-04 Charleston Road Registry Inc.
page
-// pamperedchef : 2015-02-05 The Pampered Chef, Ltd.
-pamperedchef
-
// panasonic : 2015-07-30 Panasonic Corporation
panasonic
@@ -10567,6 +10643,12 @@ cc.ua
inf.ua
ltd.ua
+// AgileBits Inc : https://agilebits.com
+// Submitted by Roustem Karimov <roustem@agilebits.com>
+1password.ca
+1password.com
+1password.eu
+
// Agnat sp. z o.o. : https://domena.pl
// Submitted by Przemyslaw Plewa <it-admin@domena.pl>
beep.pl
@@ -10578,7 +10660,7 @@ beep.pl
// alwaysdata : https://www.alwaysdata.com
// Submitted by Cyril <admin@alwaysdata.com>
-*.alwaysdata.net
+alwaysdata.net
// Amazon CloudFront : https://aws.amazon.com/cloudfront/
// Submitted by Donavan Miller <donavanm@amazon.com>
@@ -10604,6 +10686,7 @@ ca-central-1.elasticbeanstalk.com
eu-central-1.elasticbeanstalk.com
eu-west-1.elasticbeanstalk.com
eu-west-2.elasticbeanstalk.com
+eu-west-3.elasticbeanstalk.com
sa-east-1.elasticbeanstalk.com
us-east-1.elasticbeanstalk.com
us-east-2.elasticbeanstalk.com
@@ -10628,6 +10711,7 @@ s3-ca-central-1.amazonaws.com
s3-eu-central-1.amazonaws.com
s3-eu-west-1.amazonaws.com
s3-eu-west-2.amazonaws.com
+s3-eu-west-3.amazonaws.com
s3-external-1.amazonaws.com
s3-fips-us-gov-west-1.amazonaws.com
s3-sa-east-1.amazonaws.com
@@ -10641,6 +10725,7 @@ s3.cn-north-1.amazonaws.com.cn
s3.ca-central-1.amazonaws.com
s3.eu-central-1.amazonaws.com
s3.eu-west-2.amazonaws.com
+s3.eu-west-3.amazonaws.com
s3.us-east-2.amazonaws.com
s3.dualstack.ap-northeast-1.amazonaws.com
s3.dualstack.ap-northeast-2.amazonaws.com
@@ -10651,6 +10736,7 @@ s3.dualstack.ca-central-1.amazonaws.com
s3.dualstack.eu-central-1.amazonaws.com
s3.dualstack.eu-west-1.amazonaws.com
s3.dualstack.eu-west-2.amazonaws.com
+s3.dualstack.eu-west-3.amazonaws.com
s3.dualstack.sa-east-1.amazonaws.com
s3.dualstack.us-east-1.amazonaws.com
s3.dualstack.us-east-2.amazonaws.com
@@ -10667,6 +10753,7 @@ s3-website.ap-south-1.amazonaws.com
s3-website.ca-central-1.amazonaws.com
s3-website.eu-central-1.amazonaws.com
s3-website.eu-west-2.amazonaws.com
+s3-website.eu-west-3.amazonaws.com
s3-website.us-east-2.amazonaws.com
// Amune : https://amune.org/
@@ -10855,6 +10942,11 @@ cloudns.us
co.nl
co.no
+// Combell.com : https://www.combell.com
+// Submitted by Thomas Wouters <thomas.wouters@combellgroup.com>
+webhosting.be
+hosting-cluster.nl
+
// COSIMO GmbH : http://www.cosimo.de
// Submitted by Rene Marticke <rmarticke@cosimo.de>
dyn.cosidns.de
@@ -10897,6 +10989,10 @@ firm.dk
reg.dk
store.dk
+// Debian : https://www.debian.org/
+// Submitted by Peter Palfrader / Debian Sysadmin Team <dsa-publicsuffixlist@debian.org>
+debian.net
+
// deSEC : https://desec.io/
// Submitted by Peter Thomassen <peter@desec.io>
dedyn.io
@@ -11449,6 +11545,8 @@ fhapp.xyz
fedorainfracloud.org
fedorapeople.org
cloud.fedoraproject.org
+app.os.fedoraproject.org
+app.os.stg.fedoraproject.org
// Filegear Inc. : https://www.filegear.com
// Submitted by Jason Zhu <jason@owtware.com>
@@ -11472,10 +11570,6 @@ fbxos.fr
freebox-os.fr
freeboxos.fr
-// Fusion Intranet : https://www.fusion-intranet.com
-// Submitted by Matthias Burtscher <matthias.burtscher@fusonic.net>
-myfusion.cloud
-
// Futureweb OG : http://www.futureweb.at
// Submitted by Andreas Schnederle-Wagner <schnederle@futureweb.at>
*.futurecms.at
@@ -11761,6 +11855,10 @@ netlify.com
// Submitted by Alan Shreve <alan@ngrok.com>
ngrok.io
+// Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/
+// Submitted by Nicholas Ford <nick@nimbushosting.co.uk>
+nh-serv.co.uk
+
// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
nfshost.com
@@ -12019,6 +12117,11 @@ rackmaze.net
// Submitted by Tim Kramer <tkramer@rhcloud.com>
rhcloud.com
+// Resin.io : https://resin.io
+// Submitted by Tim Perry <tim@resin.io>
+resindevice.io
+devices.resinstaging.io
+
// RethinkDB : https://www.rethinkdb.com/
// Submitted by Chris Kastorff <info@rethinkdb.com>
hzc.io
@@ -12038,6 +12141,10 @@ sandcats.io
logoip.de
logoip.com
+// Scry Security : http://www.scrysec.com
+// Submitted by Shante Adam <shante@skyhat.io>
+scrysec.com
+
// Securepoint GmbH : https://www.securepoint.de
// Submitted by Erik Anders <erik.anders@securepoint.de>
firewall-gateway.com
@@ -12053,6 +12160,7 @@ spdns.org
// SensioLabs, SAS : https://sensiolabs.com/
// Submitted by Fabien Potencier <fabien.potencier@sensiolabs.com>
+*.s5y.io
*.sensiosite.cloud
// Service Online LLC : http://drs.ua/
diff --git a/chromium/net/base/registry_controlled_domains/effective_tld_names.gperf b/chromium/net/base/registry_controlled_domains/effective_tld_names.gperf
index cd54f574ec4..c8a96e03502 100644
--- a/chromium/net/base/registry_controlled_domains/effective_tld_names.gperf
+++ b/chromium/net/base/registry_controlled_domains/effective_tld_names.gperf
@@ -19,6 +19,9 @@ struct DomainRule {
12hp.de, 4
1337.pictures, 4
1kapp.com, 4
+1password.ca, 4
+1password.com, 4
+1password.eu, 4
2.bg, 0
2000.hu, 0
2ix.at, 4
@@ -36,6 +39,7 @@ struct DomainRule {
7.bg, 0
8.bg, 0
9.bg, 0
+9guacu.br, 0
a.bg, 0
a.prod.fastly.net, 4
a.se, 0
@@ -52,6 +56,7 @@ abb, 0
abbott, 0
abbvie, 0
abc, 0
+abc.br, 0
abeno.osaka.jp, 0
abiko.chiba.jp, 0
abira.hokkaido.jp, 0
@@ -79,6 +84,7 @@ ac.im, 0
ac.in, 0
ac.ir, 0
ac.jp, 0
+ac.ke, 0
ac.kr, 0
ac.leg.br, 4
ac.lk, 0
@@ -106,6 +112,7 @@ ac.za, 0
ac.zm, 0
ac.zw, 0
aca.pro, 0
+academia.bo, 0
academy, 0
academy.museum, 0
accenture, 0
@@ -167,6 +174,7 @@ agric.za, 0
agriculture.museum, 0
agrigento.it, 0
agrinet.tn, 0
+agro.bo, 0
agro.pl, 0
aguni.okinawa.jp, 0
ah.cn, 0
@@ -198,6 +206,7 @@ aizubange.fukushima.jp, 0
aizumi.tokushima.jp, 0
aizumisato.fukushima.jp, 0
aizuwakamatsu.fukushima.jp, 0
+aju.br, 0
ak.us, 0
akabira.hokkaido.jp, 0
akagi.shimane.jp, 0
@@ -246,7 +255,7 @@ alta.no, 0
alto-adige.it, 0
altoadige.it, 0
alvdal.no, 0
-alwaysdata.net, 6
+alwaysdata.net, 4
am, 0
am.br, 0
am.gov.br, 0
@@ -279,6 +288,7 @@ analytics, 0
anamizu.ishikawa.jp, 0
anan.nagano.jp, 0
anan.tokushima.jp, 0
+anani.br, 0
ancona.it, 0
and.museum, 0
andasuolo.no, 0
@@ -321,8 +331,11 @@ ap.gov.br, 0
ap.gov.pl, 0
ap.it, 0
ap.leg.br, 4
+aparecida.br, 0
apartments, 0
app, 0
+app.os.fedoraproject.org, 4
+app.os.stg.fedoraproject.org, 4
appchizi.com, 4
apple, 0
applinzi.com, 4
@@ -375,6 +388,7 @@ artanddesign.museum, 0
artcenter.museum, 0
artdeco.museum, 0
arte, 0
+arte.bo, 0
arteducation.museum, 0
artgallery.museum, 0
arts.co, 0
@@ -629,6 +643,7 @@ bg.eu.org, 4
bg.it, 0
bh, 0
bharti, 0
+bhz.br, 0
bi, 0
bi.it, 0
bialowieza.pl, 0
@@ -692,6 +707,7 @@ blackfriday, 0
blanco, 0
blockbuster, 0
blog, 0
+blog.bo, 0
blog.br, 0
blogdns.com, 4
blogdns.net, 4
@@ -791,12 +807,14 @@ bo.it, 0
bo.nordland.no, 0
bo.telemark.no, 0
boats, 0
+boavista.br, 0
bodo.no, 0
boehringer, 0
bofa, 0
bokn.no, 0
boldlygoingnowhere.org, 4
boleslawiec.pl, 0
+bolivia.bo, 0
bologna.it, 0
bolt.hu, 0
bolzano.it, 0
@@ -861,6 +879,7 @@ bryansk.su, 4
bryne.no, 0
bs, 0
bs.it, 0
+bsb.br, 0
bt, 0
bt.it, 0
bu.no, 0
@@ -929,6 +948,8 @@ camp, 0
campania.it, 0
campidano-medio.it, 0
campidanomedio.it, 0
+campinagrande.br, 0
+campinas.br, 0
campobasso.it, 0
can.museum, 0
canada.museum, 0
@@ -970,6 +991,7 @@ catanzaro.it, 0
catering, 0
catering.aero, 0
catholic, 0
+caxias.br, 0
cb.it, 0
cba, 0
cbg.ru, 4
@@ -1108,7 +1130,6 @@ chitose.hokkaido.jp, 0
chiyoda.gunma.jp, 0
chiyoda.tokyo.jp, 0
chizu.tottori.jp, 0
-chloe, 0
chocolate.museum, 0
chofu.tokyo.jp, 0
chonan.chiba.jp, 0
@@ -1130,6 +1151,7 @@ chuo.yamanashi.jp, 0
church, 0
ci, 0
ci.it, 0
+ciencia.bo, 0
cieszyn.pl, 0
cim.br, 0
cincinnati.museum, 0
@@ -1234,6 +1256,7 @@ co.ir, 0
co.it, 0
co.je, 0
co.jp, 0
+co.ke, 0
co.kr, 0
co.krd, 4
co.lc, 0
@@ -1448,6 +1471,7 @@ consultant.aero, 0
consulting, 0
consulting.aero, 0
contact, 0
+contagem.br, 0
contemporary.museum, 0
contemporaryart.museum, 0
contractors, 0
@@ -1464,6 +1488,7 @@ coop.mv, 0
coop.mw, 0
coop.py, 0
coop.tt, 0
+cooperativa.bo, 0
copenhagen.museum, 0
corporation.museum, 0
corsica, 0
@@ -1506,12 +1531,14 @@ csc, 0
ct.it, 0
ct.us, 0
cu, 0
+cuiaba.br, 0
cuisinella, 0
cultural.museum, 0
culturalcenter.museum, 0
culture.museum, 0
cuneo.it, 0
cupcake.is, 4
+curitiba.br, 0
cust.dev.thingdust.io, 4
cust.disrec.thingdust.io, 4
cust.prod.thingdust.io, 4
@@ -1585,6 +1612,7 @@ deal, 0
dealer, 0
deals, 0
deatnu.no, 0
+debian.net, 4
decorativearts.museum, 0
dedyn.io, 4
def.br, 0
@@ -1600,12 +1628,14 @@ dellogliastra.it, 0
delmenhorst.museum, 0
deloitte, 0
delta, 0
+democracia.bo, 0
democrat, 0
demon.nl, 4
denmark.museum, 0
dental, 0
dentist, 0
dep.no, 0
+deporte.bo, 0
depot.museum, 0
desa.id, 0
desi, 0
@@ -1616,6 +1646,7 @@ detroit.museum, 0
dev, 0
dev-myqnapcloud.com, 4
dev.static.land, 4
+devices.resinstaging.io, 4
df.gov.br, 0
df.leg.br, 4
dgca.aero, 0
@@ -1776,6 +1807,8 @@ echizen.fukui.jp, 0
ecn.br, 0
eco, 0
eco.br, 0
+ecologia.bo, 0
+economia.bo, 0
ed.ao, 0
ed.ci, 0
ed.cr, 0
@@ -1940,6 +1973,7 @@ emergency.aero, 0
emilia-romagna.it, 0
emiliaromagna.it, 0
emp.br, 0
+empresa.bo, 0
emr.it, 0
en.it, 0
ena.gifu.jp, 0
@@ -2011,6 +2045,7 @@ eu-4.evennode.com, 4
eu-central-1.elasticbeanstalk.com, 4
eu-west-1.elasticbeanstalk.com, 4
eu-west-2.elasticbeanstalk.com, 4
+eu-west-3.elasticbeanstalk.com, 4
eu.com, 4
eu.int, 0
eu.meteorapp.com, 4
@@ -2073,6 +2108,7 @@ fedje.no, 0
fedorainfracloud.org, 4
fedorapeople.org, 4
feedback, 0
+feira.br, 0
fermo.it, 0
ferrara.it, 0
ferrari, 0
@@ -2185,6 +2221,7 @@ forli-cesena.it, 0
forlicesena.it, 0
forsale, 0
forsand.no, 0
+fortal.br, 0
fortmissoula.museum, 0
fortworth.museum, 0
forum, 0
@@ -2194,6 +2231,7 @@ fot.br, 0
foundation, 0
foundation.museum, 0
fox, 0
+foz.br, 0
fr, 0
fr.eu.org, 4
fr.it, 0
@@ -2485,6 +2523,7 @@ go.gov.br, 0
go.id, 0
go.it, 0
go.jp, 0
+go.ke, 0
go.kr, 0
go.leg.br, 4
go.pw, 0
@@ -2510,6 +2549,7 @@ gob.ve, 0
gobo.wakayama.jp, 0
godaddy, 0
godo.gifu.jp, 0
+goiania.br, 0
goip.de, 4
gojome.akita.jp, 0
gok.pk, 0
@@ -2567,7 +2607,6 @@ gov.bb, 0
gov.bf, 0
gov.bh, 0
gov.bm, 0
-gov.bo, 0
gov.br, 0
gov.bs, 0
gov.bt, 0
@@ -2711,6 +2750,7 @@ group.aero, 0
grozny.ru, 4
grozny.su, 4
grp.lk, 0
+gru.br, 0
grue.no, 0
gs, 0
gs.aa.no, 0
@@ -3028,6 +3068,7 @@ horten.no, 0
hospital, 0
host, 0
hosting, 0
+hosting-cluster.nl, 4
hot, 0
hotel.hu, 0
hotel.lk, 0
@@ -3045,7 +3086,6 @@ hr.eu.org, 4
hs.kr, 0
hsbc, 0
ht, 0
-htc, 0
hu, 0
hu.com, 4
hu.eu.org, 4
@@ -3182,6 +3222,8 @@ indian.museum, 0
indiana.museum, 0
indianapolis.museum, 0
indianmarket.museum, 0
+indigena.bo, 0
+industria.bo, 0
industries, 0
ine.kyoto.jp, 0
inf.br, 0
@@ -3194,12 +3236,14 @@ info.at, 4
info.au, 0
info.az, 0
info.bb, 0
+info.bo, 0
info.co, 0
info.cx, 4
info.ec, 0
info.et, 0
info.ht, 0
info.hu, 0
+info.ke, 0
info.ki, 0
info.la, 0
info.mv, 0
@@ -3426,6 +3470,7 @@ izumo.shimane.jp, 0
izumozaki.niigata.jp, 0
izunokuni.shizuoka.jp, 0
j.bg, 0
+jab.br, 0
jaguar, 0
jambyl.su, 4
jamison.museum, 0
@@ -3436,6 +3481,7 @@ jaworzno.pl, 0
jcb, 0
jcp, 0
jdevcloud.com, 4
+jdf.br, 0
je, 0
jeep, 0
jefferson.museum, 0
@@ -3469,6 +3515,7 @@ joburg, 0
joetsu.niigata.jp, 0
jogasz.hu, 0
johana.toyama.jp, 0
+joinville.br, 0
jolster.no, 0
jondal.no, 0
jor.br, 0
@@ -3709,7 +3756,7 @@ kazimierz-dolny.pl, 0
kazo.saitama.jp, 0
kazuno.akita.jp, 0
kddi, 0
-ke, 2
+ke, 0
keisen.fukuoka.jp, 0
kembuchi.hokkaido.jp, 0
kep.tr, 0
@@ -4174,6 +4221,7 @@ lombardy.it, 0
lomza.pl, 0
london, 0
london.museum, 0
+londrina.br, 0
loppa.no, 0
lorenskog.no, 0
losangeles.museum, 0
@@ -4235,6 +4283,8 @@ ma, 0
ma.gov.br, 0
ma.leg.br, 4
ma.us, 0
+macapa.br, 0
+maceio.br, 0
macerata.it, 0
machida.tokyo.jp, 0
macys, 0
@@ -4262,6 +4312,7 @@ malvik.no, 0
mamurogawa.yamagata.jp, 0
man, 0
management, 0
+manaus.br, 0
manchester.museum, 0
mandal.no, 0
mango, 0
@@ -4280,6 +4331,7 @@ mar.it, 0
marburg.museum, 0
marche.it, 0
marine.ru, 4
+maringa.br, 0
maritime.museum, 0
maritimo.museum, 0
marker.no, 0
@@ -4331,8 +4383,6 @@ mba, 0
mc, 0
mc.eu.org, 4
mc.it, 0
-mcd, 0
-mcdonalds, 0
mckinsey, 0
md, 0
md.ci, 0
@@ -4340,6 +4390,7 @@ md.us, 0
me, 0
me.eu.org, 4
me.it, 0
+me.ke, 0
me.tz, 0
me.uk, 0
me.us, 0
@@ -4363,6 +4414,7 @@ media.hu, 0
media.museum, 0
media.pl, 0
medical.museum, 0
+medicina.bo, 0
medio-campidano.it, 0
mediocampidano.it, 0
medizinhistorisches.museum, 0
@@ -4599,6 +4651,7 @@ moareke.no, 0
mobara.chiba.jp, 0
mobi, 0
mobi.gp, 0
+mobi.ke, 0
mobi.na, 0
mobi.ng, 0
mobi.tt, 0
@@ -4627,7 +4680,6 @@ money, 0
money.museum, 0
monmouth.museum, 0
monster, 0
-montblanc, 0
monticello.museum, 0
montreal.museum, 0
monza-brianza.it, 0
@@ -4640,6 +4692,7 @@ moonscale.net, 4
mopar, 0
mordovia.ru, 4
mordovia.su, 4
+morena.br, 0
moriguchi.osaka.jp, 0
morimachi.shizuoka.jp, 0
morioka.iwate.jp, 0
@@ -4666,6 +4719,7 @@ motosu.gifu.jp, 0
motoyama.kochi.jp, 0
mov, 0
movie, 0
+movimiento.bo, 0
movistar, 0
mp, 0
mp.br, 0
@@ -4725,6 +4779,7 @@ museumcenter.museum, 0
museumvereniging.museum, 0
music.museum, 0
musica.ar, 0
+musica.bo, 0
mutsu.aomori.jp, 0
mutsuzawa.chiba.jp, 0
mutual, 0
@@ -4753,7 +4808,6 @@ myfirewall.org, 4
myfritz.net, 4
myftp.biz, 4
myftp.org, 4
-myfusion.cloud, 4
myhome-server.de, 4
mykolaiv.ua, 0
mymailer.com.tw, 4
@@ -4886,6 +4940,7 @@ narvik.no, 0
nasu.tochigi.jp, 0
nasushiobara.tochigi.jp, 0
nat.tn, 0
+natal.br, 0
national.museum, 0
nationalfirearms.museum, 0
nationalheritage.museum, 0
@@ -4893,6 +4948,7 @@ nationwide, 0
nativeamerican.museum, 0
natori.miyagi.jp, 0
natura, 0
+natural.bo, 0
naturalhistory.museum, 0
naturalhistorymuseum.museum, 0
naturalsciences.museum, 0
@@ -4916,6 +4972,7 @@ nc.us, 0
nd.us, 0
ne, 0
ne.jp, 0
+ne.ke, 0
ne.kr, 0
ne.pw, 0
ne.tz, 0
@@ -5095,6 +5152,7 @@ ngo.lk, 0
ngo.ph, 0
ngo.za, 0
ngrok.io, 4
+nh-serv.co.uk, 4
nh.us, 0
nhk, 0
nhlfan.net, 4
@@ -5150,6 +5208,7 @@ nissan, 0
nissay, 0
nissedal.no, 0
nisshin.aichi.jp, 0
+niteroi.br, 0
nittedal.no, 0
niyodogawa.kochi.jp, 0
nj.us, 0
@@ -5218,6 +5277,7 @@ nom.uy, 4
nom.vc, 4
nom.vg, 4
nom.za, 0
+nombre.bo, 0
nome.pt, 0
nomi.ishikawa.jp, 0
nonoichi.ishikawa.jp, 0
@@ -5240,6 +5300,7 @@ noshiro.akita.jp, 0
not.br, 0
notaires.fr, 0
notaires.km, 0
+noticias.bo, 0
noto.ishikawa.jp, 0
notodden.no, 0
notogawa.shiga.jp, 0
@@ -5465,6 +5526,7 @@ or.cr, 0
or.id, 0
or.it, 0
or.jp, 0
+or.ke, 0
or.kr, 0
or.mu, 0
or.na, 0
@@ -5636,6 +5698,7 @@ osaka.jp, 0
osakasayama.osaka.jp, 0
osaki.miyagi.jp, 0
osakikamijima.hiroshima.jp, 0
+osasco.br, 0
osen.no, 0
oseto.nagasaki.jp, 0
oshima.tokyo.jp, 0
@@ -5715,8 +5778,8 @@ pagespeedmobilizer.com, 4
palace.museum, 0
paleo.museum, 0
palermo.it, 0
+palmas.br, 0
palmsprings.museum, 0
-pamperedchef, 0
panama.museum, 0
panasonic, 0
panerai, 0
@@ -5738,6 +5801,7 @@ party, 0
pasadena.museum, 0
passagens, 0
passenger-association.aero, 0
+patria.bo, 0
pavia.it, 0
pay, 0
pb.ao, 0
@@ -5833,6 +5897,7 @@ plc.ly, 0
plc.uk, 0
plo.ps, 0
plumbing, 0
+plurinacional.bo, 0
plus, 0
pm, 0
pmn.it, 0
@@ -5856,6 +5921,7 @@ pol.dz, 0
pol.ht, 0
pol.tr, 0
police.uk, 0
+politica.bo, 0
politie, 0
polkowice.pl, 0
poltava.ua, 0
@@ -5931,6 +5997,7 @@ production.aero, 0
productions, 0
prof, 0
prof.pr, 0
+profesional.bo, 0
progressive, 0
project.museum, 0
promo, 0
@@ -5958,11 +6025,13 @@ publ.pt, 0
public.museum, 0
publishproxy.com, 4
pubol.museum, 0
+pueblo.bo, 0
pug.it, 0
puglia.it, 0
pulawy.pl, 0
pup.gov.pl, 0
pv.it, 0
+pvh.br, 0
pvt.ge, 0
pvt.k12.ma.us, 0
pw, 0
@@ -6072,16 +6141,19 @@ res.aero, 0
res.in, 0
research.aero, 0
research.museum, 0
+resindevice.io, 4
resistance.museum, 0
rest, 0
restaurant, 0
review, 0
reviews, 0
+revista.bo, 0
rexroth, 0
rg.it, 0
rhcloud.com, 4
ri.it, 0
ri.us, 0
+ribeirao.br, 0
rich, 0
richardli, 0
ricoh, 0
@@ -6098,7 +6170,10 @@ ringebu.no, 0
ringerike.no, 0
ringsaker.no, 0
rio, 0
+rio.br, 0
+riobranco.br, 0
riodejaneiro.museum, 0
+riopreto.br, 0
rip, 0
rishiri.hokkaido.jp, 0
rishirifuji.hokkaido.jp, 0
@@ -6185,6 +6260,7 @@ s3-ca-central-1.amazonaws.com, 4
s3-eu-central-1.amazonaws.com, 4
s3-eu-west-1.amazonaws.com, 4
s3-eu-west-2.amazonaws.com, 4
+s3-eu-west-3.amazonaws.com, 4
s3-external-1.amazonaws.com, 4
s3-fips-us-gov-west-1.amazonaws.com, 4
s3-sa-east-1.amazonaws.com, 4
@@ -6205,6 +6281,7 @@ s3-website.ap-south-1.amazonaws.com, 4
s3-website.ca-central-1.amazonaws.com, 4
s3-website.eu-central-1.amazonaws.com, 4
s3-website.eu-west-2.amazonaws.com, 4
+s3-website.eu-west-3.amazonaws.com, 4
s3-website.us-east-2.amazonaws.com, 4
s3.amazonaws.com, 4
s3.ap-northeast-2.amazonaws.com, 4
@@ -6220,12 +6297,15 @@ s3.dualstack.ca-central-1.amazonaws.com, 4
s3.dualstack.eu-central-1.amazonaws.com, 4
s3.dualstack.eu-west-1.amazonaws.com, 4
s3.dualstack.eu-west-2.amazonaws.com, 4
+s3.dualstack.eu-west-3.amazonaws.com, 4
s3.dualstack.sa-east-1.amazonaws.com, 4
s3.dualstack.us-east-1.amazonaws.com, 4
s3.dualstack.us-east-2.amazonaws.com, 4
s3.eu-central-1.amazonaws.com, 4
s3.eu-west-2.amazonaws.com, 4
+s3.eu-west-3.amazonaws.com, 4
s3.us-east-2.amazonaws.com, 4
+s5y.io, 6
sa, 0
sa-east-1.elasticbeanstalk.com, 4
sa.au, 0
@@ -6281,10 +6361,13 @@ salem.museum, 0
salerno.it, 0
salon, 0
saltdal.no, 0
+salud.bo, 0
+salvador.br, 0
salvadordali.museum, 0
salzburg.museum, 0
samegawa.fukushima.jp, 0
samnanger.no, 0
+sampa.br, 0
samsclub, 0
samsung, 0
samukawa.kanagawa.jp, 0
@@ -6312,7 +6395,11 @@ sanok.pl, 0
santabarbara.museum, 0
santacruz.museum, 0
santafe.museum, 0
+santamaria.br, 0
+santoandre.br, 0
sanuki.kagawa.jp, 0
+saobernardo.br, 0
+saogonca.br, 0
saotome.st, 0
sap, 0
sapo, 0
@@ -6351,6 +6438,7 @@ sbs, 0
sc, 0
sc.cn, 0
sc.gov.br, 0
+sc.ke, 0
sc.kr, 0
sc.leg.br, 4
sc.tz, 0
@@ -6401,6 +6489,7 @@ scot, 0
scotland.museum, 0
scrapper-site.net, 4
scrapping.cc, 4
+scrysec.com, 4
sd, 0
sd.cn, 0
sd.us, 0
@@ -6633,6 +6722,7 @@ sirdal.no, 0
site, 0
sites.static.land, 4
sj, 0
+sjc.br, 0
sk, 0
sk.ca, 0
sk.eu.org, 4
@@ -6666,6 +6756,7 @@ sld.pa, 0
slg.br, 0
sling, 0
slupsk.pl, 0
+slz.br, 0
sm, 0
sm.ua, 0
smart, 0
@@ -6718,6 +6809,7 @@ sor-fron.no, 0
sor-odal.no, 0
sor-varanger.no, 0
sorfold.no, 0
+sorocaba.br, 0
sorreisa.no, 0
sortland.no, 0
sorum.no, 0
@@ -7024,6 +7116,7 @@ tec.ve, 0
tech, 0
technology, 0
technology.museum, 0
+tecnologia.bo, 0
tel, 0
tel.tr, 0
tele.amune.org, 4
@@ -7056,6 +7149,7 @@ tg, 0
tgory.pl, 0
th, 0
thd, 0
+the.br, 0
theater, 0
theater.museum, 0
theatre, 0
@@ -7081,6 +7175,7 @@ tjome.no, 0
tjx, 0
tk, 0
tkmaxx, 0
+tksat.bo, 0
tl, 0
tm, 0
tm.cy, 0
@@ -7227,6 +7322,7 @@ traniandriabarletta.it, 0
tranibarlettaandria.it, 0
tranoy.no, 0
transport.museum, 0
+transporte.bo, 0
transurl.be, 6
transurl.eu, 6
transurl.nl, 6
@@ -7361,6 +7457,7 @@ uchinomi.kagawa.jp, 0
uconnect, 0
ud.it, 0
uda.nara.jp, 0
+udi.br, 0
udine.it, 0
udono.mie.jp, 0
ueda.nagano.jp, 0
@@ -7662,6 +7759,7 @@ wazuka.kyoto.jp, 0
we.bs, 4
weather, 0
weatherchannel, 0
+web.bo, 0
web.co, 0
web.do, 0
web.id, 0
@@ -7680,6 +7778,7 @@ webhop.info, 4
webhop.me, 4
webhop.net, 4
webhop.org, 4
+webhosting.be, 4
webredirect.org, 4
website, 0
webspace.rocks, 4
@@ -7704,6 +7803,7 @@ wien, 0
wif.gov.pl, 0
wiih.gov.pl, 0
wiki, 0
+wiki.bo, 0
wiki.br, 0
wildlife.museum, 0
williamhill, 0
diff --git a/chromium/net/data/ssl/certificate_transparency/log_list.json b/chromium/net/data/ssl/certificate_transparency/log_list.json
index 6a29f47575d..0db9c6eb98b 100644
--- a/chromium/net/data/ssl/certificate_transparency/log_list.json
+++ b/chromium/net/data/ssl/certificate_transparency/log_list.json
@@ -1,6 +1,46 @@
{
"logs": [
{
+ "description": "Google 'Argon2018' log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0gBVBa3VR7QZu82V+ynXWD14JM3ORp37MtRxTmACJV5ZPtfUA7htQ2hofuigZQs+bnFZkje+qejxoyvk2Q1VaA==",
+ "url": "ct.googleapis.com/logs/argon2018/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 0
+ ],
+ "dns_api_endpoint": "argon2018.ct.googleapis.com"
+ },
+ {
+ "description": "Google 'Argon2019' log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEI3MQm+HzXvaYa2mVlhB4zknbtAT8cSxakmBoJcBKGqGwYS0bhxSpuvABM1kdBTDpQhXnVdcq+LSiukXJRpGHVg==",
+ "url": "ct.googleapis.com/logs/argon2019/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 0
+ ],
+ "dns_api_endpoint": "argon2019.ct.googleapis.com"
+ },
+ {
+ "description": "Google 'Argon2020' log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6Tx2p1yKY4015NyIYvdrk36es0uAc1zA4PQ+TGRY+3ZjUTIYY9Wyu+3q/147JG4vNVKLtDWarZwVqGkg6lAYzA==",
+ "url": "ct.googleapis.com/logs/argon2020/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 0
+ ],
+ "dns_api_endpoint": "argon2020.ct.googleapis.com"
+ },
+ {
+ "description": "Google 'Argon2021' log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAETeBmZOrzZKo4xYktx9gI2chEce3cw/tbr5xkoQlmhB18aKfsxD+MnILgGNl0FOm0eYGilFVi85wLRIOhK8lxKw==",
+ "url": "ct.googleapis.com/logs/argon2021/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 0
+ ],
+ "dns_api_endpoint": "argon2021.ct.googleapis.com"
+ },
+ {
"description": "Google 'Aviator' log",
"key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1/TMabLkDpCjiupacAlP7xNi0I1JYP8bQFAHDG1xhtolSY1l4QgNRzRrvSe8liE+NPWHdjGxfx3JhTsN9x8/6Q==",
"url": "ct.googleapis.com/aviator/",
@@ -57,12 +97,52 @@
"dns_api_endpoint": "skydiver.ct.googleapis.com"
},
{
+ "description": "Cloudflare 'Nimbus2018' Log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAsVpWvrH3Ke0VRaMg9ZQoQjb5g/xh1z3DDa6IuxY5DyPsk6brlvrUNXZzoIg0DcvFiAn2kd6xmu4Obk5XA/nRg==",
+ "url": "ct.cloudflare.com/logs/nimbus2018/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 1
+ ],
+ "dns_api_endpoint": "cloudflare-nimbus2018.ct.googleapis.com"
+ },
+ {
+ "description": "Cloudflare 'Nimbus2019' Log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkZHz1v5r8a9LmXSMegYZAg4UW+Ug56GtNfJTDNFZuubEJYgWf4FcC5D+ZkYwttXTDSo4OkanG9b3AI4swIQ28g==",
+ "url": "ct.cloudflare.com/logs/nimbus2019/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 1
+ ],
+ "dns_api_endpoint": "cloudflare-nimbus2019.ct.googleapis.com"
+ },
+ {
+ "description": "Cloudflare 'Nimbus2020' Log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE01EAhx4o0zPQrXTcYjgCt4MVFsT0Pwjzb1RwrM0lhWDlxAYPP6/gyMCXNkOn/7KFsjL7rwk78tHMpY8rXn8AYg==",
+ "url": "ct.cloudflare.com/logs/nimbus2020/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 1
+ ],
+ "dns_api_endpoint": "cloudflare-nimbus2020.ct.googleapis.com"
+ },
+ {
+ "description": "Cloudflare 'Nimbus2021' Log",
+ "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExpon7ipsqehIeU1bmpog9TFo4Pk8+9oN8OYHl1Q2JGVXnkVFnuuvPgSo2Ep+6vLffNLcmEbxOucz03sFiematg==",
+ "url": "ct.cloudflare.com/logs/nimbus2021/",
+ "maximum_merge_delay": 86400,
+ "operated_by": [
+ 1
+ ],
+ "dns_api_endpoint": "cloudflare-nimbus2021.ct.googleapis.com"
+ },
+ {
"description": "DigiCert Log Server",
"key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAkbFvhu7gkAW6MHSrBlpE1n4+HCFRkC5OLAjgqhkTH+/uzSfSl8ois8ZxAD2NgaTZe1M9akhYlrYkes4JECs6A==",
"url": "ct1.digicert-ct.com/log/",
"maximum_merge_delay": 86400,
"operated_by": [
- 1
+ 2
],
"dns_api_endpoint": "digicert.ct.googleapis.com"
},
@@ -72,7 +152,7 @@
"url": "ct2.digicert-ct.com/log/",
"maximum_merge_delay": 86400,
"operated_by": [
- 1
+ 2
],
"dns_api_endpoint": "digicert2.ct.googleapis.com"
},
@@ -206,11 +286,11 @@
"id": 0
},
{
- "name": "DigiCert",
+ "name": "Cloudflare",
"id": 1
},
{
- "name": "Symantec",
+ "name": "DigiCert",
"id": 2
},
{
@@ -222,7 +302,7 @@
"id": 4
},
{
- "name": "Wosign",
+ "name": "WoSign",
"id": 5
},
{
@@ -234,11 +314,11 @@
"id": 7
},
{
- "name": "StartSSL",
+ "name": "StartCom",
"id": 8
},
{
- "name": "Comodo",
+ "name": "Comodo CA Limited",
"id": 9
}
]
diff --git a/chromium/net/tools/tld_cleanup/README b/chromium/net/tools/tld_cleanup/README
index 13614700e42..48b8db1d07f 100644
--- a/chromium/net/tools/tld_cleanup/README
+++ b/chromium/net/tools/tld_cleanup/README
@@ -1,7 +1,7 @@
When updating src/net/base/registry_controlled_domains/effective_tld_names.dat:
1. Obtain the new effective_tld_names.dat, probably by downloading
- http://goo.gl/Ji2bB
+ https://publicsuffix.org/list/public_suffix_list.dat
2. Remove whitespace from the ends of the lines.
You could possibly use something like:
@@ -12,7 +12,7 @@ When updating src/net/base/registry_controlled_domains/effective_tld_names.dat:
before '===BEGIN ICANN DOMAINS==='. Ensure there is an empty line above and
two empty lines below the note. The note should say:
// Chromium note: this is based on Mozilla's file:
-// http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1
+// https://publicsuffix.org/list/public_suffix_list.dat
4. Build tld_cleanup (the "(net)" > "tld_cleanup" project)
diff --git a/chromium/sandbox/mac/seatbelt_exec.cc b/chromium/sandbox/mac/seatbelt_exec.cc
index 53a5e7901ae..df8167cf50d 100644
--- a/chromium/sandbox/mac/seatbelt_exec.cc
+++ b/chromium/sandbox/mac/seatbelt_exec.cc
@@ -5,6 +5,7 @@
#include "sandbox/mac/seatbelt_exec.h"
#include <fcntl.h>
+#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <sys/socket.h>
@@ -20,6 +21,58 @@
namespace sandbox {
+namespace {
+
+struct ReadTraits {
+ using BufferType = uint8_t*;
+ static constexpr char kNameString[] = "read";
+ static ssize_t Operate(int fd, BufferType buffer, size_t size) {
+ return read(fd, buffer, size);
+ }
+};
+constexpr char ReadTraits::kNameString[];
+
+struct WriteTraits {
+ using BufferType = const uint8_t*;
+ static constexpr char kNameString[] = "write";
+ static ssize_t Operate(int fd, BufferType buffer, size_t size) {
+ return write(fd, buffer, size);
+ }
+};
+constexpr char WriteTraits::kNameString[];
+
+template <typename Traits>
+bool ReadOrWrite(int fd,
+ const typename Traits::BufferType buffer,
+ const size_t size) {
+ if (size > std::numeric_limits<ssize_t>::max()) {
+ logging::Error("request size is greater than ssize_t::max");
+ return false;
+ }
+
+ ssize_t bytes_to_transact = static_cast<ssize_t>(size);
+
+ while (bytes_to_transact > 0) {
+ ssize_t offset = size - bytes_to_transact;
+ ssize_t transacted_bytes =
+ HANDLE_EINTR(Traits::Operate(fd, buffer + offset, bytes_to_transact));
+ if (transacted_bytes < 0) {
+ if (errno == EAGAIN) {
+ sched_yield();
+ continue;
+ }
+ logging::PError("%s failed", Traits::kNameString);
+ return false;
+ }
+
+ bytes_to_transact -= transacted_bytes;
+ }
+
+ return true;
+}
+
+} // namespace
+
SeatbeltExecClient::SeatbeltExecClient() {
if (pipe(pipe_) != 0)
logging::PFatal("SeatbeltExecClient: pipe failed");
@@ -59,29 +112,41 @@ void SeatbeltExecClient::SetProfile(const std::string& policy) {
int SeatbeltExecClient::SendProfileAndGetFD() {
std::string serialized_protobuf;
- if (!policy_.SerializeToString(&serialized_protobuf))
+ if (!policy_.SerializeToString(&serialized_protobuf)) {
+ logging::Error("SeatbeltExecClient: Serializing the profile failed.");
return -1;
+ }
- if (!WriteString(&serialized_protobuf))
+ if (!WriteString(serialized_protobuf)) {
+ logging::Error(
+ "SeatbeltExecClient: Writing the serialized profile failed.");
return -1;
+ }
IGNORE_EINTR(close(pipe_[1]));
pipe_[1] = -1;
+ if (pipe_[0] < 0)
+ logging::Error("SeatbeltExecClient: The pipe returned an invalid fd.");
+
return pipe_[0];
}
-bool SeatbeltExecClient::WriteString(std::string* str) {
- struct iovec iov[1];
- iov[0].iov_base = &(*str)[0];
- iov[0].iov_len = str->size();
+bool SeatbeltExecClient::WriteString(const std::string& str) {
+ uint64_t str_len = static_cast<uint64_t>(str.size());
+ if (!ReadOrWrite<WriteTraits>(pipe_[1], reinterpret_cast<uint8_t*>(&str_len),
+ sizeof(str_len))) {
+ logging::Error("SeatbeltExecClient: write buffer length failed.");
+ return false;
+ }
- ssize_t written = HANDLE_EINTR(writev(pipe_[1], iov, arraysize(iov)));
- if (written < 0) {
- logging::PError("SeatbeltExecClient: writev failed");
+ if (!ReadOrWrite<WriteTraits>(
+ pipe_[1], reinterpret_cast<const uint8_t*>(&str[0]), str_len)) {
+ logging::Error("SeatbeltExecClient: write buffer failed.");
return false;
}
- return static_cast<uint64_t>(written) == str->size();
+
+ return true;
}
SeatbeltExecServer::SeatbeltExecServer(int fd) : fd_(fd), extra_params_() {}
@@ -130,19 +195,21 @@ bool SeatbeltExecServer::ApplySandboxProfile(const mac::SandboxPolicy& policy) {
}
bool SeatbeltExecServer::ReadString(std::string* str) {
- // 4 pages of memory is enough to hold the sandbox profiles.
- std::vector<char> buffer(4096 * 4, '\0');
+ uint64_t buf_len = 0;
+ if (!ReadOrWrite<ReadTraits>(fd_, reinterpret_cast<uint8_t*>(&buf_len),
+ sizeof(buf_len))) {
+ logging::Error("SeatbeltExecServer: failed to read buffer length.");
+ return false;
+ }
- struct iovec iov[1];
- iov[0].iov_base = buffer.data();
- iov[0].iov_len = buffer.size();
+ str->resize(buf_len);
- ssize_t read_length = HANDLE_EINTR(readv(fd_, iov, arraysize(iov)));
- if (read_length < 0) {
- logging::PError("SeatbeltExecServer: readv failed");
+ if (!ReadOrWrite<ReadTraits>(fd_, reinterpret_cast<uint8_t*>(&(*str)[0]),
+ buf_len)) {
+ logging::Error("SeatbeltExecServer: failed to read buffer.");
return false;
}
- str->assign(buffer.data());
+
return true;
}
diff --git a/chromium/sandbox/mac/seatbelt_exec.h b/chromium/sandbox/mac/seatbelt_exec.h
index 08ad5c67787..3366d14e65f 100644
--- a/chromium/sandbox/mac/seatbelt_exec.h
+++ b/chromium/sandbox/mac/seatbelt_exec.h
@@ -45,7 +45,7 @@ class SEATBELT_EXPORT SeatbeltExecClient {
private:
// This writes a string (the serialized protobuf) to the |pipe_|.
- bool WriteString(std::string* str);
+ bool WriteString(const std::string& str);
// This is the protobuf which contains the sandbox profile and parameters,
// and is serialized and sent to the other process.
diff --git a/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.cc b/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.cc
index 3f69846b8db..166f9951490 100644
--- a/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.cc
+++ b/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.cc
@@ -12,10 +12,11 @@ using ::testing::_;
namespace device {
-FakePlatformSensor::FakePlatformSensor(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
- PlatformSensorProvider* provider)
- : PlatformSensor(type, std::move(mapping), provider) {
+FakePlatformSensor::FakePlatformSensor(
+ mojom::SensorType type,
+ SensorReadingSharedBuffer* reading_buffer,
+ PlatformSensorProvider* provider)
+ : PlatformSensor(type, reading_buffer, provider) {
ON_CALL(*this, StartSensor(_))
.WillByDefault(
Invoke([this](const PlatformSensorConfiguration& configuration) {
@@ -68,18 +69,20 @@ FakePlatformSensorProvider::FakePlatformSensorProvider() {
FakePlatformSensorProvider::~FakePlatformSensorProvider() = default;
-mojo::ScopedSharedBufferMapping FakePlatformSensorProvider::GetMapping(
+SensorReadingSharedBuffer* FakePlatformSensorProvider::GetSensorReadingBuffer(
mojom::SensorType type) {
- return CreateSharedBufferIfNeeded() ? MapSharedBufferForType(type) : nullptr;
+ return CreateSharedBufferIfNeeded()
+ ? GetSensorReadingSharedBufferForType(type)
+ : nullptr;
}
void FakePlatformSensorProvider::CreateSensorInternal(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
DCHECK(type >= mojom::SensorType::FIRST && type <= mojom::SensorType::LAST);
auto sensor =
- base::MakeRefCounted<FakePlatformSensor>(type, std::move(mapping), this);
+ base::MakeRefCounted<FakePlatformSensor>(type, reading_buffer, this);
DoCreateSensorInternal(type, std::move(sensor), callback);
}
diff --git a/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.h b/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.h
index 53c646ced72..79cf9cd1fc1 100644
--- a/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.h
+++ b/chromium/services/device/generic_sensor/fake_platform_sensor_and_provider.h
@@ -15,7 +15,7 @@ namespace device {
class FakePlatformSensor : public PlatformSensor {
public:
FakePlatformSensor(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider);
// PlatformSensor:
@@ -51,11 +51,11 @@ class FakePlatformSensorProvider : public PlatformSensorProvider {
scoped_refptr<PlatformSensor>,
const CreateSensorCallback&));
- mojo::ScopedSharedBufferMapping GetMapping(mojom::SensorType type);
+ SensorReadingSharedBuffer* GetSensorReadingBuffer(mojom::SensorType type);
private:
void CreateSensorInternal(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) override;
DISALLOW_COPY_AND_ASSIGN(FakePlatformSensorProvider);
diff --git a/chromium/services/device/generic_sensor/platform_sensor.cc b/chromium/services/device/generic_sensor/platform_sensor.cc
index 36b22f4182a..7bc6b95fba3 100644
--- a/chromium/services/device/generic_sensor/platform_sensor.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor.cc
@@ -16,10 +16,10 @@
namespace device {
PlatformSensor::PlatformSensor(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider)
: task_runner_(base::ThreadTaskRunnerHandle::Get()),
- shared_buffer_mapping_(std::move(mapping)),
+ reading_buffer_(reading_buffer),
type_(type),
provider_(provider),
weak_factory_(this) {}
@@ -103,10 +103,8 @@ void PlatformSensor::RemoveClient(Client* client) {
bool PlatformSensor::GetLatestReading(SensorReading* result) {
if (!shared_buffer_reader_) {
- const auto* buffer = static_cast<const device::SensorReadingSharedBuffer*>(
- shared_buffer_mapping_.get());
shared_buffer_reader_ =
- std::make_unique<SensorReadingSharedBufferReader>(buffer);
+ std::make_unique<SensorReadingSharedBufferReader>(reading_buffer_);
}
return shared_buffer_reader_->GetReading(result);
@@ -121,8 +119,7 @@ void PlatformSensor::UpdateSharedBufferAndNotifyClients(
}
void PlatformSensor::UpdateSharedBuffer(const SensorReading& reading) {
- ReadingBuffer* buffer =
- static_cast<ReadingBuffer*>(shared_buffer_mapping_.get());
+ ReadingBuffer* buffer = reading_buffer_;
auto& seqlock = buffer->seqlock.value();
seqlock.WriteBegin();
buffer->reading = reading;
diff --git a/chromium/services/device/generic_sensor/platform_sensor.h b/chromium/services/device/generic_sensor/platform_sensor.h
index 7387f8d2d7a..76aac492cd0 100644
--- a/chromium/services/device/generic_sensor/platform_sensor.h
+++ b/chromium/services/device/generic_sensor/platform_sensor.h
@@ -78,7 +78,7 @@ class PlatformSensor : public base::RefCountedThreadSafe<PlatformSensor> {
protected:
virtual ~PlatformSensor();
PlatformSensor(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider);
using ReadingBuffer = SensorReadingSharedBuffer;
@@ -106,7 +106,7 @@ class PlatformSensor : public base::RefCountedThreadSafe<PlatformSensor> {
private:
friend class base::RefCountedThreadSafe<PlatformSensor>;
- const mojo::ScopedSharedBufferMapping shared_buffer_mapping_;
+ SensorReadingSharedBuffer* reading_buffer_; // NOTE: Owned by |provider_|.
std::unique_ptr<SensorReadingSharedBufferReader> shared_buffer_reader_;
mojom::SensorType type_;
ConfigMap config_map_;
diff --git a/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.cc b/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.cc
index 8c1696c71bd..1d0afc6fc80 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.cc
@@ -35,9 +35,9 @@ namespace device {
using mojom::SensorType;
PlatformSensorAccelerometerMac::PlatformSensorAccelerometerMac(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider)
- : PlatformSensor(SensorType::ACCELEROMETER, std::move(mapping), provider),
+ : PlatformSensor(SensorType::ACCELEROMETER, reading_buffer, provider),
sudden_motion_sensor_(SuddenMotionSensor::Create()) {}
PlatformSensorAccelerometerMac::~PlatformSensorAccelerometerMac() = default;
diff --git a/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.h b/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.h
index 41a662ca69f..8e8dbb03ab6 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_accelerometer_mac.h
@@ -23,7 +23,7 @@ class PlatformSensorAccelerometerMac : public PlatformSensor {
public:
// Construct a platform sensor of type ACCELEROMETER, given a buffer |mapping|
// where readings will be written.
- PlatformSensorAccelerometerMac(mojo::ScopedSharedBufferMapping mapping,
+ PlatformSensorAccelerometerMac(SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider);
mojom::ReportingMode GetReportingMode() override;
diff --git a/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.cc b/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.cc
index b99ed16d9fa..c20fd92073b 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.cc
@@ -50,9 +50,9 @@ enum LmuFunctionIndex {
};
PlatformSensorAmbientLightMac::PlatformSensorAmbientLightMac(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider)
- : PlatformSensor(SensorType::AMBIENT_LIGHT, std::move(mapping), provider),
+ : PlatformSensor(SensorType::AMBIENT_LIGHT, reading_buffer, provider),
light_sensor_port_(nullptr),
current_lux_(0.0) {}
diff --git a/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.h b/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.h
index 86c4871e2a4..012647b41fc 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_ambient_light_mac.h
@@ -21,7 +21,7 @@ class PlatformSensorAmbientLightMac : public PlatformSensor {
public:
// Construct a platform sensor of AMBIENT_LIGHT, given a buffer |mapping|
// to write the result back.
- PlatformSensorAmbientLightMac(mojo::ScopedSharedBufferMapping mapping,
+ PlatformSensorAmbientLightMac(SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider);
mojom::ReportingMode GetReportingMode() override;
diff --git a/chromium/services/device/generic_sensor/platform_sensor_android.cc b/chromium/services/device/generic_sensor/platform_sensor_android.cc
index 85db6a70388..1be0f539a72 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_android.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_android.cc
@@ -14,10 +14,10 @@ namespace device {
PlatformSensorAndroid::PlatformSensorAndroid(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
const JavaRef<jobject>& java_sensor)
- : PlatformSensor(type, std::move(mapping), provider) {
+ : PlatformSensor(type, reading_buffer, provider) {
JNIEnv* env = AttachCurrentThread();
j_object_.Reset(java_sensor);
diff --git a/chromium/services/device/generic_sensor/platform_sensor_android.h b/chromium/services/device/generic_sensor/platform_sensor_android.h
index fecf930987a..7e3dd3d470d 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_android.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_android.h
@@ -14,7 +14,7 @@ namespace device {
class PlatformSensorAndroid : public PlatformSensor {
public:
PlatformSensorAndroid(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
const base::android::JavaRef<jobject>& java_sensor);
diff --git a/chromium/services/device/generic_sensor/platform_sensor_fusion.cc b/chromium/services/device/generic_sensor/platform_sensor_fusion.cc
index bf4b9805506..d7168a2b224 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_fusion.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_fusion.cc
@@ -14,11 +14,11 @@ namespace device {
class PlatformSensorFusion::Factory : public base::RefCounted<Factory> {
public:
static void CreateSensorFusion(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm,
const PlatformSensorProviderBase::CreateSensorCallback& callback,
PlatformSensorProvider* provider) {
- scoped_refptr<Factory> factory(new Factory(std::move(mapping),
+ scoped_refptr<Factory> factory(new Factory(reading_buffer,
std::move(fusion_algorithm),
std::move(callback), provider));
factory->FetchSources();
@@ -27,20 +27,20 @@ class PlatformSensorFusion::Factory : public base::RefCounted<Factory> {
private:
friend class base::RefCounted<Factory>;
- Factory(mojo::ScopedSharedBufferMapping mapping,
+ Factory(SensorReadingSharedBuffer* reading_buffer,
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm,
const PlatformSensorProviderBase::CreateSensorCallback& callback,
PlatformSensorProvider* provider)
: fusion_algorithm_(std::move(fusion_algorithm)),
result_callback_(std::move(callback)),
- mapping_(std::move(mapping)),
+ reading_buffer_(reading_buffer),
provider_(provider) {
const auto& types = fusion_algorithm_->source_types();
DCHECK(!types.empty());
// Make sure there are no dups.
DCHECK(std::adjacent_find(types.begin(), types.end()) == types.end());
DCHECK(result_callback_);
- DCHECK(mapping_);
+ DCHECK(reading_buffer_);
DCHECK(provider_);
}
@@ -74,7 +74,7 @@ class PlatformSensorFusion::Factory : public base::RefCounted<Factory> {
sources_map_[type] = std::move(sensor);
if (sources_map_.size() == fusion_algorithm_->source_types().size()) {
scoped_refptr<PlatformSensor> fusion_sensor(new PlatformSensorFusion(
- std::move(mapping_), provider_, std::move(fusion_algorithm_),
+ reading_buffer_, provider_, std::move(fusion_algorithm_),
std::move(sources_map_)));
std::move(result_callback_).Run(fusion_sensor);
}
@@ -82,29 +82,27 @@ class PlatformSensorFusion::Factory : public base::RefCounted<Factory> {
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm_;
PlatformSensorProviderBase::CreateSensorCallback result_callback_;
- mojo::ScopedSharedBufferMapping mapping_;
+ SensorReadingSharedBuffer* reading_buffer_; // NOTE: Owned by |provider_|.
PlatformSensorProvider* provider_;
PlatformSensorFusion::SourcesMap sources_map_;
};
// static
void PlatformSensorFusion::Create(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm,
const PlatformSensorProviderBase::CreateSensorCallback& callback) {
- Factory::CreateSensorFusion(std::move(mapping), std::move(fusion_algorithm),
+ Factory::CreateSensorFusion(reading_buffer, std::move(fusion_algorithm),
callback, provider);
}
PlatformSensorFusion::PlatformSensorFusion(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm,
PlatformSensorFusion::SourcesMap sources)
- : PlatformSensor(fusion_algorithm->fused_type(),
- std::move(mapping),
- provider),
+ : PlatformSensor(fusion_algorithm->fused_type(), reading_buffer, provider),
fusion_algorithm_(std::move(fusion_algorithm)),
source_sensors_(std::move(sources)),
reporting_mode_(mojom::ReportingMode::CONTINUOUS) {
diff --git a/chromium/services/device/generic_sensor/platform_sensor_fusion.h b/chromium/services/device/generic_sensor/platform_sensor_fusion.h
index 2f7ff71cd74..0ce3d9fb60f 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_fusion.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_fusion.h
@@ -38,7 +38,7 @@ class PlatformSensorFusion : public PlatformSensor,
// |callback| call: it can be either newly created object on success or
// nullptr on failure.
static void Create(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm,
const PlatformSensorProviderBase::CreateSensorCallback& callback);
@@ -64,7 +64,7 @@ class PlatformSensorFusion : public PlatformSensor,
using SourcesMapEntry =
std::pair<mojom::SensorType, scoped_refptr<PlatformSensor>>;
PlatformSensorFusion(
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm,
SourcesMap sources);
diff --git a/chromium/services/device/generic_sensor/platform_sensor_fusion_unittest.cc b/chromium/services/device/generic_sensor/platform_sensor_fusion_unittest.cc
index 01d89bb54d6..91106d5734d 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_fusion_unittest.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_fusion_unittest.cc
@@ -85,8 +85,9 @@ class PlatformSensorFusionTest : public DeviceServiceTestBase {
base::Bind(&PlatformSensorFusionTest::PlatformSensorFusionCallback,
base::Unretained(this));
SensorType type = fusion_algorithm->fused_type();
- PlatformSensorFusion::Create(provider_->GetMapping(type), provider_.get(),
- std::move(fusion_algorithm), callback);
+ PlatformSensorFusion::Create(provider_->GetSensorReadingBuffer(type),
+ provider_.get(), std::move(fusion_algorithm),
+ callback);
EXPECT_TRUE(platform_sensor_fusion_callback_called_);
}
diff --git a/chromium/services/device/generic_sensor/platform_sensor_linux.cc b/chromium/services/device/generic_sensor/platform_sensor_linux.cc
index b250981100c..19874eae972 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_linux.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_linux.cc
@@ -25,11 +25,11 @@ bool HaveValuesChanged(const SensorReading& lhs, const SensorReading& rhs) {
PlatformSensorLinux::PlatformSensorLinux(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
const SensorInfoLinux* sensor_device,
scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner)
- : PlatformSensor(type, std::move(mapping), provider),
+ : PlatformSensor(type, reading_buffer, provider),
default_configuration_(
PlatformSensorConfiguration(sensor_device->device_frequency)),
reporting_mode_(sensor_device->reporting_mode),
diff --git a/chromium/services/device/generic_sensor/platform_sensor_linux.h b/chromium/services/device/generic_sensor/platform_sensor_linux.h
index 310c8a17bee..7d2337ed25f 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_linux.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_linux.h
@@ -20,7 +20,7 @@ class PlatformSensorLinux : public PlatformSensor {
public:
PlatformSensorLinux(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
const SensorInfoLinux* sensor_device,
scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner);
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_android.cc b/chromium/services/device/generic_sensor/platform_sensor_provider_android.cc
index f45b87103a9..44500357a44 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_android.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_android.cc
@@ -45,7 +45,7 @@ void PlatformSensorProviderAndroid::SetSensorManagerToNullForTesting() {
void PlatformSensorProviderAndroid::CreateSensorInternal(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
JNIEnv* env = AttachCurrentThread();
@@ -54,16 +54,13 @@ void PlatformSensorProviderAndroid::CreateSensorInternal(
// option.
switch (type) {
case mojom::SensorType::ABSOLUTE_ORIENTATION_EULER_ANGLES:
- CreateAbsoluteOrientationEulerAnglesSensor(env, std::move(mapping),
- callback);
+ CreateAbsoluteOrientationEulerAnglesSensor(env, reading_buffer, callback);
break;
case mojom::SensorType::ABSOLUTE_ORIENTATION_QUATERNION:
- CreateAbsoluteOrientationQuaternionSensor(env, std::move(mapping),
- callback);
+ CreateAbsoluteOrientationQuaternionSensor(env, reading_buffer, callback);
break;
case mojom::SensorType::RELATIVE_ORIENTATION_EULER_ANGLES:
- CreateRelativeOrientationEulerAnglesSensor(env, std::move(mapping),
- callback);
+ CreateRelativeOrientationEulerAnglesSensor(env, reading_buffer, callback);
break;
default: {
ScopedJavaLocalRef<jobject> sensor =
@@ -76,7 +73,7 @@ void PlatformSensorProviderAndroid::CreateSensorInternal(
}
auto concrete_sensor = base::MakeRefCounted<PlatformSensorAndroid>(
- type, std::move(mapping), this, sensor);
+ type, reading_buffer, this, sensor);
callback.Run(concrete_sensor);
break;
}
@@ -93,7 +90,7 @@ void PlatformSensorProviderAndroid::CreateSensorInternal(
// C: Combination of ACCELEROMETER and MAGNETOMETER
void PlatformSensorProviderAndroid::CreateAbsoluteOrientationEulerAnglesSensor(
JNIEnv* env,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
if (static_cast<bool>(Java_PlatformSensorProvider_hasSensorType(
env, j_object_,
@@ -105,7 +102,7 @@ void PlatformSensorProviderAndroid::CreateAbsoluteOrientationEulerAnglesSensor(
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
- PlatformSensorFusion::Create(std::move(mapping), this,
+ PlatformSensorFusion::Create(reading_buffer, this,
std::move(sensor_fusion_algorithm), callback);
} else {
auto sensor_fusion_algorithm = std::make_unique<
@@ -113,7 +110,7 @@ void PlatformSensorProviderAndroid::CreateAbsoluteOrientationEulerAnglesSensor(
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
- PlatformSensorFusion::Create(std::move(mapping), this,
+ PlatformSensorFusion::Create(reading_buffer, this,
std::move(sensor_fusion_algorithm), callback);
}
}
@@ -125,7 +122,7 @@ void PlatformSensorProviderAndroid::CreateAbsoluteOrientationEulerAnglesSensor(
// B: ABSOLUTE_ORIENTATION_EULER_ANGLES
void PlatformSensorProviderAndroid::CreateAbsoluteOrientationQuaternionSensor(
JNIEnv* env,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
ScopedJavaLocalRef<jobject> sensor = Java_PlatformSensorProvider_createSensor(
env, j_object_,
@@ -133,7 +130,7 @@ void PlatformSensorProviderAndroid::CreateAbsoluteOrientationQuaternionSensor(
if (sensor.obj()) {
auto concrete_sensor = base::MakeRefCounted<PlatformSensorAndroid>(
- mojom::SensorType::ABSOLUTE_ORIENTATION_QUATERNION, std::move(mapping),
+ mojom::SensorType::ABSOLUTE_ORIENTATION_QUATERNION, reading_buffer,
this, sensor);
callback.Run(concrete_sensor);
@@ -144,7 +141,7 @@ void PlatformSensorProviderAndroid::CreateAbsoluteOrientationQuaternionSensor(
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
- PlatformSensorFusion::Create(std::move(mapping), this,
+ PlatformSensorFusion::Create(reading_buffer, this,
std::move(sensor_fusion_algorithm), callback);
}
}
@@ -153,7 +150,7 @@ void PlatformSensorProviderAndroid::CreateAbsoluteOrientationQuaternionSensor(
// (if it uses TYPE_GAME_ROTATION_VECTOR directly).
void PlatformSensorProviderAndroid::CreateRelativeOrientationEulerAnglesSensor(
JNIEnv* env,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
if (static_cast<bool>(Java_PlatformSensorProvider_hasSensorType(
env, j_object_,
@@ -165,7 +162,7 @@ void PlatformSensorProviderAndroid::CreateRelativeOrientationEulerAnglesSensor(
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
- PlatformSensorFusion::Create(std::move(mapping), this,
+ PlatformSensorFusion::Create(reading_buffer, this,
std::move(sensor_fusion_algorithm), callback);
} else {
callback.Run(nullptr);
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_android.h b/chromium/services/device/generic_sensor/platform_sensor_provider_android.h
index 365694e3b42..5c4a311af9b 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_android.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_android.h
@@ -22,21 +22,21 @@ class PlatformSensorProviderAndroid : public PlatformSensorProvider {
protected:
void CreateSensorInternal(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) override;
private:
void CreateAbsoluteOrientationEulerAnglesSensor(
JNIEnv* env,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback);
void CreateAbsoluteOrientationQuaternionSensor(
JNIEnv* env,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback);
void CreateRelativeOrientationEulerAnglesSensor(
JNIEnv* env,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback);
// Java object org.chromium.device.sensors.PlatformSensorProvider
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_base.cc b/chromium/services/device/generic_sensor/platform_sensor_provider_base.cc
index 898989e9c86..887d84ee79b 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_base.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_base.cc
@@ -35,8 +35,9 @@ void PlatformSensorProviderBase::CreateSensor(
return;
}
- mojo::ScopedSharedBufferMapping mapping = MapSharedBufferForType(type);
- if (!mapping) {
+ SensorReadingSharedBuffer* reading_buffer =
+ GetSensorReadingSharedBufferForType(type);
+ if (!reading_buffer) {
callback.Run(nullptr);
return;
}
@@ -48,7 +49,7 @@ void PlatformSensorProviderBase::CreateSensor(
requests_map_[type] = CallbackQueue({callback});
CreateSensorInternal(
- type, std::move(mapping),
+ type, reading_buffer,
base::Bind(&PlatformSensorProviderBase::NotifySensorCreated,
base::Unretained(this), type));
}
@@ -66,18 +67,30 @@ scoped_refptr<PlatformSensor> PlatformSensorProviderBase::GetSensor(
bool PlatformSensorProviderBase::CreateSharedBufferIfNeeded() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
- if (shared_buffer_handle_.is_valid())
+ if (shared_buffer_mapping_.get())
return true;
- shared_buffer_handle_ =
- mojo::SharedBufferHandle::Create(kSharedBufferSizeInBytes);
- return shared_buffer_handle_.is_valid();
+ if (!shared_buffer_handle_.is_valid()) {
+ shared_buffer_handle_ =
+ mojo::SharedBufferHandle::Create(kSharedBufferSizeInBytes);
+ if (!shared_buffer_handle_.is_valid())
+ return false;
+ }
+
+ // Create a writable mapping for the buffer as soon as possible, that will be
+ // used by all platform sensor implementations that want to update it. Note
+ // that on Android, cloning the shared memory handle readonly (as performed
+ // by CloneSharedBufferHandle()) will seal the region read-only, preventing
+ // future writable mappings to be created (but this one will survive).
+ shared_buffer_mapping_ = shared_buffer_handle_->Map(kSharedBufferSizeInBytes);
+ return shared_buffer_mapping_.get() != nullptr;
}
void PlatformSensorProviderBase::FreeResourcesIfNeeded() {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (sensor_map_.empty() && requests_map_.empty()) {
FreeResources();
+ shared_buffer_mapping_.reset();
shared_buffer_handle_.reset();
}
}
@@ -147,13 +160,16 @@ PlatformSensorProviderBase::GetPendingRequestTypes() {
return request_types;
}
-mojo::ScopedSharedBufferMapping
-PlatformSensorProviderBase::MapSharedBufferForType(mojom::SensorType type) {
- mojo::ScopedSharedBufferMapping mapping = shared_buffer_handle_->MapAtOffset(
- kReadingBufferSize, SensorReadingSharedBuffer::GetOffset(type));
- if (mapping)
- memset(mapping.get(), 0, kReadingBufferSize);
- return mapping;
+SensorReadingSharedBuffer*
+PlatformSensorProviderBase::GetSensorReadingSharedBufferForType(
+ mojom::SensorType type) {
+ auto* ptr = static_cast<char*>(shared_buffer_mapping_.get());
+ if (!ptr)
+ return nullptr;
+
+ ptr += SensorReadingSharedBuffer::GetOffset(type);
+ memset(ptr, 0, kReadingBufferSize);
+ return reinterpret_cast<SensorReadingSharedBuffer*>(ptr);
}
} // namespace device
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_base.h b/chromium/services/device/generic_sensor/platform_sensor_provider_base.h
index baed45c5bf2..de534d0b743 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_base.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_base.h
@@ -45,7 +45,7 @@ class PlatformSensorProviderBase {
// Method that must be implemented by platform specific classes.
virtual void CreateSensorInternal(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) = 0;
// Implementations might override this method to free resources when there
@@ -59,7 +59,7 @@ class PlatformSensorProviderBase {
bool CreateSharedBufferIfNeeded();
- mojo::ScopedSharedBufferMapping MapSharedBufferForType(
+ SensorReadingSharedBuffer* GetSensorReadingSharedBufferForType(
mojom::SensorType type);
THREAD_CHECKER(thread_checker_);
@@ -76,6 +76,7 @@ class PlatformSensorProviderBase {
std::map<mojom::SensorType, PlatformSensor*> sensor_map_;
std::map<mojom::SensorType, CallbackQueue> requests_map_;
mojo::ScopedSharedBufferHandle shared_buffer_handle_;
+ mojo::ScopedSharedBufferMapping shared_buffer_mapping_;
DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderBase);
};
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_linux.cc b/chromium/services/device/generic_sensor/platform_sensor_provider_linux.cc
index f346de961ca..4746313891d 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_linux.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_linux.cc
@@ -53,7 +53,7 @@ PlatformSensorProviderLinux::~PlatformSensorProviderLinux() {
void PlatformSensorProviderLinux::CreateSensorInternal(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
if (!sensor_device_manager_)
sensor_device_manager_.reset(new SensorDeviceManager());
@@ -61,7 +61,7 @@ void PlatformSensorProviderLinux::CreateSensorInternal(
if (IsFusionSensorType(type)) {
// For sensor fusion the device nodes initialization will happen
// during fetching the source sensors.
- CreateFusionSensor(type, std::move(mapping), callback);
+ CreateFusionSensor(type, reading_buffer, callback);
return;
}
@@ -81,12 +81,12 @@ void PlatformSensorProviderLinux::CreateSensorInternal(
return;
}
- SensorDeviceFound(type, std::move(mapping), callback, sensor_device);
+ SensorDeviceFound(type, reading_buffer, callback, sensor_device);
}
void PlatformSensorProviderLinux::SensorDeviceFound(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const PlatformSensorProviderBase::CreateSensorCallback& callback,
const SensorInfoLinux* sensor_device) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
@@ -98,7 +98,7 @@ void PlatformSensorProviderLinux::SensorDeviceFound(
}
scoped_refptr<PlatformSensorLinux> sensor =
- new PlatformSensorLinux(type, std::move(mapping), this, sensor_device,
+ new PlatformSensorLinux(type, reading_buffer, this, sensor_device,
polling_thread_->task_runner());
callback.Run(sensor);
}
@@ -201,11 +201,11 @@ void PlatformSensorProviderLinux::CreateSensorAndNotify(
SensorInfoLinux* sensor_device) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
scoped_refptr<PlatformSensorLinux> sensor;
- mojo::ScopedSharedBufferMapping mapping = MapSharedBufferForType(type);
- if (sensor_device && mapping && StartPollingThread()) {
- sensor =
- new PlatformSensorLinux(type, std::move(mapping), this, sensor_device,
- polling_thread_->task_runner());
+ SensorReadingSharedBuffer* reading_buffer =
+ GetSensorReadingSharedBufferForType(type);
+ if (sensor_device && reading_buffer && StartPollingThread()) {
+ sensor = new PlatformSensorLinux(type, reading_buffer, this, sensor_device,
+ polling_thread_->task_runner());
}
NotifySensorCreated(type, sensor);
}
@@ -243,7 +243,7 @@ void PlatformSensorProviderLinux::OnDeviceRemoved(
void PlatformSensorProviderLinux::CreateFusionSensor(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
DCHECK(IsFusionSensorType(type));
std::unique_ptr<PlatformSensorFusionAlgorithm> fusion_algorithm;
@@ -266,7 +266,7 @@ void PlatformSensorProviderLinux::CreateFusionSensor(
}
DCHECK(fusion_algorithm);
- PlatformSensorFusion::Create(std::move(mapping), this,
+ PlatformSensorFusion::Create(reading_buffer, this,
std::move(fusion_algorithm), callback);
}
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_linux.h b/chromium/services/device/generic_sensor/platform_sensor_provider_linux.h
index 11396719099..e308233d196 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_linux.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_linux.h
@@ -37,7 +37,7 @@ class PlatformSensorProviderLinux : public PlatformSensorProvider,
~PlatformSensorProviderLinux() override;
void CreateSensorInternal(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) override;
void FreeResources() override;
@@ -55,7 +55,7 @@ class PlatformSensorProviderLinux : public PlatformSensorProvider,
void SensorDeviceFound(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const PlatformSensorProviderBase::CreateSensorCallback& callback,
const SensorInfoLinux* sensor_device);
@@ -92,7 +92,7 @@ class PlatformSensorProviderLinux : public PlatformSensorProvider,
const std::string& device_node) override;
void CreateFusionSensor(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback);
// Set to true when enumeration is ready.
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_mac.cc b/chromium/services/device/generic_sensor/platform_sensor_provider_mac.cc
index dd77644d2af..8cbdbc1f264 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_mac.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_mac.cc
@@ -27,19 +27,19 @@ PlatformSensorProviderMac::~PlatformSensorProviderMac() = default;
void PlatformSensorProviderMac::CreateSensorInternal(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
// Create Sensors here.
switch (type) {
case mojom::SensorType::AMBIENT_LIGHT: {
scoped_refptr<PlatformSensor> sensor =
- new PlatformSensorAmbientLightMac(std::move(mapping), this);
+ new PlatformSensorAmbientLightMac(reading_buffer, this);
callback.Run(std::move(sensor));
break;
}
case mojom::SensorType::ACCELEROMETER: {
callback.Run(base::MakeRefCounted<PlatformSensorAccelerometerMac>(
- std::move(mapping), this));
+ reading_buffer, this));
break;
}
case mojom::SensorType::RELATIVE_ORIENTATION_EULER_ANGLES: {
@@ -47,7 +47,7 @@ void PlatformSensorProviderMac::CreateSensorInternal(
RelativeOrientationEulerAnglesFusionAlgorithmUsingAccelerometer>();
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
- PlatformSensorFusion::Create(std::move(mapping), this,
+ PlatformSensorFusion::Create(reading_buffer, this,
std::move(fusion_algorithm), callback);
break;
}
@@ -59,7 +59,7 @@ void PlatformSensorProviderMac::CreateSensorInternal(
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
PlatformSensorFusion::Create(
- std::move(mapping), this,
+ reading_buffer, this,
std::move(orientation_quaternion_fusion_algorithm_using_euler_angles),
callback);
break;
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_mac.h b/chromium/services/device/generic_sensor/platform_sensor_provider_mac.h
index 809a4f21609..79d11b1ff35 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_mac.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_mac.h
@@ -18,7 +18,7 @@ class PlatformSensorProviderMac : public PlatformSensorProvider {
protected:
void CreateSensorInternal(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) override;
private:
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_win.cc b/chromium/services/device/generic_sensor/platform_sensor_provider_win.cc
index 212b393c1e1..15602986141 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_win.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_win.cc
@@ -61,7 +61,7 @@ PlatformSensorProviderWin::~PlatformSensorProviderWin() = default;
void PlatformSensorProviderWin::CreateSensorInternal(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (!StartSensorThread()) {
@@ -77,8 +77,8 @@ void PlatformSensorProviderWin::CreateSensorInternal(
// If this PlatformSensorFusion object is successfully initialized,
// |callback| will be run with a reference to this object.
PlatformSensorFusion::Create(
- std::move(mapping), this,
- std::move(linear_acceleration_fusion_algorithm), callback);
+ reading_buffer, this, std::move(linear_acceleration_fusion_algorithm),
+ callback);
break;
}
@@ -89,8 +89,7 @@ void PlatformSensorProviderWin::CreateSensorInternal(
base::Bind(&PlatformSensorProviderWin::CreateSensorReader,
base::Unretained(this), type),
base::Bind(&PlatformSensorProviderWin::SensorReaderCreated,
- base::Unretained(this), type, base::Passed(&mapping),
- callback));
+ base::Unretained(this), type, reading_buffer, callback));
break;
}
}
@@ -119,7 +118,7 @@ void PlatformSensorProviderWin::StopSensorThread() {
void PlatformSensorProviderWin::SensorReaderCreated(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback,
std::unique_ptr<PlatformSensorReaderWin> sensor_reader) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
@@ -129,7 +128,7 @@ void PlatformSensorProviderWin::SensorReaderCreated(
}
scoped_refptr<PlatformSensor> sensor = new PlatformSensorWin(
- type, std::move(mapping), this, sensor_thread_->task_runner(),
+ type, reading_buffer, this, sensor_thread_->task_runner(),
std::move(sensor_reader));
callback.Run(sensor);
}
diff --git a/chromium/services/device/generic_sensor/platform_sensor_provider_win.h b/chromium/services/device/generic_sensor/platform_sensor_provider_win.h
index 208667d0e6d..6b621b79809 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_provider_win.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_provider_win.h
@@ -39,7 +39,7 @@ class PlatformSensorProviderWin final : public PlatformSensorProvider {
// PlatformSensorProvider interface implementation.
void FreeResources() override;
void CreateSensorInternal(mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback) override;
private:
@@ -52,7 +52,7 @@ class PlatformSensorProviderWin final : public PlatformSensorProvider {
mojom::SensorType type);
void SensorReaderCreated(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
const CreateSensorCallback& callback,
std::unique_ptr<PlatformSensorReaderWin> sensor_reader);
diff --git a/chromium/services/device/generic_sensor/platform_sensor_win.cc b/chromium/services/device/generic_sensor/platform_sensor_win.cc
index d85535cd8c9..d1ee11459c5 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_win.cc
+++ b/chromium/services/device/generic_sensor/platform_sensor_win.cc
@@ -14,11 +14,11 @@ constexpr double kDefaultSensorReportingFrequency = 5.0;
PlatformSensorWin::PlatformSensorWin(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
scoped_refptr<base::SingleThreadTaskRunner> sensor_thread_runner,
std::unique_ptr<PlatformSensorReaderWin> sensor_reader)
- : PlatformSensor(type, std::move(mapping), provider),
+ : PlatformSensor(type, reading_buffer, provider),
sensor_thread_runner_(sensor_thread_runner),
sensor_reader_(sensor_reader.release()),
weak_factory_(this) {
diff --git a/chromium/services/device/generic_sensor/platform_sensor_win.h b/chromium/services/device/generic_sensor/platform_sensor_win.h
index b2bd4c223cf..bae519df27f 100644
--- a/chromium/services/device/generic_sensor/platform_sensor_win.h
+++ b/chromium/services/device/generic_sensor/platform_sensor_win.h
@@ -27,7 +27,7 @@ class PlatformSensorWin final : public PlatformSensor,
public:
PlatformSensorWin(
mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
+ SensorReadingSharedBuffer* reading_buffer,
PlatformSensorProvider* provider,
scoped_refptr<base::SingleThreadTaskRunner> sensor_thread_runner,
std::unique_ptr<PlatformSensorReaderWin> sensor_reader);
diff --git a/chromium/services/service_manager/sandbox/mac/BUILD.gn b/chromium/services/service_manager/sandbox/mac/BUILD.gn
index 2e4a3092f77..277202fa5cb 100644
--- a/chromium/services/service_manager/sandbox/mac/BUILD.gn
+++ b/chromium/services/service_manager/sandbox/mac/BUILD.gn
@@ -11,6 +11,7 @@ action_foreach("package_sb_files") {
"gpu.sb",
"gpu_v2.sb",
"nacl_loader.sb",
+ "pdf_compositor.sb",
"ppapi.sb",
"ppapi_v2.sb",
"renderer.sb",
diff --git a/chromium/services/service_manager/sandbox/mac/pdf_compositor.sb b/chromium/services/service_manager/sandbox/mac/pdf_compositor.sb
new file mode 100644
index 00000000000..48c6ad51689
--- /dev/null
+++ b/chromium/services/service_manager/sandbox/mac/pdf_compositor.sb
@@ -0,0 +1,15 @@
+;; Copyright 2018 The Chromium Authors. All rights reserved.
+;; Use of this source code is governed by a BSD-style license that can be
+;; found in the LICENSE file.
+;;
+; This is the sandbox configuration file used for safeguarding the pdf
+; compositor service which is used for compositing web contents printed from
+; different renderer processes.
+;
+; This configuration locks everything down, except font accesses.
+;
+
+; *** The contents of common.sb are implicitly included here. ***
+
+; Needed for Fonts.
+(allow-font-access)
diff --git a/chromium/services/viz/public/cpp/compositing/paint_filter_struct_traits.h b/chromium/services/viz/public/cpp/compositing/paint_filter_struct_traits.h
index 9bb0977cb35..a6df35128e3 100644
--- a/chromium/services/viz/public/cpp/compositing/paint_filter_struct_traits.h
+++ b/chromium/services/viz/public/cpp/compositing/paint_filter_struct_traits.h
@@ -18,12 +18,13 @@ template <>
struct StructTraits<viz::mojom::PaintFilterDataView, sk_sp<cc::PaintFilter>> {
static base::Optional<std::vector<uint8_t>> data(
const sk_sp<cc::PaintFilter>& filter) {
- static const size_t kBufferSize = 8 * 1024;
std::vector<uint8_t> memory;
- memory.resize(kBufferSize);
- cc::PaintOpWriter writer(memory.data(), kBufferSize, nullptr, nullptr,
+ memory.resize(cc::PaintOpWriter::HeaderBytes() +
+ cc::PaintFilter::GetFilterSize(filter.get()));
+ cc::PaintOpWriter writer(memory.data(), memory.size(), nullptr, nullptr,
true /* enable_security_constraints */);
writer.Write(filter.get());
+
if (writer.size() == 0)
return base::nullopt;
diff --git a/chromium/skia/ext/skia_commit_hash.h b/chromium/skia/ext/skia_commit_hash.h
index c34942f7b20..7d2f8edb2a2 100644
--- a/chromium/skia/ext/skia_commit_hash.h
+++ b/chromium/skia/ext/skia_commit_hash.h
@@ -3,6 +3,6 @@
#ifndef SKIA_EXT_SKIA_COMMIT_HASH_H_
#define SKIA_EXT_SKIA_COMMIT_HASH_H_
-#define SKIA_COMMIT_HASH "a15e10c64c658749ec8ad4a143673d4a1e8fa2d1-"
+#define SKIA_COMMIT_HASH "c26a7bc8b8069f0f77ba3e4fb042e18116456ede-"
#endif // SKIA_EXT_SKIA_COMMIT_HASH_H_
diff --git a/chromium/storage/browser/fileapi/file_writer_delegate.cc b/chromium/storage/browser/fileapi/file_writer_delegate.cc
index 5b942687c0c..2cba8b51a9e 100644
--- a/chromium/storage/browser/fileapi/file_writer_delegate.cc
+++ b/chromium/storage/browser/fileapi/file_writer_delegate.cc
@@ -69,27 +69,27 @@ void FileWriterDelegate::OnReceivedRedirect(
const net::RedirectInfo& redirect_info,
bool* defer_redirect) {
NOTREACHED();
- OnError(base::File::FILE_ERROR_SECURITY);
+ OnReadError(base::File::FILE_ERROR_SECURITY);
}
void FileWriterDelegate::OnAuthRequired(net::URLRequest* request,
net::AuthChallengeInfo* auth_info) {
NOTREACHED();
- OnError(base::File::FILE_ERROR_SECURITY);
+ OnReadError(base::File::FILE_ERROR_SECURITY);
}
void FileWriterDelegate::OnCertificateRequested(
net::URLRequest* request,
net::SSLCertRequestInfo* cert_request_info) {
NOTREACHED();
- OnError(base::File::FILE_ERROR_SECURITY);
+ OnReadError(base::File::FILE_ERROR_SECURITY);
}
void FileWriterDelegate::OnSSLCertificateError(net::URLRequest* request,
const net::SSLInfo& ssl_info,
bool fatal) {
NOTREACHED();
- OnError(base::File::FILE_ERROR_SECURITY);
+ OnReadError(base::File::FILE_ERROR_SECURITY);
}
void FileWriterDelegate::OnResponseStarted(net::URLRequest* request,
@@ -98,7 +98,7 @@ void FileWriterDelegate::OnResponseStarted(net::URLRequest* request,
DCHECK_EQ(request_.get(), request);
if (net_error != net::OK || request->GetResponseCode() != 200) {
- OnError(base::File::FILE_ERROR_FAILED);
+ OnReadError(base::File::FILE_ERROR_FAILED);
return;
}
Read();
@@ -110,7 +110,7 @@ void FileWriterDelegate::OnReadCompleted(net::URLRequest* request,
DCHECK_EQ(request_.get(), request);
if (bytes_read < 0) {
- OnError(base::File::FILE_ERROR_FAILED);
+ OnReadError(base::File::FILE_ERROR_FAILED);
return;
}
OnDataReceived(bytes_read);
@@ -127,7 +127,7 @@ void FileWriterDelegate::Read() {
FROM_HERE, base::Bind(&FileWriterDelegate::OnDataReceived,
weak_factory_.GetWeakPtr(), bytes_read_));
} else {
- OnError(base::File::FILE_ERROR_FAILED);
+ OnReadError(base::File::FILE_ERROR_FAILED);
}
}
@@ -157,11 +157,19 @@ void FileWriterDelegate::Write() {
FROM_HERE, base::Bind(&FileWriterDelegate::OnDataWritten,
weak_factory_.GetWeakPtr(), write_response));
} else if (net::ERR_IO_PENDING != write_response) {
- OnError(NetErrorToFileError(write_response));
+ OnWriteError(NetErrorToFileError(write_response));
+ } else {
+ async_write_in_progress_ = true;
}
}
void FileWriterDelegate::OnDataWritten(int write_response) {
+ async_write_in_progress_ = false;
+ if (saved_read_error_ != base::File::FILE_OK) {
+ OnReadError(saved_read_error_);
+ return;
+ }
+
if (write_response > 0) {
OnProgress(write_response, false);
cursor_->DidConsume(write_response);
@@ -171,7 +179,7 @@ void FileWriterDelegate::OnDataWritten(int write_response) {
else
Write();
} else {
- OnError(NetErrorToFileError(write_response));
+ OnWriteError(NetErrorToFileError(write_response));
}
}
@@ -180,7 +188,14 @@ FileWriterDelegate::GetCompletionStatusOnError() const {
return writing_started_ ? ERROR_WRITE_STARTED : ERROR_WRITE_NOT_STARTED;
}
-void FileWriterDelegate::OnError(base::File::Error error) {
+void FileWriterDelegate::OnReadError(base::File::Error error) {
+ if (async_write_in_progress_) {
+ // Error signaled by the URLRequest while writing. This will be processed
+ // when the write completes.
+ saved_read_error_ = error;
+ return;
+ }
+
// Destroy the request and invalidate weak ptrs to prevent pending callbacks.
request_.reset();
weak_factory_.InvalidateWeakPtrs();
@@ -191,6 +206,17 @@ void FileWriterDelegate::OnError(base::File::Error error) {
write_callback_.Run(error, 0, ERROR_WRITE_NOT_STARTED);
}
+void FileWriterDelegate::OnWriteError(base::File::Error error) {
+ // Destroy the request and invalidate weak ptrs to prevent pending callbacks.
+ request_.reset();
+ weak_factory_.InvalidateWeakPtrs();
+
+ // Errors when writing are not recoverable, so don't bother flushing.
+ write_callback_.Run(
+ error, 0,
+ writing_started_ ? ERROR_WRITE_STARTED : ERROR_WRITE_NOT_STARTED);
+}
+
void FileWriterDelegate::OnProgress(int bytes_written, bool done) {
DCHECK(bytes_written + bytes_written_backlog_ >= bytes_written_backlog_);
static const int kMinProgressDelayMS = 200;
diff --git a/chromium/storage/browser/fileapi/file_writer_delegate.h b/chromium/storage/browser/fileapi/file_writer_delegate.h
index 7520dc1811d..3bac3a6f91d 100644
--- a/chromium/storage/browser/fileapi/file_writer_delegate.h
+++ b/chromium/storage/browser/fileapi/file_writer_delegate.h
@@ -64,15 +64,19 @@ class STORAGE_EXPORT FileWriterDelegate : public net::URLRequest::Delegate {
void OnResponseStarted(net::URLRequest* request, int net_error) override;
void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
+ protected:
+ // Virtual for tests.
+ virtual void OnDataReceived(int bytes_read);
+
private:
void OnGetFileInfoAndStartRequest(std::unique_ptr<net::URLRequest> request,
base::File::Error error,
const base::File::Info& file_info);
void Read();
- void OnDataReceived(int bytes_read);
void Write();
void OnDataWritten(int write_response);
- void OnError(base::File::Error error);
+ void OnReadError(base::File::Error error);
+ void OnWriteError(base::File::Error error);
void OnProgress(int bytes_read, bool done);
void OnWriteCancelled(int status);
void MaybeFlushForCompletion(base::File::Error error,
@@ -93,6 +97,8 @@ class STORAGE_EXPORT FileWriterDelegate : public net::URLRequest::Delegate {
int bytes_written_backlog_;
int bytes_written_;
int bytes_read_;
+ bool async_write_in_progress_ = false;
+ base::File::Error saved_read_error_ = base::File::FILE_OK;
scoped_refptr<net::IOBufferWithSize> io_buffer_;
scoped_refptr<net::DrainableIOBuffer> cursor_;
std::unique_ptr<net::URLRequest> request_;
diff --git a/chromium/storage/browser/fileapi/file_writer_delegate_unittest.cc b/chromium/storage/browser/fileapi/file_writer_delegate_unittest.cc
index fd25f1f7bdf..0b88688103e 100644
--- a/chromium/storage/browser/fileapi/file_writer_delegate_unittest.cc
+++ b/chromium/storage/browser/fileapi/file_writer_delegate_unittest.cc
@@ -106,8 +106,8 @@ class FileWriterDelegateTest : public PlatformTest {
int64_t GetFileSizeOnDisk(const char* test_file_path) {
// There might be in-flight flush/write.
- base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
- base::Bind(&base::DoNothing));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::BindOnce(&base::DoNothing));
base::RunLoop().RunUntilIdle();
FileSystemURL url = GetFileSystemURL(test_file_path);
@@ -123,23 +123,28 @@ class FileWriterDelegateTest : public PlatformTest {
kOrigin, kFileSystemType, base::FilePath().FromUTF8Unsafe(file_name));
}
- FileWriterDelegate* CreateWriterDelegate(const char* test_file_path,
- int64_t offset,
- int64_t allowed_growth) {
- storage::SandboxFileStreamWriter* writer =
- new storage::SandboxFileStreamWriter(
- file_system_context_.get(),
- GetFileSystemURL(test_file_path),
- offset,
- *file_system_context_->GetUpdateObservers(kFileSystemType));
+ std::unique_ptr<storage::SandboxFileStreamWriter> CreateWriter(
+ const char* test_file_path,
+ int64_t offset,
+ int64_t allowed_growth) {
+ auto writer = std::make_unique<storage::SandboxFileStreamWriter>(
+ file_system_context_.get(), GetFileSystemURL(test_file_path), offset,
+ *file_system_context_->GetUpdateObservers(kFileSystemType));
writer->set_default_quota(allowed_growth);
- return new FileWriterDelegate(
- std::unique_ptr<storage::FileStreamWriter>(writer),
- storage::FlushPolicy::FLUSH_ON_COMPLETION);
+ return writer;
+ }
+
+ std::unique_ptr<FileWriterDelegate> CreateWriterDelegate(
+ const char* test_file_path,
+ int64_t offset,
+ int64_t allowed_growth) {
+ auto writer = CreateWriter(test_file_path, offset, allowed_growth);
+ return std::make_unique<FileWriterDelegate>(
+ std::move(writer), storage::FlushPolicy::FLUSH_ON_COMPLETION);
}
FileWriterDelegate::DelegateWriteCallback GetWriteCallback(Result* result) {
- return base::Bind(&Result::DidWrite, base::Unretained(result));
+ return base::BindRepeating(&Result::DidWrite, base::Unretained(result));
}
// Creates and sets up a FileWriterDelegate for writing the given |blob_url|,
@@ -148,8 +153,8 @@ class FileWriterDelegateTest : public PlatformTest {
const GURL& blob_url,
int64_t offset,
int64_t allowed_growth) {
- file_writer_delegate_.reset(
- CreateWriterDelegate(test_file_path, offset, allowed_growth));
+ file_writer_delegate_ =
+ CreateWriterDelegate(test_file_path, offset, allowed_growth);
request_ = empty_context_.CreateRequest(blob_url, net::DEFAULT_PRIORITY,
file_writer_delegate_.get(),
TRAFFIC_ANNOTATION_FOR_TESTS);
@@ -189,8 +194,9 @@ class FileWriterDelegateTestJob : public net::URLRequestJob {
void Start() override {
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(&FileWriterDelegateTestJob::NotifyHeadersComplete,
- weak_factory_.GetWeakPtr()));
+ FROM_HERE,
+ base::BindOnce(&FileWriterDelegateTestJob::NotifyHeadersComplete,
+ weak_factory_.GetWeakPtr()));
}
int ReadRawData(net::IOBuffer* buf, int buf_size) override {
@@ -233,8 +239,8 @@ class BlobURLRequestJobFactory : public net::URLRequestJobFactory {
const std::string& scheme,
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override {
- return new FileWriterDelegateTestJob(
- request, network_delegate, *content_data_);
+ return new FileWriterDelegateTestJob(request, network_delegate,
+ *content_data_);
}
net::URLRequestJob* MaybeInterceptRedirect(
@@ -274,7 +280,7 @@ void FileWriterDelegateTest::SetUp() {
ASSERT_EQ(base::File::FILE_OK,
AsyncFileTestHelper::CreateFile(file_system_context_.get(),
GetFileSystemURL("test")));
- job_factory_.reset(new BlobURLRequestJobFactory(&content_));
+ job_factory_ = std::make_unique<BlobURLRequestJobFactory>(&content_);
empty_context_.set_job_factory(job_factory_.get());
}
@@ -379,9 +385,9 @@ TEST_F(FileWriterDelegateTest, WriteSuccessWithoutQuotaLimitConcurrent) {
PrepareForWrite("test", kBlobURL, 0, std::numeric_limits<int64_t>::max());
- // Credate another FileWriterDelegate for concurrent write.
- file_writer_delegate2.reset(
- CreateWriterDelegate("test2", 0, std::numeric_limits<int64_t>::max()));
+ // Create another FileWriterDelegate for concurrent write.
+ file_writer_delegate2 =
+ CreateWriterDelegate("test2", 0, std::numeric_limits<int64_t>::max());
request2 = empty_context_.CreateRequest(kBlobURL2, net::DEFAULT_PRIORITY,
file_writer_delegate2.get(),
TRAFFIC_ANNOTATION_FOR_TESTS);
@@ -513,4 +519,53 @@ TEST_F(FileWriterDelegateTest, WritesWithQuotaAndOffset) {
}
}
+class InterruptedFileWriterDelegate : public FileWriterDelegate {
+ public:
+ InterruptedFileWriterDelegate(
+ std::unique_ptr<storage::FileStreamWriter> file_writer,
+ storage::FlushPolicy flush_policy)
+ : FileWriterDelegate(std::move(file_writer), flush_policy) {}
+ ~InterruptedFileWriterDelegate() override = default;
+
+ void OnDataReceived(int bytes_read) override {
+ // The base class will respond to OnDataReceived by performing an
+ // asynchronous write. Schedule a task now that will execute before the
+ // write completes which terminates the URLRequestJob.
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::BindOnce(IgnoreResult(&net::URLRequest::Cancel),
+ base::Unretained(request_)));
+ FileWriterDelegate::OnDataReceived(bytes_read);
+ }
+
+ void set_request(net::URLRequest* request) { request_ = request; }
+
+ private:
+ // The request is owned by the base class as a private member.
+ net::URLRequest* request_ = nullptr;
+};
+
+TEST_F(FileWriterDelegateTest, ReadFailureDuringAsyncWrite) {
+ const GURL kBlobURL("blob:async-fail");
+ content_ = kData;
+
+ auto writer = CreateWriter("test", 0, std::numeric_limits<int64_t>::max());
+ auto file_writer_delegate = std::make_unique<InterruptedFileWriterDelegate>(
+ std::move(writer), storage::FlushPolicy::FLUSH_ON_COMPLETION);
+ auto request = empty_context_.CreateRequest(kBlobURL, net::DEFAULT_PRIORITY,
+ file_writer_delegate.get(),
+ TRAFFIC_ANNOTATION_FOR_TESTS);
+ file_writer_delegate->set_request(request.get());
+
+ Result result;
+ file_writer_delegate->Start(std::move(request), GetWriteCallback(&result));
+ base::RunLoop().Run();
+
+ ASSERT_EQ(FileWriterDelegate::ERROR_WRITE_STARTED, result.write_status());
+ file_writer_delegate_.reset();
+
+ // The write should still have flushed.
+ ASSERT_EQ(kDataSize, usage());
+ EXPECT_EQ(GetFileSizeOnDisk("test"), usage());
+}
+
} // namespace content
diff --git a/chromium/third_party/WebKit/Source/core/DEPS b/chromium/third_party/WebKit/Source/core/DEPS
index 7e05d30746c..0c72d14a51c 100644
--- a/chromium/third_party/WebKit/Source/core/DEPS
+++ b/chromium/third_party/WebKit/Source/core/DEPS
@@ -37,7 +37,7 @@ include_rules = [
]
specific_include_rules = {
- # Allow tests to use Web(Local|Remote)FrameBase.h.
+ # Additional allowed includes for tests.
".*Test\.cpp" : [
"+core/frame/WebLocalFrameImpl.h",
"+core/frame/WebRemoteFrameImpl.h",
diff --git a/chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
index 4fe05c8243c..65a9b71a120 100644
--- a/chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
+++ b/chromium/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
@@ -256,6 +256,8 @@ bool CSSStyleSheet::CanAccessRules() const {
Document* document = OwnerDocument();
if (!document)
return true;
+ if (document->GetStyleEngine().InspectorStyleSheet() == this)
+ return true;
if (document->GetSecurityOrigin()->CanRequestNoSuborigin(base_url))
return true;
if (allow_rule_access_from_origin_ &&
diff --git a/chromium/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/chromium/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
index 48d8ec26f85..36f838c4b01 100644
--- a/chromium/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
+++ b/chromium/third_party/WebKit/Source/core/events/PointerEventFactory.cpp
@@ -106,10 +106,13 @@ void UpdateTouchPointerEventInit(const WebPointerEvent& web_pointer_event,
// and pointerType which is the same among the coalesced events and the
// dispatched event.
+ WebPointerEvent web_pointer_event_in_root_frame =
+ web_pointer_event.WebPointerEventInRootFrame();
+
if (dom_window && dom_window->GetFrame() && dom_window->GetFrame()->View()) {
LocalFrame* frame = dom_window->GetFrame();
FloatPoint page_point = frame->View()->RootFrameToContents(
- web_pointer_event.PositionInWidget());
+ web_pointer_event_in_root_frame.PositionInWidget());
float scale_factor = 1.0f / frame->PageZoomFactor();
FloatPoint scroll_position(frame->View()->GetScrollOffset());
FloatPoint client_point = page_point.ScaledBy(scale_factor);
@@ -119,13 +122,15 @@ void UpdateTouchPointerEventInit(const WebPointerEvent& web_pointer_event,
pointer_event_init->setClientY(client_point.Y());
if (web_pointer_event.GetType() == WebInputEvent::kPointerMove) {
- pointer_event_init->setMovementX(web_pointer_event.movement_x);
- pointer_event_init->setMovementY(web_pointer_event.movement_y);
+ pointer_event_init->setMovementX(
+ web_pointer_event_in_root_frame.movement_x);
+ pointer_event_init->setMovementY(
+ web_pointer_event_in_root_frame.movement_y);
}
- FloatSize point_shape =
- FloatSize(web_pointer_event.width, web_pointer_event.height)
- .ScaledBy(scale_factor);
+ FloatSize point_shape = FloatSize(web_pointer_event_in_root_frame.width,
+ web_pointer_event_in_root_frame.height)
+ .ScaledBy(scale_factor);
pointer_event_init->setWidth(point_shape.Width());
pointer_event_init->setHeight(point_shape.Height());
}
diff --git a/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp b/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
index 5236bf468ff..5e9b5b01cad 100644
--- a/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
@@ -11821,6 +11821,20 @@ TEST_P(WebFrameSimTest, ScrollOriginChangeUpdatesLayerPositions) {
EXPECT_EQ(0, area->LayerForScrolling()->GetPosition().X());
}
+TEST_P(WebFrameSimTest, NamedLookupIgnoresEmptyNames) {
+ SimRequest main_resource("https://example.com/main.html", "text/html");
+ LoadURL("https://example.com/main.html");
+ main_resource.Complete(R"HTML(
+ <body>
+ <iframe name="" src="data:text/html,"></iframe>
+ </body>)HTML");
+
+ EXPECT_EQ(nullptr, MainFrame().GetFrame()->Tree().ScopedChild(""));
+ EXPECT_EQ(nullptr,
+ MainFrame().GetFrame()->Tree().ScopedChild(AtomicString()));
+ EXPECT_EQ(nullptr, MainFrame().GetFrame()->Tree().ScopedChild(g_empty_atom));
+}
+
TEST_P(ParameterizedWebFrameTest, NoLoadingCompletionCallbacksInDetach) {
class LoadingObserverFrameClient
: public FrameTestHelpers::TestWebFrameClient {
diff --git a/chromium/third_party/WebKit/Source/core/exported/WebPerformance.cpp b/chromium/third_party/WebKit/Source/core/exported/WebPerformance.cpp
index 8e51b00e438..fe8d7b073cf 100644
--- a/chromium/third_party/WebKit/Source/core/exported/WebPerformance.cpp
+++ b/chromium/third_party/WebKit/Source/core/exported/WebPerformance.cpp
@@ -179,6 +179,14 @@ double WebPerformance::FirstInputInvalidatingInteractive() const {
private_->timing()->FirstInputInvalidatingInteractive());
}
+double WebPerformance::FirstInputDelay() const {
+ return MillisecondsToSeconds(private_->timing()->FirstInputDelay());
+}
+
+double WebPerformance::FirstInputTimestamp() const {
+ return MillisecondsToSeconds(private_->timing()->FirstInputTimestamp());
+}
+
double WebPerformance::ParseStart() const {
return MillisecondsToSeconds(private_->timing()->ParseStart());
}
diff --git a/chromium/third_party/WebKit/Source/core/exported/WebViewImpl.cpp b/chromium/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
index d91e3b14307..8ab197693ed 100644
--- a/chromium/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
+++ b/chromium/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
@@ -2780,6 +2780,9 @@ void WebViewImpl::SetDeviceScaleFactor(float scale_factor) {
if (!GetPage())
return;
+ if (GetPage()->DeviceScaleFactorDeprecated() == scale_factor)
+ return;
+
GetPage()->SetDeviceScaleFactorDeprecated(scale_factor);
if (layer_tree_view_)
@@ -2788,6 +2791,10 @@ void WebViewImpl::SetDeviceScaleFactor(float scale_factor) {
void WebViewImpl::SetZoomFactorForDeviceScaleFactor(
float zoom_factor_for_device_scale_factor) {
+ if (zoom_factor_for_device_scale_factor_ ==
+ zoom_factor_for_device_scale_factor) {
+ return;
+ }
zoom_factor_for_device_scale_factor_ = zoom_factor_for_device_scale_factor;
if (!layer_tree_view_)
return;
diff --git a/chromium/third_party/WebKit/Source/core/exported/WebViewTest.cpp b/chromium/third_party/WebKit/Source/core/exported/WebViewTest.cpp
index f771fc90db9..12e03ae39da 100644
--- a/chromium/third_party/WebKit/Source/core/exported/WebViewTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/exported/WebViewTest.cpp
@@ -62,6 +62,7 @@
#include "core/layout/LayoutView.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoadRequest.h"
+#include "core/loader/InteractiveDetector.h"
#include "core/page/ChromeClient.h"
#include "core/page/FocusController.h"
#include "core/page/Page.h"
@@ -82,6 +83,7 @@
#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include "platform/testing/URLTestHelpers.h"
#include "platform/testing/UnitTestHelpers.h"
+#include "platform/testing/wtf/ScopedMockClock.h"
#include "platform/wtf/PtrUtil.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCoalescedInputEvent.h"
@@ -120,6 +122,7 @@
#include "third_party/WebKit/common/page/page_visibility_state.mojom-blink.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "v8/include/v8.h"
#if defined(OS_MACOSX)
#include "public/web/mac/WebSubstringUtil.h"
@@ -5046,4 +5049,205 @@ TEST_P(WebViewTest, DetachPluginInLayout) {
web_view_helper_.Reset(); // Remove dependency on locally scoped client.
}
+// Check that first input delay is correctly reported to the document.
+TEST_P(WebViewTest, FirstInputDelayReported) {
+ WebViewImpl* web_view = web_view_helper_.Initialize();
+ WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
+ FrameTestHelpers::LoadHTMLString(web_view->MainFrameImpl(),
+ "<html><body></body></html>", base_url);
+
+ LocalFrame* main_frame = web_view->MainFrameImpl()->GetFrame();
+ ASSERT_NE(nullptr, main_frame);
+
+ Document* document = main_frame->GetDocument();
+ ASSERT_NE(nullptr, document);
+
+ WTF::ScopedMockClock clock;
+ clock.Advance(TimeDelta::FromMilliseconds(70));
+
+ InteractiveDetector* interactive_detector(
+ InteractiveDetector::From(*document));
+ ASSERT_NE(nullptr, interactive_detector);
+
+ EXPECT_EQ(0, interactive_detector->GetFirstInputDelay());
+
+ WebKeyboardEvent key_event1(WebInputEvent::kRawKeyDown,
+ WebInputEvent::kNoModifiers,
+ WebInputEvent::kTimeStampForTesting);
+ key_event1.dom_key = Platform::Current()->DomKeyEnumFromString(" ");
+ key_event1.windows_key_code = VKEY_SPACE;
+ key_event1.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+ clock.Advance(TimeDelta::FromMilliseconds(50));
+ web_view->HandleInputEvent(WebCoalescedInputEvent(key_event1));
+
+ EXPECT_NEAR(0.05, interactive_detector->GetFirstInputDelay(), 0.01);
+ EXPECT_EQ(0.07, interactive_detector->GetFirstInputTimestamp());
+
+ // Sending a second event won't change the FirstInputDelay.
+ WebKeyboardEvent key_event2(WebInputEvent::kRawKeyDown,
+ WebInputEvent::kNoModifiers,
+ WebInputEvent::kTimeStampForTesting);
+ key_event2.dom_key = Platform::Current()->DomKeyEnumFromString(" ");
+ key_event2.windows_key_code = VKEY_SPACE;
+ clock.Advance(TimeDelta::FromMilliseconds(60));
+ key_event2.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+ web_view->HandleInputEvent(WebCoalescedInputEvent(key_event2));
+
+ EXPECT_NEAR(0.05, interactive_detector->GetFirstInputDelay(),
+ 0.01);
+ EXPECT_EQ(0.07, interactive_detector->GetFirstInputTimestamp());
+}
+
+// Check that first input delay is correctly reported to the document when the
+// first input is a pointer down event, and we receive a pointer up event.
+TEST_P(WebViewTest, PointerDownUpFirstInputDelay) {
+ WebViewImpl* web_view = web_view_helper_.Initialize();
+ WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
+ FrameTestHelpers::LoadHTMLString(web_view->MainFrameImpl(),
+ "<html><body></body></html>", base_url);
+
+ LocalFrame* main_frame = web_view->MainFrameImpl()->GetFrame();
+ ASSERT_NE(nullptr, main_frame);
+
+ Document* document = main_frame->GetDocument();
+ ASSERT_NE(nullptr, document);
+
+ WTF::ScopedMockClock clock;
+ clock.Advance(TimeDelta::FromMilliseconds(70));
+
+ InteractiveDetector* interactive_detector(
+ InteractiveDetector::From(*document));
+ ASSERT_NE(nullptr, interactive_detector);
+
+ WebPointerEvent pointer_down(
+ WebInputEvent::kPointerDown,
+ WebPointerProperties(1, WebPointerProperties::PointerType::kTouch), 5, 5);
+ pointer_down.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+ clock.Advance(TimeDelta::FromMilliseconds(50));
+ web_view->HandleInputEvent(WebCoalescedInputEvent(pointer_down));
+
+ // We don't know if this pointer event will result in a scroll or not, so we
+ // can't report its delay. We don't consider a scroll to be meaningful input.
+ EXPECT_EQ(0, interactive_detector->GetFirstInputDelay());
+
+ // When we receive a pointer up, we report the delay of the pointer down.
+ WebPointerEvent pointer_up(
+ WebInputEvent::kPointerUp,
+ WebPointerProperties(1, WebPointerProperties::PointerType::kTouch), 5, 5);
+ clock.Advance(TimeDelta::FromMilliseconds(60));
+ pointer_up.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+ web_view->HandleInputEvent(WebCoalescedInputEvent(pointer_up));
+
+ EXPECT_FLOAT_EQ(0.05, interactive_detector->GetFirstInputDelay());
+ EXPECT_FLOAT_EQ(0.07, interactive_detector->GetFirstInputTimestamp());
+}
+
+// Check that first input delay isn't reported to the document when the
+// first input is a pointer down event followed by a pointer cancel event.
+TEST_P(WebViewTest, PointerDownCancelFirstInputDelay) {
+ WebViewImpl* web_view = web_view_helper_.Initialize();
+ WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
+ FrameTestHelpers::LoadHTMLString(web_view->MainFrameImpl(),
+ "<html><body></body></html>", base_url);
+
+ LocalFrame* main_frame = web_view->MainFrameImpl()->GetFrame();
+ ASSERT_NE(nullptr, main_frame);
+
+ Document* document = main_frame->GetDocument();
+ ASSERT_NE(nullptr, document);
+
+ WTF::ScopedMockClock clock;
+
+ InteractiveDetector* interactive_detector(
+ InteractiveDetector::From(*document));
+ ASSERT_NE(nullptr, interactive_detector);
+
+ WebPointerEvent pointer_down(
+ WebInputEvent::kPointerDown,
+ WebPointerProperties(1, WebPointerProperties::PointerType::kTouch), 5, 5);
+ pointer_down.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+ clock.Advance(TimeDelta::FromMilliseconds(50));
+ web_view->HandleInputEvent(WebCoalescedInputEvent(pointer_down));
+
+ // We don't know if this pointer event will result in a scroll or not, so we
+ // can't report its delay. We don't consider a scroll to be meaningful input.
+ EXPECT_EQ(0, interactive_detector->GetFirstInputDelay());
+
+ // When we receive a pointer up, we report the delay of the pointer down.
+ WebPointerEvent pointer_cancel(
+ WebInputEvent::kPointerCancel,
+ WebPointerProperties(1, WebPointerProperties::PointerType::kTouch), 5, 5);
+ clock.Advance(TimeDelta::FromMilliseconds(60));
+ pointer_cancel.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+ web_view->HandleInputEvent(WebCoalescedInputEvent(pointer_cancel));
+
+ // We received a pointer cancel, so this is a scroll gesture. No meaningful
+ // input has occurred yet.
+ EXPECT_EQ(0, interactive_detector->GetFirstInputDelay());
+ EXPECT_EQ(0, interactive_detector->GetFirstInputTimestamp());
+}
+
+// Check that the input delay is correctly reported to the document.
+TEST_P(WebViewTest, FirstInputDelayExcludesProcessingTime) {
+ // We need a way for JS to advance the mock clock. Hook into console.log, so
+ // that logging advances the clock by 6 seconds.
+ class MockClockAdvancingWebFrameClient
+ : public FrameTestHelpers::TestWebFrameClient {
+ public:
+ MockClockAdvancingWebFrameClient(WTF::ScopedMockClock* mock_clock)
+ : mock_clock_(mock_clock) {}
+ // WebFrameClient overrides:
+ void DidAddMessageToConsole(const WebConsoleMessage& message,
+ const WebString& source_name,
+ unsigned source_line,
+ const WebString& stack_trace) {
+ mock_clock_->Advance(TimeDelta::FromMilliseconds(6000));
+ }
+
+ private:
+ WTF::ScopedMockClock* mock_clock_;
+ };
+
+ WTF::ScopedMockClock clock;
+ // Page load timing logic depends on the time not being zero.
+ clock.Advance(TimeDelta::FromMilliseconds(1));
+ MockClockAdvancingWebFrameClient frame_client(&clock);
+ WebViewImpl* web_view = web_view_helper_.Initialize(&frame_client);
+ WebURL base_url = URLTestHelpers::ToKURL("http://example.com/");
+ FrameTestHelpers::LoadHTMLString(web_view->MainFrameImpl(),
+ "<html><body></body></html>", base_url);
+
+ LocalFrame* main_frame = web_view->MainFrameImpl()->GetFrame();
+ ASSERT_NE(nullptr, main_frame);
+
+ Document* document = main_frame->GetDocument();
+ ASSERT_NE(nullptr, document);
+
+ WebLocalFrame* frame = web_view_helper_.LocalMainFrame();
+ // console.log will advance the mock clock.
+ frame->ExecuteScript(
+ WebScriptSource("document.addEventListener('keydown', "
+ "() => {console.log('advancing timer');})"));
+
+ InteractiveDetector* interactive_detector(
+ InteractiveDetector::From(*document));
+ ASSERT_NE(nullptr, interactive_detector);
+
+ WebKeyboardEvent key_event(WebInputEvent::kRawKeyDown,
+ WebInputEvent::kNoModifiers,
+ WebInputEvent::kTimeStampForTesting);
+ key_event.dom_key = Platform::Current()->DomKeyEnumFromString(" ");
+ key_event.windows_key_code = VKEY_SPACE;
+ key_event.SetTimeStampSeconds(CurrentTimeTicksInSeconds());
+
+ clock.Advance(TimeDelta::FromMilliseconds(5000));
+
+ web_view->HandleInputEvent(WebCoalescedInputEvent(key_event));
+
+ double first_input_delay = interactive_detector->GetFirstInputDelay();
+ EXPECT_EQ(5, first_input_delay);
+
+ web_view_helper_.Reset(); // Remove dependency on locally scoped client.
+}
+
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp b/chromium/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp
index 8530cee1a41..4974760662e 100644
--- a/chromium/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp
+++ b/chromium/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp
@@ -5,6 +5,7 @@
#include "core/exported/WorkerShadowPage.h"
#include "core/exported/WebViewImpl.h"
+#include "core/frame/Settings.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/loader/FrameLoadRequest.h"
#include "platform/loader/fetch/SubstituteData.h"
@@ -30,6 +31,10 @@ WorkerShadowPage::WorkerShadowPage(Client* client)
// TODO(http://crbug.com/363843): This needs to find a better way to
// not create graphics layers.
web_view_->GetSettings()->SetAcceleratedCompositingEnabled(false);
+ // TODO(lunalu): Service worker and shared worker count feature usage on the
+ // blink side use counter. Once the blink side use counter is removed
+ // (crbug.com/811948), remove this instant from Settings.
+ main_frame_->GetFrame()->GetSettings()->SetIsShadowPage(true);
main_frame_->SetDevToolsAgentImpl(
WebDevToolsAgentImpl::CreateForWorker(main_frame_, client_));
diff --git a/chromium/third_party/WebKit/Source/core/fetch/RequestInit.cpp b/chromium/third_party/WebKit/Source/core/fetch/RequestInit.cpp
index 5d8907927e0..3dc1a9de32f 100644
--- a/chromium/third_party/WebKit/Source/core/fetch/RequestInit.cpp
+++ b/chromium/third_party/WebKit/Source/core/fetch/RequestInit.cpp
@@ -106,9 +106,11 @@ RequestInit::RequestInit(ExecutionContext* context,
if (exception_state.HadException())
return;
- keepalive_ = h.Get<IDLBoolean>("keepalive");
- if (exception_state.HadException())
- return;
+ if (RuntimeEnabledFeatures::FetchRequestKeepaliveEnabled()) {
+ keepalive_ = h.Get<IDLBoolean>("keepalive");
+ if (exception_state.HadException())
+ return;
+ }
auto v8_body = h.Get<IDLPassThrough>("body");
if (exception_state.HadException())
diff --git a/chromium/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/chromium/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index b76797e978d..198244acb3e 100644
--- a/chromium/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/chromium/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -67,6 +67,7 @@
#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutEmbeddedContent.h"
#include "core/layout/LayoutView.h"
+#include "core/layout/TextAutosizer.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/IdlenessDetector.h"
@@ -534,6 +535,9 @@ void LocalFrame::SetPrinting(bool printing,
: Document::kFinishingPrinting);
View()->AdjustMediaTypeForPrinting(printing);
+ if (TextAutosizer* text_autosizer = GetDocument()->GetTextAutosizer())
+ text_autosizer->UpdatePageInfo();
+
if (ShouldUsePrintingLayout()) {
View()->ForceLayoutForPagination(page_size, original_page_size,
maximum_shrink_ratio);
diff --git a/chromium/third_party/WebKit/Source/core/frame/LocalFrame.h b/chromium/third_party/WebKit/Source/core/frame/LocalFrame.h
index 1d782aea2cf..d36b81dff58 100644
--- a/chromium/third_party/WebKit/Source/core/frame/LocalFrame.h
+++ b/chromium/third_party/WebKit/Source/core/frame/LocalFrame.h
@@ -39,6 +39,7 @@
#include "core/frame/Frame.h"
#include "core/frame/LocalFrameView.h"
#include "core/loader/FrameLoader.h"
+#include "core/loader/InteractiveDetector.h"
#include "core/page/FrameTree.h"
#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
diff --git a/chromium/third_party/WebKit/Source/core/frame/Settings.cpp b/chromium/third_party/WebKit/Source/core/frame/Settings.cpp
index ada45f53d8f..590685c83a2 100644
--- a/chromium/third_party/WebKit/Source/core/frame/Settings.cpp
+++ b/chromium/third_party/WebKit/Source/core/frame/Settings.cpp
@@ -62,7 +62,8 @@ static const bool kDefaultSelectTrailingWhitespaceEnabled = false;
#endif
Settings::Settings()
- : text_autosizing_enabled_(false) SETTINGS_INITIALIZER_LIST {}
+ : text_autosizing_enabled_(false),
+ is_shadow_page_(false) SETTINGS_INITIALIZER_LIST {}
std::unique_ptr<Settings> Settings::Create() {
return WTF::WrapUnique(new Settings);
@@ -106,4 +107,8 @@ bool Settings::MockScrollbarsEnabled() {
return ScrollbarTheme::MockScrollbarsEnabled();
}
+void Settings::SetIsShadowPage(bool flag) {
+ is_shadow_page_ = flag;
+}
+
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/core/frame/Settings.h b/chromium/third_party/WebKit/Source/core/frame/Settings.h
index ccfed1835c8..eccd4c8ec9b 100644
--- a/chromium/third_party/WebKit/Source/core/frame/Settings.h
+++ b/chromium/third_party/WebKit/Source/core/frame/Settings.h
@@ -85,6 +85,12 @@ class CORE_EXPORT Settings {
void SetDelegate(SettingsDelegate*);
+ // TODO(lunalu): Service worker and shared worker count feature usage on the
+ // blink side use counter via the shadow page. Once blink side use counter is
+ // removed, this flag is no longer needed (crbug.com/811948).
+ void SetIsShadowPage(bool);
+ bool IsShadowPage() const { return is_shadow_page_; }
+
private:
Settings();
@@ -95,6 +101,10 @@ class CORE_EXPORT Settings {
GenericFontFamilySettings generic_font_family_settings_;
IntSize text_autosizing_window_size_override_;
bool text_autosizing_enabled_ : 1;
+ // TODO(lunalu): Service worker is counting feature usage on the blink side
+ // use counter via the shadow page. Once blink side use counter is removed,
+ // this flag is no longer needed (crbug.com/811948).
+ bool is_shadow_page_;
SETTINGS_MEMBER_VARIABLES
diff --git a/chromium/third_party/WebKit/Source/core/frame/UseCounter.cpp b/chromium/third_party/WebKit/Source/core/frame/UseCounter.cpp
index 9d7004958f6..2349f14f356 100644
--- a/chromium/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/chromium/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -34,6 +34,7 @@
#include "core/frame/FrameConsole.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/LocalFrameClient.h"
+#include "core/frame/Settings.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/page/Page.h"
#include "core/workers/WorkerOrWorkletGlobalScope.h"
@@ -1263,6 +1264,11 @@ void UseCounter::DidCommitLoad(const LocalFrame* frame) {
context_ = kDisabledContext;
else if (frame->GetDocument()->IsPrefetchOnly())
context_ = kDisabledContext;
+ // TODO(lunalu): Service worker and shared worker count feature usage on the
+ // blink side use counter. Once the blink side use counter is removed
+ // (crbug.com/811948), the checker for shadow pages should be removed.
+ else if (frame->GetSettings()->IsShadowPage())
+ context_ = kDisabledContext;
else if (SchemeRegistry::ShouldTrackUsageMetricsForScheme(url.Protocol()))
context_ = kDefaultContext;
else
diff --git a/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp b/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp
index dfea5597271..86144b4c736 100644
--- a/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp
@@ -657,6 +657,18 @@ void HTMLMediaElement::ParserDidSetAttributes() {
muted_ = true;
}
+// This method is being used as a way to know that cloneNode finished cloning
+// attribute as there is no callback notifying about the end of a cloning
+// operation. Indeed, it is required per spec to set the muted state based on
+// the content attribute when the object is created.
+void HTMLMediaElement::CopyNonAttributePropertiesFromElement(
+ const Element& other) {
+ HTMLElement::CopyNonAttributePropertiesFromElement(other);
+
+ if (FastHasAttribute(mutedAttr))
+ muted_ = true;
+}
+
void HTMLMediaElement::FinishParsingChildren() {
HTMLElement::FinishParsingChildren();
diff --git a/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.h b/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.h
index 02826f0cec1..3ce50fb760b 100644
--- a/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.h
+++ b/chromium/third_party/WebKit/Source/core/html/media/HTMLMediaElement.h
@@ -337,6 +337,7 @@ class CORE_EXPORT HTMLMediaElement
bool IsURLAttribute(const Attribute&) const override;
void AttachLayoutTree(AttachContext&) override;
void ParserDidSetAttributes() override;
+ void CopyNonAttributePropertiesFromElement(const Element&) override;
InsertionNotificationRequest InsertedInto(ContainerNode*) override;
void RemovedFrom(ContainerNode*) override;
diff --git a/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp b/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp
index a5b167a645a..31c352cf039 100644
--- a/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp
@@ -59,16 +59,15 @@ static const CSSValueID kDisplayWritingModeMap[] = {
CSSValueHorizontalTb, CSSValueVerticalRl, CSSValueVerticalLr};
static_assert(WTF_ARRAY_LENGTH(kDisplayWritingModeMap) ==
VTTCue::kNumberOfWritingDirections,
- "kDisplayWritingModeMap should have the same number of elements "
- "as VTTCue::kNumberOfWritingDirections");
+ "displayWritingModeMap should have the same number of elements "
+ "as VTTCue::NumberOfWritingDirections");
static const CSSValueID kDisplayAlignmentMap[] = {
CSSValueStart, CSSValueCenter, CSSValueEnd, CSSValueLeft, CSSValueRight};
-static_assert(
- WTF_ARRAY_LENGTH(kDisplayAlignmentMap) ==
- static_cast<size_t>(VTTCue::TextAlignment::kNumberOfAlignments),
- "kDisplayAlignmentMap should have the same number of elements as "
- "VTTCue::TextAlignment::kNumberOfAlignments");
+static_assert(WTF_ARRAY_LENGTH(kDisplayAlignmentMap) ==
+ VTTCue::kNumberOfAlignments,
+ "displayAlignmentMap should have the same number of elements as "
+ "VTTCue::NumberOfAlignments");
static const String& AutoKeyword() {
DEFINE_STATIC_LOCAL(const String, auto_string, ("auto"));
@@ -100,16 +99,6 @@ static const String& RightKeyword() {
return right;
}
-static const String& LineLeftKeyword() {
- DEFINE_STATIC_LOCAL(const String, line_left, ("line-left"));
- return line_left;
-}
-
-static const String& LineRightKeyword() {
- DEFINE_STATIC_LOCAL(const String, line_right, ("line-right"));
- return line_right;
-}
-
static const String& HorizontalKeyword() {
return g_empty_string;
}
@@ -152,14 +141,13 @@ static void SetInlineStylePropertyIfNotEmpty(Element& element,
VTTCueBox::VTTCueBox(Document& document)
: HTMLDivElement(document),
- snap_to_lines_position_(std::numeric_limits<float>::quiet_NaN()),
- line_align_(0) {
+ snap_to_lines_position_(std::numeric_limits<float>::quiet_NaN()) {
SetShadowPseudoId(AtomicString("-webkit-media-text-track-display"));
}
void VTTCueBox::ApplyCSSProperties(
const VTTDisplayParameters& display_parameters) {
- // https://w3c.github.io/webvtt/#applying-css-properties
+ // http://dev.w3.org/html5/webvtt/#applying-css-properties-to-webvtt-node-objects
// Initialize the (root) list of WebVTT Node Objects with the following CSS
// settings:
@@ -205,10 +193,8 @@ void VTTCueBox::ApplyCSSProperties(
// text alignment:
SetInlineStyleProperty(CSSPropertyTextAlign, display_parameters.text_align);
- // The snap-to-lines position and line alignment is propagated to
- // LayoutVTTCue.
+ // The snap-to-lines position is propagated to LayoutVTTCue.
snap_to_lines_position_ = display_parameters.snap_to_lines_position;
- line_align_ = display_parameters.line_align;
}
LayoutObject* VTTCueBox::CreateLayoutObject(const ComputedStyle& style) {
@@ -219,7 +205,7 @@ LayoutObject* VTTCueBox::CreateLayoutObject(const ComputedStyle& style) {
if (style.GetPosition() == EPosition::kRelative)
return HTMLDivElement::CreateLayoutObject(style);
- return new LayoutVTTCue(this, snap_to_lines_position_, line_align_);
+ return new LayoutVTTCue(this, snap_to_lines_position_);
}
VTTCue::VTTCue(Document& document,
@@ -232,9 +218,7 @@ VTTCue::VTTCue(Document& document,
text_position_(std::numeric_limits<double>::quiet_NaN()),
cue_size_(100),
writing_direction_(kHorizontal),
- text_alignment_(TextAlignment::kCenter),
- position_alignment_(PositionAlignment::kAuto),
- line_alignment_(LineAlignment::kStart),
+ cue_alignment_(kCenter),
vtt_node_tree_(nullptr),
cue_background_box_(HTMLDivElement::Create(document)),
snap_to_lines_(true),
@@ -312,7 +296,7 @@ void VTTCue::line(DoubleOrAutoKeyword& result) const {
}
void VTTCue::setLine(const DoubleOrAutoKeyword& position) {
- // https://w3c.github.io/webvtt/#webvtt-line-cue-setting
+ // http://dev.w3.org/html5/webvtt/#dfn-vttcue-line
// On setting, the WebVTT cue line must be set to the new value; if the new
// value is the string "auto", then it must be interpreted as the special
// value auto. ("auto" is translated to NaN.)
@@ -332,39 +316,6 @@ void VTTCue::setLine(const DoubleOrAutoKeyword& position) {
CueDidChange();
}
-const String& VTTCue::lineAlign() const {
- switch (line_alignment_) {
- case LineAlignment::kStart:
- return StartKeyword();
- case LineAlignment::kCenter:
- return CenterKeyword();
- case LineAlignment::kEnd:
- return EndKeyword();
- default:
- NOTREACHED();
- return g_empty_string;
- }
-}
-
-void VTTCue::setLineAlign(const String& value) {
- LineAlignment alignment = line_alignment_;
- if (value == StartKeyword())
- alignment = LineAlignment::kStart;
- else if (value == CenterKeyword())
- alignment = LineAlignment::kCenter;
- else if (value == EndKeyword())
- alignment = LineAlignment::kEnd;
- else
- NOTREACHED();
-
- if (alignment == line_alignment_)
- return;
-
- CueWillChange();
- line_alignment_ = alignment;
- CueDidChange();
-}
-
bool VTTCue::TextPositionIsAuto() const {
return std::isnan(text_position_);
}
@@ -378,7 +329,7 @@ void VTTCue::position(DoubleOrAutoKeyword& result) const {
void VTTCue::setPosition(const DoubleOrAutoKeyword& position,
ExceptionState& exception_state) {
- // https://w3c.github.io/webvtt/#dom-vttcue-position
+ // http://dev.w3.org/html5/webvtt/#dfn-vttcue-position
// On setting, if the new value is negative or greater than 100, then an
// IndexSizeError exception must be thrown. Otherwise, the WebVTT cue
// position must be set to the new value; if the new value is the string
@@ -402,51 +353,14 @@ void VTTCue::setPosition(const DoubleOrAutoKeyword& position,
CueDidChange();
}
-const String& VTTCue::positionAlign() const {
- switch (position_alignment_) {
- case PositionAlignment::kLineLeft:
- return LineLeftKeyword();
- case PositionAlignment::kCenter:
- return CenterKeyword();
- case PositionAlignment::kLineRight:
- return LineRightKeyword();
- case PositionAlignment::kAuto:
- return AutoKeyword();
- default:
- NOTREACHED();
- return g_empty_string;
- }
-}
-
-void VTTCue::setPositionAlign(const String& value) {
- PositionAlignment alignment = position_alignment_;
- if (value == LineLeftKeyword())
- alignment = PositionAlignment::kLineLeft;
- else if (value == CenterKeyword())
- alignment = PositionAlignment::kCenter;
- else if (value == LineRightKeyword())
- alignment = PositionAlignment::kLineRight;
- else if (value == AutoKeyword())
- alignment = PositionAlignment::kAuto;
- else
- NOTREACHED();
-
- if (alignment == position_alignment_)
- return;
-
- CueWillChange();
- position_alignment_ = alignment;
- CueDidChange();
-}
-
void VTTCue::setSize(double size, ExceptionState& exception_state) {
- // https://w3c.github.io/webvtt/#dom-vttcue-size
- // On setting, if the new value is negative or greater than 100, then
- // an IndexSizeError exception must be thrown.
+ // http://dev.w3.org/html5/webvtt/#dfn-vttcue-size
+ // On setting, if the new value is negative or greater than 100, then throw
+ // an IndexSizeError exception.
if (IsInvalidPercentage(size, exception_state))
return;
- // Otherwise, WebVTT cue size must be set to the new value.
+ // Otherwise, set the WebVTT cue size to the new value.
if (cue_size_ == size)
return;
@@ -456,16 +370,16 @@ void VTTCue::setSize(double size, ExceptionState& exception_state) {
}
const String& VTTCue::align() const {
- switch (text_alignment_) {
- case TextAlignment::kStart:
+ switch (cue_alignment_) {
+ case kStart:
return StartKeyword();
- case TextAlignment::kCenter:
+ case kCenter:
return CenterKeyword();
- case TextAlignment::kEnd:
+ case kEnd:
return EndKeyword();
- case TextAlignment::kLeft:
+ case kLeft:
return LeftKeyword();
- case TextAlignment::kRight:
+ case kRight:
return RightKeyword();
default:
NOTREACHED();
@@ -474,25 +388,25 @@ const String& VTTCue::align() const {
}
void VTTCue::setAlign(const String& value) {
- TextAlignment alignment = text_alignment_;
+ CueAlignment alignment = cue_alignment_;
if (value == StartKeyword())
- alignment = TextAlignment::kStart;
+ alignment = kStart;
else if (value == CenterKeyword())
- alignment = TextAlignment::kCenter;
+ alignment = kCenter;
else if (value == EndKeyword())
- alignment = TextAlignment::kEnd;
+ alignment = kEnd;
else if (value == LeftKeyword())
- alignment = TextAlignment::kLeft;
+ alignment = kLeft;
else if (value == RightKeyword())
- alignment = TextAlignment::kRight;
+ alignment = kRight;
else
NOTREACHED();
- if (alignment == text_alignment_)
+ if (alignment == cue_alignment_)
return;
CueWillChange();
- text_alignment_ = alignment;
+ cue_alignment_ = alignment;
CueDidChange();
}
@@ -544,27 +458,27 @@ void VTTCue::setRegion(VTTRegion* region) {
CueDidChange();
}
-double VTTCue::CalculateComputedLine() const {
- // https://w3c.github.io/webvtt/#cue-computed-line
+double VTTCue::CalculateComputedLinePosition() const {
+ // http://dev.w3.org/html5/webvtt/#dfn-cue-computed-line
// A WebVTT cue has a computed line whose value is that returned by the
// following algorithm, which is defined in terms of the other aspects of
// the cue:
// 1. If the line is numeric, the WebVTT cue snap-to-lines flag of the
- // WebVTT cue is false, and the line is negative or greater than 100,
+ // WebVTT cue is not set, and the line is negative or greater than 100,
// then return 100 and abort these steps.
if (!LineIsAuto() && !snap_to_lines_ && IsInvalidPercentage(line_position_))
return 100;
// 2. If the line is numeric, return the value of the WebVTT cue line and
- // abort these steps. (Either the WebVTT cue snap-to-lines flag is true,
+ // abort these steps. (Either the WebVTT cue snap-to-lines flag is set,
// so any value, not just those in the range 0..100, is valid, or the
// value is in the range 0..100 and is thus valid regardless of the
// value of that flag.)
if (!LineIsAuto())
return line_position_;
- // 3. If the WebVTT cue snap-to-lines flag of the WebVTT cue is false,
+ // 3. If the WebVTT cue snap-to-lines flag of the WebVTT cue is not set,
// return the value 100 and abort these steps. (The WebVTT cue line is
// the special value auto.)
if (!snap_to_lines_)
@@ -644,44 +558,43 @@ static CSSValueID DetermineTextDirection(DocumentFragment* vtt_root) {
return IsLtr(text_direction) ? CSSValueLtr : CSSValueRtl;
}
-double VTTCue::CalculateComputedPosition() const {
- // https://w3c.github.io/webvtt/#cue-computed-position
+double VTTCue::CalculateComputedTextPosition() const {
+ // http://dev.w3.org/html5/webvtt/#dfn-cue-computed-position
// 1. If the position is numeric, then return the value of the position and
// abort these steps. (Otherwise, the position is the special value auto.)
if (!TextPositionIsAuto())
return text_position_;
- // 2. If the cue text alignment is left, return 0 and abort these steps.
- if (text_alignment_ == TextAlignment::kLeft)
- return 0;
- // 3. If the cue text alignment is right, return 100 and abort these steps.
- if (text_alignment_ == TextAlignment::kRight)
- return 100;
- // 4. Otherwise, return 50 and abort these steps.
- return 50;
+ switch (cue_alignment_) {
+ // 2. If the cue text alignment is start or left, return 0 and abort these
+ // steps.
+ case kStart:
+ case kLeft:
+ return 0;
+ // 3. If the cue text alignment is end or right, return 100 and abort these
+ // steps.
+ case kEnd:
+ case kRight:
+ return 100;
+ // 4. If the cue text alignment is center, return 50 and abort these steps.
+ case kCenter:
+ return 50;
+ default:
+ NOTREACHED();
+ return 0;
+ }
}
-VTTCue::PositionAlignment VTTCue::CalculateComputedPositionAlignment() const {
- // https://w3c.github.io/webvtt/#cue-computed-position-alignment
-
- // 1. If the WebVTT cue position alignment is not auto, then return the value
- // of the WebVTT cue position alignment and abort these steps.
- if (position_alignment_ != PositionAlignment::kAuto)
- return position_alignment_;
-
- // 2. If the WebVTT cue text alignment is left, return line-left and
- // abort these steps.
- if (text_alignment_ == TextAlignment::kLeft)
- return PositionAlignment::kLineLeft;
-
- // 3. If the WebVTT cue text alignment is right, return line-right and
- // abort these steps.
- if (text_alignment_ == TextAlignment::kRight)
- return PositionAlignment::kLineRight;
-
- // 4. Otherwise, return center.
- return PositionAlignment::kCenter;
+VTTCue::CueAlignment VTTCue::CalculateComputedCueAlignment() const {
+ switch (cue_alignment_) {
+ case VTTCue::kLeft:
+ return VTTCue::kStart;
+ case VTTCue::kRight:
+ return VTTCue::kEnd;
+ default:
+ return cue_alignment_;
+ }
}
VTTDisplayParameters::VTTDisplayParameters()
@@ -689,11 +602,10 @@ VTTDisplayParameters::VTTDisplayParameters()
direction(CSSValueNone),
text_align(CSSValueNone),
writing_mode(CSSValueNone),
- snap_to_lines_position(std::numeric_limits<float>::quiet_NaN()),
- line_align(0) {}
+ snap_to_lines_position(std::numeric_limits<float>::quiet_NaN()) {}
VTTDisplayParameters VTTCue::CalculateDisplayParameters() const {
- // https://w3c.github.io/webvtt/#apply-webvtt-cue-settings
+ // http://dev.w3.org/html5/webvtt/#dfn-apply-webvtt-cue-settings
VTTDisplayParameters display_parameters;
@@ -705,8 +617,7 @@ VTTDisplayParameters VTTCue::CalculateDisplayParameters() const {
// Note: The 'text-align' property is also determined here so that
// VTTCueBox::applyCSSProperties need not have access to a VTTCue.
- display_parameters.text_align =
- kDisplayAlignmentMap[static_cast<size_t>(GetTextAlignment())];
+ display_parameters.text_align = kDisplayAlignmentMap[GetCueAlignment()];
// 3. If the cue writing direction is horizontal, then let block-flow be
// 'tb'. Otherwise, if the cue writing direction is vertical growing left,
@@ -714,22 +625,21 @@ VTTDisplayParameters VTTCue::CalculateDisplayParameters() const {
// vertical growing right; let block-flow be 'rl'.
display_parameters.writing_mode = kDisplayWritingModeMap[writing_direction_];
- // Resolve the cue alignment to one of the values {line-left, line-right,
- // center}.
- PositionAlignment computed_position_alignment =
- CalculateComputedPositionAlignment();
+ // Resolve the cue alignment to one of the values {start, end, center}.
+ CueAlignment computed_cue_alignment = CalculateComputedCueAlignment();
// 4. Determine the value of maximum size for cue as per the appropriate
// rules from the following list:
- double computed_position = CalculateComputedPosition();
- double maximum_size = computed_position;
- if (computed_position_alignment == PositionAlignment::kLineLeft) {
- maximum_size = 100 - computed_position;
- } else if (computed_position_alignment == PositionAlignment::kLineRight) {
- maximum_size = computed_position;
- } else if (computed_position_alignment == PositionAlignment::kCenter) {
- maximum_size =
- computed_position <= 50 ? computed_position : (100 - computed_position);
+ double computed_text_position = CalculateComputedTextPosition();
+ double maximum_size = computed_text_position;
+ if (computed_cue_alignment == kStart) {
+ maximum_size = 100 - computed_text_position;
+ } else if (computed_cue_alignment == kEnd) {
+ maximum_size = computed_text_position;
+ } else if (computed_cue_alignment == kCenter) {
+ maximum_size = computed_text_position <= 50
+ ? computed_text_position
+ : (100 - computed_text_position);
maximum_size = maximum_size * 2;
} else {
NOTREACHED();
@@ -748,33 +658,33 @@ VTTDisplayParameters VTTCue::CalculateDisplayParameters() const {
// 7. Determine the value of x-position or y-position for cue as per the
// appropriate rules from the following list:
if (writing_direction_ == kHorizontal) {
- switch (computed_position_alignment) {
- case PositionAlignment::kLineLeft:
- display_parameters.position.SetX(computed_position);
+ switch (computed_cue_alignment) {
+ case kStart:
+ display_parameters.position.SetX(computed_text_position);
break;
- case PositionAlignment::kLineRight:
- display_parameters.position.SetX(computed_position -
+ case kEnd:
+ display_parameters.position.SetX(computed_text_position -
display_parameters.size);
break;
- case PositionAlignment::kCenter:
- display_parameters.position.SetX(computed_position -
+ case kCenter:
+ display_parameters.position.SetX(computed_text_position -
display_parameters.size / 2);
break;
default:
NOTREACHED();
}
} else {
- // Cases for writing_direction_ being VerticalGrowing{Left|Right}
- switch (computed_position_alignment) {
- case PositionAlignment::kLineLeft:
- display_parameters.position.SetY(computed_position);
+ // Cases for m_writingDirection being VerticalGrowing{Left|Right}
+ switch (computed_cue_alignment) {
+ case kStart:
+ display_parameters.position.SetY(computed_text_position);
break;
- case PositionAlignment::kLineRight:
- display_parameters.position.SetY(computed_position -
+ case kEnd:
+ display_parameters.position.SetY(computed_text_position -
display_parameters.size);
break;
- case PositionAlignment::kCenter:
- display_parameters.position.SetY(computed_position -
+ case kCenter:
+ display_parameters.position.SetY(computed_text_position -
display_parameters.size / 2);
break;
default:
@@ -784,34 +694,29 @@ VTTDisplayParameters VTTCue::CalculateDisplayParameters() const {
// A cue has a computed line whose value is defined in terms of
// the other aspects of the cue.
- double computed_line = CalculateComputedLine();
+ double computed_line_position = CalculateComputedLinePosition();
// 8. Determine the value of whichever of x-position or y-position is not
// yet calculated for cue as per the appropriate rules from the following
// list:
if (!snap_to_lines_) {
if (writing_direction_ == kHorizontal)
- display_parameters.position.SetY(computed_line);
+ display_parameters.position.SetY(computed_line_position);
else
- display_parameters.position.SetX(computed_line);
+ display_parameters.position.SetX(computed_line_position);
} else {
if (writing_direction_ == kHorizontal)
display_parameters.position.SetY(0);
else
display_parameters.position.SetX(0);
}
+
// Step 9 not implemented (margin == 0).
- // The snap-to-lines position and line alignment are propagated to
- // LayoutVTTCue.
- if (snap_to_lines_) {
- display_parameters.snap_to_lines_position = computed_line;
- } else {
- if (line_alignment_ == LineAlignment::kCenter)
- display_parameters.line_align = 50;
- else if (line_alignment_ == LineAlignment::kEnd)
- display_parameters.line_align = 100;
- }
+ // The snap-to-lines position is propagated to LayoutVTTCue.
+ display_parameters.snap_to_lines_position =
+ snap_to_lines_ ? computed_line_position
+ : std::numeric_limits<float>::quiet_NaN();
DCHECK(std::isfinite(display_parameters.size));
DCHECK_NE(display_parameters.direction, CSSValueNone);
@@ -932,7 +837,7 @@ void VTTCue::UpdateDisplay(HTMLDivElement& container) {
if (cue_size_ != 100)
UseCounter::Count(GetDocument(), WebFeature::kVTTCueRenderSizeNot100);
- if (text_alignment_ != TextAlignment::kCenter)
+ if (cue_alignment_ != kCenter)
UseCounter::Count(GetDocument(), WebFeature::kVTTCueRenderAlignNotCenter);
VTTCueBox* display_box = GetDisplayTree();
@@ -975,7 +880,7 @@ VTTCue::CueSetting VTTCue::SettingName(VTTScanner& input) const {
}
static bool ScanPercentage(VTTScanner& input, double& number) {
- // https://w3c.github.io/webvtt/#parse-a-percentage-string
+ // http://dev.w3.org/html5/webvtt/#dfn-parse-a-percentage-string
// 1. Let input be the string being parsed.
// 2. If input contains any characters other than U+0025 PERCENT SIGN
@@ -1048,7 +953,7 @@ void VTTCue::ParseSettings(const VTTRegionMap* region_map,
}
case kLine: {
// If name is a case-sensitive match for "line"
- // Steps 1 - 2 Handled below.
+ // Steps 1 - 2 skipped.
double number;
// 3. If linepos does not contain at least one ASCII digit, then
// jump to the step labeled next setting.
@@ -1091,74 +996,32 @@ void VTTCue::ParseSettings(const VTTRegionMap* region_map,
if (is_negative && number)
number = -number;
}
- LineAlignment line_alignment = LineAlignment::kStart;
- if (input.Scan(',')) {
- // 6. If linealign is a case-sensitive match for the string "start",
- // then let cue's WebVTT cue line alignment be start alignment.
- if (input.Scan("start"))
- line_alignment = LineAlignment::kStart;
- // 7. If linealign is a case-sensitive match for the string "center",
- // then let cue's WebVTT cue line alignment be center alignment.
- else if (input.Scan("center"))
- line_alignment = LineAlignment::kCenter;
- // 8. If linealign is a case-sensitive match for the string
- // "end", then let cue's WebVTT cue line alignment be end
- // alignment.
- else if (input.Scan("end"))
- line_alignment = LineAlignment::kEnd;
- // 9. Otherwise, if linealign is not null, then jump to the
- // step labeled next setting.
- else
- break;
- }
if (!input.IsAt(value_run.end()))
break;
- // 9. Let cue's WebVTT cue line be number.
+ // 5. Let cue's WebVTT cue line be number.
line_position_ = number;
- line_alignment_ = line_alignment;
- // 10. If the last character in linepos is a U+0025 PERCENT SIGN
- // character (%), then let cue's WebVTT cue snap-to-lines
- // flag be false. Otherwise, let it be true.
+ // 6. If the last character in linepos is a U+0025 PERCENT SIGN
+ // character (%), then let cue's WebVTT cue snap-to-lines
+ // flag be false. Otherwise, let it be true.
snap_to_lines_ = !is_percentage;
+ // Steps 7 - 9 skipped.
break;
}
case kPosition: {
// If name is a case-sensitive match for "position".
double number;
- // Steps 1 - 2 Handled below.
+ // Steps 1 - 2 skipped.
// 3. If parse a percentage string from colpos doesn't fail, let
// number be the returned percentage, otherwise jump to the step
// labeled next setting (text track cue text position's value
// remains the special value auto).
if (!ScanPercentage(input, number))
break;
- PositionAlignment position_alignment = PositionAlignment::kAuto;
- if (input.Scan(',')) {
- // 4. If colalign is a case-sensitive match for the string
- // "line-left", then let cue's WebVTT cue position
- // alignment be line-left alignment.
- if (input.Scan("line-left"))
- position_alignment = PositionAlignment::kLineLeft;
- // 5. If colalign is a case-sensitive match for the string
- // "center", then let cue's WebVTT cue position alignment
- // be center alignment.
- else if (input.Scan("center"))
- position_alignment = PositionAlignment::kCenter;
- // 6. If colalign is a case-sensitive match for the string
- // "line-right", then let cue's WebVTT cue position alignment be
- // line-right alignment.
- else if (input.Scan("line-right"))
- position_alignment = PositionAlignment::kLineRight;
- // 7. Otherwise, if colalign is not null, then jump to the
- // step labeled next setting.
- else
- break;
- }
if (!input.IsAt(value_run.end()))
break;
- // 8. Let cue's cue position be number.
+ // 4. Let cue's cue position be number.
text_position_ = number;
- position_alignment_ = position_alignment;
+ // Steps 5 - 7 skipped.
break;
}
case kSize: {
@@ -1180,27 +1043,27 @@ void VTTCue::ParseSettings(const VTTRegionMap* region_map,
// 1. If value is a case-sensitive match for the string "start",
// then let cue's WebVTT cue text alignment be start alignment.
if (input.ScanRun(value_run, StartKeyword()))
- text_alignment_ = TextAlignment::kStart;
+ cue_alignment_ = kStart;
// 2. If value is a case-sensitive match for the string "center",
// then let cue's WebVTT cue text alignment be center alignment.
else if (input.ScanRun(value_run, CenterKeyword()))
- text_alignment_ = TextAlignment::kCenter;
+ cue_alignment_ = kCenter;
// 3. If value is a case-sensitive match for the string "end", then
// let cue's WebVTT cue text alignment be end alignment.
else if (input.ScanRun(value_run, EndKeyword()))
- text_alignment_ = TextAlignment::kEnd;
+ cue_alignment_ = kEnd;
// 4. If value is a case-sensitive match for the string "left",
// then let cue's WebVTT cue text alignment be left alignment.
else if (input.ScanRun(value_run, LeftKeyword()))
- text_alignment_ = TextAlignment::kLeft;
+ cue_alignment_ = kLeft;
// 5. If value is a case-sensitive match for the string "right",
// then let cue's WebVTT cue text alignment be right alignment.
else if (input.ScanRun(value_run, RightKeyword()))
- text_alignment_ = TextAlignment::kRight;
+ cue_alignment_ = kRight;
break;
}
case kRegionId:
diff --git a/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h b/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
index 0ed8df98bb4..877bc92dbfb 100644
--- a/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
+++ b/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
@@ -55,7 +55,6 @@ struct VTTDisplayParameters {
CSSValueID text_align;
CSSValueID writing_mode;
double snap_to_lines_position;
- int line_align;
};
class VTTCueBox final : public HTMLDivElement {
@@ -75,7 +74,6 @@ class VTTCueBox final : public HTMLDivElement {
// non-snap-to-lines layout where no adjustment should take place.
// This is set in applyCSSProperties and propagated to LayoutVTTCue.
float snap_to_lines_position_;
- int line_align_;
};
class VTTCue final : public TextTrackCue {
@@ -103,15 +101,9 @@ class VTTCue final : public TextTrackCue {
void line(DoubleOrAutoKeyword&) const;
void setLine(const DoubleOrAutoKeyword&);
- const String& lineAlign() const;
- void setLineAlign(const String&);
-
void position(DoubleOrAutoKeyword&) const;
void setPosition(const DoubleOrAutoKeyword&, ExceptionState&);
- const String& positionAlign() const;
- void setPositionAlign(const String&);
-
double size() const { return cue_size_; }
void setSize(double, ExceptionState&);
@@ -134,7 +126,7 @@ class VTTCue final : public TextTrackCue {
void RemoveDisplayTree(RemovalNotification) override;
- double CalculateComputedLine() const;
+ double CalculateComputedLinePosition() const;
enum WritingDirection {
kHorizontal = 0,
@@ -144,7 +136,7 @@ class VTTCue final : public TextTrackCue {
};
WritingDirection GetWritingDirection() const { return writing_direction_; }
- enum class TextAlignment {
+ enum CueAlignment {
kStart = 0,
kCenter,
kEnd,
@@ -152,13 +144,7 @@ class VTTCue final : public TextTrackCue {
kRight,
kNumberOfAlignments
};
- TextAlignment GetTextAlignment() const { return text_alignment_; }
-
- enum class PositionAlignment { kLineLeft, kCenter, kLineRight, kAuto };
- PositionAlignment GetPositionAlignment() const { return position_alignment_; }
-
- enum class LineAlignment { kStart, kCenter, kEnd };
- LineAlignment GetLineAlignment() const { return line_alignment_; }
+ CueAlignment GetCueAlignment() const { return cue_alignment_; }
ExecutionContext* GetExecutionContext() const override;
@@ -185,9 +171,8 @@ class VTTCue final : public TextTrackCue {
bool TextPositionIsAuto() const;
VTTDisplayParameters CalculateDisplayParameters() const;
- double CalculateComputedPosition() const;
- LineAlignment CalculateComputedLineAlignment() const;
- PositionAlignment CalculateComputedPositionAlignment() const;
+ double CalculateComputedTextPosition() const;
+ CueAlignment CalculateComputedCueAlignment() const;
enum CueSetting {
kNone,
@@ -205,9 +190,7 @@ class VTTCue final : public TextTrackCue {
double text_position_;
double cue_size_;
WritingDirection writing_direction_;
- TextAlignment text_alignment_;
- PositionAlignment position_alignment_;
- LineAlignment line_alignment_;
+ CueAlignment cue_alignment_;
Member<VTTRegion> region_;
Member<DocumentFragment> vtt_node_tree_;
diff --git a/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl b/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl
index 48df964ceba..060ab7722ba 100644
--- a/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl
+++ b/chromium/third_party/WebKit/Source/core/html/track/vtt/VTTCue.idl
@@ -30,10 +30,9 @@
// https://w3c.github.io/webvtt/#the-vttcue-interface
enum AutoKeyword { "auto" };
-typedef (double or AutoKeyword) LineAndPositionSetting;
enum DirectionSetting { "" /* horizontal */, "rl", "lr" };
-enum LineAlignSetting { "start", "center", "end" };
-enum PositionAlignSetting { "line-left", "center", "line-right", "auto" };
+// enum LineAlignSetting { "start", "middle", "end" };
+// enum PositionAlignSetting { "start", "middle", "end", "auto" };
enum AlignSetting { "start", "center", "end", "left", "right" };
[
@@ -43,10 +42,10 @@ enum AlignSetting { "start", "center", "end", "left", "right" };
[RuntimeEnabled=WebVTTRegions] attribute VTTRegion? region;
attribute DirectionSetting vertical;
attribute boolean snapToLines;
- attribute LineAndPositionSetting line;
- attribute LineAlignSetting lineAlign;
- [RaisesException=Setter] attribute LineAndPositionSetting position;
- attribute PositionAlignSetting positionAlign;
+ attribute (double or AutoKeyword) line;
+ // attribute LineAlignSetting lineAlign;
+ [RaisesException=Setter] attribute (double or AutoKeyword) position;
+ // attribute PositionAlignSetting positionAlign;
[RaisesException=Setter] attribute double size;
attribute AlignSetting align;
attribute DOMString text;
diff --git a/chromium/third_party/WebKit/Source/core/input/PointerEventManagerTest.cpp b/chromium/third_party/WebKit/Source/core/input/PointerEventManagerTest.cpp
index 762142f9072..702d503c863 100644
--- a/chromium/third_party/WebKit/Source/core/input/PointerEventManagerTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/input/PointerEventManagerTest.cpp
@@ -45,6 +45,42 @@ class CheckPointerEventListenerCallback final : public EventListener {
int pen_event_received_count_ = 0;
};
+class PointerEventCoordinateListenerCallback final : public EventListener {
+ public:
+ static PointerEventCoordinateListenerCallback* Create() {
+ return new PointerEventCoordinateListenerCallback();
+ }
+
+ bool operator==(const EventListener& other) const override {
+ return this == &other;
+ }
+
+ void handleEvent(ExecutionContext*, Event* event) override {
+ const PointerEvent* pointer_event = (PointerEvent*)event;
+ last_client_x_ = pointer_event->clientX();
+ last_client_y_ = pointer_event->clientY();
+ last_page_x_ = pointer_event->pageX();
+ last_page_y_ = pointer_event->pageY();
+ last_screen_x_ = pointer_event->screenX();
+ last_screen_y_ = pointer_event->screenY();
+ last_width_ = pointer_event->width();
+ last_height_ = pointer_event->height();
+ }
+
+ double last_client_x_ = 0;
+ double last_client_y_ = 0;
+ double last_page_x_ = 0;
+ double last_page_y_ = 0;
+ double last_screen_x_ = 0;
+ double last_screen_y_ = 0;
+ double last_width_ = 0;
+ double last_height_ = 0;
+
+ private:
+ PointerEventCoordinateListenerCallback()
+ : EventListener(EventListener::kCPPEventListenerType) {}
+};
+
} // namespace
class PointerEventManagerTest : public SimTest {
@@ -54,14 +90,19 @@ class PointerEventManagerTest : public SimTest {
}
WebPointerEvent CreateTestPointerEvent(
WebInputEvent::Type type,
- WebPointerProperties::PointerType pointer_type) {
+ WebPointerProperties::PointerType pointer_type,
+ WebFloatPoint position_in_widget = WebFloatPoint(100, 100),
+ WebFloatPoint position_in_screen = WebFloatPoint(100, 100),
+ int movement_x = 0,
+ int movement_y = 0,
+ float width = 1,
+ float height = 1) {
WebPointerEvent event(
type,
- WebPointerProperties(1, pointer_type,
- WebPointerProperties::Button::kLeft,
- WebFloatPoint(100, 100), WebFloatPoint(100, 100)),
- 1, 1);
- event.SetFrameScale(1);
+ WebPointerProperties(
+ 1, pointer_type, WebPointerProperties::Button::kLeft,
+ position_in_widget, position_in_screen, movement_x, movement_y),
+ width, height);
return event;
}
WebMouseEvent CreateTestMouseEvent(WebInputEvent::Type type,
@@ -86,15 +127,15 @@ TEST_F(PointerEventManagerTest, PointerCancelsOfAllTypes) {
GetDocument().body()->addEventListener(EventTypeNames::pointercancel,
callback);
- EventHandler().HandlePointerEvent(
+ WebView().HandleInputEvent(WebCoalescedInputEvent(
CreateTestPointerEvent(WebInputEvent::kPointerDown,
WebPointerProperties::PointerType::kTouch),
- Vector<WebPointerEvent>());
+ std::vector<WebPointerEvent>()));
- EventHandler().HandlePointerEvent(
+ WebView().HandleInputEvent(WebCoalescedInputEvent(
CreateTestPointerEvent(WebInputEvent::kPointerDown,
WebPointerProperties::PointerType::kPen),
- Vector<WebPointerEvent>());
+ std::vector<WebPointerEvent>()));
EventHandler().HandleMousePressEvent(
CreateTestMouseEvent(WebInputEvent::kMouseDown, WebFloatPoint(100, 100)));
@@ -103,18 +144,18 @@ TEST_F(PointerEventManagerTest, PointerCancelsOfAllTypes) {
ASSERT_EQ(callback->touchEventCount(), 0);
ASSERT_EQ(callback->penEventCount(), 0);
- EventHandler().HandlePointerEvent(
+ WebView().HandleInputEvent(WebCoalescedInputEvent(
CreateTestPointerEvent(WebInputEvent::kPointerCausedUaAction,
WebPointerProperties::PointerType::kPen),
- Vector<WebPointerEvent>());
+ std::vector<WebPointerEvent>()));
ASSERT_EQ(callback->mouseEventCount(), 0);
ASSERT_EQ(callback->touchEventCount(), 1);
ASSERT_EQ(callback->penEventCount(), 1);
- EventHandler().HandlePointerEvent(
+ WebView().HandleInputEvent(WebCoalescedInputEvent(
CreateTestPointerEvent(WebInputEvent::kPointerCausedUaAction,
WebPointerProperties::PointerType::kTouch),
- Vector<WebPointerEvent>());
+ std::vector<WebPointerEvent>()));
ASSERT_EQ(callback->mouseEventCount(), 0);
ASSERT_EQ(callback->touchEventCount(), 1);
ASSERT_EQ(callback->penEventCount(), 1);
@@ -128,4 +169,33 @@ TEST_F(PointerEventManagerTest, PointerCancelsOfAllTypes) {
ASSERT_EQ(callback->penEventCount(), 1);
}
+TEST_F(PointerEventManagerTest, PointerEventCoordinates) {
+ WebView().Resize(WebSize(400, 400));
+ SimRequest request("https://example.com/test.html", "text/html");
+ LoadURL("https://example.com/test.html");
+ request.Complete(
+ "<body style='padding: 0px; width: 400px; height: 400px;'>"
+ "</body>");
+ WebView().SetPageScaleFactor(2);
+ PointerEventCoordinateListenerCallback* callback =
+ PointerEventCoordinateListenerCallback::Create();
+ GetDocument().body()->addEventListener(EventTypeNames::pointerdown, callback);
+
+ WebView().HandleInputEvent(WebCoalescedInputEvent(
+ CreateTestPointerEvent(WebInputEvent::kPointerDown,
+ WebPointerProperties::PointerType::kTouch,
+ WebFloatPoint(150, 200), WebFloatPoint(100, 50),
+ 10, 10, 16, 24),
+ std::vector<WebPointerEvent>()));
+
+ ASSERT_EQ(callback->last_client_x_, 75);
+ ASSERT_EQ(callback->last_client_y_, 100);
+ ASSERT_EQ(callback->last_page_x_, 75);
+ ASSERT_EQ(callback->last_page_y_, 100);
+ ASSERT_EQ(callback->last_screen_x_, 100);
+ ASSERT_EQ(callback->last_screen_y_, 50);
+ ASSERT_EQ(callback->last_width_, 8);
+ ASSERT_EQ(callback->last_height_, 12);
+}
+
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/core/input/ScrollManager.cpp b/chromium/third_party/WebKit/Source/core/input/ScrollManager.cpp
index a843c09e359..da0e0b4c6be 100644
--- a/chromium/third_party/WebKit/Source/core/input/ScrollManager.cpp
+++ b/chromium/third_party/WebKit/Source/core/input/ScrollManager.cpp
@@ -159,12 +159,11 @@ bool ScrollManager::CanScroll(const ScrollState& scroll_state,
if (IsViewportScrollingElement(current_element) ||
current_element == *(frame_->GetDocument()->documentElement())) {
- if (!frame_->Tree().Parent() || frame_->Tree().Parent()->IsLocalFrame())
+ if (frame_->IsMainFrame())
return true;
- // For oopif the viewport is added to scroll chain only if it can actually
- // consume some delta hints.
- DCHECK(frame_->Tree().Parent()->IsRemoteFrame());
+ // For subframes, the viewport is added to the scroll chain only if it can
+ // actually consume some delta hints.
scrollable_area =
frame_->View() ? frame_->View()->GetScrollableArea() : nullptr;
}
@@ -338,8 +337,8 @@ WebInputEventResult ScrollManager::HandleGestureScrollBegin(
!scroll_gesture_handling_node_->GetLayoutObject())
return WebInputEventResult::kNotHandled;
- PassScrollGestureEvent(gesture_event,
- scroll_gesture_handling_node_->GetLayoutObject());
+ WebInputEventResult child_result = PassScrollGestureEvent(
+ gesture_event, scroll_gesture_handling_node_->GetLayoutObject());
RecordScrollRelatedMetrics(gesture_event.source_device);
@@ -360,8 +359,12 @@ WebInputEventResult ScrollManager::HandleGestureScrollBegin(
ScrollState* scroll_state = ScrollState::Create(std::move(scroll_state_data));
RecomputeScrollChain(*scroll_gesture_handling_node_.Get(), *scroll_state,
current_scroll_chain_);
- if (current_scroll_chain_.empty())
- return WebInputEventResult::kNotHandled;
+
+ if (current_scroll_chain_.empty()) {
+ // If a child has a non-empty scroll chain, we need to consider that instead
+ // of simply returning WebInputEventResult::kNotHandled.
+ return child_result;
+ }
CustomizedScroll(*scroll_state);
diff --git a/chromium/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp b/chromium/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp
index 3c8f7e8e553..3e445aebaf7 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/DevToolsEmulator.cpp
@@ -128,6 +128,9 @@ void DevToolsEmulator::SetDeviceScaleAdjustment(float device_scale_adjustment) {
}
void DevToolsEmulator::SetPreferCompositingToLCDTextEnabled(bool enabled) {
+ if (embedder_prefer_compositing_to_lcd_text_enabled_ == enabled)
+ return;
+
embedder_prefer_compositing_to_lcd_text_enabled_ = enabled;
bool emulate_mobile_enabled =
device_metrics_enabled_ && emulate_mobile_enabled_;
diff --git a/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp b/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
index 597c0bebd0c..332f3425468 100644
--- a/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
+++ b/chromium/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
@@ -116,6 +116,11 @@ size_t NetworkResourcesData::ResourceData::RemoveContent() {
result = content_.CharactersSizeInBytes();
content_ = String();
}
+
+ if (post_data_ && post_data_->SizeInBytes()) {
+ result += post_data_->SizeInBytes();
+ post_data_ = nullptr;
+ }
return result;
}
@@ -435,8 +440,7 @@ void NetworkResourcesData::EnsureNoDataForRequestId(const String& request_id) {
ResourceData* resource_data = ResourceDataForRequestId(request_id);
if (!resource_data)
return;
- if (resource_data->HasContent() || resource_data->HasData())
- content_size_ -= resource_data->EvictContent();
+ content_size_ -= resource_data->EvictContent();
request_id_to_resource_data_map_.erase(request_id);
}
diff --git a/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp b/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp
index c0fa4525a32..a46f033e960 100644
--- a/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp
+++ b/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp
@@ -89,7 +89,7 @@ LayoutUnit SnapToLinesLayouter::ComputeInitialPositionAdjustment(
if (IsFlippedBlocksWritingMode(writing_mode))
line_position = -(line_position + 1);
- // 9. Let position be the result of multiplying step and line.
+ // 9. Let position be the result of multiplying step and line offset.
LayoutUnit position = step * line_position;
// 10. Vertical Growing Left: Decrease position by the width of the
@@ -148,7 +148,7 @@ bool SnapToLinesLayouter::IsOverlapping() const {
bool SnapToLinesLayouter::ShouldSwitchDirection(InlineFlowBox* first_line_box,
LayoutUnit step,
LayoutUnit margin) const {
- // 16. Horizontal: If step is negative and the top of the first line box in
+ // 17. Horizontal: If step is negative and the top of the first line box in
// boxes is now above the top of the title area, or if step is positive and
// the bottom of the first line box in boxes is now below the bottom of the
// title area, jump to the step labeled switch direction.
@@ -167,7 +167,7 @@ bool SnapToLinesLayouter::ShouldSwitchDirection(InlineFlowBox* first_line_box,
}
void SnapToLinesLayouter::UpdateLayout() {
- // https://w3c.github.io/webvtt/#apply-webvtt-cue-settings
+ // http://dev.w3.org/html5/webvtt/#dfn-apply-webvtt-cue-settings
// Step 13, "If cue's text track cue snap-to-lines flag is set".
InlineFlowBox* first_line_box = FindFirstLineBox();
@@ -236,8 +236,11 @@ void SnapToLinesLayouter::UpdateLayout() {
// boxes in output, and all of the boxes in output are entirely within the
// title area box, then jump to the step labeled done positioning below.
while (IsOutside(title_area) || IsOverlapping()) {
+ // 16. Let current position score be the percentage of the area of the
+ // bounding box of the boxes in boxes that is outside the title area
+ // box.
if (!ShouldSwitchDirection(first_line_box, step, margin)) {
- // 17. Horizontal: Move all the boxes in boxes down by the distance
+ // 18. Horizontal: Move all the boxes in boxes down by the distance
// given by step. (If step is negative, then this will actually
// result in an upwards movement of the boxes in absolute terms.)
// Vertical: Move all the boxes in boxes right by the distance
@@ -245,11 +248,11 @@ void SnapToLinesLayouter::UpdateLayout() {
// result in a leftwards movement of the boxes in absolute terms.)
MoveBoxesBy(step);
- // 18. Jump back to the step labeled step loop.
+ // 19. Jump back to the step labeled step loop.
continue;
}
- // 19. Switch direction: If switched is true, then remove all the boxes
+ // 20. Switch direction: If switched is true, then remove all the boxes
// in boxes, and jump to the step labeled done positioning below.
if (switched) {
// This does not "remove" the boxes, but rather just pushes them
@@ -259,68 +262,54 @@ void SnapToLinesLayouter::UpdateLayout() {
break;
}
- // 20. Otherwise, move all the boxes in boxes back to their specified
+ // 21. Otherwise, move all the boxes in boxes back to their specified
// position as determined in the earlier step.
cue_box_.SetLocation(specified_position_);
- // 21. Negate step.
+ // 22. Negate step.
step = -step;
- // 22. Set switched to true.
+ // 23. Set switched to true.
switched = true;
- // 23. Jump back to the step labeled step loop.
+ // 24. Jump back to the step labeled step loop.
}
}
} // unnamed namespace
-LayoutVTTCue::LayoutVTTCue(ContainerNode* node,
- float snap_to_lines_position,
- int line_align)
- : LayoutBlockFlow(node),
- snap_to_lines_position_(snap_to_lines_position),
- line_align_(line_align) {}
+LayoutVTTCue::LayoutVTTCue(ContainerNode* node, float snap_to_lines_position)
+ : LayoutBlockFlow(node), snap_to_lines_position_(snap_to_lines_position) {}
void LayoutVTTCue::RepositionCueSnapToLinesNotSet() {
- // https://w3c.github.io/webvtt/#apply-webvtt-cue-settings
+ // FIXME: Implement overlapping detection when snap-to-lines is not set.
+ // http://wkb.ug/84296
+
+ // http://dev.w3.org/html5/webvtt/#dfn-apply-webvtt-cue-settings
// Step 13, "If cue's text track cue snap-to-lines flag is not set".
- if (line_align_) {
- // 1. Let bounding box be the bounding box of the boxes in boxes.
- LayoutRect bounding_box = ContentBoxRect();
-
- WritingMode writing_mode = StyleRef().GetWritingMode();
- LayoutUnit extent = blink::IsHorizontalWritingMode(writing_mode)
- ? bounding_box.Height()
- : bounding_box.Width();
- // 2. Run the appropriate steps from the following list:
- // If the text track cue writing direction is horizontal
- // If the text track cue line alignment is center alignment
- // Move all the boxes in boxes up by half of the height of
- // bounding box.
- // If the text track cue line alignment is end alignment
- // Move all the boxes in boxes up by the height of bounding box.
- //
- // If the text track cue writing direction is vertical growing left or
- // vertical growing right
- // If the text track cue line alignment is center alignment
- // Move all the boxes in boxes left by half of the width of
- // bounding box.
- // If the text track cue line alignment is end alignment
- // Move all the boxes in boxes left by the width of bounding box.
- LayoutUnit fraction(line_align_);
- fraction /= 100;
- SetLogicalTop(LogicalTop() - extent * fraction);
- }
+ // 1. Let bounding box be the bounding box of the boxes in boxes.
+
+ // 2. Run the appropriate steps from the following list:
+ // If the text track cue writing direction is horizontal
+ // If the text track cue line alignment is middle alignment
+ // Move all the boxes in boxes up by half of the height of
+ // bounding box.
+ // If the text track cue line alignment is end alignment
+ // Move all the boxes in boxes up by the height of bounding box.
+ //
+ // If the text track cue writing direction is vertical growing left or
+ // vertical growing right
+ // If the text track cue line alignment is middle alignment
+ // Move all the boxes in boxes left by half of the width of
+ // bounding box.
+ // If the text track cue line alignment is end alignment
+ // Move all the boxes in boxes left by the width of bounding box.
// 3. If none of the boxes in boxes would overlap any of the boxes in
// output, and all the boxes in output are within the video's rendering
// area, then jump to the step labeled done positioning below.
- // FIXME: Implement overlapping detection when snap-to-lines is not set.
- // http://wkb.ug/84296
-
// 4. If there is a position to which the boxes in boxes can be moved while
// maintaining the relative positions of the boxes in boxes to each other
// such that none of the boxes in boxes would overlap any of the boxes in
@@ -376,7 +365,7 @@ void LayoutVTTCue::UpdateLayout() {
LayoutState state(*this);
- // https://w3c.github.io/webvtt/#apply-webvtt-cue-settings - step 13.
+ // http://dev.w3.org/html5/webvtt/#dfn-apply-webvtt-cue-settings - step 13.
if (!std::isnan(snap_to_lines_position_))
SnapToLinesLayouter(*this, ComputeControlsRect()).UpdateLayout();
else
diff --git a/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.h b/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.h
index 489da0dc5ab..59b71e3901f 100644
--- a/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.h
+++ b/chromium/third_party/WebKit/Source/core/layout/LayoutVTTCue.h
@@ -34,7 +34,7 @@ class IntRect;
class LayoutVTTCue final : public LayoutBlockFlow {
public:
- LayoutVTTCue(ContainerNode*, float snap_to_lines_position, int line_align);
+ LayoutVTTCue(ContainerNode*, float snap_to_lines_position);
// The computed line position for snap-to-lines layout, and NaN for
// non-snap-to-lines layout where no adjustment should take place.
@@ -47,7 +47,6 @@ class LayoutVTTCue final : public LayoutBlockFlow {
void RepositionCueSnapToLinesNotSet();
float snap_to_lines_position_;
- int line_align_;
};
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp b/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
index ffc8c6cdf4e..39a0bd5e489 100644
--- a/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
@@ -1032,4 +1032,31 @@ TEST_F(TextAutosizerTest, ClusterHasEnoughTextToAutosizeForZoomDSF) {
EXPECT_FLOAT_EQ(20.0f * device_scale,
target->GetLayoutObject()->Style()->ComputedFontSize());
}
+
+TEST_F(TextAutosizerTest, AfterPrint) {
+ const float device_scale = 3;
+ FloatSize print_size(160, 240);
+ set_device_scale_factor(device_scale);
+ SetBodyInnerHTML(R"HTML(
+ <style>
+ html { font-size: 8px; }
+ </style>
+ <body>
+ <div id='target'>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
+ do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+ </div>
+ </body>
+ )HTML");
+ Element* target = GetDocument().getElementById("target");
+ EXPECT_FLOAT_EQ(20.0f * device_scale,
+ target->GetLayoutObject()->Style()->ComputedFontSize());
+ GetDocument().GetFrame()->SetPrinting(true, print_size, print_size, 1.0);
+ EXPECT_FLOAT_EQ(8.0f, target->GetLayoutObject()->Style()->ComputedFontSize());
+ GetDocument().GetFrame()->SetPrinting(false, print_size, print_size, 1.0);
+ EXPECT_FLOAT_EQ(20.0f * device_scale,
+ target->GetLayoutObject()->Style()->ComputedFontSize());
+}
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.cpp b/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.cpp
index 709e85f70ec..d4bbad11516 100644
--- a/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.cpp
@@ -10,6 +10,7 @@
#include "platform/instrumentation/tracing/TraceEvent.h"
#include "platform/loader/fetch/ResourceFetcher.h"
#include "platform/wtf/Time.h"
+#include "public/platform/WebInputEvent.h"
namespace blink {
@@ -19,9 +20,6 @@ InteractiveDetector* InteractiveDetector::From(Document& document) {
InteractiveDetector* detector = static_cast<InteractiveDetector*>(
Supplement<Document>::From(document, kSupplementName));
if (!detector) {
- if (!document.IsInMainFrame()) {
- return nullptr;
- }
detector = new InteractiveDetector(document,
new NetworkActivityChecker(&document));
Supplement<Document>::ProvideTo(document, kSupplementName, detector);
@@ -29,6 +27,10 @@ InteractiveDetector* InteractiveDetector::From(Document& document) {
return detector;
}
+const char* InteractiveDetector::SupplementName() {
+ return "InteractiveDetector";
+}
+
InteractiveDetector::InteractiveDetector(
Document& document,
NetworkActivityChecker* network_activity_checker)
@@ -47,6 +49,11 @@ void InteractiveDetector::SetNavigationStartTime(double navigation_start_time) {
// Should not set nav start twice.
DCHECK(page_event_times_.nav_start == 0.0);
+ // Don't record TTI for OOPIFs (yet).
+ // TODO(crbug.com/808086): enable this case.
+ if (!GetSupplementable()->IsInMainFrame())
+ return;
+
LongTaskDetector::Instance().RegisterObserver(this);
page_event_times_.nav_start = navigation_start_time;
double initial_timer_fire_time =
@@ -111,6 +118,68 @@ double InteractiveDetector::GetFirstInvalidatingInputTime() const {
return page_event_times_.first_invalidating_input;
}
+double InteractiveDetector::GetFirstInputDelay() const {
+ return page_event_times_.first_input_delay;
+}
+
+double InteractiveDetector::GetFirstInputTimestamp() const {
+ return page_event_times_.first_input_timestamp;
+}
+
+// This is called early enough in the pipeline that we don't need to worry about
+// javascript dispatching untrusted input events.
+void InteractiveDetector::HandleForFirstInputDelay(const WebInputEvent& event) {
+ if (page_event_times_.first_input_delay != 0)
+ return;
+
+ DCHECK(event.GetType() != WebInputEvent::kTouchStart);
+
+ // We can't report a pointerDown until the pointerUp, in case it turns into a
+ // scroll.
+ if (event.GetType() == WebInputEvent::kPointerDown) {
+ pending_pointerdown_delay_ =
+ CurrentTimeTicksInSeconds() - event.TimeStampSeconds();
+ pending_pointerdown_timestamp_ =
+ event.TimeStampSeconds();
+ return;
+ }
+
+ bool event_is_meaningful =
+ event.GetType() == WebInputEvent::kMouseDown ||
+ event.GetType() == WebInputEvent::kKeyDown ||
+ event.GetType() == WebInputEvent::kRawKeyDown ||
+ // We need to explicitly include tap, as if there are no listeners, we
+ // won't receive the pointer events.
+ event.GetType() == WebInputEvent::kGestureTap ||
+ event.GetType() == WebInputEvent::kPointerUp;
+
+ if (!event_is_meaningful)
+ return;
+
+ double delay;
+ double event_timestamp;
+ if (event.GetType() == WebInputEvent::kPointerUp) {
+ // It is possible that this pointer up doesn't match with the pointer down
+ // whose delay is stored in pending_pointerdown_delay_. In this case, the
+ // user gesture started by this event contained some non-scroll input, so we
+ // consider it reasonable to use the delay of the initial event.
+ delay = pending_pointerdown_delay_;
+ event_timestamp = pending_pointerdown_timestamp_;
+ } else {
+ delay = CurrentTimeTicksInSeconds() - event.TimeStampSeconds();
+ event_timestamp = event.TimeStampSeconds();
+ }
+
+ pending_pointerdown_delay_ = 0;
+ pending_pointerdown_timestamp_ = 0;
+
+ page_event_times_.first_input_delay = delay;
+ page_event_times_.first_input_timestamp = event_timestamp;
+
+ if (GetSupplementable()->Loader())
+ GetSupplementable()->Loader()->DidChangePerformanceTiming();
+}
+
void InteractiveDetector::BeginNetworkQuietPeriod(double current_time) {
// Value of 0.0 indicates there is no currently actively network quiet window.
DCHECK(active_network_quiet_window_start_ == 0.0);
@@ -222,6 +291,15 @@ void InteractiveDetector::OnInvalidatingInputEvent(double timestamp_seconds) {
GetSupplementable()->Loader()->DidChangePerformanceTiming();
}
+void InteractiveDetector::OnFirstInputDelay(double delay) {
+ if (page_event_times_.first_input_delay != 0)
+ return;
+
+ page_event_times_.first_input_delay = delay;
+ if (GetSupplementable()->Loader())
+ GetSupplementable()->Loader()->DidChangePerformanceTiming();
+}
+
void InteractiveDetector::TimeToInteractiveTimerFired(TimerBase*) {
if (!GetSupplementable() || interactive_time_ != 0.0)
return;
diff --git a/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.h b/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.h
index e08bad8c9b4..d1999f1a476 100644
--- a/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.h
+++ b/chromium/third_party/WebKit/Source/core/loader/InteractiveDetector.h
@@ -18,6 +18,7 @@
namespace blink {
class Document;
+class WebInputEvent;
// Detects when a page reaches First Idle and Time to Interactive. See
// https://goo.gl/SYt55W for detailed description and motivation of First Idle
@@ -47,6 +48,9 @@ class CORE_EXPORT InteractiveDetector
};
static InteractiveDetector* From(Document&);
+ // Exposed for tests. See crbug.com/810381. We must use a consistent address
+ // for the supplement name.
+ static const char* SupplementName();
virtual ~InteractiveDetector();
// Calls to CurrentTimeTicksInSeconds is expensive, so we try not to call it
@@ -61,6 +65,7 @@ class CORE_EXPORT InteractiveDetector
FirstMeaningfulPaintDetector::HadUserInput user_input_before_fmp);
void OnDomContentLoadedEnd(double dcl_time);
void OnInvalidatingInputEvent(double timestamp_seconds);
+ void OnFirstInputDelay(double delay_seconds);
// Returns Interactive Time if already detected, or 0.0 otherwise.
double GetInteractiveTime() const;
@@ -74,6 +79,18 @@ class CORE_EXPORT InteractiveDetector
// that may cause observers to discard the interactive time value.
double GetFirstInvalidatingInputTime() const;
+ // The duration between the hardware timestamp and being queued on the main
+ // thread for the first click, tap, key press, cancelable touchstart, or
+ // pointer down followed by a pointer up.
+ double GetFirstInputDelay() const;
+
+ // The timestamp of the event whose delay is reported by GetFirstInputDelay().
+ double GetFirstInputTimestamp() const;
+
+ // Process an input event, updating first_input_delay and
+ // first_input_timestamp if needed.
+ void HandleForFirstInputDelay(const WebInputEvent&);
+
virtual void Trace(Visitor*);
private:
@@ -99,6 +116,8 @@ class CORE_EXPORT InteractiveDetector
double nav_start = 0.0;
double first_invalidating_input = 0.0;
bool first_meaningful_paint_invalidated = false;
+ double first_input_delay = 0.0;
+ double first_input_timestamp = 0.0;
} page_event_times_;
// Stores sufficiently long quiet windows on main thread and network.
@@ -143,6 +162,15 @@ class CORE_EXPORT InteractiveDetector
// LongTaskObserver implementation
void OnLongTaskDetected(double start_time, double end_time) override;
+ // The duration between the hardware timestamp and when we received the event
+ // for the previous pointer down. Only non-zero if we've received a pointer
+ // down event, and haven't yet reported the first input delay.
+ double pending_pointerdown_delay_;
+
+ // The timestamp of a pending pointerdown event. Valid in the same cases as
+ // pending_pointerdown_delay_.
+ double pending_pointerdown_timestamp_;
+
DISALLOW_COPY_AND_ASSIGN(InteractiveDetector);
};
diff --git a/chromium/third_party/WebKit/Source/core/loader/InteractiveDetectorTest.cpp b/chromium/third_party/WebKit/Source/core/loader/InteractiveDetectorTest.cpp
index 90aa727a8b1..8ccffd319c5 100644
--- a/chromium/third_party/WebKit/Source/core/loader/InteractiveDetectorTest.cpp
+++ b/chromium/third_party/WebKit/Source/core/loader/InteractiveDetectorTest.cpp
@@ -6,6 +6,7 @@
#include "core/dom/Document.h"
#include "core/paint/FirstMeaningfulPaintDetector.h"
+#include "core/testing/DummyPageHolder.h"
#include "core/testing/PageTestBase.h"
#include "platform/CrossThreadFunctional.h"
#include "platform/scheduler/renderer/renderer_scheduler_impl.h"
@@ -39,24 +40,38 @@ struct TaskTiming {
TaskTiming(double start, double end) : start(start), end(end) {}
};
-static constexpr char kSupplementName[] = "InteractiveDetector";
-
class InteractiveDetectorTest : public ::testing::Test {
public:
- InteractiveDetectorTest() : document_(Document::CreateForTest()) {
- InteractiveDetector* detector = new InteractiveDetector(
- *document_, new NetworkActivityCheckerForTest(document_));
- Supplement<Document>::ProvideTo(*document_, kSupplementName, detector);
- detector_ = detector;
- }
+ InteractiveDetectorTest() {
+ platform_->AdvanceClockSeconds(1);
+ dummy_page_holder_ = DummyPageHolder::Create();
- protected:
- void SetUp() override { platform_->AdvanceClockSeconds(1); }
+ Document* document = &dummy_page_holder_->GetDocument();
+
+ detector_ = new InteractiveDetector(
+ *document, new NetworkActivityCheckerForTest(document));
- Document* GetDocument() { return document_; }
+ // By this time, the DummyPageHolder has created an InteractiveDetector, and
+ // sent DOMContentLoadedEnd. We overwrite it with our new
+ // InteractiveDetector, which won't have received any timestamps.
+ Supplement<Document>::ProvideTo(
+ *document, InteractiveDetector::SupplementName(), detector_.Get());
+ // Ensure the document is using the injected InteractiveDetector.
+ DCHECK_EQ(detector_, InteractiveDetector::From(*document));
+ }
+
+ // Public because it's executed on a task queue.
+ void DummyTaskWithDuration(double duration_seconds) {
+ platform_->AdvanceClockSeconds(duration_seconds);
+ dummy_task_end_time_ = CurrentTimeTicksInSeconds();
+ }
+
+ protected:
InteractiveDetector* GetDetector() { return detector_; }
+ double GetDummyTaskEndTime() { return dummy_task_end_time_; }
+
NetworkActivityCheckerForTest* GetNetworkActivityChecker() {
// We know in this test context that network_activity_checker_ is an
// instance of NetworkActivityCheckerForTest, so this static_cast is safe.
@@ -120,12 +135,13 @@ class InteractiveDetectorTest : public ::testing::Test {
double GetInteractiveTime() { return detector_->GetInteractiveTime(); }
- protected:
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform_;
- Persistent<Document> document_;
+ private:
Persistent<InteractiveDetector> detector_;
+ std::unique_ptr<DummyPageHolder> dummy_page_holder_;
+ double dummy_task_end_time_ = 0.0;
};
// Note: The tests currently assume kTimeToInteractiveWindowSeconds is 5
@@ -416,91 +432,57 @@ TEST_F(InteractiveDetectorTest, InvalidatedFMP) {
EXPECT_EQ(GetDetector()->GetFirstInvalidatingInputTime(), t0 + 1.0);
}
-class InteractiveDetectorTestWithDummyPage : public PageTestBase {
- public:
- // Public because it's executed on a task queue.
- void DummyTaskWithDuration(double duration_seconds) {
- platform_->AdvanceClockSeconds(duration_seconds);
- dummy_task_end_time_ = CurrentTimeTicksInSeconds();
- }
-
- protected:
- void SetUp() override {
- platform_->AdvanceClockSeconds(1);
- PageTestBase::SetUp();
- }
-
- double GetDummyTaskEndTime() { return dummy_task_end_time_; }
-
- ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
- platform_;
-
- private:
- double dummy_task_end_time_ = 0.0;
-};
-
-TEST_F(InteractiveDetectorTestWithDummyPage, TaskLongerThan5sBlocksTTI) {
+TEST_F(InteractiveDetectorTest, TaskLongerThan5sBlocksTTI) {
double t0 = CurrentTimeTicksInSeconds();
- InteractiveDetector* detector = InteractiveDetector::From(GetDocument());
- detector->SetNavigationStartTime(t0);
- platform_->RunForPeriodSeconds(4.0);
+ GetDetector()->SetNavigationStartTime(t0);
- // DummyPageHolder automatically fires DomContentLoadedEnd, but not First
- // Meaningful Paint. We therefore manually Invoking the listener on
- // InteractiveDetector.
- detector->OnFirstMeaningfulPaintDetected(
- t0 + 3.0, FirstMeaningfulPaintDetector::kNoUserInput);
+ SimulateDOMContentLoadedEnd(t0 + 2.0);
+ SimulateFMPDetected(t0 + 3.0, t0 + 4.0);
// Post a task with 6 seconds duration.
PostCrossThreadTask(
*platform_->CurrentThread()->GetWebTaskRunner(), FROM_HERE,
- CrossThreadBind(
- &InteractiveDetectorTestWithDummyPage::DummyTaskWithDuration,
- CrossThreadUnretained(this), 6.0));
+ CrossThreadBind(&InteractiveDetectorTest::DummyTaskWithDuration,
+ CrossThreadUnretained(this), 6.0));
+
platform_->RunUntilIdle();
// We should be able to detect TTI 5s after the end of long task.
platform_->RunForPeriodSeconds(5.1);
- EXPECT_EQ(detector->GetInteractiveTime(), GetDummyTaskEndTime());
+ EXPECT_EQ(GetDetector()->GetInteractiveTime(), GetDummyTaskEndTime());
}
-TEST_F(InteractiveDetectorTestWithDummyPage, LongTaskAfterTTIDoesNothing) {
+TEST_F(InteractiveDetectorTest, LongTaskAfterTTIDoesNothing) {
double t0 = CurrentTimeTicksInSeconds();
- InteractiveDetector* detector = InteractiveDetector::From(GetDocument());
- detector->SetNavigationStartTime(t0);
- platform_->RunForPeriodSeconds(4.0);
+ GetDetector()->SetNavigationStartTime(t0);
- // DummyPageHolder automatically fires DomContentLoadedEnd, but not First
- // Meaningful Paint. We therefore manually Invoking the listener on
- // InteractiveDetector.
- detector->OnFirstMeaningfulPaintDetected(
- t0 + 3.0, FirstMeaningfulPaintDetector::kNoUserInput);
+ SimulateDOMContentLoadedEnd(2.0);
+ SimulateFMPDetected(t0 + 3.0, t0 + 4.0);
// Long task 1.
PostCrossThreadTask(
*platform_->CurrentThread()->GetWebTaskRunner(), FROM_HERE,
- CrossThreadBind(
- &InteractiveDetectorTestWithDummyPage::DummyTaskWithDuration,
- CrossThreadUnretained(this), 0.1));
+ CrossThreadBind(&InteractiveDetectorTest::DummyTaskWithDuration,
+ CrossThreadUnretained(this), 0.1));
+
platform_->RunUntilIdle();
double long_task_1_end_time = GetDummyTaskEndTime();
// We should be able to detect TTI 5s after the end of long task.
platform_->RunForPeriodSeconds(5.1);
- EXPECT_EQ(detector->GetInteractiveTime(), long_task_1_end_time);
+ EXPECT_EQ(GetDetector()->GetInteractiveTime(), long_task_1_end_time);
// Long task 2.
PostCrossThreadTask(
*platform_->CurrentThread()->GetWebTaskRunner(), FROM_HERE,
- CrossThreadBind(
- &InteractiveDetectorTestWithDummyPage::DummyTaskWithDuration,
- CrossThreadUnretained(this), 0.1));
+ CrossThreadBind(&InteractiveDetectorTest::DummyTaskWithDuration,
+ CrossThreadUnretained(this), 0.1));
platform_->RunUntilIdle();
// Wait 5 seconds to see if TTI time changes.
platform_->RunForPeriodSeconds(5.1);
// TTI time should not change.
- EXPECT_EQ(detector->GetInteractiveTime(), long_task_1_end_time);
+ EXPECT_EQ(GetDetector()->GetInteractiveTime(), long_task_1_end_time);
}
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/core/messaging/BlinkCloneableMessageStructTraits.cpp b/chromium/third_party/WebKit/Source/core/messaging/BlinkCloneableMessageStructTraits.cpp
index a2e66e3ca3b..3744accc451 100644
--- a/chromium/third_party/WebKit/Source/core/messaging/BlinkCloneableMessageStructTraits.cpp
+++ b/chromium/third_party/WebKit/Source/core/messaging/BlinkCloneableMessageStructTraits.cpp
@@ -15,8 +15,9 @@ Vector<blink::mojom::blink::SerializedBlobPtr> StructTraits<
result.ReserveInitialCapacity(input.message->BlobDataHandles().size());
for (const auto& blob : input.message->BlobDataHandles()) {
result.push_back(blink::mojom::blink::SerializedBlob::New(
- blob.value->Uuid(), blob.value->GetType(), blob.value->size(),
- blob.value->CloneBlobPtr().PassInterface()));
+ blob.value->Uuid(),
+ blob.value->GetType().IsNull() ? g_empty_string : blob.value->GetType(),
+ blob.value->size(), blob.value->CloneBlobPtr().PassInterface()));
}
return result;
}
diff --git a/chromium/third_party/WebKit/Source/core/page/FrameTree.cpp b/chromium/third_party/WebKit/Source/core/page/FrameTree.cpp
index 348ac7c4846..d95a45adb0a 100644
--- a/chromium/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -139,6 +139,9 @@ Frame* FrameTree::ScopedChild(unsigned index) const {
}
Frame* FrameTree::ScopedChild(const AtomicString& name) const {
+ if (name.IsEmpty())
+ return nullptr;
+
for (Frame* child = FirstChild(); child;
child = child->Tree().NextSibling()) {
if (child->Client()->InShadowTree())
diff --git a/chromium/third_party/WebKit/Source/core/page/FrameTree.h b/chromium/third_party/WebKit/Source/core/page/FrameTree.h
index db84875b771..26d9adf6ded 100644
--- a/chromium/third_party/WebKit/Source/core/page/FrameTree.h
+++ b/chromium/third_party/WebKit/Source/core/page/FrameTree.h
@@ -62,6 +62,11 @@ class CORE_EXPORT FrameTree final {
unsigned ChildCount() const;
Frame* ScopedChild(unsigned index) const;
+ // https://whatwg.org/C/window-object.html#named-access-on-the-window-object
+ // This implements the steps needed for looking up a child browsing context
+ // that matches |name|. If |name.IsEmpty()| is true, this is guaranteed to
+ // return null: the spec specifically states that browsing contexts with a
+ // name are never considered.
Frame* ScopedChild(const AtomicString& name) const;
unsigned ScopedChildCount() const;
void InvalidateScopedChildCount();
diff --git a/chromium/third_party/WebKit/Source/core/page/PageWidgetDelegate.cpp b/chromium/third_party/WebKit/Source/core/page/PageWidgetDelegate.cpp
index 02ffcb67e51..0147c97a867 100644
--- a/chromium/third_party/WebKit/Source/core/page/PageWidgetDelegate.cpp
+++ b/chromium/third_party/WebKit/Source/core/page/PageWidgetDelegate.cpp
@@ -33,8 +33,11 @@
#include "core/dom/AXObjectCache.h"
#include "core/events/WebInputEventConversion.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/LocalFrameClient.h"
#include "core/frame/LocalFrameView.h"
#include "core/input/EventHandler.h"
+#include "core/layout/LayoutView.h"
+#include "core/loader/InteractiveDetector.h"
#include "core/page/AutoscrollController.h"
#include "core/page/Page.h"
#include "core/paint/TransformRecorder.h"
@@ -127,6 +130,19 @@ WebInputEventResult PageWidgetDelegate::HandleInputEvent(
const WebCoalescedInputEvent& coalesced_event,
LocalFrame* root) {
const WebInputEvent& event = coalesced_event.Event();
+ if (root) {
+ Document* document = root->GetDocument();
+ DCHECK(document);
+
+ InteractiveDetector* interactive_detector(
+ InteractiveDetector::From(*document));
+
+ // interactive_detector is null in the OOPIF case.
+ // TODO(crbug.com/808089): report across OOPIFs.
+ if (interactive_detector)
+ interactive_detector->HandleForFirstInputDelay(event);
+ }
+
if (event.GetModifiers() & WebInputEvent::kIsTouchAccessibility &&
WebInputEvent::IsMouseEventType(event.GetType())) {
WebMouseEvent mouse_event = TransformWebMouseEvent(
diff --git a/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.cpp b/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.cpp
index 6192f700cc1..21edad43395 100644
--- a/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.cpp
+++ b/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.cpp
@@ -63,6 +63,10 @@ void ResizeObserver::unobserve(Element* target) {
auto observation = observer_map->find(this);
if (observation != observer_map->end()) {
observations_.erase((*observation).value);
+ auto index = active_observations_.Find((*observation).value);
+ if (index != kNotFound) {
+ active_observations_.EraseAt(index);
+ }
observer_map->erase(observation);
}
}
@@ -103,7 +107,7 @@ void ResizeObserver::DeliverObservations() {
// We can only clear this flag after all observations have been
// broadcast.
element_size_changed_ = skipped_observations_;
- if (active_observations_.size() == 0)
+ if (active_observations_.IsEmpty())
return;
HeapVector<Member<ResizeObserverEntry>> entries;
diff --git a/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.h b/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.h
index 5b81677db07..601eb0221e3 100644
--- a/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.h
+++ b/chromium/third_party/WebKit/Source/core/resize_observer/ResizeObserver.h
@@ -65,7 +65,9 @@ class CORE_EXPORT ResizeObserver final : public ScriptWrappable {
const TraceWrapperMember<V8ResizeObserverCallback> callback_;
const Member<Delegate> delegate_;
- // List of elements we are observing
+ // List of Elements we are observing. These Elements make the ResizeObserver
+ // and most-importantly |callback_| alive. If |observations_| is empty, no one
+ // is performing wrapper-tracing and |callback_| might already be gone.
ObservationList observations_;
// List of elements that have changes
HeapVector<Member<ResizeObservation>> active_observations_;
diff --git a/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp b/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp
index 1a7b08faaa2..9da771a09c5 100644
--- a/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp
+++ b/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp
@@ -378,6 +378,23 @@ unsigned long long PerformanceTiming::FirstInputInvalidatingInteractive()
interactive_detector->GetFirstInvalidatingInputTime());
}
+unsigned long long PerformanceTiming::FirstInputDelay() const {
+ const InteractiveDetector* interactive_detector = GetInteractiveDetector();
+ if (!interactive_detector)
+ return 0;
+
+ return ToIntegerMilliseconds(interactive_detector->GetFirstInputDelay());
+}
+
+unsigned long long PerformanceTiming::FirstInputTimestamp() const {
+ const InteractiveDetector* interactive_detector = GetInteractiveDetector();
+ if (!interactive_detector)
+ return 0;
+
+ return MonotonicTimeToIntegerMilliseconds(
+ interactive_detector->GetFirstInputTimestamp());
+}
+
unsigned long long PerformanceTiming::ParseStart() const {
const DocumentParserTiming* timing = GetDocumentParserTiming();
if (!timing)
diff --git a/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.h b/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.h
index 5cee50a443e..e8f7859c187 100644
--- a/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.h
+++ b/chromium/third_party/WebKit/Source/core/timing/PerformanceTiming.h
@@ -108,6 +108,12 @@ class CORE_EXPORT PerformanceTiming final : public ScriptWrappable,
// The time of when a significant input event happened that may cause
// observers to discard the value of Time to Interactive.
unsigned long long FirstInputInvalidatingInteractive() const;
+ // The duration between the hardware timestamp and being queued on the main
+ // thread for the first click, tap, key press, cancellable touchstart, or
+ // pointer down followed by a pointer up.
+ unsigned long long FirstInputDelay() const;
+ // The timestamp of the event whose delay is reported by FirstInputDelay().
+ unsigned long long FirstInputTimestamp() const;
unsigned long long ParseStart() const;
unsigned long long ParseStop() const;
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js b/chromium/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
index 3da66a61d07..48d55a7063e 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js
@@ -1278,7 +1278,8 @@ ObjectUI.ArrayGroupingTreeElement._getOwnPropertyNamesThreshold = 500000;
ObjectUI.ObjectPropertyPrompt = class extends UI.TextPrompt {
constructor() {
super();
- this.initialize(ObjectUI.javaScriptAutocomplete.completionsForTextInCurrentContext);
+ this.initialize(
+ ObjectUI.javaScriptAutocomplete.completionsForTextInCurrentContext.bind(ObjectUI.javaScriptAutocomplete));
}
};
diff --git a/chromium/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/chromium/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
index c773e8302f5..32ff43c07f7 100644
--- a/chromium/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/chromium/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -49,7 +49,7 @@ UI.TextPrompt = class extends Common.Object {
}
/**
- * @param {(function(string, string, boolean=):!Promise<!UI.SuggestBox.Suggestions>)} completions
+ * @param {(function(this:null, string, string, boolean=):!Promise<!UI.SuggestBox.Suggestions>)} completions
* @param {string=} stopCharacters
*/
initialize(completions, stopCharacters) {
diff --git a/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 7e61c98b911..8520a2714f1 100644
--- a/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -691,7 +691,7 @@ bool AXObject::IsClickable() const {
}
}
-bool AXObject::AccessibilityIsIgnored() {
+bool AXObject::AccessibilityIsIgnored() const {
Node* node = GetNode();
if (!node) {
AXObject* parent = this->ParentObject();
@@ -740,6 +740,13 @@ void AXObject::UpdateCachedAttributeValuesIfNeeded() const {
: nullptr);
cached_ancestor_exposes_active_descendant_ =
ComputeAncestorExposesActiveDescendant();
+
+ // TODO(dmazzoni): remove this const_cast.
+ if (cached_is_ignored_ != LastKnownIsIgnoredValue()) {
+ const_cast<AXObject*>(this)->ChildrenChanged();
+ last_known_is_ignored_value_ =
+ cached_is_ignored_ ? kIgnoreObject : kIncludeObject;
+ }
}
bool AXObject::AccessibilityIsIgnoredByDefault(
@@ -973,7 +980,7 @@ const AXObject* AXObject::DisabledAncestor() const {
return nullptr;
}
-bool AXObject::LastKnownIsIgnoredValue() {
+bool AXObject::LastKnownIsIgnoredValue() const {
if (last_known_is_ignored_value_ == kDefaultBehavior) {
last_known_is_ignored_value_ =
AccessibilityIsIgnored() ? kIgnoreObject : kIncludeObject;
diff --git a/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.h b/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.h
index b381d9f2033..3c58631128b 100644
--- a/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.h
+++ b/chromium/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -387,7 +387,7 @@ class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> {
virtual bool CanSetSelectedAttribute() const;
// Whether objects are ignored, i.e. not included in the tree.
- bool AccessibilityIsIgnored();
+ bool AccessibilityIsIgnored() const;
typedef HeapVector<IgnoredReason> IgnoredReasons;
virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const {
return true;
@@ -403,7 +403,7 @@ class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> {
AXObject* LeafNodeAncestor() const;
bool IsDescendantOfDisabledNode() const;
const AXObject* DisabledAncestor() const;
- bool LastKnownIsIgnoredValue();
+ bool LastKnownIsIgnoredValue() const;
void SetLastKnownIsIgnoredValue(bool);
bool HasInheritedPresentationalRole() const;
bool IsPresentationalChild() const;
@@ -766,7 +766,7 @@ class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> {
mutable bool have_children_;
AccessibilityRole role_;
AccessibilityRole aria_role_;
- AXObjectInclusion last_known_is_ignored_value_;
+ mutable AXObjectInclusion last_known_is_ignored_value_;
LayoutRect explicit_element_rect_;
AXID explicit_container_id_;
diff --git a/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialManagerTypeConverters.cpp b/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialManagerTypeConverters.cpp
index 0f6d75dd341..114ca88abc8 100644
--- a/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialManagerTypeConverters.cpp
+++ b/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialManagerTypeConverters.cpp
@@ -22,8 +22,8 @@
namespace {
// Time to wait for an authenticator to successfully complete an operation.
-constexpr TimeDelta kAdjustedTimeoutLower = TimeDelta::FromMinutes(1);
-constexpr TimeDelta kAdjustedTimeoutUpper = TimeDelta::FromMinutes(2);
+constexpr TimeDelta kAdjustedTimeoutLower = TimeDelta::FromSeconds(1);
+constexpr TimeDelta kAdjustedTimeoutUpper = TimeDelta::FromMinutes(1);
WTF::TimeDelta AdjustTimeout(uint32_t timeout) {
WTF::TimeDelta adjusted_timeout;
@@ -249,7 +249,7 @@ TypeConverter<MakePublicKeyCredentialOptionsPtr,
if (options.hasTimeout()) {
mojo_options->adjusted_timeout = AdjustTimeout(options.timeout());
} else {
- mojo_options->adjusted_timeout = kAdjustedTimeoutLower;
+ mojo_options->adjusted_timeout = kAdjustedTimeoutUpper;
}
// Steps 8 and 9 of
@@ -294,7 +294,7 @@ TypeConverter<PublicKeyCredentialRequestOptionsPtr,
if (options.hasTimeout()) {
mojo_options->adjusted_timeout = AdjustTimeout(options.timeout());
} else {
- mojo_options->adjusted_timeout = kAdjustedTimeoutLower;
+ mojo_options->adjusted_timeout = kAdjustedTimeoutUpper;
}
mojo_options->relying_party_id = options.rpId();
diff --git a/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp b/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
index 0c36b746337..e418e1c5704 100644
--- a/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
+++ b/chromium/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
@@ -69,7 +69,7 @@ class ScopedPromiseResolver {
}
// Releases the owned |resolver_|. This is to be called by the Mojo response
- // callback responsible for resolving the corresponding ScriptPromise.
+ // callback responsible for resolving the corresponding ScriptPromise
//
// If this method is not called before |this| goes of scope, it is assumed
// that a Mojo connection error has occurred, and the response callback was
@@ -391,9 +391,19 @@ ScriptPromise CredentialsContainer::get(
return promise;
if (options.hasPublicKey()) {
+ const String& relying_party_id = options.publicKey().rpId();
+ if (!CheckPublicKeySecurityRequirements(resolver, relying_party_id))
+ return promise;
+
auto mojo_options =
MojoPublicKeyCredentialRequestOptions::From(options.publicKey());
if (mojo_options) {
+ if (!mojo_options->relying_party_id) {
+ mojo_options->relying_party_id = resolver->GetFrame()
+ ->GetSecurityContext()
+ ->GetSecurityOrigin()
+ ->Domain();
+ }
auto* authenticator =
CredentialManagerProxy::From(script_state)->Authenticator();
authenticator->GetAssertion(
@@ -515,9 +525,9 @@ ScriptPromise CredentialsContainer::create(
} else {
DCHECK(options.hasPublicKey());
const String& relying_party_id = options.publicKey().rp().id();
- if (!CheckPublicKeySecurityRequirements(resolver, relying_party_id)) {
+ if (!CheckPublicKeySecurityRequirements(resolver, relying_party_id))
return promise;
- }
+
auto mojo_options =
MojoMakePublicKeyCredentialOptions::From(options.publicKey());
if (mojo_options) {
diff --git a/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp b/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
index 5182c15a363..ac9f8539672 100644
--- a/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
+++ b/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
@@ -207,6 +207,9 @@ void DOMFileSystem::CreateFile(const FileEntry* file_entry,
void DOMFileSystem::ScheduleCallback(ExecutionContext* execution_context,
base::OnceClosure task) {
+ if (!execution_context)
+ return;
+
DCHECK(execution_context->IsContextThread());
std::unique_ptr<int> identifier = std::make_unique<int>(0);
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/BUILD.gn b/chromium/third_party/WebKit/Source/modules/webgl/BUILD.gn
index 004b1068863..eaeaa1fb72d 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/BUILD.gn
+++ b/chromium/third_party/WebKit/Source/modules/webgl/BUILD.gn
@@ -135,4 +135,8 @@ blink_modules_sources("webgl") {
# the implementation depends on a fair chunk of core/ --
# include the core pch for faster Windows compilation times.
configs += [ "//third_party/WebKit/Source/core:blink_core_pch" ]
+
+ deps = [
+ "//gpu/config",
+ ]
}
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/DEPS b/chromium/third_party/WebKit/Source/modules/webgl/DEPS
index 3058c13266c..a1d284bb9c1 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/DEPS
+++ b/chromium/third_party/WebKit/Source/modules/webgl/DEPS
@@ -1,5 +1,6 @@
include_rules = [
"+gpu/GLES2/gl2extchromium.h",
"+gpu/command_buffer/client/gles2_interface.h",
+ "+gpu/config/gpu_feature_info.h",
"+skia/ext",
]
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 8879e51fa70..67c61dc7c4b 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -38,10 +38,6 @@ namespace {
const GLuint64 kMaxClientWaitTimeout = 0u;
-GLsync SyncObjectOrZero(const WebGLSync* object) {
- return object ? object->Object() : nullptr;
-}
-
// TODO(kainino): Change outByteLength to GLuint and change the associated
// range checking (and all uses) - overflow becomes possible in cases below
bool ValidateSubSourceAndGetData(DOMArrayBufferView* view,
@@ -4165,7 +4161,25 @@ GLenum WebGL2RenderingContextBase::clientWaitSync(WebGLSync* sync,
return GL_WAIT_FAILED;
}
- return ContextGL()->ClientWaitSync(SyncObjectOrZero(sync), flags, timeout);
+ // clientWaitSync must poll for updates no more than once per
+ // requestAnimationFrame, so all validation, and the implementation,
+ // must be done inline.
+ if (!(flags == 0 || flags == GL_SYNC_FLUSH_COMMANDS_BIT)) {
+ SynthesizeGLError(GL_INVALID_VALUE, "clientWaitSync", "invalid flags");
+ return GL_WAIT_FAILED;
+ }
+
+ if (sync->IsSignaled()) {
+ return GL_ALREADY_SIGNALED;
+ }
+
+ sync->UpdateCache(ContextGL());
+
+ if (sync->IsSignaled()) {
+ return GL_CONDITION_SATISFIED;
+ }
+
+ return GL_TIMEOUT_EXPIRED;
}
void WebGL2RenderingContextBase::waitSync(WebGLSync* sync,
@@ -4199,10 +4213,8 @@ ScriptValue WebGL2RenderingContextBase::getSyncParameter(
case GL_SYNC_STATUS:
case GL_SYNC_CONDITION:
case GL_SYNC_FLAGS: {
- GLint value = 0;
- GLsizei length = -1;
- ContextGL()->GetSynciv(SyncObjectOrZero(sync), pname, 1, &length, &value);
- return WebGLAny(script_state, static_cast<unsigned>(value));
+ sync->UpdateCache(ContextGL());
+ return WebGLAny(script_state, sync->GetCachedResult(pname));
}
default:
SynthesizeGLError(GL_INVALID_ENUM, "getSyncParameter",
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h b/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
index 0691c23bab8..7257f62eafc 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
+++ b/chromium/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
@@ -981,6 +981,7 @@ class WebGL2RenderingContextBase : public WebGLRenderingContextBase {
protected:
friend class V8WebGL2RenderingContext;
friend class WebGLGetBufferSubDataAsync;
+ friend class WebGLSync;
WebGL2RenderingContextBase(
CanvasRenderingContextHost*,
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 53da727e447..0e138b3804c 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -50,6 +50,7 @@
#include "core/typed_arrays/DOMTypedArray.h"
#include "core/typed_arrays/FlexibleArrayBufferView.h"
#include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/config/gpu_feature_info.h"
#include "modules/webgl/ANGLEInstancedArrays.h"
#include "modules/webgl/EXTBlendMinMax.h"
#include "modules/webgl/EXTFragDepth.h"
@@ -1028,6 +1029,16 @@ WebGLRenderingContextBase::WebGLRenderingContextBase(
GetDrawingBuffer()->Bind(GL_FRAMEBUFFER);
SetupFlags();
+ String disabled_webgl_extensions(GetDrawingBuffer()
+ ->ContextProvider()
+ ->GetGpuFeatureInfo()
+ .disabled_webgl_extensions.c_str());
+ Vector<String> disabled_extension_list;
+ disabled_webgl_extensions.Split(' ', disabled_extension_list);
+ for (const auto& entry : disabled_extension_list) {
+ disabled_extensions_.insert(entry);
+ }
+
#define ADD_VALUES_TO_SET(set, values) \
for (size_t i = 0; i < WTF_ARRAY_LENGTH(values); ++i) { \
set.insert(values[i]); \
@@ -2806,6 +2817,8 @@ bool WebGLRenderingContextBase::ExtensionSupportedAndAllowed(
return false;
if (!tracker->Supported(this))
return false;
+ if (disabled_extensions_.Contains(String(tracker->ExtensionName())))
+ return false;
return true;
}
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index 15a2ccc26c3..a44eb4ef14b 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/chromium/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -904,6 +904,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
bool extension_enabled_[kWebGLExtensionNameCount];
HeapVector<TraceWrapperMember<ExtensionTracker>> extensions_;
+ HashSet<String> disabled_extensions_;
template <typename T>
void RegisterExtension(Member<T>& extension_ptr,
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.cpp b/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.cpp
index 7a189e02811..8dd22e74171 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.cpp
+++ b/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.cpp
@@ -6,18 +6,86 @@
#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGL2RenderingContextBase.h"
+#include "public/platform/Platform.h"
+#include "public/platform/TaskType.h"
namespace blink {
WebGLSync::WebGLSync(WebGL2RenderingContextBase* ctx,
GLsync object,
GLenum object_type)
- : WebGLSharedObject(ctx), object_(object), object_type_(object_type) {}
+ : WebGLSharedObject(ctx),
+ sync_status_(GL_UNSIGNALED),
+ object_(object),
+ object_type_(object_type) {
+ if (ctx->canvas()) {
+ task_runner_ =
+ ctx->canvas()->GetDocument().GetTaskRunner(TaskType::kUnthrottled);
+ } else {
+ // Fallback for OffscreenCanvas (no frame scheduler)
+ task_runner_ = Platform::Current()->CurrentThread()->GetWebTaskRunner();
+ }
+ ScheduleAllowCacheUpdate();
+}
WebGLSync::~WebGLSync() {
RunDestructor();
}
+void WebGLSync::UpdateCache(gpu::gles2::GLES2Interface* gl) {
+ if (sync_status_ == GL_SIGNALED) {
+ return;
+ }
+
+ if (!allow_cache_update_) {
+ return;
+ }
+
+ // We can only update the cached result when control returns to the browser.
+ allow_cache_update_ = false;
+ GLsizei length = -1;
+ GLint value = 0;
+ gl->GetSynciv(object_, GL_SYNC_STATUS, 1, &length, &value);
+ if (value) {
+ sync_status_ = value;
+ }
+ if (sync_status_ != GL_SIGNALED) {
+ ScheduleAllowCacheUpdate();
+ }
+}
+
+GLint WebGLSync::GetCachedResult(GLenum pname) {
+ switch (pname) {
+ case GL_OBJECT_TYPE:
+ return object_type_;
+ case GL_SYNC_STATUS:
+ return sync_status_;
+ case GL_SYNC_CONDITION:
+ return GL_SYNC_GPU_COMMANDS_COMPLETE;
+ case GL_SYNC_FLAGS:
+ return 0;
+ }
+
+ NOTREACHED();
+ return 0;
+}
+
+bool WebGLSync::IsSignaled() const {
+ return (sync_status_ == GL_SIGNALED);
+}
+
+void WebGLSync::ScheduleAllowCacheUpdate() {
+ if (task_handle_.IsActive())
+ return;
+ task_handle_ = PostCancellableTask(
+ *task_runner_, FROM_HERE,
+ WTF::Bind(&WebGLSync::AllowCacheUpdate, WrapWeakPersistent(this)));
+}
+
+void WebGLSync::AllowCacheUpdate() {
+ allow_cache_update_ = true;
+}
+
void WebGLSync::DeleteObjectImpl(gpu::gles2::GLES2Interface* gl) {
gl->DeleteSync(object_);
object_ = nullptr;
diff --git a/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.h b/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.h
index d473093e224..80cbca6dc1b 100644
--- a/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.h
+++ b/chromium/third_party/WebKit/Source/modules/webgl/WebGLSync.h
@@ -6,7 +6,13 @@
#define WebGLSync_h
#include "modules/webgl/WebGLSharedObject.h"
-#include "third_party/khronos/GLES2/gl2.h"
+#include "platform/WebTaskRunner.h"
+
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+} // namespace gpu
namespace blink {
@@ -20,6 +26,10 @@ class WebGLSync : public WebGLSharedObject {
GLsync Object() const { return object_; }
+ void UpdateCache(gpu::gles2::GLES2Interface*);
+ GLint GetCachedResult(GLenum pname);
+ bool IsSignaled() const;
+
protected:
WebGLSync(WebGL2RenderingContextBase*, GLsync, GLenum object_type);
@@ -31,8 +41,18 @@ class WebGLSync : public WebGLSharedObject {
private:
bool IsSync() const override { return true; }
+ void ScheduleAllowCacheUpdate();
+ void AllowCacheUpdate();
+
+ bool allow_cache_update_ = false;
+ // Initialized in cpp file to avoid including gl3.h in this header.
+ GLint sync_status_;
+
GLsync object_;
GLenum object_type_;
+
+ scoped_refptr<WebTaskRunner> task_runner_;
+ TaskHandle task_handle_;
};
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp b/chromium/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp
index e24cbb3ea73..b1ddc0dcecf 100644
--- a/chromium/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp
+++ b/chromium/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp
@@ -174,6 +174,14 @@ bool AcceleratedStaticBitmapImage::CopyToTexture(
// This drops the |destGL| context's reference on our |m_mailbox|, but it's
// still held alive by our SkImage.
dest_gl->DeleteTextures(1, &source_texture_id);
+
+ // We need to update the texture holder's sync token to ensure that when this
+ // image is deleted, the texture resource will not be recycled by skia before
+ // the the above texture copy has completed.
+ gpu::SyncToken sync_token;
+ dest_gl->GenUnverifiedSyncTokenCHROMIUM(sync_token.GetData());
+ texture_holder_->UpdateSyncToken(sync_token);
+
return true;
}
diff --git a/chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
index 53c91603412..c0c4b14a410 100644
--- a/chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
+++ b/chromium/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
@@ -144,12 +144,21 @@ PaintImage BitmapImage::CreateAndCacheFrame(size_t index) {
auto completion_state = all_data_received_
? PaintImage::CompletionState::DONE
: PaintImage::CompletionState::PARTIALLY_DONE;
+
+ // When requesting more than a single loop, repetition count is one less than
+ // the actual number of loops requested.
+ // TODO(khushalsagar): Fix this in RepetitionCount itself when removing code
+ // here for animations.
+ int repetition_count = RepetitionCount();
+ if (repetition_count > 0)
+ repetition_count++;
+
auto builder =
CreatePaintImageBuilder()
.set_paint_image_generator(std::move(generator))
.set_frame_index(index)
.set_repetition_count(GetRepetitionCountWithPolicyOverride(
- repetition_count_, animation_policy_))
+ repetition_count, animation_policy_))
.set_completion_state(completion_state)
.set_reset_animation_sequence_id(reset_animation_sequence_id_);
diff --git a/chromium/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp b/chromium/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
index 89c576f9110..5cfea99fe93 100644
--- a/chromium/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
+++ b/chromium/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
@@ -349,6 +349,13 @@ TEST_F(BitmapImageTest, ImageForDefaultFrame_SingleFrame) {
EXPECT_EQ(image_->ImageForDefaultFrame(), image_);
}
+TEST_F(BitmapImageTest, GIFRepetitionCount) {
+ LoadImage("/LayoutTests/images/resources/three-frames_loop-three-times.gif");
+ auto paint_image = image_->PaintImageForCurrentFrame();
+ EXPECT_EQ(paint_image.repetition_count(), 3);
+ EXPECT_EQ(paint_image.FrameCount(), 3u);
+}
+
class BitmapImageTestWithMockDecoder : public BitmapImageTest,
public MockImageDecoderClient {
public:
diff --git a/chromium/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b/chromium/third_party/WebKit/Source/platform/runtime_enabled_features.json5
index 721a79ae888..74fbae9252f 100644
--- a/chromium/third_party/WebKit/Source/platform/runtime_enabled_features.json5
+++ b/chromium/third_party/WebKit/Source/platform/runtime_enabled_features.json5
@@ -174,7 +174,7 @@
{
name: "CompositeOpaqueFixedPosition",
settable_from_internals: true,
- status: "stable",
+ status: "experimental",
},
{
name: "CompositeOpaqueScrollers",
diff --git a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc
index f92b6884fdb..16a8012db8b 100644
--- a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc
+++ b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue.cc
@@ -69,28 +69,40 @@ bool TaskQueue::RunsTasksInCurrentSequence() const {
bool TaskQueue::PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
- auto lock = AcquireImplReadLockIfNeeded();
- if (!impl_)
- return false;
- return impl_->PostDelayedTask(
- PostedTask(std::move(task), from_here, delay, base::Nestable::kNestable));
+ internal::TaskQueueImpl::PostTaskResult result;
+ {
+ auto lock = AcquireImplReadLockIfNeeded();
+ if (!impl_)
+ return false;
+ result = impl_->PostDelayedTask(PostedTask(
+ std::move(task), from_here, delay, base::Nestable::kNestable));
+ }
+ return result.success;
}
bool TaskQueue::PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) {
- auto lock = AcquireImplReadLockIfNeeded();
- if (!impl_)
- return false;
- return impl_->PostDelayedTask(PostedTask(std::move(task), from_here, delay,
- base::Nestable::kNonNestable));
+ internal::TaskQueueImpl::PostTaskResult result;
+ {
+ auto lock = AcquireImplReadLockIfNeeded();
+ if (!impl_)
+ return false;
+ result = impl_->PostDelayedTask(PostedTask(
+ std::move(task), from_here, delay, base::Nestable::kNonNestable));
+ }
+ return result.success;
}
bool TaskQueue::PostTaskWithMetadata(PostedTask task) {
- auto lock = AcquireImplReadLockIfNeeded();
- if (!impl_)
- return false;
- return impl_->PostDelayedTask(std::move(task));
+ internal::TaskQueueImpl::PostTaskResult result;
+ {
+ auto lock = AcquireImplReadLockIfNeeded();
+ if (!impl_)
+ return false;
+ result = impl_->PostDelayedTask(std::move(task));
+ }
+ return result.success;
}
std::unique_ptr<TaskQueue::QueueEnabledVoter>
diff --git a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
index 3bcb9ea35e8..3fada72031b 100644
--- a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
+++ b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
@@ -64,6 +64,23 @@ TaskQueueImpl::~TaskQueueImpl() {
#endif
}
+TaskQueueImpl::PostTaskResult::PostTaskResult()
+ : task(base::OnceClosure(), base::Location()) {}
+
+TaskQueueImpl::PostTaskResult::PostTaskResult(bool success,
+ TaskQueue::PostedTask task)
+ : success(success), task(std::move(task)) {}
+
+TaskQueueImpl::PostTaskResult TaskQueueImpl::PostTaskResult::Success() {
+ return PostTaskResult(
+ true, TaskQueue::PostedTask(base::OnceClosure(), base::Location()));
+}
+
+TaskQueueImpl::PostTaskResult TaskQueueImpl::PostTaskResult::Fail(
+ TaskQueue::PostedTask task) {
+ return PostTaskResult(false, std::move(task));
+}
+
TaskQueueImpl::Task::Task(TaskQueue::PostedTask task,
base::TimeTicks desired_run_time,
EnqueueOrder sequence_number)
@@ -169,20 +186,22 @@ bool TaskQueueImpl::RunsTasksInCurrentSequence() const {
return base::PlatformThread::CurrentId() == thread_id_;
}
-bool TaskQueueImpl::PostDelayedTask(TaskQueue::PostedTask task) {
+TaskQueueImpl::PostTaskResult TaskQueueImpl::PostDelayedTask(
+ TaskQueue::PostedTask task) {
if (task.delay.is_zero())
return PostImmediateTaskImpl(std::move(task));
return PostDelayedTaskImpl(std::move(task));
}
-bool TaskQueueImpl::PostImmediateTaskImpl(TaskQueue::PostedTask task) {
+TaskQueueImpl::PostTaskResult TaskQueueImpl::PostImmediateTaskImpl(
+ TaskQueue::PostedTask task) {
// Use CHECK instead of DCHECK to crash earlier. See http://crbug.com/711167
// for details.
CHECK(task.callback);
base::AutoLock lock(any_thread_lock_);
if (!any_thread().task_queue_manager)
- return false;
+ return PostTaskResult::Fail(std::move(task));
EnqueueOrder sequence_number =
any_thread().task_queue_manager->GetNextSequenceNumber();
@@ -190,10 +209,11 @@ bool TaskQueueImpl::PostImmediateTaskImpl(TaskQueue::PostedTask task) {
PushOntoImmediateIncomingQueueLocked(Task(std::move(task),
any_thread().time_domain->Now(),
sequence_number, sequence_number));
- return true;
+ return PostTaskResult::Success();
}
-bool TaskQueueImpl::PostDelayedTaskImpl(TaskQueue::PostedTask task) {
+TaskQueueImpl::PostTaskResult TaskQueueImpl::PostDelayedTaskImpl(
+ TaskQueue::PostedTask task) {
// Use CHECK instead of DCHECK to crash earlier. See http://crbug.com/711167
// for details.
CHECK(task.callback);
@@ -201,7 +221,7 @@ bool TaskQueueImpl::PostDelayedTaskImpl(TaskQueue::PostedTask task) {
if (base::PlatformThread::CurrentId() == thread_id_) {
// Lock-free fast path for delayed tasks posted from the main thread.
if (!main_thread_only().task_queue_manager)
- return false;
+ return PostTaskResult::Fail(std::move(task));
EnqueueOrder sequence_number =
main_thread_only().task_queue_manager->GetNextSequenceNumber();
@@ -218,7 +238,7 @@ bool TaskQueueImpl::PostDelayedTaskImpl(TaskQueue::PostedTask task) {
// assumption prove to be false in future, we may need to revisit this.
base::AutoLock lock(any_thread_lock_);
if (!any_thread().task_queue_manager)
- return false;
+ return PostTaskResult::Fail(std::move(task));
EnqueueOrder sequence_number =
any_thread().task_queue_manager->GetNextSequenceNumber();
@@ -228,7 +248,7 @@ bool TaskQueueImpl::PostDelayedTaskImpl(TaskQueue::PostedTask task) {
PushOntoDelayedIncomingQueueLocked(
Task(std::move(task), time_domain_delayed_run_time, sequence_number));
}
- return true;
+ return PostTaskResult::Success();
}
void TaskQueueImpl::PushOntoDelayedIncomingQueueFromMainThread(
diff --git a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
index ad628ff0df2..970b0d2598d 100644
--- a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
+++ b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
@@ -131,6 +131,19 @@ class PLATFORM_EXPORT TaskQueueImpl {
EnqueueOrder enqueue_order_;
};
+ // A result retuned by PostDelayedTask. When scheduler failed to post a task
+ // due to being shutdown a task is returned to be destroyed outside the lock.
+ struct PostTaskResult {
+ PostTaskResult();
+ PostTaskResult(bool success, TaskQueue::PostedTask task);
+
+ static PostTaskResult Success();
+ static PostTaskResult Fail(TaskQueue::PostedTask task);
+
+ bool success = false;
+ TaskQueue::PostedTask task;
+ };
+
using OnNextWakeUpChangedCallback = base::Callback<void(base::TimeTicks)>;
using OnTaskStartedHandler =
base::RepeatingCallback<void(const TaskQueue::Task&, base::TimeTicks)>;
@@ -143,7 +156,7 @@ class PLATFORM_EXPORT TaskQueueImpl {
// TaskQueue implementation.
const char* GetName() const;
bool RunsTasksInCurrentSequence() const;
- bool PostDelayedTask(TaskQueue::PostedTask task);
+ PostTaskResult PostDelayedTask(TaskQueue::PostedTask task);
// Require a reference to enclosing task queue for lifetime control.
std::unique_ptr<TaskQueue::QueueEnabledVoter> CreateQueueEnabledVoter(
scoped_refptr<TaskQueue> owning_task_queue);
@@ -335,8 +348,8 @@ class PLATFORM_EXPORT TaskQueueImpl {
bool is_enabled_for_test;
};
- bool PostImmediateTaskImpl(TaskQueue::PostedTask task);
- bool PostDelayedTaskImpl(TaskQueue::PostedTask task);
+ PostTaskResult PostImmediateTaskImpl(TaskQueue::PostedTask task);
+ PostTaskResult PostDelayedTaskImpl(TaskQueue::PostedTask task);
// Push the task onto the |delayed_incoming_queue|. Lock-free main thread
// only fast path.
diff --git a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
index 54a71fa8f38..a5d10188c25 100644
--- a/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
+++ b/chromium/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
@@ -288,6 +288,13 @@ void TestTask(EnqueueOrder value, std::vector<EnqueueOrder>* out_result) {
out_result->push_back(value);
}
+void DisableQueueTestTask(EnqueueOrder value,
+ std::vector<EnqueueOrder>* out_result,
+ TaskQueue::QueueEnabledVoter* voter) {
+ out_result->push_back(value);
+ voter->SetQueueEnabled(false);
+}
+
TEST_F(TaskQueueManagerTest, SingleQueuePosting) {
Initialize(1u);
@@ -384,6 +391,55 @@ TEST_F(TaskQueueManagerTest, NonNestableTasksDoesntExecuteInNestedLoop) {
EXPECT_THAT(run_order, ElementsAre(1, 2, 5, 6, 3, 4));
}
+namespace {
+
+void InsertFenceAndPostTestTask(EnqueueOrder id,
+ std::vector<EnqueueOrder>* run_order,
+ scoped_refptr<TestTaskQueue> task_queue) {
+ run_order->push_back(id);
+ task_queue->InsertFence(TaskQueue::InsertFencePosition::kNow);
+ task_queue->PostTask(FROM_HERE,
+ base::BindRepeating(&TestTask, id + 1, run_order));
+
+ // Force reload of immediate work queue. In real life the same effect can be
+ // achieved with cross-thread posting.
+ task_queue->GetTaskQueueImpl()->ReloadImmediateWorkQueueIfEmpty();
+}
+
+} // namespace
+
+TEST_F(TaskQueueManagerTest, TaskQueueDisabledFromNestedLoop) {
+ InitializeWithRealMessageLoop(1u);
+ std::vector<EnqueueOrder> run_order;
+
+ std::vector<std::pair<base::Closure, bool>> tasks_to_post_from_nested_loop;
+
+ tasks_to_post_from_nested_loop.push_back(
+ std::make_pair(base::BindRepeating(&TestTask, 1, &run_order), false));
+ tasks_to_post_from_nested_loop.push_back(
+ std::make_pair(base::BindRepeating(&InsertFenceAndPostTestTask, 2,
+ &run_order, runners_[0]),
+ true));
+
+ runners_[0]->PostTask(
+ FROM_HERE,
+ base::BindRepeating(&PostFromNestedRunloop, message_loop_.get(),
+ base::RetainedRef(runners_[0]),
+ base::Unretained(&tasks_to_post_from_nested_loop)));
+ base::RunLoop().RunUntilIdle();
+
+ // Task 1 shouldn't run first due to it being non-nestable and queue gets
+ // blocked after task 2. Task 1 runs after existing nested message loop
+ // due to being posted before inserting a fence.
+ // This test checks that breaks when nestable task is pushed into a redo
+ // queue.
+ EXPECT_THAT(run_order, ElementsAre(2, 1));
+
+ runners_[0]->RemoveFence();
+ base::RunLoop().RunUntilIdle();
+ EXPECT_THAT(run_order, ElementsAre(2, 1, 3));
+}
+
TEST_F(TaskQueueManagerTest, HasPendingImmediateWork_ImmediateTask) {
Initialize(1u);
@@ -3477,6 +3533,61 @@ TEST_F(TaskQueueManagerTest, DefaultTaskRunnerSupport) {
DCHECK_EQ(original_task_runner, message_loop.task_runner());
}
+namespace {
+
+void DoNothing() {}
+
+class PostTaskInDestructor {
+ public:
+ explicit PostTaskInDestructor(scoped_refptr<TaskQueue> task_queue)
+ : task_queue_(task_queue) {}
+
+ ~PostTaskInDestructor() {
+ task_queue_->PostTask(FROM_HERE, base::BindOnce(&DoNothing));
+ }
+
+ void Do() {}
+
+ private:
+ scoped_refptr<TaskQueue> task_queue_;
+};
+
+} // namespace
+
+TEST_F(TaskQueueManagerTest, TaskQueueUsedInTaskDestructorAfterShutdown) {
+ // This test checks that when a task is posted to a shutdown queue and
+ // destroyed, it can try to post a task to the same queue without deadlocks.
+ Initialize(0u);
+ test_task_runner_->SetAutoAdvanceNowToPendingTasks(true);
+
+ scoped_refptr<TestTaskQueue> main_tq = CreateTaskQueue();
+
+ base::WaitableEvent test_executed(
+ base::WaitableEvent::ResetPolicy::MANUAL,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
+ std::unique_ptr<base::Thread> thread =
+ std::make_unique<base::Thread>("test thread");
+ thread->StartAndWaitForTesting();
+
+ manager_.reset();
+
+ thread->task_runner()->PostTask(
+ FROM_HERE,
+ base::BindOnce(
+ [](scoped_refptr<base::SingleThreadTaskRunner> task_queue,
+ std::unique_ptr<PostTaskInDestructor> test_object,
+ base::WaitableEvent* test_executed) {
+ task_queue->PostTask(
+ FROM_HERE,
+ base::BindOnce(&PostTaskInDestructor::Do,
+ base::Passed(std::move(test_object))));
+ test_executed->Signal();
+ },
+ main_tq, std::make_unique<PostTaskInDestructor>(main_tq),
+ &test_executed));
+ test_executed.Wait();
+}
+
} // namespace task_queue_manager_unittest
} // namespace scheduler
} // namespace blink
diff --git a/chromium/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc b/chromium/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
index 75e357efc04..926da348a5b 100644
--- a/chromium/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
+++ b/chromium/third_party/WebKit/Source/platform/scheduler/base/work_queue.cc
@@ -86,6 +86,7 @@ void WorkQueue::PushNonNestableTaskToFront(TaskQueueImpl::Task task) {
DCHECK(task.nestable == base::Nestable::kNonNestable);
bool was_empty = work_queue_.empty();
+ bool was_blocked = BlockedByFence();
#ifndef NDEBUG
DCHECK(task.enqueue_order_set());
#endif
@@ -107,7 +108,8 @@ void WorkQueue::PushNonNestableTaskToFront(TaskQueueImpl::Task task) {
if (BlockedByFence())
return;
- if (was_empty) {
+ // Pushing task to front may unblock the fence.
+ if (was_empty || was_blocked) {
work_queue_sets_->OnTaskPushedToEmptyQueue(this);
} else {
work_queue_sets_->OnFrontTaskChanged(this);
diff --git a/chromium/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc b/chromium/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
index b76bd643396..cc562ee984c 100644
--- a/chromium/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
+++ b/chromium/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc
@@ -353,7 +353,9 @@ void TaskQueueThrottler::UpdateQueueThrottlingStateInternal(base::TimeTicks now,
base::Optional<base::TimeTicks> next_wake_up =
queue->GetNextScheduledWakeUp();
- if (next_wake_up && next_wake_up.value() > unblock_until.value()) {
+ // TODO(altimin, crbug.com/813218): Find a testcase to repro freezes
+ // mentioned in the bug.
+ if (next_wake_up) {
MaybeSchedulePumpThrottledTasks(
FROM_HERE, now, GetNextAllowedRunTime(queue, next_wake_up.value()));
}
diff --git a/chromium/third_party/WebKit/public/web/WebPerformance.h b/chromium/third_party/WebKit/public/web/WebPerformance.h
index f7ac232b53a..37db8646749 100644
--- a/chromium/third_party/WebKit/public/web/WebPerformance.h
+++ b/chromium/third_party/WebKit/public/web/WebPerformance.h
@@ -93,6 +93,8 @@ class WebPerformance {
BLINK_EXPORT double PageInteractive() const;
BLINK_EXPORT double PageInteractiveDetection() const;
BLINK_EXPORT double FirstInputInvalidatingInteractive() const;
+ BLINK_EXPORT double FirstInputDelay() const;
+ BLINK_EXPORT double FirstInputTimestamp() const;
BLINK_EXPORT double ParseStart() const;
BLINK_EXPORT double ParseStop() const;
BLINK_EXPORT double ParseBlockedOnScriptLoadDuration() const;
diff --git a/chromium/third_party/ffmpeg/chromium/patches/README b/chromium/third_party/ffmpeg/chromium/patches/README
index 6bc1d41b2c1..400c2018640 100644
--- a/chromium/third_party/ffmpeg/chromium/patches/README
+++ b/chromium/third_party/ffmpeg/chromium/patches/README
@@ -81,3 +81,20 @@ Current patches:
Removes CELT, DIRAC, DAALA, and SPEEX support form the ogg parser. We don't
support these codecs and the parsers have bugs. http://crbug.com/654612
+ libavformat/mov.c
+ find_prev_closest_index(): It's possible *ctts_index == ctts_count. Thus add
+ a check to prevent access violation. https://crbug.com/804097
+
+ libavcodec/h264_cavlc.c
+ When ff_h264_decode_mb_cavlc() failed due to wrong sl->qscale values, e.g.
+ dquant out of range, set the qscale to be a valid value before returning -1
+ and exiting the function. The qscale value can be used later, e.g. in loop
+ filter and keeping an invalid qscale could cause trouble.
+ https://crbug.com/806122
+
+ libavformat/mov.c
+ mov_read_stts(): Fix stts memory allocation (use i + 1 instead of i).
+ https://crbug.com/801821
+
+ libavformat/mov.c
+ mov_read_trun(): Fix memset size on ctts_data. https://crbug.com/812567
diff --git a/chromium/third_party/ffmpeg/libavcodec/h264_cavlc.c b/chromium/third_party/ffmpeg/libavcodec/h264_cavlc.c
index 2421beed9db..a7e60676a04 100644
--- a/chromium/third_party/ffmpeg/libavcodec/h264_cavlc.c
+++ b/chromium/third_party/ffmpeg/libavcodec/h264_cavlc.c
@@ -1110,6 +1110,7 @@ decode_intra_mb:
else sl->qscale -= max_qp+1;
if (((unsigned)sl->qscale) > max_qp){
av_log(h->avctx, AV_LOG_ERROR, "dquant out of range (%d) at %d %d\n", dquant, sl->mb_x, sl->mb_y);
+ sl->qscale = max_qp;
return -1;
}
}
diff --git a/chromium/third_party/ffmpeg/libavformat/mov.c b/chromium/third_party/ffmpeg/libavformat/mov.c
index 5adba52e08f..e8e2d966061 100644
--- a/chromium/third_party/ffmpeg/libavformat/mov.c
+++ b/chromium/third_party/ffmpeg/libavformat/mov.c
@@ -2882,7 +2882,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for (i = 0; i < entries && !pb->eof_reached; i++) {
int sample_duration;
unsigned int sample_count;
- unsigned min_entries = FFMIN(FFMAX(i, 1024 * 1024), entries);
+ unsigned int min_entries = FFMIN(FFMAX(i + 1, 1024 * 1024), entries);
MOVStts *stts_data = av_fast_realloc(sc->stts_data, &alloc_size,
min_entries * sizeof(*sc->stts_data));
if (!stts_data) {
@@ -3157,7 +3157,7 @@ static int find_prev_closest_index(AVStream *st,
}
}
- while (*index >= 0 && (*ctts_index) >= 0) {
+ while (*index >= 0 && (*ctts_index) >= 0 && (*ctts_index) < ctts_count) {
// Find a "key frame" with PTS <= timestamp_pts (So that we can decode B-frames correctly).
// No need to add dts_shift to the timestamp here becase timestamp_pts has already been
// compensated by dts_shift above.
@@ -4713,6 +4713,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st->index_entries= new_entries;
requested_size = (st->nb_index_entries + entries) * sizeof(*sc->ctts_data);
+ unsigned int old_ctts_allocated_size = sc->ctts_allocated_size;
ctts_data = av_fast_realloc(sc->ctts_data, &sc->ctts_allocated_size,
requested_size);
if (!ctts_data)
@@ -4722,8 +4723,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
// In case there were samples without ctts entries, ensure they get
// zero valued entries. This ensures clips which mix boxes with and
// without ctts entries don't pickup uninitialized data.
- memset(sc->ctts_data + sc->ctts_count, 0,
- (st->nb_index_entries - sc->ctts_count) * sizeof(*sc->ctts_data));
+ memset((uint8_t*)(sc->ctts_data) + old_ctts_allocated_size, 0,
+ sc->ctts_allocated_size - old_ctts_allocated_size);
if (index_entry_pos < st->nb_index_entries) {
// Make hole in index_entries and ctts_data for new samples
diff --git a/chromium/third_party/pdfium/core/fxge/win32/cfx_psrenderer.cpp b/chromium/third_party/pdfium/core/fxge/win32/cfx_psrenderer.cpp
index 1513c07c684..1e79669225c 100644
--- a/chromium/third_party/pdfium/core/fxge/win32/cfx_psrenderer.cpp
+++ b/chromium/third_party/pdfium/core/fxge/win32/cfx_psrenderer.cpp
@@ -6,6 +6,7 @@
#include "core/fxge/win32/cfx_psrenderer.h"
+#include <algorithm>
#include <memory>
#include <sstream>
@@ -644,15 +645,19 @@ bool CFX_PSRenderer::DrawText(int nChars,
const CFX_Matrix* pObject2Device,
float font_size,
uint32_t color) {
- // Do not send zero or negative font sizes to printers. See crbug.com/767343.
- if (font_size <= 0.0)
- return true;
-
+ // Check object to device matrix first, since it can scale the font size.
if ((pObject2Device->a == 0 && pObject2Device->b == 0) ||
(pObject2Device->c == 0 && pObject2Device->d == 0)) {
return true;
}
+ // Do not send near zero font sizes to printers. See crbug.com/767343.
+ float scale =
+ std::min(pObject2Device->GetXUnit(), pObject2Device->GetYUnit());
+ static constexpr float kEpsilon = 0.01f;
+ if (std::fabs(font_size * scale) < kEpsilon)
+ return true;
+
StartRendering();
int alpha = FXARGB_A(color);
if (alpha < 255)
diff --git a/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp b/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp
index 45eae7f8d27..65edd2e05bb 100644
--- a/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp
+++ b/chromium/third_party/pdfium/fxjs/cjs_publicmethods.cpp
@@ -1586,7 +1586,7 @@ CJS_Return CJS_PublicMethods::AFSimple_Calculate(
double dValue = wcscmp(sFunction.c_str(), L"PRD") == 0 ? 1.0 : 0.0;
v8::Local<v8::Array> FieldNameArray =
- AF_MakeArrayFromList(pRuntime, params[0]);
+ AF_MakeArrayFromList(pRuntime, params[1]);
int nFieldsCount = 0;
for (size_t i = 0; i < pRuntime->GetArrayLength(FieldNameArray); ++i) {
WideString wsFieldName =
diff --git a/chromium/third_party/pdfium/fxjs/cjs_publicmethods_embeddertest.cpp b/chromium/third_party/pdfium/fxjs/cjs_publicmethods_embeddertest.cpp
index dbab0817cec..874f59f5ae4 100644
--- a/chromium/third_party/pdfium/fxjs/cjs_publicmethods_embeddertest.cpp
+++ b/chromium/third_party/pdfium/fxjs/cjs_publicmethods_embeddertest.cpp
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include <cmath>
+#include <vector>
#include "core/fxcrt/fx_string.h"
+#include "fxjs/cjs_event_context.h"
#include "fxjs/cjs_publicmethods.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/js_embedder_test.h"
@@ -160,3 +162,37 @@ TEST_F(CJS_PublicMethodsEmbedderTest, MakeFormatDate) {
CJS_PublicMethods::MakeFormatDate(3947356800000.0, L"mmddyyyy");
EXPECT_STREQ(L"02012095", formatted_date.c_str());
}
+
+TEST_F(CJS_PublicMethodsEmbedderTest, AFSimple_CalculateSum) {
+ v8::Isolate::Scope isolate_scope(isolate());
+ v8::HandleScope handle_scope(isolate());
+ v8::Context::Scope context_scope(GetV8Context());
+
+ EXPECT_TRUE(OpenDocument("calculate.pdf"));
+ auto* page = LoadPage(0);
+ ASSERT_TRUE(page);
+
+ CJS_Runtime runtime(static_cast<CPDFSDK_FormFillEnvironment*>(form_handle()));
+ runtime.NewEventContext();
+
+ WideString result;
+ runtime.GetCurrentEventContext()->GetEventHandler()->m_pValue = &result;
+
+ auto ary = runtime.NewArray();
+
+ runtime.PutArrayElement(ary, 0, runtime.NewString(L"Calc1_A"));
+ runtime.PutArrayElement(ary, 1, runtime.NewString(L"Calc1_B"));
+
+ std::vector<v8::Local<v8::Value>> params;
+ params.push_back(runtime.NewString("SUM"));
+ params.push_back(ary);
+
+ CJS_Return ret = CJS_PublicMethods::AFSimple_Calculate(&runtime, params);
+ UnloadPage(page);
+
+ runtime.GetCurrentEventContext()->GetEventHandler()->m_pValue = nullptr;
+
+ ASSERT_TRUE(!ret.HasError());
+ ASSERT_TRUE(!ret.HasReturn());
+ ASSERT_EQ(L"7", result);
+}
diff --git a/chromium/third_party/skia/src/gpu/SkGr.cpp b/chromium/third_party/skia/src/gpu/SkGr.cpp
index c38f51260a1..f8aee01b40e 100644
--- a/chromium/third_party/skia/src/gpu/SkGr.cpp
+++ b/chromium/third_party/skia/src/gpu/SkGr.cpp
@@ -390,6 +390,9 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context,
} else if (const auto* shader = as_SB(skPaint.getShader())) {
shaderFP = shader->asFragmentProcessor(SkShaderBase::AsFPArgs(
context, &viewM, nullptr, skPaint.getFilterQuality(), &colorSpaceInfo));
+ if (!shaderFP) {
+ return false;
+ }
}
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc
index 24f2c9176df..dafe384bedc 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/block_processor.cc
@@ -101,6 +101,7 @@ void BlockProcessorImpl::ProcessCapture(
if (!capture_properly_started_) {
capture_properly_started_ = true;
render_buffer_->Reset();
+ delay_controller_->Reset();
}
} else {
// If no render data has yet arrived, do not process the capture signal.
@@ -213,6 +214,7 @@ void BlockProcessorImpl::BufferRender(
RenderDelayBuffer::BufferingEvent::kNone);
render_properly_started_ = true;
+ delay_controller_->LogRenderCall();
}
void BlockProcessorImpl::UpdateEchoLeakageStatus(bool leakage_detected) {
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
index 95796d52ea6..d9d753cd432 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.cc
@@ -43,8 +43,10 @@ EchoPathDelayEstimator::EchoPathDelayEstimator(
EchoPathDelayEstimator::~EchoPathDelayEstimator() = default;
-void EchoPathDelayEstimator::Reset() {
- matched_filter_lag_aggregator_.Reset();
+void EchoPathDelayEstimator::Reset(bool soft_reset) {
+ if (!soft_reset) {
+ matched_filter_lag_aggregator_.Reset();
+ }
matched_filter_.Reset();
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
index ef0d4483e15..10fa862fdb0 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
@@ -33,8 +33,9 @@ class EchoPathDelayEstimator {
const EchoCanceller3Config& config);
~EchoPathDelayEstimator();
- // Resets the estimation.
- void Reset();
+ // Resets the estimation. If the soft-reset is specified, only the matched
+ // filters are reset.
+ void Reset(bool soft_reset);
// Produce a delay estimate if such is avaliable.
rtc::Optional<DelayEstimate> EstimateDelay(
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
index 4a82ae3292b..8fb7a8e900c 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
@@ -25,6 +25,7 @@ class MockRenderDelayController : public RenderDelayController {
virtual ~MockRenderDelayController() = default;
MOCK_METHOD0(Reset, void());
+ MOCK_METHOD0(LogRenderCall, void());
MOCK_METHOD2(
GetDelay,
rtc::Optional<DelayEstimate>(const DownsampledRenderBuffer& render_buffer,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
index 3bc7d622370..6120c3ecae2 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.cc
@@ -11,6 +11,7 @@
#include <algorithm>
#include <memory>
+#include <numeric>
#include <string>
#include <vector>
@@ -25,6 +26,47 @@ namespace webrtc {
namespace {
+constexpr int kSkewHistorySizeLog2 = 8;
+
+// Estimator of API call skew between render and capture.
+class SkewEstimator {
+ public:
+ // Resets the estimation.
+ void Reset() {
+ skew_ = 0;
+ next_index_ = 0;
+ sufficient_skew_stored_ = false;
+ }
+
+ // Updates the skew data for a render call.
+ void LogRenderCall() { ++skew_; }
+
+ // Updates and computes the skew at a capture call. Returns an optional which
+ // is non-null if a reliable skew has been found.
+ rtc::Optional<int> GetSkewFromCapture() {
+ --skew_;
+
+ skew_history_[next_index_] = skew_;
+ if (++next_index_ == skew_history_.size()) {
+ next_index_ = 0;
+ sufficient_skew_stored_ = true;
+ }
+
+ if (!sufficient_skew_stored_) {
+ return rtc::nullopt;
+ }
+
+ return std::accumulate(skew_history_.begin(), skew_history_.end(), 0) >>
+ kSkewHistorySizeLog2;
+ }
+
+ private:
+ int skew_ = 0;
+ std::array<int, 1 << kSkewHistorySizeLog2> skew_history_;
+ size_t next_index_ = 0;
+ bool sufficient_skew_stored_ = false;
+};
+
class RenderDelayControllerImpl final : public RenderDelayController {
public:
RenderDelayControllerImpl(const EchoCanceller3Config& config,
@@ -32,6 +74,7 @@ class RenderDelayControllerImpl final : public RenderDelayController {
int sample_rate_hz);
~RenderDelayControllerImpl() override;
void Reset() override;
+ void LogRenderCall() override;
rtc::Optional<DelayEstimate> GetDelay(
const DownsampledRenderBuffer& render_buffer,
rtc::ArrayView<const float> capture) override;
@@ -47,23 +90,27 @@ class RenderDelayControllerImpl final : public RenderDelayController {
std::vector<float> delay_buf_;
int delay_buf_index_ = 0;
RenderDelayControllerMetrics metrics_;
+ SkewEstimator skew_estimator_;
+ rtc::Optional<DelayEstimate> delay_samples_;
+ rtc::Optional<int> skew_;
+ int delay_change_counter_ = 0;
+ size_t soft_reset_counter_ = 0;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RenderDelayControllerImpl);
};
-DelayEstimate ComputeNewBufferDelay(
+DelayEstimate ComputeBufferDelay(
const rtc::Optional<DelayEstimate>& current_delay,
int delay_headroom_blocks,
int hysteresis_limit_1_blocks,
int hysteresis_limit_2_blocks,
+ int offset_blocks,
DelayEstimate estimated_delay) {
// The below division is not exact and the truncation is intended.
const int echo_path_delay_blocks = estimated_delay.delay >> kBlockSizeLog2;
// Compute the buffer delay increase required to achieve the desired latency.
- size_t new_delay_blocks =
- std::max(echo_path_delay_blocks - delay_headroom_blocks, 0);
-
- DelayEstimate new_delay(estimated_delay.quality, new_delay_blocks);
+ size_t new_delay_blocks = std::max(
+ echo_path_delay_blocks + offset_blocks - delay_headroom_blocks, 0);
// Add hysteresis.
if (current_delay) {
@@ -111,8 +158,17 @@ RenderDelayControllerImpl::~RenderDelayControllerImpl() = default;
void RenderDelayControllerImpl::Reset() {
delay_ = rtc::nullopt;
+ delay_samples_ = rtc::nullopt;
+ skew_ = rtc::nullopt;
std::fill(delay_buf_.begin(), delay_buf_.end(), 0.f);
- delay_estimator_.Reset();
+ delay_estimator_.Reset(false);
+ skew_estimator_.Reset();
+ delay_change_counter_ = 0;
+ soft_reset_counter_ = 0;
+}
+
+void RenderDelayControllerImpl::LogRenderCall() {
+ skew_estimator_.LogRenderCall();
}
rtc::Optional<DelayEstimate> RenderDelayControllerImpl::GetDelay(
@@ -131,24 +187,62 @@ rtc::Optional<DelayEstimate> RenderDelayControllerImpl::GetDelay(
delay_buf_.begin() + delay_buf_index_);
delay_buf_index_ = (delay_buf_index_ + kBlockSize) % delay_buf_.size();
- if (delay_samples) {
- // Compute and set new render delay buffer delay.
+ // Compute the latest skew update.
+ rtc::Optional<int> skew = skew_estimator_.GetSkewFromCapture();
- delay_ = ComputeNewBufferDelay(delay_, delay_headroom_blocks_,
- hysteresis_limit_1_blocks_,
- hysteresis_limit_2_blocks_, *delay_samples);
+ if (delay_samples) {
+ if (!delay_samples_ || delay_samples->delay != delay_samples_->delay) {
+ delay_change_counter_ = 0;
+ }
+ delay_samples_ = delay_samples;
+ }
- metrics_.Update(static_cast<int>(delay_samples->delay),
- delay_ ? delay_->delay : 0);
+ if (delay_change_counter_ < 2 * kNumBlocksPerSecond) {
+ ++delay_change_counter_;
+ // If a new delay estimate is recently obtained, store the skew for that.
+ skew_ = skew;
} else {
- metrics_.Update(rtc::nullopt, delay_ ? delay_->delay : 0);
+ // A reliable skew should have been obtained after 2 seconds.
+ RTC_DCHECK(skew_);
+ RTC_DCHECK(skew);
}
+ ++soft_reset_counter_;
+ int offset_blocks = 0;
+ if (skew_ && skew && delay_samples_ &&
+ delay_samples_->quality == DelayEstimate::Quality::kRefined) {
+ // Compute the skew offset and add a margin.
+ offset_blocks = *skew_ - *skew;
+ if (offset_blocks != 0 && soft_reset_counter_ > 10 * kNumBlocksPerSecond) {
+ // Soft reset the delay estimator if there is a significant offset
+ // detected.
+ delay_estimator_.Reset(true);
+ soft_reset_counter_ = 0;
+ }
+ }
+
+ if (delay_samples_) {
+ // Compute the render delay buffer delay.
+ delay_ = ComputeBufferDelay(
+ delay_, delay_headroom_blocks_, hysteresis_limit_1_blocks_,
+ hysteresis_limit_2_blocks_, offset_blocks, *delay_samples_);
+ }
+
+ metrics_.Update(delay_samples_ ? rtc::Optional<size_t>(delay_samples_->delay)
+ : rtc::nullopt,
+ delay_ ? delay_->delay : 0);
+
data_dumper_->DumpRaw("aec3_render_delay_controller_delay",
delay_samples ? delay_samples->delay : 0);
data_dumper_->DumpRaw("aec3_render_delay_controller_buffer_delay",
delay_ ? delay_->delay : 0);
+ data_dumper_->DumpRaw("aec3_render_delay_controller_new_skew",
+ skew ? *skew : 0);
+ data_dumper_->DumpRaw("aec3_render_delay_controller_old_skew",
+ skew_ ? *skew_ : 0);
+ data_dumper_->DumpRaw("aec3_render_delay_controller_offset", offset_blocks);
+
return delay_;
}
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h
index 5b1fc35ee97..842b8fffe51 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/render_delay_controller.h
@@ -32,6 +32,9 @@ class RenderDelayController {
// Resets the delay controller.
virtual void Reset() = 0;
+ // Logs a render call.
+ virtual void LogRenderCall() = 0;
+
// Aligns the render buffer content with the capture signal.
virtual rtc::Optional<DelayEstimate> GetDelay(
const DownsampledRenderBuffer& render_buffer,
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc b/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc
index 880f0aa65ab..36e227166f1 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc
+++ b/chromium/third_party/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc
@@ -180,7 +180,7 @@ int32_t WebRtcAecm_Init(void *aecmInst, int32_t sampFreq)
aecm->knownDelay = 0;
aecm->lastDelayDiff = 0;
- memset(&aecm->farendOld[0][0], 0, 160);
+ memset(&aecm->farendOld, 0, sizeof(aecm->farendOld));
// Default settings.
aecConfig.cngMode = AecmTrue;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h b/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h
index 65c050150bc..07218264f4f 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/include/audio_processing.h
@@ -1235,7 +1235,7 @@ struct EchoCanceller3Config {
struct Delay {
size_t default_delay = 5;
size_t down_sampling_factor = 4;
- size_t num_filters = 4;
+ size_t num_filters = 5;
size_t api_call_jitter_blocks = 26;
size_t min_echo_path_delay_blocks = 0;
size_t delay_headroom_blocks = 2;
diff --git a/chromium/third_party/webrtc/video/video_send_stream.cc b/chromium/third_party/webrtc/video/video_send_stream.cc
index a4d657be34e..c14d9646801 100644
--- a/chromium/third_party/webrtc/video/video_send_stream.cc
+++ b/chromium/third_party/webrtc/video/video_send_stream.cc
@@ -771,6 +771,10 @@ VideoSendStreamImpl::VideoSendStreamImpl(
transport->send_side_cc()->EnablePeriodicAlrProbing(true);
transport->pacer()->SetPacingFactor(alr_settings->pacing_factor);
transport->pacer()->SetQueueTimeLimit(alr_settings->max_paced_queue_time);
+ } else {
+ transport->send_side_cc()->EnablePeriodicAlrProbing(false);
+ transport->pacer()->SetPacingFactor(PacedSender::kDefaultPaceMultiplier);
+ transport->pacer()->SetQueueTimeLimit(PacedSender::kMaxQueueLengthMs);
}
}
diff --git a/chromium/tools/metrics/histograms/enums.xml b/chromium/tools/metrics/histograms/enums.xml
index 85270091a38..0f26a770d28 100644
--- a/chromium/tools/metrics/histograms/enums.xml
+++ b/chromium/tools/metrics/histograms/enums.xml
@@ -32780,6 +32780,8 @@ Called by update_net_trust_anchors.py.-->
<int value="15" label="Invalid order - first paint / first contentful paint"/>
<int value="16" label="Invalid order - first paint / first meaningful paint"/>
<int value="17" label="Invalid order - first meaningful paint / interactive"/>
+ <int value="18" label="First input delay without first input timestamp"/>
+ <int value="19" label="First input timestamp without first input delay"/>
</enum>
<enum name="PageScaleFactorRange">
diff --git a/chromium/tools/metrics/histograms/histograms.xml b/chromium/tools/metrics/histograms/histograms.xml
index 46d88ec9434..b4ec73078f6 100644
--- a/chromium/tools/metrics/histograms/histograms.xml
+++ b/chromium/tools/metrics/histograms/histograms.xml
@@ -14414,6 +14414,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<summary>Whether Chrome was the default browser when it started up.</summary>
</histogram>
+<histogram name="DefaultBrowser.Win10ChooserInvoked" enum="BooleanSuccess">
+ <owner>pmonette@chromium.org</owner>
+ <summary>
+ When changing the default browser on Windows 10, records whether the browser
+ chooser is successfully invoked when opening the settings page. This
+ histogram is only recorded when the Win10AcceleratedDefaultBrowserFlow
+ experiment is enabled.
+ </summary>
+</histogram>
+
<histogram name="DefaultBrowserWarning.DontSetAsDefault" enum="BooleanHit">
<obsolete>
Deprecated 2015/11. The same information is available as the value Failure
@@ -58910,6 +58920,25 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
+<histogram name="PageLoad.InteractiveTiming.FirstInputDelay" units="ms">
+ <owner>tdresser@chromium.org</owner>
+ <summary>
+ Measures First Input Delay, the duration between the hardware timestamp and
+ the start of event processing on the main thread for the first meaningful
+ input per navigation. See https://goo.gl/tr1oTZ for a detailed explanation.
+ In ms.
+ </summary>
+</histogram>
+
+<histogram name="PageLoad.InteractiveTiming.FirstInputTimestamp" units="ms">
+ <owner>tdresser@chromium.org</owner>
+ <summary>
+ The duration between navigation start and the hardware timestamp of the
+ first meaningful input per navigation. See https://goo.gl/tr1oTZ for a
+ detailed explanation. In ms.
+ </summary>
+</histogram>
+
<histogram name="PageLoad.Internal.ClientRedirect.FirstPaintToNavigation"
units="ms">
<owner>bmcquade@chromium.org</owner>
diff --git a/chromium/tools/metrics/ukm/ukm.xml b/chromium/tools/metrics/ukm/ukm.xml
index 81f841166a5..883768d351f 100644
--- a/chromium/tools/metrics/ukm/ukm.xml
+++ b/chromium/tools/metrics/ukm/ukm.xml
@@ -1402,6 +1402,21 @@ be describing additional metrics about the same event.
frame documents.
</summary>
</metric>
+ <metric name="InteractiveTiming.FirstInputDelay">
+ <summary>
+ Measures First Input Delay, the duration between the hardware timestamp
+ and the start of event processing on the main thread for the first
+ meaningful input per navigation. See https://goo.gl/tr1oTZ for a detailed
+ explanation. In ms.
+ </summary>
+ </metric>
+ <metric name="InteractiveTiming.FirstInputTimestamp">
+ <summary>
+ The duration between navigation start and the hardware timestamp of the
+ first meaningful input per navigation. See https://goo.gl/tr1oTZ for a
+ detailed explanation. In ms.
+ </summary>
+ </metric>
<metric name="Navigation.PageTransition">
<summary>
The |ui::PageTransition| for the main frame navigation of this page load.
diff --git a/chromium/ui/accessibility/extensions/strings/accessibility_extensions_strings_sk.xtb b/chromium/ui/accessibility/extensions/strings/accessibility_extensions_strings_sk.xtb
index 8bc63829f0b..c353255fd26 100644
--- a/chromium/ui/accessibility/extensions/strings/accessibility_extensions_strings_sk.xtb
+++ b/chromium/ui/accessibility/extensions/strings/accessibility_extensions_strings_sk.xtb
@@ -43,7 +43,7 @@
<translation id="5631241868147802353">Predvolebná farebná schéma:</translation>
<translation id="5650358096585648000">Vizuálna odozva</translation>
<translation id="5710185147685935461">Zmena alebo invertovanie farebnej schémy, aby sa dali webové stránky ľahšie čítať.</translation>
-<translation id="5939518447894949180">Obnoviť</translation>
+<translation id="5939518447894949180">Resetovať</translation>
<translation id="595639123821853262">Invertované odtiene sivej</translation>
<translation id="6017514345406065928">Zelená</translation>
<translation id="6050189528197190982">Odtiene sivej</translation>
diff --git a/chromium/ui/app_list/BUILD.gn b/chromium/ui/app_list/BUILD.gn
index a626d5dc5fa..d5a40a53aec 100644
--- a/chromium/ui/app_list/BUILD.gn
+++ b/chromium/ui/app_list/BUILD.gn
@@ -78,6 +78,8 @@ component("app_list") {
"views/search_result_actions_view_delegate.h",
"views/search_result_answer_card_view.cc",
"views/search_result_answer_card_view.h",
+ "views/search_result_base_view.cc",
+ "views/search_result_base_view.h",
"views/search_result_container_view.cc",
"views/search_result_container_view.h",
"views/search_result_list_view.cc",
diff --git a/chromium/ui/aura/window_tree_host.cc b/chromium/ui/aura/window_tree_host.cc
index 27b2b8989bd..de85e1d8f2d 100644
--- a/chromium/ui/aura/window_tree_host.cc
+++ b/chromium/ui/aura/window_tree_host.cc
@@ -297,7 +297,9 @@ void WindowTreeHost::CreateCompositor(const viz::FrameSinkId& frame_sink_id,
base::ThreadTaskRunnerHandle::Get(), enable_surface_synchronization,
ui::IsPixelCanvasRecordingEnabled(), external_begin_frames_enabled,
force_software_compositor));
+#if defined(OS_CHROMEOS)
compositor_->AddObserver(this);
+#endif
if (!dispatcher()) {
window()->Init(ui::LAYER_NOT_DRAWN);
window()->set_host(this);
diff --git a/chromium/ui/aura/window_tree_host_unittest.cc b/chromium/ui/aura/window_tree_host_unittest.cc
index e1ee4cbcc0b..6dbddb67770 100644
--- a/chromium/ui/aura/window_tree_host_unittest.cc
+++ b/chromium/ui/aura/window_tree_host_unittest.cc
@@ -77,6 +77,7 @@ TEST_F(WindowTreeHostTest, DPIWindowSize) {
host()->compositor()->root_layer()->subpixel_position_offset());
}
+#if defined(OS_CHROMEOS)
TEST_F(WindowTreeHostTest, HoldPointerMovesOnChildResizing) {
aura::WindowEventDispatcher* dispatcher = host()->dispatcher();
@@ -98,6 +99,7 @@ TEST_F(WindowTreeHostTest, HoldPointerMovesOnChildResizing) {
// Pointer moves should be routed normally after commit.
EXPECT_FALSE(dispatcher_api.HoldingPointerMoves());
}
+#endif
TEST_F(WindowTreeHostTest, NoRewritesPostIME) {
CounterEventRewriter event_rewriter;
diff --git a/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc b/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
index 07c321c9ed8..5242dc7f55c 100644
--- a/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
+++ b/chromium/ui/events/ozone/evdev/input_device_factory_evdev.cc
@@ -508,7 +508,9 @@ void InputDeviceFactoryEvdev::EnablePalmSuppression(bool enabled) {
if (enabled == palm_suppression_enabled_)
return;
palm_suppression_enabled_ = enabled;
- ApplyInputDeviceSettings();
+
+ for (const auto& it : converters_)
+ it.second->SetEnabled(IsDeviceEnabled(it.second.get()));
}
} // namespace ui
diff --git a/chromium/ui/login/display_manager.js b/chromium/ui/login/display_manager.js
index 3e739441e99..b1bededb799 100644
--- a/chromium/ui/login/display_manager.js
+++ b/chromium/ui/login/display_manager.js
@@ -752,6 +752,8 @@ cr.define('cr.ui.login', function() {
if (screen.updateLocalizedContent)
screen.updateLocalizedContent();
}
+ var isInTabletMode = loadTimeData.getBoolean('isInTabletMode');
+ this.setTabletModeState_(isInTabletMode);
var currentScreenId = this.screens_[this.currentStep_];
var currentScreen = $(currentScreenId);
@@ -764,6 +766,18 @@ cr.define('cr.ui.login', function() {
},
/**
+ * Updates "device in tablet mode" state when tablet mode is changed.
+ * @param {Boolean} isInTabletMode True when in tablet mode.
+ */
+ setTabletModeState_: function(isInTabletMode) {
+ for (var i = 0, screenId; screenId = this.screens_[i]; ++i) {
+ var screen = $(screenId);
+ if (screen.setTabletModeState)
+ screen.setTabletModeState(isInTabletMode);
+ }
+ },
+
+ /**
* Initialized first group of OOBE screens.
*/
initializeOOBEScreens: function() {
@@ -820,13 +834,11 @@ cr.define('cr.ui.login', function() {
* @private
*/
onWindowResize_: function() {
- var currentScreenId = this.screens_[this.currentStep_];
- var currentScreen = $(currentScreenId);
- if (currentScreen)
- currentScreen.onWindowResize();
- // The account picker always needs to be notified of window size changes.
- if (currentScreenId != SCREEN_ACCOUNT_PICKER && $(SCREEN_ACCOUNT_PICKER))
- $(SCREEN_ACCOUNT_PICKER).onWindowResize();
+ for (var i = 0, screenId; screenId = this.screens_[i]; ++i) {
+ var screen = $(screenId);
+ if (screen.onWindowResize)
+ screen.onWindowResize();
+ }
},
/*
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html
index 5902a64a662..a2ba57be7c2 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html
@@ -1,6 +1,5 @@
<link rel="import" href="chrome://resources/html/polymer.html">
-<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_network_icon.html">
<link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_onc_types.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys/iron-a11y-keys.html">
@@ -13,14 +12,6 @@
<dom-module id="network-config">
<template>
<style include="network-shared iron-flex">
- #error {
- color: red;
- font-weight: 500;
- }
-
- cr-network-icon {
- -webkit-margin-end: 10px;
- }
</style>
<!-- SSID (WiFi) -->
@@ -167,26 +158,6 @@
</div>
</template>
- <template is="dom-if"
- if="[[connectingIsVisible_(propertiesSent_, error_)]]">
- <div class="property-box">
- <div class="start layout horizontal center">
- <cr-network-icon is-list-item
- network-state="[[getIconState_(configProperties_)]]">
- </cr-network-icon>
- <div>[[i18n('OncConnecting')]]</div>
- </div>
- </div>
- </template>
-
- <template is="dom-if" if="[[error_]]">
- <div class="property-box">
- <div id="error" class="start">
- [[getError_(error_)]]
- </div>
- </div>
- </template>
-
</template>
<script src="network_config.js"></script>
</dom-module>
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js
index 26c479f7e0b..74cdc9b049f 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js
@@ -86,6 +86,12 @@ Polymer({
notify: true,
},
+ /** Set to any error from the last configuration result. */
+ error: {
+ type: String,
+ notify: true,
+ },
+
/** Set if |guid| is not empty once networkProperties are received. */
propertiesReceived_: Boolean,
@@ -219,9 +225,6 @@ Polymer({
value: null,
},
- /** @private */
- error_: String,
-
/**
* Object providing network type values for data binding. Note: Currently
* we only support WiFi, but support for other types will be following
@@ -343,37 +346,36 @@ Polymer({
this.guid = this.networkProperties.GUID;
this.type = this.networkProperties.Type;
if (this.guid) {
- this.networkingPrivate.getProperties(
- this.guid, this.getPropertiesCallback_.bind(this));
+ this.networkingPrivate.getProperties(this.guid, (properties) => {
+ this.getPropertiesCallback_(properties);
+ this.focusFirstInput_();
+ });
+ } else {
+ this.async(() => {
+ this.focusFirstInput_();
+ });
}
this.onCertificateListsChanged_();
this.updateIsConfigured_();
this.setShareNetwork_();
- requestAnimationFrame(() => {
- var e = this.$$(
- 'network-config-input:not([disabled]),' +
- 'network-config-select:not([disabled])');
- if (e)
- e.focus();
- });
},
saveOrConnect: function() {
if (this.propertiesSent_)
return;
this.propertiesSent_ = true;
- this.error_ = '';
+ this.error = '';
var propertiesToSet = this.getPropertiesToSet_();
if (this.getSource_() == CrOnc.Source.NONE) {
- // New non VPN network configurations default to 'AutoConnect' unless
- // prohibited by policy.
- var prohibitAutoConnect = this.globalPolicy &&
- this.globalPolicy.AllowOnlyPolicyNetworksToConnect;
- CrOnc.setTypeProperty(
- propertiesToSet, 'AutoConnect',
- this.type != CrOnc.Type.VPN && !prohibitAutoConnect);
-
+ // Set 'AutoConnect' to false for VPN or if prohibited by policy.
+ // Note: Do not set AutoConnect to true, the connection manager will do
+ // that on a successful connection (unless set to false here).
+ if (this.type == CrOnc.Type.VPN ||
+ (this.globalPolicy &&
+ this.globalPolicy.AllowOnlyPolicyNetworksToConnect)) {
+ CrOnc.setTypeProperty(propertiesToSet, 'AutoConnect', false);
+ }
// Create the configuration, then connect to it in the callback.
this.networkingPrivate.createNetwork(
this.shareNetwork_, propertiesToSet,
@@ -386,6 +388,16 @@ Polymer({
},
/** @private */
+ focusFirstInput_: function() {
+ Polymer.dom.flush();
+ var e = this.$$(
+ 'network-config-input:not([disabled]),' +
+ 'network-config-select:not([disabled])');
+ if (e)
+ e.focus();
+ },
+
+ /** @private */
connectIfConfigured_: function() {
if (!this.isConfigured_)
return;
@@ -893,7 +905,7 @@ Polymer({
/** @private */
updateCertError_: function() {
/** @const */ var certError = 'networkErrorNoUserCertificate';
- if (this.error_ && this.error_ != certError)
+ if (this.error && this.error != certError)
return;
var requireCerts = (this.showEap_ && this.showEap_.UserCert) ||
@@ -1029,14 +1041,6 @@ Polymer({
* @return {boolean}
* @private
*/
- connectingIsVisible_: function() {
- return this.propertiesSent_ && !this.error_;
- },
-
- /**
- * @return {boolean}
- * @private
- */
shareIsEnabled_: function() {
if (!this.shareAllowEnable || this.getSource_() != CrOnc.Source.NONE)
return false;
@@ -1202,8 +1206,8 @@ Polymer({
/** @private */
setPropertiesCallback_: function() {
this.setError_(this.getRuntimeError_());
- if (this.error_) {
- console.error('setProperties error: ' + this.guid + ': ' + this.error_);
+ if (this.error) {
+ console.error('setProperties error: ' + this.guid + ': ' + this.error);
this.propertiesSent_ = false;
return;
}
@@ -1223,10 +1227,10 @@ Polymer({
*/
createNetworkCallback_: function(guid) {
this.setError_(this.getRuntimeError_());
- if (this.error_) {
+ if (this.error) {
console.error(
'createNetworkError, type: ' + this.networkProperties.Type + ': ' +
- 'error: ' + this.error_);
+ 'error: ' + this.error);
this.propertiesSent_ = false;
return;
}
@@ -1278,38 +1282,11 @@ Polymer({
},
/**
- * @param {!chrome.networkingPrivate.NetworkConfigProperties} properties
- * @return {!CrOnc.NetworkStateProperties}
- * @private
- */
- getIconState_: function(properties) {
- return {
- ConnectionState: CrOnc.ConnectionState.CONNECTING,
- GUID: properties.GUID || '',
- Type: this.type,
- };
- },
-
- /**
* @param {string|undefined} error
* @private
*/
setError_: function(error) {
- if (!error) {
- this.error_ = '';
- return;
- }
- this.error_ = error;
+ this.error = error || '';
},
-
- /**
- * @return {string}
- * @private
- */
- getError_: function() {
- if (this.i18nExists(this.error_))
- return this.i18n(this.error_);
- return this.i18n('networkErrorUnknown');
- }
});
})();
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.html b/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.html
index 7cf53bad009..0f8bc18aa14 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.html
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.html
@@ -69,7 +69,7 @@
<template is="dom-if"
if="[[i18nExists('networkGoogleNameserversLearnMoreUrl')]]">
<a href="[[i18n('networkGoogleNameserversLearnMoreUrl')]]"
- target="_blank">
+ target="_blank" on-tap="doNothing_">
[[i18n('networkNameserversLearnMore')]]
</a>
</template>
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js b/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js
index b9e9cf47da5..c59320d6aaa 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js
@@ -238,4 +238,12 @@ Polymer({
clearEmptyNameServers_: function(nameservers) {
return nameservers.filter((nameserver) => !!nameserver);
},
+
+ /**
+ * @param {!Event} event
+ * @private
+ */
+ doNothing_: function(event) {
+ event.stopPropagation();
+ },
});
diff --git a/chromium/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp b/chromium/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp
index d7600a57f6e..d4b76454dc0 100644
--- a/chromium/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp
+++ b/chromium/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp
@@ -54,6 +54,7 @@
{
'target_name': 'cr_onc_types',
'dependencies': [
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:util',
'<(EXTERNS_GYP):networking_private',
],
'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'],
diff --git a/chromium/ui/webui/resources/cr_elements/chromeos/network/cr_onc_types.js b/chromium/ui/webui/resources/cr_elements/chromeos/network/cr_onc_types.js
index 9a2d13ef567..5a7ed921c7b 100644
--- a/chromium/ui/webui/resources/cr_elements/chromeos/network/cr_onc_types.js
+++ b/chromium/ui/webui/resources/cr_elements/chromeos/network/cr_onc_types.js
@@ -424,6 +424,15 @@ CrOnc.getNetworkName = function(properties) {
/**
* @param {!CrOnc.NetworkProperties|!CrOnc.NetworkStateProperties|undefined}
+ * properties The ONC network properties or state properties.
+ * @return {string} The name to display for |network|.
+ */
+CrOnc.getEscapedNetworkName = function(properties) {
+ return HTMLEscape(CrOnc.getNetworkName(properties));
+};
+
+/**
+ * @param {!CrOnc.NetworkProperties|!CrOnc.NetworkStateProperties|undefined}
* properties The ONC network properties or state properties.
* @return {boolean} True if |properties| is a Cellular network with a
* locked SIM.
diff --git a/chromium/v8/include/v8-version.h b/chromium/v8/include/v8-version.h
index 3d7bcda96a8..6cc98294ec5 100644
--- a/chromium/v8/include/v8-version.h
+++ b/chromium/v8/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 5
#define V8_BUILD_NUMBER 254
-#define V8_PATCH_LEVEL 21
+#define V8_PATCH_LEVEL 31
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/chromium/v8/src/compiler/access-builder.cc b/chromium/v8/src/compiler/access-builder.cc
index dfce11b37eb..13d6801c323 100644
--- a/chromium/v8/src/compiler/access-builder.cc
+++ b/chromium/v8/src/compiler/access-builder.cc
@@ -56,7 +56,7 @@ FieldAccess AccessBuilder::ForHeapNumberValue() {
FieldAccess AccessBuilder::ForBigIntBitfield() {
FieldAccess access = {
kTaggedBase, BigInt::kBitfieldOffset, MaybeHandle<Name>(),
- MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::Int32(),
+ MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::IntPtr(),
kNoWriteBarrier};
return access;
}
diff --git a/chromium/v8/src/compiler/effect-control-linearizer.cc b/chromium/v8/src/compiler/effect-control-linearizer.cc
index 2b7d1ef9ddf..a47941e28dc 100644
--- a/chromium/v8/src/compiler/effect-control-linearizer.cc
+++ b/chromium/v8/src/compiler/effect-control-linearizer.cc
@@ -1175,9 +1175,9 @@ void EffectControlLinearizer::TruncateTaggedPointerToBit(
__ Bind(&if_bigint);
{
Node* bitfield = __ LoadField(AccessBuilder::ForBigIntBitfield(), value);
- Node* length_is_zero = __ Word32Equal(
- __ Word32And(bitfield, __ Int32Constant(BigInt::LengthBits::kMask)),
- zero);
+ Node* length_is_zero = __ WordEqual(
+ __ WordAnd(bitfield, __ IntPtrConstant(BigInt::LengthBits::kMask)),
+ __ IntPtrConstant(0));
__ Goto(done, __ Word32Equal(length_is_zero, zero));
}
}
diff --git a/chromium/v8/src/flag-definitions.h b/chromium/v8/src/flag-definitions.h
index 9aa437bc06f..e40e182dad5 100644
--- a/chromium/v8/src/flag-definitions.h
+++ b/chromium/v8/src/flag-definitions.h
@@ -497,6 +497,8 @@ DEFINE_DEBUG_BOOL(wasm_trace_native_heap, false,
"trace wasm native heap events")
DEFINE_BOOL(wasm_jit_to_native, true,
"JIT wasm code to native (not JS GC) memory")
+DEFINE_BOOL(wasm_write_protect_code_memory, false,
+ "write protect code memory on the wasm native heap")
DEFINE_IMPLICATION(future, wasm_jit_to_native)
DEFINE_BOOL(wasm_trace_serialization, false,
"trace serialization/deserialization")
diff --git a/chromium/v8/src/heap/spaces.cc b/chromium/v8/src/heap/spaces.cc
index 750a8dc3769..2dd5e9b24de 100644
--- a/chromium/v8/src/heap/spaces.cc
+++ b/chromium/v8/src/heap/spaces.cc
@@ -352,8 +352,8 @@ void MemoryAllocator::Unmapper::WaitUntilCompleted() {
CancelableTaskManager::kTaskAborted) {
pending_unmapping_tasks_semaphore_.Wait();
}
- concurrent_unmapping_tasks_active_ = 0;
}
+ concurrent_unmapping_tasks_active_ = 0;
}
template <MemoryAllocator::Unmapper::FreeMode mode>
diff --git a/chromium/v8/src/ic/handler-configuration.cc b/chromium/v8/src/ic/handler-configuration.cc
index 94d3b33fb18..19614a4322c 100644
--- a/chromium/v8/src/ic/handler-configuration.cc
+++ b/chromium/v8/src/ic/handler-configuration.cc
@@ -121,9 +121,15 @@ Handle<Object> LoadHandler::LoadFromPrototype(Isolate* isolate,
int checks_count = GetPrototypeCheckCount<LoadHandler>(
isolate, &smi_handler, receiver_map, holder, data1, maybe_data2);
- Handle<Cell> validity_cell =
+ Handle<Object> validity_cell =
Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate);
- DCHECK(!validity_cell.is_null());
+ if (validity_cell.is_null()) {
+ // Although in case of kApiGetter we load from receiver we still have to
+ // use the "prototype" shape of a handler in order to provide additional
+ // data to the dispatcher.
+ DCHECK_EQ(kApiGetter, GetHandlerKind(*smi_handler));
+ validity_cell = handle(Smi::kZero, isolate);
+ }
int data_count = 1 + checks_count;
Handle<LoadHandler> handler = isolate->factory()->NewLoadHandler(data_count);
diff --git a/chromium/v8/src/objects.cc b/chromium/v8/src/objects.cc
index c5c563b4dbe..f8c55e57a63 100644
--- a/chromium/v8/src/objects.cc
+++ b/chromium/v8/src/objects.cc
@@ -12978,6 +12978,56 @@ void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) {
map->StartInobjectSlackTracking();
}
+namespace {
+bool FastInitializeDerivedMap(Isolate* isolate, Handle<JSFunction> new_target,
+ Handle<JSFunction> constructor,
+ Handle<Map> constructor_initial_map) {
+ // Check that |function|'s initial map still in sync with the |constructor|,
+ // otherwise we must create a new initial map for |function|.
+ if (new_target->has_initial_map() &&
+ new_target->initial_map()->GetConstructor() == *constructor) {
+ DCHECK(new_target->instance_prototype()->IsJSReceiver());
+ return true;
+ }
+ InstanceType instance_type = constructor_initial_map->instance_type();
+ DCHECK(CanSubclassHaveInobjectProperties(instance_type));
+ // Create a new map with the size and number of in-object properties
+ // suggested by |function|.
+
+ // Link initial map and constructor function if the new.target is actually a
+ // subclass constructor.
+ if (!IsDerivedConstructor(new_target->shared()->kind())) return false;
+
+ int instance_size;
+ int in_object_properties;
+ int embedder_fields =
+ JSObject::GetEmbedderFieldCount(*constructor_initial_map);
+ bool success = JSFunction::CalculateInstanceSizeForDerivedClass(
+ new_target, instance_type, embedder_fields, &instance_size,
+ &in_object_properties);
+
+ Handle<Map> map;
+ if (success) {
+ int pre_allocated = constructor_initial_map->GetInObjectProperties() -
+ constructor_initial_map->UnusedPropertyFields();
+ CHECK_LE(constructor_initial_map->UsedInstanceSize(), instance_size);
+ int unused_property_fields = in_object_properties - pre_allocated;
+ map = Map::CopyInitialMap(constructor_initial_map, instance_size,
+ in_object_properties, unused_property_fields);
+ } else {
+ map = Map::CopyInitialMap(constructor_initial_map);
+ }
+ map->set_new_target_is_base(false);
+ Handle<Object> prototype(new_target->instance_prototype(), isolate);
+ JSFunction::SetInitialMap(new_target, map, prototype);
+ DCHECK(new_target->instance_prototype()->IsJSReceiver());
+ map->SetConstructor(*constructor);
+ map->set_construction_counter(Map::kNoSlackTracking);
+ map->StartInobjectSlackTracking();
+ return true;
+}
+
+} // namespace
// static
MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate,
@@ -12988,55 +13038,16 @@ MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate,
Handle<Map> constructor_initial_map(constructor->initial_map(), isolate);
if (*new_target == *constructor) return constructor_initial_map;
+ Handle<Map> result_map;
// Fast case, new.target is a subclass of constructor. The map is cacheable
// (and may already have been cached). new.target.prototype is guaranteed to
// be a JSReceiver.
if (new_target->IsJSFunction()) {
Handle<JSFunction> function = Handle<JSFunction>::cast(new_target);
-
- // Check that |function|'s initial map still in sync with the |constructor|,
- // otherwise we must create a new initial map for |function|.
- if (function->has_initial_map() &&
- function->initial_map()->GetConstructor() == *constructor) {
+ if (FastInitializeDerivedMap(isolate, function, constructor,
+ constructor_initial_map)) {
return handle(function->initial_map(), isolate);
}
-
- // Create a new map with the size and number of in-object properties
- // suggested by |function|.
-
- // Link initial map and constructor function if the new.target is actually a
- // subclass constructor.
- if (IsDerivedConstructor(function->shared()->kind())) {
- Handle<Object> prototype(function->instance_prototype(), isolate);
- InstanceType instance_type = constructor_initial_map->instance_type();
- DCHECK(CanSubclassHaveInobjectProperties(instance_type));
- int embedder_fields =
- JSObject::GetEmbedderFieldCount(*constructor_initial_map);
- int pre_allocated = constructor_initial_map->GetInObjectProperties() -
- constructor_initial_map->UnusedPropertyFields();
- int instance_size;
- int in_object_properties;
- bool success = CalculateInstanceSizeForDerivedClass(
- function, instance_type, embedder_fields, &instance_size,
- &in_object_properties);
-
- int unused_property_fields = in_object_properties - pre_allocated;
-
- Handle<Map> map;
- if (success) {
- map = Map::CopyInitialMap(constructor_initial_map, instance_size,
- in_object_properties, unused_property_fields);
- } else {
- map = Map::CopyInitialMap(constructor_initial_map);
- }
- map->set_new_target_is_base(false);
-
- JSFunction::SetInitialMap(function, map, prototype);
- map->SetConstructor(*constructor);
- map->set_construction_counter(Map::kNoSlackTracking);
- map->StartInobjectSlackTracking();
- return map;
- }
}
// Slow path, new.target is either a proxy or can't cache the map.
@@ -13078,7 +13089,7 @@ MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate,
Handle<Map> map = Map::CopyInitialMap(constructor_initial_map);
map->set_new_target_is_base(false);
- DCHECK(prototype->IsJSReceiver());
+ CHECK(prototype->IsJSReceiver());
if (map->prototype() != *prototype) Map::SetPrototype(map, prototype);
map->SetConstructor(*constructor);
return map;
@@ -13773,15 +13784,17 @@ void JSFunction::CalculateInstanceSizeHelper(InstanceType instance_type,
int* instance_size,
int* in_object_properties) {
int header_size = JSObject::GetHeaderSize(instance_type, has_prototype_slot);
- DCHECK_LE(requested_embedder_fields,
- (JSObject::kMaxInstanceSize - header_size) >> kPointerSizeLog2);
+ int max_nof_fields =
+ (JSObject::kMaxInstanceSize - header_size) >> kPointerSizeLog2;
+ CHECK_LE(max_nof_fields, JSObject::kMaxInObjectProperties);
+ *in_object_properties = Min(requested_in_object_properties, max_nof_fields);
+ CHECK_LE(requested_embedder_fields, max_nof_fields - *in_object_properties);
*instance_size =
- Min(header_size +
- ((requested_embedder_fields + requested_in_object_properties)
- << kPointerSizeLog2),
- JSObject::kMaxInstanceSize);
- *in_object_properties = ((*instance_size - header_size) >> kPointerSizeLog2) -
- requested_embedder_fields;
+ header_size +
+ ((requested_embedder_fields + *in_object_properties) << kPointerSizeLog2);
+ CHECK_EQ(*in_object_properties,
+ ((*instance_size - header_size) >> kPointerSizeLog2) -
+ requested_embedder_fields);
}
// static
@@ -13791,7 +13804,6 @@ bool JSFunction::CalculateInstanceSizeForDerivedClass(
int* in_object_properties) {
Isolate* isolate = function->GetIsolate();
int expected_nof_properties = 0;
- bool result = true;
for (PrototypeIterator iter(isolate, function, kStartAtReceiver);
!iter.IsAtEnd(); iter.Advance()) {
Handle<JSReceiver> current =
@@ -13804,21 +13816,24 @@ bool JSFunction::CalculateInstanceSizeForDerivedClass(
if (shared->is_compiled() ||
Compiler::Compile(func, Compiler::CLEAR_EXCEPTION)) {
DCHECK(shared->is_compiled());
- expected_nof_properties += shared->expected_nof_properties();
+ int count = shared->expected_nof_properties();
+ // Check that the estimate is sane.
+ if (expected_nof_properties <= JSObject::kMaxInObjectProperties - count) {
+ expected_nof_properties += count;
+ } else {
+ expected_nof_properties = JSObject::kMaxInObjectProperties;
+ }
} else if (!shared->is_compiled()) {
// In case there was a compilation error for the constructor we will
// throw an error during instantiation. Hence we directly return 0;
- result = false;
- break;
- }
- if (!IsDerivedConstructor(shared->kind())) {
- break;
+ return false;
}
+ if (!IsDerivedConstructor(shared->kind())) break;
}
CalculateInstanceSizeHelper(instance_type, true, requested_embedder_fields,
expected_nof_properties, instance_size,
in_object_properties);
- return result;
+ return true;
}
diff --git a/chromium/v8/src/objects.h b/chromium/v8/src/objects.h
index 4011054c39d..93f4a4eb95b 100644
--- a/chromium/v8/src/objects.h
+++ b/chromium/v8/src/objects.h
@@ -2672,6 +2672,7 @@ class JSObject: public JSReceiver {
STATIC_ASSERT(kHeaderSize == Internals::kJSObjectHeaderSize);
static const int kMaxInObjectProperties =
(kMaxInstanceSize - kHeaderSize) >> kPointerSizeLog2;
+ STATIC_ASSERT(kMaxInObjectProperties <= kMaxNumberOfDescriptors);
class BodyDescriptor;
// No weak fields.
diff --git a/chromium/v8/src/runtime/runtime-test.cc b/chromium/v8/src/runtime/runtime-test.cc
index c2eefcbd4e2..01e2b198a64 100644
--- a/chromium/v8/src/runtime/runtime-test.cc
+++ b/chromium/v8/src/runtime/runtime-test.cc
@@ -617,10 +617,12 @@ RUNTIME_FUNCTION(Runtime_NotifyContextDisposed) {
RUNTIME_FUNCTION(Runtime_SetAllocationTimeout) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 2 || args.length() == 3);
-#ifdef DEBUG
- CONVERT_INT32_ARG_CHECKED(interval, 0);
+#ifdef V8_ENABLE_ALLOCATION_TIMEOUT
CONVERT_INT32_ARG_CHECKED(timeout, 1);
isolate->heap()->set_allocation_timeout(timeout);
+#endif
+#ifdef DEBUG
+ CONVERT_INT32_ARG_CHECKED(interval, 0);
FLAG_gc_interval = interval;
if (args.length() == 3) {
// Enable/disable inline allocation if requested.
diff --git a/chromium/v8/src/wasm/module-compiler.cc b/chromium/v8/src/wasm/module-compiler.cc
index 476afb52c2e..4a2e610b99b 100644
--- a/chromium/v8/src/wasm/module-compiler.cc
+++ b/chromium/v8/src/wasm/module-compiler.cc
@@ -891,7 +891,8 @@ compiler::ModuleEnv CreateModuleEnvFromCompiledModule(
std::vector<GlobalHandleAddress> function_tables;
int num_function_tables = static_cast<int>(module->function_tables.size());
- FixedArray* ft = compiled_module->function_tables();
+ FixedArray* ft =
+ num_function_tables == 0 ? nullptr : compiled_module->function_tables();
for (int i = 0; i < num_function_tables; ++i) {
// TODO(clemensh): defer these handles for concurrent compilation.
function_tables.push_back(WasmCompiledModule::GetTableValue(ft, i));
@@ -3466,14 +3467,20 @@ void InstanceBuilder::LoadTableSegments(Handle<FixedArray> code_table,
Code::cast(code_table->get(static_cast<int>(func_index)));
// Only increase the counter for lazy compile builtins (it's not
// needed otherwise).
- if (code->is_wasm_code()) continue;
- DCHECK_EQ(Builtins::kWasmCompileLazy, code->builtin_index());
+ if (code->builtin_index() != Builtins::kWasmCompileLazy) {
+ DCHECK(code->kind() == Code::WASM_FUNCTION ||
+ code->kind() == Code::WASM_TO_JS_FUNCTION);
+ continue;
+ }
} else {
const wasm::WasmCode* code = native_module->GetCode(func_index);
// Only increase the counter for lazy compile builtins (it's not
// needed otherwise).
- if (code->kind() == wasm::WasmCode::kFunction) continue;
- DCHECK_EQ(wasm::WasmCode::kLazyStub, code->kind());
+ if (code->kind() != wasm::WasmCode::kLazyStub) {
+ DCHECK(code->kind() == wasm::WasmCode::kFunction ||
+ code->kind() == wasm::WasmCode::kWasmToJsWrapper);
+ continue;
+ }
}
++num_table_exports[func_index];
}
diff --git a/chromium/v8/src/wasm/wasm-code-manager.cc b/chromium/v8/src/wasm/wasm-code-manager.cc
index 3dab47702c1..8e46f33b012 100644
--- a/chromium/v8/src/wasm/wasm-code-manager.cc
+++ b/chromium/v8/src/wasm/wasm-code-manager.cc
@@ -734,7 +734,11 @@ bool WasmCodeManager::Commit(Address start, size_t size) {
remaining_uncommitted_.Increment(size);
return false;
}
- bool ret = SetPermissions(start, size, PageAllocator::kReadWrite);
+ PageAllocator::Permission permission = FLAG_wasm_write_protect_code_memory
+ ? PageAllocator::kReadWrite
+ : PageAllocator::kReadWriteExecute;
+
+ bool ret = SetPermissions(start, size, permission);
TRACE_HEAP("Setting rw permissions for %p:%p\n",
reinterpret_cast<void*>(start),
reinterpret_cast<void*>(start + size));
@@ -828,6 +832,7 @@ std::unique_ptr<NativeModule> WasmCodeManager::NewNativeModule(
return ret;
}
+ V8::FatalProcessOutOfMemory("WasmCodeManager::NewNativeModule");
return nullptr;
}
@@ -838,38 +843,40 @@ bool NativeModule::SetExecutable(bool executable) {
PageAllocator::Permission permission =
executable ? PageAllocator::kReadExecute : PageAllocator::kReadWrite;
+ if (FLAG_wasm_write_protect_code_memory) {
#if V8_OS_WIN
- // On windows, we need to switch permissions per separate virtual memory
- // reservation. This is really just a problem when the NativeModule is
- // growable (meaning can_request_more_memory_). That's 32-bit in production,
- // or unittests.
- // For now, in that case, we commit at reserved memory granularity.
- // Technically, that may be a waste, because we may reserve more than we use.
- // On 32-bit though, the scarce resource is the address space - committed or
- // not.
- if (can_request_more_memory_) {
- for (auto& vmem : owned_memory_) {
- if (!SetPermissions(vmem.address(), vmem.size(), permission)) {
- return false;
+ // On windows, we need to switch permissions per separate virtual memory
+ // reservation. This is really just a problem when the NativeModule is
+ // growable (meaning can_request_more_memory_). That's 32-bit in production,
+ // or unittests.
+ // For now, in that case, we commit at reserved memory granularity.
+ // Technically, that may be a waste, because we may reserve more than we
+ // use. On 32-bit though, the scarce resource is the address space -
+ // committed or not.
+ if (can_request_more_memory_) {
+ for (auto& vmem : owned_memory_) {
+ if (!SetPermissions(vmem.address(), vmem.size(), permission)) {
+ return false;
+ }
+ TRACE_HEAP("Set %p:%p to executable:%d\n", vmem.address(), vmem.end(),
+ executable);
}
- TRACE_HEAP("Set %p:%p to executable:%d\n", vmem.address(), vmem.end(),
- executable);
+ is_executable_ = executable;
+ return true;
}
- is_executable_ = executable;
- return true;
- }
#endif
- for (auto& range : allocated_memory_.ranges()) {
- // allocated_memory_ is fine-grained, so we need to
- // page-align it.
- size_t range_size = RoundUp(static_cast<size_t>(range.second - range.first),
- AllocatePageSize());
- if (!SetPermissions(range.first, range_size, permission)) {
- return false;
+ for (auto& range : allocated_memory_.ranges()) {
+ // allocated_memory_ is fine-grained, so we need to
+ // page-align it.
+ size_t range_size = RoundUp(
+ static_cast<size_t>(range.second - range.first), AllocatePageSize());
+ if (!SetPermissions(range.first, range_size, permission)) {
+ return false;
+ }
+ TRACE_HEAP("Set %p:%p to executable:%d\n",
+ reinterpret_cast<void*>(range.first),
+ reinterpret_cast<void*>(range.second), executable);
}
- TRACE_HEAP("Set %p:%p to executable:%d\n",
- reinterpret_cast<void*>(range.first),
- reinterpret_cast<void*>(range.second), executable);
}
is_executable_ = executable;
return true;
diff --git a/chromium/v8/tools/testrunner/local/variants.py b/chromium/v8/tools/testrunner/local/variants.py
index 73e9a6e6440..f1e9ad301e8 100644
--- a/chromium/v8/tools/testrunner/local/variants.py
+++ b/chromium/v8/tools/testrunner/local/variants.py
@@ -23,6 +23,7 @@ ALL_VARIANT_FLAGS = {
"stress_sampling": [["--stress-sampling-allocation-profiler=16384"]],
"trusted": [["--no-untrusted-code-mitigations"]],
"wasm_traps": [["--wasm_trap_handler", "--invoke-weak-callbacks", "--wasm-jit-to-native"]],
+ "wasm_no_native": [["--no-wasm-jit-to-native"]],
}
ALL_VARIANTS = set(ALL_VARIANT_FLAGS.keys())
diff --git a/chromium/v8/tools/whitespace.txt b/chromium/v8/tools/whitespace.txt
index 3650eb88c46..ed5e51f96a6 100644
--- a/chromium/v8/tools/whitespace.txt
+++ b/chromium/v8/tools/whitespace.txt
@@ -7,6 +7,6 @@ A Smi balks into a war and says:
The doubles heard this and started to unbox.
The Smi looked at them when a crazy v8-autoroll account showed up...
The autoroller bought a round of Himbeerbrause. Suddenly...
-The bartender starts to shake the bottles......................
+The bartender starts to shake the bottles.......................
.
.