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

Side by Side Diff: chrome/browser/resources/history/history.js

Issue 545303003: Small fix in chrome://history: mark checkbox as HTMLInputElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: switched to assertInstanceof 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 | no next file » | 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 <include src="../uber/uber_utils.js"> 5 <include src="../uber/uber_utils.js">
6 <include src="history_focus_manager.js"> 6 <include src="history_focus_manager.js">
7 7
8 /////////////////////////////////////////////////////////////////////////////// 8 ///////////////////////////////////////////////////////////////////////////////
9 // Globals: 9 // Globals:
10 /** @const */ var RESULTS_PER_PAGE = 150; 10 /** @const */ var RESULTS_PER_PAGE = 150;
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 var element = event.target; 2173 var element = event.target;
2174 // Do nothing if the event happened in an interactive element. 2174 // Do nothing if the event happened in an interactive element.
2175 for (; element != event.currentTarget; element = element.parentNode) { 2175 for (; element != event.currentTarget; element = element.parentNode) {
2176 switch (element.tagName) { 2176 switch (element.tagName) {
2177 case 'A': 2177 case 'A':
2178 case 'BUTTON': 2178 case 'BUTTON':
2179 case 'INPUT': 2179 case 'INPUT':
2180 return; 2180 return;
2181 } 2181 }
2182 } 2182 }
2183 var checkbox = $(event.currentTarget.getAttribute('for')); 2183 var checkbox = assertInstanceof($(event.currentTarget.getAttribute('for')),
2184 HTMLInputElement);
2184 checkbox.checked = !checkbox.checked; 2185 checkbox.checked = !checkbox.checked;
2185 handleCheckboxStateChange(checkbox, event.shiftKey); 2186 handleCheckboxStateChange(checkbox, event.shiftKey);
2186 // We don't want to focus on the checkbox. 2187 // We don't want to focus on the checkbox.
2187 event.preventDefault(); 2188 event.preventDefault();
2188 } 2189 }
2189 2190
2190 /** 2191 /**
2191 * Called when an individual history entry has been removed from the page. 2192 * Called when an individual history entry has been removed from the page.
2192 * This will only be called when all the elements affected by the deletion 2193 * This will only be called when all the elements affected by the deletion
2193 * have been removed from the DOM and the animations have completed. 2194 * have been removed from the DOM and the animations have completed.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 historyView.reload(); 2274 historyView.reload();
2274 } 2275 }
2275 2276
2276 // Add handlers to HTML elements. 2277 // Add handlers to HTML elements.
2277 document.addEventListener('DOMContentLoaded', load); 2278 document.addEventListener('DOMContentLoaded', load);
2278 2279
2279 // This event lets us enable and disable menu items before the menu is shown. 2280 // This event lets us enable and disable menu items before the menu is shown.
2280 document.addEventListener('canExecute', function(e) { 2281 document.addEventListener('canExecute', function(e) {
2281 e.canExecute = true; 2282 e.canExecute = true;
2282 }); 2283 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698