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

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

Issue 2146233002: DevTools: reuse computedstylesmodel in the elements sidebar base class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (2) Created 4 years, 5 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
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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 for (var i = 0; i < this._treeOutlines.length; ++i) { 753 for (var i = 0; i < this._treeOutlines.length; ++i) {
754 if (this._treeOutlines[i].selectedDOMNode() === this._lastValidSelec tedNode) 754 if (this._treeOutlines[i].selectedDOMNode() === this._lastValidSelec tedNode)
755 treeOutline = this._treeOutlines[i]; 755 treeOutline = this._treeOutlines[i];
756 } 756 }
757 if (!treeOutline) 757 if (!treeOutline)
758 return; 758 return;
759 759
760 if (!treeOutline.editing()) { 760 if (!treeOutline.editing()) {
761 handleUndoRedo.call(null, treeOutline); 761 handleUndoRedo.call(null, treeOutline);
762 if (event.handled) { 762 if (event.handled) {
763 this.sidebarPanes.styles.onUndoOrRedoHappened(); 763 this.sidebarPanes.styles.forceUpdate();
764 return; 764 return;
765 } 765 }
766 } 766 }
767 767
768 treeOutline.handleShortcut(event); 768 treeOutline.handleShortcut(event);
769 if (event.handled) 769 if (event.handled)
770 return; 770 return;
771 771
772 WebInspector.Panel.prototype.handleShortcut.call(this, event); 772 WebInspector.Panel.prototype.handleShortcut.call(this, event);
773 }, 773 },
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 /** 1180 /**
1181 * @override 1181 * @override
1182 * @param {!WebInspector.DOMNode} node 1182 * @param {!WebInspector.DOMNode} node
1183 * @return {?{title: string, color: string}} 1183 * @return {?{title: string, color: string}}
1184 */ 1184 */
1185 decorate: function(node) 1185 decorate: function(node)
1186 { 1186 {
1187 return { color: "orange", title: WebInspector.UIString("Element state: % s", ":" + WebInspector.CSSModel.fromNode(node).pseudoState(node).join(", :")) }; 1187 return { color: "orange", title: WebInspector.UIString("Element state: % s", ":" + WebInspector.CSSModel.fromNode(node).pseudoState(node).join(", :")) };
1188 } 1188 }
1189 } 1189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698