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

54 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke 8953086494 Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Emilio Cobos Álvarez 061fc9d988 Bug 1658571 - Add MainThreadWeakPtr and use it in PreloaderBase::RedirectSink. r=sg,smaug
Per matrix discussion, this is safer to uplift (instead of relying on
the RedirectSink being released on the main thread).

Differential Revision: https://phabricator.services.mozilla.com/D91270
2020-09-24 16:38:35 +00:00
Emilio Cobos Álvarez a88d74d517 Bug 1658571 - Don't create a reference cycle when catching redirects of a preload. r=smaug
PreloaderBase -> RedirectSink -> PreloaderBase is a strong,
non-cycle-collected reference cycle, which in cases where we don't drop
the channel because we never get an NotifyStop notification, it can
cause leaks.

I'm investigating the root cause of the lack of NotifyStop, but this
should fix the leak and is correct anyhow.

Move the class to the cpp file to ease debugging and changes.

Differential Revision: https://phabricator.services.mozilla.com/D91259
2020-09-24 16:01:50 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Barret Rennie f74cb16fd0 Bug 1657188 - Implement rel=preload load time telemetry r=Dexter,emilio,nika
Differential Revision: https://phabricator.services.mozilla.com/D86074
2020-09-14 21:03:52 +00:00
Razvan Maries 90b7948378 Backed out 2 changesets (bug 1663963, bug 1657188) for perma failures on browser_Telemetry_loadTimePreload.js. CLOSED TREE
Backed out changeset 643f16da7b99 (bug 1657188)
Backed out changeset 0c9661a5c8f9 (bug 1663963)
2020-09-10 03:48:48 +03:00
Barret Rennie 423307263a Bug 1657188 - Implement rel=preload load time telemetry r=Dexter,emilio,nika
Differential Revision: https://phabricator.services.mozilla.com/D86074
2020-09-09 21:44:48 +00:00
Kershaw Chang 4fdec2e031 Bug 1658532 - Add `REL_PRELOAD_MISS_RATIO` telemetry measuring ratio of used vs unused preloads per "as" type, r=smaug,chutten
Differential Revision: https://phabricator.services.mozilla.com/D86736
2020-08-24 11:24:21 +00:00
Emilio Cobos Álvarez 341aec03de Bug 1658551 - Properly sanitize the URI we log to the console. r=heycam
Drive-by, but this is what a bunch of other console messages do.

Depends on D87267

Differential Revision: https://phabricator.services.mozilla.com/D87268
2020-08-20 22:04:36 +00:00
Emilio Cobos Álvarez 44b1932fad Bug 1658551 - Move preload usage timer creation to the common NotifyOpen implementation. r=heycam
Not just the one that takes a channel. This fixes the issue.

Also, as an optimization, avoid creating a timer if we're used already
or we have already one.

Differential Revision: https://phabricator.services.mozilla.com/D87267
2020-08-20 22:01:29 +00:00
Frederik Braun 6c85c74f16 Bug 1655716 - Introduce TYPE_INTERNAL_FETCH_PRELOAD and use in HTMLLinkElement::AsValueToContentPolicy() - r=emilio,mayhemer,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D85980
2020-08-11 12:33:14 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Cameron McCormack 938328e6b5 Bug 1650409 - Null check preload URL parsing. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D84035
2020-07-18 13:54:22 +00:00
Simon Giesecke 00997c3c4d Bug 1652007 - Move implementation of UsageTimer to cpp file to avoid dependency on dom/base/Document.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83101
2020-07-15 12:47:41 +00:00
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Honza Bambas 3f23870623 Bug 1603542 - Log a warning in the web console when a preloaded resource is not used, r=Harald
Differential Revision: https://phabricator.services.mozilla.com/D76527
2020-06-23 17:18:20 +00:00
Emilio Cobos Álvarez abd87a6510 Bug 1646776 - Make sure to fire load rather than error events for preload links that hit the CSS cache. r=mayhemer
When we hit the stylesheet cache for an existing stylesheet in a
different document:

 * There's no existing preload in the PreloadService (because the sheet
   was loaded in another document).

 * We don't create a PreloaderBase (because we don't trigger a load at
   all).

 * And thus we believe the load has just errored, which is wrong...

Fix it by properly passing through the "already complete" status from
PreloadStyle.

Note that there's still another issue, which is that we'd still hit this
broken path if two stylesheets with the same URI are loading in
different documents and the CSS loader coalesces them.

For that, I think we'd have to make SheetLoadData the thing that
actually implements PreloaderBase. This is kind of an obscure case, and
SheetLoadData has a pretty complex lifetime already (keeps alive a whole
lot of stuff), so I'd prefer to do this in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D80289
2020-06-22 14:18:19 +00:00
Emilio Cobos Álvarez 6bb08bd490 Bug 1646056 - Use const references as keys instead of raw pointers for PreloadHashKey. r=mayhemer
Feels a bit more natural for the callers this way. This should have no
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D79831
2020-06-18 14:06:34 +00:00
Emilio Cobos Álvarez 939c7c466b Bug 1642591 - Don't make referrer policy a cache miss for sub-resource {pre,}loads. r=mayhemer,tnikkel
For preload we're already effectively not using it, I think, due to
bug 1642325.

For images, this matches the spec, see earlier comments in this bug and
https://bugzilla.mozilla.org/show_bug.cgi?id=1174921#c17.  I think it
makes sense for other sub-resources to align as well.

Differential Revision: https://phabricator.services.mozilla.com/D79812
2020-06-18 14:06:20 +00:00
Noemi Erli 22b81ffefa Backed out 2 changesets (bug 1603542) for causing assertion failures in Loader.cpp CLOSED TREE
Backed out changeset cc70c96b63e0 (bug 1603542)
Backed out changeset c3dcacdd97c4 (bug 1603542)
2020-06-17 18:37:45 +03:00
Honza Bambas 4570854a4c Bug 1603542 - Log a warning in the web console when a preloaded resource is not used, r=Harald
Differential Revision: https://phabricator.services.mozilla.com/D76527
2020-06-17 14:06:50 +00:00
Emilio Cobos Álvarez 5ce8c5c731 Bug 1646032 - Avoid a silly string copy in PreloadService. r=mayhemer
There's no real need to go through a DOMString here.

Differential Revision: https://phabricator.services.mozilla.com/D79815
2020-06-16 14:07:18 +00:00
Emilio Cobos Álvarez 6ce135fbfc Bug 1646019 - Make PreloadHashKey don't check referrer for equality for style. r=mayhemer
We probably should remove the referrer policy check altogether in
bug 1642591, but the preload code still uses the whole referrer as the
key for css, which the css loader stopped doing in bug 1599160.

So this should be an uncontroversial simplification.

Differential Revision: https://phabricator.services.mozilla.com/D79810
2020-06-16 11:41:18 +00:00
Honza Bambas 089a846bd0 Bug 1642303 - Keep channel of FetchPreloader even after the load has finished to let preload consumers use that channel early after opening, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D78729
2020-06-10 14:21:56 +00:00
Honza Bambas 8965ac6edc Bug 1642325 - Exclude referrer policy from the preload hash key, r=ckerschb
Depends on D77664

Differential Revision: https://phabricator.services.mozilla.com/D77665
2020-06-08 17:00:37 +00:00
Emilio Cobos Álvarez 2f5607b8d0 Bug 1642221 - Rename SheetLoadData::mLoaderPrincipal to mTriggeringPrincipal. r=jwatt
I'm about to introduce the concept of "Loader principal" (as in "the
principal of the CSS loader"), and SheetLoadData already has an
mLoaderPrincipal.

However SheetLoadData's principal is just the triggering principal (the
principal that initiated the load). So name it that with consistency
with SheetInfo::mTriggeringPrincipal etc.

Differential Revision: https://phabricator.services.mozilla.com/D77613
2020-05-31 17:11:57 +00:00
Honza Bambas 0057c96229 Bug 1637039 - Make synchronous open errors of a fetch preloading channel be notified to link preload tags, r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D76367
2020-05-25 18:40:07 +00:00
Honza Bambas b10e870a54 Bug 1637039 - Adjust `PreloaderBase::NotifyStart` to read channel tainting also for non-opened preloads, r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D76362
2020-05-25 18:38:36 +00:00
Honza Bambas d88ed92c5f Bug 1618548 - Make `Link: rel=preload` response header work with preload-as-speculative-load, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D75133
2020-05-18 17:33:57 +00:00
Honza Bambas 7a64bc8d9b Bug 1618543 - Let `fetch()` use "fetch" preloads, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74899
2020-05-18 12:18:14 +00:00
Honza Bambas 3195caba81 Bug 1637888 - Add a null-check for Document passed to `PreloaderBase::NotifyRestart` as it is a valid case to happen, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75282
2020-05-14 11:24:03 +00:00
Honza Bambas 82d44154a6 Bug 1636106 - Do not cancel a preload channel and do not remove a preload from Document`s preloads when last <link preload> node referencing it is removed from the DOM tree or otherwise updated making it abandon the preload, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D74480
2020-05-12 12:15:57 +00:00
Geoff Lankow 0688ffdef2 Bug 1618535 - Add missing `#include "nsIDocShell.h"` to unbreak the Thunderbird build r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74753
2020-05-12 07:11:11 +00:00
Honza Bambas bc388980de Bug 1618322 - Merge `network.preload.experimental` pref to `network.preload`, r=dragana
Depends on D70235

Differential Revision: https://phabricator.services.mozilla.com/D70526
2020-05-11 14:15:30 +00:00
Honza Bambas ec52ba8274 Bug 1618536 - Preload for fonts, r=heycam,hsivonen
Depends on D72118

Differential Revision: https://phabricator.services.mozilla.com/D70235
2020-05-11 14:14:32 +00:00
Honza Bambas 9e027ce534 Bug 1618535 - Implement preloading for as="fetch" type r=kershaw,baku
Depends on D69860

Differential Revision: https://phabricator.services.mozilla.com/D69628
2020-05-11 14:12:33 +00:00
Edgar Chen 3f250fba44 Bug 1618295 - Make imgRequestProxy implement and use PreloaderBase to support the preload as speculative load feature; r=tnikkel,smaug,mayhemer
Depends on D72083

Differential Revision: https://phabricator.services.mozilla.com/D69860
2020-05-11 14:43:05 +00:00
Honza Bambas ba512a53f7 Bug 1618293 - Make css::Loader derive and use PreloaderBase to support new preload as speculative load feature, r=smaug
Depends on D67481

Differential Revision: https://phabricator.services.mozilla.com/D68786
2020-05-11 14:08:08 +00:00