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

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

Issue 1172643002: DevTools: migrate sidebar pane's titleElement to use Toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: only using latin1 in css 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
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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 this.sidebarPaneView.detach(); 888 this.sidebarPaneView.detach();
889 this._splitWidget.uninstallResizer(this.sidebarPaneView.headerElemen t()); 889 this._splitWidget.uninstallResizer(this.sidebarPaneView.headerElemen t());
890 } 890 }
891 891
892 this._splitWidget.setVertical(!vertically); 892 this._splitWidget.setVertical(!vertically);
893 893
894 var computedPane = new WebInspector.SidebarPane(WebInspector.UIString("C omputed")); 894 var computedPane = new WebInspector.SidebarPane(WebInspector.UIString("C omputed"));
895 computedPane.element.classList.add("composite"); 895 computedPane.element.classList.add("composite");
896 computedPane.element.classList.add("fill"); 896 computedPane.element.classList.add("fill");
897 897
898 computedPane.bodyElement.classList.add("metrics-and-computed"); 898 computedPane.element.classList.add("metrics-and-computed");
899 899
900 var matchedStylePanesWrapper = createElement("div"); 900 var matchedStylePanesWrapper = createElement("div");
901 matchedStylePanesWrapper.className = "style-panes-wrapper"; 901 matchedStylePanesWrapper.className = "style-panes-wrapper";
902 var computedStylePanesWrapper = createElement("div"); 902 var computedStylePanesWrapper = createElement("div");
903 computedStylePanesWrapper.className = "style-panes-wrapper"; 903 computedStylePanesWrapper.className = "style-panes-wrapper";
904 904
905 /** 905 /**
906 * @param {boolean} inComputedStyle 906 * @param {boolean} inComputedStyle
907 * @this {WebInspector.ElementsPanel} 907 * @this {WebInspector.ElementsPanel}
908 */ 908 */
(...skipping 26 matching lines...) Expand all
935 this._popoverHelper.setTimeout(0); 935 this._popoverHelper.setTimeout(0);
936 936
937 if (vertically) { 937 if (vertically) {
938 this._splitWidget.installResizer(this.sidebarPaneView.headerElement( )); 938 this._splitWidget.installResizer(this.sidebarPaneView.headerElement( ));
939 939
940 var compositePane = new WebInspector.SidebarPane(this.sidebarPanes.s tyles.title()); 940 var compositePane = new WebInspector.SidebarPane(this.sidebarPanes.s tyles.title());
941 compositePane.element.classList.add("composite"); 941 compositePane.element.classList.add("composite");
942 compositePane.element.classList.add("fill"); 942 compositePane.element.classList.add("fill");
943 943
944 var splitWidget = new WebInspector.SplitWidget(true, true, "stylesPa neSplitViewState", 215); 944 var splitWidget = new WebInspector.SplitWidget(true, true, "stylesPa neSplitViewState", 215);
945 splitWidget.show(compositePane.bodyElement); 945 splitWidget.show(compositePane.element);
946 946
947 var vbox1 = new WebInspector.VBox(); 947 var vbox1 = new WebInspector.VBox();
948 vbox1.element.appendChild(matchedStylePanesWrapper); 948 vbox1.element.appendChild(matchedStylePanesWrapper);
949 vbox1.element.appendChild(this._matchedStylesFilterBoxContainer); 949 vbox1.element.appendChild(this._matchedStylesFilterBoxContainer);
950 splitWidget.setMainWidget(vbox1); 950 splitWidget.setMainWidget(vbox1);
951 951
952 var vbox2 = new WebInspector.VBox(); 952 var vbox2 = new WebInspector.VBox();
953 vbox2.element.appendChild(computedStylePanesWrapper); 953 vbox2.element.appendChild(computedStylePanesWrapper);
954 vbox2.element.appendChild(this._computedStylesFilterBoxContainer); 954 vbox2.element.appendChild(this._computedStylesFilterBoxContainer);
955 splitWidget.setSidebarWidget(vbox2); 955 splitWidget.setSidebarWidget(vbox2);
956 956
957 computedPane.show(computedStylePanesWrapper); 957 computedPane.show(computedStylePanesWrapper);
958 this.sidebarPaneView.addPane(compositePane); 958 this.sidebarPaneView.addPane(compositePane);
959 } else { 959 } else {
960 var stylesPane = new WebInspector.SidebarPane(this.sidebarPanes.styl es.title()); 960 var stylesPane = new WebInspector.SidebarPane(this.sidebarPanes.styl es.title());
961 stylesPane.element.classList.add("composite"); 961 stylesPane.element.classList.add("composite");
962 stylesPane.element.classList.add("fill"); 962 stylesPane.element.classList.add("fill");
963 stylesPane.bodyElement.classList.add("metrics-and-styles"); 963 stylesPane.element.classList.add("metrics-and-styles");
964 964
965 stylesPane.bodyElement.appendChild(matchedStylePanesWrapper); 965 stylesPane.element.appendChild(matchedStylePanesWrapper);
966 computedPane.bodyElement.appendChild(computedStylePanesWrapper); 966 computedPane.element.appendChild(computedStylePanesWrapper);
967 967
968 this.sidebarPaneView.addEventListener(WebInspector.TabbedPane.EventT ypes.TabSelected, tabSelected, this); 968 this.sidebarPaneView.addEventListener(WebInspector.TabbedPane.EventT ypes.TabSelected, tabSelected, this);
969 969
970 stylesPane.bodyElement.appendChild(this._matchedStylesFilterBoxConta iner); 970 stylesPane.element.appendChild(this._matchedStylesFilterBoxContainer );
971 computedPane.bodyElement.appendChild(this._computedStylesFilterBoxCo ntainer); 971 computedPane.element.appendChild(this._computedStylesFilterBoxContai ner);
972 972
973 this.sidebarPaneView.addPane(stylesPane); 973 this.sidebarPaneView.addPane(stylesPane);
974 this.sidebarPaneView.addPane(computedPane); 974 this.sidebarPaneView.addPane(computedPane);
975 } 975 }
976 976
977 this.sidebarPanes.styles.show(matchedStylePanesWrapper); 977 this.sidebarPanes.styles.show(matchedStylePanesWrapper);
978 this.sidebarPanes.computedStyle.show(computedStylePanesWrapper); 978 this.sidebarPanes.computedStyle.show(computedStylePanesWrapper);
979 matchedStylePanesWrapper.appendChild(this.sidebarPanes.styles.titleEleme nt);
980 showMetrics.call(this, vertically); 979 showMetrics.call(this, vertically);
981 this.sidebarPanes.platformFonts.show(computedStylePanesWrapper); 980 this.sidebarPanes.platformFonts.show(computedStylePanesWrapper);
982 981
983 this.sidebarPaneView.addPane(this.sidebarPanes.eventListeners); 982 this.sidebarPaneView.addPane(this.sidebarPanes.eventListeners);
984 this.sidebarPaneView.addPane(this.sidebarPanes.domBreakpoints); 983 this.sidebarPaneView.addPane(this.sidebarPanes.domBreakpoints);
985 this.sidebarPaneView.addPane(this.sidebarPanes.properties); 984 this.sidebarPaneView.addPane(this.sidebarPanes.properties);
986 985
987 for (var sidebarViewWrapper of this._elementsSidebarViewWrappers) 986 for (var sidebarViewWrapper of this._elementsSidebarViewWrappers)
988 this.sidebarPaneView.addPane(sidebarViewWrapper); 987 this.sidebarPaneView.addPane(sidebarViewWrapper);
989 988
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 WebInspector.ElementsPanelFactory.prototype = { 1138 WebInspector.ElementsPanelFactory.prototype = {
1140 /** 1139 /**
1141 * @override 1140 * @override
1142 * @return {!WebInspector.Panel} 1141 * @return {!WebInspector.Panel}
1143 */ 1142 */
1144 createPanel: function() 1143 createPanel: function()
1145 { 1144 {
1146 return WebInspector.ElementsPanel.instance(); 1145 return WebInspector.ElementsPanel.instance();
1147 } 1146 }
1148 } 1147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698