Commit 527d8c2e authored by Yuanyao Zhong's avatar Yuanyao Zhong Committed by Commit Bot

[chromecast] Fix IsRapidChangingSlider on x86 builds

The valuables scroll_extent_min and scroll_extent_max are only
meaningful when the node is scrollable and min is smaller than the max.

On non-x86 the value is 0, so it was working previously. However on x86
the value is "8000 0000"

Test: build on device and x86 version to test the functionality.
Bug: None
Change-Id: Ie065617712722f2250067293836221e57f7a0a9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419599Reviewed-by: default avatarRandy Rossi <rmrossi@chromium.org>
Commit-Queue: Yuanyao Zhong <yyzhong@google.com>
Cr-Commit-Position: refs/heads/master@{#808895}
parent 8c2a7d5f
......@@ -234,9 +234,11 @@ bool FlutterSemanticsNodeWrapper::IsDescendant(
}
bool FlutterSemanticsNodeWrapper::IsRapidChangingSlider() const {
return (node_ptr_->scroll_extent_min() || node_ptr_->scroll_extent_min() ||
node_ptr_->action_properties().increase() ||
node_ptr_->action_properties().decrease());
const float min = node_ptr_->scroll_extent_min();
const float max = node_ptr_->scroll_extent_max();
bool has_scroll_extent = IsScrollable() && (min < max);
return has_scroll_extent || (node_ptr_->action_properties().increase() ||
node_ptr_->action_properties().decrease());
}
void FlutterSemanticsNodeWrapper::PopulateAXState(
......
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