mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1189057 - [promise-dbg] Add initial boilerplate for initializing the promise debugger iframe r=fitzgen
This commit is contained in:
parent
38ac63e185
commit
8267b9134d
@ -30,6 +30,8 @@ const SEARCH_AUTOFILL = [SEARCH_GLOBAL_FLAG, SEARCH_FUNCTION_FLAG, SEARCH_TOKEN_
|
||||
const EDITOR_VARIABLE_HOVER_DELAY = 750; // ms
|
||||
const EDITOR_VARIABLE_POPUP_POSITION = "topcenter bottomleft";
|
||||
const TOOLBAR_ORDER_POPUP_POSITION = "topcenter bottomleft";
|
||||
const PROMISE_DEBUGGER_URL =
|
||||
"chrome://browser/content/devtools/promisedebugger/promise-debugger.xhtml";
|
||||
|
||||
/**
|
||||
* Object defining the debugger view components.
|
||||
@ -93,6 +95,7 @@ let DebuggerView = {
|
||||
this.WatchExpressions.destroy();
|
||||
this.EventListeners.destroy();
|
||||
this.GlobalSearch.destroy();
|
||||
this._destroyPromiseDebugger();
|
||||
this._destroyPanes();
|
||||
this._destroyEditor(deferred.resolve);
|
||||
|
||||
@ -194,6 +197,28 @@ let DebuggerView = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Initialie the Promise Debugger instance.
|
||||
*/
|
||||
_initializePromiseDebugger: function() {
|
||||
let iframe = this._promiseDebuggerIframe = document.createElement("iframe");
|
||||
iframe.setAttribute("flex", 1);
|
||||
iframe.setAttribute("src", PROMISE_DEBUGGER_URL);
|
||||
this._promisePane.appendChild(iframe);
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy the Promise Debugger instance.
|
||||
*/
|
||||
_destroyPromiseDebugger: function() {
|
||||
if (this._promiseDebuggerIframe) {
|
||||
this._promiseDebuggerIframe.parentNode.removeChild(
|
||||
this._promiseDebuggerIframe);
|
||||
|
||||
this._promiseDebuggerIframe = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Initializes the Editor instance.
|
||||
*
|
||||
|
@ -664,6 +664,8 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
|
||||
if (Prefs.promiseDebuggerEnabled) {
|
||||
let promisePane = this.DebuggerView._promisePane;
|
||||
promisePane.hidden = !promisePane.hidden;
|
||||
|
||||
this.DebuggerView._initializePromiseDebugger();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -113,6 +113,8 @@ browser.jar:
|
||||
content/browser/devtools/performance/views/optimizations-list.js (performance/views/optimizations-list.js)
|
||||
content/browser/devtools/performance/views/frames-list.js (performance/views/frames-list.js)
|
||||
content/browser/devtools/performance/views/recordings.js (performance/views/recordings.js)
|
||||
content/browser/devtools/promisedebugger/promise-debugger.js (promisedebugger/promise-debugger.js)
|
||||
content/browser/devtools/promisedebugger/promise-debugger.xhtml (promisedebugger/promise-debugger.xhtml)
|
||||
content/browser/devtools/commandline.css (commandline/commandline.css)
|
||||
content/browser/devtools/commandlineoutput.xhtml (commandline/commandlineoutput.xhtml)
|
||||
content/browser/devtools/commandlinetooltip.xhtml (commandline/commandlinetooltip.xhtml)
|
||||
|
@ -19,6 +19,7 @@ DIRS += [
|
||||
'netmonitor',
|
||||
'performance',
|
||||
'projecteditor',
|
||||
'promisedebugger',
|
||||
'responsivedesign',
|
||||
'scratchpad',
|
||||
'shadereditor',
|
||||
|
11
browser/devtools/promisedebugger/moz.build
Normal file
11
browser/devtools/promisedebugger/moz.build
Normal file
@ -0,0 +1,11 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
EXTRA_JS_MODULES.devtools.promisedebugger += [
|
||||
'promise-debugger.js'
|
||||
]
|
7
browser/devtools/promisedebugger/promise-debugger.js
Normal file
7
browser/devtools/promisedebugger/promise-debugger.js
Normal file
@ -0,0 +1,7 @@
|
||||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
22
browser/devtools/promisedebugger/promise-debugger.xhtml
Normal file
22
browser/devtools/promisedebugger/promise-debugger.xhtml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mkozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % promisedebuggerDTD SYSTEM "chrome://browser/locale/devtools/promisedebugger.dtd">
|
||||
%promisedebuggerDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&title;</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/devtools/common.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/devtools/promisedebugger.css" type="text/css"/>
|
||||
<script type="application/javascript;version=1.8" src="chrome://browser/content/devtools/theme-switching.js"/>
|
||||
</head>
|
||||
<body class="devtools-monospace" role="application">
|
||||
<script type="application/javascript;version=1.8" src="promise-debugger.js"></script>
|
||||
</body>
|
||||
</html>
|
4
browser/devtools/promisedebugger/test/.eslintrc
Normal file
4
browser/devtools/promisedebugger/test/.eslintrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
// Extend from the shared list of defined globals for mochitests.
|
||||
"extends": "../../.eslintrc.mochitests"
|
||||
}
|
5
browser/devtools/promisedebugger/test/browser.ini
Normal file
5
browser/devtools/promisedebugger/test/browser.ini
Normal file
@ -0,0 +1,5 @@
|
||||
[DEFAULT]
|
||||
tags = devtools
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
head.js
|
4
browser/devtools/promisedebugger/test/head.js
Normal file
4
browser/devtools/promisedebugger/test/head.js
Normal file
@ -0,0 +1,4 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
@ -0,0 +1,15 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!-- LOCALIZATION NOTE : FILE This file contains the Promise debugger panel
|
||||
strings. The Promise debugger panel is part of the debugger -->
|
||||
<!-- LOCALIZATION NOTE : FILE Do not translate commandkey -->
|
||||
|
||||
<!-- LOCALIZATION NOTE : FILE The correct localization of this file might be to
|
||||
- keep it in English, or another language commonly spoken among web developers.
|
||||
- You want to make that choice consistent across the developer tools.
|
||||
- A good criteria is the language in which you'd find the best
|
||||
- documentation on web development on the web. -->
|
||||
|
||||
<!ENTITY title "Promise Debugger">
|
@ -0,0 +1,11 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# LOCALIZATION NOTE These strings are used inside the Promise debugger
|
||||
# which is available as a panel in the Debugger.
|
||||
# The correct localization of this file might be to keep it in
|
||||
# English, or another language commonly spoken among web developers.
|
||||
# You want to make that choice consistent across the developer tools.
|
||||
# A good criteria is the language in which you'd find the best
|
||||
# documentation on web development on the web.
|
@ -61,6 +61,8 @@
|
||||
locale/browser/devtools/sourceeditor.dtd (%chrome/browser/devtools/sourceeditor.dtd)
|
||||
locale/browser/devtools/profiler.dtd (%chrome/browser/devtools/profiler.dtd)
|
||||
locale/browser/devtools/profiler.properties (%chrome/browser/devtools/profiler.properties)
|
||||
locale/browser/devtools/promisedebugger.dtd (%chrome/browser/devtools/promisedebugger.dtd)
|
||||
locale/browser/devtools/promisedebugger.properties (%chrome/browser/devtools/promisedebugger.properties)
|
||||
locale/browser/devtools/layoutview.dtd (%chrome/browser/devtools/layoutview.dtd)
|
||||
locale/browser/devtools/responsiveUI.properties (%chrome/browser/devtools/responsiveUI.properties)
|
||||
locale/browser/devtools/toolbox.dtd (%chrome/browser/devtools/toolbox.dtd)
|
||||
|
@ -338,6 +338,7 @@ browser.jar:
|
||||
skin/classic/browser/devtools/eyedropper.css (../shared/devtools/eyedropper.css)
|
||||
* skin/classic/browser/devtools/netmonitor.css (devtools/netmonitor.css)
|
||||
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
|
||||
skin/classic/browser/devtools/promisedebugger.css (../shared/devtools/promisedebugger.css)
|
||||
skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
|
||||
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
|
||||
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
|
||||
|
@ -440,6 +440,7 @@ browser.jar:
|
||||
skin/classic/browser/devtools/eyedropper.css (../shared/devtools/eyedropper.css)
|
||||
* skin/classic/browser/devtools/netmonitor.css (devtools/netmonitor.css)
|
||||
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
|
||||
skin/classic/browser/devtools/promisedebugger.css (../shared/devtools/promisedebugger.css)
|
||||
skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
|
||||
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
|
||||
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
|
||||
|
3
browser/themes/shared/devtools/promisedebugger.css
Normal file
3
browser/themes/shared/devtools/promisedebugger.css
Normal file
@ -0,0 +1,3 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
@ -453,6 +453,7 @@ browser.jar:
|
||||
* skin/classic/browser/devtools/debugger.css (devtools/debugger.css)
|
||||
* skin/classic/browser/devtools/netmonitor.css (devtools/netmonitor.css)
|
||||
* skin/classic/browser/devtools/performance.css (devtools/performance.css)
|
||||
skin/classic/browser/devtools/promisedebugger.css (../shared/devtools/promisedebugger.css)
|
||||
skin/classic/browser/devtools/timeline-filter.svg (../shared/devtools/images/timeline-filter.svg)
|
||||
* skin/classic/browser/devtools/scratchpad.css (devtools/scratchpad.css)
|
||||
* skin/classic/browser/devtools/shadereditor.css (devtools/shadereditor.css)
|
||||
|
Loading…
Reference in New Issue
Block a user