diff --git a/BUILD.gn b/BUILD.gn index e8c8a8450ff832..2b0316b01a1fed 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -804,6 +804,7 @@ group("gn_all") { "//tools/perf/contrib/vr_benchmarks:vr_perf_tests${_target_suffix}", ] } + deps += [ "//wolvic:empty_group" ] } } diff --git a/DEPS b/DEPS index 014f50b3960bc0..7706aa295416e9 100644 --- a/DEPS +++ b/DEPS @@ -197,7 +197,7 @@ vars = { # Available images: # Emulation: # - core.x64-dfv2 - # - terminal.x64 + # - terminal.qemu-x64 # - terminal.qemu-arm64 # - workstation.qemu-x64 # Hardware: @@ -207,7 +207,7 @@ vars = { # Since the images are hundreds of MB, default to only downloading the image # most commonly useful for developers. Bots and developers that need to use # other images can override this with additional images. - 'checkout_fuchsia_boot_images': "terminal.x64", + 'checkout_fuchsia_boot_images': "terminal.qemu-x64", 'checkout_fuchsia_product_bundles': '"{checkout_fuchsia_boot_images}" != ""', # By default, do not check out files required to run fuchsia tests in @@ -311,22 +311,23 @@ vars = { 'swiftshader_git': 'https://swiftshader.googlesource.com', 'webrtc_git': 'https://webrtc.googlesource.com', 'betocore_git': 'https://beto-core.googlesource.com', + 'igalia_git': 'https://github.com/Igalia', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'src_internal_revision': '404c52d4c1c576946ac21195a3cbebd23b67d197', + 'src_internal_revision': '4a132729e0ebad9260aed57ecf0f993702a57c14', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '75038d50e273d648e6b3f67b300da8522ff86817', + 'skia_revision': 'bd56a010b6941116cd1900276bf5201f9a9c73da', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '935bdbf34c05332eb418be80b48225350b10ec72', + 'v8_revision': 'f0f8f4b2e7df9dc17dc0990766a65ca0489b6bdb', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '17c4741d70dd5a98724a5a8316dc7e05a9b6d48e', + 'angle_revision': 'refs/heads/wolvic_update_m118', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -334,7 +335,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': 'd7470394271b6a6856e28ec905b19a12100f2797', + 'pdfium_revision': '6e55da0c45788fdc22fa3aab7ead414fc42b74c1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling BoringSSL # and whatever else without interference from each other. @@ -345,7 +346,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. - 'fuchsia_version': 'version:14.20230902.2.1', + 'fuchsia_version': 'version:14.20230831.4.45', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling google-toolbox-for-mac # and whatever else without interference from each other. @@ -409,7 +410,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'f81e15369a798ff5a2b7945fce15fa18b108b37c', + 'devtools_frontend_revision': 'bcf0ed097be848d234fb5290c1e4d69672dc5405', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -449,7 +450,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': 'f8fa217798a7f4dfc1e4e54f9a3a8e0b7516de2b', + 'dawn_revision': 'deb3b674b26854204c8082ed93926207e42d3cf2', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -849,7 +850,7 @@ deps = { 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - 'ab66c2b66e1da79e52c4e619fbd5194d359725bf', + 'd3937e03d305894cba9eaf788e037ff13ab80af0', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1173,7 +1174,7 @@ deps = { }, 'src/third_party/angle': - Var('chromium_git') + '/angle/angle.git' + '@' + Var('angle_revision'), + Var('igalia_git') + '/wolvic-angle.git' + '@' + Var('angle_revision'), 'src/third_party/anonymous_tokens/src': Var('chromium_git') + '/external/github.com/google/anonymous-tokens.git' + '@' + '8c8d20953d502db31fec2353b199e6c22ef0236e', @@ -1305,7 +1306,7 @@ deps = { Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '6b4c0b6f798fc770aa7082e30ea27294eff7f485', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '653fa36a656834ea2d28ef252f5f0b48ff474e3e', 'condition': 'checkout_src_internal', }, @@ -1465,7 +1466,7 @@ deps = { Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + '41cdffd71c9948f63c7ad36e1fb0ff519aa7a37e', 'src/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '985b9a6f70e13f3db741fed121e4dcc3046ad494', + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'a622de35ac311c5ad390a7af80724634e5dc61ed', 'src/third_party/icu4j': { 'packages': [ @@ -1633,13 +1634,13 @@ deps = { }, 'src/third_party/libvpx/source/libvpx': - Var('chromium_git') + '/webm/libvpx.git' + '@' + '6da1bd01d64d3d246b633bf25c766dfe751345b7', + Var('chromium_git') + '/webm/libvpx.git' + '@' + '38a707faef72eeff89d669c553e7bfe9e08dba8f', 'src/third_party/libwebm/source': Var('chromium_git') + '/webm/libwebm.git' + '@' + 'e4fbea0c9751ae8aa86629b197a28d8276a2b0da', 'src/third_party/libwebp/src': - Var('chromium_git') + '/webm/libwebp.git' + '@' + 'fd7bb21c0cb56e8a82e9bfa376164b842f433f3b', + Var('chromium_git') + '/webm/libwebp.git' + '@' + '2af26267cdfcb63a88e5c74a85927a12d6ca1d76', 'src/third_party/libyuv': Var('chromium_git') + '/libyuv/libyuv.git' + '@' + '04821d1e7d60845525e8db55c7bcd41ef5be9406', @@ -1766,7 +1767,7 @@ deps = { Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '09a4f3ec842a8932341b195c5b01e141c8a16eb7', 'src/third_party/openscreen/src': - Var('chromium_git') + '/openscreen' + '@' + '91b081e995ec03894ce54eded84ebd3b45247d13', + Var('chromium_git') + '/openscreen' + '@' + 'fd0e81e558086c30fa91a4af89361cef8d1327e4', 'src/third_party/openxr/src': { 'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenXR-SDK' + '@' + '58a00cf85c39ad5ec4dc43a769624e420c06179a', @@ -1962,7 +1963,7 @@ deps = { Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '4c8d2f67ecd03fbd3cb4c517ef8461427b6d635d', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '5afcec093c1403fe9e3872706d04671cbc6d2983', + Var('webrtc_git') + '/src.git' + '@' + 'd8f2b0380b3ec980af35ce4b92ba6a211ec8c76d', # Wuffs' canonical repository is at github.com/google/wuffs, but we use # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file. @@ -2096,7 +2097,7 @@ deps = { 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'FSYVD4ri9cEGCRH5V6bQ8yPkyEJsJCt5FDSSsLhqJb8C', + 'version': 'YVQ3H_4TbqHx1eNIlrREtZnp0JFGSnLY4Rl_tW0nHzYC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -4027,7 +4028,7 @@ deps = { 'src/ui/gl/resources/angle-metal': { 'packages': [{ 'package': 'chromium/gpu/angle-metal-shader-libraries', - 'version': 'aeUpC6kkTbhimw4m_7ricveccDcAXfa8H5ww_LGerdYC', + 'version': 'yT6uBcSeF9Qjjq450WRhpY3QnE1vbNQLLJsIzoC4J1QC', }], 'dep_type': 'cipd', 'condition': 'checkout_mac or checkout_ios', @@ -4109,7 +4110,7 @@ deps = { # grepping. 'src/chrome/installer/mac/internal': { 'url': Var('chrome_git') + '/chrome/installer/mac/internal.git' + '@' + - 'd7fb448e1fc84c05c40719d83d785fe2a131e616', + 'ed0d43308e9fa81b929468a3e651cb60744d9415', 'condition': 'checkout_src_internal', }, @@ -4251,7 +4252,7 @@ deps = { 'src/ios_internal': { 'url': Var('chrome_git') + '/chrome/ios_internal.git' + '@' + - '0dd24c57938020754f9ef5f1b899a1a4ec14bd1e', + '75fdd01ec66965420e31d00af762bc6df29cd424', 'condition': 'checkout_ios and checkout_src_internal', }, diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn index 6ca744e4ce77df..9c6fb5f5ec2ca6 100644 --- a/android_webview/BUILD.gn +++ b/android_webview/BUILD.gn @@ -493,6 +493,7 @@ generate_jni("browser_jni_headers") { "java/src/org/chromium/android_webview/permission/AwPermissionRequest.java", "java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingConfigHelper.java", "java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingSafeModeAction.java", + "java/src/org/chromium/android_webview/supervised_user/AwSupervisedUserUrlClassifier.java", "java/src/org/chromium/android_webview/variations/VariationsSeedLoader.java", ] } @@ -607,6 +608,7 @@ android_library("browser_java") { "java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingConversionHelper.java", "java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingResponse.java", "java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingSafeModeAction.java", + "java/src/org/chromium/android_webview/supervised_user/AwSupervisedUserUrlClassifier.java", "java/src/org/chromium/android_webview/variations/FastVariationsSeedSafeModeAction.java", "java/src/org/chromium/android_webview/variations/VariationsSeedLoader.java", "java/src/org/chromium/android_webview/variations/VariationsSeedSafeModeAction.java", @@ -697,6 +699,7 @@ android_library("common_variations_java") { # compiled separately. android_library("common_platform_services_java") { sources = [ + "java/src/org/chromium/android_webview/common/AwSupervisedUserUrlClassifierDelegate.java", "java/src/org/chromium/android_webview/common/PlatformServiceBridge.java", "java/src/org/chromium/android_webview/common/PlatformServiceBridgeImpl.java", ] @@ -706,6 +709,7 @@ android_library("common_platform_services_java") { "//components/embedder_support/android/metrics:java", "//content/public/android:content_full_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//url:gurl_java", ] # The appropriate .class file will be loaded via a dependency to a library diff --git a/android_webview/browser/BUILD.gn b/android_webview/browser/BUILD.gn index 1971b530ef7ef5..050c962f9ab8a4 100644 --- a/android_webview/browser/BUILD.gn +++ b/android_webview/browser/BUILD.gn @@ -194,6 +194,10 @@ source_set("browser") { "safe_browsing/aw_url_checker_delegate_impl.h", "state_serializer.cc", "state_serializer.h", + "supervised_user/aw_supervised_user_throttle.cc", + "supervised_user/aw_supervised_user_throttle.h", + "supervised_user/aw_supervised_user_url_classifier.cc", + "supervised_user/aw_supervised_user_url_classifier.h", "tracing/aw_background_tracing_metrics_provider.cc", "tracing/aw_background_tracing_metrics_provider.h", "tracing/aw_trace_event_args_allowlist.cc", diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index 5ec7b2aec3e010..9d5db15974e134 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc @@ -32,6 +32,8 @@ #include "android_webview/browser/network_service/aw_url_loader_throttle.h" #include "android_webview/browser/safe_browsing/aw_safe_browsing_navigation_throttle.h" #include "android_webview/browser/safe_browsing/aw_url_checker_delegate_impl.h" +#include "android_webview/browser/supervised_user/aw_supervised_user_throttle.h" +#include "android_webview/browser/supervised_user/aw_supervised_user_url_classifier.h" #include "android_webview/browser/tracing/aw_tracing_delegate.h" #include "android_webview/common/aw_content_client.h" #include "android_webview/common/aw_descriptors.h" @@ -658,6 +660,17 @@ AwContentBrowserClient::CreateURLLoaderThrottles( } } + if ((request.destination == network::mojom::RequestDestination::kDocument || + request.destination == network::mojom::RequestDestination::kIframe) && + request.url.SchemeIsHTTPOrHTTPS()) { + AwSupervisedUserUrlClassifier* urlClassifier = + AwSupervisedUserUrlClassifier::GetInstance(); + if (urlClassifier->ShouldCreateThrottle()) { + result.push_back( + std::make_unique(urlClassifier)); + } + } + return result; } diff --git a/android_webview/browser/aw_feature_map.cc b/android_webview/browser/aw_feature_map.cc index dbde3a2ee2f5b1..59e92eb705c4da 100644 --- a/android_webview/browser/aw_feature_map.cc +++ b/android_webview/browser/aw_feature_map.cc @@ -36,6 +36,8 @@ const base::Feature* const kFeaturesExposedToJava[] = { &features::kWebViewZoomKeyboardShortcuts, &features::kWebViewClearFunctorInBackground, &features::kWebViewReportFrameMetrics, + &features::kWebViewSupervisedUserSiteDetection, + &features::kWebViewSupervisedUserSiteBlock, }; // static diff --git a/android_webview/browser/aw_field_trials.cc b/android_webview/browser/aw_field_trials.cc index 406f138923754f..d5067dbf10926c 100644 --- a/android_webview/browser/aw_field_trials.cc +++ b/android_webview/browser/aw_field_trials.cc @@ -11,6 +11,7 @@ #include "components/metrics/persistent_histograms.h" #include "net/base/features.h" #include "third_party/blink/public/common/features.h" +#include "ui/android/ui_android_features.h" #include "ui/gl/gl_features.h" namespace { @@ -74,5 +75,8 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) { aw_feature_overrides.DisableFeature( ::features::kDefaultPassthroughCommandDecoder); + // HDR does not support webview yet. See crbug.com/1493153 for an explanation. + aw_feature_overrides.DisableFeature(ui::kAndroidHDR); + aw_feature_overrides.RegisterOverrides(feature_list); } diff --git a/android_webview/browser/supervised_user/aw_supervised_user_throttle.cc b/android_webview/browser/supervised_user/aw_supervised_user_throttle.cc new file mode 100644 index 00000000000000..1ce826bbfa85b6 --- /dev/null +++ b/android_webview/browser/supervised_user/aw_supervised_user_throttle.cc @@ -0,0 +1,119 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "android_webview/browser/supervised_user/aw_supervised_user_throttle.h" + +#include "base/check_op.h" +#include "services/network/public/cpp/resource_request.h" + +namespace { + +const char kCancelReason[] = "SupervisedUserThrottle"; + +} // anonymous namespace + +namespace android_webview { + +// static +std::unique_ptr AwSupervisedUserThrottle::Create( + AwSupervisedUserUrlClassifier* url_classifier) { + return base::WrapUnique( + new AwSupervisedUserThrottle(url_classifier)); +} + +AwSupervisedUserThrottle::AwSupervisedUserThrottle( + AwSupervisedUserUrlClassifier* url_classifier) + : url_classifier_(url_classifier) { + DCHECK(url_classifier_); + DETACH_FROM_SEQUENCE(sequence_checker_); +} + +AwSupervisedUserThrottle::~AwSupervisedUserThrottle() = default; + +void AwSupervisedUserThrottle::WillStartRequest( + network::ResourceRequest* request, + bool* defer) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK_EQ(0u, pending_checks_); + DCHECK(!blocked_); + pending_checks_++; + CheckShouldBlockUrl(request->url); +} + +void AwSupervisedUserThrottle::WillRedirectRequest( + net::RedirectInfo* redirect_info, + const network::mojom::URLResponseHead& response_head, + bool* defer, + std::vector* to_be_removed_request_headers, + net::HttpRequestHeaders* modified_request_headers, + net::HttpRequestHeaders* modified_cors_exempt_request_headers) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (blocked_) { + // onShouldBlockUrlResult() has set |blocked_| to true and called + // |delegate_->CancelWithError|, but this method is called before the + // request is actually cancelled. In that case, simply defer the request. + *defer = true; + return; + } + + pending_checks_++; + CheckShouldBlockUrl(redirect_info->new_url); +} + +void AwSupervisedUserThrottle::WillProcessResponse( + const GURL& response_url, + network::mojom::URLResponseHead* response_head, + bool* defer) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (blocked_) { + // onShouldBlockUrlResult() has set |blocked_| to true and called + // |delegate_->CancelWithError|, but this method is called before the + // request is actually cancelled. In that case, simply defer the request. + *defer = true; + return; + } + + if (pending_checks_ == 0) { + return; + } + + DCHECK(!deferred_); + deferred_ = true; + *defer = true; +} + +void AwSupervisedUserThrottle::CheckShouldBlockUrl(const GURL& url) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(url_classifier_); + + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, + base::BindOnce( + &AwSupervisedUserUrlClassifier::ShouldBlockUrl, + base::Unretained(url_classifier_), url, + base::BindOnce(&AwSupervisedUserThrottle::OnShouldBlockUrlResult, + weak_factory_.GetWeakPtr()))); +} + +void AwSupervisedUserThrottle::OnShouldBlockUrlResult(bool shouldBlockUrl) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(!blocked_); + DCHECK_LT(0u, pending_checks_); + pending_checks_--; + + if (shouldBlockUrl) { + blocked_ = true; + pending_checks_ = 0; + + DCHECK(delegate_); + delegate_->CancelWithError(net::ERR_ACCESS_DENIED, kCancelReason); + } else { + if (pending_checks_ == 0 && deferred_) { + deferred_ = false; + delegate_->Resume(); + } + } +} + +} // namespace android_webview diff --git a/android_webview/browser/supervised_user/aw_supervised_user_throttle.h b/android_webview/browser/supervised_user/aw_supervised_user_throttle.h new file mode 100644 index 00000000000000..030dd790f22c59 --- /dev/null +++ b/android_webview/browser/supervised_user/aw_supervised_user_throttle.h @@ -0,0 +1,64 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ANDROID_WEBVIEW_BROWSER_SUPERVISED_USER_AW_SUPERVISED_USER_THROTTLE_H_ +#define ANDROID_WEBVIEW_BROWSER_SUPERVISED_USER_AW_SUPERVISED_USER_THROTTLE_H_ + +#include "android_webview/browser/supervised_user/aw_supervised_user_url_classifier.h" +#include "base/memory/raw_ptr.h" +#include "net/http/http_request_headers.h" +#include "third_party/blink/public/common/loader/url_loader_throttle.h" + +namespace android_webview { + +// This throttle is used to check if a given url (http and https only) +// is allowed to be loaded by the current user. +// +// This throttle never defers starting the URL request or following redirects. +// If any of the checks for the original URL and redirect chain are not complete +// by the time the response headers are available, the request is deferred +// until all the checks are done. It cancels the load if any URLs turn out to +// be bad. +// +// Lifetime: Temporary. Created and destroyed for every URL request. +class AwSupervisedUserThrottle : public blink::URLLoaderThrottle { + public: + static std::unique_ptr Create( + AwSupervisedUserUrlClassifier* bridge); + + explicit AwSupervisedUserThrottle( + AwSupervisedUserUrlClassifier* url_classifier); + AwSupervisedUserThrottle(const AwSupervisedUserThrottle&) = delete; + AwSupervisedUserThrottle& operator=(const AwSupervisedUserThrottle&) = delete; + ~AwSupervisedUserThrottle() override; + + // blink::URLLoaderThrottle: + void WillStartRequest(network::ResourceRequest* request, + bool* defer) override; + void WillRedirectRequest( + net::RedirectInfo* redirect_info, + const network::mojom::URLResponseHead& response_head, + bool* defer, + std::vector* to_be_removed_request_headers, + net::HttpRequestHeaders* modified_request_headers, + net::HttpRequestHeaders* modified_cors_exempt_request_headers) override; + void WillProcessResponse(const GURL& response_url, + network::mojom::URLResponseHead* response_head, + bool* defer) override; + + private: + void CheckShouldBlockUrl(const GURL& url); + void OnShouldBlockUrlResult(bool shouldBlockUrl); + + bool deferred_ = false; + bool blocked_ = false; + size_t pending_checks_ = 0; + + const raw_ptr url_classifier_; + SEQUENCE_CHECKER(sequence_checker_); + base::WeakPtrFactory weak_factory_{this}; +}; +} // namespace android_webview + +#endif // ANDROID_WEBVIEW_BROWSER_SUPERVISED_USER_AW_SUPERVISED_USER_THROTTLE_H_ diff --git a/android_webview/browser/supervised_user/aw_supervised_user_url_classifier.cc b/android_webview/browser/supervised_user/aw_supervised_user_url_classifier.cc new file mode 100644 index 00000000000000..c125f2f213ebeb --- /dev/null +++ b/android_webview/browser/supervised_user/aw_supervised_user_url_classifier.cc @@ -0,0 +1,55 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "android_webview/browser/supervised_user/aw_supervised_user_url_classifier.h" + +#include "base/android/jni_android.h" +#include "base/android/jni_string.h" +#include "base/android/scoped_java_ref.h" +#include "url/android/gurl_android.h" + +#include "android_webview/browser_jni_headers/AwSupervisedUserUrlClassifier_jni.h" +#include "content/public/browser/browser_thread.h" + +using base::android::AttachCurrentThread; + +namespace android_webview { + +AwSupervisedUserUrlClassifier::AwSupervisedUserUrlClassifier() { + JNIEnv* env = AttachCurrentThread(); + shouldCreateThrottle_ = + Java_AwSupervisedUserUrlClassifier_shouldCreateThrottle(env); +} + +AwSupervisedUserUrlClassifier* AwSupervisedUserUrlClassifier::GetInstance() { + static base::NoDestructor instance; + return instance.get(); +} + +bool AwSupervisedUserUrlClassifier::ShouldCreateThrottle() { + return shouldCreateThrottle_; +} + +void AwSupervisedUserUrlClassifier::ShouldBlockUrl( + const GURL& request_url, + UrlClassifierCallback callback) { + JNIEnv* env = AttachCurrentThread(); + auto request_url_java = url::GURLAndroid::FromNativeGURL(env, request_url); + intptr_t callback_id = reinterpret_cast( + new UrlClassifierCallback(std::move(callback))); + + return Java_AwSupervisedUserUrlClassifier_shouldBlockUrl( + env, request_url_java, callback_id); +} + +static void JNI_AwSupervisedUserUrlClassifier_OnShouldBlockUrlResult( + JNIEnv* env, + jlong callback_id, + jboolean shouldBlockUrl) { + std::unique_ptr cb( + reinterpret_cast(callback_id)); + std::move(*cb).Run(shouldBlockUrl); +} + +} // namespace android_webview diff --git a/android_webview/browser/supervised_user/aw_supervised_user_url_classifier.h b/android_webview/browser/supervised_user/aw_supervised_user_url_classifier.h new file mode 100644 index 00000000000000..85168c8be4de31 --- /dev/null +++ b/android_webview/browser/supervised_user/aw_supervised_user_url_classifier.h @@ -0,0 +1,42 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ANDROID_WEBVIEW_BROWSER_SUPERVISED_USER_AW_SUPERVISED_USER_URL_CLASSIFIER_H_ +#define ANDROID_WEBVIEW_BROWSER_SUPERVISED_USER_AW_SUPERVISED_USER_URL_CLASSIFIER_H_ + +#include "base/android/jni_android.h" +#include "base/android/scoped_java_ref.h" +#include "base/functional/callback.h" +#include "base/no_destructor.h" +#include "base/sequence_checker.h" +#include "url/gurl.h" + +namespace android_webview { +using UrlClassifierCallback = base::OnceCallback; + +// Native side of java-class of same name. +// +// Lifetime: Singleton +class AwSupervisedUserUrlClassifier { + public: + static AwSupervisedUserUrlClassifier* GetInstance(); + + AwSupervisedUserUrlClassifier(const AwSupervisedUserUrlClassifier&) = delete; + AwSupervisedUserUrlClassifier& operator=( + const AwSupervisedUserUrlClassifier&) = delete; + + bool ShouldCreateThrottle(); + + void ShouldBlockUrl(const GURL& request_url, UrlClassifierCallback callback); + + private: + AwSupervisedUserUrlClassifier(); + ~AwSupervisedUserUrlClassifier() = default; + + bool shouldCreateThrottle_ = false; + friend class base::NoDestructor; +}; +} // namespace android_webview + +#endif // ANDROID_WEBVIEW_BROWSER_SUPERVISED_USER_AW_SUPERVISED_USER_URL_CLASSIFIER_H_ diff --git a/android_webview/common/aw_features.cc b/android_webview/common/aw_features.cc index c5cc2ac0bdc3bf..10dea5f230f565 100644 --- a/android_webview/common/aw_features.cc +++ b/android_webview/common/aw_features.cc @@ -133,6 +133,18 @@ BASE_FEATURE(kWebViewSafeBrowsingSafeMode, "WebViewSafeBrowsingSafeMode", base::FEATURE_ENABLED_BY_DEFAULT); +// Enable detection of loading mature sites (according to Google SafeSearch) +// on WebViews running on supervised user accounts. +BASE_FEATURE(kWebViewSupervisedUserSiteDetection, + "WebViewSupervisedUserSiteDetection", + base::FEATURE_DISABLED_BY_DEFAULT); + +// Enable blocking the loading of mature sites (according to Google SafeSearch) +// on WebViews running on supervised user accounts. +BASE_FEATURE(kWebViewSupervisedUserSiteBlock, + "WebViewSupervisedUserSiteBlock", + base::FEATURE_DISABLED_BY_DEFAULT); + // Disallows window.{alert, prompt, confirm} if triggered inside a subframe that // is not same origin with the main frame. BASE_FEATURE(kWebViewSuppressDifferentOriginSubframeJSDialogs, diff --git a/android_webview/common/aw_features.h b/android_webview/common/aw_features.h index bbf20915be3b82..10b63706e2e4c1 100644 --- a/android_webview/common/aw_features.h +++ b/android_webview/common/aw_features.h @@ -38,6 +38,8 @@ BASE_DECLARE_FEATURE(kWebViewRecordAppDataDirectorySize); BASE_DECLARE_FEATURE(kWebViewReportFrameMetrics); BASE_DECLARE_FEATURE(kWebViewRestrictSensitiveContent); BASE_DECLARE_FEATURE(kWebViewSafeBrowsingSafeMode); +BASE_DECLARE_FEATURE(kWebViewSupervisedUserSiteDetection); +BASE_DECLARE_FEATURE(kWebViewSupervisedUserSiteBlock); BASE_DECLARE_FEATURE(kWebViewSuppressDifferentOriginSubframeJSDialogs); BASE_DECLARE_FEATURE(kWebViewTestFeature); BASE_DECLARE_FEATURE(kWebViewUseMetricsUploadService); diff --git a/android_webview/common/crash_reporter/crash_keys.cc b/android_webview/common/crash_reporter/crash_keys.cc index 75584744d1437c..bae45ab78054a7 100644 --- a/android_webview/common/crash_reporter/crash_keys.cc +++ b/android_webview/common/crash_reporter/crash_keys.cc @@ -45,6 +45,11 @@ const char* const kWebViewCrashKeyAllowList[] = { "oop_read_failure", "gpu-gl-error-message", + // components/android_autofill + "crbug1479006-form_ token", + "crbug1479006-form token", + "crbug1479006-manager token", + // components/viz "viz_deserialization", diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java index 6c00dd1c2dead2..1030dd62633f6f 100644 --- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java +++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java @@ -27,6 +27,7 @@ import android.view.DragEvent; import android.view.KeyEvent; import android.view.MotionEvent; +import android.view.PointerIcon; import android.view.View; import android.view.ViewGroup; import android.view.ViewStructure; @@ -3101,6 +3102,11 @@ public Boolean call() { } } + // TODO(crbug.com/1479496): Add override annotation when SDK includes this method. + public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { + return mAwContents.onResolvePointerIcon(event, pointerIndex); + } + // WebViewProvider.ScrollDelegate implementation ---------------------------------------------- @Override diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java index 27237e9be271c3..b6d045ea764b67 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java @@ -34,6 +34,7 @@ import android.view.DragEvent; import android.view.KeyEvent; import android.view.MotionEvent; +import android.view.PointerIcon; import android.view.View; import android.view.ViewGroup; import android.view.ViewStructure; @@ -3349,6 +3350,13 @@ public void onWindowVisibilityChanged(int visibility) { mAwViewMethods.onWindowVisibilityChanged(visibility); } + /** + * @see android.view.View#onResolvePointerIcon(MotionEvent, int) + */ + public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { + return mStylusWritingController.resolvePointerIcon(); + } + private void setViewVisibilityInternal(boolean visible) { mIsViewVisible = visible; if (!isDestroyed(NO_WARN)) { diff --git a/android_webview/java/src/org/chromium/android_webview/common/AwSupervisedUserUrlClassifierDelegate.java b/android_webview/java/src/org/chromium/android_webview/common/AwSupervisedUserUrlClassifierDelegate.java new file mode 100644 index 00000000000000..afd2f3724396a0 --- /dev/null +++ b/android_webview/java/src/org/chromium/android_webview/common/AwSupervisedUserUrlClassifierDelegate.java @@ -0,0 +1,22 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.android_webview.common; + +import androidx.annotation.NonNull; + +import org.chromium.base.Callback; +import org.chromium.url.GURL; + +/** + * This interface provides a means for checking whether to load or block a url + * for a supervised user. The result is returned via the callback. + * + * callback.onResult(false) - indicates the url should be loaded as normal. + * callback.onResult(true) - indicates the url should be blocked and an appropriate + * error page shown instead. + */ +public interface AwSupervisedUserUrlClassifierDelegate { + void shouldBlockUrl(GURL requestUrl, @NonNull final Callback callback); +} diff --git a/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java b/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java index 2de3a7aaac2c41..a95e9c3dca662c 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java +++ b/android_webview/java/src/org/chromium/android_webview/common/PlatformServiceBridge.java @@ -9,6 +9,7 @@ import android.os.HandlerThread; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import org.chromium.base.Callback; import org.chromium.base.ThreadUtils; @@ -122,4 +123,8 @@ public int logMetricsBlocking(byte[] data, boolean useDefaultUploadQos) { * query SafeModeController to receive mitigation steps. */ public void checkForAppRecovery() {} + + public @Nullable AwSupervisedUserUrlClassifierDelegate getUrlClassifierDelegate() { + return null; + } } diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index fc39c413a766de..9fa0315fa53f20 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java @@ -464,8 +464,7 @@ private ProductionSupportedFlagList() {} Flag.baseFeature(NetworkServiceFeatures.ATTRIBUTION_REPORTING_CROSS_APP_WEB, "Enable attribution reporting to cross the app/web barrier by letting " + "the WebView use OS-level attribution."), - Flag.baseFeature(BaseFeatures.THREAD_POOL_CAP, - "Reduces the thread pool cap to use less threads"), + Flag.baseFeature(BaseFeatures.THREAD_POOL_CAP2, "Sets a fixed thread pool cap"), Flag.baseFeature(BlinkFeatures.BEFOREUNLOAD_EVENT_CANCEL_BY_PREVENT_DEFAULT, "Enables showing the cancel dialog by calling preventDefault() " + "on beforeunload event."), @@ -532,6 +531,14 @@ private ProductionSupportedFlagList() {} + "usage < 0.001% and shows a deprecation warning."), Flag.baseFeature(ContentFeatures.SERVICE_WORKER_STATIC_ROUTER, "Enables Service Worker static routing API."), + Flag.baseFeature(AwFeatures.WEBVIEW_SUPERVISED_USER_SITE_DETECTION, + "Enable detection of the loading of mature sites on " + + "WebViews running on supervised user accounts"), + Flag.baseFeature(AwFeatures.WEBVIEW_SUPERVISED_USER_SITE_BLOCK, + "Enable blocking the loading of mature sites on " + + "WebViews running on supervised user accounts"), + Flag.baseFeature(CcFeatures.USE_MAP_RECT_FOR_PIXEL_MOVEMENT, + "Enables the usage of MapRect for computing filter pixel movement."), // Add new commandline switches and features above. The final entry should have a // trailing comma for cleaner diffs. }; diff --git a/android_webview/java/src/org/chromium/android_webview/supervised_user/AwSupervisedUserUrlClassifier.java b/android_webview/java/src/org/chromium/android_webview/supervised_user/AwSupervisedUserUrlClassifier.java new file mode 100644 index 00000000000000..0e9d6dcaa15e34 --- /dev/null +++ b/android_webview/java/src/org/chromium/android_webview/supervised_user/AwSupervisedUserUrlClassifier.java @@ -0,0 +1,80 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.android_webview.supervised_user; + +import androidx.annotation.Nullable; + +import org.chromium.android_webview.AwFeatureMap; +import org.chromium.android_webview.common.AwFeatures; +import org.chromium.android_webview.common.AwSupervisedUserUrlClassifierDelegate; +import org.chromium.android_webview.common.PlatformServiceBridge; +import org.chromium.base.annotations.CalledByNative; +import org.chromium.base.annotations.JNINamespace; +import org.chromium.base.annotations.NativeMethods; +import org.chromium.url.GURL; + +/** + * This class is used for determining if the current android user + * can access a given url. It provides the link between native code and + * GMS Core where the actual url check takes place. Note that the the user + * may change whether they are supervised or not between calls, but this + * is handled on the GMS side. + * + * Additionally supervised status is per Android Profile, so will be shared + * by all WebView Profiles. There is currently no WebView/WebView Profile specific + * customisation allowed. + * + * All of these methods can be called on any thread. + * + * Lifetime: Singleton + */ +@JNINamespace("android_webview") +public class AwSupervisedUserUrlClassifier { + private static @Nullable AwSupervisedUserUrlClassifier sInstance; + private static final Object sInstanceLock = new Object(); + private static boolean sInitialized; + + private final AwSupervisedUserUrlClassifierDelegate mDelegate; + + private AwSupervisedUserUrlClassifier(AwSupervisedUserUrlClassifierDelegate delegate) { + mDelegate = delegate; + } + + public static AwSupervisedUserUrlClassifier getInstance() { + synchronized (sInstanceLock) { + if (!sInitialized) { + if (AwFeatureMap.isEnabled(AwFeatures.WEBVIEW_SUPERVISED_USER_SITE_DETECTION) + || AwFeatureMap.isEnabled(AwFeatures.WEBVIEW_SUPERVISED_USER_SITE_BLOCK)) { + AwSupervisedUserUrlClassifierDelegate delegate = + PlatformServiceBridge.getInstance().getUrlClassifierDelegate(); + if (delegate != null) { + sInstance = new AwSupervisedUserUrlClassifier(delegate); + } + } + sInitialized = true; + } + + return sInstance; + } + } + + @CalledByNative + public static boolean shouldCreateThrottle() { + return (getInstance() != null); + } + + @CalledByNative + public static void shouldBlockUrl(GURL requestUrl, long nativeCallbackPtr) { + getInstance().mDelegate.shouldBlockUrl(requestUrl, shouldBlockUrl -> { + AwSupervisedUserUrlClassifierJni.get().onShouldBlockUrlResult( + nativeCallbackPtr, shouldBlockUrl); + }); + } + + @NativeMethods + interface Natives { + void onShouldBlockUrlResult(long callbackPtr, boolean shouldBlock); + } +} diff --git a/android_webview/java/strings/translations/android_webview_strings_el.xtb b/android_webview/java/strings/translations/android_webview_strings_el.xtb index 20d06657fae839..577e3f2cb2e213 100644 --- a/android_webview/java/strings/translations/android_webview_strings_el.xtb +++ b/android_webview/java/strings/translations/android_webview_strings_el.xtb @@ -2,5 +2,5 @@ Άδειες συστήματος WebView -Αυτή η λειτουργία δεν υποστηρίζεται σε αυτήν την έκδοση Android. +Αυτή η λειτουργία δεν υποστηρίζεται σε αυτή την έκδοση Android. \ No newline at end of file diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSupervisedUserTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSupervisedUserTest.java new file mode 100644 index 00000000000000..457f9e89be2eed --- /dev/null +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSupervisedUserTest.java @@ -0,0 +1,241 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.android_webview.test; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.test.InstrumentationRegistry; +import androidx.test.filters.SmallTest; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.android_webview.AwContents; +import org.chromium.android_webview.common.AwFeatures; +import org.chromium.android_webview.common.AwSupervisedUserUrlClassifierDelegate; +import org.chromium.android_webview.common.PlatformServiceBridge; +import org.chromium.base.Callback; +import org.chromium.base.test.util.Batch; +import org.chromium.base.test.util.CallbackHelper; +import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.Feature; +import org.chromium.net.test.util.TestWebServer; +import org.chromium.url.GURL; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeoutException; + +/** + * Tests for blocking mature sites for supervised users. + * + * These tests only check the url loading part of the integration, not + * the call to GMS core which would check if the current user can load + * a particular url. + */ +@RunWith(AwJUnit4ClassRunner.class) +@Batch(Batch.PER_CLASS) +public class AwSupervisedUserTest { + private static final String SAFE_SITE_TITLE = "Safe site"; + private static final String SAFE_SITE_PATH = "/safe.html"; + private static final String SAFE_SITE_IFRAME_TITLE = "IFrame safe site"; + private static final String SAFE_SITE_IFRAME_PATH = "/safe-inner.html"; + private static final String MATURE_SITE_TITLE = "Mature site"; + private static final String MATURE_SITE_PATH = "/mature.html"; + private static final String MATURE_SITE_IFRAME_TITLE = "IFrame mature site"; + private static final String MATURE_SITE_IFRAME_PATH = "/mature-inner.html"; + private static final String BLOCKED_SITE_TITLE = "Webpage not available"; + + private static String makeTestPage(String title, @Nullable String iFrameUrl) { + return "" + + " " + + " " + title + "" + + " " + + " " + + " Hello world!" + + ((iFrameUrl != null) ? (" + \ No newline at end of file diff --git a/third_party/blink/web_tests/external/wpt/cookie-deprecation-label/cookie-deprecation-label-insecure-context.http.html b/third_party/blink/web_tests/external/wpt/cookie-deprecation-label/cookie-deprecation-label-insecure-context.http.html new file mode 100644 index 00000000000000..bf415e97fa8600 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookie-deprecation-label/cookie-deprecation-label-insecure-context.http.html @@ -0,0 +1,8 @@ + + + + diff --git a/third_party/blink/web_tests/external/wpt/cookie-deprecation-label/cookie-deprecation-label.https.html b/third_party/blink/web_tests/external/wpt/cookie-deprecation-label/cookie-deprecation-label.https.html new file mode 100644 index 00000000000000..c1ad72c30bf2d6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookie-deprecation-label/cookie-deprecation-label.https.html @@ -0,0 +1,9 @@ + + + + diff --git a/third_party/blink/web_tests/external/wpt/credential-management/fedcm-iframe.https.html b/third_party/blink/web_tests/external/wpt/credential-management/fedcm-iframe.https.html index 964ebf4c44df4e..dc0c17dea695e6 100644 --- a/third_party/blink/web_tests/external/wpt/credential-management/fedcm-iframe.https.html +++ b/third_party/blink/web_tests/external/wpt/credential-management/fedcm-iframe.https.html @@ -16,13 +16,16 @@ const remoteBaseURL = host.HTTPS_REMOTE_ORIGIN + basePath; const localhostBaseURL = "http://localhost:" + host.HTTP_PORT + basePath; -async function createIframeAndWaitForMessage(test, iframeUrl, setPermissionPolicy) { +async function createIframeAndWaitForMessage(test, iframeUrl, setPermissionPolicy, style = "") { const messageWatcher = new EventWatcher(test, window, "message"); var iframe = document.createElement("iframe"); iframe.src = iframeUrl; if (setPermissionPolicy) { iframe.allow = "identity-credentials-get"; } + if (style !== "") { + iframe.style = style; + } document.body.appendChild(iframe); const message = await messageWatcher.wait_for("message"); return message.data; @@ -44,6 +47,14 @@ assert_equals(message.token, "token"); }, "FedCM enabled in 2 level deep nested iframe. FedCM should be enabled regardless of iframe nesting depth"); +fedcm_test(async t => { + const message = await createIframeAndWaitForMessage( + t, remoteBaseURL + "support/fedcm-iframe.html", + /*setPermissionPolicy=*/true, /*style=*/"display:none;"); + assert_equals(message.result, "Pass"); + assert_equals(message.token, "token"); +}, "FedCM enabled in invisible iframe. FedCM should be enabled as long as the top frame is visible"); + fedcm_test(async t => { const message = await createIframeAndWaitForMessage( t, remoteBaseURL + "support/fedcm-iframe-level2.html", diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html index 25f6a14577f06b..873fa13140047c 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/at-fallback-position-allowed-declarations.html @@ -45,19 +45,6 @@ test_allowed_declaration('inset-inline'); test_allowed_declaration('inset'); -// Margin properties are allowed -test_allowed_declaration('margin-top'); -test_allowed_declaration('margin-bottom'); -test_allowed_declaration('margin-left'); -test_allowed_declaration('margin-right'); -test_allowed_declaration('margin-block-start'); -test_allowed_declaration('margin-block-end'); -test_allowed_declaration('margin-inline-start'); -test_allowed_declaration('margin-inline-end'); -test_allowed_declaration('margin-block'); -test_allowed_declaration('margin-inline'); -test_allowed_declaration('margin'); - // Sizing properties are allowed test_allowed_declaration('width'); test_allowed_declaration('height'); @@ -83,6 +70,13 @@ // Custom properties are disallowed test_disallowed_declaration('--custom'); +// Margin properties are disallowed +test_disallowed_declaration('margin-left'); +test_disallowed_declaration('margin-right'); +test_disallowed_declaration('margin-top'); +test_disallowed_declaration('margin-bottom'); +test_disallowed_declaration('margin'); + // Test some other disallowed properties test_disallowed_declaration('font-size'); test_disallowed_declaration('border-width'); diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-fallback-004.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-fallback-004.html deleted file mode 100644 index e4dbd718664fca..00000000000000 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-fallback-004.html +++ /dev/null @@ -1,74 +0,0 @@ - -Tests margin properties in position fallback - - - - - - - - - - - -
-
- -
-
- -
-
- -
-
- - diff --git a/third_party/blink/web_tests/external/wpt/css/css-flexbox/order/order-abs-children-painting-order-different-container.html b/third_party/blink/web_tests/external/wpt/css/css-flexbox/order/order-abs-children-painting-order-different-container.html new file mode 100644 index 00000000000000..202581dd1d1b66 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-flexbox/order/order-abs-children-painting-order-different-container.html @@ -0,0 +1,53 @@ + +CSS Test: flex order affects painting order of absolutely positioned boxes inside flex + + + + + + +

Test passes if there is a filled green square.

+
+
+
+
+
+
+
+
+
+
diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap-2/scroll-start/scroll-start-with-scroll-snap.tentative.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap-2/scroll-start/scroll-start-with-scroll-snap.tentative.html index b813fcc750ef5b..8bdac300ba332c 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap-2/scroll-start/scroll-start-with-scroll-snap.tentative.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap-2/scroll-start/scroll-start-with-scroll-snap.tentative.html @@ -17,21 +17,27 @@ } .spacer { - height: 100px; + height: 200px; width: 100px; } .scroller { - height: 100px; + height: 220px; width: 100px; overflow: scroll; - scroll-start: 200px; scroll-snap-type: both mandatory; } + #single_snap_scroller { + scroll-start: 100%; + } + #multi_snap_scroller { + scroll-start: 350px; + } + .snap_point { width: 100px; - height: 100px; + height: 200px; scroll-snap-align: start; } @@ -53,11 +59,11 @@ }, "snap overrides scroll-start position"); test((t) => { - // scroll-start sets the initial scroll offset to the top of the third - // snap_point, so the scroller snaps to the third snap_point. + // scroll-start sets the initial scroll offset to 350px which is closer to + // the third snap point than the second, so the scroller should snap to + // the third snap_point. assert_equals(multi_snap_scroller.scrollTop, - snap_point_1.getBoundingClientRect().height + - snap_point_2.getBoundingClientRect().height, + multi_snap_scroller.scrollHeight - multi_snap_scroller.clientHeight, "scroller snaps to snap point closer to start position."); }, "scroller snaps based on scroll-start position"); diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/crashtests/fractional-covering-area-crash.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/crashtests/fractional-covering-area-crash.html new file mode 100644 index 00000000000000..6905b0fd394052 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/crashtests/fractional-covering-area-crash.html @@ -0,0 +1,25 @@ + + + +
+
+
+ + diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/keyboard.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/keyboard.html index 6f225544614945..fc090274522104 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/keyboard.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/keyboard.html @@ -43,8 +43,18 @@ }); } +async function initializeScrollPosition(scroller, x, y) { + return new Promise(async (resolve) => { + if (scroller.scrollLeft != x || scroller.scrollTop != y) { + scroller.scrollTo(x, y); + await waitForScrollEnd(scroller); + } + resolve(); + }); +} + promise_test(async t => { - scroller.scrollTo(0, 0); + await initializeScrollPosition(scroller, 0, 0); assert_equals(scroller.scrollTop, 0, "verify test pre-condition"); const scrollCounter = new ScrollCounter(t, scroller); await keyPress(scroller, "ArrowDown"); @@ -55,7 +65,7 @@ }, "Snaps to bottom-left after pressing ArrowDown"); promise_test(async t => { - scroller.scrollTo(0, 400); + await initializeScrollPosition(scroller, 0, 400); assert_equals(scroller.scrollTop, 400, "verify test pre-condition"); const scrollCounter = new ScrollCounter(t, scroller); await keyPress(scroller, "ArrowUp"); @@ -66,7 +76,7 @@ }, "Snaps to top-left after pressing ArrowUp"); promise_test(async t => { - scroller.scrollTo(0, 0); + await initializeScrollPosition(scroller, 0, 0); assert_equals(scroller.scrollTop, 0, "verify test pre-condition"); const scrollCounter = new ScrollCounter(t, scroller); await keyPress(scroller, "ArrowRight"); @@ -77,7 +87,7 @@ }, "Snaps to top-right after pressing ArrowRight"); promise_test(async t => { - scroller.scrollTo(400, 0); + await initializeScrollPosition(scroller, 400, 0); assert_equals(scroller.scrollLeft, 400, "verify test pre-condition"); const scrollCounter = new ScrollCounter(t, scroller); await keyPress(scroller, "ArrowLeft"); @@ -98,7 +108,7 @@ // Make the distance between the previous and the next snap position larger // than snapport. topRight.style.left = "500px"; - scroller.scrollTo(0, 0); + await initializeScrollPosition(scroller, 0, 0); assert_equals(scroller.scrollLeft, 0, "verify test pre-condition"); await keyPress(scroller, "ArrowRight"); await waitForScrollEnd(scroller); @@ -119,7 +129,7 @@ // Make the next snap offset closer than the original intended offset. topRight.style.left = "20px"; topRight.style.scrollSnapStop = "always"; - scroller.scrollTo(0, 0); + await initializeScrollPosition(scroller, 0, 0); assert_equals(scroller.scrollLeft, 0, "verify test pre-condition"); await keyPress(scroller, "ArrowRight"); await waitForScrollEnd(scroller); @@ -129,7 +139,7 @@ + " offset."); promise_test(async t => { - scroller.scrollTo(400, 0); + await initializeScrollPosition(scroller, 400, 0); await keyPress(scroller, "ArrowRight"); await waitForScrollEnd(scroller); assert_equals(scroller.scrollLeft, 400); @@ -152,7 +162,7 @@ scroller.style.width = "100px"; topLeft.style.width = "80px"; - scroller.scrollTo(400, 0); + await initializeScrollPosition(scroller, 400, 0); assert_equals(scroller.scrollLeft, 400, "verify test pre-condition"); await keyPress(scroller, "ArrowRight"); await waitForScrollEnd(scroller); diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary-expected.txt deleted file mode 100644 index 59ec6bf723c0a5..00000000000000 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary-expected.txt +++ /dev/null @@ -1,5 +0,0 @@ -This is a testharness.js-based test. -FAIL Keyboard scrolling with vertical snap-area overflow assert_equals: End boundary of snap-area is valid snap target expected 39 but got 449 -FAIL Mouse-wheel scrolling with vertical snap-area overflow assert_equals: End boundary of snap-area is valid snap target expected 100 but got 0 -Harness: the test ran to completion. - diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary.html index c497845263f544..dd995493286a58 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/input/snap-area-overflow-boundary.html @@ -3,6 +3,9 @@ +
+
+
+
+ + \ No newline at end of file diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-stop-dynamic-crash.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-stop-dynamic-crash.html new file mode 100644 index 00000000000000..0039a0168e816f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-stop-dynamic-crash.html @@ -0,0 +1,15 @@ + + + +
+ diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-type-on-root-element.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-type-on-root-element.html index 2556ed99def609..a45ac92e5ac347 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-type-on-root-element.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/scroll-snap-type-on-root-element.html @@ -4,12 +4,13 @@ +

Test passes if there is an orange square tucked into each blue corner without gaps, -and there is no red. +and there is no red, except for the large inverted cases which should have red +in the silver corner and smaller orange boxes in the blue corner.

@@ -87,6 +106,7 @@ +
@@ -165,3 +185,4 @@
+ diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000.html index e5d3dd9358bdab..f44317c8585e87 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-writing-mode-000.html @@ -78,7 +78,8 @@

Test passes if there is an orange square tucked into each blue corner without gaps, -and there is no red. + and there is no red, except for the large inverted cases which should have red + in the silver corner and smaller orange boxes in the blue corner.

diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align.html index 3be68fe841a0d6..c4bb2e9ff4262e 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align.html @@ -71,11 +71,51 @@ assert_equals(scroller.scrollLeft, 100); initial_target.style.setProperty("scroll-snap-align", "end"); - // target.top + target.height - scroller.height - assert_equals(scroller.scrollTop, 200); - assert_equals(scroller.scrollLeft, 200); -}, "Changing the current target's snap alignment should make the scroller" -+ " resnap to it even if another snap position is closer to the current offset"); + // scroller maintains scroll position which is still valid as the target's + // snap area covers the snap port. + assert_equals(scroller.scrollTop, 100); + assert_equals(scroller.scrollLeft, 100); +}, "Changing a large target's snap alignment shouldn't make the scroller" + + " resnap if the scroller is already in a valid snap position."); + +// Similar to above test case except targets are too small to cover snap port, +// so scroller must snap in response to change in scroll-snap-align. +test(t => { + t.add_cleanup(cleanup); + const initial_target_height = initial_target.offsetHeight; + const initial_target_width = initial_target.offsetWidth; + const other_target_height = initial_target.offsetHeight; + const other_target_width = initial_target.offsetWidth; + t.add_cleanup(() => { + initial_target.style.setProperty("height", `${initial_target_height}px`); + initial_target.style.setProperty("width", `${initial_target_width}px`); + other_target.style.setProperty("height", `${other_target_height}px`); + other_target.style.setProperty("width", `${other_target_width}px`); + }) + scroller.scrollTo(0,0); + assert_equals(scroller.scrollTop, 100); + assert_equals(scroller.scrollLeft, 100); + + initial_target.style.setProperty("height", `${scroller.clientHeight * 2/3 }px`); + initial_target.style.setProperty("width", `${scroller.clientWidth * 2/3 }px`); + other_target.style.setProperty("height", `${scroller.clientHeight * 2/3 }px`); + other_target.style.setProperty("width", `${scroller.clientWidth * 2/3 }px`); + + // scroll (and snap) to top left of other target. + scroller.scrollTo(other_target.offsetTop, + other_target.offsetLeft); + assert_equals(scroller.scrollTop, other_target.offsetTop,); + assert_equals(scroller.scrollLeft, other_target.offsetLeft); + + other_target.style.setProperty("scroll-snap-align", "end"); + // should be scrolled so as to align scroller's bottom-right with + // other_target's bottom-right. + assert_equals(scroller.scrollTop, + other_target.offsetTop + other_target.offsetHeight - scroller.clientHeight); + assert_equals(scroller.scrollLeft, + other_target.offsetLeft + other_target.offsetWidth - scroller.clientWidth); +}, "Changing the current (non-covering) target's snap alignment should make " + + "the scroller snap according to the new alignment."); test(t => { t.add_cleanup(cleanup); diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-into-covering-area.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-into-covering-area.html new file mode 100644 index 00000000000000..2cc8741f5ef2e0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-into-covering-area.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + +
+
+
+ +
+
+ + + + \ No newline at end of file diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-to-visible-areas-margin-both.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-to-visible-areas-margin-both.html index f148036a1d5d71..4c3c3c11a642b7 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-to-visible-areas-margin-both.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/snap-to-visible-areas-margin-both.html @@ -65,10 +65,14 @@ scroller.scrollTo(0, 0); assert_equals(scroller.scrollLeft, 0); assert_equals(scroller.scrollTop, 0); - scroller.scrollTo(500, 600); + // 750 and 650 are picked as those are closer to top left of the intersection + // (800, 800) of the snap areas where the browser should snap. This makes the + // intersection a closer snap option than a covering option that the browser + // might choose where the snapport is aligned on the bottom and right. + scroller.scrollTo(650, 750); assert_equals(scroller.scrollLeft, 800); assert_equals(scroller.scrollTop, 800); - scroller.scrollTo(600, 500); + scroller.scrollTo(750, 650); assert_equals(scroller.scrollLeft, 800); assert_equals(scroller.scrollTop, 800); }, 'Snap to area such that only the scroll margin from both axes\' areas are \ diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/snapshot-containing-block-includes-scrollbar-gutter-ref.html b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/snapshot-containing-block-includes-scrollbar-gutter-ref.html new file mode 100644 index 00000000000000..8a74bd216450ef --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/snapshot-containing-block-includes-scrollbar-gutter-ref.html @@ -0,0 +1,34 @@ + + +View transitions: snapshot containing block includes scrollbar gutters (ref) + + + +
+ +
+
+
diff --git a/third_party/blink/web_tests/external/wpt/css/css-view-transitions/snapshot-containing-block-includes-scrollbar-gutter.html b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/snapshot-containing-block-includes-scrollbar-gutter.html new file mode 100644 index 00000000000000..6e9bf568f67cc3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-view-transitions/snapshot-containing-block-includes-scrollbar-gutter.html @@ -0,0 +1,48 @@ + + +View transitions: snapshot containing block includes scrollbar gutters + + + + + + + +
+
+ diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/getComputedStyle-insets-absolute-logical-crash.html b/third_party/blink/web_tests/external/wpt/css/cssom/getComputedStyle-insets-absolute-logical-crash.html new file mode 100644 index 00000000000000..1e3ef8ab1216c1 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom/getComputedStyle-insets-absolute-logical-crash.html @@ -0,0 +1,31 @@ + +Chromium bug: getComputedStyle() crashes with logical inset properties + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + diff --git a/third_party/blink/web_tests/external/wpt/css/printing/page-margin-004-print-ref.html b/third_party/blink/web_tests/external/wpt/css/printing/page-margin-004-print-ref.html new file mode 100644 index 00000000000000..24549d4954228c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/printing/page-margin-004-print-ref.html @@ -0,0 +1,18 @@ + +CSS Test Reference + + +
+
Page 1
+
+ Page 2 +
+
diff --git a/third_party/blink/web_tests/external/wpt/css/printing/page-margin-004-print.html b/third_party/blink/web_tests/external/wpt/css/printing/page-margin-004-print.html new file mode 100644 index 00000000000000..cb9343dcf17b69 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/printing/page-margin-004-print.html @@ -0,0 +1,21 @@ + +Test that a fragmented OOF is sized and posisitioned correctly within the containing block, which is the page box size minus the margins + + + + + +
+ Page 1 +
+ Page 2 +
+
diff --git a/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html index 74dcb0f0bd068f..d1f50304add2ac 100644 --- a/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html +++ b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scrollend-with-snap-on-fractional-offset.html @@ -16,7 +16,7 @@ .box { scroll-snap-align: start; - width: 600px; + width: 400px; position: absolute; top: 200px; } diff --git a/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt b/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt index 7594f785f96381..6b782e7e9b897b 100644 --- a/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt +++ b/third_party/blink/web_tests/external/wpt/html/rendering/pixel-length-attributes-expected.txt @@ -173,7 +173,7 @@ PASS mapping to marginLeft PASS mapping to marginLeft PASS mapping to marginLeft FAIL mapping to marginLeft assert_equals: expected "200px" but got "200.25px" -FAIL mapping to marginLeft assert_equals: expected "200px" but got "200.688px" +FAIL mapping to marginLeft assert_equals: expected "200px" but got "200.7px" PASS mapping to marginLeft FAIL mapping to marginLeft assert_equals: expected "0px" but got "8px" FAIL mapping to marginLeft assert_equals: expected "0px" but got "8px" @@ -194,7 +194,7 @@ PASS mapping to marginRight PASS mapping to marginRight PASS mapping to marginRight FAIL mapping to marginRight assert_equals: expected "200px" but got "200.25px" -FAIL mapping to marginRight assert_equals: expected "200px" but got "200.688px" +FAIL mapping to marginRight assert_equals: expected "200px" but got "200.7px" PASS mapping to marginRight FAIL mapping to marginRight assert_equals: expected "0px" but got "8px" FAIL mapping to marginRight assert_equals: expected "0px" but got "8px" @@ -215,7 +215,7 @@ PASS mapping to marginLeft PASS mapping to marginLeft PASS mapping to marginLeft FAIL mapping to marginLeft assert_equals: expected "200px" but got "200.25px" -FAIL mapping to marginLeft assert_equals: expected "200px" but got "200.688px" +FAIL mapping to marginLeft assert_equals: expected "200px" but got "200.7px" PASS mapping to marginLeft FAIL mapping to marginLeft assert_equals: expected "0px" but got "8px" FAIL mapping to marginLeft assert_equals: expected "0px" but got "8px" @@ -257,7 +257,7 @@ PASS mapping to marginTop PASS mapping to marginTop PASS mapping to marginTop FAIL mapping to marginTop assert_equals: expected "200px" but got "200.25px" -FAIL mapping to marginTop assert_equals: expected "200px" but got "200.688px" +FAIL mapping to marginTop assert_equals: expected "200px" but got "200.7px" PASS mapping to marginTop FAIL mapping to marginTop assert_equals: expected "0px" but got "8px" FAIL mapping to marginTop assert_equals: expected "0px" but got "8px" @@ -278,7 +278,7 @@ PASS mapping to marginBottom PASS mapping to marginBottom PASS mapping to marginBottom FAIL mapping to marginBottom assert_equals: expected "200px" but got "200.25px" -FAIL mapping to marginBottom assert_equals: expected "200px" but got "200.688px" +FAIL mapping to marginBottom assert_equals: expected "200px" but got "200.7px" PASS mapping to marginBottom FAIL mapping to marginBottom assert_equals: expected "0px" but got "8px" FAIL mapping to marginBottom assert_equals: expected "0px" but got "8px" @@ -299,7 +299,7 @@ PASS mapping to marginTop PASS mapping to marginTop PASS mapping to marginTop FAIL mapping to marginTop assert_equals: expected "200px" but got "200.25px" -FAIL mapping to marginTop assert_equals: expected "200px" but got "200.688px" +FAIL mapping to marginTop assert_equals: expected "200px" but got "200.7px" PASS mapping to marginTop FAIL mapping to marginTop assert_equals: expected "0px" but got "8px" FAIL mapping to marginTop assert_equals: expected "0px" but got "8px" diff --git a/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/disabled-expected.txt b/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/disabled-expected.txt new file mode 100644 index 00000000000000..964b8daa27c138 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/disabled-expected.txt @@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Test that a soft navigation is not detected when the feature is disabled promise_test: Unhandled rejection with value: "Soft navigation should not be triggered" +Harness: the test ran to completion. + diff --git a/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/disabled.html b/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/disabled.html new file mode 100644 index 00000000000000..b53c2f701222c4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/disabled.html @@ -0,0 +1,31 @@ + + + + +Detect simple soft navigation. + + + + + + + +
+ Click me! +
+ + + + diff --git a/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/resources/soft-navigation-helper.js b/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/resources/soft-navigation-helper.js index edc9331c26375e..0d753ac0a241e0 100644 --- a/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/resources/soft-navigation-helper.js +++ b/third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/resources/soft-navigation-helper.js @@ -89,8 +89,13 @@ const testSoftNavigationNotDetected = options => { }); t.step_timeout(resolve, 1000); }); - assert_equals( + if (document.softNavigations) { + assert_equals( document.softNavigations, 0, 'Soft Navigation not detected'); + } + const postClickLcp = await getLcpEntries(); + assert_equals( + preClickLcp.length, postClickLcp.length, 'No LCP entries accumulated'); }, options.testName); }; diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/pointer_touch.py.ini b/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/pointer_touch.py.ini index 8cfcbfaa0adede..6f9fbf28b64eba 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/pointer_touch.py.ini +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/classic/perform_actions/pointer_touch.py.ini @@ -9,3 +9,11 @@ [test_touch_pointer_in_shadow_tree[outer-closed\]] expected: FAIL + + [test_touch_pointer_properties] + expected: + if debug: ERROR + + [test_touch_pointer_properties_tilt_twist] + expected: + if debug: ERROR diff --git a/third_party/blink/web_tests/external/wpt/webusb/usbDevice.https.any.js b/third_party/blink/web_tests/external/wpt/webusb/usbDevice.https.any.js index b1b0c133ce160a..804af2afb9db3a 100644 --- a/third_party/blink/web_tests/external/wpt/webusb/usbDevice.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webusb/usbDevice.https.any.js @@ -1247,3 +1247,60 @@ usb_test((t) => { .then(() => promise_rejects_dom(t, 'NotFoundError', device.reset())); }); }, 'resetDevice rejects when called on a disconnected device'); + +usb_test(async (t) => { + const PACKET_COUNT = 4; + const PACKET_LENGTH = 8; + const {device, fakeDevice} = await getFakeDevice(); + await device.open(); + await device.selectConfiguration(2); + await device.claimInterface(0); + await device.selectAlternateInterface(0, 1); + const buffer = new Uint8Array(PACKET_COUNT * PACKET_LENGTH); + const packetLengths = new Array(PACKET_COUNT).fill(PACKET_LENGTH); + packetLengths[0] = PACKET_LENGTH - 1; + await promise_rejects_dom( + t, 'DataError', device.isochronousTransferOut(1, buffer, packetLengths)); +}, 'isochronousTransferOut rejects when buffer size exceeds packet lengths'); + +usb_test(async (t) => { + const PACKET_COUNT = 4; + const PACKET_LENGTH = 8; + const {device, fakeDevice} = await getFakeDevice(); + await device.open(); + await device.selectConfiguration(2); + await device.claimInterface(0); + await device.selectAlternateInterface(0, 1); + const buffer = new Uint8Array(PACKET_COUNT * PACKET_LENGTH); + const packetLengths = new Array(PACKET_COUNT).fill(PACKET_LENGTH); + packetLengths[0] = PACKET_LENGTH + 1; + await promise_rejects_dom( + t, 'DataError', device.isochronousTransferOut(1, buffer, packetLengths)); +}, 'isochronousTransferOut rejects when packet lengths exceed buffer size'); + +usb_test(async (t) => { + const PACKET_COUNT = 2; + const PACKET_LENGTH = 8; + const {device, fakeDevice} = await getFakeDevice(); + await device.open(); + await device.selectConfiguration(2); + await device.claimInterface(0); + await device.selectAlternateInterface(0, 1); + const packetLengths = [0xffffffff, 1]; + await promise_rejects_dom( + t, 'DataError', device.isochronousTransferIn(1, packetLengths)); +}, 'isochronousTransferIn rejects when packet lengths exceed maximum size'); + +usb_test(async (t) => { + const PACKET_COUNT = 2; + const PACKET_LENGTH = 8; + const {device, fakeDevice} = await getFakeDevice(); + await device.open(); + await device.selectConfiguration(2); + await device.claimInterface(0); + await device.selectAlternateInterface(0, 1); + const buffer = new Uint8Array(PACKET_LENGTH * PACKET_COUNT); + const packetLengths = [0xffffffff, 1]; + await promise_rejects_dom( + t, 'DataError', device.isochronousTransferOut(1, buffer, packetLengths)); +}, 'isochronousTransferOut rejects when packet lengths exceed maximum size'); diff --git a/third_party/blink/web_tests/fast/forms/date/date-keyboardoperation-no-crash-expected.txt b/third_party/blink/web_tests/fast/forms/date/date-keyboardoperation-no-crash-expected.txt new file mode 100644 index 00000000000000..7ef22e9a431ad0 --- /dev/null +++ b/third_party/blink/web_tests/fast/forms/date/date-keyboardoperation-no-crash-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/third_party/blink/web_tests/fast/forms/date/date-keyboardoperation-no-crash.html b/third_party/blink/web_tests/fast/forms/date/date-keyboardoperation-no-crash.html new file mode 100644 index 00000000000000..a00a55b7ffb75d --- /dev/null +++ b/third_party/blink/web_tests/fast/forms/date/date-keyboardoperation-no-crash.html @@ -0,0 +1,28 @@ + + + + + +PASS + diff --git a/third_party/blink/web_tests/fast/forms/date/date-keyoperation.html b/third_party/blink/web_tests/fast/forms/date/date-keyoperation.html index e99fa715105cfe..dd932b50573c42 100644 --- a/third_party/blink/web_tests/fast/forms/date/date-keyoperation.html +++ b/third_party/blink/web_tests/fast/forms/date/date-keyoperation.html @@ -8,6 +8,21 @@ function testKeyOperations(writingMode) { if (!window.eventSender) return; + let stepDownKey; + let stepUpKey; + let focusNextKey; + let focusPrevKey; + if (writingMode == "horizontal-tb") { + stepDownKey = 'ArrowDown'; + stepUpKey = 'ArrowUp'; + focusNextKey = 'ArrowRight'; + focusPrevKey = 'ArrowLeft'; + } else { + stepDownKey = 'ArrowLeft'; + stepUpKey = 'ArrowRight'; + focusNextKey = 'ArrowDown'; + focusPrevKey = 'ArrowUp'; + } test(() => { const input = document.createElement('input'); document.body.appendChild(input); @@ -17,12 +32,12 @@ input.min = "2023-07-22"; input.max = "2023-07-24"; input.focus(); - // Using arrow down goes to max value - eventSender.keyDown('ArrowDown'); + // Using step down goes to max value + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-07-24"); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-07-23"); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-07-24"); document.body.removeChild(input); }, `input[type=date writing-mode=${writingMode}] key operations should respect max/min`); @@ -34,17 +49,17 @@ input.style.writingMode = writingMode; input.value = "2023-07-22"; input.focus(); - eventSender.keyDown('ArrowDown'); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2022-06-21"); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-07-22"); document.body.removeChild(input); }, `input[type=date writing-mode=${writingMode}] key operations should move between DD/MM/YYYY`); @@ -58,12 +73,12 @@ input.min = "2023-W25"; input.max = "2023-W27"; input.focus(); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-W25"); - // Using arrow down goes to max value - eventSender.keyDown('ArrowDown'); + // Using step down goes to max value + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-W27"); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-W25"); document.body.removeChild(input); }, `input[type=week writing-mode=${writingMode}] key operations should respect max/min`); @@ -75,13 +90,13 @@ input.style.writingMode = writingMode; input.value = "2023-W10"; input.focus(); - eventSender.keyDown('ArrowDown'); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2022-W09"); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-W10"); document.body.removeChild(input); }, `input[type=week writing-mode=${writingMode}] key operations should move between YYYY-WW`); @@ -95,11 +110,11 @@ input.min = "2023-05"; input.max = "2023-10"; input.focus(); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-06"); - // Using arrow right cannot access year - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowUp'); + // Using step up cannot access year + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-07"); document.body.removeChild(input); }, `input[type=month writing-mode=${writingMode}] key operations should respect max/min`); @@ -111,13 +126,13 @@ input.style.writingMode = writingMode; input.value = "2023-07"; input.focus(); - eventSender.keyDown('ArrowDown'); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2022-06"); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-07"); document.body.removeChild(input); }, `input[type=month writing-mode=${writingMode}] key operations should move between MM YYYY`); @@ -130,19 +145,19 @@ input.value = "10:00"; input.step = 60 * 5; input.focus(); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "09:00"); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "09:55"); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "09:00"); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "21:00"); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "22:00"); document.body.removeChild(input); }, `input[type=time writing-mode=${writingMode}] key operations should respect step and move between HH:MM`); @@ -158,35 +173,35 @@ input.min = "2023-06-10T00:00"; input.step = 60 * 30; input.focus(); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-06-11T19:30"); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-06-11T18:30"); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-06-11T18:00"); - eventSender.keyDown('ArrowRight'); - eventSender.keyDown('ArrowDown'); + eventSender.keyDown(focusNextKey); + eventSender.keyDown(stepDownKey); assert_equals(input.value, "2023-06-11T06:00"); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-06-12T19:30"); // Cannot modify month and year so moving left will still modify day - eventSender.keyDown('ArrowLeft'); - eventSender.keyDown('ArrowUp'); + eventSender.keyDown(focusPrevKey); + eventSender.keyDown(stepUpKey); assert_equals(input.value, "2023-06-13T19:30"); document.body.removeChild(input); }, `input[type=datetime writing-mode=${writingMode}] key operations should respect max/min, step and move between YYYY-MM-DDTHH:MM`); } -testKeyOperations('horizonta-tb'); +testKeyOperations('horizontal-tb'); testKeyOperations('vertical-lr'); testKeyOperations('vertical-rl'); diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt index 502a430af183b0..017a5d24de7c36 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [1200, 900], "contentsOpaque": true, "backgroundColor": "#FFFFFF" @@ -11,9 +11,6 @@ "bounds": [300, 300], "contentsOpaque": true, "backgroundColor": "#0000FF", - "invalidations": [ - [0, 0, 300, 300] - ], "transform": 1 } ], diff --git a/third_party/blink/web_tests/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt b/third_party/blink/web_tests/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt index 3919a431e234e5..1c9a44cb4e8ce2 100644 --- a/third_party/blink/web_tests/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF" @@ -18,10 +18,7 @@ "position": [50, 50], "bounds": [50, 50], "contentsOpaque": true, - "backgroundColor": "#008000", - "invalidations": [ - [0, 0, 50, 50] - ] + "backgroundColor": "#008000" } ], "transforms": [ diff --git a/third_party/blink/web_tests/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/blink/web_tests/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt new file mode 100644 index 00000000000000..e6eb85dd0b4c69 --- /dev/null +++ b/third_party/blink/web_tests/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt @@ -0,0 +1,32 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutNGView #document", + "bounds": [785, 2350], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "invalidations": [ + [0, 0, 785, 2350] + ], + "transform": 1 + }, + { + "name": "VerticalScrollbar", + "position": [785, 0], + "bounds": [15, 600], + "contentsOpaque": true + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [0, -1750, 0, 1] + ] + } + ] +} + diff --git a/third_party/blink/web_tests/paint/invalidation/invalidations-in-iframe-expected.txt b/third_party/blink/web_tests/paint/invalidation/invalidations-in-iframe-expected.txt index 7e641c4bd7b088..a9f60c249b2e46 100644 --- a/third_party/blink/web_tests/paint/invalidation/invalidations-in-iframe-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/invalidations-in-iframe-expected.txt @@ -6,7 +6,7 @@ "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [8, 158, 200, 200] + [0, 0, 800, 600] ] }, { diff --git a/third_party/blink/web_tests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt b/third_party/blink/web_tests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt index ae2e746fedf720..589a1d093b601b 100644 --- a/third_party/blink/web_tests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt @@ -1,12 +1,12 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [8, 8, 100, 100] + [0, 0, 800, 600] ] } ] diff --git a/third_party/blink/web_tests/paint/invalidation/overhanging-float-detach-repaint-expected.txt b/third_party/blink/web_tests/paint/invalidation/overhanging-float-detach-repaint-expected.txt new file mode 100644 index 00000000000000..dac53cbb83a60a --- /dev/null +++ b/third_party/blink/web_tests/paint/invalidation/overhanging-float-detach-repaint-expected.txt @@ -0,0 +1,11 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutNGView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + } + ] +} + diff --git a/third_party/blink/web_tests/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt b/third_party/blink/web_tests/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt index 52ec71f81cac50..e9282f1a3a81ea 100644 --- a/third_party/blink/web_tests/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF" @@ -11,9 +11,6 @@ "bounds": [200, 200], "contentsOpaque": true, "backgroundColor": "#0000FF", - "invalidations": [ - [0, 0, 200, 200] - ], "transform": 1 } ], diff --git a/third_party/blink/web_tests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt b/third_party/blink/web_tests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt index 132ccb3aacaf43..842e63007cee6c 100644 --- a/third_party/blink/web_tests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [785, 2016], "contentsOpaque": true, "backgroundColor": "#FFFFFF", @@ -12,9 +12,6 @@ "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#008000", - "invalidations": [ - [0, 0, 100, 100] - ], "transform": 2 }, { diff --git a/third_party/blink/web_tests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt b/third_party/blink/web_tests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt index 132ccb3aacaf43..842e63007cee6c 100644 --- a/third_party/blink/web_tests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [785, 2016], "contentsOpaque": true, "backgroundColor": "#FFFFFF", @@ -12,9 +12,6 @@ "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#008000", - "invalidations": [ - [0, 0, 100, 100] - ], "transform": 2 }, { diff --git a/third_party/blink/web_tests/paint/invalidation/svg/image-with-clip-path-expected.txt b/third_party/blink/web_tests/paint/invalidation/svg/image-with-clip-path-expected.txt index d8f8ea8df0ae05..589a1d093b601b 100644 --- a/third_party/blink/web_tests/paint/invalidation/svg/image-with-clip-path-expected.txt +++ b/third_party/blink/web_tests/paint/invalidation/svg/image-with-clip-path-expected.txt @@ -1,13 +1,12 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [800, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [20, 20, 60, 60], - [175, 25, 50, 50] + [0, 0, 800, 600] ] } ] diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/blink/web_tests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt deleted file mode 100644 index 22091c5b8b013a..00000000000000 --- a/third_party/blink/web_tests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt +++ /dev/null @@ -1,32 +0,0 @@ -{ - "layers": [ - { - "name": "Scrolling background of LayoutView #document", - "bounds": [785, 2350], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "invalidations": [ - [8, 2046, 774, 257] - ], - "transform": 1 - }, - { - "name": "VerticalScrollbar", - "position": [785, 0], - "bounds": [15, 600], - "contentsOpaque": true - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -1750, 0, 1] - ] - } - ] -} - diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-solid-color-layers/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/disable-solid-color-layers/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt new file mode 100644 index 00000000000000..c020a95a107332 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-solid-color-layers/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt @@ -0,0 +1,39 @@ +{ + "layers": [ + { + "name": "Scrolling background of LayoutNGView #document", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF" + }, + { + "name": "LayoutNGBlockFlow DIV", + "bounds": [200, 200], + "contentsOpaque": true, + "backgroundColor": "#ADD8E6", + "transform": 1 + }, + { + "name": "LayoutNGBlockFlow (positioned) SPAN class='child'", + "position": [50, 50], + "bounds": [50, 50], + "contentsOpaque": true, + "backgroundColor": "#008000", + "invalidations": [ + [0, 0, 50, 50] + ] + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [8, 8, 0, 1] + ] + } + ] +} + diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt deleted file mode 100644 index 662d2a3d99d3c1..00000000000000 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt +++ /dev/null @@ -1,32 +0,0 @@ -{ - "layers": [ - { - "name": "Scrolling background of LayoutView #document", - "bounds": [785, 2350], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "invalidations": [ - [8, 2045, 774, 259] - ], - "transform": 1 - }, - { - "name": "VerticalScrollbar", - "position": [785, 0], - "bounds": [15, 600], - "contentsOpaque": true - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -1750, 0, 1] - ] - } - ] -} - diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt deleted file mode 100644 index c0e788b1245606..00000000000000 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "layers": [ - { - "name": "Scrolling background of LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "invalidations": [ - [8, 62, 100, 100] - ] - } - ] -} - diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt index 99cd1df22209c7..fe7d0af3a606a9 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [785, 1893], "contentsOpaque": true, "backgroundColor": "#FFFFFF", @@ -15,9 +15,6 @@ "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#FF0000", - "invalidations": [ - [0, 0, 100, 100] - ], "transform": 2 }, { diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/blink/web_tests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt deleted file mode 100644 index d9af66028f3524..00000000000000 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt +++ /dev/null @@ -1,32 +0,0 @@ -{ - "layers": [ - { - "name": "Scrolling background of LayoutView #document", - "bounds": [785, 2350], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "invalidations": [ - [8, 2046, 766, 257] - ], - "transform": 1 - }, - { - "name": "VerticalScrollbar", - "position": [785, 0], - "bounds": [15, 600], - "contentsOpaque": true - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -1750, 0, 1] - ] - } - ] -} - diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt b/third_party/blink/web_tests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt deleted file mode 100644 index bed4e4ac025e76..00000000000000 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "layers": [ - { - "name": "Scrolling background of LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "invalidations": [ - [8, 68, 100, 100] - ] - } - ] -} - diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt b/third_party/blink/web_tests/platform/win/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt index 46d93162ca68a8..d248097fb8e84e 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/scroll/scroll-descendant-with-cached-cliprects-expected.txt @@ -1,7 +1,7 @@ { "layers": [ { - "name": "Scrolling background of LayoutView #document", + "name": "Scrolling background of LayoutNGView #document", "bounds": [785, 1895], "contentsOpaque": true, "backgroundColor": "#FFFFFF", @@ -15,9 +15,6 @@ "bounds": [100, 100], "contentsOpaque": true, "backgroundColor": "#FF0000", - "invalidations": [ - [0, 0, 100, 100] - ], "transform": 2 }, { diff --git a/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html b/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html index a0b6cb86e60f5b..47a30d3fd860e6 100644 --- a/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html +++ b/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html @@ -5,49 +5,54 @@ - -

Tests for moving focus on scrollable element by pressing tab key.

-

Where host has delegatesFocus false.

+
+
-

Where host has delegatesFocus true.

+
+
diff --git a/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-interactive-child.html b/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-interactive-child.html new file mode 100644 index 00000000000000..5cfb1935c47d82 --- /dev/null +++ b/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-interactive-child.html @@ -0,0 +1,41 @@ + + + + + + + +
+
+ +
+ + + diff --git a/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html b/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html index 14adbb1b5deeb4..b08aa46b151b11 100644 --- a/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html +++ b/third_party/blink/web_tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html @@ -5,57 +5,54 @@ - -

Tests for moving focus on scrollable element by pressing tab key.

-

Where element has positive tabindex.

-
-
+
+

Scroller has tabindex=0.

-
Text
+
-
+
+

Scroller has tabindex=0.

-
Text
-

Where element has no tabindex.

-
+

Scroller has no tabindex.

-
Text
+
+

Scroller has no tabindex.

-
Text
-

Where element has negative tabindex.

-
+

Scroller has tabindex=-1.

-
Text
+
+

Scroller has tabindex=-1.

-
Text
@@ -65,9 +62,9 @@ promise_test(async () => { let elements = [ 'start', - 'scroller-positive', + 'scroller-tabindex', 'A', - 'scroller-positive-2', + 'scroller-tabindex-2', 'B', 'scroller-none-2', 'C', diff --git a/third_party/blink/web_tests/virtual/cookie-deprecation-label/README.md b/third_party/blink/web_tests/virtual/cookie-deprecation-label/README.md new file mode 100644 index 00000000000000..94745f38c4c5e6 --- /dev/null +++ b/third_party/blink/web_tests/virtual/cookie-deprecation-label/README.md @@ -0,0 +1,7 @@ +# Cookie Deprecation + +The tests are run with the flag +--enable-features=CookieDeprecationFacilitatedTestingLabels + +You can run these tests by targeting the following directory: +`virtual/cookie-deprecation/external/wpt/cookie-deprecation-label` diff --git a/third_party/blink/web_tests/virtual/scalefactor200/external/wpt/css/printing/README.txt b/third_party/blink/web_tests/virtual/scalefactor200/external/wpt/css/printing/README.txt new file mode 100644 index 00000000000000..17c1042d48edbd --- /dev/null +++ b/third_party/blink/web_tests/virtual/scalefactor200/external/wpt/css/printing/README.txt @@ -0,0 +1,2 @@ +# This suite runs the tests in this directory with +# --force-device-scale-factor=2 diff --git a/third_party/blink/web_tests/virtual/stable/external/wpt/soft-navigation-heuristics/disabled-expected.txt b/third_party/blink/web_tests/virtual/stable/external/wpt/soft-navigation-heuristics/disabled-expected.txt new file mode 100644 index 00000000000000..da58657906e56c --- /dev/null +++ b/third_party/blink/web_tests/virtual/stable/external/wpt/soft-navigation-heuristics/disabled-expected.txt @@ -0,0 +1,4 @@ +This is a testharness.js-based test. +PASS Test that a soft navigation is not detected when the feature is disabled +Harness: the test ran to completion. + diff --git a/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-001-print-ref.html b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-001-print-ref.html new file mode 100644 index 00000000000000..59e9c38ee5c3a1 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-001-print-ref.html @@ -0,0 +1,10 @@ + + + +
diff --git a/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-001-print.html b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-001-print.html new file mode 100644 index 00000000000000..3819129cf28aeb --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-001-print.html @@ -0,0 +1,16 @@ + + + + + + +
+
+
diff --git a/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-002-print-ref.html b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-002-print-ref.html new file mode 100644 index 00000000000000..3eab486f26f881 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-002-print-ref.html @@ -0,0 +1,10 @@ + + + +
diff --git a/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-002-print.html b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-002-print.html new file mode 100644 index 00000000000000..bca3ce926b6dd7 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-002-print.html @@ -0,0 +1,16 @@ + + + + + + +
+
+
diff --git a/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-003-print-ref.html b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-003-print-ref.html new file mode 100644 index 00000000000000..3eab486f26f881 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-003-print-ref.html @@ -0,0 +1,10 @@ + + + +
diff --git a/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-003-print.html b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-003-print.html new file mode 100644 index 00000000000000..f94321aa608b19 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/printing/icb-scaling-003-print.html @@ -0,0 +1,16 @@ + + + + + + +
+
+
diff --git a/third_party/crashpad/README.chromium b/third_party/crashpad/README.chromium index 88500524499098..9edcee3aa81a84 100644 --- a/third_party/crashpad/README.chromium +++ b/third_party/crashpad/README.chromium @@ -2,7 +2,7 @@ Name: Crashpad Short Name: crashpad URL: https://crashpad.chromium.org/ Version: unknown -Revision: a736f7d070c872a4cc786c31755fd769fb2e50b3 +Revision: a7cfe95351e301512eb0efc03f92fee63c1c82b2 License: Apache 2.0 License File: crashpad/LICENSE Security Critical: yes diff --git a/third_party/crashpad/crashpad/DEPS b/third_party/crashpad/crashpad/DEPS index 2c67a6892d0548..b7d44b11c3f8eb 100644 --- a/third_party/crashpad/crashpad/DEPS +++ b/third_party/crashpad/crashpad/DEPS @@ -47,7 +47,7 @@ deps = { '9719c1e1e676814c456b55f5f070eabad6709d31', 'crashpad/third_party/mini_chromium/mini_chromium': Var('chromium_git') + '/chromium/mini_chromium@' + - '0c540fd5462a266277e86fa32a230cad4a859037', + '10f39a97650a0fe0b305415c15434443c0690a20', 'crashpad/third_party/libfuzzer/src': Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' + 'fda403cf93ecb8792cb1d061564d89a6553ca020', diff --git a/third_party/crashpad/crashpad/client/crashpad_client.h b/third_party/crashpad/crashpad/client/crashpad_client.h index 2442441404bee7..f8756044272781 100644 --- a/third_party/crashpad/crashpad/client/crashpad_client.h +++ b/third_party/crashpad/crashpad/client/crashpad_client.h @@ -456,6 +456,24 @@ class CrashpadClient { //! \param[in] handler The custom crash signal handler to install. static void SetFirstChanceExceptionHandler(FirstChanceHandler handler); + //! \brief Installs a custom crash signal handler which runs after the + //! currently installed Crashpad handler. + //! + //! Handling signals appropriately can be tricky and use of this method + //! should be avoided, if possible. + //! + //! A handler must have already been installed before calling this method. + //! + //! The custom handler runs in a signal handler context and must be safe for + //! that purpose. + //! + //! If the custom handler returns `true`, the signal is not reraised. + //! + //! \param[in] handler The custom crash signal handler to install. + static void SetLastChanceExceptionHandler(bool (*handler)(int, + siginfo_t*, + ucontext_t*)); + //! \brief Configures a set of signals that shouldn't have Crashpad signal //! handlers installed. //! diff --git a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc index 630c24f115c78f..f805ff1fa8f6c9 100644 --- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc +++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc @@ -131,6 +131,8 @@ std::vector BuildArgsToLaunchWithLinker( #endif // BUILDFLAG(IS_ANDROID) +using LastChanceHandler = bool (*)(int, siginfo_t*, ucontext_t*); + // A base class for Crashpad signal handler implementations. class SignalHandler { public: @@ -154,6 +156,10 @@ class SignalHandler { first_chance_handler_ = handler; } + void SetLastChanceExceptionHandler(LastChanceHandler handler) { + last_chance_handler_ = handler; + } + // The base implementation for all signal handlers, suitable for calling // directly to simulate signal delivery. void HandleCrash(int signo, siginfo_t* siginfo, void* context) { @@ -212,6 +218,11 @@ class SignalHandler { if (!handler_->disabled_.test_and_set()) { handler_->HandleCrash(signo, siginfo, context); handler_->WakeThreads(); + if (handler_->last_chance_handler_ && + handler_->last_chance_handler_( + signo, siginfo, static_cast(context))) { + return; + } } else { // Processes on Android normally have several chained signal handlers that // co-operate to report crashes. e.g. WebView will have this signal @@ -254,6 +265,7 @@ class SignalHandler { Signals::OldActions old_actions_ = {}; ExceptionInformation exception_information_ = {}; CrashpadClient::FirstChanceHandler first_chance_handler_ = nullptr; + LastChanceHandler last_chance_handler_ = nullptr; int32_t dump_done_futex_ = kDumpNotDone; #if !defined(__cpp_lib_atomic_value_initialization) || \ __cpp_lib_atomic_value_initialization < 201911L @@ -739,6 +751,12 @@ void CrashpadClient::SetFirstChanceExceptionHandler( SignalHandler::Get()->SetFirstChanceHandler(handler); } +// static +void CrashpadClient::SetLastChanceExceptionHandler(LastChanceHandler handler) { + DCHECK(SignalHandler::Get()); + SignalHandler::Get()->SetLastChanceExceptionHandler(handler); +} + void CrashpadClient::SetUnhandledSignals(const std::set& signals) { DCHECK(!SignalHandler::Get()); unhandled_signals_ = signals; diff --git a/third_party/crashpad/crashpad/client/crashpad_client_linux_test.cc b/third_party/crashpad/crashpad/client/crashpad_client_linux_test.cc index 9b207db38df213..5d492009c34649 100644 --- a/third_party/crashpad/crashpad/client/crashpad_client_linux_test.cc +++ b/third_party/crashpad/crashpad/client/crashpad_client_linux_test.cc @@ -71,11 +71,14 @@ enum class CrashType : uint32_t { kBuiltinTrap, kInfiniteRecursion, kSegvWithTagBits, + // kFakeSegv is meant to simulate a MTE segv error. + kFakeSegv, }; struct StartHandlerForSelfTestOptions { bool start_handler_at_crash; bool set_first_chance_handler; + bool set_last_chance_handler; bool crash_non_main_thread; bool client_uses_signals; bool gather_indirectly_referenced_memory; @@ -84,7 +87,7 @@ struct StartHandlerForSelfTestOptions { class StartHandlerForSelfTest : public testing::TestWithParam< - std::tuple> { + std::tuple> { public: StartHandlerForSelfTest() = default; @@ -99,6 +102,7 @@ class StartHandlerForSelfTest memset(&options_, 0, sizeof(options_)); std::tie(options_.start_handler_at_crash, options_.set_first_chance_handler, + options_.set_last_chance_handler, options_.crash_non_main_thread, options_.client_uses_signals, options_.gather_indirectly_referenced_memory, @@ -244,6 +248,10 @@ bool HandleCrashSuccessfully(int, siginfo_t*, ucontext_t*) { #pragma clang diagnostic pop } +bool HandleCrashSuccessfullyAfterReporting(int, siginfo_t*, ucontext_t*) { + return true; +} + void DoCrash(const StartHandlerForSelfTestOptions& options, CrashpadClient* client) { if (sigsetjmp(do_crash_sigjmp_env, 1) != 0) { @@ -273,6 +281,15 @@ void DoCrash(const StartHandlerForSelfTestOptions& options, *x; break; } + + case CrashType::kFakeSegv: { + // With a regular SIGSEGV like null dereference, the signal gets reraised + // automatically, causing HandleOrReraiseSignal() to be called a second + // time, terminating the process with the signal regardless of the last + // chance handler. + raise(SIGSEGV); + break; + } } } @@ -403,6 +420,10 @@ CRASHPAD_CHILD_TEST_MAIN(StartHandlerForSelfTestChild) { client.SetFirstChanceExceptionHandler(HandleCrashSuccessfully); } + if (options.set_last_chance_handler) { + client.SetLastChanceExceptionHandler(HandleCrashSuccessfullyAfterReporting); + } + #if BUILDFLAG(IS_ANDROID) if (android_set_abort_message) { android_set_abort_message(kTestAbortMessage); @@ -440,6 +461,16 @@ class StartHandlerForSelfInChildTest : public MultiprocessExec { case CrashType::kSegvWithTagBits: SetExpectedChildTermination(TerminationReason::kTerminationSignal, SIGSEGV); + break; + case CrashType::kFakeSegv: + if (!options.set_last_chance_handler) { + SetExpectedChildTermination(TerminationReason::kTerminationSignal, + SIGSEGV); + } else { + SetExpectedChildTermination(TerminationReason::kTerminationNormal, + EXIT_SUCCESS); + } + break; } } } @@ -471,7 +502,11 @@ class StartHandlerForSelfInChildTest : public MultiprocessExec { writer.Close(); if (options_.client_uses_signals && !options_.set_first_chance_handler && - options_.crash_type != CrashType::kSimulated) { + options_.crash_type != CrashType::kSimulated && + // The last chance handler will prevent the client handler from being + // called if crash type is kFakeSegv. + (!options_.set_last_chance_handler || + options_.crash_type != CrashType::kFakeSegv)) { // Wait for child's client signal handler. char c; EXPECT_TRUE(LoggingReadFileExactly(ReadPipeHandle(), &c, sizeof(c))); @@ -517,6 +552,15 @@ TEST_P(StartHandlerForSelfTest, StartHandlerInChild) { } #endif // defined(ADDRESS_SANITIZER) + // kFakeSegv does raise(SIGSEGV) to simulate a MTE error which is a SEGSEGV + // that doesn't get reraised automatically, but this causes the child process + // to flakily terminate normally on some bots (e.g. android-nougat-x86-rel) + // for some reason so this is skipped. + if (!Options().set_last_chance_handler && + Options().crash_type == CrashType::kFakeSegv) { + GTEST_SKIP(); + } + if (Options().crash_type == CrashType::kSegvWithTagBits) { #if !defined(ARCH_CPU_ARM64) GTEST_SKIP() << "Testing for tag bits only exists on aarch64."; @@ -549,10 +593,12 @@ INSTANTIATE_TEST_SUITE_P( testing::Bool(), testing::Bool(), testing::Bool(), + testing::Bool(), testing::Values(CrashType::kSimulated, CrashType::kBuiltinTrap, CrashType::kInfiniteRecursion, - CrashType::kSegvWithTagBits))); + CrashType::kSegvWithTagBits, + CrashType::kFakeSegv))); // Test state for starting the handler for another process. class StartHandlerForClientTest { diff --git a/third_party/crashpad/crashpad/test/win/win_child_process.cc b/third_party/crashpad/crashpad/test/win/win_child_process.cc index 72b55087a4817f..d1a767c4b5092d 100644 --- a/third_party/crashpad/crashpad/test/win/win_child_process.cc +++ b/third_party/crashpad/crashpad/test/win/win_child_process.cc @@ -191,7 +191,7 @@ std::unique_ptr WinChildProcess::Launch() { TestPaths::Executable().value() + base::UTF8ToWide(base::StringPrintf( " --gtest_filter=%s.%s %s=0x%x|0x%x --gtest_also_run_disabled_tests", - test_info->test_case_name(), + test_info->test_suite_name(), test_info->name(), kIsMultiprocessChild, HandleToInt(write_for_child.get()), diff --git a/third_party/dawn b/third_party/dawn index f8fa217798a7f4..deb3b674b26854 160000 --- a/third_party/dawn +++ b/third_party/dawn @@ -1 +1 @@ -Subproject commit f8fa217798a7f4dfc1e4e54f9a3a8e0b7516de2b +Subproject commit deb3b674b26854204c8082ed93926207e42d3cf2 diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index 6b4c0b6f798fc7..653fa36a656834 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal @@ -1 +1 @@ -Subproject commit 6b4c0b6f798fc770aa7082e30ea27294eff7f485 +Subproject commit 653fa36a656834ea2d28ef252f5f0b48ff474e3e diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index f81e15369a798f..bcf0ed097be848 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src @@ -1 +1 @@ -Subproject commit f81e15369a798ff5a2b7945fce15fa18b108b37c +Subproject commit bcf0ed097be848d234fb5290c1e4d69672dc5405 diff --git a/third_party/icu b/third_party/icu index 985b9a6f70e13f..a622de35ac311c 160000 --- a/third_party/icu +++ b/third_party/icu @@ -1 +1 @@ -Subproject commit 985b9a6f70e13f3db741fed121e4dcc3046ad494 +Subproject commit a622de35ac311c5ad390a7af80724634e5dc61ed diff --git a/third_party/libvpx/README.chromium b/third_party/libvpx/README.chromium index 244732ce9d0a22..c9ca378de75703 100644 --- a/third_party/libvpx/README.chromium +++ b/third_party/libvpx/README.chromium @@ -1,8 +1,8 @@ Name: libvpx URL: https://chromium.googlesource.com/webm/libvpx Version: 0 -Date: Tuesday August 29 2023 -Revision: 6da1bd01d64d3d246b633bf25c766dfe751345b7 +Date: Tuesday September 26 2023 +Revision: 38a707faef72eeff89d669c553e7bfe9e08dba8f CPEPrefix: cpe:/a:webmproject:libvpx:1.13.0 License: BSD License File: source/libvpx/LICENSE diff --git a/third_party/libvpx/source/config/vpx_version.h b/third_party/libvpx/source/config/vpx_version.h index 3ea808585e78db..3dd2b3e3c0f7c5 100644 --- a/third_party/libvpx/source/config/vpx_version.h +++ b/third_party/libvpx/source/config/vpx_version.h @@ -2,8 +2,8 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 13 #define VERSION_PATCH 0 -#define VERSION_EXTRA "447-g6da1bd01d" +#define VERSION_EXTRA "449-g38a707fae" #define VERSION_PACKED \ ((VERSION_MAJOR << 16) | (VERSION_MINOR << 8) | (VERSION_PATCH)) -#define VERSION_STRING_NOSP "v1.13.0-447-g6da1bd01d" -#define VERSION_STRING " v1.13.0-447-g6da1bd01d" +#define VERSION_STRING_NOSP "v1.13.0-449-g38a707fae" +#define VERSION_STRING " v1.13.0-449-g38a707fae" diff --git a/third_party/libvpx/source/libvpx b/third_party/libvpx/source/libvpx index 6da1bd01d64d3d..38a707faef72ee 160000 --- a/third_party/libvpx/source/libvpx +++ b/third_party/libvpx/source/libvpx @@ -1 +1 @@ -Subproject commit 6da1bd01d64d3d246b633bf25c766dfe751345b7 +Subproject commit 38a707faef72eeff89d669c553e7bfe9e08dba8f diff --git a/third_party/libwebp/README.chromium b/third_party/libwebp/README.chromium index ff9403b11d05ee..11dc3dba770857 100644 --- a/third_party/libwebp/README.chromium +++ b/third_party/libwebp/README.chromium @@ -2,7 +2,7 @@ Name: WebP image encoder/decoder Short Name: libwebp URL: https://chromium.googlesource.com/webm/libwebp Version: 0 -Revision: fd7bb21c0cb56e8a82e9bfa376164b842f433f3b +Revision: 2af26267cdfcb63a88e5c74a85927a12d6ca1d76 CPEPrefix: cpe:/a:webmproject:libwebp:1.3.1 License: BSD License File: LICENSE diff --git a/third_party/libwebp/src b/third_party/libwebp/src index fd7bb21c0cb56e..2af26267cdfcb6 160000 --- a/third_party/libwebp/src +++ b/third_party/libwebp/src @@ -1 +1 @@ -Subproject commit fd7bb21c0cb56e8a82e9bfa376164b842f433f3b +Subproject commit 2af26267cdfcb63a88e5c74a85927a12d6ca1d76 diff --git a/third_party/openscreen/src b/third_party/openscreen/src index 91b081e995ec03..fd0e81e558086c 160000 --- a/third_party/openscreen/src +++ b/third_party/openscreen/src @@ -1 +1 @@ -Subproject commit 91b081e995ec03894ce54eded84ebd3b45247d13 +Subproject commit fd0e81e558086c30fa91a4af89361cef8d1327e4 diff --git a/third_party/pdfium b/third_party/pdfium index d7470394271b6a..6e55da0c45788f 160000 --- a/third_party/pdfium +++ b/third_party/pdfium @@ -1 +1 @@ -Subproject commit d7470394271b6a6856e28ec905b19a12100f2797 +Subproject commit 6e55da0c45788fdc22fa3aab7ead414fc42b74c1 diff --git a/third_party/skia b/third_party/skia index 75038d50e273d6..bd56a010b69411 160000 --- a/third_party/skia +++ b/third_party/skia @@ -1 +1 @@ -Subproject commit 75038d50e273d648e6b3f67b300da8522ff86817 +Subproject commit bd56a010b6941116cd1900276bf5201f9a9c73da diff --git a/third_party/unrar/google/unrar_wrapper.cc b/third_party/unrar/google/unrar_wrapper.cc index 18b6c627cfb3b2..a76b497b6ea7de 100644 --- a/third_party/unrar/google/unrar_wrapper.cc +++ b/third_party/unrar/google/unrar_wrapper.cc @@ -23,7 +23,11 @@ bool RarReader::Open(base::File rar_file, base::File temp_file) { temp_file_ = std::move(temp_file); command_ = std::make_unique(); - std::wstring password_flag = L"-p" + base::UTF8ToWide(password_); + // Unrar forbids empty passwords, but requires that a password be provided for + // encrypted archives. In order to support metadata encryption, we must + // provide some password when opening the file. + std::wstring password_flag = + L"-p" + (password_.empty() ? L"x" : base::UTF8ToWide(password_)); command_->ParseArg(password_flag.data()); command_->ParseArg(const_cast(L"x")); command_->ParseDone(); diff --git a/third_party/webrtc b/third_party/webrtc index 5afcec093c1403..d8f2b0380b3ec9 160000 --- a/third_party/webrtc +++ b/third_party/webrtc @@ -1 +1 @@ -Subproject commit 5afcec093c1403fe9e3872706d04671cbc6d2983 +Subproject commit d8f2b0380b3ec980af35ce4b92ba6a211ec8c76d diff --git a/tools/mb/mb.py b/tools/mb/mb.py index 80f93c3f91dc40..f5ddf6fd89705d 100755 --- a/tools/mb/mb.py +++ b/tools/mb/mb.py @@ -92,8 +92,6 @@ def __init__(self): self.isolate_exe = 'isolate.exe' if self.platform.startswith( 'win') else 'isolate' self.use_luci_auth = False - self.rts_out_dir = self.PathJoin('gen', 'rts') - self.banned_from_rts = set() def PostArgsInit(self): self.use_luci_auth = getattr(self.args, 'luci_auth', False) @@ -105,16 +103,6 @@ def PostArgsInit(self): self.args.expectations_dir = os.path.join( os.path.dirname(self.args.config_file), 'mb_config_expectations') - banned_from_rts_map = json.loads( - self.ReadFile( - self.PathJoin(self.chromium_src_dir, 'tools', 'mb', - 'rts_banned_suites.json'))) - self.banned_from_rts.update(banned_from_rts_map.get('*', set())) - - if getattr(self.args, 'builder', None): - self.banned_from_rts.update( - banned_from_rts_map.get(self.args.builder, set())) - def Main(self, args): self.ParseArgs(args) self.PostArgsInit() @@ -175,15 +163,6 @@ def AddExpansionOptions(subp): help='Sets GN arg android_default_version_code') subp.add_argument('--android-version-name', help='Sets GN arg android_default_version_name') - subp.add_argument('--rts', - default=None, - help='which regression test selection model to use' - ' For more info about RTS, please see' - ' //docs/testing/regression-test-selection.md') - subp.add_argument('--use-rts', - action='store_true', - default=False, - help='Deprecated argument for enabling RTS') # TODO(crbug.com/1060857): Remove this once swarming task templates # support command prefixes. @@ -282,10 +261,6 @@ def AddExpansionOptions(subp): 'newline.') subp.add_argument('--json-output', help='Write errors to json.output') - subp.add_argument('--rts-target-change-recall', - type=float, - help='how much safety is needed when selecting tests. ' - '0.0 is the lowest and 1.0 is the highest') subp.add_argument('path', help='path to generate build into') subp.set_defaults(func=self.CmdGen) @@ -467,41 +442,7 @@ def CmdTrain(self): self.WriteFile(expectation_file, json_s) return 0 - def RtsSelect(self): - if self.args.rts == 'rts-ml-chromium': - model_dir = self.PathJoin(self.chromium_src_dir, 'testing', 'rts', - self.args.rts, self._CipdPlatform()) - exe = self.PathJoin(model_dir, self.args.rts) - else: - model_dir = self.PathJoin(self.chromium_src_dir, 'testing', 'rts', - self._CipdPlatform()) - exe = self.PathJoin(model_dir, self.args.rts) - - if self.platform == 'win32': - exe += '.exe' - - args = [ - exe, - 'select', - '-gen-inverse', - '-model-dir', model_dir, \ - '-out', self.PathJoin(self.ToAbsPath(self.args.path), self.rts_out_dir), - '-checkout', self.chromium_src_dir, - ] - if self.args.rts_target_change_recall: - if (self.args.rts_target_change_recall < 0 - or self.args.rts_target_change_recall > 1): - self.WriteFailureAndRaise( - 'rts-target-change-recall must be between (0 and 1]', None) - args += ['-target-change-recall', str(self.args.rts_target_change_recall)] - - ret, _, err = self.Run(args, force_verbose=True) - if ret != 0: - self.WriteFailureAndRaise(err, None) - def CmdGen(self): - if self.args.rts: - self.RtsSelect() vals = self.Lookup() return self.RunGNGen(vals) @@ -1291,20 +1232,6 @@ def GenerateIsolates(self, vals, ninja_targets, isolate_map, build_dir): return ret return 0 - def AddFilterFileArg(self, target, build_dir, command, inverted=False): - filter_file = ('%s_inverted' % target if inverted else target) + '.filter' - filter_file_path = self.PathJoin(self.rts_out_dir, filter_file) - abs_filter_file_path = self.ToAbsPath(build_dir, filter_file_path) - - filter_exists = self.Exists(abs_filter_file_path) - if filter_exists: - filtered_command = command.copy() - filtered_command.append('--test-launcher-filter-file=%s' % - filter_file_path) - self.Print('added RTS filter file to command: %s' % filter_file) - return filtered_command - return None - def PossibleRuntimeDepsPaths(self, vals, ninja_targets, isolate_map): """Returns a map of targets to possible .runtime_deps paths. @@ -1509,25 +1436,6 @@ def WriteIsolateFiles(self, build_dir, command, target, runtime_deps, vals, 'files': files, } } - # For more info about RTS, please see - # //docs/testing/regression-test-selection.md - if self.args.rts: - if target in self.banned_from_rts: - self.Print('%s is banned for RTS on this builder' % target) - else: - rts_command = self.AddFilterFileArg(target, - build_dir, - command, - inverted=False) - if rts_command: - isolate['variables']['rts_command'] = rts_command - - inverted_command = self.AddFilterFileArg(target, - build_dir, - command, - inverted=True) - if inverted_command: - isolate['variables']['inverted_command'] = inverted_command self.WriteFile(isolate_path, json.dumps(isolate, sort_keys=True) + '\n') @@ -1602,9 +1510,6 @@ def GNArgs(self, vals, expand_imports=False): if android_version_name: gn_args += ' android_default_version_name="%s"' % android_version_name - if self.args.rts: - gn_args += ' use_rts=true' - args_gn_lines = [] parsed_gn_args = {} diff --git a/tools/mb/rts_banned_suites.json b/tools/mb/rts_banned_suites.json deleted file mode 100644 index 89e33f58445c80..00000000000000 --- a/tools/mb/rts_banned_suites.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - - "*": [ - "xr_browser_tests", - "metrics_python_tests", - "mojo_python_unittests", - "blink_python_tests", - "gl_unittests_ozone", - "grit_python_unittests", - "telemetry_perf_unittests", - "telemetry_perf_unittests_android_chrome", - "telemetry_perf_unittests_android_monochrome", - "telemetry_perf_unittests_android_monochrome_bundle", - "telemetry_perf_unittests_android_weblayer", - "telemetry_perf_unittests_android_webview", - "maps_tests", - "telemetry_gpu_unittests", - "telemetry_gpu_integration_test", - "telemetry_gpu_integration_test_android_chrome", - "telemetry_gpu_integration_test_android_monochrome", - "telemetry_gpu_integration_test_android_monochrome_bundle", - "telemetry_gpu_integration_test_android_weblayer", - "telemetry_gpu_integration_test_android_webview", - "monochrome_public_apk_checker" - ], - "fuchsia_x64_rts": [ - "blink_web_tests" - ] -} diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index 680a9f575d80c8..b694cd437dee2f 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml @@ -18723,6 +18723,35 @@ should be able to be added at any place in this file. + + nicolasmacbeth@google.com + tmartino@chromium.org + + Reported when the user clicks on the entrypoint button of the "save + passwords in account" section. iOS only. + + + + + nicolasmacbeth@google.com + tmartino@chromium.org + + Reported when the user accepts the confirmation dialog to move their local + passwords to their account. iOS only. + + + + + nicolasmacbeth@google.com + tmartino@chromium.org + + Reported when the user denies the confirmation dialog to move their local + passwords to their account. iOS only. + + + triploblastic@chromium.org chrome-signin-team@google.org @@ -24166,6 +24195,15 @@ should be able to be added at any place in this file. + + yuezhanggg@chromium.org + chrome-shopping@google.com + chrome-desktop-ntp@google.com + + User clicks on a tile with discount in the history cluster module. + + + tiborg@chromium.org yyushkina@chromium.org @@ -32536,6 +32574,57 @@ should be able to be added at any place in this file. + + arthurmilchior@chromium.org + chrome-signin-team@google.com + + Recorded when the Bulk Upload Settings is dismissed. iOS only. + + + + + arthurmilchior@chromium.org + chrome-signin-team@google.com + + Recorded when the face id auth cannot be started in the Bulk Upload + Settings. iOS only. + + + + + arthurmilchior@chromium.org + chrome-signin-team@google.com + + Recorded when the face id auth fails in the Bulk Upload Settings. iOS only. + + + + + arthurmilchior@chromium.org + chrome-signin-team@google.com + + Recorded when the face id auth is successful in the Bulk Upload Settings. + iOS only. + + + + + arthurmilchior@chromium.org + chrome-signin-team@google.com + + Recorded when the Bulk Upload Settings is opened. iOS only. + + + + + arthurmilchior@chromium.org + chrome-signin-team@google.com + + Recorded when the user presses the save button in the Bulk Upload Settings. + iOS only. + + + gogerald@chromium.org @@ -39469,6 +39558,8 @@ should be able to be added at any place in this file. label="For Sharing Hub link toggle feature."/> + A generic error occurred. + + + + + + + + + Removed from code July 2018. Variations in WebView has launched. @@ -18688,22 +18697,20 @@ Called by update_net_error_codes.py.--> - - - - - - - - - - - - + + + + + + + + + + + + + label="Icons, Addresses, Names, Emails, and Telephone numbers"/> @@ -19976,7 +19983,6 @@ Called by update_net_error_codes.py.--> - @@ -19989,8 +19995,6 @@ Called by update_net_error_codes.py.--> label="aggregatable_trigger_data value key_piece has wrong format"/> - + + Device is a regular Chromebook. + + Device is a Soft Branded Chromebook Plus. + + + Device is a Hard Branded Chromebook Plus. + + + Feature module has been requested but is not installed yet. @@ -44001,6 +44015,25 @@ Called by update_use_counter_feature_enum.py.--> + + + + + + + + + + + + + + + + + + + @@ -49841,6 +49874,22 @@ Called by update_permissions_policy_enum.py.--> + + + A hash of the update cohort id; a value of zero/none likely indicates no + cohort id, which suggests that the updater is broken or not present. + + + + + + + A hash of the update cohort name; a value of zero/none likely indicates no + cohort name, which suggests that the updater is broken or not present. + + + + @@ -55712,6 +55761,7 @@ Unsupported non-ascii characters will cause issues with xml presubmits. + @@ -60476,6 +60526,7 @@ from previous Chrome versions. + @@ -61260,6 +61311,7 @@ from previous Chrome versions. + @@ -62665,6 +62717,7 @@ from previous Chrome versions. + + @@ -63824,6 +63878,7 @@ from previous Chrome versions. + @@ -66048,6 +66103,7 @@ from previous Chrome versions. + @@ -79599,6 +79655,14 @@ Called by update_net_trust_anchors.py.--> + + + + + + + + @@ -80179,6 +80243,7 @@ Called by update_net_trust_anchors.py.--> + @@ -82598,6 +82663,12 @@ Called by update_net_trust_anchors.py.--> + + + + + + The loading dialog was requested but the loading finished before it got @@ -94336,6 +94407,15 @@ https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf + + + + + + + + + @@ -97684,6 +97764,7 @@ https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf + @@ -98462,6 +98543,19 @@ https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf + + + + + + + The different reasons a user might be ineligible for a shopping feature. @@ -117381,6 +117475,8 @@ Called by update_scheduler_enums.py.--> + + diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index c2e394a3dcfeb1..be6388eb037a4e 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml @@ -758,6 +758,16 @@ chromium-metrics-reviews@google.com. + + finnur@chromium.org + twellington@chromium.org + + The contact properties requested by the website but rejected by the user. + Measured once when the Contacts Picker dialog is dismissed. + + + finnur@chromium.org @@ -4336,18 +4346,18 @@ chromium-metrics-reviews@google.com. - amanvr@google.com woa-performance@google.com Records the time taken by chrome to display the first frame presented after - unfolding a foldable device. This histogram aims to capture the unfold - latency in devices which switch to tablet mode when unfolded, and is - recorded every time the device is unfolded. The begin timestamp of the - metric is the timestamp from the start of the first OnPause activity - lifecycle callback before the activity recreates. The end timestamp is the - timestamp when Chrome displays the first frame on the new screen. + unfolding a foldable device when Chrome is on top. This histogram aims to + capture the unfold latency in devices which switch to tablet mode when + unfolded, and is recorded every time the device is unfolded. The begin + timestamp of the metric is the timestamp from the start of the first OnPause + activity lifecycle callback before the activity recreates. The end timestamp + is the timestamp when Chrome displays the first frame on the new screen. @@ -5685,6 +5695,30 @@ chromium-metrics-reviews@google.com. + + jdeabreu@chromium.org + src/android_webview/OWNERS + + Records whether a given URL is allowed to be loaded by the current device + user. This is based on a combination of a call to GMS Core, which checks if + the url is allowed, and the setting + AwFeatures.WEBVIEW_SUPERVISED_USER_SITE_BLOCK, which determines if we + actually block urls or only log the results. + + + + + jdeabreu@chromium.org + src/android_webview/OWNERS + + Records the time taken to return from the call to GMS Core that checks if a + given URL is allowed to be loaded by the current device user. + + + pbirk@chromium.org diff --git a/tools/metrics/histograms/metadata/arc/histograms.xml b/tools/metrics/histograms/metadata/arc/histograms.xml index e42521142b1eca..6414c7cee7af2a 100644 --- a/tools/metrics/histograms/metadata/arc/histograms.xml +++ b/tools/metrics/histograms/metadata/arc/histograms.xml @@ -548,6 +548,22 @@ chromium-metrics-reviews@google.com. + + khmel@google.com + hidehiko@chromium.org + arc-performance@google.com + + Number of requests of ARC app launching in a user session. + + Note: this is emitted at the beginning of the next user session. This is + because ash-chrome may be shutdown unexepctedly (incl. crashes), so emit the + value at the end of the user session is not reliable enough. Instead, the + number of requests are tracked and stored in the PrefService to survive + chrome restart, and the value is emitted in the next user session. + + + mmourgos@chromium.org diff --git a/tools/metrics/histograms/metadata/autofill/histograms.xml b/tools/metrics/histograms/metadata/autofill/histograms.xml index 97e1dd158406c3..670426558999fe 100644 --- a/tools/metrics/histograms/metadata/autofill/histograms.xml +++ b/tools/metrics/histograms/metadata/autofill/histograms.xml @@ -2113,6 +2113,45 @@ chromium-metrics-reviews@google.com. + + koerber@google.com + chrome-autofill-alerts@google.com + + For {AutofillFormType} logs a filling complex score on form submission that + is calculated as following: + + Score = 10 * number_of_accepted_fields + number_of_corrected_fields + + The score resembles a two dimensional histogram to evaluate the number of + accepted fields against the number of corrected ones. Both number of fields + used in the score are limited to 9 to guaranteed that the score will be + within 0 and 99 and that the significant digit corresponds to the number of + accepted fields while the least significant digit corresponds to the number + of corrected fields. + + The score is only emitted when there is at least one correct or accepted + field. + + + + + + koerber@google.com + chrome-autofill-alerts@google.com + + For {AutofillFormType} logs a filling score on form submission that is + calculated as following: + + Score = 2 * number_of_accepted_fields - 3 * number_of_corrected_fields + 100 + + The score is only emitted when there is at least one correct or accepted + field. + + + + tmartino@chromium.org diff --git a/tools/metrics/histograms/metadata/chrome/histograms.xml b/tools/metrics/histograms/metadata/chrome/histograms.xml index af40b8a18642af..24413f87a8252c 100644 --- a/tools/metrics/histograms/metadata/chrome/histograms.xml +++ b/tools/metrics/histograms/metadata/chrome/histograms.xml @@ -32,6 +32,17 @@ chromium-metrics-reviews@google.com. + + robliao@chromium.org + pkasting@chromium.org + + Recorded only for Windows on every primary button mouse down determined to + be in the caption area of Chrome. True if the primary button mouse down was + in the reserved grab handle space, false otherwise. + + + kvitekp@chromium.org diff --git a/tools/metrics/histograms/metadata/commerce/histograms.xml b/tools/metrics/histograms/metadata/commerce/histograms.xml index 5266cc156315cd..f57e6d5d5146ae 100644 --- a/tools/metrics/histograms/metadata/commerce/histograms.xml +++ b/tools/metrics/histograms/metadata/commerce/histograms.xml @@ -135,6 +135,19 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra + + zhiyuancai@chromium.org + meiliang@chromium.org + chrome-shopping@google.com + + Records the result of fetching discounts in the shopping service. Recorded + for every requested url. This is used to evaluate the local discounts + database. For example, we may not need the local database if it returns + invalid info for most requested urls / almost never returns valid info. + + + yuezhanggg@chromium.org diff --git a/tools/metrics/histograms/metadata/feature_engagement/histograms.xml b/tools/metrics/histograms/metadata/feature_engagement/histograms.xml index cf995b4b092bce..c2edaee3471df4 100644 --- a/tools/metrics/histograms/metadata/feature_engagement/histograms.xml +++ b/tools/metrics/histograms/metadata/feature_engagement/histograms.xml @@ -388,6 +388,9 @@ chromium-metrics-reviews@google.com. highlights"/> + diff --git a/tools/metrics/histograms/metadata/file/histograms.xml b/tools/metrics/histograms/metadata/file/histograms.xml index a33b718870970a..7cc611b5a1f37b 100644 --- a/tools/metrics/histograms/metadata/file/histograms.xml +++ b/tools/metrics/histograms/metadata/file/histograms.xml @@ -712,6 +712,20 @@ chromium-metrics-reviews@google.com. + + simmonsjosh@google.com + src/ui/file_manager/OWNERS + + Percentage of Docs/Sheets/Slides that are available offline compared to the + total number of known Docs/Sheets/Slides by DriveFS. A file is considered + known if DriveFS has cached the metadata for the file. Docs offline can see + many more files then DriveFS so we prune the list of known files before + sending this metric. This is emitted during the polling of Docs offline + which happens if at least one Files app window is open. + + + diff --git a/tools/metrics/histograms/metadata/google/histograms.xml b/tools/metrics/histograms/metadata/google/histograms.xml index b3da12d3d6365a..4fcf209f1f906d 100644 --- a/tools/metrics/histograms/metadata/google/histograms.xml +++ b/tools/metrics/histograms/metadata/google/histograms.xml @@ -29,15 +29,28 @@ chromium-metrics-reviews@google.com. The HRESULT for a failed on-demand update check. - + waffles@chromium.org chrome-metrics-team@google.com omaha-team@google.com - Store the hash of update cohort name as reported by Chrome Updater on - Windows. Recorded at the start of metrics service. Warning: this histogram - was expired from 2019-06-01 to 2023-01-23; data may be missing. + The hash of the browser's update cohort name that was present during browser + startup. Warning: this histogram was expired from 2019-06-01 to 2023-01-23; + data may be missing. This histogram is reported on every UMA log on Windows. + + + + + waffles@chromium.org + chrome-metrics-team@google.com + omaha-team@google.com + + The base::PersistentHash of the browser's update cohort ID that was present + at the time of the metrics upload. This histogram is reported on every UMA + log on Windows. Unlike cohort name, cohort ID will generally be unique for + each rollout group and control group. diff --git a/tools/metrics/histograms/metadata/ios/histograms.xml b/tools/metrics/histograms/metadata/ios/histograms.xml index b129bbb3fd76cd..73203bae609c79 100644 --- a/tools/metrics/histograms/metadata/ios/histograms.xml +++ b/tools/metrics/histograms/metadata/ios/histograms.xml @@ -1789,6 +1789,17 @@ chromium-metrics-reviews@google.com. + + nicolasmacbeth@google.com + tmartino@chromium.org + + The number of local passwords the user has moved to their account using the + bulk save passwords in account module in password manager settings. This is + logged when the user chooses to bulk move their passwords to their account. + + + veronguyen@google.com diff --git a/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml b/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml index 48898c7a0e07a9..e0746556a91bad 100644 --- a/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml +++ b/tools/metrics/histograms/metadata/leveldb_proto/histograms.xml @@ -31,6 +31,7 @@ chromium-metrics-reviews@google.com. + + + anasr@google.com + bzielinski@google.com + jophba@chromium.org + mfoltz@chromium.org + cros-edu-eng@google.com + + Records the percentage of {CastStreamingSenderAudioVideo} frames that are + reported as late, and therefore dropped by the sender, during a cast + mirroring session. Recorded at the end of a cast mirroring session. Logged + on all desktop platforms. + + + + @@ -5305,6 +5323,18 @@ chromium-metrics-reviews@google.com. + + herre@google.com + video-cmi-apis@google.com + + Time during VideoSourceImpl startup taken to create a video_capture::Device + object. Only recorded if the creation was successful. Is a subset of + Media.VideoCapture.StartSourceSuccessLatency corresponding to Device + creation, rather than capture startup in the device. + + + armax@chromium.org @@ -5615,6 +5645,16 @@ chromium-metrics-reviews@google.com. + + herre@google.com + video-cmi-apis@google.com + + Total time for a VideoSourceImpl to start a device to serve the first push + subscription mojo connection. Only recorded if starting is successful. + + + mcasas@chromium.org diff --git a/tools/metrics/histograms/metadata/network/histograms.xml b/tools/metrics/histograms/metadata/network/histograms.xml index dd48e7fea9fcde..376c3cc8792c0e 100644 --- a/tools/metrics/histograms/metadata/network/histograms.xml +++ b/tools/metrics/histograms/metadata/network/histograms.xml @@ -818,7 +818,7 @@ chromium-metrics-reviews@google.com. - azeemarshad@chromium.org khorimoto@chromium.org @@ -832,6 +832,11 @@ chromium-metrics-reviews@google.com. Emitted once the operation completes. + + + + + yoichio@chromium.org blink-network-stack@google.com - Recoards the time from origin to the network service starts when the network + Records the time from origin to the network service starts when the network service is initialized. See https://crbug.com/1439721. @@ -4199,6 +4204,60 @@ chromium-metrics-reviews@google.com. + + aakallam@chromium.org + src/chrome/browser/ip_protection/OWNERS + + Records the estimated memory usage of the NetworkServiceProxyAllowList every + time the Masked Domain List is updated. + + + + + aakallam@chromium.org + src/chrome/browser/ip_protection/OWNERS + + Records the estimated memory usage of the NetworkServiceResourceBlockList + every time the Masked Domain List is updated. + + + + + aakallam@chromium.org + src/chrome/browser/ip_protection/OWNERS + + Record the size of the Masked Domain List proto in KB. Emitted when the raw + proto bytes are received from Component Updater and parsed. + + + + + aakallam@chromium.org + src/chrome/browser/ip_protection/OWNERS + + Records the time it takes to update the NetworkServiceProxyAllowList and + NetworkServiceResourceBlockList with the contents of the Masked Domain List + after the Network Service receives an update from Component Updater. + + + + + aakallam@chromium.org + src/chrome/browser/ip_protection/OWNERS + + Records the result of an attempt to update the NetworkServiceProxyAllowList + and NetworkServiceResourceBlockList with the contents of the Masked Domain + List when it is received from Component Updater. + + + qingsi@chromium.org diff --git a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml index ea8ded0a1f783f..20590095b7a094 100644 --- a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml +++ b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml @@ -690,6 +690,19 @@ chromium-metrics-reviews@google.com. + + yuezhanggg@chromium.org + chrome-shopping@google.com + chrome-desktop-ntp@google.com + + Logs whether the Cluster showing in the module contains a visible discount, + i.e. at least one visible visit has an associated discount. Logged when the + NewTabPage is rendering the enabled modules. Only logged in 1P NTP with the + history clusters module and Discount feature enabled. + + + romanarora@chromium.org diff --git a/tools/metrics/histograms/metadata/omnibox/histograms.xml b/tools/metrics/histograms/metadata/omnibox/histograms.xml index 973e93b42c83e4..f42fe9e5f8c86d 100644 --- a/tools/metrics/histograms/metadata/omnibox/histograms.xml +++ b/tools/metrics/histograms/metadata/omnibox/histograms.xml @@ -456,6 +456,16 @@ chromium-metrics-reviews@google.com. + + peilinwang@google.com + woa-performance-bugs+jank@google.com + + Measures the amount of time it takes to call UrlBar.calculateVisibleHint(). + Recorded once per call. + + + jdonnelly@chromium.org @@ -1309,6 +1319,16 @@ chromium-metrics-reviews@google.com. variants="OmniboxAutocompleteUpdateSlice"/> + + peilinwang@google.com + woa-performance-bugs+jank@google.com + + Records the number of characters visible in the omnibox. Recorded once per + call to UrlBar.calculateVisibleHint(). + + + jdonnelly@chromium.org @@ -1581,7 +1601,7 @@ chromium-metrics-reviews@google.com. - ender@google.com chrome-search@google.com @@ -1595,6 +1615,18 @@ chromium-metrics-reviews@google.com. + + ender@google.com + chrome-search@google.com + + Whether Ctrl+Enter key combination was used to complete an interaction with + the Omnibox. + + Recorded each time user accepts Omnibox text via Keyboard. + + + jdonnelly@chromium.org @@ -1718,6 +1750,16 @@ chromium-metrics-reviews@google.com. + + peilinwang@google.com + woa-performance-bugs+jank@google.com + + Records the length of the text to set when calling UrlBar.setText(). + Recorded once per call to setText(). + + + peilinwang@google.com @@ -2511,6 +2553,19 @@ chromium-metrics-reviews@google.com. + + tluk@chromium.org + chrome-desktop-search@google.com + + Records the number of milliseconds between the views omnibox popup + construction and the first time content for the popup is displayed on the + screen. This is emitted once each time the omnibox is opened. It is recorded + again if the omnibox has closed and later re-opened. It is not emitted more + than once for a single opened instance of the ombibox popup. + + + orinj@chromium.org diff --git a/tools/metrics/histograms/metadata/optimization/histograms.xml b/tools/metrics/histograms/metadata/optimization/histograms.xml index b8d4950006035d..b8d81533633c96 100644 --- a/tools/metrics/histograms/metadata/optimization/histograms.xml +++ b/tools/metrics/histograms/metadata/optimization/histograms.xml @@ -133,6 +133,9 @@ chromium-metrics-reviews@google.com. summary="Validates metadata fetch on navigation"/> + + + rajendrant@chromium.org + sophiechang@google.com + + Records the result of an OAuth access token request. Recorded every time a + request was made for allowed request contexts for on-demand hints. + + + sophiechang@chromium.org diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 404bb6644296ee..541426ef9019b1 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml @@ -4240,7 +4240,7 @@ chromium-metrics-reviews@google.com. - tquintanilla@chromium.org linnan@chromium.org @@ -14557,7 +14557,7 @@ regressions. --> - ainslie@chromium.org edwardjung@chromium.org @@ -14619,12 +14619,14 @@ regressions. --> + + diff --git a/tools/metrics/histograms/metadata/password/histograms.xml b/tools/metrics/histograms/metadata/password/histograms.xml index 826ff99b018fea..b24cec5bb7b3c7 100644 --- a/tools/metrics/histograms/metadata/password/histograms.xml +++ b/tools/metrics/histograms/metadata/password/histograms.xml @@ -1537,6 +1537,17 @@ chromium-metrics-reviews@google.com. + + vasilii@chromium.org + vsemeniuk@google.com + + Represent all possible states of GetLogins call in regards to grouped + matches. This metric helps to evaluate grouped matches usefulness. Recorded + when a call finished and only if it was successful. + + + kazinova@google.com @@ -2374,6 +2385,19 @@ chromium-metrics-reviews@google.com. + + izuzic@google.com + ioanap@chromium.org + + This histogram logs the UI surface that led to showing an empty local + passwords migration warning sheet. Recorded when the sheet is closing, but + only if it was blank. Android only. This replaces + PasswordManager.PasswordMigrationWarning.EmptySheetTrigger which had a bug + causing it to also report triggers of non-empty sheets. + + + ioanap@chromium.org @@ -2399,7 +2423,8 @@ chromium-metrics-reviews@google.com. + enum="PasswordMigrationWarningSheetStateAtClosing" + expires_after="2024-01-29"> izuzic@google.com ioanap@chromium.org diff --git a/tools/metrics/histograms/metadata/platform/histograms.xml b/tools/metrics/histograms/metadata/platform/histograms.xml index 1dce4bb446370b..62639723daaf01 100644 --- a/tools/metrics/histograms/metadata/platform/histograms.xml +++ b/tools/metrics/histograms/metadata/platform/histograms.xml @@ -1630,6 +1630,7 @@ chromium-metrics-reviews@google.com. + gwendal@chromium.org mutexlox@chromium.org iby@chromium.org cros-telemetry@google.com @@ -1640,6 +1641,20 @@ chromium-metrics-reviews@google.com. + + gwendal@chromium.org + mutexlox@chromium.org + iby@chromium.org + cros-telemetry@google.com + + Records the scope level of the device (Soft vs Hard Branded). Recorded in + every UMA upload. + + See libsegmentation in platform2 for context. + + + gwendal@google.com diff --git a/tools/metrics/histograms/metadata/power/histograms.xml b/tools/metrics/histograms/metadata/power/histograms.xml index 91c38840478045..77220e50170b04 100644 --- a/tools/metrics/histograms/metadata/power/histograms.xml +++ b/tools/metrics/histograms/metadata/power/histograms.xml @@ -250,7 +250,9 @@ chromium-metrics-reviews@google.com. See definition of PerformanceMonitor.EnergyImpact2.ProcessName. This is recorded every 2 minutes for {UsageScenario} (see - go/chrome_power_use_per_scenario). + go/chrome_power_use_per_scenario). *NB: This metric will be recorded as all + zeros starting in mid-October 2023 as an intermediate step towards + retirement.* @@ -272,7 +274,8 @@ chromium-metrics-reviews@google.com. that short lived processes will rarely be included in the data. Furthermore, we know that short-lived processes are very common (see Renderer.ProcessLifetime). A future version of this metric will address this - limitation. + limitation. *NB: This metric will be recorded as all zeros starting in + mid-October 2023 as an intermediate step towards retirement.* diff --git a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml index 848d9091f450c8..0e6b5b690fa0d9 100644 --- a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml @@ -93,6 +93,12 @@ chromium-metrics-reviews@google.com. + + + + + + @@ -1542,6 +1548,17 @@ chromium-metrics-reviews@google.com. + + ajuma@chromium.org + joemerramos@chromium.org + chrome-counter-abuse-alerts@google.com + + Logs whether a subframe Safe Browsing check is skipped. This is recorded + once for every subframe navigation policy decision. + + + ajuma@chromium.org @@ -2329,6 +2346,18 @@ chromium-metrics-reviews@google.com. + + jacastro@chromium.org + chrome-counter-abuse-alerts@google.com + + Records the outcome of running the tailored security retry logic. It is + logged once each time Chrome starts for syncing users in the cases where the + retry attempt could occur. + + + - xinghuilu@chromium.org chrome-counter-abuse-alerts@google.com @@ -3039,6 +3069,7 @@ failing to fetch the updates which puts users' security at risk. --> loader throttle. Logged each time WillStartRequest is called. + + + mercerd@google.com + lens-chrome-eng@google.com + + When the user performs a Lens search on Desktop, records if the viewport + dimensions of the side panel were included in the request. A false value + indicates either the viewport width or height were not included in the + request. A true value is recorded if and only if both the `vpw` and `vph` + url params were added to the request with non-zero values. + + + yusufo@chromium.org diff --git a/tools/metrics/histograms/metadata/segmentation_platform/histograms.xml b/tools/metrics/histograms/metadata/segmentation_platform/histograms.xml index 17587815d62d81..9ebb6cac0d115e 100644 --- a/tools/metrics/histograms/metadata/segmentation_platform/histograms.xml +++ b/tools/metrics/histograms/metadata/segmentation_platform/histograms.xml @@ -333,30 +333,6 @@ chromium-metrics-reviews@google.com. - - ssid@chromium.org - chrome-segmentation-platform@google.com - - The time taken from the time user enabled sync consent to the time result is - available for device switcher user segment. This includes the network delay - for downloading the device info data. The metric is recorded once for each - user at the time when the user enables sync on the device. - - - - - ssid@chromium.org - chrome-segmentation-platform@google.com - - The time taken from the startup to the time result is available for the - device switcher user segment. The metric is recorded once for each user the - first time the device switcher segmentation is enabled, only if the user - already had sync enabled. - - - + + boujane@google.com + koilos@google.com + + In case of non normal browser(Pop up or PIP for example), Records whether + the window width was too small to fit the consent dialog. + + + + + boujane@google.com + koilos@google.com + + In case of non normal browser(Pop up or PIP for example), Records whether + the window width was too small to fit the notice dialog. + + + olesiamarukhno@google.com diff --git a/tools/metrics/histograms/metadata/signin/histograms.xml b/tools/metrics/histograms/metadata/signin/histograms.xml index 010f638e20a8bc..129faac2942950 100644 --- a/tools/metrics/histograms/metadata/signin/histograms.xml +++ b/tools/metrics/histograms/metadata/signin/histograms.xml @@ -248,31 +248,17 @@ prefs when the profile is loaded. --> - - msarda@chromium.org - chrome-signin-team@google.com - - Indicates whether the account was seeded when the account info needs to be - refreshed. - - This histogram will be used to decide whether the account needs to be seeded - during while refreshing the account info. - - - - - msarda@chromium.org + sinhak@chromium.org chrome-signin-team@google.com - Indicates if the account being seeded by AccountTracker has an empty account - id. This is in general an error as the account with an empty id cannot be - tracked. + Indicates if the account being tracked by AccountTracker has an empty + account id. This is recorded whenever AccountTracker starts tracking a new + account. This histogram will be used to decide the severity of AccountTracker - receiving malformed account ids during the seeding process. + receiving malformed account ids. diff --git a/tools/metrics/histograms/metadata/tab/histograms.xml b/tools/metrics/histograms/metadata/tab/histograms.xml index 540dbcab03a036..3ab342fddb2c78 100644 --- a/tools/metrics/histograms/metadata/tab/histograms.xml +++ b/tools/metrics/histograms/metadata/tab/histograms.xml @@ -59,15 +59,6 @@ chromium-metrics-reviews@google.com. get real interactable content displayed."/> - - - - - - - - - vovoy@chromium.org @@ -2335,21 +2326,6 @@ chromium-metrics-reviews@google.com. - - chrisha@chromium.org - fdoray@chromium.org - catan-team@chromium.org - - The number of tabs that haven't been interacted with, visible or audible - over a given interval time, but which no longer exist at all at the end of - this interval. {Tabs_TabUsageIntervalLength} - - - - pakzhygitov@google.com @@ -2360,49 +2336,6 @@ chromium-metrics-reviews@google.com. - - chrisha@chromium.org - fdoray@chromium.org - catan-team@chromium.org - - The number of tabs that haven't been interacted with, visible or audible or - visible during a given interval of time and still exist at the end of this - interval. {Tabs_TabUsageIntervalLength} - - - - - - chrisha@chromium.org - fdoray@chromium.org - catan-team@chromium.org - - The number of tabs that have been interacted with, visible or audible over a - given interval of time, but which no longer exist at all at the end of this - interval. {Tabs_TabUsageIntervalLength} - - - - - - chrisha@chromium.org - fdoray@chromium.org - catan-team@chromium.org - - The number of tabs that have been interacted with, visible or audible during - a given interval of time, includes tabs that don't exist at the end of this - interval. {Tabs_TabUsageIntervalLength} - - - - diff --git a/tools/traffic_annotation/summary/annotations.xml b/tools/traffic_annotation/summary/annotations.xml index 73e08dda78264e..41fdc28a726070 100644 --- a/tools/traffic_annotation/summary/annotations.xml +++ b/tools/traffic_annotation/summary/annotations.xml @@ -433,4 +433,5 @@ Refer to README.md for content description and update process. + diff --git a/tools/traffic_annotation/summary/grouping.xml b/tools/traffic_annotation/summary/grouping.xml index e3ca874ef90284..272ccfaa2b7e38 100644 --- a/tools/traffic_annotation/summary/grouping.xml +++ b/tools/traffic_annotation/summary/grouping.xml @@ -295,6 +295,7 @@ after discussions on the right group. +