OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 { | 811 { |
812 var contextMenu = new WebInspector.ContextMenu(/** @type {!Event} */(eve
nt.data), | 812 var contextMenu = new WebInspector.ContextMenu(/** @type {!Event} */(eve
nt.data), |
813 true, | 813 true, |
814 this._item.element.totalOffsetLeft(), | 814 this._item.element.totalOffsetLeft(), |
815 this._item.element.totalOffsetTop() + this._item.element.offsetHeigh
t); | 815 this._item.element.totalOffsetTop() + this._item.element.offsetHeigh
t); |
816 | 816 |
817 if (WebInspector.dockController.canDock()) { | 817 if (WebInspector.dockController.canDock()) { |
818 var dockItemElement = createElementWithClass("div", "flex-centered f
lex-auto"); | 818 var dockItemElement = createElementWithClass("div", "flex-centered f
lex-auto"); |
819 var titleElement = dockItemElement.createChild("span", "flex-auto"); | 819 var titleElement = dockItemElement.createChild("span", "flex-auto"); |
820 titleElement.textContent = WebInspector.UIString("Dock side"); | 820 titleElement.textContent = WebInspector.UIString("Dock side"); |
| 821 var toggleDockSideShorcuts = WebInspector.shortcutRegistry.shortcutD
escriptorsForAction("main.toggle-dock"); |
| 822 WebInspector.Tooltip.install(titleElement, WebInspector.UIString("Pl
acement of DevTools relative to the page. (%s to restore last position)", toggle
DockSideShorcuts[0].name)); |
821 dockItemElement.appendChild(titleElement); | 823 dockItemElement.appendChild(titleElement); |
822 var dockItemToolbar = new WebInspector.Toolbar(dockItemElement); | 824 var dockItemToolbar = new WebInspector.Toolbar(dockItemElement); |
823 dockItemToolbar.makeBlueOnHover(); | 825 dockItemToolbar.makeBlueOnHover(); |
824 var undock = new WebInspector.ToolbarButton( WebInspector.UIString("
Undock into separate window"), "dock-toolbar-item-undock"); | 826 var undock = new WebInspector.ToolbarButton(WebInspector.UIString("U
ndock into separate window"), "dock-toolbar-item-undock"); |
825 var bottom = new WebInspector.ToolbarButton(WebInspector.UIString("D
ock to bottom"), "dock-toolbar-item-bottom"); | 827 var bottom = new WebInspector.ToolbarButton(WebInspector.UIString("D
ock to bottom"), "dock-toolbar-item-bottom"); |
826 var right = new WebInspector.ToolbarButton(WebInspector.UIString("Do
ck to right"), "dock-toolbar-item-right"); | 828 var right = new WebInspector.ToolbarButton(WebInspector.UIString("Do
ck to right"), "dock-toolbar-item-right"); |
827 undock.addEventListener("mouseup", setDockSide.bind(null, WebInspect
or.DockController.State.Undocked)); | 829 undock.addEventListener("mouseup", setDockSide.bind(null, WebInspect
or.DockController.State.Undocked)); |
828 bottom.addEventListener("mouseup", setDockSide.bind(null, WebInspect
or.DockController.State.DockedToBottom)); | 830 bottom.addEventListener("mouseup", setDockSide.bind(null, WebInspect
or.DockController.State.DockedToBottom)); |
829 right.addEventListener("mouseup", setDockSide.bind(null, WebInspecto
r.DockController.State.DockedToRight)); | 831 right.addEventListener("mouseup", setDockSide.bind(null, WebInspecto
r.DockController.State.DockedToRight)); |
830 undock.setToggled(WebInspector.dockController.dockSide() === WebInsp
ector.DockController.State.Undocked); | 832 undock.setToggled(WebInspector.dockController.dockSide() === WebInsp
ector.DockController.State.Undocked); |
831 bottom.setToggled(WebInspector.dockController.dockSide() === WebInsp
ector.DockController.State.DockedToBottom); | 833 bottom.setToggled(WebInspector.dockController.dockSide() === WebInsp
ector.DockController.State.DockedToBottom); |
832 right.setToggled(WebInspector.dockController.dockSide() === WebInspe
ctor.DockController.State.DockedToRight); | 834 right.setToggled(WebInspector.dockController.dockSide() === WebInspe
ctor.DockController.State.DockedToRight); |
833 dockItemToolbar.appendToolbarItem(undock); | 835 dockItemToolbar.appendToolbarItem(undock); |
834 dockItemToolbar.appendToolbarItem(bottom); | 836 dockItemToolbar.appendToolbarItem(bottom); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 p.classList.add("help-section"); | 941 p.classList.add("help-section"); |
940 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once
it restarts we will attach to it automatically."); | 942 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once
it restarts we will attach to it automatically."); |
941 } | 943 } |
942 | 944 |
943 WebInspector.WorkerTerminatedScreen.prototype = { | 945 WebInspector.WorkerTerminatedScreen.prototype = { |
944 | 946 |
945 __proto__: WebInspector.HelpScreen.prototype | 947 __proto__: WebInspector.HelpScreen.prototype |
946 } | 948 } |
947 | 949 |
948 new WebInspector.Main(); | 950 new WebInspector.Main(); |
OLD | NEW |