| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 _contextMenuEventFired: function(event) | 367 _contextMenuEventFired: function(event) |
| 370 { | 368 { |
| 371 function toggleWordWrap() | 369 function toggleWordWrap() |
| 372 { | 370 { |
| 373 WebInspector.settings.domWordWrap.set(!WebInspector.settings.domWord
Wrap.get()); | 371 WebInspector.settings.domWordWrap.set(!WebInspector.settings.domWord
Wrap.get()); |
| 374 } | 372 } |
| 375 | 373 |
| 376 var contextMenu = new WebInspector.ContextMenu(event); | 374 var contextMenu = new WebInspector.ContextMenu(event); |
| 377 this.treeOutline.populateContextMenu(contextMenu, event); | 375 this.treeOutline.populateContextMenu(contextMenu, event); |
| 378 | 376 |
| 379 if (WebInspector.experimentsSettings.cssRegions.isEnabled()) { | |
| 380 contextMenu.appendSeparator(); | |
| 381 contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCa
seMenuTitles() ? "CSS named flows\u2026" : "CSS Named Flows\u2026"), this._showN
amedFlowCollections.bind(this)); | |
| 382 } | |
| 383 | |
| 384 contextMenu.appendSeparator(); | 377 contextMenu.appendSeparator(); |
| 385 contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Word wrap" : "Word Wrap"), toggleWordWrap.bind(this), WebI
nspector.settings.domWordWrap.get()); | 378 contextMenu.appendCheckboxItem(WebInspector.UIString(WebInspector.useLow
erCaseMenuTitles() ? "Word wrap" : "Word Wrap"), toggleWordWrap.bind(this), WebI
nspector.settings.domWordWrap.get()); |
| 386 | 379 |
| 387 contextMenu.show(); | 380 contextMenu.show(); |
| 388 }, | 381 }, |
| 389 | 382 |
| 390 _showNamedFlowCollections: function() | |
| 391 { | |
| 392 if (!WebInspector.cssNamedFlowCollectionsView) | |
| 393 WebInspector.cssNamedFlowCollectionsView = new WebInspector.CSSNamed
FlowCollectionsView(); | |
| 394 WebInspector.cssNamedFlowCollectionsView.showInDrawer(); | |
| 395 }, | |
| 396 | |
| 397 _domWordWrapSettingChanged: function(event) | 383 _domWordWrapSettingChanged: function(event) |
| 398 { | 384 { |
| 399 if (event.data) | 385 if (event.data) |
| 400 this.contentElement.classList.remove("nowrap"); | 386 this.contentElement.classList.remove("nowrap"); |
| 401 else | 387 else |
| 402 this.contentElement.classList.add("nowrap"); | 388 this.contentElement.classList.add("nowrap"); |
| 403 | 389 |
| 404 var selectedNode = this.selectedDOMNode(); | 390 var selectedNode = this.selectedDOMNode(); |
| 405 if (!selectedNode) | 391 if (!selectedNode) |
| 406 return; | 392 return; |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 WebInspector.ElementsPanel.DOMNodeRevealer.prototype = { | 1347 WebInspector.ElementsPanel.DOMNodeRevealer.prototype = { |
| 1362 /** | 1348 /** |
| 1363 * @param {!Object} node | 1349 * @param {!Object} node |
| 1364 */ | 1350 */ |
| 1365 reveal: function(node) | 1351 reveal: function(node) |
| 1366 { | 1352 { |
| 1367 if (node instanceof WebInspector.DOMNode) | 1353 if (node instanceof WebInspector.DOMNode) |
| 1368 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.showPanel("
elements")).revealAndSelectNode(node.id); | 1354 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.showPanel("
elements")).revealAndSelectNode(node.id); |
| 1369 } | 1355 } |
| 1370 } | 1356 } |
| OLD | NEW |