Title: [183238] trunk/Source/WebInspectorUI
- Revision
- 183238
- Author
- [email protected]
- Date
- 2015-04-23 20:08:31 -0700 (Thu, 23 Apr 2015)
Log Message
Web Inspector: run a customizable bootstrap function after the UI has fully loaded
https://bugs.webkit.org/show_bug.cgi?id=144124
Reviewed by Joseph Pecoraro.
It can be really annoying to click through the Inspector UI dozens of times to debug one
interaction or iterate on a specific widget.
This patch adds a blank "bootstrap" function that can be used to hard-wire commands to
automate repetitive UI state setup. The function is run immediately after the inspector loads.
Setup commands can be shared as bug report reproduction steps.
* UserInterface/Base/Bootstrap.js: Added.
(WebInspector.runBootstrapOperations): Added.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Bootstrap after setting up everything and restoring view state from cookie.
* UserInterface/Main.html:
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (183237 => 183238)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-04-24 03:06:55 UTC (rev 183237)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-04-24 03:08:31 UTC (rev 183238)
@@ -1,3 +1,23 @@
+2015-04-23 Brian J. Burg <[email protected]>
+
+ Web Inspector: run a customizable bootstrap function after the UI has fully loaded
+ https://bugs.webkit.org/show_bug.cgi?id=144124
+
+ Reviewed by Joseph Pecoraro.
+
+ It can be really annoying to click through the Inspector UI dozens of times to debug one
+ interaction or iterate on a specific widget.
+
+ This patch adds a blank "bootstrap" function that can be used to hard-wire commands to
+ automate repetitive UI state setup. The function is run immediately after the inspector loads.
+ Setup commands can be shared as bug report reproduction steps.
+
+ * UserInterface/Base/Bootstrap.js: Added.
+ (WebInspector.runBootstrapOperations): Added.
+ * UserInterface/Base/Main.js:
+ (WebInspector.contentLoaded): Bootstrap after setting up everything and restoring view state from cookie.
+ * UserInterface/Main.html:
+
2015-04-23 Joseph Pecoraro <[email protected]>
Web Inspector: Adopt Object.assign and improve its display in Console
Added: trunk/Source/WebInspectorUI/UserInterface/Base/Bootstrap.js (0 => 183238)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Bootstrap.js (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Bootstrap.js 2015-04-24 03:08:31 UTC (rev 183238)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2015 University of Washington.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.runBootstrapOperations = function() {
+ // This function is invoked after the inspector has loaded.
+ // Modify it during development to hard-wire setup operations,
+ // rather than manually clicking through the user interface.
+
+ // If a model object or UI component is not easy to script, then file a bug!
+}
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (183237 => 183238)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2015-04-24 03:06:55 UTC (rev 183237)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2015-04-24 03:08:31 UTC (rev 183238)
@@ -356,6 +356,8 @@
this.showSplitConsole();
this._contentLoaded = true;
+
+ this.runBootstrapOperations();
};
WebInspector.activateExtraDomains = function(domains)
Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (183237 => 183238)
--- trunk/Source/WebInspectorUI/UserInterface/Main.html 2015-04-24 03:06:55 UTC (rev 183237)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html 2015-04-24 03:08:31 UTC (rev 183238)
@@ -536,6 +536,8 @@
<script src=""
+ <script src=""
+
<script>
WebInspector.loaded();
</script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes