With this patch, we always create warningGroups outside of the outermost
console.group the first warning message could be in.
This is done because we don't want a warningGroup to be burried in a console.group,
or worse, in a console.groupCollapsed, where it wouldn't be visible at all.
The messages reducer is modified to do that, and a test is added
to ensure all the group interactions work as expected.
Differential Revision: https://phabricator.services.mozilla.com/D25910
--HG--
extra : moz-landing-system : lando
ChromeUtils.import no longer pollute the global scope,
so we can switch to it and remove this ancient helper.
Depends on D26078
Differential Revision: https://phabricator.services.mozilla.com/D26079
--HG--
extra : moz-landing-system : lando
In bug 1517210, DevTools started sharing the same compartment than JSMs.
So we can no longer use a Debugger instance bound to jsdebugger.jsm as it
would run in the same compartment than DevTools code we want to inspect
from the allocation tracker.
Instead, we instantiate the Debugger from a custom Sandbox loaded
in a unique and distinct compartment.
Depends on D26077
Differential Revision: https://phabricator.services.mozilla.com/D26078
--HG--
extra : moz-landing-system : lando
Now that there is a shared head.js, the import-globals-from is done from there.
Differential Revision: https://phabricator.services.mozilla.com/D26077
--HG--
extra : moz-landing-system : lando
I changed DelegatedQueryInterface and CallMethod to be non-static
methods rather than taking an explicit |self| parameter.
There is already a method nsXPCWrappedJS::CallMethod() with the same
signature, but it is a shim, so I inlined it into the version in
XPCWrappedJSClass.cpp.
I also fixed up a few comments that mention nsXPCWrappedJSClass.
The new comments starting with "We now need to enter the realm" were
written by Boris, and are a little more explicit so they are easier to
understand.
I renamed DebugDump() to DebugDumpInterfaceInfo() to be more
informative.
Differential Revision: https://phabricator.services.mozilla.com/D26422
--HG--
extra : moz-landing-system : lando
I changed DelegatedQueryInterface and CallMethod to be non-static
methods rather than taking an explicit |self| parameter.
I did a tiny bit of cleanup in the nsIXPConnectJSObjectHolder case of
DelegatedQueryInterface().
There is already a method nsXPCWrappedJS::CallMethod() with the same
signature, but it is a shim, so I inlined it into the version in
XPCWrappedJSClass.cpp.
I also fixed up a few comments that mention nsXPCWrappedJSClass.
The new comments starting with "We now need to enter the realm" were
written by Boris, and are a little more explicit so they are easier to
understand.
I renamed DebugDump() to DebugDumpInterfaceInfo() to be more
informative.
Differential Revision: https://phabricator.services.mozilla.com/D26422
--HG--
extra : moz-landing-system : lando
This ensures that any changes to zoom level, when RDM is active,
happen on the content document and not on the RDM interface.
Differential Revision: https://phabricator.services.mozilla.com/D26040
--HG--
extra : moz-landing-system : lando
Debouncing the autocomplete action allow us to not do too many
requests as the user is typing, which should make typing in the
console faster, especially on slow machine or on debug builds.
The tests shouldn't be impacted as we listen for a specific event
in them.
Differential Revision: https://phabricator.services.mozilla.com/D25604
--HG--
extra : moz-landing-system : lando
This copies what's done in Chrome DevTools to make codeMirror more accessible.
A new input mode is added which overrides the default `textarea` one.
This makes the "Edit as HTML" feature usable for people relying on screen readers.
This may be used in the future in the console, where we could remove the legacy
console input and serve the CodeMirror instance for everyone.
Differential Revision: https://phabricator.services.mozilla.com/D24930
--HG--
extra : moz-landing-system : lando
If the stacktrace wasn't similar to SpiderMonkey structure,
we could end up calling the match function on a null variable,
which would throw (and ultimately display the safenet Invalid Object
element).
The fix is simple, we guard on the variable before calling match
on it.
Test cases are added to ensure we can deal with different kind
of stacktraces.
Differential Revision: https://phabricator.services.mozilla.com/D26125
--HG--
extra : moz-landing-system : lando
The File column in Network monitor regressed to show the full URL while it should just show the parts after the domain.
Differential Revision: https://phabricator.services.mozilla.com/D24303
--HG--
extra : moz-landing-system : lando
Fix main bug. Refine output of curl with multipart data payload.
Add missing units tests, including regression tests.
Differential Revision: https://phabricator.services.mozilla.com/D25890
--HG--
extra : moz-landing-system : lando
We do not need to handle onProgressChange64 notifications since the TabChild's
web progress events are filtered through an nsBrowserStatusFilter, which
truncates onProgresChange64 event values to 32-bit integers and then calls
onProgressChange.
Differential Revision: https://phabricator.services.mozilla.com/D25649
--HG--
extra : moz-landing-system : lando
Depends on D25087
Simplified the convertUnits() method by externalizing the logic to get the reference node, reference box and reference font size value used when converting between units.
The result is easier to read, but more importantly it reduces the cyclomatic complexity which trips the ESlint "complexity" rule and triggers a backout.
Differential Revision: https://phabricator.services.mozilla.com/D25611
--HG--
extra : moz-landing-system : lando
- Reads the value for the letter-spacing CSS property and shows it in the Font Editor. When it is default, show the "normal" identifier. As soon as the user tries to edit it using the value slider, switch to an em-based value.
- Tweaks the unit conversion method to support letter-spacing: using correct reference node for em units, returning high-precision results even for pixels (allow sub-pixel precision)
Differential Revision: https://phabricator.services.mozilla.com/D25087
--HG--
extra : moz-landing-system : lando
Mechanical change from Matcher::match(...) to Matcher::operator()(...).
This will now permit the use of generic lambdas, and facilitate the
implementation of multi-lambda match.
Differential Revision: https://phabricator.services.mozilla.com/D24889
--HG--
extra : moz-landing-system : lando
Navigating with Alt + arrow keys on OSX when the autocomplete popup
was open wasn't closing the popup, which could lead to weird behavior.
The test asserting arrow keys behavior is modified to ensure
this works as expected on all the different platforms.
Differential Revision: https://phabricator.services.mozilla.com/D25378
--HG--
extra : moz-landing-system : lando
Increase the minimum width of the custom method value to make all options appear comfortably.
Fix Custom Request Panel header title wrap bug.
Style & position Custom Requeset Panel buttons properly.
Differential Revision: https://phabricator.services.mozilla.com/D23252
--HG--
extra : moz-landing-system : lando
Converted StatusBar to a Component and added a `shouldComponentUpdate` method to prevent unnecessary updates.
Differential Revision: https://phabricator.services.mozilla.com/D24599
--HG--
extra : moz-landing-system : lando
The propType is changed to *not* required as the function is
only passed when the grouping pref is true.
Differential Revision: https://phabricator.services.mozilla.com/D25560
--HG--
extra : moz-landing-system : lando
Only place reps can display a ::marker currently is in the animation panel.
Differential Revision: https://phabricator.services.mozilla.com/D25165
--HG--
extra : moz-landing-system : lando
So ::marker pseudo elements can be found via searching for "::marker" in the
markup view.
Differential Revision: https://phabricator.services.mozilla.com/D25109
--HG--
extra : moz-landing-system : lando
Prior to this the tab would crash with signature [@ nsINode::InsertChildBefore ]
if trying to insert before the ::marker.
Differential Revision: https://phabricator.services.mozilla.com/D25106
--HG--
extra : moz-landing-system : lando
At the moment when devtools.inspector.showAllAnonymousContent is true shadow
hosts with ::marker and ::before pseudos will stop showing the ::before and
won't show the ::marker either.
Differential Revision: https://phabricator.services.mozilla.com/D25058
--HG--
extra : moz-landing-system : lando
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process
Differential Revision: https://phabricator.services.mozilla.com/D23330
--HG--
extra : moz-landing-system : lando
Only place reps can display a ::marker currently is in the animation panel.
Differential Revision: https://phabricator.services.mozilla.com/D25165
--HG--
extra : moz-landing-system : lando
So ::marker pseudo elements can be found via searching for "::marker" in the
markup view.
Differential Revision: https://phabricator.services.mozilla.com/D25109
--HG--
extra : moz-landing-system : lando
Prior to this the tab would crash with signature [@ nsINode::InsertChildBefore ]
if trying to insert before the ::marker.
Differential Revision: https://phabricator.services.mozilla.com/D25106
--HG--
extra : moz-landing-system : lando
At the moment when devtools.inspector.showAllAnonymousContent is true shadow
hosts with ::marker and ::before pseudos will stop showing the ::before and
won't show the ::marker either.
Differential Revision: https://phabricator.services.mozilla.com/D25058
--HG--
extra : moz-landing-system : lando
This adds missing preferences to mocha-test-setup.js, and
add URLSearchParams to the global object if it's not
defined there (e.g. in Node < v.10.0.0).
Differential Revision: https://phabricator.services.mozilla.com/D25044
--HG--
extra : moz-landing-system : lando
`Array.map` triggers a deprecation warnings, and it
turns out we can use `.map` directly on the objects
we were calling `Array.map` on.
Differential Revision: https://phabricator.services.mozilla.com/D25506
--HG--
extra : moz-landing-system : lando
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.
The grouping won't occur unless the groupWarnings preferences
is on.
Differential Revision: https://phabricator.services.mozilla.com/D23552
--HG--
extra : moz-landing-system : lando
This component will be used to render warning groups messages.
We also add a `inWarningGroup` prop to the `Message` component
so warnings that will be displayed in such warningGroup can
be styled differently (no warning icon, a different color for
the indent).
Add some utils functions and constants to check if a message
should be a warning group.
Differential Revision: https://phabricator.services.mozilla.com/D23551
--HG--
extra : moz-landing-system : lando
This will be used to enable groups of warning messages (Tracking Protection,
CSP, CORS, …).
Differential Revision: https://phabricator.services.mozilla.com/D23550
--HG--
extra : moz-landing-system : lando
Improves spacing and alignment for workers in the right pane and sources tree. Also changes the Main thread icon to be document in the worker pane.
Differential Revision: https://phabricator.services.mozilla.com/D25121
--HG--
extra : moz-landing-system : lando
- Reads the value for the letter-spacing CSS property and shows it in the Font Editor. When it is default, show the "normal" identifier. As soon as the user tries to edit it using the value slider, switch to an em-based value.
- Tweaks the unit conversion method to support letter-spacing: using correct reference node for em units, returning high-precision results even for pixels (allow sub-pixel precision)
Differential Revision: https://phabricator.services.mozilla.com/D25087
--HG--
extra : moz-landing-system : lando
Depends on D25061
Two motivations to support the old routes:
- we have some links inside Firefox (application panel, about:addons, Developer Menu) that link to about:debugging. With this fix we avoid updating the links with code that depends on the value of the preference. We will fully update the links once the old aboutdebugging codebase is removed.
- there are some external pages that refer to about:debugging#workers or about:debugging#addons (did a quick google search). not a lot of them but this will also allow to keep supporting them
Differential Revision: https://phabricator.services.mozilla.com/D25062
--HG--
extra : moz-landing-system : lando
Moved tab context menu out of browser.dtd to browser.xul except for sendPageToDevice, sendLinkToDevice, moveTabOptions, moveSelectedTabOptions, undoCloseTab. Not sure if tabbrowser.js and tabbrowser.xul are working as intended.
Differential Revision: https://phabricator.services.mozilla.com/D19312
--HG--
extra : moz-landing-system : lando
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.
The grouping won't occur unless the groupWarnings preferences
is on.
Differential Revision: https://phabricator.services.mozilla.com/D23552
--HG--
extra : moz-landing-system : lando
This component will be used to render warning groups messages.
We also add a `inWarningGroup` prop to the `Message` component
so warnings that will be displayed in such warningGroup can
be styled differently (no warning icon, a different color for
the indent).
Add some utils functions and constants to check if a message
should be a warning group.
Differential Revision: https://phabricator.services.mozilla.com/D23551
--HG--
extra : moz-landing-system : lando
This will be used to enable groups of warning messages (Tracking Protection,
CSP, CORS, …).
Differential Revision: https://phabricator.services.mozilla.com/D23550
--HG--
extra : moz-landing-system : lando
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.
The grouping won't occur unless the groupWarnings preferences
is on.
Differential Revision: https://phabricator.services.mozilla.com/D23552
--HG--
extra : moz-landing-system : lando
This component will be used to render warning groups messages.
We also add a `inWarningGroup` prop to the `Message` component
so warnings that will be displayed in such warningGroup can
be styled differently (no warning icon, a different color for
the indent).
Add some utils functions and constants to check if a message
should be a warning group.
Differential Revision: https://phabricator.services.mozilla.com/D23551
--HG--
extra : moz-landing-system : lando
This will be used to enable groups of warning messages (Tracking Protection,
CSP, CORS, …).
Differential Revision: https://phabricator.services.mozilla.com/D23550
--HG--
extra : moz-landing-system : lando
I agree that we should remove PostCSS but since we have contributors moving to MC, I want to get this fixed ASAP.
Differential Revision: https://phabricator.services.mozilla.com/D25258
--HG--
extra : moz-landing-system : lando
Removes Node.js as an option for library detection to prevent issues in console.
Differential Revision: https://phabricator.services.mozilla.com/D25236
--HG--
extra : moz-landing-system : lando
The client close() method is not used anywhere. Individual callers should be responsible for closing opened sockets if needed.
Removing this method and the _sockets array, we no longer leak strings when calling adb.updateRuntimes()
Differential Revision: https://phabricator.services.mozilla.com/D25213
--HG--
extra : moz-landing-system : lando
Pass on column from props.onViewSourceInDebugger (///devtools/client/shared/components/reps/reps.js:6844//) to
//devtools/client/webconsole/webconsole-wrapper.js:267// as **frame.column**
Differential Revision: https://phabricator.services.mozilla.com/D22372
--HG--
extra : moz-landing-system : lando
Removed all occurences of ondialogaccept.
Removed all occurences of ondialogcancel.
Replaced all removed attributes with event handlers.
Differential Revision: https://phabricator.services.mozilla.com/D21227
--HG--
extra : moz-landing-system : lando
This is more of a feedback request, I have not really written component unit tests before.
Differential Revision: https://phabricator.services.mozilla.com/D24145
--HG--
extra : moz-landing-system : lando
Add a preference to make the console input autocomplete automatic.
If set to false, the autocomplete popup will only appear on Ctrl+Space.
A test is added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D24705
--HG--
extra : moz-landing-system : lando
We add a new `BigInt` grip type that can be consumed by reps.
A few test cases are added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D24669
--HG--
extra : moz-landing-system : lando
It looks like we don't need to stop ADB. Most of the logic can stay, in order to start and stop the devices polling.
Differential Revision: https://phabricator.services.mozilla.com/D24398
--HG--
extra : moz-landing-system : lando
Replaced instances of callers in both C++ and JS files to query the state from the principal directly.
Differential Revision: https://phabricator.services.mozilla.com/D22532
--HG--
extra : moz-landing-system : lando
### Try
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f1bad5e5282812225da95c0ea9e2ef173640b5da
### Summary
!!Comparing numerous complex websites such as github, facebook, cnn etc. the cascade now matchers that of Chrome so we are in a much better place.!!
According to https://www.w3.org/TR/css-cascade-3/#cascading (which platform follows now) and https://www.w3.org/TR/css-cascade-4/#cascading we should now be doing this (descending order):
- Transition declarations
- User-Agent & !important
- User & !important
- Author & !important
- CSS Animations, @keyframes
- Author, normal weight
- User, normal weight
- User-Agent, normal weight
- specificity
- Sheet Index
- Rule Line
- Rule Column
We are only dealing with CSS selectors here so we can safely drop Transition declarations and CSS Animations because their presence here is irrelevant when it comes to the CSS cascade information we display in the computed view.
This leaves us with:
- User-Agent & !important
- User & !important
- Author & !important
- Author, normal weight
- User, normal weight
- User-Agent, normal weight
- specificity
- Sheet Index
- Rule Line
- Rule Column
### Changes
- References to content stylesheets have been changed to author stylesheet to closely match the technical terms author, user and agent stylesheets.
- Simplified and modernized a bunch of for loops to make the code easier to understand.
- Previous to these changes all matching parent rules were classed as equal e.g. color on the body tag was equal to color on a node's immediate container. We now use the `distance` variable to tell how close a rule is to the current node. This is the highest qualifier in our cascade calculation.
- The `_agentSheet`, `_authorSheet` and `_userSheet` properties are now used to obtain a sheets origin.
- `elementStyle` was renamed to `inlineStyle` in order to correctly identify the rule's origin.
- We used to sort the matchedSelectors to move rules with `STATUS.MATCHED` above `STATUS.PARENT_MATCH` but this is unnecessary now that we have the `distance` property so we no longer do this.
- The `compareTo()` method has been updated to match https://www.w3.org/TR/css-cascade-3/#cascading (which platform follows now) and https://www.w3.org/TR/css-cascade-4/#cascading. It has also been simplified and made far less prone to error.
Differential Revision: https://phabricator.services.mozilla.com/D23711
--HG--
extra : moz-landing-system : lando