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

772498 Коммитов

Автор SHA1 Сообщение Дата
hxu 55e1e8e14a Bug 1731263 - Add QM_WARNONLY_TRY to some IPC calls in CacheAPI, which might be related to potential shutdown hang; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D126092
2021-10-06 13:59:09 +00:00
Sandor Molnar ac87f8501e Backed out 4 changesets (bug 1733335) for causing multiple dt failures. CLOSED TREE
Backed out changeset 8c14ac28d042 (bug 1733335)
Backed out changeset 066819ce0e86 (bug 1733335)
Backed out changeset c44e1bb6d9ff (bug 1733335)
Backed out changeset 4cd1efb42295 (bug 1733335)
2021-10-06 17:49:47 +03:00
Edgar Chen 109341e188 Bug 1556362 - Implement form attribute of ElementInternals; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125900
2021-10-06 13:51:40 +00:00
Sandor Molnar c4af240897 Backed out 4 changesets (bug 1730998) for frequent Android gv-junit failures. CLOSED TREE
Backed out changeset 92641110e5c9 (bug 1730998)
Backed out changeset 7e496a4d1b55 (bug 1730998)
Backed out changeset 60d769e12932 (bug 1730998)
Backed out changeset 64a2b879aa79 (bug 1730998)
2021-10-06 16:43:50 +03:00
Emilio Cobos Álvarez eba2ff593c Bug 1734176 - The test also fails in swgl sometimes.
Differential Revision: https://phabricator.services.mozilla.com/D127650
2021-10-06 12:34:33 +00:00
Luca Greco 251e19c4e4 Bug 1688040 - part11: Fix dom::Promise leaked by RequestWorkerRunnable::ProcessHandlerResult when handling the result of an async method call. r=baku
This patch fixes a leak that I spotted while investigating a separate shutdown leak triggered by D121683

(This one is not strictly related to D121683, but apparently none of the xpcshell tests part of this
stack of patches reported it at a shutdown leak, nevertheless it was detected as a shutdown leak
while running the test_ext_identity.html mochitest on the background service worker, after
the other leak specific to D121683 was fixed, and after investigating it using cc logs and heapgraph's
find_roots.py I confirmed that it's a shutdown leak introduced here in RequestWorkerRunnable::ProcessHandlerResult).

Differential Revision: https://phabricator.services.mozilla.com/D122968
2021-10-06 12:28:25 +00:00
Luca Greco 9c38ce75ec Bug 1688040 - part10.4: Test ExtensionPort instance appended to port.onMessage callback arguments is strictly same instance of the same port. r=mixedpuppy
This patch is a test-only follow up to part 8.2, both of the TODOs added in part 8.2 and removed in this patch
depends from the changes introduced in "part 10.1", "part 10.22" and "part 10.3" right before this one.

This patch adds an additional assertion to the smoke tests for the runtime API part of
test_ext_webidl_api_request_handler.js to confirm that the ExtensionPort instance received as the
last parameter of the port.onMessage listener is strictly equal to the `port` the listener was
added on.

Differential Revision: https://phabricator.services.mozilla.com/D122967
2021-10-06 12:28:25 +00:00
Luca Greco b212416ba4 Bug 1688040 - part10.3: Store weakptr in the ports lookup map and clear the entry when released. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D107555
2021-10-06 12:28:24 +00:00
Luca Greco b69f48cd4a Bug 1688040 - part10.2: Return existing ExtensionPort instance based on the ExtensionPortDescriptor portId. r=baku
The extensions expect that ExtensionPort instances they get in the calls to the
port event listeners to always be the same, and to be also strictly equal to the
object port got from browser.runtime.connect or browser.runtime.onConnect:

```
const port = browser.runtime.connect();
port.onDisconnect.addListener(disconnectedPort => {
  // port === disconnectedPort => true
});
```

This patch does add an extension port lookup map in the ExtensionBrowser
class and a new ExtensionBrowser::GetPort method which is responsible of
providing the expected behavior (returning an existing istance if one is
found in the lookup map).

Differential Revision: https://phabricator.services.mozilla.com/D107554
2021-10-06 12:28:24 +00:00
Luca Greco 3bb81b1d2d Bug 1688040 - part10.1: Support prepending or appending api object instance to the listener call arguments. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D107553
2021-10-06 12:28:24 +00:00
Luca Greco 7b70ba9812 Bug 1688040 - part9: Implement setting/clearing and reporting browser.runtime.lastError from ChromeCompatCallbackHandler::RejectedCallback. r=baku
This patch does:
- add to ExtensionBrowser two new data members to keep track of value for the browser.runtime.lastError and if it was checked while
  the chrome compatible callback was being executed
- add to ExtensionBrowser 3 new methods to set, get and clear the lastError value
- add a reference to the ExtensionBrowser to all API namespaces and API objects classes, because it has to be then propagated to the
  ChromeCompatCallbackHandler instances that are being attached to the promise result of the async API methods calls if the caller did
  pass the optional callback parameter
- tweak the ChromeCompatCallbackHandler class to set the lastError value before calling the callback in ChromeCompatCallbackHAndler::RejectedCallback
  and then clear it after the call has been completed and report it to the console if it wasn't checked
- change the ExtensionRuntime::GetLastError methhod to restrieve and return the value from the ExtensionBrowser instance

Differential Revision: https://phabricator.services.mozilla.com/D107327
2021-10-06 12:28:23 +00:00
Luca Greco 7105532924 Bug 1688040 - part8.3: Add xpcshell tests for browser.runtime.connect/onConnect and Port API. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D106706
2021-10-06 12:28:23 +00:00
Luca Greco ccb44983aa Bug 1688040 - part8.2: Handle ExtensionPort API requests r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D106705
2021-10-06 12:28:23 +00:00
Luca Greco 69f285c947 Bug 1688040 - part8.1: Add stub method for string and jsvalue properties. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D106704
2021-10-06 12:28:22 +00:00
Luca Greco 87d5d63980 Bug 1688040 - part7.4: Add xpcshell test for browser.runtime API called from a background service worker. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D106703
2021-10-06 12:28:22 +00:00
Luca Greco f9b1ca88b1 Bug 1688040 - part7.3: Adapt child/ext-runtime.js to handle webidl API request. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D106702
2021-10-06 12:28:21 +00:00
Luca Greco aebd5b068d Bug 1688040 - part7.2: Listen for background service worker changes and emit internal event to ensure extension.wakeupBackground promise is resolved. r=zombie
Depends on D106700

Differential Revision: https://phabricator.services.mozilla.com/D106701
2021-10-06 12:28:21 +00:00
Luca Greco 2be3791be5 Bug 1688040 - part7.1: Added WebIDL-based binding for the browser.runtime WebExtensions API. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D106700
2021-10-06 12:28:21 +00:00
Luca Greco 656e8251e8 Bug 1688040 - part6: Added chrome global as a BindingAlias of the browser global. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D103351
2021-10-06 12:28:20 +00:00
Luca Greco a73062e1f9 Bug 1688040 - part5: Added WebIDL-based binding for the browser.alarms WebExtensions API. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D102928
2021-10-06 12:28:20 +00:00
Luca Greco ce341c641b Bug 1688040 - part4.3: cover WebIDL-based browser.test API with smoke tests r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D102644
2021-10-06 12:28:20 +00:00
Luca Greco a84c17bb95 Bug 1688040 - part4.2: Hook up browser.test API webidl binding to ExtensionBrowser. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D102643
2021-10-06 12:28:19 +00:00
Luca Greco 46f824c0c7 Bug 1688040 - part4.1: Initial WebIDL-based bindings for browser.test API namespace r=baku
Differential Revision: https://phabricator.services.mozilla.com/D102642
2021-10-06 12:28:19 +00:00
Luca Greco 2a47f8f67d Bug 1688040 - part3: python script to generate webidl definitions from WebExtension API JSON schema files. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D87717
2021-10-06 12:28:18 +00:00
Luca Greco 5fa4780d3f Bug 1688040 - part2.2: validate and normalize webidl API requests arguments using the JSON API schemas r=zombie,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D86204
2021-10-06 12:28:18 +00:00
Luca Greco 88161bd04b Bug 1688040 - part2.1: Allow storing normalized arguments in the mozIExtensionAPIRequest object. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D102641
2021-10-06 12:28:17 +00:00
Luca Greco e473c8d18b Bug 1688040 - part1.6: adapting parent context to workers r=zombie
This is currently a temporary quick approach to more quickly verify the
worker child context with a sample of API calls proxied to the main process
(currently using the alarms API, as it is pretty small and simple).

It is likely better for this patch to create a new parent context that is specifically
meant to be used for the worker proxied contexts.

Differential Revision: https://phabricator.services.mozilla.com/D86203
2021-10-06 12:28:17 +00:00
Luca Greco e2e214db41 Bug 1688040 - part1.5: use ProcessConduit in worker child context r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86202
2021-10-06 12:28:17 +00:00
Luca Greco c19d16b2e7 Bug 1688040 - part1.4: minimal ProcessConduits prototype r=zombie
(stripped down version of D85768)

Differential Revision: https://phabricator.services.mozilla.com/D86201
2021-10-06 12:28:16 +00:00
Luca Greco 4b5ac0c57a Bug 1688040 - part1.3: Fix pre-existing issue test.onMessage.removeListener not removing previously added listeners. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D86200
2021-10-06 12:28:16 +00:00
Luca Greco 13e8dfcabc Bug 1688040 - part1.2: Prototype handling API requests for API modules implemented on the main process r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86199
2021-10-06 12:28:16 +00:00
Luca Greco 8a54e7f1ca Bug 1688040 - part1.1: Prototype forwarding API request for local implemented API to ext-*.js modules. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86198
2021-10-06 12:28:15 +00:00
Cristian Tuns 9ff6a2ca7d Backed out 11 changesets (bug 1730088) for causing build bustages on DocAccessibleWrap.cpp. CLOSED TREE
Backed out changeset f2ccbd5e0640 (bug 1730088)
Backed out changeset 4138ff98e3c6 (bug 1730088)
Backed out changeset 18f24e8c925c (bug 1730088)
Backed out changeset 0f6d7bf87aeb (bug 1730088)
Backed out changeset b91cb9d7de75 (bug 1730088)
Backed out changeset 3d5b2d949109 (bug 1730088)
Backed out changeset 1910e46ed82c (bug 1730088)
Backed out changeset be69e17a817a (bug 1730088)
Backed out changeset b96051622689 (bug 1730088)
Backed out changeset 89f855907787 (bug 1730088)
Backed out changeset 52c6c1d60659 (bug 1730088)
2021-10-06 08:33:43 -04:00
Lars T Hansen 74c67b67f9 Bug 1734123 - Tweak some wasm JSAPI WPTs + expectations. r=Ms2ger
The correct name for an externref is 'externref', not 'anyref'.

The correct name for a generic function in a global is 'anyfunc', not 'funcref'.

Since js-types is a nightly-only feature for now, add FAIL expectations for beta and release
for the type() method on globals and tables.

Correct a typo in a test case.

Differential Revision: https://phabricator.services.mozilla.com/D127616
2021-10-06 12:24:34 +00:00
Sebastian Hengst db548eefba Bug 1734153 - set SameSite test steps as having other results for Beta/Release than for Nightly. r=valentin
The preferences `network.cookie.sameSite.laxByDefault` is only enabled in
Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D127555
2021-10-06 11:46:56 +00:00
Nazım Can Altınova cf54135177 Bug 1733335 - Change the ProfilerHooks trait to use str instead of CStr r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D127114
2021-10-06 11:35:16 +00:00
Nazım Can Altınova 7445c85c5d Bug 1733335 - Convert the webrender profiler code to use the new API r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D127113
2021-10-06 11:35:16 +00:00
Nazım Can Altınova 9651c20007 Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-06 11:35:15 +00:00
Nazım Can Altınova a92da6752f Bug 1733335 - Add {add,subtract}_microseconds and Clone implementations to ProfilerTime r=emilio
Clone will make the ProfilerTime easier to use. And {add,subtract}_microseconds
implementations are helpful when you need to subtract/add some duration before
adding a marker. There is a similar code in the Webrender marker code, and this
will allow them to use the new API instead of some custom code.

Differential Revision: https://phabricator.services.mozilla.com/D127111
2021-10-06 11:35:15 +00:00
Robert Mader 27ed750ccc Bug 1733094 - Assume UseWebRender for FindVisual, r=stransky,emilio
`gfxVars::UseWebRender()` now always returns `true`, thus stop passing
it around as argument. And as HW-WR unconditionally requires an alpha
channel, remove that from the code as well.

While on it, also stop requesting a depth buffer. It's not needed any
more after D113532 and D115216.

Finally, some small drive-by cleanups.

Differential Revision: https://phabricator.services.mozilla.com/D126922
2021-10-06 11:30:37 +00:00
Sylvestre Ledru e28b9db1e6 Bug 1731542 - Remove infer from the list of code quality tools r=andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D127634
2021-10-06 10:57:38 +00:00
Timothy Nikkel 471e7e728c Bug 1733025. Make sure the highlight text for macOS lookup feature has the right size with fission. r=botond
If we pinch zoomed with an oop iframe the font would not take into account the pinch zoom because GetCumulativeResolution in the child process was 1.

This fix also takes into account the scale from css transforms. This is notable because in non-fission cases (fission turned off, or not in an oop iframe) we do not take into account css transforms, even after this patch. (We target the correct word, but the highlight that is drawn can be at the wrong place and have the wrong size.)

Differential Revision: https://phabricator.services.mozilla.com/D126862
2021-10-06 10:43:20 +00:00
Timothy Nikkel 302fe551ae Bug 1733025. Convert coords correctly when sending cmd_lookUpDictionary (macOS lookup) to child process. r=hiro
this.browser in toolkit/actors/ControllersParent.jsm is the top level browser, ie the browser holding the root content document. So the conversion that happens in that file converts the coordinates to be relative to the root content document, but they need to be relative to the root of whichever child process we are sending the event to.

The best way I found out how to do this was to pass the coords down to the child process still relative to the parent process widget and then in the child process use the child to parent transform matrix to make them relative to the root widget in the child process.

I needed a new nsIDOMWindowUtils functions because I don't think there is anything existing to do this.

Differential Revision: https://phabricator.services.mozilla.com/D126861
2021-10-06 10:43:20 +00:00
James Teh 65616347a8 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-06 10:13:12 +00:00
James Teh 75adfa3d1a Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-06 10:13:11 +00:00
James Teh 5ea7d17606 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-06 10:13:11 +00:00
James Teh 6d4a7b6804 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-06 10:13:11 +00:00
James Teh 0300ea1e93 Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-06 10:13:10 +00:00
James Teh b1c9ba78d4 Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-06 10:13:10 +00:00
James Teh c766150f7a Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
2021-10-06 10:13:10 +00:00