| 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 10 matching lines...) Expand all Loading... |
| 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 importScript("CSSNamedFlowCollectionsView.js"); | |
| 32 importScript("CSSNamedFlowView.js"); | |
| 33 importScript("DOMSyntaxHighlighter.js"); | 31 importScript("DOMSyntaxHighlighter.js"); |
| 34 importScript("ElementsTreeOutline.js"); | 32 importScript("ElementsTreeOutline.js"); |
| 35 importScript("EventListenersSidebarPane.js"); | 33 importScript("EventListenersSidebarPane.js"); |
| 36 importScript("MetricsSidebarPane.js"); | 34 importScript("MetricsSidebarPane.js"); |
| 37 importScript("OverridesView.js"); | 35 importScript("OverridesView.js"); |
| 38 importScript("PlatformFontsSidebarPane.js"); | 36 importScript("PlatformFontsSidebarPane.js"); |
| 39 importScript("PropertiesSidebarPane.js"); | 37 importScript("PropertiesSidebarPane.js"); |
| 40 importScript("RenderingOptionsView.js"); | 38 importScript("RenderingOptionsView.js"); |
| 41 importScript("StylesSidebarPane.js"); | 39 importScript("StylesSidebarPane.js"); |
| 42 | 40 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 _contextMenuEventFired: function(event) | 365 _contextMenuEventFired: function(event) |
| 368 { | 366 { |
| 369 function toggleWordWrap() | 367 function toggleWordWrap() |
| 370 { | 368 { |
| 371 WebInspector.settings.domWordWrap.set(!WebInspector.settings.domWord
Wrap.get()); | 369 WebInspector.settings.domWordWrap.set(!WebInspector.settings.domWord
Wrap.get()); |
| 372 } | 370 } |
| 373 | 371 |
| 374 var contextMenu = new WebInspector.ContextMenu(event); | 372 var contextMenu = new WebInspector.ContextMenu(event); |
| 375 this.treeOutline.populateContextMenu(contextMenu, event); | 373 this.treeOutline.populateContextMenu(contextMenu, event); |
| 376 | 374 |
| 377 if (WebInspector.experimentsSettings.cssRegions.isEnabled()) { | |
| 378 contextMenu.appendSeparator(); | |
| 379 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa
seMenuTitles() ? "CSS named flows\u2026" : "CSS Named Flows\u2026"), this._showN
amedFlowCollections.bind(this)); | |
| 380 } | |
| 381 | |
| 382 contextMenu.appendSeparator(); | 375 contextMenu.appendSeparator(); |
| 383 contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Word wrap" : "Word Wrap"), toggleWordWrap.bind(this), WebI
nspector.settings.domWordWrap.get()); | 376 contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Word wrap" : "Word Wrap"), toggleWordWrap.bind(this), WebI
nspector.settings.domWordWrap.get()); |
| 384 | 377 |
| 385 contextMenu.show(); | 378 contextMenu.show(); |
| 386 }, | 379 }, |
| 387 | 380 |
| 388 _showNamedFlowCollections: function() | |
| 389 { | |
| 390 if (!WebInspector.cssNamedFlowCollectionsView) | |
| 391 WebInspector.cssNamedFlowCollectionsView = new WebInspector.CSSNamed
FlowCollectionsView(); | |
| 392 WebInspector.cssNamedFlowCollectionsView.showInDrawer(); | |
| 393 }, | |
| 394 | |
| 395 _domWordWrapSettingChanged: function(event) | 381 _domWordWrapSettingChanged: function(event) |
| 396 { | 382 { |
| 397 if (event.data) | 383 if (event.data) |
| 398 this.contentElement.classList.remove("nowrap"); | 384 this.contentElement.classList.remove("nowrap"); |
| 399 else | 385 else |
| 400 this.contentElement.classList.add("nowrap"); | 386 this.contentElement.classList.add("nowrap"); |
| 401 | 387 |
| 402 var selectedNode = this.selectedDOMNode(); | 388 var selectedNode = this.selectedDOMNode(); |
| 403 if (!selectedNode) | 389 if (!selectedNode) |
| 404 return; | 390 return; |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 WebInspector.ElementsPanel.DOMNodeRevealer.prototype = { | 1345 WebInspector.ElementsPanel.DOMNodeRevealer.prototype = { |
| 1360 /** | 1346 /** |
| 1361 * @param {!Object} node | 1347 * @param {!Object} node |
| 1362 */ | 1348 */ |
| 1363 reveal: function(node) | 1349 reveal: function(node) |
| 1364 { | 1350 { |
| 1365 if (node instanceof WebInspector.DOMNode) | 1351 if (node instanceof WebInspector.DOMNode) |
| 1366 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.showPanel("
elements")).revealAndSelectNode(node.id); | 1352 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.showPanel("
elements")).revealAndSelectNode(node.id); |
| 1367 } | 1353 } |
| 1368 } | 1354 } |
| OLD | NEW |