Commit Graph

703305 Commits

Author SHA1 Message Date
Gerald Squelart
6814c95c04 Bug 1630872 - ProfileChunkedBuffer Put* functions provide a Maybe<ProfileBufferEntryWriter> - r=canaltinova
Same as with `BlocksRingBuffer`: Instead of a potentially-null pointer to a
`ProfileBufferEntryWriter`, we are now providing a
`Maybe<ProfileBufferEntryWriter>`, which is safer.

Differential Revision: https://phabricator.services.mozilla.com/D71287
2020-04-24 06:19:27 +00:00
Gerald Squelart
525010089c Bug 1630872 - BlockRingBuffer Put* functions provide a Maybe<ProfileBufferEntryWriter> - r=canaltinova
Instead of a potentially-null pointer to a `ProfileBufferEntryWriter`, we are now providing a `Maybe<ProfileBufferEntryWriter>`, which is safer.

Differential Revision: https://phabricator.services.mozilla.com/D71286
2020-04-24 06:19:09 +00:00
Logan Smyth
da68440b0d Bug 1607639 - Part 5: Resolve sourcemaps relative to their execution environment. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D72116
2020-04-24 06:15:15 +00:00
Logan Smyth
2cdc9b1bbb Bug 1607639 - Part 4: Convert introductionUrl into sourceMapBaseURL to match actual usage. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D72115
2020-04-24 06:15:13 +00:00
Logan Smyth
01eef174fc Bug 1607639 - Part 3: Remove unnecessary falsy checks for _source in source actor. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D72107
2020-04-24 06:13:24 +00:00
Logan Smyth
1b301205ab Bug 1607639 - Part 2: Remove the unused 'introductionUrl' value from Source objects. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D72106
2020-04-24 06:13:11 +00:00
Logan Smyth
1f5bf8805c Bug 1607639 - Part 1: Remove the unused 'introductionType' value from Source objects. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D72105
2020-04-24 06:12:13 +00:00
Logan Smyth
9d69639c41 Bug 1470768 - Allow sourceURL to apply generally across all types of scripts. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D72104
2020-04-24 06:11:17 +00:00
James Teh
122d48f2b2 Bug 1632706: When updating AccGroupInfo, If a sibling has cached group info, assume it's visible. r=MarcoZ
This avoids unnecessary calls to States().

Differential Revision: https://phabricator.services.mozilla.com/D72265
2020-04-24 02:42:46 +00:00
Emilio Cobos Álvarez
b8fbb6ead5 Bug 1509418 - Collect ancestor hashes from single-length :is and :where selector lists. r=heycam,boris
We can only collect hashes from single-length selectors, as described in
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D71458
2020-04-23 19:20:35 +00:00
Emilio Cobos Álvarez
f92b952261 Bug 1509418 - Handle disjoint selectors in the selector map. r=heycam,boris
This way, something like:

  *:where(.foo, .bar)

Will end up twice on the selector map, just as if you would've written
.foo, .bar.

But we're a bit careful to not be wasteful, so:

  .foo:where(div, span)

Will still end up using the .foo bucket.

It needs a bit of borrow-checker gymnastics to avoid cloning the entry
in the common path. It's a bit gross but not too terrible I think.

Differential Revision: https://phabricator.services.mozilla.com/D71457
2020-04-23 19:20:27 +00:00
Emilio Cobos Álvarez
844ccbee62 Bug 1509418 - Enable the feature in Nightly. r=heycam,boris
There are a bunch of missing tests, and there are some tests that don't
match the current spec text, that I need to write or fix before I enable the
feature everywhere.

But there are fairly complex invalidation tests, that we pass flawlessly :)

Differential Revision: https://phabricator.services.mozilla.com/D71424
2020-04-23 19:20:25 +00:00
Emilio Cobos Álvarez
7ff7bc8cc2 Bug 1509418 - Optimize invalidation by scanning the rightmost compound inside :where() and :is() with the outer visitor. r=heycam,boris
See the comment about why this is valuable. For a selector like:

    .foo:is(.bar) > .baz

Before this patch we'd generate an Dependency for .bar like this:

    Dependency {
        selector: .bar,
        offset: 0,
        parent: Some(Dependency {
            selector: .foo:is(.bar) > .baz,
            offset: 1, // Pointing to the `>` combinator.
            parent: None,
        }),
    }

After this patch we'd generate just:

    Dependency {
        selector: .foo:is(.bar) > .baz,
        offset: 1, // Pointing to the `>` combinator.
        parent: None,
    }

This is not only less memory but also less work. The reason for that is that,
before this patch, when .bar changes, we'd look the dependency, and see there's
a parent, and then scan that, so we'd match `.bar` two times, one for the
initial dependency, and one for .foo:is(.bar).

Instead, with this we'd only check `.foo:is(.bar)` once.

Differential Revision: https://phabricator.services.mozilla.com/D71423
2020-04-23 19:20:17 +00:00
Emilio Cobos Álvarez
2975274c6b Bug 1509418 - Make Invalidation work in terms of a dependency, not a selector. r=heycam,boris
That way we can look at the parent dependency as described in the previous
patch. An alternative would be to add a:

    parent_dependency: Option<&'a Dependency>

on construction to `Invalidation`, but this way seems slightly better to avoid
growing the struct. It's not even one more indirection because the selector is
contained directly in the Dependency struct.

Differential Revision: https://phabricator.services.mozilla.com/D71422
2020-04-23 19:20:10 +00:00
Emilio Cobos Álvarez
40a0b1a6d6 Bug 1509418 - Keep track of nested dependencies for :where() and :is(). r=heycam,boris
The tricky part of :is() and :where() is that they can have combinators inside,
so something like this is valid:

  foo:is(#bar > .baz) ~ taz

The current invalidation logic is based on the assumption that you can
represent a combinator as a (selector, offset) tuple, which are stored in the
Dependency struct. This assumption breaks with :is() and :where(), so we need
to make them be able to represent a combinator in an "inner" selector.

For this purpose, we add a `parent` dependency. With it, when invalidating
inside the `:is()` we can represent combinators inside as a stack.

The basic idea is that, for the example above, when an id of "bar" is added or
removed, we'd find a dependency like:

    Dependency {
        selector: #bar > .baz,
        offset: 1, // pointing to the `>` combinator
        parent: Some(Dependency {
            selector: foo:is(#bar > .baz) > taz,
            offset: 1, // Pointing to the `~` combinator.
            parent: None,
        })
    }

That way, we'd start matching at the element that changed, towards the right,
and if we find an element that matches .baz, instead of invalidating that
element, we'd look at the parent dependency, then double-check that the whole
left-hand-side of the selector (foo:is(#bar > .baz)) actually changed, and then
keep invalidating to the right using the parent dependency as usual.

This patch only builds the data structure and keeps the code compiling, the
actual invalidation work will come in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D71421
2020-04-23 19:20:03 +00:00
Mike Hommey
631e3b46ff Bug 1632727 - Remove use of deprecated Error::description. r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D72285
2020-04-24 05:23:32 +00:00
Jean-Yves Avenard
e48b5b0393 Bug 1607984 - P14-2. Correct preference check. r=mattwoodrow
The test became invalid with the preference introduced in P17.

Differential Revision: https://phabricator.services.mozilla.com/D72288
2020-04-24 05:22:16 +00:00
Daisuke Akatsuka
3380bd0143 Bug 1604211: Add test of target-switching for inspectedWindow. r=rpl
Depends on D67438

Differential Revision: https://phabricator.services.mozilla.com/D67439
2020-04-24 04:37:05 +00:00
Daisuke Akatsuka
1c0e943acf Bug 1604211: Introduce target-switching mechanism for devtools inspectedWindow. r=rpl,ochameau,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D66736
2020-04-24 04:35:51 +00:00
Cosmin Sabou
dacaa0fa0b Backed out 6 changesets (bug 1509418) for causing dt failures on several files. CLOSED TREE
Backed out changeset 0de514478e3c (bug 1509418)
Backed out changeset 859910d9fee2 (bug 1509418)
Backed out changeset 0abf5d38ab61 (bug 1509418)
Backed out changeset f572e241c626 (bug 1509418)
Backed out changeset 6398c8f1b4d4 (bug 1509418)
Backed out changeset ebef9346b5b1 (bug 1509418)
2020-04-24 08:38:05 +03:00
Cosmin Sabou
e40dfd85ea Backed out changeset 0c52ed0a7e04 (bug 1630957) for dt failures on browser_dbg-sourcemapped-toggle.js. CLOSED TREE 2020-04-24 07:59:06 +03:00
Jean-Yves Avenard
55a6e2ac80 Bug 1607984 - P17. Put ParentProcessDocumentChannel behind a pref. r=necko-reviewers,mattwoodrow
We disable it for now, until some remaining failures are sorted out.

Differential Revision: https://phabricator.services.mozilla.com/D71875
2020-04-24 01:46:25 +00:00
Jean-Yves Avenard
119b12fc17 Bug 1607984 - P16. Always whitelist file. r=markh
This file will be removed in bug 1628752 anyway.

Differential Revision: https://phabricator.services.mozilla.com/D70801
2020-04-24 01:46:17 +00:00
Jean-Yves Avenard
6392e85f33 Bug 1607984 - P15. Wait for the load to start before setting the event handler. r=Jamie
addA11yLoadEvent gets the contentWindow and wait for the document from that window to fire the load event.

Enabling the DocumentChannel for parent process load (or here in non-e10s mode) we have one extra event loop before the load starts.
So the window passed to addAllyLoadEvent would have been of the about:blank page.

The current code was based on an observable behaviour which was that the load was occuring synchronously.

DocumentChannel broke that assumption.

Differential Revision: https://phabricator.services.mozilla.com/D70799
2020-04-24 01:46:10 +00:00
Jean-Yves Avenard
e52d800eb6 Bug 1607984 - P14. Fix test_bug1339722.html when using PPDC. r=valentin
When starting a load via the ParentProcessDocumentChannel, the event http-on-modify-request will be fired before the DocumentLoadListener has a chance to set the notificationCallback attribute.
When using a DocumentChannel, this test will not trigger the expected codepath as the DOMWindowCreated event will be fired once the channel is fully up and running; which in effect is also a fix of the original bug 1339722

Instead we use the document-on-modify-request event when the DocumentChannel is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D70011
2020-04-24 01:46:02 +00:00
Jean-Yves Avenard
4dd65b320f Bug 1607984 - P13. Proxy the first http-on-opening-request event to the DocumentChannel. r=mayhemer,necko-reviewers
Some tests rely on this event to start action. The DocumentChannel had no equivalent. We make the ParentProcessDocumentChannel listen to this event and if it matches the nsIChannel currently in use in the DocumentLoadListener than we emit a similar document-on-modify-request event on the DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D70010
2020-04-24 01:45:55 +00:00
Jean-Yves Avenard
ff4bc77f97 Bug 1607984 - P12-4. Start parent load via DocumentChannel. r=mayhemer,nika,mattwoodrow,necko-reviewers
Add ParentProcessDocumentChannel object. This object is a DocumentChannel that will start a channel load from the parent process via a DocumentChannel.

The aim of this task is two-fold.
1- Be consistent on how we handle redirects before continuing the load on the final channel.
2- Prepare to initiate a process switch when needed without having to go via an intermediary content process, saving a process switch. This task will be done in a follow-up task.

The behaviour of the ParentProcessDocumentChannel is similar in logic to the DocumentChannelChild/DocumentChannelParent pair. The ParentProcessDocumentChannel sets up a DocumentLoadListener, have it handle the redirects and upon completion continue the load on the final channel.

Differential Revision: https://phabricator.services.mozilla.com/D70009
2020-04-24 01:58:23 +00:00
Jean-Yves Avenard
45fb84edc5 Bug 1607984 - P12-3. Let DocumentChannel decides when it can be used. r=mattwoodrow
Depends on D72272

Differential Revision: https://phabricator.services.mozilla.com/D72273
2020-04-24 02:22:58 +00:00
Jean-Yves Avenard
6cc38139af Bug 1607984 - P12-2. Refactor DocumentLoadListener. r=mattwoodrow
This prepares the code so that it doesn't always have to deal with dealing with another process as is the case when using DocumentChannelChild/DocumentChannelParent

Depends on D72271

Differential Revision: https://phabricator.services.mozilla.com/D72272
2020-04-24 02:29:03 +00:00
Jean-Yves Avenard
f9c4df23ce Bug 1607984 - P12-1. Move methods to base class. r=mattwoodrow
Move DocumentChannelChild methods to the base class as they will be needed with the ParentProcessDocumentChannel

Depends on D70008

Differential Revision: https://phabricator.services.mozilla.com/D72271
2020-04-24 02:21:01 +00:00
Jean-Yves Avenard
9301368189 Bug 1607984 - P11. Don't assume the page will be loaded synchronously. r=zombie
We must wait for the iframe created by extension1 to be fully loaded before we can attempt to send a message to it.
So we send a message when it is ready, and suspend the execution until this message is received.

Differential Revision: https://phabricator.services.mozilla.com/D70008
2020-04-24 01:58:23 +00:00
Jean-Yves Avenard
11eba58643 Bug 1607984 - P10. Wait until OnStopRequest has been called to clear mRequest. r=valentin
The code assumed that nsJARChannel::RetargetDeliveryTo would have been called synchronously from nsJARChannel::OnStartRequest, which would be true if we weren't using a DocumentChannel.

The DocumentLoadListener queue the calls to OnStartRequest until the final redirect.
nsJARChannel::RetargetDelivery mRequest member is be set to forward the call.
So we need to only reset it once OnStopRequest has been received.

Differential Revision: https://phabricator.services.mozilla.com/D70007
2020-04-24 01:45:09 +00:00
Jean-Yves Avenard
80eaecc238 Bug 1607984 - P9. Implement nsIThreadRetargetableStreamListener in ParentChannelListerner. r=valentin
The DocumentLoadListener is setting up a ParentChannelListener to go in between the normal listener->channel chain.
ParentChannelListener not implementing nsIThreadRetargetableStreamListener would prevent a nsHtml5StreamParser settings things up so that OnDataAvailable could be sent to a html parser thread off the main thread; improving performance.

Differential Revision: https://phabricator.services.mozilla.com/D70006
2020-04-24 01:45:06 +00:00
Jean-Yves Avenard
97dd134ba0 Bug 1607984 - P7. Fix compilation failure in non-unified mode. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D70004
2020-04-24 01:45:04 +00:00
Jean-Yves Avenard
b12d472571 Bug 1607984 - P6. Fix test. r=MattN
Following the changes to DocumentChannel the test was failing.
With DC, a load may take a few event loops to start. This current test was only waiting for the load to start to the URL about:preferences#privacy-logins and would immediately tear down the window.
However, this URL redirects to about:preferences#privacy ; destroying the window midway could cause XML parsing error.

So now we wait for the page to fully load, and make sure we've been through both addresses.

Differential Revision: https://phabricator.services.mozilla.com/D70003
2020-04-24 01:45:02 +00:00
Jean-Yves Avenard
f624573112 Bug 1607984 - P5. Add missing nsIIdentChannel interface. r=mattwoodrow
Regressiong from bug 1607987. This prevented from QueryInterface(Ci.nsIIdentChannel) in JS on the channel.

Differential Revision: https://phabricator.services.mozilla.com/D70002
2020-04-24 01:44:59 +00:00
Jean-Yves Avenard
27d1134cfd Bug 1607984 - P4. Expose SetClassificationFlagsHelper. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D70001
2020-04-24 01:44:57 +00:00
Jean-Yves Avenard
c024d4b423 Bug 1607984 - P3. Fix leak in nsDSURIContentListener. r=smaug
If we were to open the window to close it immediately; we would leak a nsHtml5Parser object.

Differential Revision: https://phabricator.services.mozilla.com/D70000
2020-04-24 01:43:54 +00:00
Jean-Yves Avenard
0c775c68d1 Bug 1607984 - P2. Add Redirects/LastVisitInfo getters. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D69999
2020-04-24 01:43:47 +00:00
Jean-Yves Avenard
94083035f4 Bug 1607984 - P1. Make SerializeRedirectData const. r=mattwoodrow
This also removes the need to call SerializeRedirectData to set mRedirectChannelId to the proper value and register the channel.

Differential Revision: https://phabricator.services.mozilla.com/D69998
2020-04-24 01:43:40 +00:00
Paul Adenot
68f59c15f7 Bug 1626382 - r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D72144
2020-04-24 01:57:47 +00:00
Masayuki Nakano
09160b3e7b Bug 1632021 - part 4: Get rid of IID of InsertTextTransaction and CompositionTransaction r=m_kato
`EditTransactionBase::GetAs*Transaction()` should be used instead.

Differential Revision: https://phabricator.services.mozilla.com/D71911
2020-04-23 12:28:39 +00:00
Masayuki Nakano
14c56a78ab Bug 1632021 - part 3: Get rid of nsIAbsorbingTransaction r=m_kato
It's inherited only by `PlaceholderTransaction` and used only for QI.
Therefore, we can get rid of it.

Additionally, this makes storing `PlaceholderTransaction` and
`CompositionTransaction` in `PlaceholderTransaction` faster and safer with
`WeakPtr`.

Finally, this makes `PlaceholderTransaction` always have non-null name
because it caused a lot of useless warnings in
`EditAggregationTransaction::GetName()` and
`PlaceholderTransaction::GetTxnName()`.

Differential Revision: https://phabricator.services.mozilla.com/D71910
2020-04-23 10:46:55 +00:00
Masayuki Nakano
47acd7e8de Bug 1632021 - part 2: Add nsITransaction::GetAsEditTransactionBase() r=m_kato
In a lot of places in libeditor, we do nothing if given transaction is not
our edit transaction classes' instance.  Therefore, it's better to have
casting virtual method in `nsITransaction` for performance because QI cost
may not be cheap.

Differential Revision: https://phabricator.services.mozilla.com/D71908
2020-04-23 07:02:16 +00:00
Masayuki Nakano
3aa3b37a40 Bug 1632021 - part 1: Add GetAs*Transaction() methods to every subclasses of EditTransactionBase r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D71907
2020-04-23 05:46:43 +00:00
Adam Gashlin
5a32fdfb4b Bug 1617957 - Update installer text in official branding. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D72211
2020-04-23 21:26:37 +00:00
Narcis Beleuzu
3eaaf8fd77 Backed out changeset d84032238d5f (bug 1632096) for bustages on GLContext.h . CLOSED TREE 2020-04-24 05:46:10 +03:00
Narcis Beleuzu
fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
sotaro
41ebbb733f Bug 1632096 - Forward WebRender gl(ANGLE) error message to gfx critical note r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72123
2020-04-23 22:58:27 +00:00
Sam Foster
e0cd903538 Bug 1576490 - Also fill generated password in the following password field when there is one. r=MattN
* Prefer autocomplete=new-password fields when the field we filled was autocomplete=new-password
* Only fill a password confirmation field when the next input is/was a password type, not-disabled, and empty
* Limit matching to password fields no more than 3 fields away from the filled password field

Differential Revision: https://phabricator.services.mozilla.com/D71130
2020-04-24 01:03:51 +00:00