 Chromium Code Reviews
 Chromium Code Reviews Issue 2719223002:
  Use correct position when setting pos_in_set for tabs.
    
  
    Issue 2719223002:
  Use correct position when setting pos_in_set for tabs. 
  | 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..c57ee1cfc16e6806b244619f620f98a83efc651d 100644 | 
| --- a/chrome/browser/ui/views/tabs/tab_strip.cc | 
| +++ b/chrome/browser/ui/views/tabs/tab_strip.cc | 
| @@ -1343,8 +1343,12 @@ int TabStrip::GetBackgroundResourceId(bool* custom_image) const { | 
| void TabStrip::UpdateTabAccessibilityState(const Tab* tab, | 
| ui::AXNodeData* node_data) { | 
| + if (GetModelIndexOfTab(tab) < 0) | 
| 
sky
2017/03/01 00:31:18
Assign to local variable to avoid multiple calls.
 | 
| + return; | 
| + | 
| node_data->AddIntAttribute(ui::AX_ATTR_SET_SIZE, tab_count()); | 
| - node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, GetModelIndexOfTab(tab)); | 
| + node_data->AddValidatedIntAttribute(ui::AX_ATTR_INDEX_IN_SET, | 
| + GetModelIndexOfTab(tab)); | 
| } | 
| void TabStrip::MouseMovedOutOfHost() { |