| OLD | NEW |
| 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 showMetrics.call(this, true); | 882 showMetrics.call(this, true); |
| 883 else if (tabId === WebInspector.UIString("Styles")) | 883 else if (tabId === WebInspector.UIString("Styles")) |
| 884 showMetrics.call(this, false); | 884 showMetrics.call(this, false); |
| 885 } | 885 } |
| 886 | 886 |
| 887 this.sidebarPaneView = WebInspector.viewManager.createTabbedLocation(()
=> WebInspector.viewManager.showView("elements")); | 887 this.sidebarPaneView = WebInspector.viewManager.createTabbedLocation(()
=> WebInspector.viewManager.showView("elements")); |
| 888 var tabbedPane = this.sidebarPaneView.tabbedPane(); | 888 var tabbedPane = this.sidebarPaneView.tabbedPane(); |
| 889 tabbedPane.element.addEventListener("contextmenu", this._sidebarContextM
enuEventFired.bind(this), false); | 889 tabbedPane.element.addEventListener("contextmenu", this._sidebarContextM
enuEventFired.bind(this), false); |
| 890 if (this._popoverHelper) | 890 if (this._popoverHelper) |
| 891 this._popoverHelper.hidePopover(); | 891 this._popoverHelper.hidePopover(); |
| 892 this._popoverHelper = new WebInspector.PopoverHelper(tabbedPane.element,
this._getPopoverAnchor.bind(this), this._showPopover.bind(this)); | 892 this._popoverHelper = new WebInspector.PopoverHelper(tabbedPane.element)
; |
| 893 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this
), this._showPopover.bind(this)); |
| 893 this._popoverHelper.setTimeout(0); | 894 this._popoverHelper.setTimeout(0); |
| 894 | 895 |
| 895 if (horizontally) { | 896 if (horizontally) { |
| 896 // Styles and computed are merged into a single tab. | 897 // Styles and computed are merged into a single tab. |
| 897 this._splitWidget.installResizer(tabbedPane.headerElement()); | 898 this._splitWidget.installResizer(tabbedPane.headerElement()); |
| 898 | 899 |
| 899 var stylesView = new WebInspector.SimpleView(WebInspector.UIString("
Styles")); | 900 var stylesView = new WebInspector.SimpleView(WebInspector.UIString("
Styles")); |
| 900 stylesView.element.classList.add("flex-auto"); | 901 stylesView.element.classList.add("flex-auto"); |
| 901 | 902 |
| 902 var splitWidget = new WebInspector.SplitWidget(true, true, "stylesPa
neSplitViewState", 215); | 903 var splitWidget = new WebInspector.SplitWidget(true, true, "stylesPa
neSplitViewState", 215); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 /** | 1121 /** |
| 1121 * @override | 1122 * @override |
| 1122 * @param {!WebInspector.DOMNode} node | 1123 * @param {!WebInspector.DOMNode} node |
| 1123 * @return {?{title: string, color: string}} | 1124 * @return {?{title: string, color: string}} |
| 1124 */ | 1125 */ |
| 1125 decorate: function(node) | 1126 decorate: function(node) |
| 1126 { | 1127 { |
| 1127 return { color: "orange", title: WebInspector.UIString("Element state: %
s", ":" + WebInspector.CSSModel.fromNode(node).pseudoState(node).join(", :")) }; | 1128 return { color: "orange", title: WebInspector.UIString("Element state: %
s", ":" + WebInspector.CSSModel.fromNode(node).pseudoState(node).join(", :")) }; |
| 1128 } | 1129 } |
| 1129 }; | 1130 }; |
| OLD | NEW |