Commit 24759a90 authored by kraush's avatar kraush Committed by Commit bot

Skip accessibility focus on tab in favor of close button

The tab will always be checked first in the accessibility
order since its x coordinate is "left" of the close button.
However, visually the x button should be considered to be in
the foreground when using Explore by Touch.

With this change, the tab will return false when being checked
to be hit by explore by touch when we know the close button
will also be hit.

BUG=641141

Review-Url: https://codereview.chromium.org/2301903004
Cr-Commit-Position: refs/heads/master@{#416292}
parent 8a64b715
......@@ -167,6 +167,9 @@ public class StripLayoutTab
@Override
public boolean checkClicked(float x, float y) {
// Since both the close button as well as the tab inhabit the same coordinates, the tab
// should not consider itself hit if the close button is also hit, since it is on top.
if (mShowingCloseButton && mCloseButton.checkClicked(x, y)) return false;
return mTouchTarget.contains(x, y);
}
......
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