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

Side by Side Diff: Source/devtools/front_end/elements/ElementsPanel.js

Issue 1200833006: DevTools: [Elements] F2 should commit changes in edit-as-html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/elements/ElementsTreeElement.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 689 }
690 690
691 var isRedoKey = WebInspector.isMac() ? event.metaKey && event.shiftK ey && event.keyIdentifier === "U+005A" : // Z key 691 var isRedoKey = WebInspector.isMac() ? event.metaKey && event.shiftK ey && event.keyIdentifier === "U+005A" : // Z key
692 event.ctrlKey && event.keyIde ntifier === "U+0059"; // Y key 692 event.ctrlKey && event.keyIde ntifier === "U+0059"; // Y key
693 if (isRedoKey) { 693 if (isRedoKey) {
694 treeOutline.domModel().redo(); 694 treeOutline.domModel().redo();
695 event.handled = true; 695 event.handled = true;
696 } 696 }
697 } 697 }
698 698
699 if (WebInspector.isEditing()) 699 if (WebInspector.isEditing() && event.keyCode !== WebInspector.KeyboardS hortcut.Keys.F2.code)
700 return; 700 return;
701 701
702 var treeOutline = null; 702 var treeOutline = null;
703 for (var i = 0; i < this._treeOutlines.length; ++i) { 703 for (var i = 0; i < this._treeOutlines.length; ++i) {
704 if (this._treeOutlines[i].selectedDOMNode() === this._lastValidSelec tedNode) 704 if (this._treeOutlines[i].selectedDOMNode() === this._lastValidSelec tedNode)
705 treeOutline = this._treeOutlines[i]; 705 treeOutline = this._treeOutlines[i];
706 } 706 }
707 if (!treeOutline) 707 if (!treeOutline)
708 return; 708 return;
709 709
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 WebInspector.ElementsPanelFactory.prototype = { 1119 WebInspector.ElementsPanelFactory.prototype = {
1120 /** 1120 /**
1121 * @override 1121 * @override
1122 * @return {!WebInspector.Panel} 1122 * @return {!WebInspector.Panel}
1123 */ 1123 */
1124 createPanel: function() 1124 createPanel: function()
1125 { 1125 {
1126 return WebInspector.ElementsPanel.instance(); 1126 return WebInspector.ElementsPanel.instance();
1127 } 1127 }
1128 } 1128 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/elements/ElementsTreeElement.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698