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

2511 Коммитов

Автор SHA1 Сообщение Дата
Razvan Caliman 38e6367521 Bug 1512956 - Ensure empty string is considered valid CSS authoredText; r=pbro
When removing all declarations from a rule via the Rule view, the authoredText value ends up as an empty string.
This patch ensures that the fallback cssText is not used in that case because that accidentally restores the whole declaration block when re-parsing the text of the rule.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 09:49:41 +00:00
Brian Hackett 3683e3bb45 Bug 1447244 Part 8 - Generate source actors for internal source IDs on demand, r=lsmyth.
--HG--
extra : rebase_source : db9566d09636439bd35085ebe49d0535c787ec27
2019-02-21 09:42:14 -10:00
Brian Hackett 5b568c6b04 Bug 1447244 Part 6 - Devtools server changes for script source IDs, r=lsmyth.
--HG--
extra : rebase_source : 18b46097c0f468f310755d4443169fffa33bfcac
2019-01-16 12:01:07 -10:00
Boris Zbarsky 709be5f5e2 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 21:27:44 +00:00
Coroiu Cristina 41959946c9 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2019-02-22 18:39:27 +02:00
Coroiu Cristina 80435b2557 Merge autoland to mozilla-central a=merge 2019-02-22 18:24:30 +02:00
yulia f1efb1c816 Bug 1529247 - Remove environment method from the threadClient; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D20467

--HG--
extra : moz-landing-system : lando
2019-02-22 16:13:54 +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
Coroiu Cristina dc0adc07db Backed out changeset 367ca1e16853 (bug 1528146) on request by igoldan, assignee didn't replied back on time a=backout 2019-02-22 10:10:33 +02:00
Logan Smyth fe5c75b9ba Bug 1528654 - Select the first column breakpoint for _all_ evaluations of a Debugger.Source, not just the first. r=jlast
A JSScript can be explicitly cloned and applied to a new realm. When this is done within the same compartment
as the original JSScript, it maintains its reference to the original ScriptSourceObject. This can lead to the
potentially surprising fact that using Debugger.findScripts({ source }) can return multiple Debugger.Script
objects representing the same function, but in multiple realms.

When we query for breakpoints in a given source, we want to take the first column breakpoint on a given line,
but that needs to apply to all potential instances of the Debugger.Script for that location, not just the first one.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 16:44:54 +00:00
Michael Ratcliffe ace592b4a1 Bug 1501698 - Remove devtools/server/actors/highlighters/flexbox.js::renderAlignItemLine() r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D9808

--HG--
extra : moz-landing-system : lando
2019-02-21 14:22:48 +00:00
Brian Birtles e49775f5b4 Bug 1528883 - Make isPseudoElement test for .element instead of .ownerDocument; r=daisuke
It's possible that CSSPseudoElement will grow a 'ownerDocument' member in future
so instead we should test for '.element'. We could also test for '.type' but it
seems more likely that Element will grow a 'type' member than an 'element'
member.

Ideally we should really test if the target is an instanceof CSSPseudoElement
but unfortunately the window() getter it itself defined in terms of the node()
getter (which calls isPseudoElement) so we'd end up with unbounded recursion
unless we restructure these getters.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 03:12:34 +00:00
Brian Birtles 540858a5b1 Bug 1528883 - Rename CSSPseudoElement.parentElement to CSSPseudoElement.element; r=bzbarsky
As per CSSWG resolution:

  https://github.com/w3c/csswg-drafts/issues/2816#issuecomment-454869173

And corresponding spec change:

  2dbf1e44a6

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

--HG--
extra : moz-landing-system : lando
2019-02-22 03:12:19 +00:00
Patrick Brosset c108c9a8db Bug 1479887 - Use CSS transform instead of relative positioning when centering the infobar; r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D20659

--HG--
extra : moz-landing-system : lando
2019-02-21 14:30:48 +00:00
Razvan Caliman a2b510c934 Bug 1524547 - (Part 2) Add context menu option to copy the contents of a changed CSS rule. r=gl
Depends on D20195

This series of patches depends on the patch from [Bug 1525238](https://bugzilla.mozilla.org/show_bug.cgi?id=1525238)

- adds method to identify a CSS Rule actor by id
- adds context menu option to the Changes panel to allow copying the rule's authored text to the clipboard

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

--HG--
extra : moz-landing-system : lando
2019-02-20 21:45:03 +00:00
Razvan Caliman aa000809a8 Bug 1524547 - (Part 1) Add method to StyleRuleActor to get complete authored text for a CSS rule. r=gl
This series of patches depends on the patch from [Bug 1525238](https://bugzilla.mozilla.org/show_bug.cgi?id=1525238)

This patch adds a new method to the StyleRuleActor on the server to expose the full text content of a CSS rule over the protocol to the client. This means exposing the CSS rule's authored text including comments and any nested rules if the target rule is an ancestor rule, like @media or @supports.

There's minor refactoring to include additional rule types for which StyleRuleActors will be created: @supports, @media, @keyframes. These are not explicitly rendered in the Rule view and shouldn't impact it. The Rule view filters for CSS Style Rules, element inline style and has special handling for keyframe at-rules.

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

--HG--
extra : moz-landing-system : lando
2019-02-20 20:41:44 +00:00
yulia d3412c26b4 Bug 1485664 - use protocol js methods instead of hard coding it in the console front; r=ochameau
Just updating the stubs for tests

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

--HG--
extra : moz-landing-system : lando
2019-02-19 15:58:25 +00:00
yulia aed02d496b Bug 1485664 - adjust events to front events; r=ochameau
this patch introduces events for the webconsoleFront -- not all of them are being listened
to by their subscribers yet, but this is the bulk of the effort to move events to Protocol.js

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

--HG--
extra : moz-landing-system : lando
2019-02-20 10:49:09 +00:00
yulia e3b15c8fe4 Bug 1485664 - remove echoed events and unused events; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D18830

--HG--
extra : moz-landing-system : lando
2019-02-20 10:49:03 +00:00
Razvan Caliman 0fb39bdffe Bug 1527924 - (Part 1) Use array of selectors for the rule in Redux structure for Changes. r=pbro
Refactors the Redux state for the Changes panel so that rules have
a `selectors` array instead of just a single `selector` string.

The `selectors` array represents the **history** of selector text the
rule has over time, not the actual list of multiple selectors it has
(multiple selectors are collapsed into a single comma-separated string
regardless of how many they are).

When the server logs changes, the rule's selector text is checked
against the history of previously logged selectors.

If the incoming selector is different than the _first_ item in
the tracked rule's `selectors` array, it means the selector was renamed
so it is pushed onto the array (added to the history).

If it's the same, the whole array can be reduced to the original value
because it means that either:
- the selector didn't change between operations (ex: after declaration changes)
- the selector reverted back to its original name.

This `selectors` array is used in the React component in Part 2 of this
series to render any necessary diff view of the selector.

The old approach (whole rule removal + whole rule addition) is replaced
by this refactor. The introduction of the StyleRyleActor actor id from
the server as the rule id on the client in Bug 1525238 means that the
selector change can no longer behave like two distinct rules.
The actorID/rule id are preserved after selector renames. This necessary
for the some export options to work consistently (like Copy Rule with changes applied).

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

--HG--
extra : moz-landing-system : lando
2019-02-15 16:58:58 +00:00
Hiroyuki Ikezoe 64a777f7b5 Bug 1528834 - Implement scroll-snap-align parser and serializer. r=emilio
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

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

--HG--
extra : moz-landing-system : lando
2019-02-18 23:10:08 +00:00
Razvan Caliman c21e773cbd Bug 1525238 - Use actorID for tracked rules and stylesheets. r=pbro
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
2019-02-14 16:29:21 +00:00
Hiroyuki Ikezoe 0a5721ad9c Bug 1528640 - Implement scroll-padding parser and serializer. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20103

--HG--
extra : moz-landing-system : lando
2019-02-18 02:46:09 +00:00
Hiroyuki Ikezoe 842f78da12 Bug 1528639 - Implement scroll-margin parser and serializer. r=emilio
The reason why we use  RelaxedAtomBoolis that
ScrollSnapUtils::GetSnapPointForDestination() is called both from the main and
the compositor threads, and the function will have a branch depending on the
pref value.

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

--HG--
extra : moz-landing-system : lando
2019-02-18 02:25:54 +00:00
Coroiu Cristina 34df20e0f1 Merge mozilla-central to autoland a=merge 2019-02-16 11:40:44 +02:00
Coroiu Cristina e6520f0a4d Merge inbound to mozilla-central a=merge 2019-02-16 11:36:46 +02:00
Boris Zbarsky 84b4628394 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

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

--HG--
extra : moz-landing-system : lando
2019-02-15 23:29:34 +00:00
Kyle Machulis 9fb68b2ccf Bug 1524683 - Remove nsIFrameLoaderOwner from tests; r=nika
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
2019-02-15 22:20:49 +00:00
Nicolas Chevobbe 2884ad3d7c Bug 1527238 - Speed up webconsole server's autocomplete function; r=Honza.
There are 2 changes in this patch.

In js-property-provider, we iterate over a Set
and delete item we don't want into instead of
turning the Set into an array, filter on it, and
convert it back to a new Set.

In the autocomplete function, we don't use regexp
anymore in the sort callback as we already have
a way to tell if we're performing an element access.

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

--HG--
extra : moz-landing-system : lando
2019-02-15 15:02:51 +00:00
Nicolas Chevobbe 919eb7a67a Bug 1514824 - Add an MDN link for cookie/storage warning messages in console; r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D18812

--HG--
extra : moz-landing-system : lando
2019-02-15 13:29:26 +00:00
Brian Hackett f59a4bacc3 Bug 1526832 Part 2 - Use onConsoleAPICall when sending log point messages to the client, r=lsmyth.
--HG--
extra : rebase_source : 130a120fee300d6bcdd62e3b3f0f0115cb7ae3cd
2019-02-10 14:52:20 -10:00
Brian Hackett 95f77e9d1b Bug 1526832 Part 1 - Allow snapshots when sending objects to the middleman, r=lsmyth.
--HG--
extra : rebase_source : 88f760c879e4cd6824b9f9ae0a9606f1bd8386f6
2019-02-10 14:51:26 -10:00
Alexandre Poirot 2ffe546245 Bug 1269919 - Stop emitting newSource on the target actors. r=jdescottes
Now that the base Target class is managing the thread client,
we no longer have to send "newSource" on the target actor, and instead,
listen for newSource directly on the thread client.
We should probably align updatedSource and have this event being emitted on
the thread actor as well.

Depends on D18813

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

--HG--
extra : moz-landing-system : lando
2019-02-21 18:41:08 +00:00
Alexandre Poirot 412b285031 Bug 1269919 - Unify all the attachThread methods on Target class. r=jdescottes
There is still some tight connection between ThreadClient and Target,
- Target.threadClient, which should ideally disappear in favor of
  target.getFront("thread")
- Target.threadClient is manually nullified from ThreadClient.detach,
  but that should disappear as well thanks to getFront.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 15:05:49 +00:00
Nicolas Chevobbe 5631d74c0a Bug 1525682 - Add `errorMessageName` in ConsoleMessage; r=bgrins.
This will be used in telemetry events. Also,
we add `errorMessageName` in evaluation result packets.
Stubs are generated so they include the new property.

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

--HG--
extra : moz-landing-system : lando
2019-02-11 17:22:12 +00:00
Jason Laster e5c5dceda1 Bug 1527612 - Format displayName in the server. r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D19666

--HG--
extra : moz-landing-system : lando
2019-02-13 22:32:00 +00:00
Jim Blandy ed1c6b0878 Bug 1145201: xpcshell test: Debugger callbacks protect debuggee's microtask queue. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D17548

--HG--
extra : moz-landing-system : lando
2019-02-12 08:11:02 +00:00
Jim Blandy 33e0302a5c Bug 1145201: Fix xpcshell tests not to mix the test's own microtasks with the debuggee's. r=jlast
Evaluation of debuggee code should always begin with an empty microtask queue.
In xpcshell tests, this is not guaranteed, as it is in the web platform. This
patch changes those devtools server xpcshell tests that break this rule in a
detectable way to run the debuggee code as a separate HTML task.

In an actual browser environment, debuggee JavaScript runs as an HTML task.
Since HTML requires a microtask checkpoint at the end of each task, this means
that a debuggee task begins execution with an empty microtask queue, free of
microtasks from other tabs or the browser machinery itself. Hence, while the
debugger is pausing debuggee code, it is safe for it to save the debuggee's
microtask queue, so that those jobs do not make progress. (Which is fortunate,
because it *must* do so, lest the debuggee's microtasks run during the pause!)

In an xpcshell test, however, there is no guarantee that debuggee code begins
execution with a fresh microtask queue: the test may call `eval` or
`evalInSandbox` at any time. If such an evaluation hits a breakpoint, `debugger`
statement, etc. that invokes a Debugger hook, supervisory microtasks from the
test harness code may be set aside along with the debuggee's microtasks. If the
hook code then blocks waiting for those microtasks to run, the test will hang.

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

--HG--
extra : moz-landing-system : lando
2019-02-12 08:20:29 +00:00
Logan Smyth 241f292283 Bug 1518661 - Part 7: Update debugger server to use new getPossibleBreakpoints APIs. r=jlast
Making use of the new SpiderMonkey APIs for available breakpoints means
that the server needs to think a lot less about where it is pausing and
allows us to drop the concept of a pause points from the server entirely.
It is now up to SpiderMonkey to decide where it will and will not stop
when it is stepping.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 02:31:03 +00:00
Logan Smyth b78439c9df Bug 1518661 - Part 6: Ensure that stepOut from inside onPop behaves properly. r=jlast
The step-out logic currently has a special case to skip pausing onPop
when stepping out of the current frame. This logic gets confused if
you are already _in_ the onPop of the current frame though, and
causes you to also fail to pause onPop in the parent frame.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 02:31:02 +00:00
Logan Smyth 6b7e5f0896 Bug 1518661 - Part 4: Convert bytecode positions to be more expression-oriented. r=jimb,jorendorff
This brings SpiderMonkey more in line with V8 for the positions that it uses for expressions
nested within statements. We generally prefer to use the expression's own location
rather than the location of the statement, in the majority of cases.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 02:31:00 +00:00
Michael Ratcliffe 60e1acb7f9 Bug 1527282 - Fix caching of justify content pattern in Flexbox highlighter r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D19478

--HG--
extra : moz-landing-system : lando
2019-02-12 14:03:57 +00:00
Julian Descottes 8182c02ad6 Bug 1523454 - Fix service worker active status for sw refactor;r=daisuke
Depends on D19159

This will fix the test browser_aboutdebugging_serviceworker_status.js when running with dom.serviceWorkers.parent_intercept=true
(`./mach test browser_aboutdebugging_serviceworker_status.js --setpref dom.serviceWorkers.parent_intercept=true`)

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

--HG--
extra : moz-landing-system : lando
2019-02-13 09:02:03 +00:00
Yura Zenevich dcb8caf985 Bug 1518487 - ensure that accessible audit can be performed without requiring highlighting. r=pbro
MozReview-Commit-ID: CUFTQIS9WPv

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

--HG--
extra : moz-landing-system : lando
2019-02-12 19:39:09 +00:00
Razvan Caliman f9cb3cc490 Bug 1527309 - Log CSS rule ancestors in reverse order. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D19495

--HG--
extra : moz-landing-system : lando
2019-02-12 14:45:38 +00:00
Bogdan Tara dee73f16c3 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-02-12 00:01:16 +02: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
Brian Hackett f933eada32 Bug 1526033 - Remove server side coalescing of HTML document sources, r=lsmyth.
--HG--
extra : rebase_source : 30b3b24f852fa0b0053d6dc2dc7f6bc79d820efc
2019-02-07 11:00:23 -10:00
Brian Hackett 56d2836638 Bug 1524374 - Remove breakpoint actors, r=jlast.
--HG--
extra : rebase_source : 066264dbc1f73f3afb403a9c04f5b5dbd7d53613
2019-02-06 09:18:33 -10:00
Brian Hackett 0a8e970045 Bug 1526558 - Poke background children asynchronously, r=jlast.
--HG--
extra : rebase_source : 357df0a70da447a41b9b0e2c8bf0702571953203
2019-02-09 11:27:35 -10:00