Depends on D18706
Follow up for D18704. Adds xpcshell unit test to check that stylesheets are genereated in the expected formats for single or deeply nested CSS rules.
Differential Revision: https://phabricator.services.mozilla.com/D18860
--HG--
extra : moz-landing-system : lando
Depends on D18704
Adds a new option to the context menu to copy the changes for a rule as valid CSS text.
Removed properties are commented out. Added properties are used as-is. Style source information is listed as a code comment above the CSS rule.
Makes use of the new Redux selector introduced in Part 2 (see D18704) to build a stylesheet text with the changes per-rule. That will be reused for copying all changes per-stylesheet.
Moves the copy text selection handler out to the ChangesView to co-locate it with other (upcoming) copy actions.
Adds data-ruleid and data-sourceid to DOM elements to help match the target element to the rule/source in the Redux store.
Differential Revision: https://phabricator.services.mozilla.com/D18706
--HG--
extra : moz-landing-system : lando
Depends on D18703
Adds a new selector method to build the CSS text for a stylesheet with the aggregated changes for one or more rules.
Makes use of the filtering capabilities introduced in Part 1.
Differential Revision: https://phabricator.services.mozilla.com/D18704
--HG--
extra : moz-landing-system : lando
The diff for this change looks needlessly scary. The only material change is the introduction of the `filter` parameter to the `getChangesTree()` selector to restrict the output to a subtree that includes only the martching rules and sources provided in as arrays of ids in the `filters` argument.
The sources and rules are filtered, if any corresponding ids are provided, then the same logic to build the tree is used.
The meaningful blocks of code introduced are:
```
.filter(([sourceId, source]) => {
// Use only matching sources if an array to filter by was provided.
if (sourceIdsFilter.length) {
return sourceIdsFilter.includes(sourceId);
}
return true;
})
```
introduced right after `Object.entries(state)`
and
```
.filter(([ruleId, rule]) => {
// Use only matching rules if an array to filter by was provided.
if (rulesIdsFilter.length) {
return rulesIdsFilter.includes(ruleId);
}
return true;
})
```
introduced right after `Object.entries(rules)`.
Adding a newline confused the diff algorithm to consider that much bigger changes have occurred.
Introducing these filtering options lays the ground work for building subtrees of changes per-rule and per-stylesheet to be copied to the clipboard or saved as a file.
Differential Revision: https://phabricator.services.mozilla.com/D18703
--HG--
extra : moz-landing-system : lando
There was quite some file that was required directly
but that may not be used until later (or maybe never),
which means we were doing extra work.
Lazily loading those files seems to improve opening
time significantly.
Differential Revision: https://phabricator.services.mozilla.com/D18819
--HG--
extra : moz-landing-system : lando
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).
Differential Revision: https://phabricator.services.mozilla.com/D18132
--HG--
extra : moz-landing-system : lando
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.
There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.
Differential Revision: https://phabricator.services.mozilla.com/D16492
--HG--
extra : moz-landing-system : lando
Replaces custom generated hashes with the actorIDs which are stable
during the editing session enough to use as unique identifiers.
For future restore / persistence, we still have the metadata about each
rule and stylesheet to attempt to identify them again.
Differential Revision: https://phabricator.services.mozilla.com/D18660
--HG--
extra : moz-landing-system : lando
This gives a very noticable increase in speed. When Brad finishes https://bugzil.la/1523336 we can stop walking the DOM and simply use `parentFlexElement` and `parentGridElement`.
Differential Revision: https://phabricator.services.mozilla.com/D18674
--HG--
extra : moz-landing-system : lando
I would have thought that the anonymous node fix would also have fixed this but we have had to manually add the before and after pseudo elements.
Differential Revision: https://phabricator.services.mozilla.com/D18536
--HG--
extra : moz-landing-system : lando
Removes the toggle filter button and makes the filter buttons toolbar permanently shown. At the same time removes relevant entries from actions/reducers. Also updates some tests which relied on showing and hiding the filter buttons toolbar. Also amends an unrelated test which relied on the non-presence of the filter buttons toolbar.
Differential Revision: https://phabricator.services.mozilla.com/D18504
--HG--
extra : moz-landing-system : lando
Adds a new `disabled` property to the Font Editor Redux store applicable to all input fields.
When inspecting a pseudo-element, this `disabled` property is set to true.
This allows the pseudo-element to be inspected, but prevents editing font property values because it's currently not possible to write them back to CSS rules other than element inline styles.
Differential Revision: https://phabricator.services.mozilla.com/D18364
--HG--
extra : moz-landing-system : lando
We were registering these key shortcut twice.
A first time from devtools-startup.js and another time from Toolbox.
Both shortcut listeners were called when the toolbox was running,
leading the toolbox to reopen while we were expecting it to be closed.
Depends on D17610
Differential Revision: https://phabricator.services.mozilla.com/D18097
--HG--
extra : moz-landing-system : lando
When destroying the target, Target.destroy (for local tabs) only calls DebuggerClient.close,
which isn't going to call `detach`. But we still do need to unregister
the tabNavigated/frameUpdate listener to prevent unecessary event from firing.
Depends on D17609
Differential Revision: https://phabricator.services.mozilla.com/D17610
--HG--
extra : moz-landing-system : lando