Given that `CssProperties.isValidOnClient()` does only a client-side check for support of a CSS declaration, we can leverage the built-in `CSS.supports()` method and remove some of the inter-dependencies between the `CssProperties` object from the `CssPropertiesFront` and its consumers, `OutputParser` and `FilterWidget`.
Differential Revision: https://phabricator.services.mozilla.com/D37751
--HG--
extra : moz-landing-system : lando
We take this as an opportunity to add tests for `align-self` as well.
This requires the test to change a bit so we can create more than one
element in order to test the inactive property helper on grid/flex item
(i.e. with a parent flex/grid container).
This is done by providing a `createTestElement` function in the test case,
that creates whatever nodes it need and append it in the rootNode parameter.
The function then returns the element that needs to be tested with isPropertyUsed.
Differential Revision: https://phabricator.services.mozilla.com/D34714
--HG--
extra : moz-landing-system : lando
The inactive CSS feature is only enabled in Nightly at
the moment, which is what's causing the test to fail
on beta simulation.
Forcing the pref to true in the test should fix the issue.
Differential Revision: https://phabricator.services.mozilla.com/D34847
--HG--
extra : moz-landing-system : lando
This should make the test more managable as we add properties
validators in InactivePropertyHelper.
eslint doesn't support dynamic import yet, so we have to ignore
the test file.
Differential Revision: https://phabricator.services.mozilla.com/D34677
--HG--
rename : devtools/server/tests/mochitest/test_inspector-inactive-property-helper.html => devtools/server/tests/mochitest/inactive-property-helper/gap.js
rename : devtools/server/tests/mochitest/test_inspector-inactive-property-helper.html => devtools/server/tests/mochitest/inactive-property-helper/max-min-width-height.js
rename : devtools/server/tests/mochitest/test_inspector-inactive-property-helper.html => devtools/server/tests/mochitest/inactive-property-helper/vertical-align.js
extra : moz-landing-system : lando
Element.nodeName is usually all-caps, and we were testing lower cased version,
which brought erroneous results.
The test wasn't picking those errors because we were creating the element from
a XHTML document, where Element.nodeName keep the casing used for their creation.
The test is modified to deal with an HTML document instead.
After the test was modified, I could see it was failing, and was then able to
do the actual feature fix.
Differential Revision: https://phabricator.services.mozilla.com/D34149
--HG--
rename : devtools/server/tests/browser/browser_inspector-inactive-property-helper.js => devtools/server/tests/mochitest/test_inspector-inactive-property-helper.html
extra : moz-landing-system : lando
- Removes the hardcoded references from `index.xhtml` and `rules.js` and uses a centralized list of pseudo-classes to generate the checkboxes for the supported pseudo-class locks at runtime.
- Streamlines the handling for pseudo-class locks state. Fixes Bug 1536676 as a side-effect.
- Updates tests.
Differential Revision: https://phabricator.services.mozilla.com/D32867
--HG--
extra : moz-landing-system : lando
`isInherited` is a callback function that checks if a given CSS property is inherited. It is misleadingly commented as a cache of inherited properties (which perhaps it is on the InspectorUtils implementation, but on the consumer side it is just a function).
The actual call is done by InspectorUtils.isPropertyInherited. There is no need to pass the handler to CssLogic or to CssPropertyInfo since InspectorUtils is available in the same context as the definition of the consumers.
There is no other use case where a custom handler is passed to check for inherited properties in so it is safe to remove this as an argument and just use InspectorUtils.isPropertyInherited where needed. This cleans up the code slightly.
Differential Revision: https://phabricator.services.mozilla.com/D32016
--HG--
extra : moz-landing-system : lando
The only fishy bit is the animation stuff. In particular, there are two places
where we just mint the revert behavior:
* When serializing web-animations keyframes (the custom properties stuff in
declaration_block.rs). That codepath is already not sound and I wanted to
get rid of it in bug 1501530, but what do I know.
* When getting an animation value from a property declaration. At that point
we no longer have the CSS rules that apply to the element to compute the
right revert value handy. It'd also use the wrong style anyway, I think,
given the way StyleBuilder::for_animation works.
We _could_ probably get them out of somewhere, but it seems like a whole lot
of code reinventing the wheel which is probably not useful, and that Blink
and WebKit just cannot implement either since they don't have a rule tree,
so it just doesn't seem worth the churn.
The custom properties code looks a bit different in order to minimize hash
lookups in the common case. FWIW, `revert` for custom properties doesn't seem
very useful either, but oh well.
Differential Revision: https://phabricator.services.mozilla.com/D21877
--HG--
extra : moz-landing-system : lando
When reviewing https://bugzilla.mozilla.org/show_bug.cgi?id=1521052 I did not think about Firefox for Android which is not using e10s.
This means the main DebuggerServer will be killed when there are no connections left. Happy to discuss more about the preferred solution.
This is a regression in 66 and I hope to uplift a fix for this.
Differential Revision: https://phabricator.services.mozilla.com/D20830
--HG--
extra : moz-landing-system : lando
Any time we QI to nsIFrameLoaderOwner in tests, we're really accessing
a MozFrameLoader. We don't need to be doing that anymore.
Differential Revision: https://phabricator.services.mozilla.com/D19727
--HG--
extra : moz-landing-system : lando
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
We never really tried to cleanup the DebuggerServer and so a few tests require some tweaks
to acknowledge that once the last connection drop (typically, we close the toolbox or target),
the server is destroyed and dynamically registered actors are also destroyed.
I think it is great to consider that everything is cleaned up as we may followup to destroy
the whole loader.
Depends on D16961
Differential Revision: https://phabricator.services.mozilla.com/D16962
--HG--
extra : moz-landing-system : lando
These tests were using chrome mochitest which forces the test page to be running in chrome and in parent process.
This doesn't reflect typical setup where the page runs unprivileged in content process.
Also, with the current bug, the pages running in system principal will be debugged with a special setup.
Actors will be run with modules loaded in a distinct loader in order to be executed
in a distinct compartment, distinct from the shared system principal compartment.
That a prerequisite for the Debugger API. It has to run in a distinct compartment than its debuggee.
Depends on D16825
Differential Revision: https://phabricator.services.mozilla.com/D16826
--HG--
rename : devtools/server/tests/mochitest/animation-data.html => devtools/server/tests/browser/animation-data.html
rename : devtools/server/tests/mochitest/test_inspector-mutations-childlist.html => devtools/server/tests/browser/browser_inspector-mutations-childlist.js
rename : devtools/server/tests/mochitest/inspector-helpers.js => devtools/server/tests/browser/inspector-helpers.js
extra : moz-landing-system : lando
This test was using chrome mochitest which forces the test page to be running in chrome and in parent process.
This doesn't reflect typical setup where the page runs unprivileged in content process.
Also, with the current bug, the pages running in system principal will be debugged with a special setup.
Actors will be run with modules loaded in a distinct loader in order to be executed
in a distinct compartment, distinct from the shared system principal compartment.
That a prerequisite for the Debugger API. It has to run in a distinct compartment than its debuggee.
Depends on D16824
Differential Revision: https://phabricator.services.mozilla.com/D16825
--HG--
extra : moz-landing-system : lando
With same-compartment chrome globals these would end up in the same compartment.
We need to prevent that because the debugger doesn't support it.
Differential Revision: https://phabricator.services.mozilla.com/D15093
--HG--
extra : moz-landing-system : lando
This will help getting rid of another usage of Target.form.
And also helps instantiating only one WebConsole client.
Once WebConsole becomes a front, we can replace all the target.activeTab
to target.getFront("console").
Differential Revision: https://phabricator.services.mozilla.com/D14278
--HG--
extra : moz-landing-system : lando