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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 this._splitWidget.addEventListener(WebInspector.SplitWidget.Events.SidebarSi
zeChanged, this._updateTreeOutlineVisibleWidth.bind(this)); | 43 this._splitWidget.addEventListener(WebInspector.SplitWidget.Events.SidebarSi
zeChanged, this._updateTreeOutlineVisibleWidth.bind(this)); |
44 this._splitWidget.show(this.element); | 44 this._splitWidget.show(this.element); |
45 | 45 |
46 this._searchableView = new WebInspector.SearchableView(this); | 46 this._searchableView = new WebInspector.SearchableView(this); |
47 this._searchableView.setMinimumSize(25, 28); | 47 this._searchableView.setMinimumSize(25, 28); |
48 this._searchableView.setPlaceholder(WebInspector.UIString("Find by string, s
elector, or XPath")); | 48 this._searchableView.setPlaceholder(WebInspector.UIString("Find by string, s
elector, or XPath")); |
49 var stackElement = this._searchableView.element; | 49 var stackElement = this._searchableView.element; |
50 | 50 |
51 this._contentElement = createElement("div"); | 51 this._contentElement = createElement("div"); |
52 var crumbsContainer = createElement("div"); | 52 var crumbsContainer = createElement("div"); |
53 this._showLayoutEditor = false; | |
54 if (Runtime.experiments.isEnabled("materialDesign")) | 53 if (Runtime.experiments.isEnabled("materialDesign")) |
55 this._initializeActionsToolbar(); | 54 this._initializeActionsToolbar(); |
56 stackElement.appendChild(this._contentElement); | 55 stackElement.appendChild(this._contentElement); |
57 stackElement.appendChild(crumbsContainer); | 56 stackElement.appendChild(crumbsContainer); |
58 | 57 |
59 this._elementsPanelTreeOutilneSplit = new WebInspector.SplitWidget(false, tr
ue, "treeOutlineAnimationTimelineWidget", 300, 300); | 58 this._elementsPanelTreeOutilneSplit = new WebInspector.SplitWidget(false, tr
ue, "treeOutlineAnimationTimelineWidget", 300, 300); |
60 this._elementsPanelTreeOutilneSplit.hideSidebar(); | 59 this._elementsPanelTreeOutilneSplit.hideSidebar(); |
61 this._elementsPanelTreeOutilneSplit.setMainWidget(this._searchableView); | 60 this._elementsPanelTreeOutilneSplit.setMainWidget(this._searchableView); |
62 this._splitWidget.setMainWidget(this._elementsPanelTreeOutilneSplit); | 61 this._splitWidget.setMainWidget(this._elementsPanelTreeOutilneSplit); |
63 | 62 |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 { | 926 { |
928 var userAgentShadowRoot = node.ancestorUserAgentShadowRoot(); | 927 var userAgentShadowRoot = node.ancestorUserAgentShadowRoot(); |
929 return userAgentShadowRoot ? /** @type {!WebInspector.DOMNode} */ (userA
gentShadowRoot.parentNode) : node; | 928 return userAgentShadowRoot ? /** @type {!WebInspector.DOMNode} */ (userA
gentShadowRoot.parentNode) : node; |
930 }, | 929 }, |
931 | 930 |
932 /** | 931 /** |
933 * @param {!WebInspector.DOMNode} node | 932 * @param {!WebInspector.DOMNode} node |
934 */ | 933 */ |
935 revealAndSelectNode: function(node) | 934 revealAndSelectNode: function(node) |
936 { | 935 { |
937 if (WebInspector.inspectElementModeController && WebInspector.inspectEle
mentModeController.started()) | 936 if (WebInspector.inspectElementModeController && WebInspector.inspectEle
mentModeController.isInInspectElementMode()) |
938 WebInspector.inspectElementModeController.stop(); | 937 WebInspector.inspectElementModeController.stopInspection(); |
939 | 938 |
940 this._omitDefaultSelection = true; | 939 this._omitDefaultSelection = true; |
941 | 940 |
942 WebInspector.inspectorView.setCurrentPanel(this, this._showLayoutEditor)
; | 941 var showLayoutEditor = !!WebInspector.inspectElementModeController && We
bInspector.inspectElementModeController.isInLayoutEditorMode(); |
| 942 WebInspector.inspectorView.setCurrentPanel(this, showLayoutEditor); |
943 node = WebInspector.moduleSetting("showUAShadowDOM").get() ? node : this
._leaveUserAgentShadowDOM(node); | 943 node = WebInspector.moduleSetting("showUAShadowDOM").get() ? node : this
._leaveUserAgentShadowDOM(node); |
944 if (!this._showLayoutEditor) | 944 if (!showLayoutEditor) |
945 node.highlightForTwoSeconds(); | 945 node.highlightForTwoSeconds(); |
946 | 946 |
947 this.selectDOMNode(node, true); | 947 this.selectDOMNode(node, true); |
948 delete this._omitDefaultSelection; | 948 delete this._omitDefaultSelection; |
949 | 949 |
950 if (!this._notFirstInspectElement) | 950 if (!this._notFirstInspectElement) |
951 InspectorFrontendHost.inspectElementCompleted(); | 951 InspectorFrontendHost.inspectElementCompleted(); |
952 this._notFirstInspectElement = true; | 952 this._notFirstInspectElement = true; |
953 }, | 953 }, |
954 | 954 |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 /** | 1317 /** |
1318 * @override | 1318 * @override |
1319 * @param {!WebInspector.DOMNode} node | 1319 * @param {!WebInspector.DOMNode} node |
1320 * @return {?{title: string, color: string}} | 1320 * @return {?{title: string, color: string}} |
1321 */ | 1321 */ |
1322 decorate: function(node) | 1322 decorate: function(node) |
1323 { | 1323 { |
1324 return { color: "#555", title: WebInspector.UIString("Element is hidden"
) }; | 1324 return { color: "#555", title: WebInspector.UIString("Element is hidden"
) }; |
1325 } | 1325 } |
1326 } | 1326 } |
OLD | NEW |