| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 if (splitMode === Elements.ElementsPanel._splitMode.Horizontal) { | 796 if (splitMode === Elements.ElementsPanel._splitMode.Horizontal) { |
| 797 // Styles and computed are merged into a single tab. | 797 // Styles and computed are merged into a single tab. |
| 798 stylesView.element.classList.add('flex-auto'); | 798 stylesView.element.classList.add('flex-auto'); |
| 799 | 799 |
| 800 var splitWidget = new UI.SplitWidget(true, true, 'stylesPaneSplitViewState
', 215); | 800 var splitWidget = new UI.SplitWidget(true, true, 'stylesPaneSplitViewState
', 215); |
| 801 splitWidget.show(stylesView.element); | 801 splitWidget.show(stylesView.element); |
| 802 splitWidget.setMainWidget(matchedStylePanesWrapper); | 802 splitWidget.setMainWidget(matchedStylePanesWrapper); |
| 803 splitWidget.setSidebarWidget(computedStylePanesWrapper); | 803 splitWidget.setSidebarWidget(computedStylePanesWrapper); |
| 804 } else { | 804 } else { |
| 805 // Styles and computed are in separate tabs. | 805 // Styles and computed are in separate tabs. |
| 806 stylesView.element.classList.add('flex-auto', 'metrics-and-styles'); | 806 stylesView.element.classList.add('flex-auto'); |
| 807 matchedStylePanesWrapper.show(stylesView.element); | 807 matchedStylePanesWrapper.show(stylesView.element); |
| 808 | 808 |
| 809 var computedView = new UI.SimpleView(Common.UIString('Computed')); | 809 var computedView = new UI.SimpleView(Common.UIString('Computed')); |
| 810 computedView.element.classList.add('composite', 'fill', 'metrics-and-compu
ted'); | 810 computedView.element.classList.add('composite', 'fill'); |
| 811 computedStylePanesWrapper.show(computedView.element); | 811 computedStylePanesWrapper.show(computedView.element); |
| 812 | 812 |
| 813 tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, tabSelected,
this); | 813 tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, tabSelected,
this); |
| 814 this.sidebarPaneView.appendView(computedView); | 814 this.sidebarPaneView.appendView(computedView); |
| 815 } | 815 } |
| 816 this._stylesViewToReveal = stylesView; | 816 this._stylesViewToReveal = stylesView; |
| 817 | 817 |
| 818 showMetrics.call(this, this._splitMode === Elements.ElementsPanel._splitMode
.Horizontal); | 818 showMetrics.call(this, this._splitMode === Elements.ElementsPanel._splitMode
.Horizontal); |
| 819 | 819 |
| 820 this.sidebarPaneView.appendApplicableItems('elements-sidebar'); | 820 this.sidebarPaneView.appendApplicableItems('elements-sidebar'); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 * @param {!SDK.DOMNode} node | 984 * @param {!SDK.DOMNode} node |
| 985 * @return {?{title: string, color: string}} | 985 * @return {?{title: string, color: string}} |
| 986 */ | 986 */ |
| 987 decorate(node) { | 987 decorate(node) { |
| 988 return { | 988 return { |
| 989 color: 'orange', | 989 color: 'orange', |
| 990 title: Common.UIString('Element state: %s', ':' + node.domModel().cssModel
().pseudoState(node).join(', :')) | 990 title: Common.UIString('Element state: %s', ':' + node.domModel().cssModel
().pseudoState(node).join(', :')) |
| 991 }; | 991 }; |
| 992 } | 992 } |
| 993 }; | 993 }; |
| OLD | NEW |