Update On Mon Jun 17 20:46:48 CEST 2024
This commit is contained in:
parent
1783cf35d2
commit
c113905f49
1626 changed files with 25323 additions and 33835 deletions
89
Cargo.lock
generated
89
Cargo.lock
generated
|
@ -1427,9 +1427,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "diplomat"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a31672b3ebc3c7866c3c98726f7a9a5ac8f13962e77d3c8225f6be49a7b8c5f2"
|
||||
checksum = "3137c640d2bac491dbfca7f9945c948f888dd8c95bdf7ee6b164fbdfa5d3efc2"
|
||||
dependencies = [
|
||||
"diplomat_core",
|
||||
"proc-macro2",
|
||||
|
@ -1439,15 +1439,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "diplomat-runtime"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7b0f23d549a46540e26e5490cd44c64ced0d762959f1ffdec6ab0399634cf3c"
|
||||
checksum = "5124bed7f5a5bc993adc24b2ef2df45514f005c31c198e62fceb1b2fe8cdf9a9"
|
||||
|
||||
[[package]]
|
||||
name = "diplomat_core"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfaa5e13e8b8735d2338f2836c06cd8643902ab87dda1dd07dbb351998ddc127"
|
||||
checksum = "5d86a70d2e21480f7ecd11e69b517de5c04fa6708510d6e26f75ad35d6d0eb14"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"proc-macro2",
|
||||
|
@ -2773,11 +2773,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_capi"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
dependencies = [
|
||||
"diplomat",
|
||||
"diplomat-runtime",
|
||||
"icu_locid",
|
||||
"icu_properties",
|
||||
"icu_provider",
|
||||
"icu_provider_adapters",
|
||||
"icu_segmenter",
|
||||
|
@ -2787,9 +2788,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_collections"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "137d96353afc8544d437e8a99eceb10ab291352699573b0de5b08bda38c78c60"
|
||||
checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"yoke",
|
||||
|
@ -2799,9 +2800,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_locid"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c0aa2536adc14c07e2a521e95512b75ed8ef832f0fdf9299d4a0a45d2be2a9d"
|
||||
checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"litemap",
|
||||
|
@ -2812,9 +2813,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_locid_transform"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57c17d8f6524fdca4471101dd71f0a132eb6382b5d6d7f2970441cb25f6f435a"
|
||||
checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
|
@ -2826,15 +2827,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_locid_transform_data"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "545c6c3e8bf9580e2dafee8de6f9ec14826aaf359787789c7724f1f85f47d3dc"
|
||||
checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "976e296217453af983efa25f287a4c1da04b9a63bf1ed63719455068e4453eb5"
|
||||
checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_collections",
|
||||
|
@ -2848,15 +2849,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_properties_data"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6a86c0e384532b06b6c104814f9c1b13bcd5b64409001c0d05713a1f3529d99"
|
||||
checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba58e782287eb6950247abbf11719f83f5d4e4a5c1f2cd490d30a334bc47c2f4"
|
||||
checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
|
@ -2871,9 +2872,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_provider_adapters"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a229f978260da7c3aabb68cb7dc7316589936680570fe55e50fdd3f97711a4dd"
|
||||
checksum = "d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc"
|
||||
dependencies = [
|
||||
"icu_locid",
|
||||
"icu_locid_transform",
|
||||
|
@ -2884,9 +2885,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_provider_macros"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2abdd3a62551e8337af119c5899e600ca0c88ec8f23a46c60ba216c803dcf1a"
|
||||
checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -2895,9 +2896,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_segmenter"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2dc1e8f4ba33a6a4956770ac5c08570f255d6605519fb3a859a0c0a270a2f8f"
|
||||
checksum = "a717725612346ffc2d7b42c94b820db6908048f39434504cb130e8b46256b0de"
|
||||
dependencies = [
|
||||
"core_maths",
|
||||
"displaydoc",
|
||||
|
@ -2911,7 +2912,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_segmenter_data"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
|
||||
[[package]]
|
||||
name = "id-arena"
|
||||
|
@ -3357,9 +3358,9 @@ checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
|
|||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9d642685b028806386b2b6e75685faadd3eb65a85fff7df711ce18446a422da"
|
||||
checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704"
|
||||
|
||||
[[package]]
|
||||
name = "litrs"
|
||||
|
@ -5806,9 +5807,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.7.4"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219"
|
||||
checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"zerovec",
|
||||
|
@ -6918,9 +6919,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "writeable"
|
||||
version = "0.5.4"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dad7bb64b8ef9c0aa27b6da38b452b0ee9fd82beaf276a87dd796fb55cbae14e"
|
||||
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
|
@ -6982,9 +6983,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yoke"
|
||||
version = "0.7.3"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65e71b2e4f287f467794c671e2b8f8a5f3716b3c829079a1c44740148eff07e4"
|
||||
checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"stable_deref_trait",
|
||||
|
@ -6994,9 +6995,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yoke-derive"
|
||||
version = "0.7.3"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e6936f0cce458098a201c245a11bef556c6a0181129c7034d10d76d1ec3a2b8"
|
||||
checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -7037,9 +7038,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerofrom"
|
||||
version = "0.1.2"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df54d76c3251de27615dfcce21e636c172dafb2549cd7fd93e21c66f6ca6bea2"
|
||||
checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55"
|
||||
dependencies = [
|
||||
"zerofrom-derive",
|
||||
]
|
||||
|
@ -7058,9 +7059,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eff4439ae91fb5c72b8abc12f3f2dbf51bd27e6eadb9f8a5bc8898dddb0e27ea"
|
||||
checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c"
|
||||
dependencies = [
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
|
@ -7069,9 +7070,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b4e5997cbf58990550ef1f0e5124a05e47e1ebd33a84af25739be6031a62c20"
|
||||
checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
@ -141,6 +141,11 @@ interface FeatureCallout {
|
|||
{
|
||||
// A CSS selector for the element to anchor to. The callout will be
|
||||
// anchored to the first visible element that matches this selector.
|
||||
// This supports a special token %triggerTab% that functions as a
|
||||
// selector for the tab that triggered the callout, usually (but not
|
||||
// always) the selected tab. It can be placed at any position in the
|
||||
// selector, like other tokens. For example:
|
||||
// "#tabbrowser-tabs %triggerTab%[visuallyselected] .tab-icon-image"
|
||||
selector: string;
|
||||
// An object representing how the callout should be positioned
|
||||
// relative to the anchor element.
|
||||
|
|
|
@ -16,6 +16,7 @@ Please note that some targeting attributes require stricter controls on the tele
|
|||
* [attributionData](#attributiondata)
|
||||
* [backgroundTaskName](#backgroundtaskname)
|
||||
* [blockedCountByType](#blockedcountbytype)
|
||||
* [browserIsSelected](#browserisselected)
|
||||
* [browserSettings](#browsersettings)
|
||||
* [creditCardsSaved](#creditcardssaved)
|
||||
* [currentDate](#currentdate)
|
||||
|
@ -746,7 +747,7 @@ Returns a breakdown by category of all blocked resources in the past 42 days.
|
|||
#### Definition
|
||||
|
||||
```
|
||||
declare const messageImpressions: { [key: string]: number };
|
||||
declare const blockedCountByType: { [key: string]: number };
|
||||
```
|
||||
|
||||
#### Examples
|
||||
|
@ -761,6 +762,19 @@ Object {
|
|||
}
|
||||
```
|
||||
|
||||
### `browserIsSelected`
|
||||
|
||||
A context property included for all triggers, indicating whether the tab the
|
||||
trigger came from is the currently selected tab. For some triggers that don't
|
||||
actually emit from tabs, this is always true. For other triggers, like
|
||||
`openURL`, this can be false if the trigger happened in a background tab.
|
||||
|
||||
#### Definition
|
||||
|
||||
```ts
|
||||
declare const browserIsSelected: boolean;
|
||||
```
|
||||
|
||||
### `isChinaRepack`
|
||||
|
||||
Does the user use [the partner repack distributed by Mozilla Online](https://github.com/mozilla-partners/mozillaonline),
|
||||
|
|
|
@ -1942,6 +1942,17 @@ export class _ASRouter {
|
|||
if (!skipLoadingMessages) {
|
||||
await this.loadMessagesFromAllProviders();
|
||||
}
|
||||
// Implement the global `browserIsSelected` context property.
|
||||
if (trigger && browser?.constructor.name === "MozBrowser") {
|
||||
if (!Object.prototype.hasOwnProperty.call(trigger, "context")) {
|
||||
trigger.context = {};
|
||||
}
|
||||
if (typeof trigger.context === "object") {
|
||||
trigger.context.browserIsSelected =
|
||||
trigger.context.browserIsSelected ||
|
||||
browser === browser.ownerGlobal.gBrowser?.selectedBrowser;
|
||||
}
|
||||
}
|
||||
const telemetryObject = { tabId };
|
||||
TelemetryStopwatch.start("MS_MESSAGE_REQUEST_TIME_MS", telemetryObject);
|
||||
// Return all the messages so that it can record the Reach event
|
||||
|
|
|
@ -556,7 +556,10 @@ export class FeatureCallout {
|
|||
);
|
||||
continue;
|
||||
}
|
||||
const { selector, arrow_position, panel_position } = anchor;
|
||||
let { selector, arrow_position, panel_position } = anchor;
|
||||
if (!selector) {
|
||||
continue; // No selector provided.
|
||||
}
|
||||
if (panel_position) {
|
||||
let panel_position_string =
|
||||
this._getPanelPositionString(panel_position);
|
||||
|
@ -587,7 +590,28 @@ export class FeatureCallout {
|
|||
);
|
||||
continue;
|
||||
}
|
||||
const element = selector && this.doc.querySelector(selector);
|
||||
let scope = this.doc.documentElement;
|
||||
// %triggerTab% is a special token that gets replaced with :scope, and
|
||||
// instructs us to look for the anchor element within the trigger tab.
|
||||
if (this.browser && selector.includes("%triggerTab%")) {
|
||||
let triggerTab = this.browser.ownerGlobal.gBrowser?.getTabForBrowser(
|
||||
this.browser
|
||||
);
|
||||
if (triggerTab) {
|
||||
selector = selector.replace("%triggerTab%", ":scope");
|
||||
scope = triggerTab;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
let element = scope.querySelector(selector);
|
||||
// The element may not be a child of the scope, but the scope itself. For
|
||||
// example, if we're anchoring directly to the trigger tab, our selector
|
||||
// might look like `%triggerTab%[visuallyselected]`. In this case,
|
||||
// querySelector() will return nothing, but matches() will return true.
|
||||
if (!element && scope.matches(selector)) {
|
||||
element = scope;
|
||||
}
|
||||
if (!element) {
|
||||
continue; // Element doesn't exist at all.
|
||||
}
|
||||
|
@ -614,7 +638,7 @@ export class FeatureCallout {
|
|||
if (
|
||||
this.context === "chrome" &&
|
||||
element.id &&
|
||||
anchor.selector.includes(`#${element.id}`)
|
||||
selector.includes(`#${element.id}`)
|
||||
) {
|
||||
let widget = lazy.CustomizableUI.getWidget(element.id);
|
||||
if (
|
||||
|
|
|
@ -1120,3 +1120,36 @@ add_task(async function first_anchor_selected_is_invalid() {
|
|||
await BrowserTestUtils.closeWindow(win);
|
||||
sandbox.restore();
|
||||
});
|
||||
|
||||
add_task(async function test_triggerTab_selector() {
|
||||
const win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
const config = {
|
||||
win,
|
||||
location: "chrome",
|
||||
context: "chrome",
|
||||
browser: win.gBrowser.selectedBrowser,
|
||||
theme: { preset: "chrome" },
|
||||
};
|
||||
|
||||
const message = JSON.parse(JSON.stringify(testMessage.message));
|
||||
message.content.screens[0].anchors[0].selector =
|
||||
"#tabbrowser-tabs %triggerTab%[visuallyselected]";
|
||||
const sandbox = sinon.createSandbox();
|
||||
|
||||
const doc = win.document;
|
||||
const featureCallout = new FeatureCallout(config);
|
||||
const getAnchorSpy = sandbox.spy(featureCallout, "_getAnchor");
|
||||
featureCallout.showFeatureCallout(message);
|
||||
await waitForCalloutScreen(doc, message.content.screens[0].id);
|
||||
ok(
|
||||
getAnchorSpy.alwaysReturned(
|
||||
sandbox.match(message.content.screens[0].anchors[0])
|
||||
),
|
||||
"The first anchor is selected"
|
||||
);
|
||||
|
||||
win.document.querySelector(calloutCTASelector).click();
|
||||
await waitForCalloutRemoved(win.document);
|
||||
await BrowserTestUtils.closeWindow(win);
|
||||
sandbox.restore();
|
||||
});
|
||||
|
|
|
@ -50,6 +50,7 @@ describe("ASRouter", () => {
|
|||
let FakeToolbarBadgeHub;
|
||||
let FakeMomentsPageHub;
|
||||
let ASRouterTargeting;
|
||||
let gBrowser;
|
||||
let screenImpressions;
|
||||
|
||||
function setMessageProviderPref(value) {
|
||||
|
@ -171,6 +172,14 @@ describe("ASRouter", () => {
|
|||
userId: "adsf",
|
||||
},
|
||||
};
|
||||
gBrowser = {
|
||||
selectedBrowser: {
|
||||
constructor: { name: "MozBrowser" },
|
||||
get ownerGlobal() {
|
||||
return { gBrowser };
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
ASRouterPreferences.specialConditions = {
|
||||
someCondition: true,
|
||||
|
@ -236,7 +245,7 @@ describe("ASRouter", () => {
|
|||
ASRouterTargeting,
|
||||
ASRouterTriggerListeners,
|
||||
QueryCache,
|
||||
gBrowser: { selectedBrowser: {} },
|
||||
gBrowser,
|
||||
gURLBar: {},
|
||||
isSeparateAboutWelcome: true,
|
||||
AttributionCode: fakeAttributionCode,
|
||||
|
@ -1591,7 +1600,7 @@ describe("ASRouter", () => {
|
|||
|
||||
await Router.sendTriggerMessage({
|
||||
tabId: 0,
|
||||
browser: {},
|
||||
browser: gBrowser.selectedBrowser,
|
||||
id: "firstRun",
|
||||
});
|
||||
|
||||
|
@ -1601,7 +1610,7 @@ describe("ASRouter", () => {
|
|||
{
|
||||
id: "firstRun",
|
||||
param: undefined,
|
||||
context: undefined,
|
||||
context: { browserIsSelected: true },
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -70,7 +70,11 @@ describe("ASRTargeting docs", () => {
|
|||
// "allow" includes targeting attributes that are not implemented by
|
||||
// ASRTargetingAttributes. For example trigger context passed to the evaluation
|
||||
// context in when a trigger runs or ASRouter state used in the evaluation.
|
||||
const allow = ["messageImpressions", "screenImpressions"];
|
||||
const allow = [
|
||||
"messageImpressions",
|
||||
"screenImpressions",
|
||||
"browserIsSelected",
|
||||
];
|
||||
for (const targetingParam of DOCS_TARGETING_HEADINGS.filter(
|
||||
doc => !allow.includes(doc)
|
||||
)) {
|
||||
|
|
|
@ -943,12 +943,9 @@ export class TelemetryFeed {
|
|||
this.handleSetPref(action);
|
||||
break;
|
||||
case at.WEATHER_IMPRESSION:
|
||||
this.handleWeatherUserEvent(action);
|
||||
break;
|
||||
case at.WEATHER_LOAD_ERROR:
|
||||
this.handleWeatherUserEvent(action);
|
||||
break;
|
||||
case at.WEATHER_OPEN_PROVIDER_URL:
|
||||
case at.WEATHER_LOCATION_DATA_UPDATE:
|
||||
this.handleWeatherUserEvent(action);
|
||||
break;
|
||||
}
|
||||
|
@ -996,6 +993,11 @@ export class TelemetryFeed {
|
|||
newtab_visit_id: session.session_id,
|
||||
});
|
||||
break;
|
||||
case "WEATHER_LOCATION_DATA_UPDATE":
|
||||
Glean.newtab.weatherLocationSelected.record({
|
||||
newtab_visit_id: session.session_id,
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -415,6 +415,23 @@ newtab:
|
|||
send_in_pings:
|
||||
- newtab
|
||||
|
||||
weather_location_selected:
|
||||
type: event
|
||||
description: >
|
||||
Recorded when a user selects a location for weather widget
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1900103
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1900103
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- nbarrett@mozilla.com
|
||||
expires: never
|
||||
extra_keys:
|
||||
newtab_visit_id: *newtab_visit_id
|
||||
send_in_pings:
|
||||
- newtab
|
||||
|
||||
newtab.search:
|
||||
enabled:
|
||||
|
|
|
@ -3,26 +3,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
if ! test "$HAVE_64BIT_BUILD"; then
|
||||
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "release"; then
|
||||
if ! test "$MOZ_DEBUG"; then
|
||||
if ! test "$USE_STUB_INSTALLER"; then
|
||||
# Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
|
||||
echo "ERROR: STUB installer expected to be enabled but"
|
||||
echo "ERROR: USE_STUB_INSTALLER is not specified in the environment"
|
||||
exit 1
|
||||
fi
|
||||
MOZ_STUB_INSTALLER=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
|
||||
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
|
||||
# specified. It should never point to the "official" branding directory.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"af": {
|
||||
"pin": false,
|
||||
|
@ -35,7 +35,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"an": {
|
||||
"pin": false,
|
||||
|
@ -54,7 +54,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ar": {
|
||||
"pin": false,
|
||||
|
@ -73,7 +73,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ast": {
|
||||
"pin": false,
|
||||
|
@ -92,7 +92,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"az": {
|
||||
"pin": false,
|
||||
|
@ -111,7 +111,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"be": {
|
||||
"pin": false,
|
||||
|
@ -130,7 +130,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"bg": {
|
||||
"pin": false,
|
||||
|
@ -149,7 +149,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"bn": {
|
||||
"pin": false,
|
||||
|
@ -168,7 +168,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"bo": {
|
||||
"pin": false,
|
||||
|
@ -187,7 +187,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"br": {
|
||||
"pin": false,
|
||||
|
@ -206,7 +206,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"brx": {
|
||||
"pin": false,
|
||||
|
@ -225,7 +225,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"bs": {
|
||||
"pin": false,
|
||||
|
@ -244,7 +244,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ca": {
|
||||
"pin": false,
|
||||
|
@ -263,7 +263,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ca-valencia": {
|
||||
"pin": false,
|
||||
|
@ -282,7 +282,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"cak": {
|
||||
"pin": false,
|
||||
|
@ -301,7 +301,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ckb": {
|
||||
"pin": false,
|
||||
|
@ -320,7 +320,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"cs": {
|
||||
"pin": false,
|
||||
|
@ -339,7 +339,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"cy": {
|
||||
"pin": false,
|
||||
|
@ -358,7 +358,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"da": {
|
||||
"pin": false,
|
||||
|
@ -377,7 +377,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"de": {
|
||||
"pin": false,
|
||||
|
@ -396,7 +396,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"dsb": {
|
||||
"pin": false,
|
||||
|
@ -415,7 +415,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"el": {
|
||||
"pin": false,
|
||||
|
@ -434,7 +434,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"en-CA": {
|
||||
"pin": false,
|
||||
|
@ -453,7 +453,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"en-GB": {
|
||||
"pin": false,
|
||||
|
@ -472,7 +472,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"eo": {
|
||||
"pin": false,
|
||||
|
@ -491,7 +491,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"es-AR": {
|
||||
"pin": false,
|
||||
|
@ -510,7 +510,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"es-CL": {
|
||||
"pin": false,
|
||||
|
@ -529,7 +529,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"es-ES": {
|
||||
"pin": false,
|
||||
|
@ -548,7 +548,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"es-MX": {
|
||||
"pin": false,
|
||||
|
@ -567,7 +567,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"et": {
|
||||
"pin": false,
|
||||
|
@ -586,7 +586,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"eu": {
|
||||
"pin": false,
|
||||
|
@ -605,7 +605,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"fa": {
|
||||
"pin": false,
|
||||
|
@ -624,7 +624,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ff": {
|
||||
"pin": false,
|
||||
|
@ -643,7 +643,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"fi": {
|
||||
"pin": false,
|
||||
|
@ -662,7 +662,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"fr": {
|
||||
"pin": false,
|
||||
|
@ -681,7 +681,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"fur": {
|
||||
"pin": false,
|
||||
|
@ -700,7 +700,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"fy-NL": {
|
||||
"pin": false,
|
||||
|
@ -719,7 +719,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ga-IE": {
|
||||
"pin": false,
|
||||
|
@ -738,7 +738,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"gd": {
|
||||
"pin": false,
|
||||
|
@ -757,7 +757,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"gl": {
|
||||
"pin": false,
|
||||
|
@ -776,7 +776,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"gn": {
|
||||
"pin": false,
|
||||
|
@ -795,7 +795,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"gu-IN": {
|
||||
"pin": false,
|
||||
|
@ -814,7 +814,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"he": {
|
||||
"pin": false,
|
||||
|
@ -833,7 +833,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"hi-IN": {
|
||||
"pin": false,
|
||||
|
@ -852,7 +852,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"hr": {
|
||||
"pin": false,
|
||||
|
@ -871,7 +871,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"hsb": {
|
||||
"pin": false,
|
||||
|
@ -890,7 +890,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"hu": {
|
||||
"pin": false,
|
||||
|
@ -909,7 +909,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"hy-AM": {
|
||||
"pin": false,
|
||||
|
@ -928,7 +928,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"hye": {
|
||||
"pin": false,
|
||||
|
@ -947,7 +947,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ia": {
|
||||
"pin": false,
|
||||
|
@ -966,7 +966,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"id": {
|
||||
"pin": false,
|
||||
|
@ -985,7 +985,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"is": {
|
||||
"pin": false,
|
||||
|
@ -1004,7 +1004,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"it": {
|
||||
"pin": false,
|
||||
|
@ -1023,7 +1023,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ja": {
|
||||
"pin": false,
|
||||
|
@ -1040,7 +1040,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ja-JP-mac": {
|
||||
"pin": false,
|
||||
|
@ -1048,7 +1048,7 @@
|
|||
"macosx64",
|
||||
"macosx64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ka": {
|
||||
"pin": false,
|
||||
|
@ -1067,7 +1067,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"kab": {
|
||||
"pin": false,
|
||||
|
@ -1086,7 +1086,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"kk": {
|
||||
"pin": false,
|
||||
|
@ -1105,7 +1105,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"km": {
|
||||
"pin": false,
|
||||
|
@ -1124,7 +1124,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"kn": {
|
||||
"pin": false,
|
||||
|
@ -1143,7 +1143,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ko": {
|
||||
"pin": false,
|
||||
|
@ -1162,7 +1162,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"lij": {
|
||||
"pin": false,
|
||||
|
@ -1181,7 +1181,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"lo": {
|
||||
"pin": false,
|
||||
|
@ -1200,7 +1200,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"lt": {
|
||||
"pin": false,
|
||||
|
@ -1219,7 +1219,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ltg": {
|
||||
"pin": false,
|
||||
|
@ -1238,7 +1238,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"lv": {
|
||||
"pin": false,
|
||||
|
@ -1257,7 +1257,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"meh": {
|
||||
"pin": false,
|
||||
|
@ -1276,7 +1276,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"mk": {
|
||||
"pin": false,
|
||||
|
@ -1295,7 +1295,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"mr": {
|
||||
"pin": false,
|
||||
|
@ -1314,7 +1314,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ms": {
|
||||
"pin": false,
|
||||
|
@ -1333,7 +1333,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"my": {
|
||||
"pin": false,
|
||||
|
@ -1352,7 +1352,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"nb-NO": {
|
||||
"pin": false,
|
||||
|
@ -1371,7 +1371,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ne-NP": {
|
||||
"pin": false,
|
||||
|
@ -1390,7 +1390,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"nl": {
|
||||
"pin": false,
|
||||
|
@ -1409,7 +1409,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"nn-NO": {
|
||||
"pin": false,
|
||||
|
@ -1428,7 +1428,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"oc": {
|
||||
"pin": false,
|
||||
|
@ -1447,7 +1447,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"pa-IN": {
|
||||
"pin": false,
|
||||
|
@ -1466,7 +1466,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"pl": {
|
||||
"pin": false,
|
||||
|
@ -1485,7 +1485,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"pt-BR": {
|
||||
"pin": false,
|
||||
|
@ -1504,7 +1504,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"pt-PT": {
|
||||
"pin": false,
|
||||
|
@ -1523,7 +1523,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"rm": {
|
||||
"pin": false,
|
||||
|
@ -1542,7 +1542,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ro": {
|
||||
"pin": false,
|
||||
|
@ -1561,7 +1561,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ru": {
|
||||
"pin": false,
|
||||
|
@ -1580,7 +1580,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sat": {
|
||||
"pin": false,
|
||||
|
@ -1599,7 +1599,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sc": {
|
||||
"pin": false,
|
||||
|
@ -1618,7 +1618,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"scn": {
|
||||
"pin": false,
|
||||
|
@ -1637,7 +1637,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sco": {
|
||||
"pin": false,
|
||||
|
@ -1656,7 +1656,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"si": {
|
||||
"pin": false,
|
||||
|
@ -1675,7 +1675,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sk": {
|
||||
"pin": false,
|
||||
|
@ -1694,7 +1694,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"skr": {
|
||||
"pin": false,
|
||||
|
@ -1713,7 +1713,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sl": {
|
||||
"pin": false,
|
||||
|
@ -1732,7 +1732,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"son": {
|
||||
"pin": false,
|
||||
|
@ -1751,7 +1751,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sq": {
|
||||
"pin": false,
|
||||
|
@ -1770,7 +1770,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sr": {
|
||||
"pin": false,
|
||||
|
@ -1789,7 +1789,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"sv-SE": {
|
||||
"pin": false,
|
||||
|
@ -1808,7 +1808,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"szl": {
|
||||
"pin": false,
|
||||
|
@ -1827,7 +1827,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ta": {
|
||||
"pin": false,
|
||||
|
@ -1846,7 +1846,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"te": {
|
||||
"pin": false,
|
||||
|
@ -1865,7 +1865,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"tg": {
|
||||
"pin": false,
|
||||
|
@ -1884,7 +1884,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"th": {
|
||||
"pin": false,
|
||||
|
@ -1903,7 +1903,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"tl": {
|
||||
"pin": false,
|
||||
|
@ -1922,7 +1922,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"tr": {
|
||||
"pin": false,
|
||||
|
@ -1941,7 +1941,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"trs": {
|
||||
"pin": false,
|
||||
|
@ -1960,7 +1960,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"uk": {
|
||||
"pin": false,
|
||||
|
@ -1979,7 +1979,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"ur": {
|
||||
"pin": false,
|
||||
|
@ -1998,7 +1998,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"uz": {
|
||||
"pin": false,
|
||||
|
@ -2017,7 +2017,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"vi": {
|
||||
"pin": false,
|
||||
|
@ -2036,7 +2036,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"wo": {
|
||||
"pin": false,
|
||||
|
@ -2055,7 +2055,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"xh": {
|
||||
"pin": false,
|
||||
|
@ -2074,7 +2074,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"zh-CN": {
|
||||
"pin": false,
|
||||
|
@ -2093,7 +2093,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
},
|
||||
"zh-TW": {
|
||||
"pin": false,
|
||||
|
@ -2112,6 +2112,6 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6196da8b122cbf67fac79486cbfd5b2ed9f7096b"
|
||||
"revision": "f50e933c8752cfe56644f509fb816644b26adab8"
|
||||
}
|
||||
}
|
|
@ -24,4 +24,32 @@ with only_when(target_has_linux_kernel & compile_environment):
|
|||
|
||||
set_config("MOZ_NO_PIE_COMPAT", depends_if("MOZ_NO_PIE_COMPAT")(lambda _: True))
|
||||
|
||||
|
||||
@depends(target, update_channel, have_64_bit, moz_debug, "MOZ_AUTOMATION")
|
||||
@imports(_from="os", _import="environ")
|
||||
def requires_stub_installer(
|
||||
target, update_channel, have_64_bit, moz_debug, moz_automation
|
||||
):
|
||||
if target.kernel != "WINNT":
|
||||
return False
|
||||
if have_64_bit:
|
||||
return False
|
||||
if update_channel not in ("nightly", "nightly-try", "aurora", "beta", "release"):
|
||||
return False
|
||||
|
||||
if moz_debug:
|
||||
return False
|
||||
|
||||
# Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
|
||||
if moz_automation and not environ.get("USE_STUB_INSTALLER"):
|
||||
die(
|
||||
"STUB installer expected to be enabled but "
|
||||
"USE_STUB_INSTALLER is not specified in the environment"
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
imply_option("MOZ_STUB_INSTALLER", True, when=requires_stub_installer)
|
||||
|
||||
include("../toolkit/moz.configure")
|
||||
|
|
|
@ -189,14 +189,6 @@ panelview {
|
|||
&:not([visible]) {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
/* Prevent a scrollbar from appearing while the animation for transitioning from
|
||||
one view to another runs, which would otherwise happen if the new view has
|
||||
more height than the old one because that would mean that during the
|
||||
animation the height of the multiview will be too short for the new view. */
|
||||
&[transitioning] > .panel-viewcontainer > .panel-viewstack > panelview > .panel-subview-body {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-viewcontainer {
|
||||
|
|
|
@ -1201,9 +1201,14 @@ public:
|
|||
J.objectBegin();
|
||||
J.attribute("pretty", getQualifiedName(&Field));
|
||||
J.attribute("sym", getMangledName(CurMangleContext, &Field));
|
||||
|
||||
QualType FieldType = Field.getType();
|
||||
QualType CanonicalFieldType = FieldType.getCanonicalType();
|
||||
J.attribute("type", CanonicalFieldType.getAsString());
|
||||
LangOptions langOptions;
|
||||
PrintingPolicy Policy(langOptions);
|
||||
Policy.PrintCanonicalTypes = true;
|
||||
J.attribute("type", CanonicalFieldType.getAsString(Policy));
|
||||
|
||||
const TagDecl *tagDecl = CanonicalFieldType->getAsTagDecl();
|
||||
if (!tagDecl) {
|
||||
// Try again piercing any pointers/references involved. Note that our
|
||||
|
|
|
@ -1045,7 +1045,6 @@ def mozilla_official(official):
|
|||
|
||||
set_config("MOZILLA_OFFICIAL", mozilla_official)
|
||||
set_define("MOZILLA_OFFICIAL", mozilla_official)
|
||||
add_old_configure_assignment("MOZILLA_OFFICIAL", mozilla_official)
|
||||
|
||||
# Allow specifying custom paths to the version files used by the milestone() function below.
|
||||
option(
|
||||
|
|
|
@ -102,7 +102,6 @@ def old_configure_options(*options):
|
|||
"--libdir",
|
||||
"--prefix",
|
||||
"--with-branding",
|
||||
"--with-distribution-id",
|
||||
"--x-includes",
|
||||
"--x-libraries",
|
||||
)
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
# ==============================================================
|
||||
@depends(build_project, target)
|
||||
def updater_default(build_project, target):
|
||||
if build_project == "tools/update-programs":
|
||||
return True
|
||||
return build_project != "mobile/android" and target.os != "iOS"
|
||||
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ class SearchBox extends PureComponent {
|
|||
onKeyDown: PropTypes.func,
|
||||
placeholder: PropTypes.string.isRequired,
|
||||
summary: PropTypes.string,
|
||||
summaryId: PropTypes.string,
|
||||
summaryTooltip: PropTypes.string,
|
||||
type: PropTypes.string,
|
||||
value: PropTypes.string,
|
||||
|
@ -215,6 +216,7 @@ class SearchBox extends PureComponent {
|
|||
const {
|
||||
autocompleteProvider,
|
||||
summary,
|
||||
summaryId,
|
||||
summaryTooltip,
|
||||
learnMoreTitle,
|
||||
learnMoreUrl,
|
||||
|
@ -226,12 +228,10 @@ class SearchBox extends PureComponent {
|
|||
autocompleteProvider && this.state.focused && value !== "";
|
||||
const showLearnMoreLink = learnMoreUrl && value === "";
|
||||
|
||||
const inputClassList = [`devtools-${type}input`];
|
||||
|
||||
return dom.div(
|
||||
{ className: "devtools-searchbox" },
|
||||
dom.input({
|
||||
className: inputClassList.join(" "),
|
||||
className: `devtools-${type}input`,
|
||||
onBlur: this.onBlur,
|
||||
onChange: e => this.onChange(e.target.value),
|
||||
onFocus: this.onFocus,
|
||||
|
@ -240,6 +240,7 @@ class SearchBox extends PureComponent {
|
|||
ref: this.inputRef,
|
||||
value,
|
||||
type: "search",
|
||||
"aria-describedby": (summary && summaryId) || undefined,
|
||||
}),
|
||||
showLearnMoreLink &&
|
||||
MDNLink({
|
||||
|
@ -250,7 +251,8 @@ class SearchBox extends PureComponent {
|
|||
? dom.span(
|
||||
{
|
||||
className: "devtools-searchinput-summary",
|
||||
title: summaryTooltip || "",
|
||||
id: summaryId,
|
||||
title: summaryTooltip,
|
||||
},
|
||||
summary
|
||||
)
|
||||
|
|
|
@ -65,8 +65,31 @@ window.onload = function () {
|
|||
ok($(".devtools-searchinput-clear").hidden, "Clear button was hidden");
|
||||
}
|
||||
|
||||
async function testSearchBoxWithSummary() {
|
||||
const { $ } = await createComponentTest(SearchBox, {
|
||||
summary: "my summary",
|
||||
summaryId: "my-summary-id",
|
||||
summaryTooltip: "my summary tooltip",
|
||||
});
|
||||
|
||||
const summaryEl = $(".devtools-searchinput-summary");
|
||||
is(summaryEl.textContent, "my summary", "Summary has expected content");
|
||||
is(
|
||||
summaryEl.getAttribute("title"),
|
||||
"my summary tooltip",
|
||||
"Summary has expected title attribute"
|
||||
);
|
||||
is(summaryEl.id, "my-summary-id", "Summary has expected id");
|
||||
is(
|
||||
$(".devtools-searchinput").getAttribute("aria-describedby"),
|
||||
"my-summary-id",
|
||||
"input aria-describedby attribute is the summary element id"
|
||||
);
|
||||
}
|
||||
|
||||
add_task(async function () {
|
||||
await testSimpleSearchBox();
|
||||
await testSearchBoxWithSummary();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -475,6 +475,8 @@ iframe {
|
|||
.devtools-searchbox {
|
||||
display: inline-flex;
|
||||
flex-grow: 1;
|
||||
gap: 4px;
|
||||
padding-inline-end: 4px;
|
||||
position: relative;
|
||||
border: 1px solid transparent;
|
||||
height: 100%;
|
||||
|
@ -515,7 +517,7 @@ iframe {
|
|||
.devtools-searchinput-clear {
|
||||
flex: 0 0 auto;
|
||||
align-self: center;
|
||||
margin: 0 4px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
width: 16px;
|
||||
|
|
|
@ -711,6 +711,15 @@ a.learn-more-link.webconsole-learn-more-link {
|
|||
min-width: 150px;
|
||||
}
|
||||
|
||||
/* We always render the "X hidden" element in the filter bar for accessibility.
|
||||
But when the filter input is not focused, or empty, and there is no filtered messages,
|
||||
we don't want to display it as it provides little value
|
||||
*/
|
||||
.webconsole-filterbar-primary[data-has-filtered-by-text="false"]
|
||||
.devtools-searchbox input:is(:not(:focus),:empty) ~ #devtools-console-output-filter-summary {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Special casing String reps, and warning/error string colors
|
||||
* so they are legible */
|
||||
|
|
|
@ -300,23 +300,18 @@ class FilterBar extends Component {
|
|||
renderSearchBox() {
|
||||
const { dispatch, filteredMessagesCount } = this.props;
|
||||
|
||||
let searchBoxSummary;
|
||||
let searchBoxSummaryTooltip;
|
||||
if (filteredMessagesCount.text > 0) {
|
||||
searchBoxSummary = l10n.getStr("webconsole.filteredMessagesByText.label");
|
||||
searchBoxSummary = PluralForm.get(
|
||||
filteredMessagesCount.text,
|
||||
searchBoxSummary
|
||||
).replace("#1", filteredMessagesCount.text);
|
||||
// We want the summary to always be announced to screen reader, even if there are
|
||||
// no filtered out messages.
|
||||
// We'll hide the "0 hidden" summary when the input field is not focused.
|
||||
const searchBoxSummary = PluralForm.get(
|
||||
filteredMessagesCount.text,
|
||||
l10n.getStr("webconsole.filteredMessagesByText.label")
|
||||
).replace("#1", filteredMessagesCount.text);
|
||||
|
||||
searchBoxSummaryTooltip = l10n.getStr(
|
||||
"webconsole.filteredMessagesByText.tooltip"
|
||||
);
|
||||
searchBoxSummaryTooltip = PluralForm.get(
|
||||
filteredMessagesCount.text,
|
||||
searchBoxSummaryTooltip
|
||||
).replace("#1", filteredMessagesCount.text);
|
||||
}
|
||||
const searchBoxSummaryTooltip = PluralForm.get(
|
||||
filteredMessagesCount.text,
|
||||
l10n.getStr("webconsole.filteredMessagesByText.tooltip")
|
||||
).replace("#1", filteredMessagesCount.text);
|
||||
|
||||
return SearchBox({
|
||||
type: "filter",
|
||||
|
@ -325,6 +320,7 @@ class FilterBar extends Component {
|
|||
onChange: text => dispatch(actions.filterTextSet(text)),
|
||||
summary: searchBoxSummary,
|
||||
summaryTooltip: searchBoxSummaryTooltip,
|
||||
summaryId: "devtools-console-output-filter-summary",
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -373,7 +369,8 @@ class FilterBar extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { closeButtonVisible, displayMode } = this.props;
|
||||
const { closeButtonVisible, displayMode, filteredMessagesCount } =
|
||||
this.props;
|
||||
|
||||
const isNarrow = displayMode === FILTERBAR_DISPLAY_MODES.NARROW;
|
||||
const isWide = displayMode === FILTERBAR_DISPLAY_MODES.WIDE;
|
||||
|
@ -390,6 +387,7 @@ class FilterBar extends Component {
|
|||
className:
|
||||
"devtools-toolbar devtools-input-toolbar webconsole-filterbar-primary",
|
||||
key: "primary-bar",
|
||||
"data-has-filtered-by-text": filteredMessagesCount.text > 0,
|
||||
},
|
||||
clearButton,
|
||||
separator,
|
||||
|
|
|
@ -79,8 +79,14 @@ describe("FilterBar component:", () => {
|
|||
expect(textFilter.attr("type")).toBe("search");
|
||||
expect(textFilter.attr("value")).toBe("");
|
||||
|
||||
// Text filter input summary element
|
||||
const textFilterSummary = textInput.children().eq(1);
|
||||
expect(textFilterSummary.attr("class")).toBe(
|
||||
"devtools-searchinput-summary"
|
||||
);
|
||||
|
||||
// Text filter input clear button
|
||||
const textFilterClearButton = textInput.children().eq(1);
|
||||
const textFilterClearButton = textInput.children().eq(2);
|
||||
expect(textFilterClearButton.attr("class")).toBe(
|
||||
"devtools-searchinput-clear"
|
||||
);
|
||||
|
@ -141,15 +147,6 @@ describe("FilterBar component:", () => {
|
|||
expect(message.prop("title")).toBe("3 items hidden by text filter");
|
||||
});
|
||||
|
||||
it("does not display the number of hidden messages when there are no messages", () => {
|
||||
const store = setupStore();
|
||||
store.dispatch(actions.filterTextSet("qwerty"));
|
||||
const wrapper = mount(Provider({ store }, getFilterBar()));
|
||||
|
||||
const toolbar = wrapper.find(".devtools-searchinput-summary");
|
||||
expect(toolbar.exists()).toBeFalsy();
|
||||
});
|
||||
|
||||
it("Displays a filter buttons bar on its own element in narrow displayMode", () => {
|
||||
const store = setupStore();
|
||||
|
||||
|
|
|
@ -313,94 +313,94 @@ NS_IMETHODIMP DecryptingInputStream<CipherStrategy>::Seek(const int32_t aWhence,
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
// Can't call this just in NS_SEEK_CUR case, because getting the decrypted
|
||||
// size below changes the current position.
|
||||
int64_t current;
|
||||
nsresult rv = Tell(¤t);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
// XXX The size of the stream could also be queried and stored once only.
|
||||
auto decryptedStreamSizeOrErr = [this]() -> Result<int64_t, nsresult> {
|
||||
nsresult rv = (*mBaseSeekableStream)->Seek(NS_SEEK_SET, 0);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
|
||||
uint64_t baseStreamSize;
|
||||
rv = (*mBaseStream)->Available(&baseStreamSize);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
|
||||
if (!baseStreamSize) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
rv = (*mBaseSeekableStream)
|
||||
->Seek(NS_SEEK_END, -static_cast<int64_t>(*mBlockSize));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
|
||||
mNextByte = 0;
|
||||
mPlainBytes = 0;
|
||||
|
||||
uint32_t bytesRead;
|
||||
rv = ParseNextChunk(&bytesRead);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
MOZ_ASSERT(bytesRead);
|
||||
|
||||
// XXX Shouldn't ParseNextChunk better update mPlainBytes?
|
||||
mPlainBytes = bytesRead;
|
||||
|
||||
mNextByte = bytesRead;
|
||||
|
||||
int64_t current;
|
||||
rv = Tell(¤t);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
|
||||
return current;
|
||||
}();
|
||||
|
||||
if (decryptedStreamSizeOrErr.isErr()) {
|
||||
return decryptedStreamSizeOrErr.unwrapErr();
|
||||
}
|
||||
|
||||
int64_t baseBlocksOffset;
|
||||
int64_t nextByteOffset;
|
||||
switch (aWhence) {
|
||||
case NS_SEEK_CUR:
|
||||
// XXX Simplify this without using Tell.
|
||||
{
|
||||
int64_t current;
|
||||
nsresult rv = Tell(¤t);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
aOffset += current;
|
||||
}
|
||||
aOffset += current;
|
||||
break;
|
||||
|
||||
case NS_SEEK_SET:
|
||||
break;
|
||||
|
||||
case NS_SEEK_END:
|
||||
// XXX Simplify this without using Seek/Tell.
|
||||
{
|
||||
// XXX The size of the stream could also be queried and stored once
|
||||
// only.
|
||||
nsresult rv = (*mBaseSeekableStream)->Seek(NS_SEEK_SET, 0);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
uint64_t baseStreamSize;
|
||||
rv = (*mBaseStream)->Available(&baseStreamSize);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
auto decryptedStreamSizeOrErr = [baseStreamSize,
|
||||
this]() -> Result<int64_t, nsresult> {
|
||||
if (!baseStreamSize) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult rv =
|
||||
(*mBaseSeekableStream)
|
||||
->Seek(NS_SEEK_END, -static_cast<int64_t>(*mBlockSize));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
|
||||
mNextByte = 0;
|
||||
mPlainBytes = 0;
|
||||
|
||||
uint32_t bytesRead;
|
||||
rv = ParseNextChunk(&bytesRead);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
MOZ_ASSERT(bytesRead);
|
||||
|
||||
// XXX Shouldn't ParseNextChunk better update mPlainBytes?
|
||||
mPlainBytes = bytesRead;
|
||||
|
||||
mNextByte = bytesRead;
|
||||
|
||||
int64_t current;
|
||||
rv = Tell(¤t);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return Err(rv);
|
||||
}
|
||||
|
||||
return current;
|
||||
}();
|
||||
|
||||
if (decryptedStreamSizeOrErr.isErr()) {
|
||||
return decryptedStreamSizeOrErr.unwrapErr();
|
||||
}
|
||||
|
||||
aOffset += decryptedStreamSizeOrErr.unwrap();
|
||||
}
|
||||
aOffset += decryptedStreamSizeOrErr.inspect();
|
||||
break;
|
||||
|
||||
default:
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
if (aOffset < 0 || aOffset > decryptedStreamSizeOrErr.inspect()) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
baseBlocksOffset = aOffset / mEncryptedBlock->MaxPayloadLength();
|
||||
nextByteOffset = aOffset % mEncryptedBlock->MaxPayloadLength();
|
||||
|
||||
// XXX If we remain in the same block as before, we can skip this.
|
||||
nsresult rv =
|
||||
rv =
|
||||
(*mBaseSeekableStream)->Seek(NS_SEEK_SET, baseBlocksOffset * *mBlockSize);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
|
@ -420,15 +420,10 @@ NS_IMETHODIMP DecryptingInputStream<CipherStrategy>::Seek(const int32_t aWhence,
|
|||
// XXX We could know earlier if we positioned us after the last block.
|
||||
if (!readBytes) {
|
||||
// XXX It seems that this check was added to prevent seeking before the
|
||||
// start of the base stream during the Seek call below. However, it also
|
||||
// looks like a check for not allowing seeking past the end of the stream
|
||||
// (by returning NS_ERROR_ILLEGAL_VALUE), but it does that only for one
|
||||
// special case when the stream is empty. In any case, proper checks for
|
||||
// not allowing seeking past the end of the stream should be added
|
||||
// somewhere after the aWhence switch instead of doing it partially here.
|
||||
// start of the base stream during the Seek call below.
|
||||
if (baseBlocksOffset == 0) {
|
||||
// The stream is empty.
|
||||
return aOffset == 0 ? NS_OK : NS_ERROR_ILLEGAL_VALUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv = (*mBaseSeekableStream)->Seek(NS_SEEK_CUR, -*mBlockSize);
|
||||
|
|
|
@ -639,9 +639,12 @@ enum struct SeekOffset {
|
|||
MinusHalfDataSize,
|
||||
PlusHalfDataSize,
|
||||
PlusDataSize,
|
||||
MinusDataSize
|
||||
MinusDataSize,
|
||||
MinusDataSizeAndOne,
|
||||
PlusOne,
|
||||
MinusOne
|
||||
};
|
||||
using SeekOp = std::pair<int32_t, SeekOffset>;
|
||||
using SeekOp = std::tuple<int32_t, SeekOffset, nsresult>;
|
||||
|
||||
using PackedSeekTestParams = std::tuple<size_t, size_t, std::vector<SeekOp>>;
|
||||
|
||||
|
@ -666,7 +669,7 @@ std::string SeekTestParamToString(
|
|||
ss << "data" << testParams.mDataSize << kSeparator << "writechunk"
|
||||
<< testParams.mBlockSize << kSeparator;
|
||||
for (const auto& seekOp : testParams.mSeekOps) {
|
||||
switch (seekOp.first) {
|
||||
switch (std::get<0>(seekOp)) {
|
||||
case nsISeekableStream::NS_SEEK_SET:
|
||||
ss << "Set";
|
||||
break;
|
||||
|
@ -679,7 +682,7 @@ std::string SeekTestParamToString(
|
|||
default:
|
||||
MOZ_CRASH("Unknown whence");
|
||||
};
|
||||
switch (seekOp.second) {
|
||||
switch (std::get<1>(seekOp)) {
|
||||
case SeekOffset::Zero:
|
||||
ss << "Zero";
|
||||
break;
|
||||
|
@ -692,9 +695,18 @@ std::string SeekTestParamToString(
|
|||
case SeekOffset::MinusDataSize:
|
||||
ss << "MinusDataSize";
|
||||
break;
|
||||
case SeekOffset::MinusDataSizeAndOne:
|
||||
ss << "MinusDataSizeAndOne";
|
||||
break;
|
||||
case SeekOffset::PlusDataSize:
|
||||
ss << "PlusDataSize";
|
||||
break;
|
||||
case SeekOffset::PlusOne:
|
||||
ss << "PlusOne";
|
||||
break;
|
||||
case SeekOffset::MinusOne:
|
||||
ss << "MinusOne";
|
||||
break;
|
||||
};
|
||||
}
|
||||
return ss.str();
|
||||
|
@ -727,7 +739,7 @@ class ParametrizedSeekCryptTest
|
|||
|
||||
uint32_t accumulatedOffset = 0;
|
||||
for (const auto& seekOp : testParams.mSeekOps) {
|
||||
const auto offset = [offsetKind = seekOp.second,
|
||||
const auto offset = [offsetKind = std::get<1>(seekOp),
|
||||
dataSize = testParams.mDataSize]() -> int64_t {
|
||||
switch (offsetKind) {
|
||||
case SeekOffset::Zero:
|
||||
|
@ -738,25 +750,61 @@ class ParametrizedSeekCryptTest
|
|||
return static_cast<int64_t>(dataSize) / 2;
|
||||
case SeekOffset::MinusDataSize:
|
||||
return -static_cast<int64_t>(dataSize);
|
||||
case SeekOffset::MinusDataSizeAndOne:
|
||||
return -static_cast<int64_t>(dataSize + 1);
|
||||
case SeekOffset::PlusDataSize:
|
||||
return static_cast<int64_t>(dataSize);
|
||||
case SeekOffset::PlusOne:
|
||||
return 1;
|
||||
case SeekOffset::MinusOne:
|
||||
return -1;
|
||||
}
|
||||
MOZ_CRASH("Unknown SeekOffset");
|
||||
}();
|
||||
switch (seekOp.first) {
|
||||
case nsISeekableStream::NS_SEEK_SET:
|
||||
accumulatedOffset = offset;
|
||||
break;
|
||||
case nsISeekableStream::NS_SEEK_CUR:
|
||||
accumulatedOffset += offset;
|
||||
break;
|
||||
case nsISeekableStream::NS_SEEK_END:
|
||||
accumulatedOffset = testParams.mDataSize + offset;
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("Unknown whence");
|
||||
nsresult rv = inStream->Seek(std::get<0>(seekOp), offset);
|
||||
EXPECT_EQ(std::get<2>(seekOp), rv);
|
||||
// XXX Need to skip remaining checks for this specific case for now.
|
||||
if (std::get<0>(seekOp) == nsISeekableStream::NS_SEEK_END &&
|
||||
std::get<1>(seekOp) == SeekOffset::PlusOne &&
|
||||
testParams.mDataSize != 0) {
|
||||
// XXX The seek operation leaves invalid state after trying to position
|
||||
// past the end of the stream, other checks must be skipped because of
|
||||
// that!
|
||||
return;
|
||||
}
|
||||
// XXX Need to skip remaining checks for this specific case for now.
|
||||
if (std::get<0>(seekOp) == nsISeekableStream::NS_SEEK_CUR &&
|
||||
std::get<1>(seekOp) == SeekOffset::MinusOne &&
|
||||
testParams.mDataSize != 0) {
|
||||
// XXX The seek operation leaves invalid state after trying to position
|
||||
// before the start of the stream, other checks must be skipped because
|
||||
// of that!
|
||||
return;
|
||||
}
|
||||
// XXX Need to skip remaining checks for this specific case for now.
|
||||
if (std::get<0>(seekOp) == nsISeekableStream::NS_SEEK_END &&
|
||||
std::get<1>(seekOp) == SeekOffset::MinusDataSizeAndOne &&
|
||||
testParams.mDataSize != 0) {
|
||||
// XXX The seek operation leaves invalid state after trying to position
|
||||
// before the start of the stream, other checks must be skipped because
|
||||
// of that!
|
||||
return;
|
||||
}
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
switch (std::get<0>(seekOp)) {
|
||||
case nsISeekableStream::NS_SEEK_SET:
|
||||
accumulatedOffset = offset;
|
||||
break;
|
||||
case nsISeekableStream::NS_SEEK_CUR:
|
||||
accumulatedOffset += offset;
|
||||
break;
|
||||
case nsISeekableStream::NS_SEEK_END:
|
||||
accumulatedOffset = testParams.mDataSize + offset;
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("Unknown whence");
|
||||
}
|
||||
}
|
||||
EXPECT_EQ(NS_OK, inStream->Seek(seekOp.first, offset));
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -831,26 +879,39 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
/* seekOperations */
|
||||
testing::Values(/* NS_SEEK_SET only, single ops */
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_SET,
|
||||
SeekOffset::PlusDataSize}},
|
||||
SeekOffset::PlusDataSize, NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_SET,
|
||||
SeekOffset::PlusHalfDataSize}},
|
||||
SeekOffset::PlusHalfDataSize,
|
||||
NS_OK}},
|
||||
/* NS_SEEK_SET only, multiple ops */
|
||||
std::vector<SeekOp>{
|
||||
{nsISeekableStream::NS_SEEK_SET,
|
||||
SeekOffset::PlusHalfDataSize},
|
||||
{nsISeekableStream::NS_SEEK_SET, SeekOffset::Zero}},
|
||||
SeekOffset::PlusHalfDataSize, NS_OK},
|
||||
{nsISeekableStream::NS_SEEK_SET, SeekOffset::Zero,
|
||||
NS_OK}},
|
||||
/* NS_SEEK_CUR only, single ops */
|
||||
std::vector<SeekOp>{
|
||||
{nsISeekableStream::NS_SEEK_CUR, SeekOffset::Zero}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_CUR,
|
||||
SeekOffset::PlusDataSize}},
|
||||
SeekOffset::Zero, NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_CUR,
|
||||
SeekOffset::PlusHalfDataSize}},
|
||||
SeekOffset::PlusDataSize, NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_CUR,
|
||||
SeekOffset::PlusHalfDataSize,
|
||||
NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_CUR,
|
||||
SeekOffset::MinusOne,
|
||||
NS_ERROR_ILLEGAL_VALUE}},
|
||||
/* NS_SEEK_END only, single ops */
|
||||
std::vector<SeekOp>{
|
||||
{nsISeekableStream::NS_SEEK_END, SeekOffset::Zero}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_END,
|
||||
SeekOffset::MinusDataSize}},
|
||||
SeekOffset::Zero, NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_END,
|
||||
SeekOffset::MinusHalfDataSize}})),
|
||||
SeekOffset::MinusDataSize, NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_END,
|
||||
SeekOffset::MinusDataSizeAndOne,
|
||||
NS_ERROR_ILLEGAL_VALUE}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_END,
|
||||
SeekOffset::MinusHalfDataSize,
|
||||
NS_OK}},
|
||||
std::vector<SeekOp>{{nsISeekableStream::NS_SEEK_END,
|
||||
SeekOffset::PlusOne,
|
||||
NS_ERROR_ILLEGAL_VALUE}})),
|
||||
SeekTestParamToString);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "nsCharTraits.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/nsCSPContext.h"
|
||||
|
||||
#include <utility>
|
||||
|
@ -32,15 +33,24 @@ static nsString MaybeTruncateSample(const nsAString& aSample) {
|
|||
}
|
||||
|
||||
CSPViolationData::CSPViolationData(uint32_t aViolatedPolicyIndex,
|
||||
Resource&& aResource, uint32_t aLineNumber,
|
||||
uint32_t aColumnNumber,
|
||||
const nsAString& aSample)
|
||||
Resource&& aResource,
|
||||
const CSPDirective aEffectiveDirective,
|
||||
const nsAString& aSourceFile,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber,
|
||||
Element* aElement, const nsAString& aSample)
|
||||
: mViolatedPolicyIndex{aViolatedPolicyIndex},
|
||||
mResource{std::move(aResource)},
|
||||
mEffectiveDirective{aEffectiveDirective},
|
||||
mSourceFile{aSourceFile},
|
||||
mLineNumber{aLineNumber},
|
||||
mColumnNumber{aColumnNumber},
|
||||
mElement{aElement},
|
||||
mSample{MaybeTruncateSample(aSample)} {}
|
||||
|
||||
// Required for `mElement`, since its destructor requires a definition of
|
||||
// `Element`.
|
||||
CSPViolationData::~CSPViolationData() = default;
|
||||
|
||||
auto CSPViolationData::BlockedContentSourceOrUnknown() const
|
||||
-> BlockedContentSource {
|
||||
return mResource.is<CSPViolationData::BlockedContentSource>()
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
#define DOM_SECURITY_CSPVIOLATION_H_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/Variant.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
@ -17,7 +19,10 @@
|
|||
class nsIURI;
|
||||
|
||||
namespace mozilla::dom {
|
||||
class Element;
|
||||
|
||||
// Represents parts of <https://w3c.github.io/webappsec-csp/#violation>.
|
||||
// The remaining parts can be deduced from the corresponding nsCSPContext.
|
||||
struct CSPViolationData {
|
||||
enum class BlockedContentSource {
|
||||
Unknown,
|
||||
|
@ -31,15 +36,23 @@ struct CSPViolationData {
|
|||
|
||||
// @param aSample Will be truncated if necessary.
|
||||
CSPViolationData(uint32_t aViolatedPolicyIndex, Resource&& aResource,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber,
|
||||
const CSPDirective aEffectiveDirective,
|
||||
const nsAString& aSourceFile, uint32_t aLineNumber,
|
||||
uint32_t aColumnNumber, Element* aElement,
|
||||
const nsAString& aSample);
|
||||
|
||||
~CSPViolationData();
|
||||
|
||||
BlockedContentSource BlockedContentSourceOrUnknown() const;
|
||||
|
||||
const uint32_t mViolatedPolicyIndex;
|
||||
const Resource mResource;
|
||||
const CSPDirective mEffectiveDirective;
|
||||
// String representation of the URL. The empty string represents a null-URL.
|
||||
const nsString mSourceFile;
|
||||
const uint32_t mLineNumber;
|
||||
const uint32_t mColumnNumber;
|
||||
RefPtr<Element> mElement;
|
||||
const nsString mSample;
|
||||
};
|
||||
} // namespace mozilla::dom
|
||||
|
|
|
@ -222,17 +222,21 @@ bool nsCSPContext::permitsInternal(
|
|||
? Resource{nsCOMPtr<nsIURI>{aContentLocation}}
|
||||
: Resource{CSPViolationData::BlockedContentSource::Unknown};
|
||||
|
||||
CSPViolationData cspViolationData{p, std::move(resource), lineNumber,
|
||||
columnNumber, /* aSample */ u""_ns};
|
||||
CSPViolationData cspViolationData{p,
|
||||
std::move(resource),
|
||||
aDir,
|
||||
spec,
|
||||
lineNumber,
|
||||
columnNumber,
|
||||
aTriggeringElement,
|
||||
/* aSample */ u""_ns};
|
||||
|
||||
AsyncReportViolation(
|
||||
aTriggeringElement, aCSPEventListener, std::move(cspViolationData),
|
||||
aCSPEventListener, std::move(cspViolationData),
|
||||
aOriginalURIIfRedirect, /* in case of redirect originalURI is not
|
||||
null */
|
||||
violatedDirective, violatedDirectiveString,
|
||||
aDir, // aViolatedDirective
|
||||
u""_ns, // no observer subject
|
||||
spec, // source file
|
||||
false); // aReportSample (no sample)
|
||||
}
|
||||
}
|
||||
|
@ -564,17 +568,19 @@ void nsCSPContext::reportInlineViolation(
|
|||
aViolatedPolicyIndex,
|
||||
CSPViolationData::Resource{
|
||||
CSPViolationData::BlockedContentSource::Inline},
|
||||
lineNumber, columnNumber, aSample};
|
||||
aEffectiveDirective,
|
||||
sourceFile,
|
||||
lineNumber,
|
||||
columnNumber,
|
||||
aTriggeringElement,
|
||||
aSample};
|
||||
|
||||
AsyncReportViolation(aTriggeringElement, aCSPEventListener,
|
||||
std::move(cspViolationData),
|
||||
AsyncReportViolation(aCSPEventListener, std::move(cspViolationData),
|
||||
mSelfURI, // aOriginalURI
|
||||
aViolatedDirective, // aViolatedDirective
|
||||
aViolatedDirectiveString,
|
||||
aEffectiveDirective, // aEffectiveDirective
|
||||
observerSubject, // aObserverSubject
|
||||
sourceFile, // aSourceFile
|
||||
aReportSample); // aReportSample
|
||||
observerSubject, // aObserverSubject
|
||||
aReportSample); // aReportSample
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -754,15 +760,19 @@ nsCSPContext::LogViolationDetails(
|
|||
violatedDirectiveNameAndValue, &reportSample);
|
||||
|
||||
CSPViolationData cspViolationData{
|
||||
p, CSPViolationData::Resource{blockedContentSource},
|
||||
static_cast<uint32_t>(aLineNum), static_cast<uint32_t>(aColumnNum),
|
||||
p,
|
||||
CSPViolationData::Resource{blockedContentSource},
|
||||
/* aEffectiveDirective */ CSPDirective::SCRIPT_SRC_DIRECTIVE,
|
||||
aSourceFile,
|
||||
static_cast<uint32_t>(aLineNum),
|
||||
static_cast<uint32_t>(aColumnNum),
|
||||
aTriggeringElement,
|
||||
aScriptSample};
|
||||
|
||||
AsyncReportViolation(
|
||||
aTriggeringElement, aCSPEventListener, std::move(cspViolationData),
|
||||
nullptr, violatedDirectiveName, violatedDirectiveNameAndValue,
|
||||
CSPDirective::SCRIPT_SRC_DIRECTIVE /* aEffectiveDirective */,
|
||||
observerSubject, aSourceFile, reportSample);
|
||||
AsyncReportViolation(aCSPEventListener, std::move(cspViolationData),
|
||||
nullptr, violatedDirectiveName,
|
||||
violatedDirectiveNameAndValue, observerSubject,
|
||||
reportSample);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -976,7 +986,7 @@ void StripURIForReporting(nsIURI* aSelfURI, nsIURI* aURI,
|
|||
nsresult nsCSPContext::GatherSecurityPolicyViolationEventData(
|
||||
nsIURI* aOriginalURI, const nsAString& aEffectiveDirective,
|
||||
const mozilla::dom::CSPViolationData& aCSPViolationData,
|
||||
const nsAString& aSourceFile, const nsAString& aScriptSample,
|
||||
const nsAString& aScriptSample,
|
||||
mozilla::dom::SecurityPolicyViolationEventInit& aViolationEventInit) {
|
||||
EnsureIPCPoliciesRead();
|
||||
NS_ENSURE_ARG_MAX(aCSPViolationData.mViolatedPolicyIndex,
|
||||
|
@ -1033,16 +1043,16 @@ nsresult nsCSPContext::GatherSecurityPolicyViolationEventData(
|
|||
aViolationEventInit.mOriginalPolicy = originalPolicy;
|
||||
|
||||
// source-file
|
||||
if (!aSourceFile.IsEmpty()) {
|
||||
if (!aCSPViolationData.mSourceFile.IsEmpty()) {
|
||||
// if aSourceFile is a URI, we have to make sure to strip fragments
|
||||
nsCOMPtr<nsIURI> sourceURI;
|
||||
NS_NewURI(getter_AddRefs(sourceURI), aSourceFile);
|
||||
NS_NewURI(getter_AddRefs(sourceURI), aCSPViolationData.mSourceFile);
|
||||
if (sourceURI) {
|
||||
nsAutoCString spec;
|
||||
StripURIForReporting(mSelfURI, sourceURI, aEffectiveDirective, spec);
|
||||
CopyUTF8toUTF16(spec, aViolationEventInit.mSourceFile);
|
||||
} else {
|
||||
aViolationEventInit.mSourceFile = aSourceFile;
|
||||
aViolationEventInit.mSourceFile = aCSPViolationData.mSourceFile;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1387,18 +1397,14 @@ nsresult nsCSPContext::FireViolationEvent(
|
|||
*/
|
||||
class CSPReportSenderRunnable final : public Runnable {
|
||||
public:
|
||||
CSPReportSenderRunnable(Element* aTriggeringElement,
|
||||
nsICSPEventListener* aCSPEventListener,
|
||||
CSPReportSenderRunnable(nsICSPEventListener* aCSPEventListener,
|
||||
CSPViolationData&& aCSPViolationData,
|
||||
nsIURI* aOriginalURI, bool aReportOnlyFlag,
|
||||
const nsAString& aViolatedDirectiveName,
|
||||
const nsAString& aViolatedDirectiveNameAndValue,
|
||||
const CSPDirective aEffectiveDirective,
|
||||
const nsAString& aObserverSubject,
|
||||
const nsAString& aSourceFile, bool aReportSample,
|
||||
const nsAString& aObserverSubject, bool aReportSample,
|
||||
nsCSPContext* aCSPContext)
|
||||
: mozilla::Runnable("CSPReportSenderRunnable"),
|
||||
mTriggeringElement(aTriggeringElement),
|
||||
mCSPEventListener(aCSPEventListener),
|
||||
mCSPViolationData(std::move(aCSPViolationData)),
|
||||
mOriginalURI(aOriginalURI),
|
||||
|
@ -1406,8 +1412,6 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
mReportSample(aReportSample),
|
||||
mViolatedDirectiveName(aViolatedDirectiveName),
|
||||
mViolatedDirectiveNameAndValue(aViolatedDirectiveNameAndValue),
|
||||
mEffectiveDirective(aEffectiveDirective),
|
||||
mSourceFile(aSourceFile),
|
||||
mCSPContext(aCSPContext) {
|
||||
NS_ASSERTION(!aViolatedDirectiveName.IsEmpty(),
|
||||
"Can not send reports without a violated directive");
|
||||
|
@ -1444,10 +1448,10 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
|
||||
nsAutoString effectiveDirective;
|
||||
effectiveDirective.AssignASCII(
|
||||
CSP_CSPDirectiveToString(mEffectiveDirective));
|
||||
CSP_CSPDirectiveToString(mCSPViolationData.mEffectiveDirective));
|
||||
|
||||
nsresult rv = mCSPContext->GatherSecurityPolicyViolationEventData(
|
||||
mOriginalURI, effectiveDirective, mCSPViolationData, mSourceFile,
|
||||
mOriginalURI, effectiveDirective, mCSPViolationData,
|
||||
mReportSample ? mCSPViolationData.mSample : EmptyString(), init);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -1470,8 +1474,8 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
// A frame-ancestors violation has occurred, but we should not dispatch
|
||||
// the violation event to a potentially cross-origin ancestor.
|
||||
if (!mViolatedDirectiveName.EqualsLiteral("frame-ancestors")) {
|
||||
mCSPContext->FireViolationEvent(mTriggeringElement, mCSPEventListener,
|
||||
init);
|
||||
mCSPContext->FireViolationEvent(mCSPViolationData.mElement,
|
||||
mCSPEventListener, init);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1480,7 +1484,7 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
private:
|
||||
void ReportToConsole() const {
|
||||
NS_ConvertUTF8toUTF16 effectiveDirective(
|
||||
CSP_CSPDirectiveToString(mEffectiveDirective));
|
||||
CSP_CSPDirectiveToString(mCSPViolationData.mEffectiveDirective));
|
||||
|
||||
const auto blockedContentSource =
|
||||
mCSPViolationData.BlockedContentSourceOrUnknown();
|
||||
|
@ -1488,16 +1492,18 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
switch (blockedContentSource) {
|
||||
case CSPViolationData::BlockedContentSource::Inline: {
|
||||
const char* errorName = nullptr;
|
||||
if (mEffectiveDirective == CSPDirective::STYLE_SRC_ATTR_DIRECTIVE ||
|
||||
mEffectiveDirective == CSPDirective::STYLE_SRC_ELEM_DIRECTIVE) {
|
||||
if (mCSPViolationData.mEffectiveDirective ==
|
||||
CSPDirective::STYLE_SRC_ATTR_DIRECTIVE ||
|
||||
mCSPViolationData.mEffectiveDirective ==
|
||||
CSPDirective::STYLE_SRC_ELEM_DIRECTIVE) {
|
||||
errorName = mReportOnlyFlag ? "CSPROInlineStyleViolation"
|
||||
: "CSPInlineStyleViolation";
|
||||
} else if (mEffectiveDirective ==
|
||||
} else if (mCSPViolationData.mEffectiveDirective ==
|
||||
CSPDirective::SCRIPT_SRC_ATTR_DIRECTIVE) {
|
||||
errorName = mReportOnlyFlag ? "CSPROEventHandlerScriptViolation"
|
||||
: "CSPEventHandlerScriptViolation";
|
||||
} else {
|
||||
MOZ_ASSERT(mEffectiveDirective ==
|
||||
MOZ_ASSERT(mCSPViolationData.mEffectiveDirective ==
|
||||
CSPDirective::SCRIPT_SRC_ELEM_DIRECTIVE);
|
||||
errorName = mReportOnlyFlag ? "CSPROInlineScriptViolation"
|
||||
: "CSPInlineScriptViolation";
|
||||
|
@ -1506,9 +1512,9 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
AutoTArray<nsString, 2> params = {mViolatedDirectiveNameAndValue,
|
||||
effectiveDirective};
|
||||
mCSPContext->logToConsole(
|
||||
errorName, params, mSourceFile, mCSPViolationData.mSample,
|
||||
mCSPViolationData.mLineNumber, mCSPViolationData.mColumnNumber,
|
||||
nsIScriptError::errorFlag);
|
||||
errorName, params, mCSPViolationData.mSourceFile,
|
||||
mCSPViolationData.mSample, mCSPViolationData.mLineNumber,
|
||||
mCSPViolationData.mColumnNumber, nsIScriptError::errorFlag);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1518,7 +1524,7 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
mCSPContext->logToConsole(
|
||||
mReportOnlyFlag ? "CSPROEvalScriptViolation"
|
||||
: "CSPEvalScriptViolation",
|
||||
params, mSourceFile, mCSPViolationData.mSample,
|
||||
params, mCSPViolationData.mSourceFile, mCSPViolationData.mSample,
|
||||
mCSPViolationData.mLineNumber, mCSPViolationData.mColumnNumber,
|
||||
nsIScriptError::errorFlag);
|
||||
break;
|
||||
|
@ -1530,7 +1536,7 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
mCSPContext->logToConsole(
|
||||
mReportOnlyFlag ? "CSPROWasmEvalScriptViolation"
|
||||
: "CSPWasmEvalScriptViolation",
|
||||
params, mSourceFile, mCSPViolationData.mSample,
|
||||
params, mCSPViolationData.mSourceFile, mCSPViolationData.mSample,
|
||||
mCSPViolationData.mLineNumber, mCSPViolationData.mColumnNumber,
|
||||
nsIScriptError::errorFlag);
|
||||
break;
|
||||
|
@ -1557,7 +1563,7 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
}
|
||||
|
||||
const char* errorName = nullptr;
|
||||
switch (mEffectiveDirective) {
|
||||
switch (mCSPViolationData.mEffectiveDirective) {
|
||||
case CSPDirective::STYLE_SRC_ELEM_DIRECTIVE:
|
||||
errorName =
|
||||
mReportOnlyFlag ? "CSPROStyleViolation" : "CSPStyleViolation";
|
||||
|
@ -1578,14 +1584,13 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
AutoTArray<nsString, 3> params = {mViolatedDirectiveNameAndValue,
|
||||
source, effectiveDirective};
|
||||
mCSPContext->logToConsole(
|
||||
errorName, params, mSourceFile, mCSPViolationData.mSample,
|
||||
mCSPViolationData.mLineNumber, mCSPViolationData.mColumnNumber,
|
||||
nsIScriptError::errorFlag);
|
||||
errorName, params, mCSPViolationData.mSourceFile,
|
||||
mCSPViolationData.mSample, mCSPViolationData.mLineNumber,
|
||||
mCSPViolationData.mColumnNumber, nsIScriptError::errorFlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<Element> mTriggeringElement;
|
||||
nsCOMPtr<nsICSPEventListener> mCSPEventListener;
|
||||
CSPViolationData mCSPViolationData;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
|
@ -1593,9 +1598,7 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
bool mReportSample;
|
||||
nsString mViolatedDirectiveName;
|
||||
nsString mViolatedDirectiveNameAndValue;
|
||||
CSPDirective mEffectiveDirective;
|
||||
nsCOMPtr<nsISupports> mObserverSubject;
|
||||
nsString mSourceFile;
|
||||
RefPtr<nsCSPContext> mCSPContext;
|
||||
};
|
||||
|
||||
|
@ -1604,8 +1607,6 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
* topic that a violation occurred. Also triggers report sending and console
|
||||
* logging. All asynchronous on the main thread.
|
||||
*
|
||||
* @param aTriggeringElement
|
||||
* The element that triggered this report violation. It can be null.
|
||||
* @param aOriginalUri
|
||||
* The original URI if the blocked content is a redirect, else null
|
||||
* @param aViolatedDirectiveName
|
||||
|
@ -1613,27 +1614,22 @@ class CSPReportSenderRunnable final : public Runnable {
|
|||
* @param aObserverSubject
|
||||
* optional, subject sent to the nsIObservers listening to the CSP
|
||||
* violation topic.
|
||||
* @param aSourceFile
|
||||
* name of the file containing the inline script violation
|
||||
*/
|
||||
nsresult nsCSPContext::AsyncReportViolation(
|
||||
mozilla::dom::Element* aTriggeringElement,
|
||||
nsICSPEventListener* aCSPEventListener,
|
||||
mozilla::dom::CSPViolationData&& aCSPViolationData, nsIURI* aOriginalURI,
|
||||
const nsAString& aViolatedDirectiveName,
|
||||
const nsAString& aViolatedDirectiveNameAndValue,
|
||||
const CSPDirective aEffectiveDirective, const nsAString& aObserverSubject,
|
||||
const nsAString& aSourceFile, bool aReportSample) {
|
||||
const nsAString& aObserverSubject, bool aReportSample) {
|
||||
EnsureIPCPoliciesRead();
|
||||
NS_ENSURE_ARG_MAX(aCSPViolationData.mViolatedPolicyIndex,
|
||||
mPolicies.Length() - 1);
|
||||
|
||||
nsCOMPtr<nsIRunnable> task = new CSPReportSenderRunnable(
|
||||
aTriggeringElement, aCSPEventListener, std::move(aCSPViolationData),
|
||||
aOriginalURI,
|
||||
aCSPEventListener, std::move(aCSPViolationData), aOriginalURI,
|
||||
mPolicies[aCSPViolationData.mViolatedPolicyIndex]->getReportOnlyFlag(),
|
||||
aViolatedDirectiveName, aViolatedDirectiveNameAndValue,
|
||||
aEffectiveDirective, aObserverSubject, aSourceFile, aReportSample, this);
|
||||
aViolatedDirectiveName, aViolatedDirectiveNameAndValue, aObserverSubject,
|
||||
aReportSample, this);
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
if (mEventTarget) {
|
||||
|
|
|
@ -85,8 +85,6 @@ class nsCSPContext : public nsIContentSecurityPolicy {
|
|||
* The original URI if the blocked content is a redirect, else null
|
||||
* @param aViolatedDirective
|
||||
* the directive that was violated (string).
|
||||
* @param aSourceFile
|
||||
* name of the file containing the inline script violation
|
||||
* @param aScriptSample
|
||||
* a sample of the violating inline script
|
||||
* @param aViolationEventInit
|
||||
|
@ -95,7 +93,7 @@ class nsCSPContext : public nsIContentSecurityPolicy {
|
|||
nsresult GatherSecurityPolicyViolationEventData(
|
||||
nsIURI* aOriginalURI, const nsAString& aEffectiveDirective,
|
||||
const mozilla::dom::CSPViolationData& aCSPViolationData,
|
||||
const nsAString& aSourceFile, const nsAString& aScriptSample,
|
||||
const nsAString& aScriptSample,
|
||||
mozilla::dom::SecurityPolicyViolationEventInit& aViolationEventInit);
|
||||
|
||||
nsresult SendReports(
|
||||
|
@ -109,13 +107,11 @@ class nsCSPContext : public nsIContentSecurityPolicy {
|
|||
aViolationEventInit);
|
||||
|
||||
nsresult AsyncReportViolation(
|
||||
mozilla::dom::Element* aTriggeringElement,
|
||||
nsICSPEventListener* aCSPEventListener,
|
||||
mozilla::dom::CSPViolationData&& aCSPViolationData, nsIURI* aOriginalURI,
|
||||
const nsAString& aViolatedDirectiveName,
|
||||
const nsAString& aViolatedDirectiveNameAndValue,
|
||||
const CSPDirective aEffectiveDirective, const nsAString& aObserverSubject,
|
||||
const nsAString& aSourceFile, bool aReportSample);
|
||||
const nsAString& aObserverSubject, bool aReportSample);
|
||||
|
||||
// Hands off! Don't call this method unless you know what you
|
||||
// are doing. It's only supposed to be called from within
|
||||
|
|
|
@ -966,7 +966,7 @@ impl ClipNodeRange {
|
|||
//TODO: merge with `CoordinateSpaceMapping`?
|
||||
#[derive(Debug, MallocSizeOf)]
|
||||
#[cfg_attr(feature = "capture", derive(Serialize))]
|
||||
enum ClipSpaceConversion {
|
||||
pub enum ClipSpaceConversion {
|
||||
Local,
|
||||
ScaleOffset(ScaleOffset),
|
||||
Transform(LayoutToWorldTransform),
|
||||
|
@ -974,7 +974,7 @@ enum ClipSpaceConversion {
|
|||
|
||||
impl ClipSpaceConversion {
|
||||
/// Construct a new clip space converter between two spatial nodes.
|
||||
fn new(
|
||||
pub fn new(
|
||||
prim_spatial_node_index: SpatialNodeIndex,
|
||||
clip_spatial_node_index: SpatialNodeIndex,
|
||||
spatial_tree: &SpatialTree,
|
||||
|
@ -1184,106 +1184,6 @@ impl ClipNode {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Find the mask regions of a given clip node. For each mask region, map it in to the space defined
|
||||
/// by `prim_spatial_node_index`, and invoke a closure with the local rect of that region. Returns
|
||||
/// false for transformed clips (we can handle this case better in future).
|
||||
pub fn get_local_mask_rects<F>(
|
||||
&self,
|
||||
prim_spatial_node_index: SpatialNodeIndex,
|
||||
spatial_tree: &SpatialTree,
|
||||
mut f: F,
|
||||
) -> bool where F: FnMut(LayoutRect) {
|
||||
let conversion = ClipSpaceConversion::new(
|
||||
prim_spatial_node_index,
|
||||
self.item.spatial_node_index,
|
||||
spatial_tree,
|
||||
);
|
||||
|
||||
match self.item.kind {
|
||||
ClipItemKind::Rectangle { mode, .. } => {
|
||||
match conversion {
|
||||
ClipSpaceConversion::Local | ClipSpaceConversion::ScaleOffset(_) => {
|
||||
// These clips will be handled by the vertex shader, so no mask is needed
|
||||
// Ensure we don't see any ClipOut though - they should only arrive in
|
||||
// this code path when we start passing box-shadows through here.
|
||||
assert!(mode != ClipMode::ClipOut);
|
||||
}
|
||||
ClipSpaceConversion::Transform(..) => {
|
||||
// For now, we don't handle mask regions for complex transforms. Previously, we didn't
|
||||
// handle mask regions at all, so this is no worse than existing state. In future, we
|
||||
// should conservatively map these cases if we come across any content which shows
|
||||
// up as slow in this case.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
ClipItemKind::RoundedRectangle { mode: ClipMode::Clip, rect, radius } => {
|
||||
// Construct the mask regions for each corner
|
||||
|
||||
let mut top_left = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(rect.min.x, rect.min.y),
|
||||
LayoutSize::new(radius.top_left.width, radius.top_left.height),
|
||||
);
|
||||
let mut top_right = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(
|
||||
rect.max.x - radius.top_right.width,
|
||||
rect.min.y,
|
||||
),
|
||||
LayoutSize::new(radius.top_right.width, radius.top_right.height),
|
||||
);
|
||||
let mut bottom_left = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(
|
||||
rect.min.x,
|
||||
rect.max.y - radius.bottom_left.height,
|
||||
),
|
||||
LayoutSize::new(radius.bottom_left.width, radius.bottom_left.height),
|
||||
);
|
||||
let mut bottom_right = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(
|
||||
rect.max.x - radius.bottom_right.width,
|
||||
rect.max.y - radius.bottom_right.height,
|
||||
),
|
||||
LayoutSize::new(radius.bottom_right.width, radius.bottom_right.height),
|
||||
);
|
||||
|
||||
match conversion {
|
||||
ClipSpaceConversion::Local => {
|
||||
// No mapping necessary, same local space
|
||||
}
|
||||
ClipSpaceConversion::ScaleOffset(scale_offset) => {
|
||||
top_left = scale_offset.map_rect(&top_left);
|
||||
top_right = scale_offset.map_rect(&top_right);
|
||||
bottom_left = scale_offset.map_rect(&bottom_left);
|
||||
bottom_right = scale_offset.map_rect(&bottom_right);
|
||||
}
|
||||
ClipSpaceConversion::Transform(..) => {
|
||||
// For now, we don't handle mask regions for complex transforms. Previously, we didn't
|
||||
// handle mask regions at all, so this is no worse than existing state. In future, we
|
||||
// should conservatively map these cases if we come across any content which shows
|
||||
// up as slow in this case.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
f(top_left);
|
||||
f(top_right);
|
||||
f(bottom_left);
|
||||
f(bottom_right);
|
||||
}
|
||||
ClipItemKind::RoundedRectangle { mode: ClipMode::ClipOut, .. } => {
|
||||
panic!("bug: old box-shadow clips unexpected in this path");
|
||||
}
|
||||
ClipItemKind::BoxShadow { .. } => {
|
||||
panic!("bug: old box-shadow clips unexpected in this path");
|
||||
}
|
||||
ClipItemKind::Image { .. } => {
|
||||
panic!("bug: image clips unexpected in this path");
|
||||
}
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
@ -120,10 +120,6 @@ fn can_use_clip_chain_for_quad_path(
|
|||
let clip_node = &data_stores.clip[clip_instance.handle];
|
||||
|
||||
match clip_node.item.kind {
|
||||
ClipItemKind::Rectangle { mode: ClipMode::ClipOut, .. } |
|
||||
ClipItemKind::RoundedRectangle { mode: ClipMode::ClipOut, .. } => {
|
||||
return false;
|
||||
}
|
||||
ClipItemKind::RoundedRectangle { .. } | ClipItemKind::Rectangle { .. } => {}
|
||||
ClipItemKind::BoxShadow { .. } => {
|
||||
// legacy path for box-shadows for now (move them to a separate primitive next)
|
||||
|
|
|
@ -6,7 +6,7 @@ use api::{units::*, ClipMode, PremultipliedColorF};
|
|||
use euclid::point2;
|
||||
|
||||
use crate::batch::{BatchKey, BatchKind, BatchTextures};
|
||||
use crate::clip::{ClipChainInstance, ClipIntern, ClipItemKind, ClipStore};
|
||||
use crate::clip::{ClipChainInstance, ClipIntern, ClipItemKind, ClipNodeRange, ClipSpaceConversion, ClipStore};
|
||||
use crate::command_buffer::{CommandBufferIndex, PrimitiveCommand, QuadFlags};
|
||||
use crate::frame_builder::{FrameBuildingContext, FrameBuildingState, PictureContext, PictureState};
|
||||
use crate::gpu_types::{PrimitiveInstanceData, QuadInstance, QuadSegment, TransformPaletteId, ZBufferId};
|
||||
|
@ -20,7 +20,7 @@ use crate::renderer::{BlendMode, GpuBufferAddress, GpuBufferBuilder, GpuBufferBu
|
|||
use crate::segment::EdgeAaSegmentMask;
|
||||
use crate::space::SpaceMapper;
|
||||
use crate::spatial_tree::{SpatialNodeIndex, SpatialTree};
|
||||
use crate::util::{MaxRect, ScaleOffset};
|
||||
use crate::util::{extract_inner_rect_k, MaxRect, ScaleOffset};
|
||||
|
||||
const MIN_AA_SEGMENTS_SIZE: f32 = 4.0;
|
||||
const MIN_QUAD_SPLIT_SIZE: f32 = 256.0;
|
||||
|
@ -174,7 +174,7 @@ pub fn prepare_quad(
|
|||
pattern,
|
||||
clipped_surface_rect.size(),
|
||||
clipped_surface_rect.min.to_f32(),
|
||||
clip_chain,
|
||||
clip_chain.clips_range,
|
||||
prim_spatial_node_index,
|
||||
pic_context.raster_spatial_node_index,
|
||||
main_prim_address,
|
||||
|
@ -232,16 +232,95 @@ pub fn prepare_quad(
|
|||
let clip_instance = frame_state.clip_store.get_instance_from_range(&clip_chain.clips_range, i);
|
||||
let clip_node = &interned_clips[clip_instance.handle];
|
||||
|
||||
if !clip_node.get_local_mask_rects(
|
||||
// Construct a prim <-> clip space converter
|
||||
let conversion = ClipSpaceConversion::new(
|
||||
prim_spatial_node_index,
|
||||
clip_node.item.spatial_node_index,
|
||||
frame_context.spatial_tree,
|
||||
|mask_region| {
|
||||
scratch.quad_tile_classifier.add_mask_region(mask_region)
|
||||
);
|
||||
|
||||
// For now, we only handle axis-aligned mappings
|
||||
let transform = match conversion {
|
||||
ClipSpaceConversion::Local => ScaleOffset::identity(),
|
||||
ClipSpaceConversion::ScaleOffset(scale_offset) => scale_offset,
|
||||
ClipSpaceConversion::Transform(..) => {
|
||||
// If the clip transform is not axis-aligned, just assume the entire primitive
|
||||
// local rect is affected by the clip, for now. It's no worse than what
|
||||
// we were doing previously for all tiles.
|
||||
scratch.quad_tile_classifier.add_mask_region(*local_rect);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
// Add regions to the classifier depending on the clip kind
|
||||
match clip_node.item.kind {
|
||||
ClipItemKind::Rectangle { mode, ref rect } => {
|
||||
let rect = transform.map_rect(rect);
|
||||
scratch.quad_tile_classifier.add_clip_rect(rect, mode);
|
||||
}
|
||||
ClipItemKind::RoundedRectangle { mode: ClipMode::Clip, ref rect, ref radius } => {
|
||||
// For rounded-rects with Clip mode, we need a mask for each corner,
|
||||
// and to add the clip rect itself (to cull tiles outside that rect)
|
||||
|
||||
// Map the local rect and radii
|
||||
let rect = transform.map_rect(rect);
|
||||
let r_tl = transform.map_size(&radius.top_left);
|
||||
let r_tr = transform.map_size(&radius.top_right);
|
||||
let r_br = transform.map_size(&radius.bottom_right);
|
||||
let r_bl = transform.map_size(&radius.bottom_left);
|
||||
|
||||
// Construct the mask regions for each corner
|
||||
let c_tl = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(rect.min.x, rect.min.y),
|
||||
r_tl,
|
||||
);
|
||||
let c_tr = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(
|
||||
rect.max.x - r_tr.width,
|
||||
rect.min.y,
|
||||
),
|
||||
r_tr,
|
||||
);
|
||||
let c_br = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(
|
||||
rect.max.x - r_br.width,
|
||||
rect.max.y - r_br.height,
|
||||
),
|
||||
r_br,
|
||||
);
|
||||
let c_bl = LayoutRect::from_origin_and_size(
|
||||
LayoutPoint::new(
|
||||
rect.min.x,
|
||||
rect.max.y - r_bl.height,
|
||||
),
|
||||
r_bl,
|
||||
);
|
||||
|
||||
scratch.quad_tile_classifier.add_clip_rect(rect, ClipMode::Clip);
|
||||
scratch.quad_tile_classifier.add_mask_region(c_tl);
|
||||
scratch.quad_tile_classifier.add_mask_region(c_tr);
|
||||
scratch.quad_tile_classifier.add_mask_region(c_br);
|
||||
scratch.quad_tile_classifier.add_mask_region(c_bl);
|
||||
}
|
||||
ClipItemKind::RoundedRectangle { mode: ClipMode::ClipOut, ref rect, ref radius } => {
|
||||
// Try to find an inner rect within the clip-out rounded rect that we can
|
||||
// use to cull inner tiles. If we can't, the entire rect needs to be masked
|
||||
match extract_inner_rect_k(rect, radius, 0.5) {
|
||||
Some(ref rect) => {
|
||||
let rect = transform.map_rect(rect);
|
||||
scratch.quad_tile_classifier.add_clip_rect(rect, ClipMode::ClipOut);
|
||||
}
|
||||
None => {
|
||||
scratch.quad_tile_classifier.add_mask_region(*local_rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
ClipItemKind::BoxShadow { .. } => {
|
||||
panic!("bug: old box-shadow clips unexpected in this path");
|
||||
}
|
||||
ClipItemKind::Image { .. } => {
|
||||
panic!("bug: image clips unexpected in this path");
|
||||
}
|
||||
) {
|
||||
// If we couldn't extract a mask region, just assume the entire primitive
|
||||
// local rect is affected by the clip, for now.
|
||||
scratch.quad_tile_classifier.add_mask_region(*local_rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,11 +368,8 @@ pub fn prepare_quad(
|
|||
// This tile was entirely clipped, so we can skip drawing it
|
||||
continue;
|
||||
}
|
||||
QuadTileKind::Pattern => {
|
||||
prim_is_2d_scale_translation
|
||||
}
|
||||
QuadTileKind::PatternWithMask => {
|
||||
false
|
||||
QuadTileKind::Pattern { has_mask } => {
|
||||
prim_is_2d_scale_translation && !has_mask
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -316,7 +392,7 @@ pub fn prepare_quad(
|
|||
pattern,
|
||||
int_rect.round().to_i32().size(),
|
||||
rect.min,
|
||||
clip_chain,
|
||||
clip_chain.clips_range,
|
||||
prim_spatial_node_index,
|
||||
pic_context.raster_spatial_node_index,
|
||||
main_prim_address,
|
||||
|
@ -465,7 +541,7 @@ pub fn prepare_quad(
|
|||
pattern,
|
||||
device_rect.size(),
|
||||
device_rect.min.to_f32(),
|
||||
clip_chain,
|
||||
clip_chain.clips_range,
|
||||
prim_spatial_node_index,
|
||||
pic_context.raster_spatial_node_index,
|
||||
main_prim_address,
|
||||
|
@ -595,7 +671,7 @@ fn add_render_task_with_mask(
|
|||
pattern: &Pattern,
|
||||
task_size: DeviceIntSize,
|
||||
content_origin: DevicePoint,
|
||||
clip_chain: &ClipChainInstance,
|
||||
clips_range: ClipNodeRange,
|
||||
prim_spatial_node_index: SpatialNodeIndex,
|
||||
raster_spatial_node_index: SpatialNodeIndex,
|
||||
prim_address_f: GpuBufferAddress,
|
||||
|
@ -618,19 +694,20 @@ fn add_render_task_with_mask(
|
|||
transform_id,
|
||||
aa_flags,
|
||||
quad_flags,
|
||||
clip_chain.clips_range,
|
||||
needs_scissor_rect,
|
||||
),
|
||||
));
|
||||
|
||||
let masks = MaskSubPass {
|
||||
clip_node_range: clip_chain.clips_range,
|
||||
prim_spatial_node_index,
|
||||
prim_address_f,
|
||||
};
|
||||
if clips_range.count > 0 {
|
||||
let masks = MaskSubPass {
|
||||
clip_node_range: clips_range,
|
||||
prim_spatial_node_index,
|
||||
prim_address_f,
|
||||
};
|
||||
|
||||
let task = frame_state.rg_builder.get_task_mut(task_id);
|
||||
task.add_sub_pass(SubPass::Masks { masks });
|
||||
let task = frame_state.rg_builder.get_task_mut(task_id);
|
||||
task.add_sub_pass(SubPass::Masks { masks });
|
||||
}
|
||||
|
||||
frame_state
|
||||
.surface_builder
|
||||
|
@ -890,13 +967,12 @@ pub fn add_to_batch<F>(
|
|||
#[cfg_attr(feature = "capture", derive(Serialize))]
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub enum QuadTileKind {
|
||||
// TODO(gw): We don't construct this just yet, will be enabled in a follow up patch
|
||||
// Clipped out - can be skipped
|
||||
Clipped,
|
||||
// Requires the pattern only, can draw directly
|
||||
Pattern,
|
||||
// Requires a mask, must be drawn indirectly
|
||||
PatternWithMask,
|
||||
Pattern {
|
||||
has_mask: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "capture", derive(Serialize))]
|
||||
|
@ -910,7 +986,7 @@ impl Default for QuadTileInfo {
|
|||
fn default() -> Self {
|
||||
QuadTileInfo {
|
||||
rect: LayoutRect::zero(),
|
||||
kind: QuadTileKind::Pattern,
|
||||
kind: QuadTileKind::Pattern { has_mask: false },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -967,8 +1043,6 @@ impl QuadTileClassifier {
|
|||
for x in 0 .. x_tiles {
|
||||
let info = &mut self.buffer[y * x_tiles + x];
|
||||
|
||||
info.kind = QuadTileKind::Pattern;
|
||||
|
||||
let p0 = LayoutPoint::new(
|
||||
rect.min.x + x as f32 * tw,
|
||||
rect.min.y + y as f32 * th,
|
||||
|
@ -979,6 +1053,7 @@ impl QuadTileClassifier {
|
|||
);
|
||||
|
||||
info.rect = LayoutRect::new(p0, p1);
|
||||
info.kind = QuadTileKind::Pattern { has_mask: false };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1003,12 +1078,16 @@ impl QuadTileClassifier {
|
|||
}
|
||||
ClipMode::ClipOut => {
|
||||
self.clip_out_regions.push(clip_rect);
|
||||
|
||||
self.add_mask_region(self.rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Classify all the tiles in to categories, based on the provided masks and clip regions
|
||||
pub fn classify(&mut self) -> &[QuadTileInfo] {
|
||||
pub fn classify(
|
||||
&mut self,
|
||||
) -> &[QuadTileInfo] {
|
||||
assert_ne!(self.x_tiles, 0);
|
||||
assert_ne!(self.y_tiles, 0);
|
||||
|
||||
|
@ -1020,8 +1099,8 @@ impl QuadTileClassifier {
|
|||
for clip_region in &self.clip_in_regions {
|
||||
match info.kind {
|
||||
QuadTileKind::Clipped => {},
|
||||
QuadTileKind::Pattern | QuadTileKind::PatternWithMask => {
|
||||
if clip_region.contains_box(&info.rect) {
|
||||
QuadTileKind::Pattern { .. } => {
|
||||
if !clip_region.intersects(&info.rect) {
|
||||
info.kind = QuadTileKind::Clipped;
|
||||
}
|
||||
}
|
||||
|
@ -1033,8 +1112,8 @@ impl QuadTileClassifier {
|
|||
for clip_region in &self.clip_out_regions {
|
||||
match info.kind {
|
||||
QuadTileKind::Clipped => {},
|
||||
QuadTileKind::Pattern | QuadTileKind::PatternWithMask => {
|
||||
if !clip_region.intersects(&info.rect) {
|
||||
QuadTileKind::Pattern { .. } => {
|
||||
if clip_region.contains_box(&info.rect) {
|
||||
info.kind = QuadTileKind::Clipped;
|
||||
}
|
||||
}
|
||||
|
@ -1044,10 +1123,10 @@ impl QuadTileClassifier {
|
|||
// If a tile intersects with a mask region, and isn't clipped, it needs a mask
|
||||
for mask_region in &self.mask_regions {
|
||||
match info.kind {
|
||||
QuadTileKind::Clipped | QuadTileKind::PatternWithMask => {},
|
||||
QuadTileKind::Pattern => {
|
||||
QuadTileKind::Clipped | QuadTileKind::Pattern { has_mask: true, .. } => {},
|
||||
QuadTileKind::Pattern { ref mut has_mask, .. } => {
|
||||
if mask_region.intersects(&info.rect) {
|
||||
info.kind = QuadTileKind::PatternWithMask;
|
||||
*has_mask = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1086,15 +1165,21 @@ fn qc_verify(mut qc: QuadTileClassifier, expected: &[QuadTileKind]) {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
use QuadTileKind::{Pattern as p, Clipped as c, PatternWithMask as m};
|
||||
const P: QuadTileKind = QuadTileKind::Pattern { has_mask: false };
|
||||
|
||||
#[cfg(test)]
|
||||
const C: QuadTileKind = QuadTileKind::Clipped;
|
||||
|
||||
#[cfg(test)]
|
||||
const M: QuadTileKind = QuadTileKind::Pattern { has_mask: true };
|
||||
|
||||
#[test]
|
||||
fn quad_classify_1() {
|
||||
let qc = qc_new(3, 3, 0.0, 0.0, 100.0, 100.0);
|
||||
qc_verify(qc, &[
|
||||
p, p, p,
|
||||
p, p, p,
|
||||
p, p, p,
|
||||
P, P, P,
|
||||
P, P, P,
|
||||
P, P, P,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1106,9 +1191,9 @@ fn quad_classify_2() {
|
|||
qc.add_clip_rect(rect, ClipMode::Clip);
|
||||
|
||||
qc_verify(qc, &[
|
||||
c, c, c,
|
||||
c, c, c,
|
||||
c, c, c,
|
||||
P, P, P,
|
||||
P, P, P,
|
||||
P, P, P,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1120,9 +1205,9 @@ fn quad_classify_3() {
|
|||
qc.add_clip_rect(rect, ClipMode::Clip);
|
||||
|
||||
qc_verify(qc, &[
|
||||
p, p, p,
|
||||
p, p, p,
|
||||
p, p, p,
|
||||
C, C, C,
|
||||
C, P, C,
|
||||
C, C, C,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1134,9 +1219,9 @@ fn quad_classify_4() {
|
|||
qc.add_clip_rect(rect, ClipMode::Clip);
|
||||
|
||||
qc_verify(qc, &[
|
||||
p, p, p,
|
||||
p, c, p,
|
||||
p, p, p,
|
||||
P, P, P,
|
||||
P, P, P,
|
||||
P, P, P,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1148,9 +1233,9 @@ fn quad_classify_5() {
|
|||
qc.add_clip_rect(rect, ClipMode::ClipOut);
|
||||
|
||||
qc_verify(qc, &[
|
||||
p, p, p,
|
||||
p, p, p,
|
||||
p, p, p,
|
||||
M, M, M,
|
||||
M, C, M,
|
||||
M, M, M,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1162,9 +1247,9 @@ fn quad_classify_6() {
|
|||
qc.add_clip_rect(rect, ClipMode::ClipOut);
|
||||
|
||||
qc_verify(qc, &[
|
||||
c, c, c,
|
||||
c, p, c,
|
||||
c, c, c,
|
||||
M, M, M,
|
||||
M, M, M,
|
||||
M, M, M,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1176,9 +1261,9 @@ fn quad_classify_7() {
|
|||
qc.add_mask_region(rect);
|
||||
|
||||
qc_verify(qc, &[
|
||||
m, m, m,
|
||||
m, m, m,
|
||||
m, m, m,
|
||||
M, M, M,
|
||||
M, M, M,
|
||||
M, M, M,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1190,9 +1275,9 @@ fn quad_classify_8() {
|
|||
qc.add_mask_region(rect);
|
||||
|
||||
qc_verify(qc, &[
|
||||
p, p, p,
|
||||
p, m, p,
|
||||
p, p, p,
|
||||
P, P, P,
|
||||
P, M, P,
|
||||
P, P, P,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1204,10 +1289,10 @@ fn quad_classify_9() {
|
|||
qc.add_mask_region(rect);
|
||||
|
||||
qc_verify(qc, &[
|
||||
m, m, p, p,
|
||||
m, m, p, p,
|
||||
p, p, p, p,
|
||||
p, p, p, p,
|
||||
M, M, P, P,
|
||||
M, M, P, P,
|
||||
P, P, P, P,
|
||||
P, P, P, P,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1222,10 +1307,10 @@ fn quad_classify_10() {
|
|||
qc.add_clip_rect(clip_rect, ClipMode::Clip);
|
||||
|
||||
qc_verify(qc, &[
|
||||
m, m, p, p,
|
||||
m, c, p, p,
|
||||
p, c, p, p,
|
||||
p, p, p, p,
|
||||
M, M, P, C,
|
||||
M, M, P, C,
|
||||
P, P, P, C,
|
||||
P, P, P, C,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1243,10 +1328,10 @@ fn quad_classify_11() {
|
|||
qc.add_clip_rect(clip_out_rect, ClipMode::ClipOut);
|
||||
|
||||
qc_verify(qc, &[
|
||||
c, m, p, c,
|
||||
c, c, p, c,
|
||||
c, c, c, c,
|
||||
c, c, c, c,
|
||||
M, M, M, C,
|
||||
M, M, M, C,
|
||||
M, M, M, C,
|
||||
M, M, M, C,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1264,9 +1349,9 @@ fn quad_classify_12() {
|
|||
qc.add_mask_region(mask_rect);
|
||||
|
||||
qc_verify(qc, &[
|
||||
c, m, p, c,
|
||||
c, c, p, c,
|
||||
c, c, c, c,
|
||||
c, c, c, c,
|
||||
M, M, M, C,
|
||||
M, M, M, C,
|
||||
M, M, M, C,
|
||||
M, M, M, C,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
use api::{units::*, PremultipliedColorF, ClipMode};
|
||||
use api::{units::*, PremultipliedColorF};
|
||||
use api::{ColorF, LineOrientation, BorderStyle};
|
||||
use crate::batch::{AlphaBatchBuilder, AlphaBatchContainer, BatchTextures};
|
||||
use crate::batch::{ClipBatcher, BatchBuilder, INVALID_SEGMENT_INDEX, ClipMaskInstanceList};
|
||||
|
@ -1208,8 +1208,6 @@ fn build_mask_tasks(
|
|||
(clip_address, fast_path)
|
||||
}
|
||||
ClipItemKind::Rectangle { rect, mode, .. } => {
|
||||
assert_eq!(mode, ClipMode::Clip);
|
||||
|
||||
let mut writer = gpu_buffer_builder.f32.write_blocks(3);
|
||||
writer.push_one(rect);
|
||||
writer.push_one([0.0, 0.0, 0.0, 0.0]);
|
||||
|
|
|
@ -196,7 +196,6 @@ pub struct PrimTask {
|
|||
pub transform_id: TransformPaletteId,
|
||||
pub edge_flags: EdgeAaSegmentMask,
|
||||
pub quad_flags: QuadFlags,
|
||||
pub clip_node_range: ClipNodeRange,
|
||||
pub prim_needs_scissor_rect: bool,
|
||||
}
|
||||
|
||||
|
@ -544,7 +543,6 @@ impl RenderTaskKind {
|
|||
transform_id: TransformPaletteId,
|
||||
edge_flags: EdgeAaSegmentMask,
|
||||
quad_flags: QuadFlags,
|
||||
clip_node_range: ClipNodeRange,
|
||||
prim_needs_scissor_rect: bool,
|
||||
) -> Self {
|
||||
RenderTaskKind::Prim(PrimTask {
|
||||
|
@ -557,7 +555,6 @@ impl RenderTaskKind {
|
|||
transform_id,
|
||||
edge_flags,
|
||||
quad_flags,
|
||||
clip_node_range,
|
||||
prim_needs_scissor_rect,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -349,6 +349,13 @@ impl ScaleOffset {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn map_size<F, T>(&self, size: &Size2D<f32, F>) -> Size2D<f32, T> {
|
||||
Size2D::new(
|
||||
size.width * self.scale.x,
|
||||
size.height * self.scale.y,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn unmap_vector<F, T>(&self, vector: &Vector2D<f32, F>) -> Vector2D<f32, T> {
|
||||
Vector2D::new(
|
||||
vector.x / self.scale.x,
|
||||
|
@ -677,6 +684,17 @@ pub fn extract_inner_rect_safe<U>(
|
|||
extract_inner_rect_impl(rect, radii, 1.0)
|
||||
}
|
||||
|
||||
/// Return an aligned rectangle that is inside the clip region and doesn't intersect
|
||||
/// any of the bounding rectangles of the rounded corners, with a specific k factor
|
||||
/// to control how much of the rounded corner is included.
|
||||
pub fn extract_inner_rect_k<U>(
|
||||
rect: &Box2D<f32, U>,
|
||||
radii: &BorderRadius,
|
||||
k: f32,
|
||||
) -> Option<Box2D<f32, U>> {
|
||||
extract_inner_rect_impl(rect, radii, k)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
use euclid::vec3;
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
@ -7,4 +7,4 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
unicode-bidi = { version = "0.3.15", features = ["smallvec"] }
|
||||
icu_properties = { version = "1.4.0", features = ["bidi"] }
|
||||
icu_properties = { version = "1.5.0", features = ["bidi"] }
|
||||
|
|
|
@ -81,7 +81,7 @@ if CONFIG["MOZ_ICU4X"]:
|
|||
"src/ICU4XGeckoDataProvider.cpp",
|
||||
]
|
||||
LOCAL_INCLUDES += [
|
||||
"/intl/icu_capi/c/include",
|
||||
"/intl/icu_capi/bindings/c",
|
||||
]
|
||||
|
||||
# At the time of this writing the MOZ_HAS_MOZGLUE define must be true in order to
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- a/intl/icu_capi/Cargo.toml 2023-11-23 00:55:29.801649858 +0900
|
||||
+++ b/intl/icu_capi/Cargo.toml 2023-11-23 00:57:49.528753911 +0900
|
||||
@@ -190,19 +190,7 @@
|
||||
"icu_timezone?/serde",
|
||||
@@ -190,19 +190,8 @@
|
||||
"icu_experimental?/serde",
|
||||
]
|
||||
compiled_data = [
|
||||
- "icu_calendar?/compiled_data",
|
||||
|
@ -9,14 +9,14 @@
|
|||
- "icu_collator?/compiled_data",
|
||||
- "icu_datetime?/compiled_data",
|
||||
- "icu_decimal?/compiled_data",
|
||||
- "icu_displaynames?/compiled_data",
|
||||
- "icu_list?/compiled_data",
|
||||
- "icu_locid_transform?/compiled_data",
|
||||
- "icu_normalizer?/compiled_data",
|
||||
- "icu_plurals?/compiled_data",
|
||||
- "icu_properties?/compiled_data",
|
||||
"icu_properties?/compiled_data",
|
||||
"icu_segmenter?/compiled_data",
|
||||
- "icu_timezone?/compiled_data",
|
||||
- "icu_experimental?/compiled_data",
|
||||
]
|
||||
cpp_default = ["logging"]
|
||||
default = [
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
diff --git a/intl/icu_capi/cpp/include/diplomat_runtime.hpp b/intl/icu_capi/cpp/include/diplomat_runtime.hpp
|
||||
--- a/intl/icu_capi/cpp/include/diplomat_runtime.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/diplomat_runtime.hpp
|
||||
@@ -49,52 +49,60 @@ template<typename T> struct WriteableTra
|
||||
template<> struct WriteableTrait<std::string> {
|
||||
static inline capi::DiplomatWriteable Construct(std::string& t) {
|
||||
return diplomat::WriteableFromString(t);
|
||||
}
|
||||
};
|
||||
|
||||
template<class T> struct Ok {
|
||||
T inner;
|
||||
- Ok(T&& i): inner(std::move(i)) {}
|
||||
+ explicit Ok(T&& i): inner(std::move(i)) {}
|
||||
// We don't want to expose an lvalue-capable constructor in general
|
||||
// however there is no problem doing this for trivially copyable types
|
||||
template<typename X = T, typename = typename std::enable_if<std::is_trivially_copyable<X>::value>::type>
|
||||
- Ok(T i): inner(i) {}
|
||||
+ explicit Ok(const T& i): inner(i) {}
|
||||
Ok() = default;
|
||||
Ok(Ok&&) noexcept = default;
|
||||
Ok(const Ok &) = default;
|
||||
Ok& operator=(const Ok&) = default;
|
||||
Ok& operator=(Ok&&) noexcept = default;
|
||||
};
|
||||
|
||||
template<class T> struct Err {
|
||||
T inner;
|
||||
- Err(T&& i): inner(std::move(i)) {}
|
||||
+ explicit Err(T&& i): inner(std::move(i)) {}
|
||||
// We don't want to expose an lvalue-capable constructor in general
|
||||
// however there is no problem doing this for trivially copyable types
|
||||
template<typename X = T, typename = typename std::enable_if<std::is_trivially_copyable<X>::value>::type>
|
||||
- Err(T i): inner(i) {}
|
||||
+ explicit Err(const T& i): inner(i) {}
|
||||
Err() = default;
|
||||
Err(Err&&) noexcept = default;
|
||||
Err(const Err &) = default;
|
||||
Err& operator=(const Err&) = default;
|
||||
Err& operator=(Err&&) noexcept = default;
|
||||
};
|
||||
|
||||
template<class T, class E>
|
||||
class result {
|
||||
private:
|
||||
std::variant<Ok<T>, Err<E>> val;
|
||||
public:
|
||||
- result(Ok<T>&& v): val(std::move(v)) {}
|
||||
- result(Err<E>&& v): val(std::move(v)) {}
|
||||
+ explicit result(Ok<T>&& v): val(std::move(v)) {}
|
||||
+ explicit result(Err<E>&& v): val(std::move(v)) {}
|
||||
result() = default;
|
||||
result(const result &) = default;
|
||||
result& operator=(const result&) = default;
|
||||
+ result& operator=(Ok<T>&& t) {
|
||||
+ this->val = Ok<T>(std::move(t));
|
||||
+ return *this;
|
||||
+ }
|
||||
+ result& operator=(Err<E>&& e) {
|
||||
+ this->val = Err<E>(std::move(e));
|
||||
+ return *this;
|
||||
+ }
|
||||
result& operator=(result&&) noexcept = default;
|
||||
result(result &&) noexcept = default;
|
||||
~result() = default;
|
||||
bool is_ok() const {
|
||||
return std::holds_alternative<Ok<T>>(this->val);
|
||||
};
|
||||
bool is_err() const {
|
||||
return std::holds_alternative<Err<E>>(this->val);
|
||||
@@ -142,17 +150,17 @@ template<class T> using span = std::span
|
||||
// C++-17-compatible std::span
|
||||
template<class T>
|
||||
class span {
|
||||
|
||||
public:
|
||||
constexpr span(T* data, size_t size)
|
||||
: data_(data), size_(size) {}
|
||||
template<size_t N>
|
||||
- constexpr span(std::array<typename std::remove_const<T>::type, N>& arr)
|
||||
+ explicit constexpr span(std::array<typename std::remove_const<T>::type, N>& arr)
|
||||
: data_(const_cast<T*>(arr.data())), size_(N) {}
|
||||
constexpr T* data() const noexcept {
|
||||
return this->data_;
|
||||
}
|
||||
constexpr size_t size() const noexcept {
|
||||
return this->size_;
|
||||
}
|
||||
private:
|
|
@ -1,11 +1,10 @@
|
|||
diff --git a/intl/icu_capi/src/data_struct.rs b/intl/icu_capi/src/data_struct.rs
|
||||
index d66e20b117b58..60765cec2419a 100644
|
||||
--- a/intl/icu_capi/src/data_struct.rs
|
||||
+++ b/intl/icu_capi/src/data_struct.rs
|
||||
@@ -20,7 +20,7 @@ pub mod ffi {
|
||||
@@ -21,7 +21,7 @@ pub mod ffi {
|
||||
///
|
||||
/// This can be used to construct a StructDataProvider.
|
||||
#[diplomat::attr(dart, disable)]
|
||||
#[diplomat::attr(*, disable)]
|
||||
- pub struct ICU4XDataStruct(pub(crate) AnyPayload);
|
||||
+ pub struct ICU4XDataStruct(#[allow(dead_code)] AnyPayload);
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
diff --git a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp
|
||||
@@ -109,17 +109,17 @@ class ICU4XDataProvider {
|
||||
/**
|
||||
* See the [Rust documentation for `new_with_fallbacker`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker) for more information.
|
||||
*
|
||||
* Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html)
|
||||
*/
|
||||
diplomat::result<std::monostate, ICU4XError> enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker);
|
||||
inline const capi::ICU4XDataProvider* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XDataProvider* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {}
|
||||
+ inline explicit ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {}
|
||||
ICU4XDataProvider() = default;
|
||||
ICU4XDataProvider(ICU4XDataProvider&&) noexcept = default;
|
||||
ICU4XDataProvider& operator=(ICU4XDataProvider&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XDataProvider, ICU4XDataProviderDeleter> inner;
|
||||
};
|
||||
|
||||
#include "ICU4XLocaleFallbacker.hpp"
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp
|
||||
@@ -33,17 +33,17 @@ class ICU4XLineBreakIteratorLatin1 {
|
||||
* Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
|
||||
* out of range of a 32-bit signed integer.
|
||||
*
|
||||
* See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
|
||||
*/
|
||||
int32_t next();
|
||||
inline const capi::ICU4XLineBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XLineBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {}
|
||||
+ inline explicit ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {}
|
||||
ICU4XLineBreakIteratorLatin1() = default;
|
||||
ICU4XLineBreakIteratorLatin1(ICU4XLineBreakIteratorLatin1&&) noexcept = default;
|
||||
ICU4XLineBreakIteratorLatin1& operator=(ICU4XLineBreakIteratorLatin1&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XLineBreakIteratorLatin1, ICU4XLineBreakIteratorLatin1Deleter> inner;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp
|
||||
@@ -33,17 +33,17 @@ class ICU4XLineBreakIteratorUtf16 {
|
||||
* Finds the next breakpoint. Returns -1 if at the end of the string or if the index is
|
||||
* out of range of a 32-bit signed integer.
|
||||
*
|
||||
* See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information.
|
||||
*/
|
||||
int32_t next();
|
||||
inline const capi::ICU4XLineBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XLineBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {}
|
||||
+ inline explicit ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {}
|
||||
ICU4XLineBreakIteratorUtf16() = default;
|
||||
ICU4XLineBreakIteratorUtf16(ICU4XLineBreakIteratorUtf16&&) noexcept = default;
|
||||
ICU4XLineBreakIteratorUtf16& operator=(ICU4XLineBreakIteratorUtf16&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XLineBreakIteratorUtf16, ICU4XLineBreakIteratorUtf16Deleter> inner;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XLocale.hpp b/intl/icu_capi/cpp/include/ICU4XLocale.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XLocale.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XLocale.hpp
|
||||
@@ -202,17 +202,17 @@ class ICU4XLocale {
|
||||
/**
|
||||
* Deprecated
|
||||
*
|
||||
* Use `create_from_string("bn").
|
||||
*/
|
||||
static ICU4XLocale create_bn();
|
||||
inline const capi::ICU4XLocale* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XLocale* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {}
|
||||
+ inline explicit ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {}
|
||||
ICU4XLocale() = default;
|
||||
ICU4XLocale(ICU4XLocale&&) noexcept = default;
|
||||
ICU4XLocale& operator=(ICU4XLocale&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XLocale, ICU4XLocaleDeleter> inner;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp
|
||||
@@ -40,17 +40,17 @@ class ICU4XLocaleFallbackIterator {
|
||||
/**
|
||||
* Performs one step of the fallback algorithm, mutating the locale.
|
||||
*
|
||||
* See the [Rust documentation for `step`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step) for more information.
|
||||
*/
|
||||
void step();
|
||||
inline const capi::ICU4XLocaleFallbackIterator* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XLocaleFallbackIterator* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {}
|
||||
+ inline explicit ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {}
|
||||
ICU4XLocaleFallbackIterator() = default;
|
||||
ICU4XLocaleFallbackIterator(ICU4XLocaleFallbackIterator&&) noexcept = default;
|
||||
ICU4XLocaleFallbackIterator& operator=(ICU4XLocaleFallbackIterator&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XLocaleFallbackIterator, ICU4XLocaleFallbackIteratorDeleter> inner;
|
||||
};
|
||||
|
||||
#include "ICU4XLocale.hpp"
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp
|
||||
@@ -53,17 +53,17 @@ class ICU4XLocaleFallbacker {
|
||||
*
|
||||
* See the [Rust documentation for `for_config`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config) for more information.
|
||||
*
|
||||
* Lifetimes: `this` must live at least as long as the output.
|
||||
*/
|
||||
diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> for_config(ICU4XLocaleFallbackConfig config) const;
|
||||
inline const capi::ICU4XLocaleFallbacker* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XLocaleFallbacker* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {}
|
||||
+ inline explicit ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {}
|
||||
ICU4XLocaleFallbacker() = default;
|
||||
ICU4XLocaleFallbacker(ICU4XLocaleFallbacker&&) noexcept = default;
|
||||
ICU4XLocaleFallbacker& operator=(ICU4XLocaleFallbacker&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XLocaleFallbacker, ICU4XLocaleFallbackerDeleter> inner;
|
||||
};
|
||||
|
||||
#include "ICU4XDataProvider.hpp"
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp
|
||||
@@ -38,17 +38,17 @@ class ICU4XLocaleFallbackerWithConfig {
|
||||
*
|
||||
* See the [Rust documentation for `fallback_for`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for) for more information.
|
||||
*
|
||||
* Lifetimes: `this` must live at least as long as the output.
|
||||
*/
|
||||
ICU4XLocaleFallbackIterator fallback_for_locale(const ICU4XLocale& locale) const;
|
||||
inline const capi::ICU4XLocaleFallbackerWithConfig* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XLocaleFallbackerWithConfig* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {}
|
||||
+ inline explicit ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {}
|
||||
ICU4XLocaleFallbackerWithConfig() = default;
|
||||
ICU4XLocaleFallbackerWithConfig(ICU4XLocaleFallbackerWithConfig&&) noexcept = default;
|
||||
ICU4XLocaleFallbackerWithConfig& operator=(ICU4XLocaleFallbackerWithConfig&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XLocaleFallbackerWithConfig, ICU4XLocaleFallbackerWithConfigDeleter> inner;
|
||||
};
|
||||
|
||||
#include "ICU4XLocale.hpp"
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp
|
||||
@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorLatin1 {
|
||||
/**
|
||||
* Return true when break boundary is word-like such as letter/number/CJK
|
||||
*
|
||||
* See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
|
||||
*/
|
||||
bool is_word_like() const;
|
||||
inline const capi::ICU4XWordBreakIteratorLatin1* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XWordBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {}
|
||||
+ inline explicit ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {}
|
||||
ICU4XWordBreakIteratorLatin1() = default;
|
||||
ICU4XWordBreakIteratorLatin1(ICU4XWordBreakIteratorLatin1&&) noexcept = default;
|
||||
ICU4XWordBreakIteratorLatin1& operator=(ICU4XWordBreakIteratorLatin1&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XWordBreakIteratorLatin1, ICU4XWordBreakIteratorLatin1Deleter> inner;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp
|
||||
@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorUtf16 {
|
||||
/**
|
||||
* Return true when break boundary is word-like such as letter/number/CJK
|
||||
*
|
||||
* See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
|
||||
*/
|
||||
bool is_word_like() const;
|
||||
inline const capi::ICU4XWordBreakIteratorUtf16* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XWordBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {}
|
||||
+ inline explicit ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {}
|
||||
ICU4XWordBreakIteratorUtf16() = default;
|
||||
ICU4XWordBreakIteratorUtf16(ICU4XWordBreakIteratorUtf16&&) noexcept = default;
|
||||
ICU4XWordBreakIteratorUtf16& operator=(ICU4XWordBreakIteratorUtf16&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XWordBreakIteratorUtf16, ICU4XWordBreakIteratorUtf16Deleter> inner;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp
|
||||
@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorUtf8 {
|
||||
/**
|
||||
* Return true when break boundary is word-like such as letter/number/CJK
|
||||
*
|
||||
* See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information.
|
||||
*/
|
||||
bool is_word_like() const;
|
||||
inline const capi::ICU4XWordBreakIteratorUtf8* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XWordBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {}
|
||||
+ inline explicit ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {}
|
||||
ICU4XWordBreakIteratorUtf8() = default;
|
||||
ICU4XWordBreakIteratorUtf8(ICU4XWordBreakIteratorUtf8&&) noexcept = default;
|
||||
ICU4XWordBreakIteratorUtf8& operator=(ICU4XWordBreakIteratorUtf8&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XWordBreakIteratorUtf8, ICU4XWordBreakIteratorUtf8Deleter> inner;
|
||||
};
|
||||
|
||||
|
||||
diff --git a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
|
||||
--- a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
|
||||
+++ b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp
|
||||
@@ -88,17 +88,17 @@ class ICU4XWordSegmenter {
|
||||
*
|
||||
* See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1) for more information.
|
||||
*
|
||||
* Lifetimes: `this`, `input` must live at least as long as the output.
|
||||
*/
|
||||
ICU4XWordBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const;
|
||||
inline const capi::ICU4XWordSegmenter* AsFFI() const { return this->inner.get(); }
|
||||
inline capi::ICU4XWordSegmenter* AsFFIMut() { return this->inner.get(); }
|
||||
- inline ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {}
|
||||
+ inline explicit ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {}
|
||||
ICU4XWordSegmenter() = default;
|
||||
ICU4XWordSegmenter(ICU4XWordSegmenter&&) noexcept = default;
|
||||
ICU4XWordSegmenter& operator=(ICU4XWordSegmenter&& other) noexcept = default;
|
||||
private:
|
||||
std::unique_ptr<capi::ICU4XWordSegmenter, ICU4XWordSegmenterDeleter> inner;
|
||||
};
|
||||
|
||||
#include "ICU4XDataProvider.hpp"
|
6
intl/icu_capi/.cargo_vcs_info.json
Normal file
6
intl/icu_capi/.cargo_vcs_info.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"git": {
|
||||
"sha1": "c5703c8d9f2544ecccc6495d5e57287a894e9d9d"
|
||||
},
|
||||
"path_in_vcs": "ffi/capi"
|
||||
}
|
|
@ -13,12 +13,11 @@
|
|||
edition = "2021"
|
||||
rust-version = "1.67"
|
||||
name = "icu_capi"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
authors = ["The ICU4X Project Developers"]
|
||||
include = [
|
||||
"js/**/*",
|
||||
"c/**/*",
|
||||
"cpp/**/*",
|
||||
"bindings/**/*",
|
||||
"!bindings/dart/**/*",
|
||||
"src/**/*",
|
||||
"tests/**/*",
|
||||
"Cargo.toml",
|
||||
|
@ -29,7 +28,7 @@ description = "C interface to ICU4X"
|
|||
homepage = "https://icu4x.unicode.org"
|
||||
readme = "README.md"
|
||||
categories = ["internationalization"]
|
||||
license-file = "LICENSE"
|
||||
license = "Unicode-3.0"
|
||||
repository = "https://github.com/unicode-org/icu4x"
|
||||
|
||||
[package.metadata.cargo-all-features]
|
||||
|
@ -45,126 +44,127 @@ max_combination_size = 2
|
|||
all-features = true
|
||||
|
||||
[dependencies.diplomat]
|
||||
version = "0.7"
|
||||
version = "0.8"
|
||||
|
||||
[dependencies.diplomat-runtime]
|
||||
version = "0.7"
|
||||
version = "0.8"
|
||||
|
||||
[dependencies.fixed_decimal]
|
||||
version = "0.5.5"
|
||||
version = "0.5.6"
|
||||
features = ["ryu"]
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_calendar]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_casemap]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_collator]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_collections]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_datetime]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_decimal]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_displaynames]
|
||||
version = "0.11.2"
|
||||
[dependencies.icu_experimental]
|
||||
version = "~0.1.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_list]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_locid]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_locid_transform]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_normalizer]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_plurals]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_properties]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
features = ["bidi"]
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_provider]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_provider_adapters]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_provider_blob]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_segmenter]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
features = ["auto"]
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.icu_timezone]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.log]
|
||||
version = "0.4"
|
||||
version = "0.4.17"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.serde]
|
||||
version = "1.0"
|
||||
version = "1.0.110"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.tinystr]
|
||||
version = "0.7.4"
|
||||
version = "0.7.5"
|
||||
default-features = false
|
||||
|
||||
[dependencies.unicode-bidi]
|
||||
version = "0.3.13"
|
||||
version = "0.3.11"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[dependencies.writeable]
|
||||
version = "0.5.4"
|
||||
version = "0.5.5"
|
||||
default-features = false
|
||||
|
||||
[features]
|
||||
|
@ -177,7 +177,6 @@ buffer_provider = [
|
|||
"icu_collator?/serde",
|
||||
"icu_datetime?/serde",
|
||||
"icu_decimal?/serde",
|
||||
"icu_displaynames?/serde",
|
||||
"icu_list?/serde",
|
||||
"icu_locid_transform?/serde",
|
||||
"icu_locid/serde",
|
||||
|
@ -188,8 +187,10 @@ buffer_provider = [
|
|||
"icu_provider_adapters/serde",
|
||||
"icu_segmenter?/serde",
|
||||
"icu_timezone?/serde",
|
||||
"icu_experimental?/serde",
|
||||
]
|
||||
compiled_data = [
|
||||
"icu_properties?/compiled_data",
|
||||
"icu_segmenter?/compiled_data",
|
||||
]
|
||||
cpp_default = ["logging"]
|
||||
|
@ -198,6 +199,7 @@ default = [
|
|||
"default_components",
|
||||
"logging",
|
||||
"simple_logger",
|
||||
"std",
|
||||
]
|
||||
default_components = [
|
||||
"icu_calendar",
|
||||
|
@ -213,6 +215,7 @@ default_components = [
|
|||
"icu_segmenter",
|
||||
"icu_timezone",
|
||||
]
|
||||
experimental_components = ["dep:icu_experimental"]
|
||||
icu_calendar = ["dep:icu_calendar"]
|
||||
icu_casemap = ["dep:icu_casemap"]
|
||||
icu_collator = ["dep:icu_collator"]
|
||||
|
@ -227,7 +230,6 @@ icu_decimal = [
|
|||
"dep:icu_decimal",
|
||||
"dep:fixed_decimal",
|
||||
]
|
||||
icu_displaynames = ["dep:icu_displaynames"]
|
||||
icu_list = ["dep:icu_list"]
|
||||
icu_locid_transform = ["dep:icu_locid_transform"]
|
||||
icu_normalizer = ["dep:icu_normalizer"]
|
||||
|
@ -245,27 +247,38 @@ icu_timezone = [
|
|||
"dep:icu_timezone",
|
||||
"dep:icu_calendar",
|
||||
]
|
||||
libc_alloc = ["dep:libc_alloc"]
|
||||
logging = [
|
||||
"icu_provider/logging",
|
||||
"dep:log",
|
||||
"diplomat-runtime/log",
|
||||
"std",
|
||||
]
|
||||
looping_panic_handler = []
|
||||
provider_fs = [
|
||||
"dep:icu_provider_fs",
|
||||
"buffer_provider",
|
||||
"std",
|
||||
]
|
||||
provider_test = ["compiled_data"]
|
||||
simple_logger = [
|
||||
"dep:simple_logger",
|
||||
"logging",
|
||||
]
|
||||
std = []
|
||||
wasm_default = ["logging"]
|
||||
|
||||
[target."cfg(not(any(target_arch = \"wasm32\", target_os = \"none\")))".dependencies.icu_provider_fs]
|
||||
version = "~1.4.0"
|
||||
version = "~1.5.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[target."cfg(not(any(target_arch = \"wasm32\", target_os = \"none\")))".dependencies.libc_alloc]
|
||||
version = "1.0.6"
|
||||
features = ["global"]
|
||||
optional = true
|
||||
default-features = false
|
||||
|
||||
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.simple_logger]
|
||||
version = "4.1.0"
|
||||
version = "4.0.0"
|
||||
optional = true
|
||||
|
|
|
@ -2,7 +2,7 @@ UNICODE LICENSE V3
|
|||
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright © 2020-2023 Unicode, Inc.
|
||||
Copyright © 2020-2024 Unicode, Inc.
|
||||
|
||||
NOTICE TO USER: Carefully read the following legal agreement. BY
|
||||
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
|
||||
|
@ -38,6 +38,8 @@ not be used in advertising or otherwise to promote the sale, use or other
|
|||
dealings in these Data Files or Software without prior written
|
||||
authorization of the copyright holder.
|
||||
|
||||
SPDX-License-Identifier: Unicode-3.0
|
||||
|
||||
—
|
||||
|
||||
Portions of ICU4X may have been adapted from ICU4C and/or ICU4J.
|
||||
|
|
|
@ -11,17 +11,17 @@ and as such this crate may unpredictably change its Rust API across compatible s
|
|||
by this crate, while not directly documented, are stable within the same major semver version, as are the bindings exposed under
|
||||
the `cpp/` and `js/` folders.
|
||||
|
||||
This crate may still be explored for documentation on docs.rs, and there are generated language-specific docs available as well.
|
||||
C++ has sphinx docs in `cpp/docs/`, and the header files also contain documentation comments. The JS version has sphinx docs under
|
||||
`js/docs`, and the TypeScript sources in `js/include` are compatible with `tsdoc`.
|
||||
This crate may still be explored for documentation on docs.rs, and there are language-specific docs available as well.
|
||||
C++, Dart, and TypeScript headers contain inline documentation, which is available pre-rendered: [C++], [TypeScript].
|
||||
|
||||
This crate is `no_std` and will not typically build as a staticlib on its own. If you wish to link to it you should prefer
|
||||
using `icu_capi_staticlib`, or for more esoteric platforms you may write a shim crate depending on this crate that hooks in
|
||||
an allocator and panic hook.
|
||||
This crate is `no_std`-compatible. If you wish to use it in `no_std` mode, you must write a wrapper crate that defines an allocator
|
||||
and a panic hook in order to compile as a C library.
|
||||
|
||||
More information on using ICU4X from C++ can be found in [our tutorial].
|
||||
|
||||
[our tutorial]: https://github.com/unicode-org/icu4x/blob/main/docs/tutorials/cpp.md
|
||||
[our tutorial]: https://github.com/unicode-org/icu4x/blob/main/tutorials/cpp.md
|
||||
[TypeScript]: https://unicode-org.github.io/icu4x/tsdoc
|
||||
[C++]: https://unicode-org.github.io/icu4x/cppdoc
|
||||
|
||||
<!-- cargo-rdme end -->
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_loa
|
|||
|
||||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_east_asian_width(const ICU4XDataProvider* provider);
|
||||
|
||||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_hangul_syllable_type(const ICU4XDataProvider* provider);
|
||||
|
||||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_indic_syllabic_category(const ICU4XDataProvider* provider);
|
||||
|
||||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_line_break(const ICU4XDataProvider* provider);
|
||||
|
@ -52,6 +54,8 @@ diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_try
|
|||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_word_break(const ICU4XDataProvider* provider);
|
||||
|
||||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_sentence_break(const ICU4XDataProvider* provider);
|
||||
|
||||
diplomat_result_box_ICU4XCodePointMapData8_ICU4XError ICU4XCodePointMapData8_load_joining_type(const ICU4XDataProvider* provider);
|
||||
void ICU4XCodePointMapData8_destroy(ICU4XCodePointMapData8* self);
|
||||
|
||||
#ifdef __cplusplus
|
|
@ -19,6 +19,7 @@ typedef struct ICU4XCollator ICU4XCollator;
|
|||
#include "ICU4XCollatorOptionsV1.h"
|
||||
#include "diplomat_result_box_ICU4XCollator_ICU4XError.h"
|
||||
#include "ICU4XOrdering.h"
|
||||
#include "ICU4XCollatorResolvedOptionsV1.h"
|
||||
#ifdef __cplusplus
|
||||
namespace capi {
|
||||
extern "C" {
|
||||
|
@ -30,7 +31,9 @@ ICU4XOrdering ICU4XCollator_compare(const ICU4XCollator* self, const char* left_
|
|||
|
||||
ICU4XOrdering ICU4XCollator_compare_valid_utf8(const ICU4XCollator* self, const char* left_data, size_t left_len, const char* right_data, size_t right_len);
|
||||
|
||||
ICU4XOrdering ICU4XCollator_compare_utf16(const ICU4XCollator* self, const uint16_t* left_data, size_t left_len, const uint16_t* right_data, size_t right_len);
|
||||
ICU4XOrdering ICU4XCollator_compare_utf16(const ICU4XCollator* self, const char16_t* left_data, size_t left_len, const char16_t* right_data, size_t right_len);
|
||||
|
||||
ICU4XCollatorResolvedOptionsV1 ICU4XCollator_resolved_options(const ICU4XCollator* self);
|
||||
void ICU4XCollator_destroy(ICU4XCollator* self);
|
||||
|
||||
#ifdef __cplusplus
|
50
intl/icu_capi/bindings/c/ICU4XCollatorResolvedOptionsV1.h
Normal file
50
intl/icu_capi/bindings/c/ICU4XCollatorResolvedOptionsV1.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
#ifndef ICU4XCollatorResolvedOptionsV1_H
|
||||
#define ICU4XCollatorResolvedOptionsV1_H
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include "diplomat_runtime.h"
|
||||
|
||||
#include "ICU4XCollatorStrength.h"
|
||||
#include "ICU4XCollatorAlternateHandling.h"
|
||||
#include "ICU4XCollatorCaseFirst.h"
|
||||
#include "ICU4XCollatorMaxVariable.h"
|
||||
#include "ICU4XCollatorCaseLevel.h"
|
||||
#include "ICU4XCollatorNumeric.h"
|
||||
#include "ICU4XCollatorBackwardSecondLevel.h"
|
||||
#ifdef __cplusplus
|
||||
namespace capi {
|
||||
#endif
|
||||
|
||||
typedef struct ICU4XCollatorResolvedOptionsV1 {
|
||||
ICU4XCollatorStrength strength;
|
||||
ICU4XCollatorAlternateHandling alternate_handling;
|
||||
ICU4XCollatorCaseFirst case_first;
|
||||
ICU4XCollatorMaxVariable max_variable;
|
||||
ICU4XCollatorCaseLevel case_level;
|
||||
ICU4XCollatorNumeric numeric;
|
||||
ICU4XCollatorBackwardSecondLevel backward_second_level;
|
||||
} ICU4XCollatorResolvedOptionsV1;
|
||||
#ifdef __cplusplus
|
||||
} // namespace capi
|
||||
#endif
|
||||
#include "ICU4XCollatorStrength.h"
|
||||
#include "ICU4XCollatorAlternateHandling.h"
|
||||
#include "ICU4XCollatorCaseFirst.h"
|
||||
#include "ICU4XCollatorMaxVariable.h"
|
||||
#include "ICU4XCollatorCaseLevel.h"
|
||||
#include "ICU4XCollatorNumeric.h"
|
||||
#include "ICU4XCollatorBackwardSecondLevel.h"
|
||||
#ifdef __cplusplus
|
||||
namespace capi {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ICU4XCollatorResolvedOptionsV1_destroy(ICU4XCollatorResolvedOptionsV1* self);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
} // namespace capi
|
||||
#endif
|
||||
#endif
|
|
@ -19,6 +19,7 @@ typedef struct ICU4XCustomTimeZone ICU4XCustomTimeZone;
|
|||
#include "diplomat_result_int32_t_ICU4XError.h"
|
||||
#include "diplomat_result_bool_ICU4XError.h"
|
||||
#include "ICU4XIanaToBcp47Mapper.h"
|
||||
#include "ICU4XTimeZoneIdMapper.h"
|
||||
#include "ICU4XMetazoneCalculator.h"
|
||||
#include "ICU4XIsoDateTime.h"
|
||||
#ifdef __cplusplus
|
||||
|
@ -50,6 +51,8 @@ diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_time_zone_id(ICU4XCu
|
|||
|
||||
diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id(ICU4XCustomTimeZone* self, const ICU4XIanaToBcp47Mapper* mapper, const char* id_data, size_t id_len);
|
||||
|
||||
diplomat_result_void_ICU4XError ICU4XCustomTimeZone_try_set_iana_time_zone_id_2(ICU4XCustomTimeZone* self, const ICU4XTimeZoneIdMapper* mapper, const char* id_data, size_t id_len);
|
||||
|
||||
void ICU4XCustomTimeZone_clear_time_zone_id(ICU4XCustomTimeZone* self);
|
||||
|
||||
diplomat_result_void_ICU4XError ICU4XCustomTimeZone_time_zone_id(const ICU4XCustomTimeZone* self, DiplomatWriteable* write);
|
|
@ -34,6 +34,8 @@ ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* cal
|
|||
|
||||
ICU4XIsoDate* ICU4XDate_to_iso(const ICU4XDate* self);
|
||||
|
||||
uint16_t ICU4XDate_day_of_year(const ICU4XDate* self);
|
||||
|
||||
uint32_t ICU4XDate_day_of_month(const ICU4XDate* self);
|
||||
|
||||
ICU4XIsoWeekday ICU4XDate_day_of_week(const ICU4XDate* self);
|
|
@ -50,6 +50,8 @@ uint8_t ICU4XDateTime_second(const ICU4XDateTime* self);
|
|||
|
||||
uint32_t ICU4XDateTime_nanosecond(const ICU4XDateTime* self);
|
||||
|
||||
uint16_t ICU4XDateTime_day_of_year(const ICU4XDateTime* self);
|
||||
|
||||
uint32_t ICU4XDateTime_day_of_month(const ICU4XDateTime* self);
|
||||
|
||||
ICU4XIsoWeekday ICU4XDateTime_day_of_week(const ICU4XDateTime* self);
|
|
@ -14,6 +14,7 @@ typedef enum ICU4XError {
|
|||
ICU4XError_UnknownError = 0,
|
||||
ICU4XError_WriteableError = 1,
|
||||
ICU4XError_OutOfBoundsError = 2,
|
||||
ICU4XError_Utf8Error = 3,
|
||||
ICU4XError_DataMissingDataKeyError = 256,
|
||||
ICU4XError_DataMissingVariantError = 257,
|
||||
ICU4XError_DataMissingLocaleError = 258,
|
||||
|
@ -66,6 +67,7 @@ typedef enum ICU4XError {
|
|||
ICU4XError_TimeZoneInvalidIdError = 2563,
|
||||
ICU4XError_NormalizerFutureExtensionError = 2816,
|
||||
ICU4XError_NormalizerValidationError = 2817,
|
||||
ICU4XError_InvalidCldrUnitIdentifierError = 3072,
|
||||
} ICU4XError;
|
||||
#ifdef __cplusplus
|
||||
} // namespace capi
|
|
@ -17,6 +17,7 @@ typedef struct ICU4XFixedDecimal ICU4XFixedDecimal;
|
|||
#include "diplomat_result_box_ICU4XFixedDecimal_ICU4XError.h"
|
||||
#include "ICU4XFixedDecimalSign.h"
|
||||
#include "ICU4XFixedDecimalSignDisplay.h"
|
||||
#include "ICU4XRoundingIncrement.h"
|
||||
#include "diplomat_result_void_void.h"
|
||||
#ifdef __cplusplus
|
||||
namespace capi {
|
||||
|
@ -73,22 +74,40 @@ void ICU4XFixedDecimal_set_max_position(ICU4XFixedDecimal* self, int16_t positio
|
|||
|
||||
void ICU4XFixedDecimal_trunc(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_trunc_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_half_trunc(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_half_trunc_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_expand(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_expand_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_half_expand(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_half_expand_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_ceil(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_ceil_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_half_ceil(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_half_ceil_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_floor(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_floor_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_half_floor(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_half_floor_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
void ICU4XFixedDecimal_half_even(ICU4XFixedDecimal* self, int16_t position);
|
||||
|
||||
void ICU4XFixedDecimal_half_even_to_increment(ICU4XFixedDecimal* self, int16_t position, ICU4XRoundingIncrement increment);
|
||||
|
||||
diplomat_result_void_void ICU4XFixedDecimal_concatenate_end(ICU4XFixedDecimal* self, ICU4XFixedDecimal* other);
|
||||
|
||||
void ICU4XFixedDecimal_to_string(const ICU4XFixedDecimal* self, DiplomatWriteable* to);
|
|
@ -28,7 +28,7 @@ diplomat_result_box_ICU4XGraphemeClusterSegmenter_ICU4XError ICU4XGraphemeCluste
|
|||
|
||||
ICU4XGraphemeClusterBreakIteratorUtf8* ICU4XGraphemeClusterSegmenter_segment_utf8(const ICU4XGraphemeClusterSegmenter* self, const char* input_data, size_t input_len);
|
||||
|
||||
ICU4XGraphemeClusterBreakIteratorUtf16* ICU4XGraphemeClusterSegmenter_segment_utf16(const ICU4XGraphemeClusterSegmenter* self, const uint16_t* input_data, size_t input_len);
|
||||
ICU4XGraphemeClusterBreakIteratorUtf16* ICU4XGraphemeClusterSegmenter_segment_utf16(const ICU4XGraphemeClusterSegmenter* self, const char16_t* input_data, size_t input_len);
|
||||
|
||||
ICU4XGraphemeClusterBreakIteratorLatin1* ICU4XGraphemeClusterSegmenter_segment_latin1(const ICU4XGraphemeClusterSegmenter* self, const uint8_t* input_data, size_t input_len);
|
||||
void ICU4XGraphemeClusterSegmenter_destroy(ICU4XGraphemeClusterSegmenter* self);
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue