Commit 50bf3449 authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Fix volume slider not being announced by ChromeVox.

BUG=1013251

Change-Id: Ib68dfd00adca4af4bafccc3532681901887d566d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024076Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735779}
parent 6630c0fd
......@@ -175,11 +175,13 @@ void UnifiedVolumeView::Update(bool by_user) {
// Slider's value is in finer granularity than audio volume level(0.01),
// there will be a small discrepancy between slider's value and volume level
// on audio side. To avoid the jittering in slider UI, do not set change
// slider value if the change is less than the threshold.
// on audio side. To avoid the jittering in slider UI, use the slider's
// current value.
if (std::abs(level - slider()->GetValue()) < kSliderIgnoreUpdateThreshold)
return;
level = slider()->GetValue();
// Note: even if the value does not change, we still need to call this
// function to enable accessibility events (crbug.com/1013251).
SetSliderValue(level, by_user);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment