Changeset 192790 in webkit
- Timestamp:
- Nov 29, 2015 4:56:22 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r192789 r192790 1 2015-11-29 Brian Burg <bburg@apple.com> 2 3 Web Inspector: Add context menu item to Reload the Inspector 4 https://bugs.webkit.org/show_bug.cgi?id=141742 5 6 Reviewed by Timothy Hatcher. 7 8 Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to 9 reload the Web Inspector frontend without closing the browser. 10 11 This should make it possible to more quickly fix typos, small nits, 12 etc. without having to relaunch. It might also make state 13 restoration bugs more visible in engineering builds, since there 14 is hardly any delay between seeing the old and reloaded frontends. 15 16 Note that this functionality reloads scripts from the configuration's 17 build directory, so you still need to "build" WebInspectorUI to ensure 18 that any changed files are properly minified and staged. 19 20 * UserInterface/Base/Main.js: 21 (WebInspector.unlocalizedString): 22 23 Added. Make it obvious when strings are intentionally not localized. 24 25 (WebInspector._contextMenuRequested): 26 27 If the "Show Debug UI" setting is available and true, add 28 a global "Reload Web Inspector" menu item to every context 29 menu. Otherwise, don't eagerly create a context menu. 30 * UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut. 31 1 32 2015-11-29 Brian Burg <bburg@apple.com> 2 33 -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r192789 r192790 884 884 }; 885 885 886 WebInspector.unlocalizedString = function(string) 887 { 888 // Intentionally do nothing, since this is for engineering builds 889 // (such as in Debug UI) or in text that is standardized in English. 890 // For example, CSS property names and values are never localized. 891 return string; 892 } 893 886 894 WebInspector.UIString = function(string, vararg) 887 895 { … … 1329 1337 WebInspector._contextMenuRequested = function(event) 1330 1338 { 1331 const onlyExisting = true; 1332 let proposedContextMenu = WebInspector.ContextMenu.createFromEvent(event, onlyExisting); 1339 let proposedContextMenu; 1340 1341 // This is setting is only defined in engineering builds. 1342 let showDebugUI = WebInspector.showDebugUISetting && WebInspector.showDebugUISetting.value; 1343 if (showDebugUI) { 1344 proposedContextMenu = WebInspector.ContextMenu.createFromEvent(event); 1345 proposedContextMenu.appendSeparator(); 1346 proposedContextMenu.appendItem(WebInspector.unlocalizedString("Reload Web Inspector"), () => { 1347 window.location.reload(); 1348 }); 1349 } else { 1350 const onlyExisting = true; 1351 proposedContextMenu = WebInspector.ContextMenu.createFromEvent(event, onlyExisting); 1352 } 1353 1333 1354 if (proposedContextMenu) 1334 1355 proposedContextMenu.show(); -
trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js
r192351 r192790 27 27 WebInspector.runBootstrapOperations = function() { 28 28 WebInspector.showDebugUISetting = new WebInspector.Setting("show-debug-ui", false); 29 30 // Toggle Debug UI setting. 29 31 new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Option | WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "D", () => { 30 32 WebInspector.showDebugUISetting.value = !WebInspector.showDebugUISetting.value; 33 }); 34 35 // Reload the Web Inspector. 36 new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Option | WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "R", () => { 37 window.location.reload(); 31 38 }); 32 39
Note: See TracChangeset
for help on using the changeset viewer.