### 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
Now that form argument is no longer used by any front to set its actor ID,
we can remove this argument.
Have a particular look at:
* devtools/client/shared/test/test-actor-registry.js
which was the last Front to be manually instantiated and need some tweaks,
* canvas head.js to create canvas front via getFront,
* RDM manager.js, which requires the EmulationFront to be self managed.
Depends on D17615
Differential Revision: https://phabricator.services.mozilla.com/D17616
--HG--
extra : moz-landing-system : lando
Use the getBoxQuads's relativeTo option to avoid having to calculate the offset
due to frames.
Also reduce the precision of numbers used when checking if the highlighter is
correctly displayed.
Finally, for some strange reasons, this patch seems to cause a totally unrelated
events mutation event to be sent during the test. This polutes the mutations
received and made the test fail. So I filtered the list of mutations to only
preserve the ones we care about here.
I could not reproduce this extra mutation when running Firefox. Only during the
test. So I did not investigate further.
MozReview-Commit-ID: 1ZQ6FGULjHG
--HG--
extra : rebase_source : 6406571849afb1d3dcec176f68ef4d3d122a1abf
For pseudo elements, inIDOMUtils.getCSSStyleRules needs to take the parent
element of the pseudo element and pseudo name. This new function wraps
inIDOMUtils.getCSSStyleRules so that we can get style rules for pseudo elements
handy.
MozReview-Commit-ID: LRQBdiizoL7
--HG--
extra : rebase_source : ca409443da52d25630f52052aabf508ee79a6bd1
Also convert markers to SVG path to better handle zoom
MozReview-Commit-ID: 8h9WWOLvFfG
--HG--
extra : rebase_source : 338155d2420183b17b9507b1fbedc7bda307d16b
This patch is fixing the issue mostly for 1dppx / 1dpi display.
For higher dpi a follow-up bug will be made once bug 1345917 and bug 1151421
are fixed; and it will be part of bug 1187970.
MozReview-Commit-ID: 7XuED9ydGvB
--HG--
extra : rebase_source : 3d47ee5c7c7a60f712fe23072bb8686eac0b8dc8
- Used `position: absolute` instead of `position: fixed` whenever was possible.
- Updated utility functions and auto-refresh base class to consider the scrolled
values in root document and scrollable elements.
MozReview-Commit-ID: 6evdOrfj74z
--HG--
extra : rebase_source : 84ca648ce0e3ba32d11baaa910ac2f7e5ec90e52
When the inspector actor walks the DOM in order to find nodes to be
displayed in the inspector panel, it ignores text nodes that contain
only whitespace characters (in order to avoid cluttering the panel with
useless information).
This commit changes this logic so that whitespace text nodes are only
ignored when the node in fact has no layout at all (all text collapsed).
Inside inline formatting contexts, whitespace text nodes may have layout
and therefore push elements further apart. So seeing these nodes in the
panel actually help debugging issues.
MozReview-Commit-ID: GvNMsqsT3w6
--HG--
extra : rebase_source : 5c04eaf9e19e952d9f6ca267ef835e1846bc7f4a
This adds a few new CSS selectors that are used to move the label to the
top and/or left/right of the eyedropper canvas.
The CSS rules use transform and a quick transition.
The eyedropper highlighter then just makes use of this by adding top, left,
right attributes to the DOM depending on its position.
This also adds a test for this, and while testing, I discovered a bug in
shared/layout/utils.js that I fixed here too. Sometimes, the node passed is
actually a DOCUMENT_NODE and so we must account for this in a couple of places
in this file to avoid JS errors.
MozReview-Commit-ID: H969k3mEDJE
MozReview-Commit-ID: 9qOCYVp4mld
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.
To generate this patch, I ran:
./mach eslint devtools --no-ignore --fix
After this, I reverted any changes to third party files that we really do want
to ignore.
MozReview-Commit-ID: 6Q8BApkAW20
Bail out from the markup view onKeyDown handler if any modifier is currently
true. All shortcuts specified in this handler are intended to be used without
modifier, so for now this approach is fine.
Added a test checking the use case mentioned in Bug 1230325, with the S
shortcut. In order to write the test, had to create an additional method on
the test actor to be able to wait for events in the window of the content process.
MozReview-Commit-ID: 67icou0HkfA
--HG--
extra : rebase_source : e7235c487134505563cae3c5ac8bdabd42dc4363
testing/marionette/EventUtils.js has been converted to a JS module in
testing/marionette/event.js and its API has changed. It was originally
a copy of testing/mochitest/tests/SimpleTest/EventUtils.js, and it should
be fine to use the original instead.
MozReview-Commit-ID: Exi9d5rEeOz
--HG--
extra : histedit_source : 999974c56edeecb1313d2b1050c8911473c02292
extra : rebase_source : 77656e161e67423cd44d2071e4118e824cc64363
extra : commitid : 5SGljZj56xm
extra : source : 18d54b8d4ae8348d62070b57574858f0824474ad
extra : amend_source : 968c4d6c4959f5ba502b846294aabe40296d6541
testing/marionette/EventUtils.js has been converted to a JS module in
testing/marionette/event.js and its API has changed. It was originally
a copy of testing/mochitest/tests/SimpleTest/EventUtils.js, and it should
be fine to use the original instead.
MozReview-Commit-ID: Exi9d5rEeOz
--HG--
extra : commitid : 5SGljZj56xm
extra : rebase_source : fef01fe432241303c73f22425ddec18dc2a9a3a4
extra : amend_source : 968c4d6c4959f5ba502b846294aabe40296d6541
extra : histedit_source : 597b6ac1196966911fa5925cfb95cfdb2cdc6bf7