This patch adds a new performance recording panel that interfaes with
perf.html. It is enabled through the new preferences:
"devtools.performance.new-panel-enabled"
MozReview-Commit-ID: 1HBLsbREDPk
--HG--
extra : rebase_source : 4db73267d9868c4c62d2619111f875338c8e6171
This also renames the support files.
MozReview-Commit-ID: 9TqERvD5EFA
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/test_bug1045902_console_csp_ignore_reflected_xss_message.html => devtools/client/webconsole/new-console-output/test/mochitest/test_console_csp_ignore_reflected_xss_message.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test_bug1045902_console_csp_ignore_reflected_xss_message.html^headers^ => devtools/client/webconsole/new-console-output/test/mochitest/test_console_csp_ignore_reflected_xss_message.html^headers^
extra : rebase_source : be782c9fee52551a8f3d248208cc40c0c2963e36
Most of the codebase that needs to create a debugger server
can use a server with all actors registered.
Define an additional method registerAllActors to do that.
By previous implementations, all the call sites that were
using browser: true were indirectly using tab & root: true
as well. So all the call sites using browser: true have been
migrated to registerAllActors and the specific behavior of
the browser: true case has been removed. Passing browser:true
to registerActors now only registers browser specific actors.
MozReview-Commit-ID: F3sx71eGrdG
--HG--
extra : rebase_source : 7704264e84d96e03a0c789103ff466980913d4d2
The windowType option of registerActors has nothing to do with
registering actors. It is only used in one spot in the codebase, so
switch this one to DebuggerServer.chromeWindowType = "..."; and
remove the option from registerActors.
MozReview-Commit-ID: QH6GKmTbVq
--HG--
extra : rebase_source : 13d70ddc21cae2b43cab2899c0e4b6f597c4f3ec
DebuggerServer.init() already bails out if it was previously initialized
so we could avoid guarding the calls to init() with it everywhere.
Registering an actor module several times is also a noop as the Server
keeps a map of all the already registered modules and will bail out if
the module is already known.
MozReview-Commit-ID: 4ONLlx9253i
--HG--
extra : rebase_source : a6fce209baf5e019b6a216761c01832a30332343
The default values for registerActors are never used in the codebase
and feel counter intuitive as they set all booleans to true.
MozReview-Commit-ID: 25zaJss9E4R
--HG--
extra : rebase_source : 9cbbd8ea44d7cc64bb17ada5c06cc1b7b016067b
DebuggerServer has old APIs addBrowserActors & addTabActors that can be
replaced by calls to registerActors.
MozReview-Commit-ID: KpYJpbSHM8I
--HG--
extra : rebase_source : c7f20edf503b944ef2582b5fe73bd6d899c0d1cc
restrictPrivileges was used for FirefoxOS and can be removed now.
MozReview-Commit-ID: J5SYQ0OPTSk
--HG--
extra : rebase_source : 9c92fab26f867e39ebe0cd5e93994d6126374740
The tab argument was unused in the method. All the call sites have been updated to
stop providing this argument. The method now supports an optional tab argument.
It defaults to the selected tab if no argument is provided.
MozReview-Commit-ID: 621dgljHdtD
--HG--
extra : rebase_source : 676c998cb4b2f126d9ee075760e2d7d30078344b
Test will be enabled in Bug 1406038. This requires some Reps work.
MozReview-Commit-ID: CpU25kiXiR1
--HG--
extra : rebase_source : d0c0f7c04f5c507b9ec17d6358b07cc30179b384
Even with this patch, in Gecko getUnanimatedComputedStyle flushes pendings
styles somehow. Also in Stylo the function flushes pending styles if the
target element hasn't yet styled or Servo style data has cleared for some
reasons (e.g. the element is in display:none subtree).
MozReview-Commit-ID: HCizzM0JnFz
--HG--
extra : rebase_source : 81f130f35794d6ddcf6b7e7f70566d521ea63d31
This method was added in bug 1262439 last year, and shipped with FF50.
We support all the way back to the latest ESR (52 now).
So let's remove the backward compat code for this method.
MozReview-Commit-ID: LUL7FFWWC5M
--HG--
extra : rebase_source : 27969faff9e8827e23ff570addfde5c06fb57c97
The scrollIntoView actor method was added in bug 901250 3 years ago and
shipped with FF 40.
We support all the way back to the latest ESR (52 now).
So let's drop this backward compat check code.
MozReview-Commit-ID: 5FKRpiOXfzd
--HG--
extra : rebase_source : 4c3b0850750081a87b77bc1b85d7a2e852f58c82
This method was added in bug 1208864 2 years ago and shipped with Firefox 44.
We support all the way to the latest ESR, which now is 52.
So let's remove this backward compat code.
MozReview-Commit-ID: AdTU63Oehi4
--HG--
extra : rebase_source : 481f768101212db1f363c9b5204f7654aaea5208
The resolveRelativeURL actor method was added in bug 921102 which shipped
with Firefox 40.
This was 3 years ago, and well older than the latest current ESR (52), which
is the latest version we support.
MozReview-Commit-ID: 5X5czLP5v2E
--HG--
extra : rebase_source : 7c1ee2c2a78151eb94ef1f1bacff6396d3ceb24e
Add dependencies that weren't included in devtools-launchpad no more.
MozReview-Commit-ID: 39KkXvQsR7S
--HG--
extra : rebase_source : 3501a488774044cef2f4d9844b17123a40372a2a
We only label Object as being ArrayLike if they have consecutive, numeric indexes, starting at 0,
and that could contain only a non-numeric length property that matches the actual number of numeric
keys in the object.
A test is added to make sure we don't regress this.
Fix old console frontend tests which relied on the bad implementation of ArrayLike (and delete
test cases now covered by the server test).
MozReview-Commit-ID: ATF7WypNVhh
--HG--
extra : rebase_source : 5e6a0ef0da84cf89518164f518a257bd1f0d5fd8
Switch some calls to addOneTimeListener from callback-style to Promise.
MozReview-Commit-ID: F9AlSvK0MAH
--HG--
extra : rebase_source : 076522e89004f8a4634b4f7732800a5ec14ce633
Once the test was migrated, it was failing because we did not show
error messages for invalid cd() calls.
There was a missing part in the evaluation result prepare message, which
this patch fixes. A stub and a mocha test were added to make sure we do
display those kind of messages.
MozReview-Commit-ID: FcTsP2pr3vD
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-609872-cd-iframe-child.html => devtools/client/webconsole/new-console-output/test/mochitest/test-cd-iframe-child.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-609872-cd-iframe-parent.html => devtools/client/webconsole/new-console-output/test/mochitest/test-cd-iframe-parent.html
extra : rebase_source : 8fc82b71875cebfed0e318d1eba8b5332dc650c7
@Honza: Please wait for a green try before reviewing this.
MozReview-Commit-ID: 5KlOkYLnorj
--HG--
extra : rebase_source : 339c2dda1eb2afaf490e6bacb613addeece42d04
ESLint 4 will turn on all rules after an eslint-enable with no arguments. Therefore be more specific about which rules are being disabled.
MozReview-Commit-ID: IoPBG72zySm
--HG--
extra : rebase_source : f0095f7a9bc3020c1a36387cd033d1b1238a61cf
@nchevobbe: Please wait for a green try before reviewing this.
MozReview-Commit-ID: 9SLEHAq0IQQ
--HG--
extra : rebase_source : f3864d13d36802914171581f9f60351cf71aad2f
As you add more than 7 or so custom devices, the modal will eventually wrap to
a 4th column. Adding some more width allows that to happen without a horizontal
scroll bar.
This width looks natural without custom devices as well, and its not too large
for the most popular screen size (1366 x 768).
MozReview-Commit-ID: 5IErG8NX3xO
--HG--
extra : rebase_source : cbdb862597ef1774964bea135da6376e0cbb7650
@nchevobbe: Please wait for a green try before reviewing this.
MozReview-Commit-ID: 9SLEHAq0IQQ
--HG--
extra : rebase_source : b916d948f3712bf4f09e50436cbdd0cf0f12afb4
Response content should only be fetched whenever it is strictly needed
as it is the response body. A possibly very large string.
So, netmonitor UI should only retrieve it when users select the Response Panel
or do any other action that require having access to it (like "Copy response"
context menu).
MozReview-Commit-ID: CtpJ8PKsCsm
--HG--
extra : rebase_source : 4540f641e511b2199436ad5c2edccda8aff37634
Adding an HTML preview above the raw payload viewer on the developer
tools response tab caused browser_net_cyrillic-02.js to fail since
CodeMirror only renders visible lines to the DOM. The new HTML preview
shares space with the CodeMirror editor, so the resulting height became
shorter; enough to hide the line this test was looking for.
This solution uses CodeMirror.getValue() to retrieve the contents of all
lines stored in memory. Checking against that will allow the test to
pass since it contains the cyrillic text. One downside is that this
makes the test less reliable since it may not be guaranteed that what
CodeMirror has buffered to render will actually be what's inserted into
the DOM.
Two other solutions were explored before settling on the one above. The
first was simulating scroll events through EventUtils.sendWheelAndPaint.
const event = {
deltaMode: WheelEvent.DOM_DELTA_LINE,
deltaY: 20
}
yield new Promise(resolve => {
EventUtils.sendWheelAndPaint(
document.querySelector(".CodeMirror-scroll"),
10,
10,
event,
resolve,
monitor.panelWin
);
})
This did scroll the editor enough to render content and pass the test,
but caused additional errors since monitor.panelWin did not have a
.waitForAllPaintsFlushed() method that EventUtils.sendWheelAndPaint
expected.
The below alternative uses a hard-coded scroll amount and a
requestAnimationFrame as a rough estimate of when scrolling finished.
It worked in the ten or so runs I tested, but there's nothing guaranteed
about requestAnimationFrame that indicates when CodeMirror's rendering
has finished.
document.querySelector(".CodeMirror-scroll").scrollBy(0, 200);
yield new Promise(resolve => requestAnimationFrame(resolve));
MozReview-Commit-ID: H95HjR8UNpx
--HG--
extra : rebase_source : 03e4cd1e3a9042fa565373487c5cbb1118530917
Restoring the HTML preview in the response panel was requested by many
users who rely on it to debug erroring AJAX requests. Many web backend
frameworks display an HTML stacktrace helping users trace down the
problem.
The html-preview.js component was taken from a previous commit of the
source code before the preview panel was removed. A few modifications
with its name and CSS classname were made.
MozReview-Commit-ID: JFyF6cBMaNf
--HG--
extra : rebase_source : 7e358f5fb4336a15f549ecb6f7e24cc00429de8e