Remove checks for inline text boxes loading in Android accessibility
AX-Relnotes: N/A Bug: 372718628, 374485612, 375257503 Change-Id: I344cafe54f22bdf65c2b162b78568701741caf5c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5962460 Auto-Submit: Mark Schillaci <mschillaci@google.com> Reviewed-by: Akihiro Ota <akihiroota@chromium.org> Commit-Queue: Akihiro Ota <akihiroota@chromium.org> Cr-Commit-Position: refs/heads/main@{#1373357}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
29c798edcc
commit
2e949f9086
@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/rand_util.h"
|
||||
#ifdef UNSAFE_BUFFERS_BUILD
|
||||
// TODO(crbug.com/342213636): Remove this and spanify to fix the errors.
|
||||
#pragma allow_unsafe_buffers
|
||||
@ -1452,36 +1451,12 @@ void WebContentsAccessibilityAndroid::RecordInlineTextBoxMetrics(
|
||||
ui::AXMode::BundleHistogramValue bundle;
|
||||
if (mode == ui::kAXModeBasic) {
|
||||
bundle = ui::AXMode::BundleHistogramValue::kBasic;
|
||||
|
||||
// TODO(mschillaci): Remove once inline textboxes is fixed.
|
||||
// This will be too noisy if recorded each time.
|
||||
static bool previously_logged_basic = false;
|
||||
if (!previously_logged_basic && base::RandDouble() < 0.0005) {
|
||||
previously_logged_basic = true;
|
||||
DUMP_WILL_BE_NOTREACHED()
|
||||
<< "Inline text boxes will not be loaded in basic state, so this "
|
||||
"request will not be fulfilled. Current services are: "
|
||||
<< base::JoinString(
|
||||
ui::AccessibilityState::GetAccessibilityServiceIds(), ", ");
|
||||
}
|
||||
} else if (mode == ui::kAXModeWebContentsOnly) {
|
||||
bundle = ui::AXMode::BundleHistogramValue::kWebContentsOnly;
|
||||
} else if (mode == ui::kAXModeComplete) {
|
||||
bundle = ui::AXMode::BundleHistogramValue::kComplete;
|
||||
} else if (mode == ui::kAXModeFormControls) {
|
||||
bundle = ui::AXMode::BundleHistogramValue::kFormControls;
|
||||
|
||||
// TODO(mschillaci): Remove once inline textboxes is fixed.
|
||||
// This will be too noisy if recorded each time.
|
||||
static bool previously_logged_forms = false;
|
||||
if (!previously_logged_forms && base::RandDouble() < 0.003) {
|
||||
previously_logged_forms = true;
|
||||
DUMP_WILL_BE_NOTREACHED()
|
||||
<< "Should not be loading inline text boxes while in form controls "
|
||||
"state. Current services are: "
|
||||
<< base::JoinString(
|
||||
ui::AccessibilityState::GetAccessibilityServiceIds(), ", ");
|
||||
}
|
||||
} else {
|
||||
bundle = ui::AXMode::BundleHistogramValue::kUnnamed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user