MozReview-Commit-ID: 18xg2cleATb
This commit is contained in:
Wes Kocher 2017-02-17 13:51:01 -08:00
Родитель f66ac66a97 4ecbdfe247
Коммит a85d979e21
547 изменённых файлов: 19432 добавлений и 19968 удалений

Просмотреть файл

@ -98,7 +98,6 @@ devtools/client/webconsole/net/**
devtools/client/webconsole/test/**
devtools/client/webconsole/console-output.js
devtools/client/webconsole/hudservice.js
devtools/client/webconsole/utils.js
devtools/client/webconsole/webconsole-connection-proxy.js
devtools/client/webconsole/webconsole.js
devtools/client/webide/**

Просмотреть файл

@ -2269,6 +2269,16 @@
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="3f136e56-4c93-4619-8c0d-d86258c1065d">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader/</infoURL>
<versionRange maxVersion="15.006.30244" minVersion="15.006" severity="1" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="43b45ad8-a373-42c1-89c6-64e2746885e5">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader/</infoURL>
<versionRange maxVersion="15.020.20042" minVersion="15.020" severity="1" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p366">
<match exp="Scorch\.plugin" name="filename"/>
<versionRange maxVersion="6.2.0" minVersion="6.2.0" severity="1"/>
@ -2349,6 +2359,11 @@
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="59c31ade-88d6-4b22-8601-5316f82e3977">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader/</infoURL>
<versionRange maxVersion="11.0.18" minVersion="11.0" severity="1" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1004">
<match exp="Unity Web Player\.plugin" name="filename"/>
<match exp="^($|Unity Web Player version 5.0(\.([0-2]|3f1))?[^0-9.])" name="description"/>
@ -2809,7 +2824,7 @@
<pluginItem blockID="p28">
<match exp="NPFFAddOn.dll" name="filename"/>
</pluginItem>
<pluginItem blockID="p1421">
<pluginItem blockID="p1421" os="Linux">
<match exp="libflashplayer\.so" name="filename"/>
<infoURL>https://get.adobe.com/flashplayer/</infoURL>
<versionRange maxVersion="23.0.0.207" minVersion="11.2.202.643" severity="0" vulnerabilitystatus="1"/>

Просмотреть файл

@ -2,6 +2,8 @@
* 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/. */
/* eslint-env mozilla/frame-script */
var AboutTabCrashed = {
/**
* This can be set to true once this page receives a message from the

Просмотреть файл

@ -6,6 +6,8 @@
/* This content script should work in any browser or iframe and should not
* depend on the frame being contained in tabbrowser. */
/* eslint-env mozilla/frame-script */
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

Просмотреть файл

@ -5,6 +5,8 @@
/* This content script is intended for use by iframes in the share panel. */
/* eslint-env mozilla/frame-script */
var {interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

Просмотреть файл

@ -5,6 +5,8 @@
/* This content script contains code that requires a tab browser. */
/* eslint-env mozilla/frame-script */
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
addMessageListener("AboutHome:SearchTriggered", function(msg) {
sendAsyncMessage("AboutHomeTest:CheckRecordedSearch", msg.data);
});

Просмотреть файл

@ -86,6 +86,7 @@ support-files =
browser_webext_update_perms1.xpi
browser_webext_update_perms2.xpi
browser_webext_update.json
browser_webext_search.xml
!/image/test/mochitest/blue.png
!/toolkit/content/tests/browser/common/mockTransfer.js
!/toolkit/modules/tests/browser/metadata_*.html

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
add_task(function *() {
yield pushPrefs(["ui.key.contentAccess", 5], ["ui.key.chromeAccess", 5]);

Просмотреть файл

@ -2,6 +2,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/* eslint-env mozilla/frame-script */
add_task(function* () {
let firstLocation = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
yield BrowserTestUtils.openNewForegroundTab(gBrowser, firstLocation);

Просмотреть файл

@ -4,6 +4,8 @@
* non-browser cases.
*/
/* eslint-env mozilla/frame-script */
var testPage1 = "data:text/html,<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
var testPage2 = "data:text/html,<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
var testPage3 = "data:text/html,<html id='html3'><body id='body3' contenteditable='true'><button id='button3'>Tab 3</button></body></html>";

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
"use strict";
var gMessageManager;

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
requestLongerTimeout(2);
const DUMMY_PATH = "browser/browser/base/content/test/general/dummy_page.html";

Просмотреть файл

@ -1,5 +1,9 @@
"use strict";
// See but 1340586 for proposal to reorganize permissions tests to
// get rid of this...
requestLongerTimeout(2);
const BASE = getRootDirectory(gTestPath)
.replace("chrome://mochitests/content/", "https://example.com/");
@ -8,8 +12,6 @@ const PERMS_XPI = "browser_webext_permissions.xpi";
const NO_PERMS_XPI = "browser_webext_nopermissions.xpi";
const ID = "permissions@test.mozilla.org";
const DEFAULT_EXTENSION_ICON = "chrome://browser/content/extension.svg";
Services.perms.add(makeURI("https://example.com/"), "install",
Services.perms.ALLOW_ACTION);
@ -21,6 +23,14 @@ registerCleanupFunction(async function() {
}
});
function isDefaultIcon(icon) {
// These are basically the same icon, but code within webextensions
// generates references to the former and generic add-ons manager code
// generates referces to the latter.
return (icon == "chrome://browser/content/extension.svg" ||
icon == "chrome://mozapps/skin/extensions/extensionGeneric.svg");
}
function promisePopupNotificationShown(name) {
return new Promise(resolve => {
function popupshown() {
@ -56,7 +66,7 @@ function checkNotification(panel, filename) {
// Real checking of the contents here is deferred until bug 1316996 lands
} else if (filename == NO_PERMS_XPI) {
// This extension has no icon, it should have the default
is(icon, DEFAULT_EXTENSION_ICON, "Icon is the default extension icon");
ok(isDefaultIcon(icon), "Icon is the default extension icon");
is(header.getAttribute("hidden"), "true", "Permission list header is hidden");
is(ul.childElementCount, 0, "Permissions list has 0 entries");
@ -106,6 +116,45 @@ const INSTALL_FUNCTIONS = [
contentWin.gViewController.doCommand("cmd_installFromFile");
MockFilePicker.cleanup();
},
async function installSearch(filename) {
await SpecialPowers.pushPrefEnv({set: [
["extensions.getAddons.maxResults", 10],
["extensions.getAddons.search.url", `${BASE}/browser_webext_search.xml`],
]});
let win = await BrowserOpenAddonsMgr("addons://list/extension");
let searchResultsPromise = new Promise(resolve => {
win.document.addEventListener("ViewChanged", resolve, {once: true});
});
let search = win.document.getElementById("header-search");
search.focus();
search.value = "search text";
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await searchResultsPromise;
ok(win.gViewController.currentViewId.startsWith("addons://search"),
"about:addons is displaying search results");
let list = win.document.getElementById("search-list");
let item = null;
for (let child of list.childNodes) {
if (child.nodeName == "richlistitem" &&
child.mAddon.install.sourceURI.path.endsWith(filename)) {
item = child;
break;
}
}
ok(item, `Found ${filename} in search results`);
// abracadabara XBL
item.clientTop;
let install = win.document.getAnonymousElementByAttribute(item, "anonid", "install-status");
let button = win.document.getAnonymousElementByAttribute(install, "anonid", "install-remote-btn");
EventUtils.synthesizeMouseAtCenter(button, {}, win);
},
];
add_task(function* () {

Просмотреть файл

@ -3,6 +3,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/* eslint-env mozilla/frame-script */
// Test offline quota warnings - must be run as a mochitest-browser test or
// else the test runner gets in the way of notifications due to bug 857897.

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
const {TabStateFlusher} = Cu.import("resource:///modules/sessionstore/TabStateFlusher.jsm", {});
const DUMMY = "http://example.com/browser/browser/base/content/test/general/dummy_page.html";

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
function swapTabsAndCloseOther(a, b) {
gBrowser.swapBrowsersAndCloseOther(gBrowser.tabs[b], gBrowser.tabs[a]);
}

Просмотреть файл

@ -2,6 +2,8 @@
* This test checks that focus is adjusted properly when switching tabs.
*/
/* eslint-env mozilla/frame-script */
var testPage1 = "<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
var testPage2 = "<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
var testPage3 = "<html id='html3'><body id='body3'><button id='button3'>Tab 3</button></body></html>";

Просмотреть файл

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8" ?>
<searchresults total_results="2">
<addon>
<name>permissions test</name>
<type id='1'>Extension</type>
<guid>permissions@tests.mozilla.org</guid>
<version>1.1</version>
<authors>
<author>
<name>Test Creator</name>
<link>http://example.com/creator.html</link>
</author>
</authors>
<status id='4'>Public</status>
<compatible_applications>
<application>
<name>Firefox</name>
<appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID>
<min_version>0</min_version>
<max_version>*</max_version>
</application>
</compatible_applications>
<compatible_os>ALL</compatible_os>
<install size="1">https://example.com/browser/browser/base/content/test/general/browser_webext_permissions.xpi</install>
</addon>
<addon>
<name>no permissions</name>
<type id='1'>Extension</type>
<guid>nopermissions@tests.mozilla.org</guid>
<version>1.0</version>
<authors>
<author>
<name>Test Creator</name>
<link>http://example.com/creator.html</link>
</author>
</authors>
<status id='4'>Public</status>
<compatible_applications>
<application>
<name>Firefox</name>
<appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID>
<min_version>0</min_version>
<max_version>*</max_version>
</application>
</compatible_applications>
<compatible_os>ALL</compatible_os>
<install size="1">https://example.com/browser/browser/base/content/test/general/browser_webext_nopermissions.xpi</install>
</addon>
</searchresults>

Просмотреть файл

@ -2,6 +2,8 @@
* This test checks that window activation state is set properly with multiple tabs.
*/
/* eslint-env mozilla/frame-script */
var testPage = "data:text/html,<body><style>:-moz-window-inactive { background-color: red; }</style><div id='area'></div></body>";
var colorChangeNotifications = 0;

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
"use strict";
(function() {

Просмотреть файл

@ -5,6 +5,8 @@
// This file is loaded as a "content script" for browser_aboutAccounts tests
"use strict";
/* eslint-env mozilla/frame-script */
var {interfaces: Ci, utils: Cu} = Components;
addEventListener("load", function load(event) {

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
add_task(function* () {
yield setLinks("0,1,2,3,4,5,6,7,8");
setPinnedLinks("");

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
add_task(function* () {
// set max rows to 1, to avoid scroll events by clicking middle button
yield pushPrefs(["browser.newtabpage.rows", 1]);

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
add_task(function* () {
// set max rows to 1, to avoid scroll events by clicking middle button
yield pushPrefs(["browser.newtabpage.rows", 1]);

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
// See browser/components/search/test/browser_*_behavior.js for tests of actual
// searches.

Просмотреть файл

@ -2,6 +2,8 @@
* 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/. */
/* eslint-env mozilla/frame-script */
(function() {
"use strict";

Просмотреть файл

@ -339,6 +339,8 @@ var tests = [
// the currently displayed notification is a persistent one.
{ id: "Test#11",
*run() {
yield SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
function clickAnchor(notifyObj) {
let anchor = document.getElementById(notifyObj.anchorID);
EventUtils.synthesizeMouseAtCenter(anchor, {});
@ -359,10 +361,11 @@ var tests = [
notifyObj1.shownCallbackTriggered = false;
notifyObj1.showingCallbackTriggered = false;
// Click the anchor. This should focus the primary button, but
// not call event callbacks on the notification object.
// Click the anchor. This should focus the closebutton
// (because it's the first focusable element), but not
// call event callbacks on the notification object.
clickAnchor(notifyObj1);
is(document.activeElement, popup.childNodes[0].button);
is(document.activeElement, popup.childNodes[0].closebutton);
ok(!notifyObj1.dismissalCallbackTriggered,
"Should not have dismissed the notification");
ok(!notifyObj1.shownCallbackTriggered,

Просмотреть файл

@ -53,10 +53,11 @@ var tests = [
// Test that the space key on an anchor element focuses an active notification
{ id: "Test#3",
*run() {
yield SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
this.notifyObj = new BasicNotification(this.id);
this.notifyObj.anchorID = "geo-notification-icon";
this.notifyObj.addOptions({
persistent: true
persistent: true,
});
this.notification = showNotification(this.notifyObj);
},
@ -66,9 +67,69 @@ var tests = [
anchor.focus();
is(document.activeElement, anchor);
EventUtils.synthesizeKey(" ", {});
is(document.activeElement, popup.childNodes[0].button);
is(document.activeElement, popup.childNodes[0].closebutton);
this.notification.remove();
},
onHidden(popup) { }
},
// Test that you can switch between active notifications with the space key
// and that the notification is focused on selection.
{ id: "Test#4",
*run() {
yield SpecialPowers.pushPrefEnv({"set": [["accessibility.tabfocus", 7]]});
let notifyObj1 = new BasicNotification(this.id);
notifyObj1.id += "_1";
notifyObj1.anchorID = "default-notification-icon";
notifyObj1.addOptions({
hideClose: true,
checkbox: {
label: "Test that elements inside the panel can be focused",
},
persistent: true,
});
let opened = waitForNotificationPanel();
let notification1 = showNotification(notifyObj1);
yield opened;
let notifyObj2 = new BasicNotification(this.id);
notifyObj2.id += "_2";
notifyObj2.anchorID = "geo-notification-icon";
notifyObj2.addOptions({
persistent: true,
});
opened = waitForNotificationPanel();
let notification2 = showNotification(notifyObj2);
let popup = yield opened;
// Make sure notification 2 is visible
checkPopup(popup, notifyObj2);
// Activate the anchor for notification 1 and wait until it's shown.
let anchor = document.getElementById(notifyObj1.anchorID);
anchor.focus();
is(document.activeElement, anchor);
opened = waitForNotificationPanel();
EventUtils.synthesizeKey(" ", {});
popup = yield opened;
checkPopup(popup, notifyObj1);
is(document.activeElement, popup.childNodes[0].checkbox);
// Activate the anchor for notification 2 and wait until it's shown.
anchor = document.getElementById(notifyObj2.anchorID);
anchor.focus();
is(document.activeElement, anchor);
opened = waitForNotificationPanel();
EventUtils.synthesizeKey(" ", {});
popup = yield opened;
checkPopup(popup, notifyObj2);
is(document.activeElement, popup.childNodes[0].closebutton);
notification1.remove();
notification2.remove();
goNext();
},
},
];

Просмотреть файл

@ -1,3 +1,4 @@
/* eslint-env mozilla/frame-script */
var SocialService = Cu.import("resource:///modules/SocialService.jsm", {}).SocialService;

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
var Cu = Components.utils;
// Ideally we would use CrashTestUtils.jsm, but that's only available for

Просмотреть файл

@ -15,10 +15,13 @@ add_task(function* setup() {
Services.prefs.setBoolPref(PREF_AUTOFILL, true);
// Adding a tab would hit switch-to-tab, so it's safer to just add a visit.
yield PlacesTestUtils.addVisits({
yield PlacesTestUtils.addVisits([{
uri: "http://www.autofilltrimurl.com/whatever",
transition: Ci.nsINavHistoryService.TRANSITION_TYPED,
});
}, {
uri: "https://www.secureautofillurl.com/whatever",
transition: Ci.nsINavHistoryService.TRANSITION_TYPED,
}]);
});
function* promiseSearch(searchtext) {
@ -28,17 +31,81 @@ function* promiseSearch(searchtext) {
yield promiseSearchComplete();
}
add_task(function* () {
yield promiseSearch("http://");
is(gURLBar.inputField.value, "http://", "Autofilled value is as expected");
function* promiseTestResult(test) {
info("Searching for '${test.search}'");
yield promiseSearch(test.search);
is(gURLBar.inputField.value, test.autofilledValue,
`Autofilled value is as expected for search '${test.search}'`);
let result = gURLBar.popup.richlistbox.getItemAtIndex(0);
is(result._titleText.textContent, test.resultListDisplayTitle,
`Autocomplete result should have displayed title as expected for search '${test.search}'`);
is(result._actionText.textContent, test.resultListActionText,
`Autocomplete action text should be as expected for search '${test.search}'`);
is(result.getAttribute("type"), test.resultListType,
`Autocomplete result should have searchengine for the type for search '${test.search}'`);
is(gURLBar.mController.getFinalCompleteValueAt(0), test.finalCompleteValue,
`Autocomplete item should go to the expected final value for search '${test.search}'`);
}
const tests = [{
search: "http://",
autofilledValue: "http://",
resultListDisplayTitle: "http://",
resultListActionText: "Search with Google",
resultListType: "searchengine",
finalCompleteValue: 'moz-action:searchengine,{"engineName":"Google","input":"http%3A%2F%2F","searchQuery":"http%3A%2F%2F"}'
}, {
search: "https://",
autofilledValue: "https://",
resultListDisplayTitle: "https://",
resultListActionText: "Search with Google",
resultListType: "searchengine",
finalCompleteValue: 'moz-action:searchengine,{"engineName":"Google","input":"https%3A%2F%2F","searchQuery":"https%3A%2F%2F"}'
}, {
search: "au",
autofilledValue: "autofilltrimurl.com/",
resultListDisplayTitle: "www.autofilltrimurl.com",
resultListActionText: "Visit",
resultListType: "",
finalCompleteValue: "www.autofilltrimurl.com/"
}, {
search: "http://au",
autofilledValue: "http://autofilltrimurl.com/",
resultListDisplayTitle: "autofilltrimurl.com",
resultListActionText: "Visit",
resultListType: "",
finalCompleteValue: "http://autofilltrimurl.com/"
}, {
search: "sec",
autofilledValue: "secureautofillurl.com/",
resultListDisplayTitle: "https://www.secureautofillurl.com",
resultListActionText: "Visit",
resultListType: "",
finalCompleteValue: "https://www.secureautofillurl.com/"
}, {
search: "https://sec",
autofilledValue: "https://secureautofillurl.com/",
resultListDisplayTitle: "https://secureautofillurl.com",
resultListActionText: "Visit",
resultListType: "",
finalCompleteValue: "https://secureautofillurl.com/"
},
];
add_task(function* autofill_tests() {
for (let test of tests) {
yield promiseTestResult(test);
}
});
add_task(function* () {
yield promiseSearch("http://au");
is(gURLBar.inputField.value, "http://autofilltrimurl.com/", "Autofilled value is as expected");
});
add_task(function* () {
add_task(function* autofill_complete_domain() {
yield promiseSearch("http://www.autofilltrimurl.com");
is(gURLBar.inputField.value, "http://www.autofilltrimurl.com/", "Autofilled value is as expected");

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
@ -201,4 +203,3 @@ function promiseNewSearchEngine(basename) {
});
});
}

Просмотреть файл

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
// Forward messages from the test to the iframe as events.
addMessageListener("TestMessage", msg => {
content.dispatchEvent(new content.CustomEvent("TestEvent", {

Просмотреть файл

@ -1,6 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-env mozilla/frame-script */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "MediaManagerService",
"@mozilla.org/mediaManagerService;1",

Просмотреть файл

@ -1,5 +1,7 @@
/* Check presence of the "Ignore this warning" button */
/* eslint-env mozilla/frame-script */
function onDOMContentLoaded(callback) {
function complete({ data }) {
mm.removeMessageListener("Test:DOMContentLoaded", complete);

Просмотреть файл

@ -2,6 +2,8 @@
* 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/. */
/* eslint-env mozilla/frame-script */
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF_TEST_WHITELIST = "browser.uitour.testingOrigins";

Просмотреть файл

@ -1,8 +1,9 @@
/* Test that clicking on the Report Site Issue button opens a new tab
and sends a postMessaged blob at it.
testing/profiles/prefs_general.js sets the value for
"extensions.webcompat-reporter.newIssueEndpoint" */
and sends a postMessaged blob to it. */
add_task(function* test_screenshot() {
requestLongerTimeout(2);
// ./head.js sets the value for PREF_WC_REPORTER_ENDPOINT
yield SpecialPowers.pushPrefEnv({set: [[PREF_WC_REPORTER_ENDPOINT, NEW_ISSUE_PAGE]]});
let tab1 = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE);

Просмотреть файл

@ -363,11 +363,7 @@ menuitem.bookmark-item {
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 {
-moz-appearance: none;
}
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1[open="true"],
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:hover:active {
padding: 3px;
padding: 0 3px;
}
.findbar-button > .toolbarbutton-text,
@ -436,12 +432,6 @@ menuitem.bookmark-item {
transition: background-color 150ms;
}
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button[open],
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button:hover:active,
:-moz-any(#TabsToolbar, #nav-bar) .toolbarbutton-1:hover:active {
padding: 3px;
}
:-moz-any(#TabsToolbar, #nav-bar) .toolbaritem-combined-buttons {
margin-left: 2px;
margin-right: 2px;

Просмотреть файл

@ -632,9 +632,7 @@ toolbar[brighttext] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
#nav-bar .toolbarbutton-1,
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-moz-appearance: none;
border: none;
padding: 0;
background: none;
}
#nav-bar .toolbarbutton-1:not([type=menu-button]),

Просмотреть файл

@ -101,6 +101,9 @@ check_and_add_gcc_warning('-Wno-error=coverage-mismatch', when='MOZ_PGO')
# false positives during PGO
check_and_add_gcc_warning('-Wno-error=free-nonheap-object', when='MOZ_PGO')
# catches format/argument mismatches with printf
check_and_add_gcc_warning('-Wformat')
# We use mix of both POSIX and Win32 printf format across the tree, so format
# warnings are useless on mingw.
check_and_add_gcc_warning('-Wno-format',

Просмотреть файл

@ -8,8 +8,6 @@
#include "nsChromeRegistryChrome.h"
#include "nsChromeRegistryContent.h"
#include "prprf.h"
#include "nsCOMPtr.h"
#include "nsError.h"
#include "nsEscape.h"
@ -29,6 +27,7 @@
#include "nsIScriptError.h"
#include "nsIWindowMediator.h"
#include "nsIPrefService.h"
#include "mozilla/Printf.h"
#include "mozilla/StyleSheet.h"
#include "mozilla/StyleSheetInlines.h"
@ -55,13 +54,13 @@ nsChromeRegistry::LogMessage(const char* aMsg, ...)
va_list args;
va_start(args, aMsg);
char* formatted = PR_vsmprintf(aMsg, args);
char* formatted = mozilla::Vsmprintf(aMsg, args);
va_end(args);
if (!formatted)
return;
console->LogStringMessage(NS_ConvertUTF8toUTF16(formatted).get());
PR_smprintf_free(formatted);
mozilla::SmprintfFree(formatted);
}
void
@ -80,7 +79,7 @@ nsChromeRegistry::LogMessageWithContext(nsIURI* aURL, uint32_t aLineNumber, uint
va_list args;
va_start(args, aMsg);
char* formatted = PR_vsmprintf(aMsg, args);
char* formatted = mozilla::Vsmprintf(aMsg, args);
va_end(args);
if (!formatted)
return;
@ -93,7 +92,7 @@ nsChromeRegistry::LogMessageWithContext(nsIURI* aURL, uint32_t aLineNumber, uint
NS_ConvertUTF8toUTF16(spec),
EmptyString(),
aLineNumber, 0, flags, "chrome registration");
PR_smprintf_free(formatted);
mozilla::SmprintfFree(formatted);
if (NS_FAILED(rv))
return;

Просмотреть файл

@ -83,9 +83,11 @@ protected:
// notification about this change
virtual nsresult UpdateSelectedLocale() = 0;
static void LogMessage(const char* aMsg, ...);
static void LogMessage(const char* aMsg, ...)
MOZ_FORMAT_PRINTF(1, 2);
static void LogMessageWithContext(nsIURI* aURL, uint32_t aLineNumber, uint32_t flags,
const char* aMsg, ...);
const char* aMsg, ...)
MOZ_FORMAT_PRINTF(4, 5);
virtual nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
const nsCString& aProvider,

Просмотреть файл

@ -41,7 +41,7 @@ module.exports = createClass({
},
dom.span(
{},
getStr("layout.overlayMultipleGrids")
getStr("layout.overlayGrid")
),
dom.ul(
{},

Просмотреть файл

@ -29,3 +29,7 @@ layout.noGrids=No grids
# LOCALIZATION NOTE (layout.overlayMultipleGrids): The header for the list of grid
# container elements that can be highlighted in the CSS Grid pane.
layout.overlayMultipleGrids=Overlay Multiple Grids
# LOCALIZATION NOTE (layout.overlayGrid): Alternate header for the list of grid container
# elements if only one item can be selected.
layout.overlayGrid=Overlay Grid

Просмотреть файл

@ -8,7 +8,6 @@
const { Ci } = require("chrome");
const { Class } = require("sdk/core/heritage");
const { resolve } = require("promise");
const Services = require("Services");
loader.lazyRequireGetter(this, "HarCollector", "devtools/client/netmonitor/har/har-collector", true);
@ -122,7 +121,7 @@ var HarAutomation = Class({
"enableAutoExportToFile");
if (!autoExport) {
return resolve();
return Promise.resolve();
}
// Auto export to file is enabled, so save collected data

Просмотреть файл

@ -4,10 +4,9 @@
"use strict";
const { defer, all } = require("promise");
const { LocalizationHelper } = require("devtools/shared/l10n");
const Services = require("Services");
const appInfo = Services.appinfo;
const { LocalizationHelper } = require("devtools/shared/l10n");
const { CurlUtils } = require("devtools/client/shared/curl");
const {
getFormDataSections,
@ -15,10 +14,7 @@ const {
parseQueryString,
} = require("devtools/client/netmonitor/request-utils");
loader.lazyGetter(this, "L10N", () => {
return new LocalizationHelper("devtools/client/locales/har.properties");
});
const L10N = new LocalizationHelper("devtools/client/locales/har.properties");
const HAR_VERSION = "1.1";
/**
@ -68,10 +64,7 @@ HarBuilder.prototype = {
// Some data needs to be fetched from the backend during the
// build process, so wait till all is done.
let { resolve, promise } = defer();
all(this.promises).then(results => resolve({ log: log }));
return promise;
return Promise.all(this.promises).then(() => ({ log }));
},
// Helpers

Просмотреть файл

@ -4,8 +4,6 @@
"use strict";
const { defer, all } = require("promise");
const { makeInfallible } = require("devtools/shared/DevToolsUtils");
const Services = require("Services");
// Helper tracer. Should be generic sharable by other modules (bug 1171927)
@ -32,8 +30,6 @@ function HarCollector(options) {
this.onResponseContent = this.onResponseContent.bind(this);
this.onEventTimings = this.onEventTimings.bind(this);
this.onPageLoadTimeout = this.onPageLoadTimeout.bind(this);
this.clear();
}
@ -66,13 +62,12 @@ HarCollector.prototype = {
// There should be yet another timeout e.g.:
// 'devtools.netmonitor.har.pageLoadTimeout'
// that should force export even if page isn't fully loaded.
let deferred = defer();
this.waitForResponses().then(() => {
trace.log("HarCollector.waitForHarLoad; DONE HAR loaded!");
deferred.resolve(this);
return new Promise((resolve) => {
this.waitForResponses().then(() => {
trace.log("HarCollector.waitForHarLoad; DONE HAR loaded!");
resolve(this);
});
});
return deferred.promise;
},
waitForResponses: function () {
@ -117,23 +112,15 @@ HarCollector.prototype = {
trace.log("HarCollector.waitForTimeout; " + timeout);
this.pageLoadDeferred = defer();
if (timeout <= 0) {
this.pageLoadDeferred.resolve();
return this.pageLoadDeferred.promise;
}
this.pageLoadTimeout = setTimeout(this.onPageLoadTimeout, timeout);
return this.pageLoadDeferred.promise;
},
onPageLoadTimeout: function () {
trace.log("HarCollector.onPageLoadTimeout;");
// Ha, page has been loaded. Resolve the final timeout promise.
this.pageLoadDeferred.resolve();
return new Promise((resolve) => {
if (timeout <= 0) {
resolve();
}
this.pageLoadTimeout = setTimeout(() => {
trace.log("HarCollector.onPageLoadTimeout;");
resolve();
}, timeout);
});
},
resetPageLoadTimeout: function () {
@ -273,28 +260,24 @@ HarCollector.prototype = {
},
getData: function (actor, method, callback) {
let deferred = defer();
return new Promise((resolve) => {
if (!this.webConsoleClient[method]) {
console.error("HarCollector.getData: ERROR Unknown method!");
resolve();
}
if (!this.webConsoleClient[method]) {
console.error("HarCollector.getData; ERROR " +
"Unknown method!");
return deferred.resolve();
}
let file = this.getFile(actor);
let file = this.getFile(actor);
trace.log("HarCollector.getData; REQUEST " + method +
", " + file.url, file);
trace.log("HarCollector.getData; REQUEST " + method +
", " + file.url, file);
this.webConsoleClient[method](actor, response => {
trace.log("HarCollector.getData; RESPONSE " + method +
", " + file.url, response);
callback(response);
deferred.resolve(response);
this.webConsoleClient[method](actor, response => {
trace.log("HarCollector.getData; RESPONSE " + method +
", " + file.url, response);
callback(response);
resolve(response);
});
});
return deferred.promise;
},
/**
@ -406,15 +389,19 @@ HarCollector.prototype = {
// Helpers
getLongHeaders: makeInfallible(function (headers) {
getLongHeaders: function (headers) {
for (let header of headers) {
if (typeof header.value == "object") {
this.getString(header.value).then(value => {
header.value = value;
});
try {
this.getString(header.value).then(value => {
header.value = value;
});
} catch (error) {
trace.log("HarCollector.getLongHeaders; ERROR when getString", error);
}
}
}
}),
},
/**
* Fetches the full text of a string.
@ -447,7 +434,7 @@ function waitForAll(promises) {
let clone = promises.splice(0, promises.length);
// Wait for all promises in the given array.
return all(clone).then(() => {
return Promise.all(clone).then(() => {
// If there are new promises (in the original array)
// to wait for - chain them!
if (promises.length) {

Просмотреть файл

@ -2,22 +2,13 @@
* 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/. */
/* eslint-disable mozilla/reject-some-requires */
"use strict";
const { Cc, Ci } = require("chrome");
const Services = require("Services");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
const { resolve } = require("promise");
const clipboardHelper = require("devtools/shared/platform/clipboard");
const { HarUtils } = require("./har-utils.js");
const { HarBuilder } = require("./har-builder.js");
XPCOMUtils.defineLazyGetter(this, "clipboardHelper", function () {
return Cc["@mozilla.org/widget/clipboardhelper;1"]
.getService(Ci.nsIClipboardHelper);
});
var uid = 1;
// Helper tracer. Should be generic sharable by other modules (bug 1171927)
@ -83,7 +74,7 @@ const HarExporter = {
options.jsonp, options.compress);
if (!file) {
return resolve();
return Promise.resolve();
}
trace.log("HarExporter.save; " + options.defaultFileName, options);
@ -132,12 +123,12 @@ const HarExporter = {
// Do not export an empty HAR file, unless the user
// explicitly says so (using the forceExport option).
if (!har.log.entries.length && !options.forceExport) {
return resolve();
return Promise.resolve();
}
let jsonString = this.stringify(har);
if (!jsonString) {
return resolve();
return Promise.resolve();
}
// If JSONP is wanted, wrap the string in a function call

Просмотреть файл

@ -4,7 +4,6 @@
"use strict";
const promise = require("promise");
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");
const { TimelineFront } = require("devtools/shared/fronts/timeline");
@ -34,14 +33,15 @@ var NetMonitorController = {
* @return object
* A promise that is resolved when the monitor finishes startup.
*/
async startupNetMonitor() {
startupNetMonitor() {
if (this._startup) {
return this._startup.promise;
return this._startup;
}
this._startup = promise.defer();
await this.connect();
this._startup.resolve();
return undefined;
this._startup = new Promise(async (resolve) => {
await this.connect();
resolve();
});
return this._startup;
},
/**
@ -50,17 +50,19 @@ var NetMonitorController = {
* @return object
* A promise that is resolved when the monitor finishes shutdown.
*/
async shutdownNetMonitor() {
shutdownNetMonitor() {
if (this._shutdown) {
return this._shutdown.promise;
return this._shutdown;
}
this._shutdown = promise.defer();
gStore.dispatch(Actions.batchReset());
this.TargetEventsHandler.disconnect();
this.NetworkEventsHandler.disconnect();
await this.disconnect();
this._shutdown.resolve();
return undefined;
this._shutdown = new Promise(async (resolve) => {
gStore.dispatch(Actions.batchReset());
this.TargetEventsHandler.disconnect();
this.NetworkEventsHandler.disconnect();
await this.disconnect();
resolve();
});
return this._shutdown;
},
/**
@ -72,71 +74,71 @@ var NetMonitorController = {
* @return object
* A promise that is resolved when the monitor finishes connecting.
*/
async connect() {
connect() {
if (this._connection) {
return this._connection.promise;
return this._connection;
}
this._connection = promise.defer();
// Some actors like AddonActor or RootActor for chrome debugging
// aren't actual tabs.
if (this._target.isTabActor) {
this.tabClient = this._target.activeTab;
}
let connectTimeline = () => {
// Don't start up waiting for timeline markers if the server isn't
// recent enough to emit the markers we're interested in.
if (this._target.getTrait("documentLoadingMarkers")) {
this.timelineFront = new TimelineFront(this._target.client,
this._target.form);
return this.timelineFront.start({ withDocLoadingEvents: true });
this._connection = new Promise(async (resolve) => {
// Some actors like AddonActor or RootActor for chrome debugging
// aren't actual tabs.
if (this._target.isTabActor) {
this.tabClient = this._target.activeTab;
}
return undefined;
};
this.webConsoleClient = this._target.activeConsole;
await connectTimeline();
let connectTimeline = () => {
// Don't start up waiting for timeline markers if the server isn't
// recent enough to emit the markers we're interested in.
if (this._target.getTrait("documentLoadingMarkers")) {
this.timelineFront = new TimelineFront(this._target.client,
this._target.form);
return this.timelineFront.start({ withDocLoadingEvents: true });
}
return undefined;
};
this.TargetEventsHandler.connect();
this.NetworkEventsHandler.connect();
this.webConsoleClient = this._target.activeConsole;
await connectTimeline();
window.emit(EVENTS.CONNECTED);
this.TargetEventsHandler.connect();
this.NetworkEventsHandler.connect();
this._connection.resolve();
this._connected = true;
return undefined;
window.emit(EVENTS.CONNECTED);
resolve();
this._connected = true;
});
return this._connection;
},
/**
* Disconnects the debugger client and removes event handlers as necessary.
*/
async disconnect() {
disconnect() {
if (this._disconnection) {
return this._disconnection.promise;
return this._disconnection;
}
this._disconnection = promise.defer();
this._disconnection = new Promise(async (resolve) => {
// Wait for the connection to finish first.
if (!this.isConnected()) {
await this._connection;
}
// Wait for the connection to finish first.
if (!this.isConnected()) {
await this._connection.promise;
}
// When debugging local or a remote instance, the connection is closed by
// the RemoteTarget. The webconsole actor is stopped on disconnect.
this.tabClient = null;
this.webConsoleClient = null;
// When debugging local or a remote instance, the connection is closed by
// the RemoteTarget. The webconsole actor is stopped on disconnect.
this.tabClient = null;
this.webConsoleClient = null;
// The timeline front wasn't initialized and started if the server wasn't
// recent enough to emit the markers we were interested in.
if (this._target.getTrait("documentLoadingMarkers")) {
await this.timelineFront.destroy();
this.timelineFront = null;
}
// The timeline front wasn't initialized and started if the server wasn't
// recent enough to emit the markers we were interested in.
if (this._target.getTrait("documentLoadingMarkers")) {
await this.timelineFront.destroy();
this.timelineFront = null;
}
this._disconnection.resolve();
this._connected = false;
return undefined;
resolve();
this._connected = false;
});
return this._disconnection;
},
/**
@ -173,20 +175,20 @@ var NetMonitorController = {
// Waits for a series of "navigation start" and "navigation stop" events.
let waitForNavigation = () => {
let deferred = promise.defer();
this._target.once("will-navigate", () => {
this._target.once("navigate", () => {
deferred.resolve();
return new Promise((resolve) => {
this._target.once("will-navigate", () => {
this._target.once("navigate", () => {
resolve();
});
});
});
return deferred.promise;
};
// Reconfigures the tab, optionally triggering a reload.
let reconfigureTab = options => {
let deferred = promise.defer();
this._target.activeTab.reconfigure(options, deferred.resolve);
return deferred.promise;
return new Promise((resolve) => {
this._target.activeTab.reconfigure(options, resolve);
});
};
// Reconfigures the tab and waits for the target to finish navigating.
@ -233,7 +235,7 @@ var NetMonitorController = {
}).then(standBy);
}
this._currentActivity = ACTIVITY_TYPE.NONE;
return promise.reject(new Error("Invalid activity type"));
return Promise.reject(new Error("Invalid activity type"));
},
/**
@ -247,30 +249,30 @@ var NetMonitorController = {
inspectRequest: function (requestId) {
// Look for the request in the existing ones or wait for it to appear, if
// the network monitor is still loading.
let deferred = promise.defer();
let request = null;
let inspector = function () {
request = getDisplayedRequestById(gStore.getState(), requestId);
if (!request) {
// Reset filters so that the request is visible.
gStore.dispatch(Actions.toggleRequestFilterType("all"));
return new Promise((resolve) => {
let request = null;
let inspector = function () {
request = getDisplayedRequestById(gStore.getState(), requestId);
}
if (!request) {
// Reset filters so that the request is visible.
gStore.dispatch(Actions.toggleRequestFilterType("all"));
request = getDisplayedRequestById(gStore.getState(), requestId);
}
// If the request was found, select it. Otherwise this function will be
// called again once new requests arrive.
if (request) {
window.off(EVENTS.REQUEST_ADDED, inspector);
gStore.dispatch(Actions.selectRequest(request.id));
deferred.resolve();
}
};
// If the request was found, select it. Otherwise this function will be
// called again once new requests arrive.
if (request) {
window.off(EVENTS.REQUEST_ADDED, inspector);
gStore.dispatch(Actions.selectRequest(request.id));
resolve();
}
};
inspector();
if (!request) {
window.on(EVENTS.REQUEST_ADDED, inspector);
}
return deferred.promise;
inspector();
if (!request) {
window.on(EVENTS.REQUEST_ADDED, inspector);
}
});
},
/**

Просмотреть файл

@ -9,6 +9,8 @@ const { Curl } = require("devtools/client/shared/curl");
const { gDevTools } = require("devtools/client/framework/devtools");
const Menu = require("devtools/client/framework/menu");
const MenuItem = require("devtools/client/framework/menu-item");
const clipboardHelper = require("devtools/shared/platform/clipboard");
const { HarExporter } = require("./har/har-exporter");
const { L10N } = require("./l10n");
const {
formDataURI,
@ -21,12 +23,6 @@ const {
getSortedRequests,
} = require("./selectors/index");
loader.lazyRequireGetter(this, "HarExporter",
"devtools/client/netmonitor/har/har-exporter", true);
loader.lazyServiceGetter(this, "clipboardHelper",
"@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper");
function RequestListContextMenu({
cloneSelectedRequest,
openStatistics,

Просмотреть файл

@ -6,7 +6,7 @@
"use strict";
const {Cc, Ci, Cu, components} = require("chrome");
const {Cc, Ci} = require("chrome");
const Services = require("Services");
const {LocalizationHelper} = require("devtools/shared/l10n");
@ -21,7 +21,7 @@ const REGEX_MATCH_FUNCTION_NAME = /^\(?function\s+([^(\s]+)\s*\(/;
// Number of terminal entries for the self-xss prevention to go away
const CONSOLE_ENTRY_THRESHOLD = 5;
const CONSOLE_WORKER_IDS = exports.CONSOLE_WORKER_IDS = [
exports.CONSOLE_WORKER_IDS = [
"SharedWorker",
"ServiceWorker",
"Worker"
@ -103,52 +103,6 @@ var WebConsoleUtils = {
to.style.fontStyle = style.getPropertyCSSValue("font-style").cssText;
},
/**
* Create a grip for the given value. If the value is an object,
* an object wrapper will be created.
*
* @param mixed value
* The value you want to create a grip for, before sending it to the
* client.
* @param function objectWrapper
* If the value is an object then the objectWrapper function is
* invoked to give us an object grip. See this.getObjectGrip().
* @return mixed
* The value grip.
*/
createValueGrip: function (value, objectWrapper) {
switch (typeof value) {
case "boolean":
return value;
case "string":
return objectWrapper(value);
case "number":
if (value === Infinity) {
return { type: "Infinity" };
} else if (value === -Infinity) {
return { type: "-Infinity" };
} else if (Number.isNaN(value)) {
return { type: "NaN" };
} else if (!value && 1 / value === -Infinity) {
return { type: "-0" };
}
return value;
case "undefined":
return { type: "undefined" };
case "object":
if (value === null) {
return { type: "null" };
}
// Fall through.
case "function":
return objectWrapper(value);
default:
console.error("Failed to provide a grip for value of " + typeof value
+ ": " + value);
return null;
}
},
/**
* Determine if the given request mixes HTTP with HTTPS content.
*

Просмотреть файл

@ -0,0 +1 @@
<html><head><meta charset="utf-8"><script>window.addEventListener("pageshow", function(event) { window.opener.postMessage({persisted:event.persisted}, "*"); });</script></head><body contentEditable="true"><p>contentEditable</p></body></html>

Просмотреть файл

@ -0,0 +1 @@
<html><head><meta charset="utf-8"><script>window.addEventListener("pageshow", function(event) { window.opener.postMessage({persisted:event.persisted}, "*"); });</script></head><body><p>designModeDocument</p></body></html>

Просмотреть файл

@ -2,6 +2,8 @@
support-files =
NavigationUtils.js
blank.html
file_bug386782_contenteditable.html
file_bug386782_designmode.html
file_bug462076_1.html
file_bug462076_2.html
file_bug462076_3.html

Просмотреть файл

@ -8,24 +8,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=386782
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script>
// This tests if we can load a document whose root is in designMode,
// edit it, navigate to a new page, navigate back, still edit, and still
// undo/redo. Note that this is different from the case where the
// designMode document is in a frame inside the window, as this means
// the editable region is not in the root docshell (a less complicated case).
// the editable region is not in the root docshell (a less complicated case).
var pageShowChecker = '<scr' + 'ipt>' +
'window.addEventListener("pageshow", function(event) {' +
'window.opener.postMessage({persisted:event.persisted}, "*");' +
'});</scr' + 'ipt>';
var gTests = [
{
// <html><body><p>designModeDocument</p></body></html>
url: "data:text/html;charset=utf-8,<html><head>" + pageShowChecker + "</head><body><p>designModeDocument</p></body></html>",
url: "file_bug386782_designmode.html",
name: 'designModeNavigate',
onload(doc) { doc.designMode = "on"; },
expectedBodyBeforeEdit: '<p>designModeDocument</p>',
@ -34,19 +29,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=386782
},
{
// <html><body contentEditable="true"><p>contentEditable</p></body></html>
url: "data:text/html;charset=utf-8,<html><head>" + pageShowChecker + "</head><body contentEditable=\"true\"><p>contentEditable</p></body></html>",
url: "file_bug386782_contenteditable.html",
name: 'contentEditableNavigate',
expectedBodyBeforeEdit: '<p>contentEditable</p>',
expectedBodyAfterEdit: 'EDITED <br><p>contentEditable</p>',
expectedBodyAfterSecondEdit: 'EDITED TWICE <br><p>contentEditable</p>',
}
];
var gTestNum = -1;
var gTest = null;
window.onload = goNext();
function goNext() {
gTestNum++;
if (gTestNum >= gTests.length) {
@ -74,10 +69,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=386782
sendString('EDITED ', gTest.window);
is(gTest.window.document.body.innerHTML, gTest.expectedBodyAfterEdit, "Editing failed.");
gTest.window.location = 'data:text/html;charset=utf-8,SomeOtherDocument';
gTest.window.location = 'about:blank';
SimpleTest.waitForFocus(goBack, gTest.window);
}
function goBack() {
window.onmessage = function(e) {
window.onmessage = null;
@ -96,32 +91,32 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=386782
// Check that the contents are correct.
is(gTest.window.document.body.innerHTML, gTest.expectedBodyAfterEdit, "Edited contents still correct?");
// Check that we can undo/redo and the contents are correct.
gTest.window.document.execCommand("undo", false, null);
is(gTest.window.document.body.innerHTML, gTest.expectedBodyBeforeEdit, "Can we undo?");
gTest.window.document.execCommand("redo", false, null);
is(gTest.window.document.body.innerHTML, gTest.expectedBodyAfterEdit, "Can we redo?");
// Check that we can still edit the page.
gTest.window.document.body.focus();
sendString('TWICE ', gTest.window);
is(gTest.window.document.body.innerHTML, gTest.expectedBodyAfterSecondEdit, "Can we still edit?");
gTest.window.close();
goNext();
}
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=386782">Mozilla Bug 386782</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
@ -134,4 +129,3 @@ SimpleTest.waitForExplicitFinish();
</pre>
</body>
</html>

Просмотреть файл

@ -90,8 +90,8 @@ public:
: u"inactive");
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("NotifyChannelActiveRunnable, type = %d, active = %d\n",
mAudioChannel, mActive));
("NotifyChannelActiveRunnable, type = %" PRIu32 ", active = %d\n",
static_cast<uint32_t>(mAudioChannel), mActive));
return NS_OK;
}
@ -847,8 +847,8 @@ AudioChannelService::SetAudioChannelVolume(nsPIDOMWindowOuter* aWindow,
MOZ_ASSERT(aWindow->IsOuterWindow());
MOZ_LOG(GetAudioChannelLog(), LogLevel::Debug,
("AudioChannelService, SetAudioChannelVolume, window = %p, type = %d, "
"volume = %f\n", aWindow, aAudioChannel, aVolume));
("AudioChannelService, SetAudioChannelVolume, window = %p, type = %" PRIu32 ", "
"volume = %f\n", aWindow, static_cast<uint32_t>(aAudioChannel), aVolume));
AudioChannelWindow* winData = GetOrCreateWindowData(aWindow);
winData->mChannels[(uint32_t)aAudioChannel].mVolume = aVolume;
@ -908,8 +908,8 @@ AudioChannelService::SetAudioChannelMuted(nsPIDOMWindowOuter* aWindow,
MOZ_ASSERT(aWindow->IsOuterWindow());
MOZ_LOG(GetAudioChannelLog(), LogLevel::Debug,
("AudioChannelService, SetAudioChannelMuted, window = %p, type = %d, "
"mute = %d\n", aWindow, aAudioChannel, aMuted));
("AudioChannelService, SetAudioChannelMuted, window = %p, type = %" PRIu32 ", "
"mute = %d\n", aWindow, static_cast<uint32_t>(aAudioChannel), aMuted));
if (aAudioChannel == AudioChannel::System) {
// Workaround for bug1183033, system channel type can always playback.

Просмотреть файл

@ -18,7 +18,6 @@
#include "nsIException.h"
#include "nsIProgrammingLanguage.h"
#include "nsMemory.h"
#include "prprf.h"
#include "xpcprivate.h"
#include "mozilla/dom/DOMExceptionBinding.h"
@ -361,7 +360,7 @@ Exception::ToString(JSContext* aCx, nsACString& _retval)
static const char defaultMsg[] = "<no message>";
static const char defaultLocation[] = "<unknown>";
static const char format[] =
"[Exception... \"%s\" nsresult: \"0x%x (%s)\" location: \"%s\" data: %s]";
"[Exception... \"%s\" nsresult: \"0x%" PRIx32 " (%s)\" location: \"%s\" data: %s]";
nsCString location;
@ -389,7 +388,7 @@ Exception::ToString(JSContext* aCx, nsACString& _retval)
const char* data = mData ? "yes" : "no";
_retval.Truncate();
_retval.AppendPrintf(format, msg, mResult, resultName,
_retval.AppendPrintf(format, msg, static_cast<uint32_t>(mResult), resultName,
location.get(), data);
return NS_OK;
}
@ -553,7 +552,7 @@ DOMException::ToString(JSContext* aCx, nsACString& aReturn)
static const char defaultLocation[] = "<unknown>";
static const char defaultName[] = "<unknown>";
static const char format[] =
"[Exception... \"%s\" code: \"%d\" nsresult: \"0x%x (%s)\" location: \"%s\"]";
"[Exception... \"%s\" code: \"%d\" nsresult: \"0x%" PRIx32 " (%s)\" location: \"%s\"]";
nsAutoCString location;
@ -564,7 +563,7 @@ DOMException::ToString(JSContext* aCx, nsACString& aReturn)
const char* msg = !mMessage.IsEmpty() ? mMessage.get() : defaultMsg;
const char* resultName = !mName.IsEmpty() ? mName.get() : defaultName;
aReturn.AppendPrintf(format, msg, mCode, mResult, resultName,
aReturn.AppendPrintf(format, msg, mCode, static_cast<uint32_t>(mResult), resultName,
location.get());
return NS_OK;

Просмотреть файл

@ -122,7 +122,6 @@
#include "mozAutoDocUpdate.h"
#include "nsCSSParser.h"
#include "prprf.h"
#include "nsDOMMutationObserver.h"
#include "nsWrapperCacheInlines.h"
#include "xpcpublic.h"

Просмотреть файл

@ -22,7 +22,6 @@
#include "mozilla/DeclarationBlockInlines.h"
#include "nsContentUtils.h"
#include "nsReadableUtils.h"
#include "prprf.h"
#include "nsHTMLCSSStyleSheet.h"
#include "nsCSSParser.h"
#include "nsStyledElement.h"

Просмотреть файл

@ -1630,16 +1630,6 @@ nsDOMWindowUtils::GetIsMozAfterPaintPending(bool *aResult)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::ClearMozAfterPaintEvents()
{
nsPresContext* presContext = GetPresContext();
if (!presContext)
return NS_OK;
presContext->ClearMozAfterPaintEvents();
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::DisableNonTestMouseEvents(bool aDisable)
{

Просмотреть файл

@ -192,7 +192,6 @@
#include "nsXPCOMCID.h"
#include "mozilla/Logging.h"
#include "prenv.h"
#include "prprf.h"
#include "mozilla/dom/IDBFactory.h"
#include "mozilla/dom/MessageChannel.h"

Просмотреть файл

@ -3036,13 +3036,6 @@ protected:
// container for per-context fonts (downloadable, SVG, etc.)
RefPtr<mozilla::dom::FontFaceSet> mFontFaceSet;
// XXXheycam rust-bindgen currently doesn't generate correctly aligned fields
// to represent the following bitfields if they are preceded by something
// non-pointer aligned, so if adding non-pointer sized fields, please do so
// somewhere other than right here.
//
// https://github.com/servo/rust-bindgen/issues/111
// True if BIDI is enabled.
bool mBidiEnabled : 1;
// True if a MathML element has ever been owned by this document.

Просмотреть файл

@ -91,7 +91,6 @@
#include "nsXBLBinding.h"
#include "nsXBLPrototypeBinding.h"
#include "mozilla/Preferences.h"
#include "prprf.h"
#include "xpcpublic.h"
#include "nsCSSRuleProcessor.h"
#include "nsCSSParser.h"

Просмотреть файл

@ -85,6 +85,7 @@
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStates.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/HTMLObjectElementBinding.h"
#include "mozilla/dom/HTMLSharedObjectElement.h"
@ -812,7 +813,7 @@ nsObjectLoadingContent::InstantiatePluginInstance(bool aIsLoading)
EmptyString(), &blockState);
if (blockState == nsIBlocklistService::STATE_OUTDATED) {
// Fire plugin outdated event if necessary
LOG(("OBJLC [%p]: Dispatching plugin outdated event for content %p\n",
LOG(("OBJLC [%p]: Dispatching plugin outdated event for content\n",
this));
nsCOMPtr<nsIRunnable> ev = new nsSimplePluginEvent(thisContent,
NS_LITERAL_STRING("PluginOutdated"));
@ -2424,7 +2425,8 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
// If our type remains Loading, we need a channel to proceed
rv = OpenChannel();
if (NS_FAILED(rv)) {
LOG(("OBJLC [%p]: OpenChannel returned failure (%u)", this, rv));
LOG(("OBJLC [%p]: OpenChannel returned failure (%" PRIu32 ")",
this, static_cast<uint32_t>(rv)));
}
break;
case eType_Null:
@ -2702,7 +2704,7 @@ nsObjectLoadingContent::NotifyStateChanged(ObjectType aOldType,
bool aSync,
bool aNotify)
{
LOG(("OBJLC [%p]: Notifying about state change: (%u, %llx) -> (%u, %llx)"
LOG(("OBJLC [%p]: Notifying about state change: (%u, %" PRIx64 ") -> (%u, %" PRIx64 ")"
" (sync %i, notify %i)", this, aOldType, aOldState.GetInternalValue(),
mType, ObjectState().GetInternalValue(), aSync, aNotify));

Просмотреть файл

@ -168,7 +168,7 @@ AppendWindowURI(nsGlobalWindow *aWindow, nsACString& aStr, bool aAnonymize)
if (uri) {
if (aAnonymize && !aWindow->IsChromeWindow()) {
aStr.AppendPrintf("<anonymized-%llu>", aWindow->WindowID());
aStr.AppendPrintf("<anonymized-%" PRIu64 ">", aWindow->WindowID());
} else {
nsCString spec = uri->GetSpecOrDefault();
@ -276,7 +276,7 @@ CollectWindowReports(nsGlobalWindow *aWindow,
if (top) {
windowPath += NS_LITERAL_CSTRING("top(");
AppendWindowURI(top, windowPath, aAnonymize);
windowPath.AppendPrintf(", id=%llu)", top->WindowID());
windowPath.AppendPrintf(", id=%" PRIu64 ")", top->WindowID());
aTopWindowPaths->Put(aWindow->WindowID(), windowPath);

Просмотреть файл

@ -55,8 +55,8 @@ BrowserElementAudioChannel::Create(nsPIDOMWindowInner* aWindow,
}
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("BrowserElementAudioChannel, Create, channel = %p, type = %d\n",
ac.get(), aAudioChannel));
("BrowserElementAudioChannel, Create, channel = %p, type = %" PRIu32 "\n",
ac.get(), static_cast<uint32_t>(aAudioChannel)));
return ac.forget();
}
@ -514,7 +514,7 @@ BrowserElementAudioChannel::ProcessStateChanged(const char16_t* aData)
{
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("BrowserElementAudioChannel, ProcessStateChanged, this = %p, "
"type = %d\n", this, mAudioChannel));
"type = %" PRIu32 "\n", this, static_cast<uint32_t>(mAudioChannel)));
nsAutoString value(aData);
mState = value.EqualsASCII("active") ? eStateActive : eStateInactive;

Просмотреть файл

@ -6,8 +6,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include "prprf.h"
#include "nsIServiceManager.h"
#include "nsIConsoleService.h"

Просмотреть файл

@ -244,7 +244,7 @@ ValidateUnpackBytes(WebGLContext* webgl, const char* funcName,
const auto fullRows = availByteCount / rowStride;
if (!fullRows.isValid()) {
webgl->ErrorOutOfMemory("%s: Unacceptable upload size calculated.");
webgl->ErrorOutOfMemory("%s: Unacceptable upload size calculated.", funcName);
return false;
}

Просмотреть файл

@ -7,6 +7,7 @@
#include "GLContext.h"
#include "WebGLFramebuffer.h"
#include "mozilla/SizePrintfMacros.h"
namespace mozilla {
@ -55,7 +56,7 @@ WebGL2Context::ValidateClearBuffer(const char* funcName, GLenum buffer, GLint dr
}
if (availElemCount < requiredElements) {
ErrorInvalidValue("%s: Not enough elements. Require %u. Given %u.",
ErrorInvalidValue("%s: Not enough elements. Require %" PRIuSIZE ". Given %" PRIuSIZE ".",
funcName, requiredElements, availElemCount);
return false;
}

Просмотреть файл

@ -32,6 +32,7 @@
#include "mozilla/ProcessPriorityManager.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "nsContentUtils.h"
#include "nsDisplayList.h"
@ -754,7 +755,7 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
out_failReasons->push_back(reason);
GenerateWarning(reason.info.BeginReading());
GenerateWarning("%s", reason.info.BeginReading());
tryNativeGL = false;
}
}
@ -1211,13 +1212,13 @@ WebGLContext::LoseOldestWebGLContextIfLimitExceeded()
}
if (numContextsThisPrincipal > kMaxWebGLContextsPerPrincipal) {
GenerateWarning("Exceeded %d live WebGL contexts for this principal, losing the "
GenerateWarning("Exceeded %" PRIuSIZE " live WebGL contexts for this principal, losing the "
"least recently used one.", kMaxWebGLContextsPerPrincipal);
MOZ_ASSERT(oldestContextThisPrincipal); // if we reach this point, this can't be null
const_cast<WebGLContext*>(oldestContextThisPrincipal)->LoseContext();
} else if (numContexts > kMaxWebGLContexts) {
GenerateWarning("Exceeded %d live WebGL contexts, losing the least recently used one.",
kMaxWebGLContexts);
GenerateWarning("Exceeded %" PRIuSIZE " live WebGL contexts, losing the least "
"recently used one.", kMaxWebGLContexts);
MOZ_ASSERT(oldestContext); // if we reach this point, this can't be null
const_cast<WebGLContext*>(oldestContext)->LoseContext();
}

Просмотреть файл

@ -400,17 +400,17 @@ public:
}
void SynthesizeGLError(GLenum err);
void SynthesizeGLError(GLenum err, const char* fmt, ...);
void SynthesizeGLError(GLenum err, const char* fmt, ...) MOZ_FORMAT_PRINTF(3, 4);
void ErrorInvalidEnum(const char* fmt = 0, ...);
void ErrorInvalidOperation(const char* fmt = 0, ...);
void ErrorInvalidValue(const char* fmt = 0, ...);
void ErrorInvalidFramebufferOperation(const char* fmt = 0, ...);
void ErrorInvalidEnum(const char* fmt = 0, ...) MOZ_FORMAT_PRINTF(2, 3);
void ErrorInvalidOperation(const char* fmt = 0, ...) MOZ_FORMAT_PRINTF(2, 3);
void ErrorInvalidValue(const char* fmt = 0, ...) MOZ_FORMAT_PRINTF(2, 3);
void ErrorInvalidFramebufferOperation(const char* fmt = 0, ...) MOZ_FORMAT_PRINTF(2, 3);
void ErrorInvalidEnumInfo(const char* info, GLenum enumValue);
void ErrorInvalidEnumInfo(const char* info, const char* funcName,
GLenum enumValue);
void ErrorOutOfMemory(const char* fmt = 0, ...);
void ErrorImplementationBug(const char* fmt = 0, ...);
void ErrorOutOfMemory(const char* fmt = 0, ...) MOZ_FORMAT_PRINTF(2, 3);
void ErrorImplementationBug(const char* fmt = 0, ...) MOZ_FORMAT_PRINTF(2, 3);
void ErrorInvalidEnumArg(const char* funcName, const char* argName, GLenum val);
@ -2047,10 +2047,10 @@ protected:
public:
// console logging helpers
void GenerateWarning(const char* fmt, ...);
void GenerateWarning(const char* fmt, ...) MOZ_FORMAT_PRINTF(2, 3);
void GenerateWarning(const char* fmt, va_list ap);
void GeneratePerfWarning(const char* fmt, ...) const;
void GeneratePerfWarning(const char* fmt, ...) const MOZ_FORMAT_PRINTF(2, 3);
public:
UniquePtr<webgl::FormatUsageAuthority> mFormatUsage;

Просмотреть файл

@ -647,7 +647,7 @@ WebGLContext::GetParameterIndexed(JSContext* cx, GLenum pname, GLuint index,
case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
{
if (index >= mGLMaxTransformFeedbackSeparateAttribs) {
ErrorInvalidValue("getParameterIndexed: index should be less than MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", index);
ErrorInvalidValue("getParameterIndexed: index should be less than MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS");
retval.setNull();
return;
}

Просмотреть файл

@ -10,13 +10,13 @@
#include "jsapi.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/Preferences.h"
#include "mozilla/Sprintf.h"
#include "nsIDOMDataContainerEvent.h"
#include "nsIDOMEvent.h"
#include "nsIScriptSecurityManager.h"
#include "nsIVariant.h"
#include "nsPrintfCString.h"
#include "nsServiceManagerUtils.h"
#include "prprf.h"
#include <stdarg.h>
#include "WebGLBuffer.h"
#include "WebGLExtensions.h"
@ -76,7 +76,7 @@ WebGLContext::GenerateWarning(const char* fmt, va_list ap)
mAlreadyGeneratedWarnings++;
char buf[1024];
PR_vsnprintf(buf, 1024, fmt, ap);
VsprintfLiteral(buf, fmt, ap);
// no need to print to stderr, as JS_ReportWarning takes care of this for us.
@ -129,7 +129,7 @@ WebGLContext::GeneratePerfWarning(const char* fmt, ...) const
va_start(ap, fmt);
char buf[1024];
PR_vsnprintf(buf, 1024, fmt, ap);
VsprintfLiteral(buf, fmt, ap);
va_end(ap);

Просмотреть файл

@ -10,6 +10,7 @@
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "mozilla/RefPtr.h"
#include "mozilla/SizePrintfMacros.h"
#include "nsPrintfCString.h"
#include "WebGLActiveInfo.h"
#include "WebGLContext.h"
@ -599,7 +600,7 @@ WebGLProgram::GetActiveAttrib(GLuint index) const
const auto& attribs = mMostRecentLinkInfo->attribs;
if (index >= attribs.size()) {
mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%i).",
mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%" PRIuSIZE ").",
index, "ACTIVE_ATTRIBS", attribs.size());
return nullptr;
}
@ -620,7 +621,7 @@ WebGLProgram::GetActiveUniform(GLuint index) const
const auto& uniforms = mMostRecentLinkInfo->uniforms;
if (index >= uniforms.size()) {
mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%i).",
mContext->ErrorInvalidValue("`index` (%i) must be less than %s (%" PRIuSIZE ").",
index, "ACTIVE_UNIFORMS", uniforms.size());
return nullptr;
}

Просмотреть файл

@ -235,8 +235,7 @@ void
WebGLQuery::QueryCounter(const char* funcName, GLenum target)
{
if (target != LOCAL_GL_TIMESTAMP_EXT) {
mContext->ErrorInvalidEnum("%s: `target` must be TIMESTAMP_EXT.", funcName,
target);
mContext->ErrorInvalidEnum("%s: `target` must be TIMESTAMP_EXT.", funcName);
return;
}

Просмотреть файл

@ -9,6 +9,7 @@
#include "GLContext.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/SizePrintfMacros.h"
#include "nsPrintfCString.h"
#include "nsString.h"
#include "prenv.h"

Просмотреть файл

@ -17,6 +17,7 @@
#include "mozilla/dom/ImageData.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Scoped.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
#include "ScopedGLHelpers.h"
#include "TexUnpackBlob.h"
@ -695,7 +696,7 @@ ValidateCompressedTexUnpack(WebGLContext* webgl, const char* funcName, GLsizei w
if (dataSize != bytesNeeded.value()) {
webgl->ErrorInvalidValue("%s: Provided buffer's size must match expected size."
" (needs %u, has %u)",
" (needs %u, has %" PRIuSIZE ")",
funcName, bytesNeeded.value(), dataSize);
return false;
}
@ -1394,7 +1395,7 @@ WebGLTexture::TexSubImage(const char* funcName, TexImageTarget target, GLint lev
}
if (glError) {
mContext->ErrorInvalidOperation("%s: Unexpected error during upload: 0x04x",
mContext->ErrorInvalidOperation("%s: Unexpected error during upload: 0x%04x",
funcName, glError);
MOZ_ASSERT(false, "Unexpected GL error.");
return;

Просмотреть файл

@ -6,6 +6,7 @@
#include "WebGLUniformLocation.h"
#include "GLContext.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "WebGLActiveInfo.h"
@ -152,7 +153,7 @@ WebGLUniformLocation::ValidateArrayLength(uint8_t setterElemSize, size_t setterA
setterArraySize % setterElemSize)
{
mContext->ErrorInvalidValue("%s: Expected an array of length a multiple of %d,"
" got an array of length %d.",
" got an array of length %" PRIuSIZE ".",
funcName, setterElemSize, setterArraySize);
return false;
}
@ -169,7 +170,7 @@ WebGLUniformLocation::ValidateArrayLength(uint8_t setterElemSize, size_t setterA
{
mContext->ErrorInvalidOperation("%s: Expected an array of length exactly %d"
" (since this uniform is not an array uniform),"
" got an array of length %d.",
" got an array of length %" PRIuSIZE ".",
funcName, setterElemSize, setterArraySize);
return false;
}

Просмотреть файл

@ -14,6 +14,7 @@
#include "mozilla/MouseEvents.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/TextComposition.h"
#include "mozilla/TextEvents.h"
#include "mozilla/Unused.h"
@ -162,7 +163,7 @@ void
IMEStateManager::Shutdown()
{
MOZ_LOG(sISMLog, LogLevel::Info,
("Shutdown(), sTextCompositions=0x%p, sTextCompositions->Length()=%u",
("Shutdown(), sTextCompositions=0x%p, sTextCompositions->Length()=%" PRIuSIZE,
sTextCompositions, sTextCompositions ? sTextCompositions->Length() : 0));
MOZ_ASSERT(!sTextCompositions || !sTextCompositions->Length());
@ -264,7 +265,7 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
if (i != TextCompositionArray::NoIndex) {
MOZ_LOG(sISMLog, LogLevel::Debug,
(" OnDestroyPresContext(), "
"removing TextComposition instance from the array (index=%u)", i));
"removing TextComposition instance from the array (index=%" PRIuSIZE ")", i));
// there should be only one composition per presContext object.
sTextCompositions->ElementAt(i)->Destroy();
sTextCompositions->RemoveElementAt(i);
@ -914,7 +915,7 @@ IMEStateManager::SetInputContextForChildProcess(
("SetInputContextForChildProcess(aTabParent=0x%p, "
"aInputContext={ mIMEState={ mEnabled=%s, mOpen=%s }, "
"mHTMLInputType=\"%s\", mHTMLInputInputmode=\"%s\", mActionHint=\"%s\" }, "
"aAction={ mCause=%s, mAction=%s }, aTabParent=0x%p), sPresContext=0x%p, "
"aAction={ mCause=%s, mAction=%s }), sPresContext=0x%p, "
"sActiveTabParent=0x%p",
aTabParent, GetIMEStateEnabledName(aInputContext.mIMEState.mEnabled),
GetIMEStateSetOpenName(aInputContext.mIMEState.mOpen),
@ -1105,10 +1106,10 @@ IMEStateManager::DispatchCompositionEvent(
MOZ_LOG(sISMLog, LogLevel::Info,
("DispatchCompositionEvent(aNode=0x%p, "
"aPresContext=0x%p, aCompositionEvent={ mMessage=%s, "
"mNativeIMEContext={ mRawNativeIMEContext=0x%X, "
"mOriginProcessID=0x%X }, mWidget(0x%p)={ "
"GetNativeIMEContext()={ mRawNativeIMEContext=0x%X, "
"mOriginProcessID=0x%X }, Destroyed()=%s }, "
"mNativeIMEContext={ mRawNativeIMEContext=0x%" PRIXPTR ", "
"mOriginProcessID=0x%" PRIX64 " }, mWidget(0x%p)={ "
"GetNativeIMEContext()={ mRawNativeIMEContext=0x%" PRIXPTR ", "
"mOriginProcessID=0x%" PRIX64 " }, Destroyed()=%s }, "
"mFlags={ mIsTrusted=%s, mPropagationStopped=%s } }, "
"aIsSynthesized=%s), tabParent=%p",
aEventTargetNode, aPresContext,
@ -1255,10 +1256,10 @@ IMEStateManager::OnCompositionEventDiscarded(
MOZ_LOG(sISMLog, LogLevel::Info,
("OnCompositionEventDiscarded(aCompositionEvent={ "
"mMessage=%s, mNativeIMEContext={ mRawNativeIMEContext=0x%X, "
"mOriginProcessID=0x%X }, mWidget(0x%p)={ "
"GetNativeIMEContext()={ mRawNativeIMEContext=0x%X, "
"mOriginProcessID=0x%X }, Destroyed()=%s }, "
"mMessage=%s, mNativeIMEContext={ mRawNativeIMEContext=0x%" PRIXPTR ", "
"mOriginProcessID=0x%" PRIX64 " }, mWidget(0x%p)={ "
"GetNativeIMEContext()={ mRawNativeIMEContext=0x%" PRIXPTR ", "
"mOriginProcessID=0x%" PRIX64 " }, Destroyed()=%s }, "
"mFlags={ mIsTrusted=%s } })",
ToChar(aCompositionEvent->mMessage),
aCompositionEvent->mNativeIMEContext.mRawNativeIMEContext,

Просмотреть файл

@ -19,7 +19,7 @@ NotifyPaintEvent::NotifyPaintEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent,
EventMessage aEventMessage,
nsInvalidateRequestList* aInvalidateRequests,
nsTArray<nsRect>* aInvalidateRequests,
uint64_t aTransactionId,
DOMHighResTimeStamp aTimeStamp)
: Event(aOwner, aPresContext, aEvent)
@ -28,7 +28,7 @@ NotifyPaintEvent::NotifyPaintEvent(EventTarget* aOwner,
mEvent->mMessage = aEventMessage;
}
if (aInvalidateRequests) {
mInvalidateRequests.AppendElements(Move(aInvalidateRequests->mRequests));
mInvalidateRequests.SwapElements(*aInvalidateRequests);
}
mTransactionId = aTransactionId;
@ -47,7 +47,7 @@ NotifyPaintEvent::GetRegion(SystemCallerGuarantee)
{
nsRegion r;
for (uint32_t i = 0; i < mInvalidateRequests.Length(); ++i) {
r.Or(r, mInvalidateRequests[i].mRect);
r.Or(r, mInvalidateRequests[i]);
r.SimplifyOutward(10);
}
return r;
@ -109,8 +109,7 @@ NotifyPaintEvent::Serialize(IPC::Message* aMsg,
uint32_t length = mInvalidateRequests.Length();
IPC::WriteParam(aMsg, length);
for (uint32_t i = 0; i < length; ++i) {
IPC::WriteParam(aMsg, mInvalidateRequests[i].mRect);
IPC::WriteParam(aMsg, mInvalidateRequests[i].mFlags);
IPC::WriteParam(aMsg, mInvalidateRequests[i]);
}
}
@ -123,9 +122,8 @@ NotifyPaintEvent::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &length), false);
mInvalidateRequests.SetCapacity(length);
for (uint32_t i = 0; i < length; ++i) {
nsInvalidateRequestList::Request req;
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mRect), false);
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req.mFlags), false);
nsRect req;
NS_ENSURE_TRUE(IPC::ReadParam(aMsg, aIter, &req), false);
mInvalidateRequests.AppendElement(req);
}
@ -155,7 +153,7 @@ NS_NewDOMNotifyPaintEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetEvent* aEvent,
EventMessage aEventMessage,
nsInvalidateRequestList* aInvalidateRequests,
nsTArray<nsRect>* aInvalidateRequests,
uint64_t aTransactionId,
DOMHighResTimeStamp aTimeStamp)
{

Просмотреть файл

@ -30,7 +30,7 @@ public:
nsPresContext* aPresContext,
WidgetEvent* aEvent,
EventMessage aEventMessage,
nsInvalidateRequestList* aInvalidateRequests,
nsTArray<nsRect>* aInvalidateRequests,
uint64_t aTransactionId,
DOMHighResTimeStamp aTimeStamp);
@ -68,7 +68,7 @@ protected:
private:
nsRegion GetRegion(SystemCallerGuarantee);
nsTArray<nsInvalidateRequestList::Request> mInvalidateRequests;
nsTArray<nsRect> mInvalidateRequests;
uint64_t mTransactionId;
DOMHighResTimeStamp mTimeStamp;
};
@ -83,8 +83,7 @@ NS_NewDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
mozilla::WidgetEvent* aEvent,
mozilla::EventMessage aEventMessage =
mozilla::eVoidEvent,
nsInvalidateRequestList* aInvalidateRequests =
nullptr,
nsTArray<nsRect>* aInvalidateRequests = nullptr,
uint64_t aTransactionId = 0,
DOMHighResTimeStamp aTimeStamp = 0);

Просмотреть файл

@ -38,7 +38,7 @@ already_AddRefed<DOMRect>
PaintRequest::ClientRect()
{
RefPtr<DOMRect> clientRect = new DOMRect(this);
clientRect->SetLayoutRect(mRequest.mRect);
clientRect->SetLayoutRect(mRequest);
return clientRect.forget();
}

Просмотреть файл

@ -25,7 +25,6 @@ public:
explicit PaintRequest(nsIDOMEvent* aParent)
: mParent(aParent)
{
mRequest.mFlags = 0;
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@ -45,14 +44,14 @@ public:
aResult.AssignLiteral("repaint");
}
void SetRequest(const nsInvalidateRequestList::Request& aRequest)
void SetRequest(const nsRect& aRequest)
{ mRequest = aRequest; }
private:
~PaintRequest() {}
nsCOMPtr<nsIDOMEvent> mParent;
nsInvalidateRequestList::Request mRequest;
nsRect mRequest;
};
class PaintRequestList final : public nsISupports,

Просмотреть файл

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "MemoryBlobImpl.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/SHA1.h"
#include "nsIIPCSerializableInputStream.h"
#include "nsPrintfCString.h"
@ -166,11 +167,11 @@ public:
aHandleReport->Callback(
/* process */ NS_LITERAL_CSTRING(""),
nsPrintfCString(
"explicit/dom/memory-file-data/large/file(length=%llu, sha1=%s)",
"explicit/dom/memory-file-data/large/file(length=%" PRIu64 ", sha1=%s)",
owner->mLength, aAnonymize ? "<anonymized>" : digestString.get()),
KIND_HEAP, UNITS_BYTES, size,
nsPrintfCString(
"Memory used to back a memory file of length %llu bytes. The file "
"Memory used to back a memory file of length %" PRIu64 " bytes. The file "
"has a sha1 of %s.\n\n"
"Note that the allocator may round up a memory file's length -- "
"that is, an N-byte memory file may take up more than N bytes of "

Просмотреть файл

@ -181,7 +181,7 @@ FlyWebPublishedServerImpl::FlyWebPublishedServerImpl(nsPIDOMWindowInner* aOwner,
void
FlyWebPublishedServerImpl::PermissionGranted(bool aGranted)
{
LOG_I("FlyWebPublishedServerImpl::PermissionGranted(%b)", aGranted);
LOG_I("FlyWebPublishedServerImpl::PermissionGranted(%d)", aGranted);
if (!aGranted) {
PublishedServerStarted(NS_ERROR_FAILURE);
return;

Просмотреть файл

@ -153,7 +153,8 @@ HttpServer::OnStopListening(nsIServerSocket* aServ,
{
MOZ_ASSERT(aServ == mServerSocket || !mServerSocket);
LOG_I("HttpServer::OnStopListening(%p) - status 0x%lx", this, aStatus);
LOG_I("HttpServer::OnStopListening(%p) - status 0x%" PRIx32,
this, static_cast<uint32_t>(aStatus));
Close();
@ -1259,8 +1260,8 @@ HttpServer::Connection::OnOutputStreamReady(nsIAsyncOutputStream* aStream)
[self, this] (nsresult aStatus) {
MOZ_ASSERT(mOutputBuffers[0].mStream);
LOG_V("HttpServer::Connection::OnOutputStreamReady(%p) - "
"Sent body. Status 0x%lx",
this, aStatus);
"Sent body. Status 0x%" PRIx32,
this, static_cast<uint32_t>(aStatus));
mOutputBuffers.RemoveElementAt(0);
mOutputCopy = nullptr;

Просмотреть файл

@ -7231,12 +7231,12 @@ HTMLMediaElement::MarkAsContentSource(CallerAPI aAPI)
LOG(LogLevel::Debug,
("%p Log VIDEO_AS_CONTENT_SOURCE: visibility = %u, API: '%d' and 'All'",
this, isVisible, aAPI));
this, isVisible, static_cast<int>(aAPI)));
if (!isVisible) {
LOG(LogLevel::Debug,
("%p Log VIDEO_AS_CONTENT_SOURCE_IN_TREE_OR_NOT: inTree = %u, API: '%d' and 'All'",
this, IsInUncomposedDoc(), aAPI));
this, IsInUncomposedDoc(), static_cast<int>(aAPI)));
}
}

Просмотреть файл

@ -12,6 +12,7 @@
#include "mozilla/dom/TextTrackCue.h"
#include "mozilla/dom/Event.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Telemetry.h"
#include "nsComponentManagerUtils.h"
#include "nsVariant.h"
@ -158,7 +159,8 @@ TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel,
return nullptr;
}
WEBVTT_LOG("%p AddTextTrack",this);
WEBVTT_LOGV("AddTextTrack kind %d Label %s Language %s",aKind,
WEBVTT_LOGV("AddTextTrack kind %" PRIu32 " Label %s Language %s",
static_cast<uint32_t>(aKind),
NS_ConvertUTF16toUTF8(aLabel).get(), NS_ConvertUTF16toUTF8(aLanguage).get());
RefPtr<TextTrack> track =
mTextTracks->AddTextTrack(aKind, aLabel, aLanguage, aMode, aReadyState,
@ -278,7 +280,7 @@ TextTrackManager::UpdateCueDisplay()
if (activeCues.Length() > 0) {
WEBVTT_LOG("UpdateCueDisplay ProcessCues");
WEBVTT_LOGV("UpdateCueDisplay activeCues.Length() %d",activeCues.Length());
WEBVTT_LOGV("UpdateCueDisplay activeCues.Length() %" PRIuSIZE, activeCues.Length());
RefPtr<nsVariantCC> jsCues = new nsVariantCC();
jsCues->SetAsArray(nsIDataType::VTYPE_INTERFACE,
@ -407,7 +409,8 @@ TextTrackManager::PerformTrackSelection(TextTrackKind aTextTrackKinds[],
// Step 3: If any TextTracks in candidates are showing then abort these steps.
for (uint32_t i = 0; i < candidates.Length(); i++) {
if (candidates[i]->Mode() == TextTrackMode::Showing) {
WEBVTT_LOGV("PerformTrackSelection Showing return kind %d",candidates[i]->Kind());
WEBVTT_LOGV("PerformTrackSelection Showing return kind %d",
static_cast<int>(candidates[i]->Kind()));
return;
}
}
@ -419,7 +422,8 @@ TextTrackManager::PerformTrackSelection(TextTrackKind aTextTrackKinds[],
if (TrackIsDefault(candidates[i]) &&
candidates[i]->Mode() == TextTrackMode::Disabled) {
candidates[i]->SetMode(TextTrackMode::Showing);
WEBVTT_LOGV("PerformTrackSelection set Showing kind %d", candidates[i]->Kind());
WEBVTT_LOGV("PerformTrackSelection set Showing kind %d",
static_cast<int>(candidates[i]->Kind()));
return;
}
}

Просмотреть файл

@ -96,7 +96,6 @@
#include "mozAutoDocUpdate.h"
#include "nsCCUncollectableMarker.h"
#include "nsHtml5Module.h"
#include "prprf.h"
#include "mozilla/dom/Element.h"
#include "mozilla/Preferences.h"
#include "nsMimeTypes.h"

Просмотреть файл

@ -26,6 +26,7 @@
#include "mozilla/Maybe.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/SnappyCompressOutputStream.h"
#include "mozilla/SnappyUncompressInputStream.h"
#include "mozilla/StaticPtr.h"
@ -583,9 +584,9 @@ ClampResultCode(nsresult aResultCode)
return NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR;
default:
#ifdef DEBUG
nsPrintfCString message("Converting non-IndexedDB error code (0x%X) to "
nsPrintfCString message("Converting non-IndexedDB error code (0x%" PRIX32 ") to "
"NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR",
aResultCode);
static_cast<uint32_t>(aResultCode));
NS_WARNING(message.get());
#else
;
@ -4557,7 +4558,7 @@ CreateStorageConnection(nsIFile* aDBFile,
// Set the page size first.
if (kSQLitePageSizeOverride) {
rv = connection->ExecuteSimpleSQL(
nsPrintfCString("PRAGMA page_size = %lu;", kSQLitePageSizeOverride)
nsPrintfCString("PRAGMA page_size = %" PRIu32 ";", kSQLitePageSizeOverride)
);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
@ -4793,7 +4794,7 @@ CreateStorageConnection(nsIFile* aDBFile,
// Successfully set to rollback journal mode so changing the page size
// is possible with a VACUUM.
rv = connection->ExecuteSimpleSQL(
nsPrintfCString("PRAGMA page_size = %lu;", kSQLitePageSizeOverride)
nsPrintfCString("PRAGMA page_size = %" PRIu32 ";", kSQLitePageSizeOverride)
);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
@ -5724,7 +5725,7 @@ public:
nsCString GetThreadName() const
{
return nsPrintfCString("IndexedDB #%lu", mSerialNumber);
return nsPrintfCString("IndexedDB #%" PRIu32, mSerialNumber);
}
private:
@ -12621,7 +12622,7 @@ ConnectionPool::ShutdownThread(ThreadInfo& aThreadInfo)
nsCOMPtr<nsIThread> thread;
aThreadInfo.mThread.swap(thread);
IDB_DEBUG_LOG(("ConnectionPool shutting down thread %lu",
IDB_DEBUG_LOG(("ConnectionPool shutting down thread %" PRIu32,
runnable->SerialNumber()));
// This should clean up the thread with the profiler.
@ -12722,7 +12723,7 @@ ConnectionPool::ScheduleTransaction(TransactionInfo* aTransactionInfo,
if (NS_SUCCEEDED(rv)) {
MOZ_ASSERT(newThread);
IDB_DEBUG_LOG(("ConnectionPool created thread %lu",
IDB_DEBUG_LOG(("ConnectionPool created thread %" PRIu32,
runnable->SerialNumber()));
dbInfo->mThreadInfo.mThread.swap(newThread);

Просмотреть файл

@ -277,7 +277,7 @@ public:
}
};
inline void
inline void MOZ_FORMAT_PRINTF(2, 3)
LoggingHelper(bool aUseProfiler, const char* aFmt, ...)
{
MOZ_ASSERT(IndexedDatabaseManager::GetLoggingMode() !=

Просмотреть файл

@ -27,7 +27,7 @@ ReportInternalError(const char* aFile, uint32_t aLine, const char* aStr)
nsContentUtils::LogSimpleConsoleError(
NS_ConvertUTF8toUTF16(nsPrintfCString(
"IndexedDB %s: %s:%lu", aStr, aFile, aLine)),
"IndexedDB %s: %s:%" PRIu32, aStr, aFile, aLine)),
"indexedDB");
}

Просмотреть файл

@ -962,8 +962,6 @@ interface nsIDOMWindowUtils : nsISupports {
*/
void suppressEventHandling(in boolean aSuppress);
void clearMozAfterPaintEvents();
/**
* Disable or enable non synthetic test mouse events on *all* windows.
*

Просмотреть файл

@ -419,7 +419,7 @@ ContentParentsMemoryReporter::CollectReports(
}
nsPrintfCString path("queued-ipc-messages/content-parent"
"(%s, pid=%d, %s, 0x%p, refcnt=%d)",
"(%s, pid=%d, %s, 0x%p, refcnt=%" PRIuPTR ")",
NS_ConvertUTF16toUTF8(friendlyName).get(),
cp->Pid(), channelStr,
static_cast<nsIContentParent*>(cp), refcnt);

Просмотреть файл

@ -534,7 +534,7 @@ ProcessPriorityManagerImpl::GetParticularProcessPriorityManager(
mParticularManagers.Put(cpId, pppm);
FireTestOnlyObserverNotification("process-created",
nsPrintfCString("%lld", cpId));
nsPrintfCString("%" PRIu64, cpId));
}
return pppm.forget();
@ -1195,7 +1195,7 @@ ParticularProcessPriorityManager::FireTestOnlyObserverNotification(
return;
}
nsAutoCString data(nsPrintfCString("%lld", ChildID()));
nsAutoCString data(nsPrintfCString("%" PRIu64, ChildID()));
if (!aData.IsEmpty()) {
data.Append(':');
data.Append(aData);

Просмотреть файл

@ -505,8 +505,8 @@ TabChild::Observe(nsISupports *aSubject,
// check it comparing the windowID.
if (window->WindowID() != windowID) {
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("TabChild, Observe, different windowID, owner ID = %lld, "
"ID from wrapper = %lld", window->WindowID(), windowID));
("TabChild, Observe, different windowID, owner ID = %" PRIu64 ", "
"ID from wrapper = %" PRIu64, window->WindowID(), windowID));
return NS_OK;
}

Просмотреть файл

@ -29,7 +29,6 @@
#include "nsPIDOMWindow.h"
#include "nsIConsoleService.h"
#include "nsXPIDLString.h"
#include "prprf.h"
#include "nsEscape.h"
#include "nsIWebNavigation.h"
#include "nsIDocShell.h"

Просмотреть файл

@ -12,6 +12,7 @@
#include "VideoUtils.h"
#include "TimeUnits.h"
#include "prenv.h"
#include "mozilla/SizePrintfMacros.h"
#ifdef PR_LOGGING
extern mozilla::LazyLogModule gMediaDemuxerLog;
@ -476,8 +477,8 @@ ADTSTrackDemuxer::FastSeek(const media::TimeUnit& aTime)
mParser->EndFrameSession();
ADTSLOG("FastSeek End avgFrameLen=%f mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " mFirstFrameOffset=%llu mOffset=%" PRIu64
" SL=%llu",
" mFrameIndex=%" PRId64 " mFirstFrameOffset=%" PRIu64 " mOffset=%" PRIu64
" SL=%" PRIu64 "",
AverageFrameLength(), mNumParsedFrames, mFrameIndex,
firstFrameOffset, mOffset, StreamLength());
@ -536,7 +537,7 @@ ADTSTrackDemuxer::GetSamples(int32_t aNumSamples)
frames->mSamples.AppendElement(frame);
}
ADTSLOGV("GetSamples() End mSamples.Size()=%d aNumSamples=%d mOffset=%" PRIu64
ADTSLOGV("GetSamples() End mSamples.Size()=%" PRIuSIZE " aNumSamples=%d mOffset=%" PRIu64
" mNumParsedFrames=%" PRIu64 " mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64
" mSamplesPerFrame=%d mSamplesPerSecond=%d "
@ -692,14 +693,14 @@ ADTSTrackDemuxer::FindNextFrame(bool findFirstFrame /*= false*/)
}
if (!foundFrame || !mParser->CurrentFrame().Length()) {
ADTSLOG("FindNext() Exit foundFrame=%d mParser->CurrentFrame().Length()=%d ",
ADTSLOG("FindNext() Exit foundFrame=%d mParser->CurrentFrame().Length()=%" PRIuSIZE " ",
foundFrame, mParser->CurrentFrame().Length());
mParser->Reset();
return mParser->CurrentFrame();
}
ADTSLOGV("FindNext() End mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " frameHeaderOffset=%d"
" mFrameIndex=%" PRId64 " frameHeaderOffset=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d"
" mChannels=%d",
mOffset, mNumParsedFrames, mFrameIndex, frameHeaderOffset,
@ -730,7 +731,8 @@ ADTSTrackDemuxer::SkipNextFrame(const adts::Frame& aFrame)
already_AddRefed<MediaRawData>
ADTSTrackDemuxer::GetNextFrame(const adts::Frame& aFrame)
{
ADTSLOG("GetNext() Begin({mOffset=%" PRId64 " HeaderSize()=%d Length()=%d})",
ADTSLOG("GetNext() Begin({mOffset=%" PRId64 " HeaderSize()=%" PRIuSIZE
" Length()=%" PRIuSIZE "})",
aFrame.Offset(), aFrame.Header().HeaderSize(), aFrame.PayloadLength());
if (!aFrame.IsValid())
return nullptr;
@ -749,7 +751,7 @@ ADTSTrackDemuxer::GetNextFrame(const adts::Frame& aFrame)
const uint32_t read = Read(frameWriter->Data(), offset, length);
if (read != length) {
ADTSLOG("GetNext() Exit read=%u frame->Size()=%u", read, frame->Size());
ADTSLOG("GetNext() Exit read=%u frame->Size()=%" PRIuSIZE, read, frame->Size());
return nullptr;
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше