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

Side by Side Diff: Source/devtools/front_end/console/ConsoleView.js

Issue 727823002: [DevTools] Ban getSelection, requestAnimationFrame, cancelAnimationFrame global functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 { 704 {
705 var enabled = /** @type {boolean} */ (event.data); 705 var enabled = /** @type {boolean} */ (event.data);
706 WebInspector.targetManager.targets().forEach(function(target) {target.co nsoleAgent().setMonitoringXHREnabled(enabled);}); 706 WebInspector.targetManager.targets().forEach(function(target) {target.co nsoleAgent().setMonitoringXHREnabled(enabled);});
707 }, 707 },
708 708
709 /** 709 /**
710 * @param {!Event} event 710 * @param {!Event} event
711 */ 711 */
712 _messagesClicked: function(event) 712 _messagesClicked: function(event)
713 { 713 {
714 if (!this._prompt.isCaretInsidePrompt() && window.getSelection().isColla psed) 714 if (!this._prompt.isCaretInsidePrompt() && event.target.window().getSele ction().isCollapsed)
715 this._prompt.moveCaretToEndOfPrompt(); 715 this._prompt.moveCaretToEndOfPrompt();
716 var groupMessage = event.target.enclosingNodeOrSelfWithClass("console-gr oup-title"); 716 var groupMessage = event.target.enclosingNodeOrSelfWithClass("console-gr oup-title");
717 if (!groupMessage) 717 if (!groupMessage)
718 return; 718 return;
719 var consoleGroupViewMessage = groupMessage.parentElement.message; 719 var consoleGroupViewMessage = groupMessage.parentElement.message;
720 consoleGroupViewMessage.setCollapsed(!consoleGroupViewMessage.collapsed( )); 720 consoleGroupViewMessage.setCollapsed(!consoleGroupViewMessage.collapsed( ));
721 this._updateMessageList(); 721 this._updateMessageList();
722 }, 722 },
723 723
724 _registerShortcuts: function() 724 _registerShortcuts: function()
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { 1284 WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = {
1285 /** 1285 /**
1286 * @return {boolean} 1286 * @return {boolean}
1287 */ 1287 */
1288 handleAction: function() 1288 handleAction: function()
1289 { 1289 {
1290 WebInspector.console.show(); 1290 WebInspector.console.show();
1291 return true; 1291 return true;
1292 } 1292 }
1293 } 1293 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698