Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: chrome/browser/resources/options/cookies_list.js

Issue 521643003: Fixed a11y tab handling on cookies settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/options/cookies_view.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var DeletableItemList = options.DeletableItemList; 6 /** @const */ var DeletableItemList = options.DeletableItemList;
7 /** @const */ var DeletableItem = options.DeletableItem; 7 /** @const */ var DeletableItem = options.DeletableItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 /** @type {boolean} */ 167 /** @type {boolean} */
168 get expanded() { 168 get expanded() {
169 return this.expanded_; 169 return this.expanded_;
170 }, 170 },
171 set expanded(expanded) { 171 set expanded(expanded) {
172 if (this.expanded_ == expanded) 172 if (this.expanded_ == expanded)
173 return; 173 return;
174 this.expanded_ = expanded; 174 this.expanded_ = expanded;
175 if (expanded) { 175 if (expanded) {
176 this.classList.add('show-items');
176 var oldExpanded = this.list.expandedItem; 177 var oldExpanded = this.list.expandedItem;
177 this.list.expandedItem = this; 178 this.list.expandedItem = this;
178 this.updateItems_(); 179 this.updateItems_();
179 if (oldExpanded) 180 if (oldExpanded)
180 oldExpanded.expanded = false; 181 oldExpanded.expanded = false;
181 this.classList.add('show-items');
182 } else { 182 } else {
183 if (this.list.expandedItem == this) { 183 if (this.list.expandedItem == this) {
184 this.list.expandedItem = null; 184 this.list.expandedItem = null;
185 } 185 }
186 this.style.height = ''; 186 this.style.height = '';
187 this.itemsChild.style.height = ''; 187 this.itemsChild.style.height = '';
188 this.classList.remove('show-items'); 188 this.classList.remove('show-items');
189 } 189 }
190 }, 190 },
191 191
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 default: 528 default:
529 text = loadTimeData.getString('cookie_' + this.data.type); 529 text = loadTimeData.getString('cookie_' + this.data.type);
530 } 530 }
531 if (!text) 531 if (!text)
532 return; 532 return;
533 533
534 var div = item.ownerDocument.createElement('div'); 534 var div = item.ownerDocument.createElement('div');
535 div.className = 'cookie-item'; 535 div.className = 'cookie-item';
536 // Help out screen readers and such: this is a clickable thing. 536 // Help out screen readers and such: this is a clickable thing.
537 div.setAttribute('role', 'button'); 537 div.setAttribute('role', 'button');
538 div.tabIndex = 0;
539 div.textContent = text; 538 div.textContent = text;
540 var apps = this.data.appsProtectingThis; 539 var apps = this.data.appsProtectingThis;
541 if (apps) 540 if (apps)
542 apps.forEach(addAppInfo.bind(null, div)); 541 apps.forEach(addAppInfo.bind(null, div));
543 542
544 var index = item.appendItem(this, div); 543 var index = item.appendItem(this, div);
545 div.onclick = function() { 544 div.onclick = function() {
546 item.selectedIndex = (item.selectedIndex == index) ? -1 : index; 545 item.selectedIndex = (item.selectedIndex == index) ? -1 : index;
547 }; 546 };
548 }, 547 },
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 parent.clear(); 918 parent.clear();
920 this.addByParent_(parent, 0, children); 919 this.addByParent_(parent, 0, children);
921 parent.endBatchUpdates(); 920 parent.endBatchUpdates();
922 }, 921 },
923 }; 922 };
924 923
925 return { 924 return {
926 CookiesList: CookiesList 925 CookiesList: CookiesList
927 }; 926 };
928 }); 927 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/cookies_view.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698