This can be accomplished by the undocumented DWMWA_USE_IMMERSIVE_DARK_MODE.
You can test this by going to "Customize Toolbar" and checking "Title Bar", or
opening any native dialog like e.g. the profile creation window / the profile
manager / etc.
Differential Revision: https://phabricator.services.mozilla.com/D127636
Now that windows is going to support dark colors, we want to make it
behave like other platforms in this regard.
Having a single pref for this seems better.
Differential Revision: https://phabricator.services.mozilla.com/D127624
This patch adds tests for the StoragePrincipalHelper::GetPrincipal() but
only for the version which accepts a channel. The reason why we don't
add tests for window version is because there is no way to setup window
in gTest.
Differential Revision: https://phabricator.services.mozilla.com/D127439
This patch implements the StoragePrincipalHelper::GetPrincipal() which
is designed to be used to get the principal from the window/channel
according to the given principal type.
Differential Revision: https://phabricator.services.mozilla.com/D127438
In order to support always partitioned third-party storage,
like the service worker, in the future, we need to have another
principal type which uses partitioned principal in a third-party context
and regular principal in a first-party context.
Differential Revision: https://phabricator.services.mozilla.com/D127435
Rather than change every use of IntSize/Rect/Point in image/, this patch
attempts to draw the line at the relevant parts of the decoding pipeline
to prevent confusion about which size and orientation we are working
with.
Differential Revision: https://phabricator.services.mozilla.com/D126381
This is a new swizzle operation which allows us process a reorientation
row by row into its new orientation. This will be used in a later part
in the series in the image decoding pipeline.
Differential Revision: https://phabricator.services.mozilla.com/D126379
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
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
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
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
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