Index: chrome/browser/ui/views/tabs/tab_strip.cc |
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc |
index e22c45709fd4e6b4064187737033379e62305ec0..eec168c5cdce217c2dac7f09f0b1f0bafccd1834 100644 |
--- a/chrome/browser/ui/views/tabs/tab_strip.cc |
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc |
@@ -1343,8 +1343,13 @@ int TabStrip::GetBackgroundResourceId(bool* custom_image) const { |
void TabStrip::UpdateTabAccessibilityState(const Tab* tab, |
ui::AXNodeData* node_data) { |
+ if (tab_count() <= 0 || GetModelIndexOfTab(tab) < 0) |
sky
2017/02/28 20:52:30
Why the tab_count() <= 0? Should GetModelIndexOfTa
|
+ return; |
+ |
node_data->AddIntAttribute(ui::AX_ATTR_SET_SIZE, tab_count()); |
- node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, GetModelIndexOfTab(tab)); |
+ |
+ int pos_in_set = GetModelIndexOfTab(tab) + 1; |
+ node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, pos_in_set); |
} |
void TabStrip::MouseMovedOutOfHost() { |