In the patches above, we make some tooltips (which ignore mouse events)
actually overlap the mouse. That should be fine (and is fine on other
platforms) but Cocoa still sends mouseenter/leave events which confuse
the front-end.
This fixes that.
Differential Revision: https://phabricator.services.mozilla.com/D197905
This is somewhat complex, untested, never shipped, and predates
fission.
Remove it to simplify the code.
Depends on D198183
Differential Revision: https://phabricator.services.mozilla.com/D198184
Instead of NSColor.textColor, use NSColor.controlTextColor, which is the color observed in native controls.
When these values were originally selected in bug 517412, the system colors were the same, but they have since diverged.
Differential Revision: https://phabricator.services.mozilla.com/D197125
The protections panel message should show once when the panel is first opened; after that it will be collapsed by default and can be shown again by clicking the "info" button on the panel
Messaging system previously sent the following pings on message show, and when the "learn more" link was clicked:
```
{“message_id”:“PROTECTIONS_PANEL_1",“event”:“IMPRESSION”,“addon_version”:“20231106094018",“locale”:“en-US”,“client_id”:“6fabd2de-3d0a-4b11-be4c-86b0ea1a1144",“browser_session_id”:“4b0f34b1-75ef-4704-907e-18d84e5187c3",“pingType”:“whats-new-panel”}
```
and
```
{“message_id”:“PROTECTIONS_PANEL_1",“event”:“CLICK”,“addon_version”:“20231106094018",“locale”:“en-US”,“client_id”:“6fabd2de-3d0a-4b11-be4c-86b0ea1a1144",“browser_session_id”:“4b0f34b1-75ef-4704-907e-18d84e5187c3",“pingType”:“whats-new-panel”}
```
This patch replaces these pings with 'RecordEvents' telemetry on the `protectionsPopup` object:
```
33153 security.ui.protectionspopup open protectionspopup_cfr impression {"message": "PROTECTIONS_PANEL_1"}
```
and
```
34932 security.ui.protectionspopup click protectionspopup_cfr
```
Differential Revision: https://phabricator.services.mozilla.com/D192968
Some quota clients currently use the BaseVFS (instead of QuotaVFS) during
origin initialization which makes sense at first glance (there's no need to
track usage when temporary storage is only being initialized).
However, QuotaVFS provides other important functionality besides quota checks
which is the overridden xFullPathname method. The overridden implementation is
needed to avoid file path normalization on Windows.
This patch changes relevant quota clients to always use QuotaVFS, even during
origin initialization to take advantage of the overriden xFullPathname method.
There will be no quota checks during origin initialization just like before
because the passed directory lock id is -1. GetQuotaObject will return nullptr
in that case.
Depends on D198187
Differential Revision: https://phabricator.services.mozilla.com/D198188
The method now returns nullptr instead of crashing parent process when there's
no registered directory lock for given directory lock id.
Note that we don't allow arbitrary directory lock ids for unregistered
directory locks, only -1 is allowed.
Differential Revision: https://phabricator.services.mozilla.com/D198187
There are two similar GetStorageConnection overloads. The only difference is
that they use different mozIStorageService methods for database opening.
The overloads can be easilly merged into just one method, so database opening
will be done using mozIStorageService::GetDatabaseFileURL even when called
from FileSystemQuotaClient::InitOrigin.
Depends on D194519
Differential Revision: https://phabricator.services.mozilla.com/D198186
A link points to a blog post explaining why we made the change.
Once the notice is closed by the user, it won't be opened again.
The notice is not localized so it's easier to uplift for now; it will
be localized in a follow up.
Depends on D197897
Differential Revision: https://phabricator.services.mozilla.com/D197924
Can be tested locally with this snippet:
```js
const { Heartbeat } = ChromeUtils.importESModule(
"resource://normandy/lib/Heartbeat.sys.mjs"
);
new Heartbeat(window, {
testing: true,
flowId: "test",
message: "This is a test message!",
engagementButtonLabel: undefined,
learnMoreMessage: "Learn More",
learnMoreUrl: "https://example.org/learnmore",
});
```
Depends on D194316
Differential Revision: https://phabricator.services.mozilla.com/D194317
Can be tested locally using this snippet (which I think I took from a test...):
```js
let addonId = "test";
let policy = new WebExtensionPolicy({
name: "Scapegoat",
id: addonId,
mozExtensionHostname: Services.uuid.generateUUID().number.slice(1, -1),
baseURL: "file:///",
allowedOrigins: new MatchPatternSet([]),
localizeCallback() {},
});
policy.active = true;
ProcessHangMonitor.showNotification(window, { addonId, scriptBrowser: { browsingContext: { watchedByDevTools: false }} });
```
Depends on D194315
Differential Revision: https://phabricator.services.mozilla.com/D194316
Can be tested locally by running this code in the browser toolbox:
```js
gBrowser.selectedBrowser.ownerGlobal.CaptivePortalWatcher._showNotification();
```
Depends on D194313
Differential Revision: https://phabricator.services.mozilla.com/D194314
There are some tests you can run to see how this looks, but I've also been verifying things locally by running this snippet in the browser toolbox:
```js
const { InfoBar } = ChromeUtils.import(
"resource://activity-stream/lib/InfoBar.jsm"
);
const { CFRMessageProvider } = ChromeUtils.importESModule(
"resource://activity-stream/lib/CFRMessageProvider.sys.mjs"
);
let message = (await CFRMessageProvider.getMessages()).find(
m => m.id === "INFOBAR_ACTION_86"
);
InfoBar.showInfoBarMessage(
BrowserWindowTracker.getTopWindow().gBrowser.selectedBrowser,
{
...message,
content: {
priority: window.gNotificationBox.PRIORITY_WARNING_HIGH,
...message.content,
},
},
{}
);
```
Depends on D194312
Differential Revision: https://phabricator.services.mozilla.com/D194313
Notification can be triggered locally via this snippet:
```js
BrowserSearch.removalOfSearchEngineNotificationBox("Google", "Foogle")
```
Depends on D189872
Differential Revision: https://phabricator.services.mozilla.com/D194312
This patch updates the `NotificationMessage` element in `notificationbox.js` so that it extends our newer `moz-message-bar` component instead of the deprecated `message-bar` component. Many of the changes are just dealing with the implications of making things async (so that we can ensure `moz-message-bar.mjs` gets imported). I tried to break out places where I modified related code and tests into separate patches to mitigate some of the review pain here.
This patch solves a longstanding issue where we were loading `in-content/common-shared.css` in the chrome since it gets used by the `message-bar` element. It also makes some small visual changes to our infobars (slight outline, icon colors, adds a bit of spacing).
Differential Revision: https://phabricator.services.mozilla.com/D189872
After a minimize, an unknown amount of time or circumstances may be involved that ultimately lead to
a GL context loss. To try to mitigate this, cache software snapshots of DrawTargetWebgls when we are
about to minimize so that these can hopefully be copied into fallback TextureDatas later if the context
is actually lost.
Differential Revision: https://phabricator.services.mozilla.com/D198129
As far as I can tell, this assertion was added when this function only supported two MIR ops (MGuardShape and MNewObject) to validate that we were looking at a NewObject, and was never updated as we rewrote this code.
Differential Revision: https://phabricator.services.mozilla.com/D198103
The amount of data is reduced in chaos mode to catch timing anomalies.
With the usual amount of data, chaos mode slowdowns do not allow the
test to pass within a reasonable timeout.
Differential Revision: https://phabricator.services.mozilla.com/D197766
This patch fixes the tp6-bench test to handle toml manifests instead of ini manifests. It also adds an exception when no manifests are found so that the error is clearer in the future.
Differential Revision: https://phabricator.services.mozilla.com/D198165