Depends on D9654
This padding is already set on SidebarItem so I think we can skip it here?
Differential Revision: https://phabricator.services.mozilla.com/D9655
--HG--
extra : moz-landing-system : lando
Depends on D9652
This allows the Connect button to no longer look disabled. However we could maybe mutualize
colors a bit more, either with a --color-disabled variable or with a class.
Differential Revision: https://phabricator.services.mozilla.com/D9653
--HG--
extra : moz-landing-system : lando
Depends on D9659
Adds infrastructure and tests for validating that changes to CSS
declarations in the Inspector Rule view are tracked and show up in the
Changes panel.
Makes use of the `client/inspector/rules/test/head.js` file with helpers
to instrument changes in the Rule view then observe results on the
Changes panel.
This is a first pass on tests. More will follow to validate:
- declarations in at-rules;
- nested at-rules;
- declarations in various sources: inline styles, external stylesheets.
Differential Revision: https://phabricator.services.mozilla.com/D9660
--HG--
extra : moz-landing-system : lando
Depends on D9257
We need to clear the store of previous changes but we should not remove
references and event listeners to the ChangesActor since the DevTools
session is still active.
MozReview-Commit-ID: Okp2CcSlfw
Differential Revision: https://phabricator.services.mozilla.com/D9659
--HG--
extra : moz-landing-system : lando
Depends on D8967
This patch fixes an issue where toggling a new CSS declaration OFF then
back ON would make the Changes panel lose track of its existence. This
happened because tracked changes don't have context about "disabled"
state, only "add" or "remove", like diffs.
Additionally, this patch fixes the case where renaming a property would
erroneously track two distinct operations (rename + add). To fix this,
we prevent the inline editor for the property name from the CSS Rules
view to advance and focus the property value, which then immediately
blurred triggering a fake second operation to be tracked.
Auto-advancing to the property value inline editor still works if
adding a new declaration or if the property name ends with a colon, ":",
therefore old behaviour is not lost.
MozReview-Commit-ID: Faw2DeCJJYk
Differential Revision: https://phabricator.services.mozilla.com/D9257
--HG--
extra : moz-landing-system : lando
Depends on D8722
Include the "!importat" priority flag when tracking changes to CSS declarations.
Differential Revision: https://phabricator.services.mozilla.com/D8967
--HG--
extra : moz-landing-system : lando
Depends on D8721
- Externalize reusable CSSDeclaration React component;
- Introduce the ability to render rules with unlimited levels of nesting, but cap indentation in the UI at a reasonable level;
- Remove accordion behavior from rules, but keep for sources;
- Cleanup CSS styles for Changes panel.
Differential Revision: https://phabricator.services.mozilla.com/D8722
--HG--
extra : moz-landing-system : lando
Depends on D8720
If all of the changes to a CSS rule cancel each other out, remove the information about the rule from the Redux store.
If none of the rules in a source end up changed, remove the information about the source form the Redux store.
This ensures the Changes panel only shows actual diffs and not empty signatures of rules which were changed but the sum of their changes means nothing really changed.
MozReview-Commit-ID: 4n9yRkFdmN4
Differential Revision: https://phabricator.services.mozilla.com/D8721
--HG--
extra : moz-landing-system : lando
Depends on D8719
- Add methods to generate unique identifiers for stylesheets and CSS rules changed within those stylesheets. These are used as IDs in the Redux store;
- Add logic to generate entries in the store for each one of the rule's ancestors and assign parent/child dependencies. This single-level structure for all rules in a source helps with quickly identifying a rule on subsequent changes independent of its rule tree (it avoids needless tree traversal). The parent/child references help with rendering of the nested rule structure in the Changes panel;
- Deep clone Redux store state before aggregating tracked changes (no more mutations of previous state).
Differential Revision: https://phabricator.services.mozilla.com/D8720
--HG--
rename : devtools/client/inspector/changes/moz.build => devtools/client/inspector/changes/utils/moz.build
extra : moz-landing-system : lando
Depends on D8718
Opting to first completely remove, then add the new logic, otherwise
the diff gets very confusing since most of the code changed
MozReview-Commit-ID: BbncSBhD5py
Differential Revision: https://phabricator.services.mozilla.com/D8719
--HG--
extra : moz-landing-system : lando
⚠️ **To build locally, this change series depends on the [change series](https://phabricator.services.mozilla.com/D4399) which adds the ChangesActor**.
🏋️♂️ **To test hands-on, you can download a [custom macOS build](https://queue.taskcluster.net/v1/task/HIiZcwLXTuuSYYjfwEDmmA/runs/0/artifacts/public/build/target.dmg) (updated Wed, Oct 24) which includes both change series.**
- Introduce ancestorRules getter to StyleRuleActor to get a flattened rule tree with the ancestors of the current rule;
- Introduce CSSRuleTypeName to css-logic helpers to map between CSS rule type and human-readable name;
- Log rule index position with each CSS declaration change to help differentiate between changes to rules with identical selectors at the same level of nesting.
Differential Revision: https://phabricator.services.mozilla.com/D8718
--HG--
extra : moz-landing-system : lando
The SourceMapURLService has a subscribe and an unsubscribe
functions to respectively listen and stop listening for
source map changes on a given location (url + line + column).
The unsubscribe function need to be called with the same
parameters as the subscribe function, which means the consumer
need to keep a reference to the callback.
By making the subscribe function return the unsubscribe function,
this makes things a bit easier.
Differential Revision: https://phabricator.services.mozilla.com/D9784
--HG--
extra : moz-landing-system : lando
I tried all kinds of CSS changes and experiments to get to the bottom of this.
This is due to an incompatibility between the flexbox API and `devtools/shared/layout/dom-matrix-2d.js::getWritingModeMatrix()`.
Take the following flexbox item:
```
______________________________
| ___ |
|| | |
||___| |
|______________________________|
```
In LTR mode the coordinates would be something like 5, 10, 25, 35 (x1, y1, x2, y2).
Now let's look at RTL mode:
```
______________________________
| ___ |
| | ||
| |___||
|______________________________|
```
In RTL mode the coordinates would be something like 85, 10, 105, 35 (x1, y1, x2, y2).
getWritingModeMatrix() flips the canvas in RTL mode naively assuming that this will flip our overlay. This causes 2 problems:
1. 0,0 moves from the top left to the top right, complicating our calculations.
2. The flexbox API returns coordinates relative to the top left of the canvas and not the top right.
Similar issues are caused by setting writing modes that results in flipping and rotating the canvas in similar ways.
In a nutshell rotating the canvas actually complicates our calculations instead of simplifying them.
This patch adds two named parameters to allow opting out of writing mode and RTL calculations.
Differential Revision: https://phabricator.services.mozilla.com/D9390
--HG--
extra : moz-landing-system : lando
Adds a "Refresh devices button". I was unsure on whether this button should use state for this or just plug directly into the adb module. In the end I opted for doing it via actions/state because it would also allow us to show somewhere else an indication of whether the scanner is running or not (in case we need it). But if you think this is overkill, I'll gladly change it.
To try it, with the device connected, open and close firefox. If you press Refresh you should see the list update.
Differential Revision: https://phabricator.services.mozilla.com/D9500
--HG--
extra : moz-landing-system : lando
Another regression linked to removing setContent API on HTMLTooltip.
The initial feedback to remove the method was from me, because we started seeing
two ways to set the content of the tooltip (DOM APIs or setContent) and I prefered
keeping only one. However the DOM approach still almost forces you to call setContentSize
in case your tooltip instance is shared for different content.
This is the case for the preview tooltip, which is used for CSS variables, fonts and image
previews. Maybe we should revisit the decision to remove this setContent API
Differential Revision: https://phabricator.services.mozilla.com/D9752
--HG--
extra : moz-landing-system : lando
Depends on D9122
This is a follow up to the first patch that restores the category, but shows a "disabled"
message instead of the content
Differential Revision: https://phabricator.services.mozilla.com/D9123
--HG--
extra : moz-landing-system : lando
This is an attempt to fix the intermittent on this test.
It looks like we were setting the listeners on some events
after the request message was received, which might have
made us missed some events.
We take this bug as an opportunity to do some cleanup
on the test.
Differential Revision: https://phabricator.services.mozilla.com/D9075
--HG--
extra : moz-landing-system : lando
So far, when USB list was updated, since we replace to all new instances, the
states had not been able to keep. To resolve this, re-use runtimes that retain
in runtimes state.
Depends on D9470
Differential Revision: https://phabricator.services.mozilla.com/D9471
--HG--
extra : moz-landing-system : lando
When the addon was removed/added, REQUEST_EXTENSIONS_SUCCESS action was fired.
But because current USB runtime does not support extensions debugging, we
avoid to add debug target listener for USB runtime. Likewise, we refer the
state of supporting for workers and tabs.
Differential Revision: https://phabricator.services.mozilla.com/D9469
--HG--
extra : moz-landing-system : lando
Depends on D8741
This changeset updates some calls to ok() that should actually be calls to is()
and that needed tiny fixes to match the expected value.
Differential Revision: https://phabricator.services.mozilla.com/D8742
--HG--
extra : moz-landing-system : lando
Depends on D8740.
This changeset replaces calls to ok with 3 arguments to calls with 2 arguments
in situations where the switch does not have a significant impact on the assert.
Differential Revision: https://phabricator.services.mozilla.com/D8741
--HG--
extra : moz-landing-system : lando
Depends on D8739.
This changeset updates calls to ok() that were most likely intended
for is(), but are not working as is.
Differential Revision: https://phabricator.services.mozilla.com/D8740
--HG--
extra : moz-landing-system : lando
This changeset updates all the test that were wrongly using ok() and wanted to
use is() AND for which the assert is still passing without any modification
required.
Differential Revision: https://phabricator.services.mozilla.com/D8739
--HG--
extra : moz-landing-system : lando
WiFi is not even working at the moment, so it probably should
not be tagged as recommended.
Differential Revision: https://phabricator.services.mozilla.com/D9222
--HG--
extra : moz-landing-system : lando
In this patch we use the previous change to reduce the overhead in the
specific test that fails in ccov builds, by reducing the sample
frequency.
Depends on D8548
Differential Revision: https://phabricator.services.mozilla.com/D8435
--HG--
extra : moz-landing-system : lando
The int preference profiler.sample-frequency-khz didn't make it possible
to reduce the overhead in tests, because we could have intervals bigger
than 1ms. With this change we can now do it.
Depends on D8547
Differential Revision: https://phabricator.services.mozilla.com/D8548
--HG--
extra : moz-landing-system : lando
We reduce the profiler's buffer size for all tests, to reduce the memory
pressure and the overhead. This may fix some OOM intermittent crashes.
Differential Revision: https://phabricator.services.mozilla.com/D8547
--HG--
extra : moz-landing-system : lando
Fixes contrast issue of status code in webconsole by creating and importing StatusCode.css file into webconsole/index.html which contains the rules for styling the Status Code. Also imports the StatusCode.css file to netmonitor.css since status code styles are removed from RequestList.css.
Differential Revision: https://phabricator.services.mozilla.com/D9353
--HG--
extra : moz-landing-system : lando
Depends on D9648
Note that this is not strictly necessary since the set* methods are only called when
the Swatch tooltips are built, so they always operate on "new" HTML Tooltips. But
since this is not very self explanatory I think it will be less surprising to be
on the safe side and clear innerHTML in the methods directly.
Differential Revision: https://phabricator.services.mozilla.com/D9649
--HG--
extra : moz-landing-system : lando
This patch adds localization for the WebReplay Jump icon, and uses
the same terminology as the one used in the context menu that triggers
the same action.
The Jump button was used in-place of the existing level icons (Error, Warning, …),
and was only displayed when the message was hovered. We now ensure the
level icon is always visible and that we only show the Jump icon when the
message is hovered.
Finally, the button was styled targeting the title attribute in CSS, which
seemed a little brittle. We now use a dedicated class which should
be safer and more future proof.
Differential Revision: https://phabricator.services.mozilla.com/D8533
--HG--
extra : moz-landing-system : lando
- Removed common.css
- Re-ordered the loading of stylesheets, so components sheets are loaded _after_ the more generic rules
- Refactored some of our components into more generic ones.
Note that a few styles do not match exactly `common.css` (for instance, buttons' `min-height` and `min-width`), in favor of Photon. This might change later depending on the UX guidance we'll get eventually.
Differential Revision: https://phabricator.services.mozilla.com/D8970
--HG--
rename : devtools/client/aboutdebugging-new/aboutdebugging.css => devtools/client/aboutdebugging-new/src/base.css
extra : moz-landing-system : lando
Since we do now have the list of Javascript keywords, we
import it from webconsole autocomplete service and send
the keywords matching the current expression to the client.
Differential Revision: https://phabricator.services.mozilla.com/D8709
--HG--
extra : moz-landing-system : lando
This list is generated from /js/src/frontend/ReservedWords.h,
which is already used on the platform to generate list of js
reserved words.
This list will be used in the console autocomplete code to
expose those keywords to the user.
Differential Revision: https://phabricator.services.mozilla.com/D8998
--HG--
extra : moz-landing-system : lando
- Update 'Pick an element' icon with bigger arrow, background in active state
- Update 'Pick an accessible element' icon with pixel-fitted design, background in active state
- Update 'RDM' icon with background in active state
- Use context-stroke to enable design changes, instead of a different URL, to avoid a visual glitch
Differential Revision: https://phabricator.services.mozilla.com/D9113
--HG--
extra : moz-landing-system : lando
The log we currently receive are not really
actionable (we are using ok, so we don't know
what the received value actually is). Switching
to is should give us what the value is when the
test fails, which might help us fix the failure.
Differential Revision: https://phabricator.services.mozilla.com/D9270
--HG--
extra : moz-landing-system : lando
- Removed common.css
- Re-ordered the loading of stylesheets, so components sheets are loaded _after_ the more generic rules
- Refactored some of our components into more generic ones.
Note that a few styles do not match exactly `common.css` (for instance, buttons' `min-height` and `min-width`), in favor of Photon. This might change later depending on the UX guidance we'll get eventually.
Differential Revision: https://phabricator.services.mozilla.com/D8970
--HG--
rename : devtools/client/aboutdebugging-new/aboutdebugging.css => devtools/client/aboutdebugging-new/src/base.css
extra : moz-landing-system : lando
Doing this avoid loading the addons panel and doing its related requests,
which may still be pending after closing about:debugging.
MozReview-Commit-ID: LJjaE5YVgXi
Depends on D8867
Differential Revision: https://phabricator.services.mozilla.com/D8868
--HG--
extra : moz-landing-system : lando
Opening about:debugging may lead to pending listAddons requests.
Tests that open about:debugging should be careful to wait for the end
of these requests, which this test doesn't do.
MozReview-Commit-ID: 6YyfdW78kOS
Depends on D8828
Differential Revision: https://phabricator.services.mozilla.com/D8867
--HG--
extra : moz-landing-system : lando
hud.owner can be null in some condition, so we
need to guard the access to hud.owner.target.
Differential Revision: https://phabricator.services.mozilla.com/D9069
--HG--
extra : moz-landing-system : lando
The test is failing because the result of the last
evaluation is received before we expect it. Since we
had a 500ms delay between each promise resolution, it
might happen than the time it takes to execute the
command execedes this delay, making our expected message
order wrong.
Increasing the delay between each Promise resolution seems
to resolve the issue, although it makes the test a lot longer too.
This is why a new test was created to only cover the concurrent
await case.
Differential Revision: https://phabricator.services.mozilla.com/D8698
--HG--
rename : devtools/client/webconsole/test/mochitest/browser_jsterm_await.js => devtools/client/webconsole/test/mochitest/browser_jsterm_await_concurrent.js
extra : moz-landing-system : lando
When sending a command to the server, a timestamp is
computed before evaluating the string, and is then
sent back to the client in the packet.
However, if top-level await, or somme :commands, the
evaluation takes more time, which means the timestamp
is now innacurate.
For those cases, we update the timestamp before sending
the packet to the client.
Differential Revision: https://phabricator.services.mozilla.com/D8734
--HG--
extra : moz-landing-system : lando
This patch turns property access that would result in
Syntax error (e.g. `x.data-test`) into element access
(e.g. `x["data-test"]`) when accepting a completion
value in the console input.
In order to do that, we use Reflect to parse a custom
expression where we try to define the property the user
is going to accept. If this throws, this means we need to
modify the input into an element access.
A test is added to make sure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D8952
--HG--
extra : moz-landing-system : lando
The code we had to jump to the style-editor when a rule-view source link is clicked did
not make any distinction between multiple inline stylesheets. If you had many of them,
they would all have the same url (i.e. the url of the document, because they are
inline). And we were matching stylesheets in the style-editor by url, so we would
always select the first inline stylesheet.
This change makes use of the fact that the style-editor's selectStyleSheet function
also accept a StyleSheetFront object. When passing this object, there can be no
confusion, because they're all different.
Now, I'm only doing this for inlin stylesheets because other stylesheets have unique
urls and it's important to preserve the previous logic since source-maps may also be
involved.
I'm taking this opportunity to re-enable browser_rules_style-editor-link.js which had
been disabled a long time ago, and removing a part that just doesn't work anymore at
all apparently.
Differential Revision: https://phabricator.services.mozilla.com/D9093
--HG--
extra : moz-landing-system : lando
This preparatory work will be necessary to enable CSP for the new about
debugging.
Differential Revision: https://phabricator.services.mozilla.com/D8854
--HG--
extra : moz-landing-system : lando
The current iteration of the Fonts panel requires an instance of the Rules view
in order to get access to the element's rules.
In 2-pane mode, when the Fonts panel is the default (last used panel), the Rules
view is not yet instantiated. To guard against this, the Fonts panel makes a call
to ensure an instance of the Rules view is created (and with it a CSSRuleView object).
For some reason, the pageStyle wasn't immediately assigned to the CSSRuleView in
the constructor. The constructor signature shows that pageStyle can be passed in as a
param, but this never happens. There's only one usage of `new CSSRuleView()`.
The pageStyle exist on the inspector instance passed in to the CSSRuleView.
This patch ensures that the CSSRuleView makes use of the PageStyleFront instance
from the inspector and removes the unused param from the constructor.
Perhaps it's better for the Fonts panel to manage its own ElementStyle instance to
get access to the element's selected rules. But in the interest of time, since the
merge date is soon, I'd rather have this fix in quikcly now and keep the dependency
to a Rules view instance with the promise to revisit the Fonts panel architecture and
remove this dependency during the Firefox 65 Nightly cycle.
Differential Revision: https://phabricator.services.mozilla.com/D9002
--HG--
extra : moz-landing-system : lando
The use of <iframe mozbrowser> in test_saveHeapSnapshot_e10s_01.html has
implicitly depended on the "network.disable.ipc.security" pref set to
false, which is the default for desktop and not applicable for Fennec.
With the new mobile test harness, this pref needs to be set explicitly
by the test.
Differential Revision: https://phabricator.services.mozilla.com/D7786
--HG--
extra : moz-landing-system : lando
Before this patch, in developer console, enabling persist log, message displayed "Navigated to" ..something was not distinguishable from console.log messages. Now specific class for navigation marker is added.
Differential Revision: https://phabricator.services.mozilla.com/D7040
--HG--
extra : moz-landing-system : lando
This patches solves 2 issues:
- it doesn't return any result when the user is trying to
perform a variable, function or class declaration (e.g.
var d).
- js-property-provider used to compute the last statement
by only looking for space or ; chars. But there are a lot
of cases (basically each time using an operator), where we
should return results and we weren't.
Test cases are added to cover those fixes.
Differential Revision: https://phabricator.services.mozilla.com/D8968
--HG--
extra : moz-landing-system : lando
On the server, when looking for a flex container for a node, we were bailing
out if the displayType of the node was null. It was null for pseudo-elements.
This value was returned by the displayType getter in the NodeActor class.
Now, the reason for this dates to 4 years ago in bug 1139937 where trying to
get the display style of a pseudo-element was done in a way to failed. So we
just decided to return null at that point. It doesn't fail anymore, we're
able to return, say, "block" if a pseudo-element has a display:block style.
So I've removed the checks that returned null and that fixed the issue here.
The other part of the fix that was need is in the FlexItemActor class on the
server too. This class can be created for a pseudo-element too.
It accesses element.style without checking if that property exists. However it
does not exist for pseudo-elements. So we needed to add a check for that.
It's not a problem to just skip it in this case because pseudo-elements can't
have inline styles.
Differential Revision: https://phabricator.services.mozilla.com/D8873
--HG--
extra : moz-landing-system : lando
Depends on D8334.
In this changeset we also change the way we are reading the preferences
in adb-addon.js to avoid caching the value of the preference the first
time the module is loaded.
This allows the module to follow updates of said preferences without
having to restart Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D8335
--HG--
extra : moz-landing-system : lando
Maybe we want to land the simplest solution for now and discuss
quickly how to style the message to reduce confusion in a follow up?
Differential Revision: https://phabricator.services.mozilla.com/D8334
--HG--
extra : moz-landing-system : lando
Depends on D8334.
In this changeset we also change the way we are reading the preferences
in adb-addon.js to avoid caching the value of the preference the first
time the module is loaded.
This allows the module to follow updates of said preferences without
having to restart Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D8335
--HG--
extra : moz-landing-system : lando
Maybe we want to land the simplest solution for now and discuss
quickly how to style the message to reduce confusion in a follow up?
Differential Revision: https://phabricator.services.mozilla.com/D8334
--HG--
extra : moz-landing-system : lando
For now, the options panel was calling `attach` to know if the javascript was disabled
on the debugged document. But this property is already cached during the `attach`
request done by the toolbox.
MozReview-Commit-ID: JcDT6vxCUzN
Depends on D8851
Differential Revision: https://phabricator.services.mozilla.com/D8852
--HG--
extra : moz-landing-system : lando
A function was missing in the serviceContainer stub,
and the console.trace with params test needed a
Provider wrapper to work with the latest changes made
to the ObjectInspector.
Differential Revision: https://phabricator.services.mozilla.com/D8861
--HG--
extra : moz-landing-system : lando