Граф коммитов

138 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Chevobbe 925311bc77 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300

--HG--
extra : moz-landing-system : lando
2019-08-19 12:48:16 +00:00
Maliha Islam 0a8eb5c95e Bug 1568053 - Create node actor method for getting complex bg color data for text nodes and refactor existing contrast calculation methods, r=yzen,gl
Differential Revision: https://phabricator.services.mozilla.com/D40086

--HG--
extra : moz-landing-system : lando
2019-08-16 00:55:26 +00:00
yulia 84b0e082f1 Bug 1560200 - Implement very basic markup view support traversing remote frames via resource api. r=ochameau,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D39525

--HG--
extra : moz-landing-system : lando
2019-08-13 11:54:06 +00:00
Brendan Dahl b474db77c6 Bug 1551344 - Part 1: Remove XULDocument code. r=smaug,Jamie
All .xul files have been loading as HTMLDocuments for a few weeks now, so
it should be safe to remove the XULDocument implementation.

Differential Revision: https://phabricator.services.mozilla.com/D41238

--HG--
extra : moz-landing-system : lando
2019-08-09 19:57:50 +00:00
Logan Smyth 19df4a9319 Bug 1550031 - Part 4: Manage DOM Mutation breakpoints in the toolbox. r=jlast,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D39898

--HG--
extra : moz-landing-system : lando
2019-08-09 01:28:21 +00:00
Logan Smyth 5c440e493a Bug 1550031 - Part 2: Update mutation breakpoint data on DOM Node removal. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D40717

--HG--
extra : moz-landing-system : lando
2019-08-09 01:27:26 +00:00
Logan Smyth 75676e23ac Bug 1550031 - Part 1: Clear DOM Mutation Breakpoint state on frame navigation. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D40333

--HG--
extra : moz-landing-system : lando
2019-08-09 01:26:58 +00:00
Victor Porof 24d2c75470 Bug 1561435 - Format devtools/server/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35891

--HG--
extra : source : d2dc183b9bf9086d4b862e0e9a0cfa0bf773193f
2019-07-05 11:26:00 +02:00
Logan Smyth e572b4c130 Bug 1561707 - Support excluding listeners from the event collector list. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D36076

--HG--
extra : moz-landing-system : lando
2019-06-27 06:23:54 +00:00
Gabriel Luong 1aa241f2d1 Bug 1550030 - Part 1: Implement the DOM mutation breakpoint context menu items in the markup view. r=loganfsmyth,jdescottes
This implements the context menu items for the DOM mutation breakpoint.
In addition, there were some server changes to:
- Update the mutationBreakpoints form for the NodeActor
- Expose the mutationBreakpoints form
- Moved the setMutationBreakpoints method from the Node spec to Walker spec
since the Node spec only consisted of getter methods. It made more sense
that the setter went into the Walker spec to be more consistent with how
the Walker and Node spec have been arranged.

Unit tests will be followed up in Part 2 immediately.

Differential Revision: https://phabricator.services.mozilla.com/D36074
2019-06-26 15:16:22 -04:00
Logan Smyth 76d6b8f5c2 Bug 1550835 - DOM mutation breakpoint server API. r=jlast,gl
Differential Revision: https://phabricator.services.mozilla.com/D33528

--HG--
extra : moz-landing-system : lando
2019-06-26 06:23:03 +00:00
Thomas e4fd1c3d23 Bug 1521188 - Indicate grid/flex container/item in infobar highlighter. r=pbro
Indicate in the infobar highlighter if the element is of kind grid or flex, and if it is a container or an item.

Differential Revision: https://phabricator.services.mozilla.com/D29964

--HG--
extra : moz-landing-system : lando
2019-06-10 17:09:56 +00:00
Razvan Caliman 89a6536b37 Bug 1555064 - (Part 2) Centralize the list of supported pseudo-classes. r=gl
Depends on D32867

Reference the shared list of pseudo-elements throughout the codebase:
- markup view context menu + test
- Rule editor
- box model highlighter
- node actor
- new Rules view

Differential Revision: https://phabricator.services.mozilla.com/D32868

--HG--
extra : moz-landing-system : lando
2019-05-30 16:14:53 +00:00
Yura Zenevich f46fa84727 Bug 1556135 - only check if the current node is null in getClosestBackgroundImage. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D33396

--HG--
extra : moz-landing-system : lando
2019-06-01 23:16:01 +00:00
Gabriel Luong debbd4220d Bug 1468402 - Part 1: Add isSubgrid to the grid actor form and getParentGridNode to the walker. r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D29317
2019-04-30 00:50:47 -04:00
Patrick Brosset a365f19d19 Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139

--HG--
extra : moz-landing-system : lando
2019-05-23 09:06:16 +00:00
Mihai Alexandru Michis 2ae5a4bb01 Backed out changeset 0f9626b48a66 (bug 1553451) for linting failures. CLOSED TREE 2019-05-23 10:58:22 +03:00
Patrick Brosset 28f446d619 Bug 1553451 - Lower the eslint complexity level to 20 for devtools and exlude more complex functions; r=jdescottes
We want to go back to ESLint's default complexity level so that newly introduced code is checked for complexity.
At the same time, to make that work, we're excluding all of the more complex functions for now.
We should fix them: make them less complex, and remove the eslint-disable comment.
See bug 1553449 for more information about this.

Differential Revision: https://phabricator.services.mozilla.com/D32139

--HG--
extra : moz-landing-system : lando
2019-05-23 07:07:49 +00:00
Razvan Caliman 915619d9c1 Bug 1553194 - Remove unnecessary isInherited from CssLogic constructor. r=pbro
`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
2019-05-22 07:34:03 +00:00
Brian Hackett e3e30e99e4 Bug 1542659 Part 2 - Remove unnecessary ReplayInspector instrumentation, r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D26452

--HG--
extra : rebase_source : 596c0dbe2f29ab74d1253aeeb0e73e666a69c34a
2019-04-07 16:02:04 -10:00
Brian Hackett f4af857cef Bug 1497393 Part 7 - Server side changes for inspector support while replaying, r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D22863

--HG--
extra : rebase_source : 1069a8534dd79e1d2cf309c9d3f3c27079077087
extra : histedit_source : 1a750a022d46da836181f913d012081ea608da7f
2019-03-09 16:45:50 -10:00
Ian Moody da57ddce6d Bug 1539265 - Make ::marker pseudo-elements always visible in the markup view. r=jdescottes,mbalfanz,pbro
Instead of only when setting devtools.inspector.showAllAnonymousContent.

Differential Revision: https://phabricator.services.mozilla.com/D25166

--HG--
extra : moz-landing-system : lando
2019-04-02 07:36:27 +00:00
Ian Moody fdb2b8f412 Bug 1539265 - Add ::marker to the list of suggested pseudo selectors. r=jdescottes
For autocompletion of : in selector contexts, like the Style Editor.

Differential Revision: https://phabricator.services.mozilla.com/D25110

--HG--
extra : moz-landing-system : lando
2019-04-02 07:46:09 +00:00
Ian Moody 85f74da0e4 Bug 1539265 - Add a few optimisations for ::marker pseudos. r=jdescottes
Where there is existing for ::before and ::after.

Differential Revision: https://phabricator.services.mozilla.com/D25107

--HG--
extra : moz-landing-system : lando
2019-04-02 07:45:53 +00:00
Ian Moody 53e960c394 Bug 1539265 - Add isMarkerPseudoElement function to layout/utils.js. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D25105

--HG--
extra : moz-landing-system : lando
2019-04-02 07:45:38 +00:00
Ian Moody 71b7e1fa5d Bug 1539265 - Handle ::marker pseudo-elements in css-logic.js, so their rules show in the rule view. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D25071

--HG--
extra : moz-landing-system : lando
2019-04-02 07:45:31 +00:00
Ian Moody 34c44989b0 Bug 1539265 - Handle ::marker pseudo-elements on shadow roots in walker.js. r=jdescottes
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
2019-04-02 07:45:16 +00:00
arthur.iakab cf3b3f1eb5 Backed out 11 changesets (bug 1539265) for causing debugger failures CLOSED TREE
Backed out changeset 8206b880f9ec (bug 1539265)
Backed out changeset be9f5f73bdfe (bug 1539265)
Backed out changeset f78146b8aa17 (bug 1539265)
Backed out changeset 18fa7e971a0d (bug 1539265)
Backed out changeset 6eaf5bdd945c (bug 1539265)
Backed out changeset 3add7d4d4853 (bug 1539265)
Backed out changeset 8015aeb5279d (bug 1539265)
Backed out changeset 19c8e404ac5f (bug 1539265)
Backed out changeset 637a9d6af0f3 (bug 1539265)
Backed out changeset 72bbb4b28932 (bug 1539265)
Backed out changeset 931e98129878 (bug 1539265)
2019-04-02 02:44:43 +03:00
Ian Moody f49fd7257c Bug 1539265 - Make ::marker pseudo-elements always visible in the markup view. r=jdescottes,mbalfanz,pbro
Instead of only when setting devtools.inspector.showAllAnonymousContent.

Differential Revision: https://phabricator.services.mozilla.com/D25166

--HG--
extra : moz-landing-system : lando
2019-04-01 21:46:11 +00:00
Ian Moody c7a42da3f6 Bug 1539265 - Add ::marker to the list of suggested pseudo selectors. r=jdescottes
For autocompletion of : in selector contexts, like the Style Editor.

Differential Revision: https://phabricator.services.mozilla.com/D25110

--HG--
extra : moz-landing-system : lando
2019-04-01 21:45:59 +00:00
Ian Moody 76dd66e399 Bug 1539265 - Add a few optimisations for ::marker pseudos. r=jdescottes
Where there is existing for ::before and ::after.

Differential Revision: https://phabricator.services.mozilla.com/D25107

--HG--
extra : moz-landing-system : lando
2019-04-01 21:45:44 +00:00
Ian Moody addac983bb Bug 1539265 - Add isMarkerPseudoElement function to layout/utils.js. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D25105

--HG--
extra : moz-landing-system : lando
2019-04-01 21:45:33 +00:00
Ian Moody 8e985aa314 Bug 1539265 - Handle ::marker pseudo-elements in css-logic.js, so their rules show in the rule view. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D25071

--HG--
extra : moz-landing-system : lando
2019-04-01 21:45:28 +00:00
Ian Moody 979334b420 Bug 1539265 - Handle ::marker pseudo-elements on shadow roots in walker.js. r=jdescottes
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
2019-04-01 21:45:23 +00:00
Michael Ratcliffe 639bed7bb2 Bug 1509620 - Computed style inspector CSS cascade calculation is wrong r=ladybenko
### 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
2019-03-25 16:32:19 +00:00
Julian Descottes fda43987c4 Bug 1537877 - Update getDocumentWalker to fallback to non-anonymous walker;r=pbro
Except for rawParentNode, all consumers of getDocumentWalker should be ok with this fallback.

Differential Revision: https://phabricator.services.mozilla.com/D24414

--HG--
extra : moz-landing-system : lando
2019-03-22 19:43:08 +00:00
Michael Ratcliffe cffcfc6b1c Bug 1535661 - Fix CORS issues in Markup Panel r=pbro
One change is in `node.js::isScrollable()` so I decided to assign this to you for review. Feel free to re-assign as you feel appropriate if you don't have time.

### Try

https://treeherder.mozilla.org/#/jobs?repo=try&revision=2e2f20af3f902ea65436bcfd288b3e075d6508f8

Differential Revision: https://phabricator.services.mozilla.com/D23803

--HG--
extra : moz-landing-system : lando
2019-03-18 09:22:50 +00:00
Brian Hackett 7bdab9da0c Bug 1531826 Part 1 - View event handler sources by ID, r=ochameau.
--HG--
extra : rebase_source : 372a529e62b35c985ec8c1bc49ca33e2003fe3a4
2019-03-04 05:45:19 -10:00
Alexandre Poirot e81a254114 Bug 1532237 - Use a Debugger loaded in a distinct compartment when debugging chrome in the event collector codebase. r=miker
Now that the server is by default loaded in the shared system compartment,
we have to special cases the code debugging system compartments.
When devtools.chrome.enabled is turned on, the event collector is
inspecting the system compartment's event listener.
In this case, we are using a special Debugger instance loaded in
a sandbox flagged with invisibleToDebugger=true. This forces loading it
in a distinct compartment and helps the debugger know about the boundaries
between debugger and debuggee code.
It should be safe to only load the Debugger and not the whole server here
as event collector is only inspecting and doesn't register any callback on
the Debugger API.

Differential Revision: https://phabricator.services.mozilla.com/D22070

--HG--
extra : moz-landing-system : lando
2019-03-05 14:58:05 +00:00
Michael Ratcliffe 11f246e18a Bug 1042082 - Chrome event bubbles are displayed when they shouldn't be r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D18358

--HG--
extra : moz-landing-system : lando
2019-02-22 11:17:02 +00:00
Michael Ratcliffe 6bb1561edd Bug 1525484 - React events with undefined handlers can break the markup view r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D19378

--HG--
extra : moz-landing-system : lando
2019-02-11 16:23:55 +00:00
Michael Ratcliffe 991e8e8313 Bug 1523335 - Make use of parentFlexElement in Flexbox inspector r=pbro
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`.

#### Try

https://treeherder.mozilla.org/#/jobs?repo=try&revision=47d38f2c7dca6ca764862c8b00921644a974a975&group_state=expanded

Differential Revision: https://phabricator.services.mozilla.com/D18674

--HG--
extra : moz-landing-system : lando
2019-02-06 17:35:20 +00:00
Cosmin Sabou 3a072e9701 Backed out changeset 8a5155bd8809 (bug 1523335) for devtools failures on browser_rules_gridline-names-autocomplete. CLOSED TREE
--HG--
extra : rebase_source : 457608e6d006784e27979af139c905c6b165913b
2019-02-05 20:45:03 +02:00
Michael Ratcliffe 55b170fc51 Bug 1523335 - Make use of parentFlexElement in Flexbox inspector r=pbro
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
2019-02-05 16:53:22 +00:00
Michael Ratcliffe 7dce60ec8b Bug 1524097 - Devtools Inspector doesn't show any nodes (besides `<html>`) for LinkedIn pages r=rcaliman
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
2019-02-04 16:57:10 +00:00
Michael Ratcliffe ed1053338d Bug 1522809 - Nodes with `name="attributes"` break the markup view r=rcaliman
This is another very specific issue.

If you have `<img name="attributes"/>` in the dom then `document.attributes` will return the `<img>` tag.

In the source we bail if `!this.rawNode.attributes` but if we are on the document node this returns the image tag. Because the image tag is not a `NamedNodeMap` trying to iterate over the tag throws the error.

There is a test file [here](https://bugzilla.mozilla.org/attachment.cgi?id=9040577).

Differential Revision: https://phabricator.services.mozilla.com/D18340

--HG--
extra : moz-landing-system : lando
2019-02-01 14:03:44 +00:00
Michael Ratcliffe 26180c13f0 Bug 1524005 - Inspect Element throwing on Anonymous nodes and content missing from Markup view r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D18106

--HG--
extra : moz-landing-system : lando
2019-01-31 13:00:34 +00:00
Michael Ratcliffe 54775deef8 Bug 1522404 - Refactor devtools/server/actors/inspector/event-parsers.js to use ES6 classes r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D17651

--HG--
rename : devtools/server/actors/inspector/event-parsers.js => devtools/server/actors/inspector/event-collector.js
extra : moz-landing-system : lando
2019-01-29 17:30:57 +00:00
Alexandre Poirot 4199139118 Bug 1515862 - Remove detail feature from protocol.js. r=jdescottes
This feature is only used by node and domrulestyle actors and that, only for actor ID.
Instead of this, support this "pass only actor ID rather than full form" feature
in a more dedicated way.

We might followup on that to clarify/simplify doing this: passing only the actor ID
rather than its full form.

Depends on D17613

Differential Revision: https://phabricator.services.mozilla.com/D17614

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:46 +00:00
Michael Ratcliffe 13cf1df779 Bug 1519597 - Bad event handlers on DOM nodes produce bogus popups when inspected r=pbro,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D17142

--HG--
extra : moz-landing-system : lando
2019-01-24 09:54:20 +00:00