From 7c90094462dbf002a2682a533752fd4a5fd75bc1 Mon Sep 17 00:00:00 2001 From: Lars T Hansen Date: Thu, 26 Nov 2015 12:55:06 +0100 Subject: [PATCH 001/135] Bug 1228259 - jitspew is #ifdef JS_JITSPEW not DEBUG. r=h4writer --- js/src/jit/Safepoints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jit/Safepoints.cpp b/js/src/jit/Safepoints.cpp index 02f827b316d..e5da950cabb 100644 --- a/js/src/jit/Safepoints.cpp +++ b/js/src/jit/Safepoints.cpp @@ -201,7 +201,7 @@ SafepointWriter::writeValueSlots(LSafepoint* safepoint) MapSlotsToBitset(frameSlots_, argumentSlots_, stream_, slots); } -#if defined(DEBUG) && defined(JS_NUNBOX32) +#if defined(JS_JITSPEW) && defined(JS_NUNBOX32) static void DumpNunboxPart(const LAllocation& a) { From 254ae856478c50a57336c253bea65fdadd09c9cb Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Fri, 13 Nov 2015 16:42:04 +0000 Subject: [PATCH 002/135] Bug 1224230 - Testcase. --- layout/generic/crashtests/1224230-1.html | 22 ++++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 23 insertions(+) create mode 100644 layout/generic/crashtests/1224230-1.html diff --git a/layout/generic/crashtests/1224230-1.html b/layout/generic/crashtests/1224230-1.html new file mode 100644 index 00000000000..2743b43aebc --- /dev/null +++ b/layout/generic/crashtests/1224230-1.html @@ -0,0 +1,22 @@ + + + + +
+
+ + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam tortor nulla, +eleifend eu eleifend eu, scelerisque sit amet sapien. Sed iaculis tellus ut quam +pharetra consequat. Donec vitae nulla eu mi porta vulputate. In vestibulum, erat +quis aliquam tempor, lectus augue viverra justo, vitae semper nibh neque tempor +orci. Etiam luctus aliquet magna id pellentesque. Interdum et malesuada fames ac +ante ipsum primis in faucibus. Suspendisse sit amet eros volutpat, convallis +purus non, porta sapien. Duis fermentum at tortor nec ultricies. Morbi et lacus +vitae risus elementum condimentum quis vitae justo. Cum sociis natoque penatibus +et magnis dis parturient montes, nascetur ridiculus mus.

diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 3f6c7d97914..975e78b4621 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -596,6 +596,7 @@ load 1221874-1.html load 1222783.xhtml load 1223568-1.html load 1223568-2.html +load 1224230-1.html pref(layout.css.grid.enabled,true) load 1225118.html load first-letter-638937-1.html load first-letter-638937-2.html From 3bbc61f570a4f3b33b3da50148e9e962fa3f07af Mon Sep 17 00:00:00 2001 From: Eddy Bruel Date: Fri, 27 Nov 2015 13:43:40 +0100 Subject: [PATCH 003/135] Bug 1218817 - Implement ServiceWorkerRegistrationActor;r=janx --- devtools/server/actors/worker.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/devtools/server/actors/worker.js b/devtools/server/actors/worker.js index 0be25e685a1..a0145a26a24 100644 --- a/devtools/server/actors/worker.js +++ b/devtools/server/actors/worker.js @@ -228,3 +228,18 @@ WorkerActorList.prototype = { }; exports.WorkerActorList = WorkerActorList; + +function ServiceWorkerRegistrationActor(registration) { + this._registration = registration; +}; + +ServiceWorkerRegistrationActor.prototype = { + actorPrefix: "serviceWorkerRegistration", + + form: function () { + return { + actor: this.actorID, + scope: this._registration.scope + }; + } +}; From 1f9c61bfe5c4e971fb51d6924d57043265e42879 Mon Sep 17 00:00:00 2001 From: Eddy Bruel Date: Fri, 27 Nov 2015 13:44:14 +0100 Subject: [PATCH 004/135] Bug 1218817 - Implement ServiceWorkerRegistrationActorList;r=janx --- devtools/server/actors/worker.js | 88 ++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/devtools/server/actors/worker.js b/devtools/server/actors/worker.js index a0145a26a24..84c5996f6cb 100644 --- a/devtools/server/actors/worker.js +++ b/devtools/server/actors/worker.js @@ -243,3 +243,91 @@ ServiceWorkerRegistrationActor.prototype = { }; } }; + +function ServiceWorkerRegistrationActorList() { + this._actors = new Map(); + this._onListChanged = null; + this._mustNotify = false; + this.onRegister = this.onRegister.bind(this); + this.onUnregister = this.onUnregister.bind(this); +}; + +ServiceWorkerRegistrationActorList.prototype = { + getList: function () { + // Create a set of registrations. + let registrations = new Set(); + let array = swm.getAllRegistrations(); + for (let index = 0; index < array.length; ++index) { + registrations.add( + array.queryElementAt(index, Ci.nsIServiceWorkerRegistrationInfo)); + } + + // Delete each actor for which we don't have a registration. + for (let [registration, ] of this._actors) { + if (!registrations.has(registration)) { + this._actors.delete(registration); + } + } + + // Create an actor for each registration for which we don't have one. + for (let registration of registrations) { + if (!this._actors.has(registration)) { + this._actors.set(registration, + new ServiceWorkerRegistrationActor(registration)); + } + } + + if (!this._mustNotify) { + if (this._onListChanged !== null) { + swm.addListener(this); + } + this._mustNotify = true; + } + + let actors = []; + for (let [, actor] of this._actors) { + actors.push(actor); + } + + return Promise.resolve(actors); + }, + + get onListchanged() { + return this._onListchanged; + }, + + set onListChanged(onListChanged) { + if (typeof onListChanged !== "function" && onListChanged !== null) { + throw new Error("onListChanged must be either a function or null."); + } + + if (this._mustNotify) { + if (this._onListChanged === null && onListChanged !== null) { + swm.addListener(this); + } + if (this._onListChanged !== null && onListChanged === null) { + swm.removeListener(this); + } + } + this._onListChanged = onListChanged; + }, + + _notifyListChanged: function () { + this._onListChanged(); + + if (this._onListChanged !== null) { + swm.removeListener(this); + } + this._mustNotify = false; + }, + + onRegister: function (registration) { + this._notifyListChanged(); + }, + + onUnregister: function (registration) { + this._notifyListChanged(); + } +}; + +exports.ServiceWorkerRegistrationActorList = ServiceWorkerRegistrationActorList; From 6c22ab411cef6e217c5b58f1479249331472feb8 Mon Sep 17 00:00:00 2001 From: Fernando Jimenez Date: Fri, 27 Nov 2015 13:56:50 +0100 Subject: [PATCH 005/135] Bug 1223781 - New settings added to settings.json should be applied after OTA without requiring to bump settings DB version. r=gwagner --- .../filepicker_path_handler_chrome.js | 9 +- dom/settings/SettingsDB.jsm | 201 +++++++++++------- dom/settings/tests/chrome.ini | 5 +- dom/settings/tests/test_settings_db.js | 148 +++++++++++++ dom/settings/tests/test_settings_db.xul | 19 ++ .../test_settingsrequestmanager_messages.js | 42 +++- 6 files changed, 345 insertions(+), 79 deletions(-) create mode 100644 dom/settings/tests/test_settings_db.js create mode 100644 dom/settings/tests/test_settings_db.xul diff --git a/b2g/components/test/mochitest/filepicker_path_handler_chrome.js b/b2g/components/test/mochitest/filepicker_path_handler_chrome.js index a175746cb93..7cc7a84fd04 100644 --- a/b2g/components/test/mochitest/filepicker_path_handler_chrome.js +++ b/b2g/components/test/mochitest/filepicker_path_handler_chrome.js @@ -12,13 +12,18 @@ var ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1'] .getService(Ci.nsIMessageListenerManager); var pickResult = null; +var timer = null; function processPickMessage(message) { let sender = message.target.QueryInterface(Ci.nsIMessageSender); // reply FilePicker's message sender.sendAsyncMessage('file-picked', pickResult); - // notify caller - sendAsyncMessage('file-picked-posted', { type: 'file-picked-posted' }); + timer = Cc["@mozilla.org/timer;1"] + .createInstance(Components.interfaces.nsITimer); + timer.initWithCallback(function() { + // notify caller + sendAsyncMessage('file-picked-posted', { type: 'file-picked-posted' }); + }, 3000, Ci.nsITimer.TYPE_ONE_SHOT); } function updatePickResult(result) { diff --git a/dom/settings/SettingsDB.jsm b/dom/settings/SettingsDB.jsm index d4b07a624fe..3c1cbd79117 100644 --- a/dom/settings/SettingsDB.jsm +++ b/dom/settings/SettingsDB.jsm @@ -8,10 +8,16 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu.importGlobalProperties(['Blob', 'File']); +Cu.importGlobalProperties(["Blob", "File"]); Cu.import("resource://gre/modules/Services.jsm"); +Cu.import("resource://gre/modules/AppsUtils.jsm"); -this.EXPORTED_SYMBOLS = ["SettingsDB", "SETTINGSDB_NAME", "SETTINGSSTORE_NAME"]; +this.EXPORTED_SYMBOLS = [ + "SettingsDB", + "SETTINGSDB_NAME", + "SETTINGSSTORE_NAME", + "SETTINGSDB_VERSION" +]; var DEBUG = false; var VERBOSE = false; @@ -53,7 +59,10 @@ SettingsDB.prototype = { __proto__: IndexedDBHelper.prototype, - upgradeSchema: function upgradeSchema(aTransaction, aDb, aOldVersion, aNewVersion) { + _dbVersion: SETTINGSDB_VERSION, + + upgradeSchema(aTransaction, aDb, aOldVersion, aNewVersion) { + if (DEBUG) debug("Upgrade schema ", aOldVersion, aNewVersion); let objectStore; if (aOldVersion == 0) { objectStore = aDb.createObjectStore(SETTINGSSTORE_NAME, { keyPath: "settingName" }); @@ -67,75 +76,11 @@ SettingsDB.prototype = { objectStore = aTransaction.objectStore(SETTINGSSTORE_NAME); } - // Loading resource://app/defaults/settings.json doesn't work because - // settings.json is not in the omnijar. - // So we look for the app dir instead and go from here... - let settingsFile = FileUtils.getFile("DefRt", ["settings.json"], false); - if (!settingsFile || (settingsFile && !settingsFile.exists())) { - // On b2g desktop builds the settings.json file is moved in the - // profile directory by the build system. - settingsFile = FileUtils.getFile("ProfD", ["settings.json"], false); - if (!settingsFile || (settingsFile && !settingsFile.exists())) { - return; - } - } - - let chan = NetUtil.newChannel({ - uri: NetUtil.newURI(settingsFile), - loadUsingSystemPrincipal: true}); - let stream = chan.open(); - // Obtain a converter to read from a UTF-8 encoded input stream. - let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"] - .createInstance(Ci.nsIScriptableUnicodeConverter); - converter.charset = "UTF-8"; - let rawstr = converter.ConvertToUnicode(NetUtil.readInputStreamToString( - stream, - stream.available()) || ""); - let settings; - try { - settings = JSON.parse(rawstr); - } catch(e) { - if (DEBUG) debug("Error parsing " + settingsFile.path + " : " + e); - return; - } - stream.close(); - - objectStore.openCursor().onsuccess = function(event) { - let cursor = event.target.result; - if (cursor) { - let value = cursor.value; - if (value.settingName in settings) { - if (VERBOSE) debug("Upgrade " +settings[value.settingName]); - value.defaultValue = this.prepareValue(settings[value.settingName]); - delete settings[value.settingName]; - if ("settingValue" in value) { - value.userValue = this.prepareValue(value.settingValue); - delete value.settingValue; - } - cursor.update(value); - } else if ("userValue" in value || "settingValue" in value) { - value.defaultValue = undefined; - if (aOldVersion == 1 && value.settingValue) { - value.userValue = this.prepareValue(value.settingValue); - delete value.settingValue; - } - cursor.update(value); - } else { - cursor.delete(); - } - cursor.continue(); - } else { - for (let name in settings) { - let value = this.prepareValue(settings[name]); - if (VERBOSE) debug("Set new:" + name +", " + value); - objectStore.add({ settingName: name, defaultValue: value, userValue: undefined }); - } - } - }.bind(this); + this.loadDefaultSettings(objectStore, aOldVersion); }, // If the value is a data: uri, convert it to a Blob. - convertDataURIToBlob: function(aValue) { + convertDataURIToBlob(aValue) { /* base64 to ArrayBuffer decoding, from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding */ @@ -199,7 +144,7 @@ SettingsDB.prototype = { return aValue }, - getObjectKind: function(aObject) { + getObjectKind(aObject) { if (aObject === null || aObject === undefined) { return "primitive"; } else if (Array.isArray(aObject)) { @@ -220,7 +165,7 @@ SettingsDB.prototype = { }, // Makes sure any property that is a data: uri gets converted to a Blob. - prepareValue: function(aObject) { + prepareValue(aObject) { let kind = this.getObjectKind(aObject); if (kind == "array") { let res = []; @@ -242,8 +187,118 @@ SettingsDB.prototype = { return res; }, - init: function init() { - this.initDBHelper(SETTINGSDB_NAME, SETTINGSDB_VERSION, + loadDefaultSettings(aObjectStore, aOldVersion) { + // Loading resource://app/defaults/settings.json doesn't work because + // settings.json is not in the omnijar. + // So we look for the app dir instead and go from here... + let settingsFile = FileUtils.getFile("DefRt", ["settings.json"], false); + if (!settingsFile || (settingsFile && !settingsFile.exists())) { + // On b2g desktop builds the settings.json file is moved in the + // profile directory by the build system. + settingsFile = FileUtils.getFile("ProfD", ["settings.json"], false); + if (!settingsFile || (settingsFile && !settingsFile.exists())) { + return; + } + } + + let chan = NetUtil.newChannel({ + uri: NetUtil.newURI(settingsFile), + loadUsingSystemPrincipal: true + }); + let stream = chan.open(); + // Obtain a converter to read from a UTF-8 encoded input stream. + let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"] + .createInstance(Ci.nsIScriptableUnicodeConverter); + converter.charset = "UTF-8"; + let rawstr = converter.ConvertToUnicode( + NetUtil.readInputStreamToString(stream, stream.available()) || "" + ); + let settings; + try { + settings = JSON.parse(rawstr); + } catch(e) { + if (DEBUG) debug("Error parsing " + settingsFile.path + " : " + e); + return; + } + stream.close(); + + aObjectStore.openCursor().onsuccess = event => { + let cursor = event.target.result; + if (cursor) { + let value = cursor.value; + if (value.settingName in settings) { + if (VERBOSE) { + debug("Upgrade " + value.settingName + " " + + settings[value.settingName]); + } + value.defaultValue = this.prepareValue(settings[value.settingName]); + delete settings[value.settingName]; + if ("settingValue" in value) { + value.userValue = this.prepareValue(value.settingValue); + delete value.settingValue; + } + cursor.update(value); + } else if ("userValue" in value || "settingValue" in value) { + value.defaultValue = undefined; + if (aOldVersion !== undefined && + aOldVersion == 1 && value.settingValue) { + value.userValue = this.prepareValue(value.settingValue); + delete value.settingValue; + } + cursor.update(value); + } else { + cursor.delete(); + } + cursor.continue(); + } else { + for (let name in settings) { + let value = this.prepareValue(settings[name]); + if (VERBOSE) debug("Set new:" + name +", " + value); + aObjectStore.add({ + settingName: name, + defaultValue: value, + userValue: undefined + }); + } + } + }; + }, + + /** + * Only for testing purposes. + */ + set dbVersion(version) { + this._dbVersion = SETTINGSDB_VERSION || version; + }, + + init() { + this.initDBHelper(SETTINGSDB_NAME, this._dbVersion, [SETTINGSSTORE_NAME]); + + // We need to store the db version to avoid reading the setting.json + // file twice on the very first run and after an OTA update where + // the db version was bumped. + // upgradeSchema already takes care of loading and applying the + // setting.json content in these two scenarios. + const dbVersionPref = "settings.api.db.version"; + let oldDbVersion = 0; + try { + oldDbVersion = Services.prefs.getIntPref(dbVersionPref); + } catch(e) {} + Services.prefs.setIntPref(dbVersionPref, this._dbVersion); + + if (!AppsUtils.isFirstRun(Services.prefs) || + oldDbVersion != this._dbVersion) { + return; + } + + // We get there in case of a first run after an OTA update where + // the settings db version was not bumped. In this case, we need to + // load and apply the content of the settings.json file. + this.newTxn("readwrite", SETTINGSSTORE_NAME, (txn, store) => { + this.loadDefaultSettings(store); + }, null, error => { + dump("*** WARNING *** Settings DB initialization error " + error + "\n"); + }); } } diff --git a/dom/settings/tests/chrome.ini b/dom/settings/tests/chrome.ini index f2fca29a73c..8f3861b05fa 100644 --- a/dom/settings/tests/chrome.ini +++ b/dom/settings/tests/chrome.ini @@ -1,10 +1,13 @@ [DEFAULT] skip-if = buildapp != 'b2g' support-files = + test_settings_db.js test_settings_service.js test_settings_service_callback.js [test_settings_service.xul] -skip-if= buildapp == 'mulet' +skip-if = buildapp == 'mulet' [test_settings_service_callback.xul] +[test_settings_db.xul] +skip-if = toolkit == 'gonk' # Bug 1225157 diff --git a/dom/settings/tests/test_settings_db.js b/dom/settings/tests/test_settings_db.js new file mode 100644 index 00000000000..75f7c663aab --- /dev/null +++ b/dom/settings/tests/test_settings_db.js @@ -0,0 +1,148 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +const Cu = Components.utils; + +Cu.import("resource://gre/modules/AppsUtils.jsm"); +Cu.import("resource://gre/modules/FileUtils.jsm"); +Cu.import("resource://gre/modules/Services.jsm"); +Cu.import("resource://gre/modules/SettingsDB.jsm"); + +SimpleTest.waitForExplicitFinish(); + +let settings = { + "setting1": "value1" +}; + +let settingsDB; + +const saveTestSettingsJson = () => { + let file = FileUtils.getFile("ProfD", ["settings.json"], false); + let foStream = FileUtils.openFileOutputStream(file); + let json = JSON.stringify(settings); + foStream.write(json, json.length); + foStream.close(); +}; + +const getSettings = () => { + return new Promise((resolve, reject) => { + settingsDB.newTxn("readonly", SETTINGSSTORE_NAME, (txn, store) => { + txn.onabort = reject; + txn.onerror = reject; + let req = store.getAll(); + req.onsuccess = () => { + resolve(req.result); + }; + req.onerror = reject; + }, null, reject); + }); +}; + +const checkSettings = expected => { + return getSettings().then(settings => { + settings.forEach(setting => { + if (expected.has(setting.settingName)) { + let value = expected.get(setting.settingName); + ok(value == setting.defaultValue, + `${setting.defaultValue} should be ${value}`); + expected.delete(setting.settingName); + } + }); + ok(expected.size == 0, `should remove all expected settings`); + }); +}; + +const setFirstRun = () => { + let promises = []; + promises.push(new Promise(resolve => { + SpecialPowers.pushPrefEnv({ + "set": [["gecko.mstone", ""]] + }, resolve); + })); + promises.push(new Promise(resolve => { + SpecialPowers.pushPrefEnv({ + "set": [["gecko.buildID", ""]] + }, resolve); + })); + + return Promise.all(promises); +}; + +const cleanup = () => { + settingsDB.close(); + settingsDB = null; + next(); +}; + +const tests = [() => { + // Create dummy settings.json in the profile dir. + saveTestSettingsJson(); + ok(true, "should create settings.json"); + next(); +}, () => { + // settings.json should be applied on first boot. + settingsDB = new SettingsDB(); + settingsDB.init(); + let expected = new Map(); + expected.set("setting1", "value1"); + checkSettings(expected).then(next); +}, () => { + cleanup(); +}, () => { + // Modifying settings.json but not updating the platform should not + // apply the changes to settings.json. + settings["setting1"] = "modifiedValue1"; + settings["setting2"] = "value2"; + saveTestSettingsJson(); + settingsDB = new SettingsDB(); + settingsDB.init(); + let expected = new Map(); + expected.set("setting1", "value1"); + checkSettings(expected).then(next); +}, () => { + cleanup(); +}, () => { + setFirstRun().then(next); +}, () => { + // Updating the platform should apply changes to settings.json. + settingsDB = new SettingsDB(); + settingsDB.init(); + let expected = new Map(); + expected.set("setting1", "modifiedValue1"); + expected.set("setting2", "value2"); + checkSettings(expected).then(next); +}, () => { + cleanup(); +}, () => { + setFirstRun().then(next); +}, () => { + // Updating the platform and bumping DB version should also apply changes + // to settings.json + settings["setting2"] = "modifiedValue2"; + saveTestSettingsJson(); + settingsDB = new SettingsDB(); + SettingsDB.dbVersion = SETTINGSDB_VERSION + 1; + settingsDB.init(); + let expected = new Map(); + expected.set("setting1", "modifiedValue1"); + expected.set("setting2", "modifiedValue2"); + checkSettings(expected).then(next); +}, () => { + cleanup(); +}]; + +const next = () => { + let step = tests.shift(); + if (!step) { + return SimpleTest.finish(); + } + try { + step(); + } catch(e) { + ok(false, "Test threw: " + e); + } +} + +SpecialPowers.pushPrefEnv({"set":[["settings.api.db.version", 0]]}, next); diff --git a/dom/settings/tests/test_settings_db.xul b/dom/settings/tests/test_settings_db.xul new file mode 100644 index 00000000000..7451bdecbdf --- /dev/null +++ b/dom/settings/tests/test_settings_db.xul @@ -0,0 +1,19 @@ + + + + + + + + + + Mozilla Bug 1223781 + + + + + diff --git a/layout/reftests/text-shadow/reftest.list b/layout/reftests/text-shadow/reftest.list index 48f44812006..7808c9f0d2e 100644 --- a/layout/reftests/text-shadow/reftest.list +++ b/layout/reftests/text-shadow/reftest.list @@ -36,3 +36,5 @@ fails-if(Android||B2G) needs-focus == text-shadow-selected-2.html text-shadow-se # bug 721750 needs-focus == text-shadow-on-selection-1.html text-shadow-on-selection-1-ref.html needs-focus == text-shadow-on-selection-2.html text-shadow-on-selection-2-ref.html + +== overflow-decoration.html overflow-decoration-ref.html From c477ee820a997e7c1eec1c5989a8ea7eda0a8cb4 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 042/135] Bug 1040668 part 10 - Implement emphasis mark rendering. r=jfkthame --- gfx/thebes/gfxFont.cpp | 41 ++++++++++ gfx/thebes/gfxFont.h | 20 +++++ gfx/thebes/gfxTextRun.cpp | 47 +++++++++++- gfx/thebes/gfxTextRun.h | 10 +++ layout/generic/nsLineLayout.cpp | 5 +- layout/generic/nsTextFrame.cpp | 129 +++++++++++++++++++++++++++++++- layout/generic/nsTextFrame.h | 19 +++++ layout/style/nsStyleStruct.cpp | 18 +++++ layout/style/nsStyleStruct.h | 2 + 9 files changed, 286 insertions(+), 5 deletions(-) diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index aca982f45b5..0f20554625e 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -48,6 +48,7 @@ #include "graphite2/Font.h" #include +#include using namespace mozilla; using namespace mozilla::gfx; @@ -1849,6 +1850,46 @@ gfxFont::DrawGlyphs(gfxShapedText *aShapedText, return emittedGlyphs; } +// This method is mostly parallel to DrawGlyphs. +void +gfxFont::DrawEmphasisMarks(gfxTextRun* aShapedText, gfxPoint* aPt, + uint32_t aOffset, uint32_t aCount, + const EmphasisMarkDrawParams& aParams) +{ + gfxFloat& inlineCoord = aParams.isVertical ? aPt->y : aPt->x; + uint32_t markLength = aParams.mark->GetLength(); + + gfxFloat clusterStart = NAN; + bool shouldDrawEmphasisMark = false; + for (uint32_t i = 0, idx = aOffset; i < aCount; ++i, ++idx) { + if (aParams.spacing) { + inlineCoord += aParams.direction * aParams.spacing[i].mBefore; + } + if (aShapedText->IsClusterStart(idx)) { + clusterStart = inlineCoord; + } + if (aShapedText->CharMayHaveEmphasisMark(idx)) { + shouldDrawEmphasisMark = true; + } + inlineCoord += aParams.direction * aShapedText->GetAdvanceForGlyph(idx); + if (shouldDrawEmphasisMark && + (i + 1 == aCount || aShapedText->IsClusterStart(idx + 1))) { + MOZ_ASSERT(!std::isnan(clusterStart), "Should have cluster start"); + gfxFloat clusterAdvance = inlineCoord - clusterStart; + // Move the coord backward to get the needed start point. + gfxFloat delta = (clusterAdvance + aParams.advance) / 2; + inlineCoord -= delta; + aParams.mark->Draw(aParams.context, *aPt, DrawMode::GLYPH_FILL, + 0, markLength, nullptr, nullptr, nullptr); + inlineCoord += delta; + shouldDrawEmphasisMark = false; + } + if (aParams.spacing) { + inlineCoord += aParams.direction * aParams.spacing[i].mAfter; + } + } +} + void gfxFont::Draw(gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd, gfxPoint *aPt, const TextRunDrawParams& aRunParams, diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index 69eedec04c6..a6fad37adb1 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -1307,6 +1307,7 @@ private: class GlyphBufferAzure; struct TextRunDrawParams; struct FontDrawParams; +struct EmphasisMarkDrawParams; class gfxFont { @@ -1601,6 +1602,16 @@ public: gfxPoint *aPt, const TextRunDrawParams& aRunParams, uint16_t aOrientation); + /** + * Draw the emphasis marks for the given text run. Its prerequisite + * and output are similiar to the method Draw(). + * @param aPt the baseline origin of the emphasis marks. + * @param aParams some drawing parameters, see EmphasisMarkDrawParams. + */ + void DrawEmphasisMarks(gfxTextRun* aShapedText, gfxPoint* aPt, + uint32_t aOffset, uint32_t aCount, + const EmphasisMarkDrawParams& aParams); + /** * Measure a run of characters. See gfxTextRun::Metrics. * @param aTight if false, then return the union of the glyph extents @@ -2167,4 +2178,13 @@ struct FontDrawParams { bool haveColorGlyphs; }; +struct EmphasisMarkDrawParams { + gfxContext* context; + gfxFont::Spacing* spacing; + gfxTextRun* mark; + gfxFloat advance; + gfxFloat direction; + bool isVertical; +}; + #endif diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp index 7dea79f42cd..b6809394e2f 100644 --- a/gfx/thebes/gfxTextRun.cpp +++ b/gfx/thebes/gfxTextRun.cpp @@ -1,4 +1,5 @@ -/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim: set ts=4 et sw=4 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ @@ -665,6 +666,50 @@ gfxTextRun::Draw(gfxContext *aContext, gfxPoint aPt, DrawMode aDrawMode, } } +// This method is mostly parallel to Draw(). +void +gfxTextRun::DrawEmphasisMarks(gfxContext *aContext, gfxTextRun* aMark, + gfxFloat aMarkAdvance, gfxPoint aPt, + uint32_t aStart, uint32_t aLength, + PropertyProvider* aProvider) +{ + MOZ_ASSERT(aStart + aLength <= GetLength()); + + EmphasisMarkDrawParams params; + params.context = aContext; + params.mark = aMark; + params.advance = aMarkAdvance; + params.direction = GetDirection(); + params.isVertical = IsVertical(); + + gfxFloat& inlineCoord = params.isVertical ? aPt.y : aPt.x; + gfxFloat direction = params.direction; + + GlyphRunIterator iter(this, aStart, aLength); + while (iter.NextRun()) { + gfxFont* font = iter.GetGlyphRun()->mFont; + uint32_t start = iter.GetStringStart(); + uint32_t end = iter.GetStringEnd(); + uint32_t ligatureRunStart = start; + uint32_t ligatureRunEnd = end; + ShrinkToLigatureBoundaries(&ligatureRunStart, &ligatureRunEnd); + + inlineCoord += direction * + ComputePartialLigatureWidth(start, ligatureRunStart, aProvider); + + nsAutoTArray spacingBuffer; + bool haveSpacing = GetAdjustedSpacingArray( + ligatureRunStart, ligatureRunEnd, aProvider, + ligatureRunStart, ligatureRunEnd, &spacingBuffer); + params.spacing = haveSpacing ? spacingBuffer.Elements() : nullptr; + font->DrawEmphasisMarks(this, &aPt, ligatureRunStart, + ligatureRunEnd - ligatureRunStart, params); + + inlineCoord += direction * + ComputePartialLigatureWidth(ligatureRunEnd, end, aProvider); + } +} + void gfxTextRun::AccumulateMetricsForRun(gfxFont *aFont, uint32_t aStart, uint32_t aEnd, diff --git a/gfx/thebes/gfxTextRun.h b/gfx/thebes/gfxTextRun.h index 1a049e5b098..fa804106d32 100644 --- a/gfx/thebes/gfxTextRun.h +++ b/gfx/thebes/gfxTextRun.h @@ -251,6 +251,16 @@ public: gfxFloat *aAdvanceWidth, gfxTextContextPaint *aContextPaint, gfxTextRunDrawCallbacks *aCallbacks = nullptr); + /** + * Draws the emphasis marks for this text run. Uses only GetSpacing + * from aProvider. The provided point is the baseline origin of the + * line of emphasis marks. + */ + void DrawEmphasisMarks(gfxContext* aContext, gfxTextRun* aMark, + gfxFloat aMarkAdvance, gfxPoint aPt, + uint32_t aStart, uint32_t aLength, + PropertyProvider* aProvider); + /** * Computes the ReflowMetrics for a substring. * Uses GetSpacing from aBreakProvider. diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index f57c98d52be..fdb13d5a2e1 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -3285,8 +3285,11 @@ nsLineLayout::RelativePositionFrames(PerSpanData* psd, nsOverflowAreas& aOverflo // (1) When PFD_RECOMPUTEOVERFLOW is set due to trimming // (2) When there are text decorations, since we can't recompute the // overflow area until Reflow and VerticalAlignLine have finished + // (3) When there are text emphasis marks, since the marks may be + // put further away if the text is inside ruby. if (pfd->mRecomputeOverflow || - frame->StyleContext()->HasTextDecorationLines()) { + frame->StyleContext()->HasTextDecorationLines() || + frame->StyleText()->HasTextEmphasis()) { nsTextFrame* f = static_cast(frame); r = f->RecomputeOverflow(mBlockReflowState->frame); } diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index c450099d502..32ba6c1a02b 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -5116,6 +5116,92 @@ GetInflationForTextDecorations(nsIFrame* aFrame, nscoord aInflationMinFontSize) return nsLayoutUtils::FontSizeInflationInner(aFrame, aInflationMinFontSize); } +static already_AddRefed +GetFontMetricsOfEmphasisMarks(nsStyleContext* aStyleContext, float aInflation) +{ + nsPresContext* pc = aStyleContext->PresContext(); + WritingMode wm(aStyleContext); + gfxFont::Orientation orientation = wm.IsVertical() && !wm.IsSideways() ? + gfxFont::eVertical : gfxFont::eHorizontal; + + const nsStyleFont* styleFont = aStyleContext->StyleFont(); + nsFont font = styleFont->mFont; + font.size = NSToCoordRound(font.size * aInflation * 0.5f); + + RefPtr fm; + pc->DeviceContext()->GetMetricsFor(font, styleFont->mLanguage, + styleFont->mExplicitLanguage, + orientation, pc->GetUserFontSet(), + pc->GetTextPerfMetrics(), + *getter_AddRefs(fm)); + return fm.forget(); +} + +static gfxTextRun* +GenerateTextRunForEmphasisMarks(nsTextFrame* aFrame, nsFontMetrics* aFontMetrics, + WritingMode aWM, const nsStyleText* aStyleText) +{ + const nsString& emphasisString = aStyleText->mTextEmphasisStyleString; + RefPtr ctx = CreateReferenceThebesContext(aFrame); + auto appUnitsPerDevUnit = aFrame->PresContext()->AppUnitsPerDevPixel(); + uint32_t flags = nsLayoutUtils:: + GetTextRunOrientFlagsForStyle(aFrame->StyleContext()); + if (flags == gfxTextRunFactory::TEXT_ORIENT_VERTICAL_MIXED) { + // The emphasis marks should always be rendered upright per spec. + flags = gfxTextRunFactory::TEXT_ORIENT_VERTICAL_UPRIGHT; + } + return aFontMetrics->GetThebesFontGroup()-> + MakeTextRun(emphasisString.get(), emphasisString.Length(), + ctx, appUnitsPerDevUnit, flags, nullptr); +} + +nsRect +nsTextFrame::UpdateTextEmphasis(WritingMode aWM, PropertyProvider& aProvider) +{ + const nsStyleText* styleText = StyleText(); + if (!styleText->HasTextEmphasis()) { + Properties().Delete(EmphasisMarkProperty()); + return nsRect(); + } + + RefPtr fm = + GetFontMetricsOfEmphasisMarks(StyleContext(), GetFontSizeInflation()); + EmphasisMarkInfo* info = new EmphasisMarkInfo; + info->textRun = + GenerateTextRunForEmphasisMarks(this, fm, aWM, styleText); + info->advance = + info->textRun->GetAdvanceWidth(0, info->textRun->GetLength(), nullptr); + + // Calculate the baseline offset + LogicalSide side = styleText->TextEmphasisSide(aWM); + nsFontMetrics* baseFontMetrics = aProvider.GetFontMetrics(); + LogicalSize frameSize = GetLogicalSize(); + // The overflow rect is inflated in the inline direction by half + // advance of the emphasis mark on each side, so that even if a mark + // is drawn for a zero-width character, it won't be clipped. + LogicalRect overflowRect(aWM, -info->advance / 2, + /* BStart to be computed below */0, + frameSize.ISize(aWM) + info->advance, + fm->MaxAscent() + fm->MaxDescent()); + // When the writing mode is vertical-lr the line is inverted, and thus + // the ascent and descent are swapped. + nscoord absOffset = (side == eLogicalSideBStart) != aWM.IsLineInverted() ? + baseFontMetrics->MaxAscent() + fm->MaxDescent() : + baseFontMetrics->MaxDescent() + fm->MaxAscent(); + // XXX emphasis marks should be drawn outside ruby, see bug 1224013. + if (side == eLogicalSideBStart) { + info->baselineOffset = -absOffset; + overflowRect.BStart(aWM) = -overflowRect.BSize(aWM); + } else { + MOZ_ASSERT(side == eLogicalSideBEnd); + info->baselineOffset = absOffset; + overflowRect.BStart(aWM) = frameSize.BSize(aWM); + } + + Properties().Set(EmphasisMarkProperty(), info); + return overflowRect.GetPhysicalRect(aWM, frameSize.GetPhysicalSize(aWM)); +} + void nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext, nsIFrame* aBlock, @@ -5123,9 +5209,10 @@ nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext, nsRect* aVisualOverflowRect, bool aIncludeTextDecorations) { + const WritingMode wm = GetWritingMode(); bool verticalRun = mTextRun->IsVertical(); bool useVerticalMetrics = verticalRun && mTextRun->UseCenterBaseline(); - bool inverted = GetWritingMode().IsLineInverted(); + bool inverted = wm.IsLineInverted(); if (IsFloatingFirstLetterChild()) { // The underline/overline drawable area must be contained in the overflow @@ -5185,7 +5272,6 @@ nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext, const gfxFloat appUnitsPerDevUnit = aPresContext->AppUnitsPerDevPixel(), gfxWidth = measure / appUnitsPerDevUnit; gfxFloat ascent = gfxFloat(mAscent) / appUnitsPerDevUnit; - const WritingMode wm = GetWritingMode(); if (wm.IsVerticalRL()) { ascent = -ascent; } @@ -5295,6 +5381,9 @@ nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext, verticalRun ? nsRect(topOrLeft, 0, bottomOrRight - topOrLeft, measure) : nsRect(0, topOrLeft, measure, bottomOrRight - topOrLeft)); } + + aVisualOverflowRect->UnionRect(*aVisualOverflowRect, + UpdateTextEmphasis(wm, aProvider)); } // Text-shadow overflows @@ -6107,6 +6196,36 @@ nsTextFrame::PaintTextWithSelection(gfxContext* aCtx, return true; } +void +nsTextFrame::DrawEmphasisMarks(gfxContext* aContext, WritingMode aWM, + const gfxPoint& aTextBaselinePt, + uint32_t aOffset, uint32_t aLength, + PropertyProvider& aProvider) +{ + auto info = static_cast( + Properties().Get(EmphasisMarkProperty())); + if (!info) { + MOZ_ASSERT(!StyleText()->HasTextEmphasis()); + return; + } + + nscolor color = nsLayoutUtils:: + GetColor(this, eCSSProperty_text_emphasis_color); + aContext->SetColor(Color::FromABGR(color)); + gfxPoint pt(aTextBaselinePt); + if (!aWM.IsVertical()) { + pt.y += info->baselineOffset; + } else { + if (aWM.IsVerticalRL()) { + pt.x -= info->baselineOffset; + } else { + pt.x += info->baselineOffset; + } + } + mTextRun->DrawEmphasisMarks(aContext, info->textRun, info->advance, + pt, aOffset, aLength, &aProvider); +} + nscolor nsTextFrame::GetCaretColorAt(int32_t aOffset) { @@ -6609,6 +6728,9 @@ nsTextFrame::DrawTextRunAndDecorations( DrawTextRun(aCtx, aTextBaselinePt, aOffset, aLength, aProvider, aTextColor, aAdvanceWidth, aDrawSoftHyphen, aContextPaint, aCallbacks); + // Emphasis marks + DrawEmphasisMarks(aCtx, wm, aTextBaselinePt, aOffset, aLength, aProvider); + // Line-throughs for (uint32_t i = aDecorations.mStrikes.Length(); i-- > 0; ) { const LineDecoration& dec = aDecorations.mStrikes[i]; @@ -6655,7 +6777,8 @@ nsTextFrame::DrawText( // Hide text decorations if we're currently hiding @font-face fallback text const bool drawDecorations = !aProvider.GetFontGroup()->ShouldSkipDrawing() && - decorations.HasDecorationLines(); + (decorations.HasDecorationLines() || + StyleText()->HasTextEmphasis()); if (drawDecorations) { DrawTextRunAndDecorations(aCtx, aDirtyRect, aFramePt, aTextBaselinePt, aOffset, aLength, aProvider, aTextStyle, aTextColor, aClipEdges, aAdvanceWidth, diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 6fba1cd277f..caef123e66c 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -440,6 +440,12 @@ public: SelectionType aSelectionType, DrawPathCallbacks* aCallbacks); + void DrawEmphasisMarks(gfxContext* aContext, + mozilla::WritingMode aWM, + const gfxPoint& aTextBaselinePt, + uint32_t aOffset, uint32_t aLength, + PropertyProvider& aProvider); + virtual nscolor GetCaretColorAt(int32_t aOffset) override; int16_t GetSelectionStatus(int16_t* aSelectionFlags); @@ -585,6 +591,11 @@ protected: nsRect* aVisualOverflowRect, bool aIncludeTextDecorations); + // Update information of emphasis marks, and return the visial + // overflow rect of the emphasis marks. + nsRect UpdateTextEmphasis(mozilla::WritingMode aWM, + PropertyProvider& aProvider); + void PaintOneShadow(uint32_t aOffset, uint32_t aLength, nsCSSShadowItem* aShadowDetails, @@ -812,6 +823,14 @@ protected: void ClearMetrics(nsHTMLReflowMetrics& aMetrics); NS_DECLARE_FRAME_PROPERTY(JustificationAssignment, nullptr) + + struct EmphasisMarkInfo + { + nsAutoPtr textRun; + gfxFloat advance; + gfxFloat baselineOffset; + }; + NS_DECLARE_FRAME_PROPERTY(EmphasisMarkProperty, DeleteValue) }; #endif diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index dccf895c7ec..fdc01d12a29 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3726,6 +3726,24 @@ nsChangeHint nsStyleText::CalcDifference(const nsStyleText& aOther) const return NS_STYLE_HINT_NONE; } +LogicalSide +nsStyleText::TextEmphasisSide(WritingMode aWM) const +{ + MOZ_ASSERT( + (!(mTextEmphasisPosition & NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT) != + !(mTextEmphasisPosition & NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT)) && + (!(mTextEmphasisPosition & NS_STYLE_TEXT_EMPHASIS_POSITION_OVER) != + !(mTextEmphasisPosition & NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER))); + Side side = aWM.IsVertical() ? + (mTextEmphasisPosition & NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT + ? eSideLeft : eSideRight) : + (mTextEmphasisPosition & NS_STYLE_TEXT_EMPHASIS_POSITION_OVER + ? eSideTop : eSideBottom); + LogicalSide result = aWM.LogicalSideForPhysicalSide(side); + MOZ_ASSERT(IsBlock(result)); + return result; +} + //----------------------- // nsStyleUserInterface // diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 49bd372ab06..0f586f28981 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -1811,6 +1811,8 @@ struct nsStyleText { inline bool NewlineIsSignificant(const nsTextFrame* aContextFrame) const; inline bool WhiteSpaceCanWrap(const nsIFrame* aContextFrame) const; inline bool WordCanWrap(const nsIFrame* aContextFrame) const; + + mozilla::LogicalSide TextEmphasisSide(mozilla::WritingMode aWM) const; }; struct nsStyleImageOrientation { From b384a30e7dd8330f84d35c5632037f6d75d37052 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 043/135] Bug 1040668 part 11 - Move line leadings adjusting code into a separate function in nsLineLayout. r=dholbert --- layout/generic/nsLineLayout.cpp | 61 +++++++++++++++++++-------------- layout/generic/nsLineLayout.h | 3 ++ 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index fdb13d5a2e1..e99ab90009f 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -1676,6 +1676,40 @@ nsLineLayout::PlaceTopBottomFrames(PerSpanData* psd, } } +void +nsLineLayout::AdjustLeadings(nsIFrame* spanFrame, PerSpanData* psd, + bool* aZeroEffectiveSpanBox) +{ + MOZ_ASSERT(spanFrame == psd->mFrame->mFrame); + if (spanFrame->GetType() == nsGkAtoms::rubyFrame) { + // We may need to extend leadings here for ruby annotations as + // required by section Line Spacing in the CSS Ruby spec. + // See http://dev.w3.org/csswg/css-ruby/#line-height + auto rubyFrame = static_cast(spanFrame); + nscoord startLeading, endLeading; + rubyFrame->GetBlockLeadings(startLeading, endLeading); + nscoord deltaLeading = startLeading + endLeading - + (psd->mBStartLeading + psd->mBEndLeading); + if (deltaLeading > 0) { + // If the total leading is not wide enough for ruby annotations, + // extend the side which is not enough. If both sides are not + // wide enough, replace the leadings with the requested values. + if (startLeading < psd->mBStartLeading) { + psd->mBEndLeading += deltaLeading; + } else if (endLeading < psd->mBEndLeading) { + psd->mBStartLeading += deltaLeading; + } else { + psd->mBStartLeading = startLeading; + psd->mBEndLeading = endLeading; + } + psd->mLogicalBSize += deltaLeading; + // We have adjusted the leadings, it is no longer a zero + // effective span box. + *aZeroEffectiveSpanBox = false; + } + } +} + static float GetInflationForBlockDirAlignment(nsIFrame* aFrame, nscoord aInflationMinFontSize) @@ -1857,32 +1891,7 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd) psd->mBStartLeading = leading / 2; psd->mBEndLeading = leading - psd->mBStartLeading; psd->mLogicalBSize = logicalBSize; - if (spanFrame->GetType() == nsGkAtoms::rubyFrame) { - // We may need to extend leadings here for ruby annotations as - // required by section Line Spacing in the CSS Ruby spec. - // See http://dev.w3.org/csswg/css-ruby/#line-height - auto rubyFrame = static_cast(spanFrame); - nscoord startLeading, endLeading; - rubyFrame->GetBlockLeadings(startLeading, endLeading); - nscoord deltaLeading = startLeading + endLeading - leading; - if (deltaLeading > 0) { - // If the total leading is not wide enough for ruby annotations, - // extend the side which is not enough. If both sides are not - // wide enough, replace the leadings with the requested values. - if (startLeading < psd->mBStartLeading) { - psd->mBEndLeading += deltaLeading; - } else if (endLeading < psd->mBEndLeading) { - psd->mBStartLeading += deltaLeading; - } else { - psd->mBStartLeading = startLeading; - psd->mBEndLeading = endLeading; - } - psd->mLogicalBSize += deltaLeading; - // We have adjusted the leadings, it is no longer a zero - // effective span box. - zeroEffectiveSpanBox = false; - } - } + AdjustLeadings(spanFrame, psd, &zeroEffectiveSpanBox); if (zeroEffectiveSpanBox) { // When the span-box is to be ignored, zero out the initial diff --git a/layout/generic/nsLineLayout.h b/layout/generic/nsLineLayout.h index be488cc145f..12557ff3564 100644 --- a/layout/generic/nsLineLayout.h +++ b/layout/generic/nsLineLayout.h @@ -662,6 +662,9 @@ protected: void PlaceFrame(PerFrameData* pfd, nsHTMLReflowMetrics& aMetrics); + void AdjustLeadings(nsIFrame* spanFrame, PerSpanData* psd, + bool* aZeroEffectiveSpanBox); + void VerticalAlignFrames(PerSpanData* psd); void PlaceTopBottomFrames(PerSpanData* psd, From 512805b1911efe67e19826be85436584219b45cc Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 044/135] Bug 1040668 part 12 - Add line leadings for emphasis marks if necessary. r=dholbert --- layout/generic/nsLineLayout.cpp | 51 ++++++++++++++++++++++++++------- layout/generic/nsLineLayout.h | 2 ++ 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index e99ab90009f..f908f47e744 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -1678,9 +1678,13 @@ nsLineLayout::PlaceTopBottomFrames(PerSpanData* psd, void nsLineLayout::AdjustLeadings(nsIFrame* spanFrame, PerSpanData* psd, + const nsStyleText* aStyleText, + nsFontMetrics* aFontMetrics, bool* aZeroEffectiveSpanBox) { MOZ_ASSERT(spanFrame == psd->mFrame->mFrame); + nscoord requiredStartLeading = 0; + nscoord requiredEndLeading = 0; if (spanFrame->GetType() == nsGkAtoms::rubyFrame) { // We may need to extend leadings here for ruby annotations as // required by section Line Spacing in the CSS Ruby spec. @@ -1688,19 +1692,43 @@ nsLineLayout::AdjustLeadings(nsIFrame* spanFrame, PerSpanData* psd, auto rubyFrame = static_cast(spanFrame); nscoord startLeading, endLeading; rubyFrame->GetBlockLeadings(startLeading, endLeading); - nscoord deltaLeading = startLeading + endLeading - - (psd->mBStartLeading + psd->mBEndLeading); + requiredStartLeading += startLeading; + requiredEndLeading += endLeading; + } + if (aStyleText->HasTextEmphasis()) { + // Emphasis marks are symbols rendered using the same font settings + // as the element with its size scaled down to 50%, so we add half + // height of the font metrics to the specified side as leading. + nscoord halfHeight = aFontMetrics->MaxHeight() / 2; + LogicalSide side = aStyleText->TextEmphasisSide(mRootSpan->mWritingMode); + if (side == eLogicalSideBStart) { + requiredStartLeading += halfHeight; + } else { + MOZ_ASSERT(side == eLogicalSideBEnd, + "emphasis marks must be in block axis"); + requiredEndLeading += halfHeight; + } + } + + nscoord requiredLeading = requiredStartLeading + requiredEndLeading; + // If we do not require any additional leadings, don't touch anything + // here even if it is greater than the original leading, because the + // latter could be negative. + if (requiredLeading != 0) { + nscoord leading = psd->mBStartLeading + psd->mBEndLeading; + nscoord deltaLeading = requiredLeading - leading; if (deltaLeading > 0) { - // If the total leading is not wide enough for ruby annotations, - // extend the side which is not enough. If both sides are not - // wide enough, replace the leadings with the requested values. - if (startLeading < psd->mBStartLeading) { + // If the total leading is not wide enough for ruby annotations + // and/or emphasis marks, extend the side which is not enough. If + // both sides are not wide enough, replace the leadings with the + // requested values. + if (requiredStartLeading < psd->mBStartLeading) { psd->mBEndLeading += deltaLeading; - } else if (endLeading < psd->mBEndLeading) { + } else if (requiredEndLeading < psd->mBEndLeading) { psd->mBStartLeading += deltaLeading; } else { - psd->mBStartLeading = startLeading; - psd->mBEndLeading = endLeading; + psd->mBStartLeading = requiredStartLeading; + psd->mBEndLeading = requiredEndLeading; } psd->mLogicalBSize += deltaLeading; // We have adjusted the leadings, it is no longer a zero @@ -1881,9 +1909,10 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd) // Special-case for a ::first-letter frame, set the line height to // the frame block size if the user has left line-height == normal + const nsStyleText* styleText = spanFrame->StyleText(); if (spanFramePFD->mIsLetterFrame && !spanFrame->GetPrevInFlow() && - spanFrame->StyleText()->mLineHeight.GetUnit() == eStyleUnit_Normal) { + styleText->mLineHeight.GetUnit() == eStyleUnit_Normal) { logicalBSize = spanFramePFD->mBounds.BSize(lineWM); } @@ -1891,7 +1920,7 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd) psd->mBStartLeading = leading / 2; psd->mBEndLeading = leading - psd->mBStartLeading; psd->mLogicalBSize = logicalBSize; - AdjustLeadings(spanFrame, psd, &zeroEffectiveSpanBox); + AdjustLeadings(spanFrame, psd, styleText, fm, &zeroEffectiveSpanBox); if (zeroEffectiveSpanBox) { // When the span-box is to be ignored, zero out the initial diff --git a/layout/generic/nsLineLayout.h b/layout/generic/nsLineLayout.h index 12557ff3564..b5301d9634f 100644 --- a/layout/generic/nsLineLayout.h +++ b/layout/generic/nsLineLayout.h @@ -663,6 +663,8 @@ protected: nsHTMLReflowMetrics& aMetrics); void AdjustLeadings(nsIFrame* spanFrame, PerSpanData* psd, + const nsStyleText* aStyleText, + nsFontMetrics* aFontMetrics, bool* aZeroEffectiveSpanBox); void VerticalAlignFrames(PerSpanData* psd); From c338260f906c7d94cd1e7bd9aebd7f8cc60261f1 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 045/135] Bug 1040668 part 13 - Move first part of nsStyleFont::GetLanguage to nsPresContext::GetContentLanguage. r=dbaron --- layout/base/nsPresContext.cpp | 18 ++++++++++++++++++ layout/base/nsPresContext.h | 3 ++- layout/style/nsStyleStruct.cpp | 20 +++++++------------- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index de47980d41a..db352b3cda6 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -1521,6 +1521,24 @@ nsPresContext::GetDefaultFont(uint8_t aFontID, nsIAtom *aLanguage) const return font; } +already_AddRefed +nsPresContext::GetContentLanguage() const +{ + nsAutoString language; + Document()->GetContentLanguage(language); + language.StripWhitespace(); + + // Content-Language may be a comma-separated list of language codes, + // in which case the HTML5 spec says to treat it as unknown + if (!language.IsEmpty() && + !language.Contains(char16_t(','))) { + return do_GetAtom(language); + // NOTE: This does *not* count as an explicit language; in other + // words, it doesn't trigger language-specific hyphenation. + } + return nullptr; +} + void nsPresContext::SetFullZoom(float aZoom) { diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h index 3781b7a939e..9be8f6ee396 100644 --- a/layout/base/nsPresContext.h +++ b/layout/base/nsPresContext.h @@ -525,7 +525,8 @@ public: nsDeviceContext* DeviceContext() { return mDeviceContext; } mozilla::EventStateManager* EventStateManager() { return mEventManager; } - nsIAtom* GetLanguageFromCharset() { return mLanguage; } + nsIAtom* GetLanguageFromCharset() const { return mLanguage; } + already_AddRefed GetContentLanguage() const; float TextZoom() { return mTextZoom; } void SetTextZoom(float aZoom) { diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index fdc01d12a29..c3a5042f1ea 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -217,22 +217,16 @@ nsStyleFont::UnZoomText(nsPresContext *aPresContext, nscoord aSize) /* static */ already_AddRefed nsStyleFont::GetLanguage(nsPresContext* aPresContext) { - nsAutoString language; - aPresContext->Document()->GetContentLanguage(language); - language.StripWhitespace(); - - // Content-Language may be a comma-separated list of language codes, - // in which case the HTML5 spec says to treat it as unknown - if (!language.IsEmpty() && - !language.Contains(char16_t(','))) { - return do_GetAtom(language); - // NOTE: This does *not* count as an explicit language; in other - // words, it doesn't trigger language-specific hyphenation. - } else { + RefPtr language = aPresContext->GetContentLanguage(); + if (!language) { // we didn't find a (usable) Content-Language, so we fall back // to whatever the presContext guessed from the charset - return do_AddRef(aPresContext->GetLanguageFromCharset()); + // NOTE this should not be used elsewhere, because we want websites + // to use UTF-8 with proper language tag, instead of relying on + // deriving language from charset. See bug 1040668 comment 67. + language = aPresContext->GetLanguageFromCharset(); } + return language.forget(); } nsChangeHint nsStyleFont::CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2) From 40e248e9726c23600c85bcf219fdabf505183473 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 046/135] Bug 1040668 part 14 - Add helper function nsStyleUtil::MatchesLanguagePrefix for doing simple language matching. r=dbaron --- layout/generic/nsTextFrame.cpp | 8 +++----- layout/style/nsStyleUtil.h | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 32ba6c1a02b..8284f6031b8 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -21,7 +21,6 @@ #include "nsCOMPtr.h" #include "nsBlockFrame.h" -#include "nsCRT.h" #include "nsFontMetrics.h" #include "nsSplittableFrame.h" #include "nsLineLayout.h" @@ -52,6 +51,7 @@ #include "MathMLTextRunFactory.h" #include "nsExpirationTracker.h" #include "nsUnicodeProperties.h" +#include "nsStyleUtil.h" #include "nsTextFragment.h" #include "nsGkAtoms.h" @@ -2910,10 +2910,8 @@ static bool IsChineseOrJapanese(nsTextFrame* aFrame) if (!language) { return false; } - const char16_t *lang = language->GetUTF16String(); - return (!nsCRT::strncmp(lang, MOZ_UTF16("ja"), 2) || - !nsCRT::strncmp(lang, MOZ_UTF16("zh"), 2)) && - (language->GetLength() == 2 || lang[2] == '-'); + return nsStyleUtil::MatchesLanguagePrefix(language, MOZ_UTF16("ja")) || + nsStyleUtil::MatchesLanguagePrefix(language, MOZ_UTF16("zh")); } #ifdef DEBUG diff --git a/layout/style/nsStyleUtil.h b/layout/style/nsStyleUtil.h index 4199ed96016..196563a554f 100644 --- a/layout/style/nsStyleUtil.h +++ b/layout/style/nsStyleUtil.h @@ -11,6 +11,7 @@ #include "nsTArrayForwardDeclare.h" #include "gfxFontFamilyList.h" #include "nsStyleStruct.h" +#include "nsCRT.h" class nsCSSValue; class nsStringComparator; @@ -175,6 +176,29 @@ public: const nsSubstring& aStyleText, nsresult* aRv); + template + static bool MatchesLanguagePrefix(const char16_t* aLang, size_t aLen, + const char16_t (&aPrefix)[N]) + { + return !nsCRT::strncmp(aLang, aPrefix, N - 1) && + (aLen == N - 1 || aLang[N - 1] == '-'); + } + + template + static bool MatchesLanguagePrefix(const nsIAtom* aLang, + const char16_t (&aPrefix)[N]) + { + MOZ_ASSERT(aLang); + return MatchesLanguagePrefix(aLang->GetUTF16String(), + aLang->GetLength(), aPrefix); + } + + template + static bool MatchesLanguagePrefix(const nsAString& aLang, + const char16_t (&aPrefix)[N]) + { + return MatchesLanguagePrefix(aLang.Data(), aLang.Length(), aPrefix); + } }; From d1542e1ce3b0a3c6e9ad14627761e851ef361b44 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 047/135] Bug 1040668 part 15 - Make the default value of text-emphasis-position aware of the language. r=dbaron --- dom/html/nsGenericHTMLElement.cpp | 29 +++++++++++++++++++++++------ layout/style/nsStyleConsts.h | 6 ++++++ layout/style/nsStyleStruct.cpp | 7 +++++-- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/dom/html/nsGenericHTMLElement.cpp b/dom/html/nsGenericHTMLElement.cpp index 6f795fb5376..f46c9c494e6 100644 --- a/dom/html/nsGenericHTMLElement.cpp +++ b/dom/html/nsGenericHTMLElement.cpp @@ -52,6 +52,7 @@ #include "nsRuleData.h" #include "nsIPrincipal.h" #include "nsContainerFrame.h" +#include "nsStyleUtil.h" #include "nsPresState.h" #include "nsILayoutHistoryState.h" @@ -1326,12 +1327,28 @@ nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(const nsMappedAttribut } } - if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) { - nsCSSValue* lang = aData->ValueForLang(); - if (lang->GetUnit() == eCSSUnit_Null) { - const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::lang); - if (value && value->Type() == nsAttrValue::eString) { - lang->SetStringValue(value->GetStringValue(), eCSSUnit_Ident); + const nsAttrValue* langValue = aAttributes->GetAttr(nsGkAtoms::lang); + if (langValue && langValue->Type() == nsAttrValue::eString) { + if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) { + nsCSSValue* lang = aData->ValueForLang(); + if (lang->GetUnit() == eCSSUnit_Null) { + lang->SetStringValue(langValue->GetStringValue(), eCSSUnit_Ident); + } + } + if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Text)) { + nsCSSValue* emphasisPos = aData->ValueForTextEmphasisPosition(); + if (emphasisPos->GetUnit() == eCSSUnit_Null) { + const nsAString& lang = langValue->GetStringValue(); + if (nsStyleUtil::MatchesLanguagePrefix(lang, MOZ_UTF16("zh"))) { + emphasisPos->SetIntValue(NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT_ZH, + eCSSUnit_Enumerated); + } else if (nsStyleUtil::MatchesLanguagePrefix(lang, MOZ_UTF16("ja")) || + nsStyleUtil::MatchesLanguagePrefix(lang, MOZ_UTF16("mn"))) { + // This branch is currently no part of the spec. + // See bug 1040668 comment 69 and comment 75. + emphasisPos->SetIntValue(NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT, + eCSSUnit_Enumerated); + } } } } diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index 93c78965daf..d7fe96244d4 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -1073,6 +1073,12 @@ enum class FillMode : uint32_t; #define NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER (1 << 1) #define NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT (1 << 2) #define NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT (1 << 3) +#define NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT \ + (NS_STYLE_TEXT_EMPHASIS_POSITION_OVER | \ + NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT) +#define NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT_ZH \ + (NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER | \ + NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT) // text-emphasis-style // Note that filled and none here both have zero as their value. This is diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index c3a5042f1ea..12b33a86425 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -3611,8 +3611,11 @@ nsStyleText::nsStyleText(nsPresContext* aPresContext) mTextSizeAdjust = NS_STYLE_TEXT_SIZE_ADJUST_AUTO; mTextCombineUpright = NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE; mTextEmphasisStyle = NS_STYLE_TEXT_EMPHASIS_STYLE_NONE; - mTextEmphasisPosition = NS_STYLE_TEXT_EMPHASIS_POSITION_OVER | - NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT; + nsCOMPtr language = aPresContext->GetContentLanguage(); + mTextEmphasisPosition = language && + nsStyleUtil::MatchesLanguagePrefix(language, MOZ_UTF16("zh")) ? + NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT_ZH : + NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT; mTextEmphasisColor = aPresContext->DefaultColor(); mControlCharacterVisibility = nsCSSParser::ControlCharVisibilityDefault(); From 4272cacc553468f23319881dc399e7f26e82b46b Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 28 Nov 2015 11:56:33 +1100 Subject: [PATCH 048/135] Bug 1040668 part 16 - Add reftests for text-emphasis. r=dbaron --- .../submitted/text-decor-3/reftest.list | 109 +++++++++++- ...e-text-emphasis-position-property-tests.py | 79 ++++++++ ...-text-emphasis-style-property-010-tests.sh | 81 +++++++++ ...rate-text-emphasis-style-property-tests.py | 85 +++++++++ .../text-emphasis-color-property-001-ref.html | 8 + .../text-emphasis-color-property-001.html | 10 ++ .../text-emphasis-color-property-001a.html | 10 ++ .../text-emphasis-color-property-001b.html | 10 ++ .../text-emphasis-color-property-002-ref.html | 8 + .../text-emphasis-color-property-002.html | 10 ++ ...xt-emphasis-position-property-001-ref.html | 8 + .../text-emphasis-position-property-001.html | 10 ++ .../text-emphasis-position-property-001a.html | 10 ++ .../text-emphasis-position-property-001b.html | 10 ++ .../text-emphasis-position-property-001c.html | 10 ++ ...xt-emphasis-position-property-002-ref.html | 8 + .../text-emphasis-position-property-002.html | 10 ++ .../text-emphasis-position-property-002a.html | 10 ++ .../text-emphasis-position-property-002b.html | 10 ++ .../text-emphasis-position-property-002c.html | 10 ++ ...xt-emphasis-position-property-003-ref.html | 8 + .../text-emphasis-position-property-003.html | 10 ++ .../text-emphasis-position-property-003a.html | 10 ++ .../text-emphasis-position-property-003b.html | 10 ++ .../text-emphasis-position-property-003c.html | 10 ++ .../text-emphasis-position-property-003d.html | 10 ++ .../text-emphasis-position-property-003e.html | 10 ++ .../text-emphasis-position-property-003f.html | 10 ++ .../text-emphasis-position-property-003g.html | 10 ++ ...xt-emphasis-position-property-004-ref.html | 8 + .../text-emphasis-position-property-004.html | 10 ++ .../text-emphasis-position-property-004a.html | 10 ++ .../text-emphasis-position-property-004b.html | 10 ++ .../text-emphasis-position-property-004c.html | 10 ++ .../text-emphasis-position-property-004d.html | 10 ++ .../text-emphasis-position-property-004e.html | 10 ++ .../text-emphasis-position-property-004f.html | 10 ++ .../text-emphasis-position-property-004g.html | 10 ++ ...xt-emphasis-position-property-005-ref.html | 8 + .../text-emphasis-position-property-005.html | 10 ++ .../text-emphasis-position-property-005a.html | 10 ++ .../text-emphasis-position-property-005b.html | 10 ++ .../text-emphasis-position-property-005c.html | 10 ++ .../text-emphasis-position-property-005d.html | 10 ++ .../text-emphasis-position-property-005e.html | 10 ++ .../text-emphasis-position-property-005f.html | 10 ++ .../text-emphasis-position-property-005g.html | 10 ++ ...xt-emphasis-position-property-006-ref.html | 8 + .../text-emphasis-position-property-006.html | 10 ++ .../text-emphasis-position-property-006a.html | 10 ++ .../text-emphasis-position-property-006b.html | 10 ++ .../text-emphasis-position-property-006c.html | 10 ++ .../text-emphasis-position-property-006d.html | 10 ++ .../text-emphasis-position-property-006e.html | 10 ++ .../text-emphasis-position-property-006f.html | 10 ++ .../text-emphasis-position-property-006g.html | 10 ++ .../text-emphasis-property-001.html | 10 ++ .../text-emphasis-property-002.html | 10 ++ .../text-emphasis-property-003.html | 10 ++ .../text-emphasis-property-003a.html | 10 ++ .../text-emphasis-property-003b.html | 10 ++ .../text-emphasis-property-004.html | 10 ++ .../text-emphasis-property-004a.html | 10 ++ .../text-emphasis-style-property-001-ref.html | 7 + .../text-emphasis-style-property-001.html | 10 ++ .../text-emphasis-style-property-002-ref.html | 8 + .../text-emphasis-style-property-002.html | 10 ++ .../text-emphasis-style-property-003-ref.html | 8 + .../text-emphasis-style-property-003.html | 10 ++ .../text-emphasis-style-property-004-ref.html | 8 + .../text-emphasis-style-property-004.html | 10 ++ .../text-emphasis-style-property-005-ref.html | 8 + .../text-emphasis-style-property-005.html | 10 ++ .../text-emphasis-style-property-005a.html | 10 ++ .../text-emphasis-style-property-010-ref.html | 7 + .../text-emphasis-style-property-010Cc.html | 83 +++++++++ .../text-emphasis-style-property-010Cf.html | 168 ++++++++++++++++++ .../text-emphasis-style-property-010Cn.html | 26 +++ .../text-emphasis-style-property-010Zl.html | 19 ++ .../text-emphasis-style-property-010Zp.html | 19 ++ .../text-emphasis-style-property-010Zs.html | 35 ++++ .../text-emphasis-style-property-011-ref.html | 8 + .../text-emphasis-style-property-011.html | 10 ++ .../text-emphasis-style-property-011a.html | 10 ++ .../text-emphasis-style-property-011b.html | 10 ++ .../text-emphasis-style-property-012-ref.html | 8 + .../text-emphasis-style-property-012.html | 10 ++ .../text-emphasis-style-property-012a.html | 10 ++ .../text-emphasis-style-property-012b.html | 10 ++ .../text-emphasis-style-property-012c.html | 10 ++ .../text-emphasis-style-property-013-ref.html | 8 + .../text-emphasis-style-property-013.html | 10 ++ .../text-emphasis-style-property-013a.html | 10 ++ .../text-emphasis-style-property-013b.html | 10 ++ .../text-emphasis-style-property-014-ref.html | 8 + .../text-emphasis-style-property-014.html | 10 ++ .../text-emphasis-style-property-014a.html | 10 ++ .../text-emphasis-style-property-014b.html | 10 ++ .../text-emphasis-style-property-015-ref.html | 8 + .../text-emphasis-style-property-015.html | 10 ++ .../text-emphasis-style-property-015a.html | 10 ++ .../text-emphasis-style-property-015b.html | 10 ++ .../text-emphasis-style-property-016-ref.html | 8 + .../text-emphasis-style-property-016.html | 10 ++ .../text-emphasis-style-property-016a.html | 10 ++ .../text-emphasis-style-property-017-ref.html | 8 + .../text-emphasis-style-property-017.html | 10 ++ .../text-emphasis-style-property-017a.html | 10 ++ .../text-emphasis-style-property-017b.html | 10 ++ .../text-emphasis-style-property-018-ref.html | 8 + .../text-emphasis-style-property-018.html | 10 ++ .../text-emphasis-style-property-018a.html | 10 ++ .../text-emphasis-style-property-019-ref.html | 8 + .../text-emphasis-style-property-019.html | 10 ++ .../text-emphasis-style-property-019a.html | 10 ++ .../text-emphasis-style-property-020-ref.html | 8 + .../text-emphasis-style-property-020.html | 10 ++ .../text-emphasis-style-property-020a.html | 10 ++ 118 files changed, 1733 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-position-property-tests.py create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-010-tests.sh create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-tests.py create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003d.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003e.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003f.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003g.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004d.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004e.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004f.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004g.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005d.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005e.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005f.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005g.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006d.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006e.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006f.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006g.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-001.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-002.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cc.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cf.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cn.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zl.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zp.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zs.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012c.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017b.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019a.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020-ref.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020.html create mode 100644 layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020a.html diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list b/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list index 5218255fbc4..7adf19939bb 100644 --- a/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list +++ b/layout/reftests/w3c-css/submitted/text-decor-3/reftest.list @@ -1,2 +1,109 @@ -pref(layout.css.ruby.enabled,true) == ruby-text-decoration-01.html ruby-text-decoration-01-ref.html +default-preferences pref(layout.css.ruby.enabled,true) +default-preferences pref(layout.css.vertical-text.enabled,true) +default-preferences pref(layout.css.text-emphasis.enabled,true) + +== ruby-text-decoration-01.html ruby-text-decoration-01-ref.html == text-decoration-propagation-01.html text-decoration-propagation-01-ref.html + +# text-emphasis-style +== text-emphasis-style-property-001.html text-emphasis-style-property-001-ref.html +== text-emphasis-style-property-002.html text-emphasis-style-property-002-ref.html +== text-emphasis-style-property-003.html text-emphasis-style-property-003-ref.html +== text-emphasis-style-property-004.html text-emphasis-style-property-004-ref.html +== text-emphasis-style-property-005.html text-emphasis-style-property-005-ref.html +== text-emphasis-style-property-005a.html text-emphasis-style-property-005-ref.html +# START tests from support/generate-text-emphasis-style-property-010-tests.sh +== text-emphasis-style-property-010Zs.html text-emphasis-style-property-010-ref.html +== text-emphasis-style-property-010Zl.html text-emphasis-style-property-010-ref.html +== text-emphasis-style-property-010Zp.html text-emphasis-style-property-010-ref.html +== text-emphasis-style-property-010Cc.html text-emphasis-style-property-010-ref.html +== text-emphasis-style-property-010Cf.html text-emphasis-style-property-010-ref.html +# END tests from support/generate-text-emphasis-style-property-010-tests.sh +== text-emphasis-style-property-010Cn.html text-emphasis-style-property-010-ref.html +# START tests from support/generate-text-emphasis-style-property-tests.py +== text-emphasis-style-property-011.html text-emphasis-style-property-011-ref.html +== text-emphasis-style-property-011a.html text-emphasis-style-property-011-ref.html +== text-emphasis-style-property-011b.html text-emphasis-style-property-011-ref.html +== text-emphasis-style-property-012.html text-emphasis-style-property-012-ref.html +== text-emphasis-style-property-012a.html text-emphasis-style-property-012-ref.html +== text-emphasis-style-property-012b.html text-emphasis-style-property-012-ref.html +== text-emphasis-style-property-012c.html text-emphasis-style-property-012-ref.html +== text-emphasis-style-property-013.html text-emphasis-style-property-013-ref.html +== text-emphasis-style-property-013a.html text-emphasis-style-property-013-ref.html +== text-emphasis-style-property-013b.html text-emphasis-style-property-013-ref.html +== text-emphasis-style-property-014.html text-emphasis-style-property-014-ref.html +== text-emphasis-style-property-014a.html text-emphasis-style-property-014-ref.html +== text-emphasis-style-property-014b.html text-emphasis-style-property-014-ref.html +== text-emphasis-style-property-015.html text-emphasis-style-property-015-ref.html +== text-emphasis-style-property-015a.html text-emphasis-style-property-015-ref.html +== text-emphasis-style-property-015b.html text-emphasis-style-property-015-ref.html +== text-emphasis-style-property-016.html text-emphasis-style-property-016-ref.html +== text-emphasis-style-property-016a.html text-emphasis-style-property-016-ref.html +== text-emphasis-style-property-017.html text-emphasis-style-property-017-ref.html +== text-emphasis-style-property-017a.html text-emphasis-style-property-017-ref.html +== text-emphasis-style-property-017b.html text-emphasis-style-property-017-ref.html +== text-emphasis-style-property-018.html text-emphasis-style-property-018-ref.html +== text-emphasis-style-property-018a.html text-emphasis-style-property-018-ref.html +== text-emphasis-style-property-019.html text-emphasis-style-property-019-ref.html +== text-emphasis-style-property-019a.html text-emphasis-style-property-019-ref.html +== text-emphasis-style-property-020.html text-emphasis-style-property-020-ref.html +== text-emphasis-style-property-020a.html text-emphasis-style-property-020-ref.html +# END tests from support/generate-text-emphasis-style-property-tests.py + +# text-emphasis-color +== text-emphasis-color-property-001.html text-emphasis-color-property-001-ref.html +== text-emphasis-color-property-001a.html text-emphasis-color-property-001-ref.html +== text-emphasis-color-property-002.html text-emphasis-color-property-002-ref.html + +# text-emphasis +== text-emphasis-property-001.html text-emphasis-style-property-001-ref.html +== text-emphasis-property-002.html text-emphasis-style-property-002-ref.html +== text-emphasis-property-003.html text-emphasis-style-property-012-ref.html +== text-emphasis-property-003a.html text-emphasis-style-property-012-ref.html +== text-emphasis-property-003b.html text-emphasis-style-property-012-ref.html +== text-emphasis-property-004.html text-emphasis-color-property-002-ref.html +== text-emphasis-property-004a.html text-emphasis-color-property-002-ref.html + +# text-emphasis-position +# START tests from support/generate-text-emphasis-position-property-tests.py +== text-emphasis-position-property-001.html text-emphasis-position-property-001-ref.html +== text-emphasis-position-property-001a.html text-emphasis-position-property-001-ref.html +== text-emphasis-position-property-001b.html text-emphasis-position-property-001-ref.html +== text-emphasis-position-property-001c.html text-emphasis-position-property-001-ref.html +== text-emphasis-position-property-002.html text-emphasis-position-property-002-ref.html +== text-emphasis-position-property-002a.html text-emphasis-position-property-002-ref.html +== text-emphasis-position-property-002b.html text-emphasis-position-property-002-ref.html +== text-emphasis-position-property-002c.html text-emphasis-position-property-002-ref.html +== text-emphasis-position-property-003.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003a.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003b.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003c.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003d.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003e.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003f.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-003g.html text-emphasis-position-property-003-ref.html +== text-emphasis-position-property-004.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004a.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004b.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004c.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004d.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004e.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004f.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-004g.html text-emphasis-position-property-004-ref.html +== text-emphasis-position-property-005.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005a.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005b.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005c.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005d.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005e.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005f.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-005g.html text-emphasis-position-property-005-ref.html +== text-emphasis-position-property-006.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006a.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006b.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006c.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006d.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006e.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006f.html text-emphasis-position-property-006-ref.html +== text-emphasis-position-property-006g.html text-emphasis-position-property-006-ref.html +# END tests from support/generate-text-emphasis-position-property-tests.py diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-position-property-tests.py b/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-position-property-tests.py new file mode 100644 index 00000000000..94701b57f2c --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-position-property-tests.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python +# - * - coding: UTF-8 - * - + +""" +This script generates tests text-emphasis-position-property-001 ~ 006 +which cover all possible values of text-emphasis-position property with +all combination of three main writing modes and two orientations. Only +test files are generated by this script. It also outputs a list of all +tests it generated in the format of Mozilla reftest.list to the stdout. +""" + +from __future__ import unicode_literals + +import itertools + +TEST_FILE = 'text-emphasis-position-property-{:03}{}.html' +REF_FILE = 'text-emphasis-position-property-{:03}-ref.html' +TEST_TEMPLATE = ''' + +CSS Test: text-emphasis-position: {value}, {title} + + + + + +

Pass if the emphasis marks are {position} the text below:

+
試験テスト
+''' + +SUFFIXES = ['', 'a', 'b', 'c', 'd', 'e', 'f', 'g'] + +WRITING_MODES = ["horizontal-tb", "vertical-rl", "vertical-lr"] +POSITION_HORIZONTAL = ["over", "under"] +POSITION_VERTICAL = ["right", "left"] + +REF_MAP_MIXED = { "over": 1, "under": 2, "right": 3, "left": 4 } +REF_MAP_SIDEWAYS = { "right": 5, "left": 6 } +POSITION_TEXT = { "over": "over", "under": "under", + "right": "to the right of", "left": "to the left of" } + +suffixes = [iter(SUFFIXES) for i in range(6)] + +reftest_items = [] + +def write_file(filename, content): + with open(filename, 'wb') as f: + f.write(content.encode('UTF-8')) + +def write_test_file(idx, suffix, wm, orient, value, position): + filename = TEST_FILE.format(idx, suffix) + write_file(filename, TEST_TEMPLATE.format( + value=value, wm=wm, orient=orient, index=idx, position=position, + title=(wm if orient == "mixed" else "{}, {}".format(wm, orient)))) + reftest_items.append("== {} {}".format(filename, REF_FILE.format(idx))) + +def write_test_files(wm, orient, pos1, pos2): + idx = (REF_MAP_MIXED if orient == "mixed" else REF_MAP_SIDEWAYS)[pos1] + position = POSITION_TEXT[pos1] + suffix = suffixes[idx - 1] + write_test_file(idx, next(suffix), wm, orient, pos1 + " " + pos2, position) + write_test_file(idx, next(suffix), wm, orient, pos2 + " " + pos1, position) + +for wm in WRITING_MODES: + if wm == "horizontal-tb": + effective_pos = POSITION_HORIZONTAL + ineffective_pos = POSITION_VERTICAL + else: + effective_pos = POSITION_VERTICAL + ineffective_pos = POSITION_HORIZONTAL + for pos1, pos2 in itertools.product(effective_pos, ineffective_pos): + write_test_files(wm, "mixed", pos1, pos2) + if wm != "horizontal-tb": + write_test_files(wm, "sideways", pos1, pos2) + +print("# START tests from {}".format(__file__)) +reftest_items.sort() +for item in reftest_items: + print(item) +print("# END tests from {}".format(__file__)) diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-010-tests.sh b/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-010-tests.sh new file mode 100644 index 00000000000..3e5667429d1 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-010-tests.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +# This script generates tests text-emphasis-style-property-010* except +# 010Cn. The tests generated cover all characters listed in the unicode +# data file which should not have emphasis mark specified in the spec. +# This script downloads UnicodeData.txt from the website of the Unicode +# Consortium and extract the characters form that file. It requires +# python (either 2.5+ or 3.x), awk, and wget to work. Only test files +# are generated by this script. It also outputs a list of all tests it +# generated in the format of Mozilla reftest.list to the stdout. Other +# information has been redirected to the stderr. + +UNICODE_DATA_FILE='UnicodeData.txt' +UNICODE_DATA_URL="http://www.unicode.org/Public/8.0.0/ucd/$UNICODE_DATA_FILE" +UNICODE_DATA_DIGEST='38b17e1118206489a7e0ab5d29d7932212d38838df7d3ec025ecb58e8798ec20' + +TEST_FILE='text-emphasis-style-property-010%s.html' +REF_FILE='text-emphasis-style-property-010-ref.html' + +digest_file() { + python -c "import hashlib; +print(hashlib.sha256(open('$1', 'rb').read()).hexdigest())" +} + +check_file() { + [[ -f "$UNICODE_DATA_FILE" ]] || return 1 + digest=`digest_file "$UNICODE_DATA_FILE"` + [[ "$digest" == "$UNICODE_DATA_DIGEST" ]] || return 2 +} + +download_data() { + check_file + if [[ $? -eq 2 ]]; then + echo "Removing incorrect data file..." >&2 + rm "$UNICODE_DATA_FILE" + fi + wget -nc -O"$UNICODE_DATA_FILE" "$UNICODE_DATA_URL" >&2 + + check_file + if [[ $? -ne 0 ]]; then + echo "Failed to get the correct unicode data file!" >&2 + exit 1 + fi +} + +list_codepoints() { + awk -F';' "\$3 == \"$1\" { print \" 0x\"\$1\",\" }" "$UNICODE_DATA_FILE" +} + +write_test_file() { + filename=`printf "$TEST_FILE" $1` + echo "== $filename $REF_FILE" + cat < $filename + + +CSS Test: text-emphasis, $1 + + + + + +

Pass if there is nothing rendered below:

+
+ +
+EOF +} + +download_data +echo "# START tests from $0" +for c in Zs Zl Zp Cc Cf; do + write_test_file "$c" +done +echo "# END tests from $0" diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-tests.py b/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-tests.py new file mode 100644 index 00000000000..eb14e83bc57 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/support/generate-text-emphasis-style-property-tests.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python +# - * - coding: UTF-8 - * - + +""" +This script generates tests text-emphasis-style-property-011 ~ 020 which +cover all possible values of text-emphasis-style property, except none +and , with horizontal writing mode. It outputs a list of all +tests it generated in the format of Mozilla reftest.list to the stdout. +""" + +from __future__ import unicode_literals + +TEST_FILE = 'text-emphasis-style-property-{:03}{}.html' +TEST_TEMPLATE = ''' + +CSS Test: text-emphasis-style: {title} + + + + + +

Pass if there is a '{char}' above every character below:

+
試験テスト
+''' + +REF_FILE = 'text-emphasis-style-property-{:03}-ref.html' +REF_TEMPLATE = ''' + +CSS Reference: text-emphasis-style: {0} + + + +

Pass if there is a '{1}' above every character below:

+
{1}{1}{1}{1}{1}
+''' + +DATA_SET = [ + ('dot', 0x2022, 0x25e6), + ('circle', 0x25cf, 0x25cb), + ('double-circle', 0x25c9, 0x25ce), + ('triangle', 0x25b2, 0x25b3), + ('sesame', 0xfe45, 0xfe46), + ] + +SUFFIXES = ['', 'a', 'b', 'c', 'd', 'e'] + +def get_html_entity(code): + return '&#x{:04X};'.format(code) + +def write_file(filename, content): + with open(filename, 'wb') as f: + f.write(content.encode('UTF-8')) + +def write_test_file(idx, suffix, style, code, name=None): + if not name: + name = style + filename = TEST_FILE.format(idx, suffix) + write_file(filename, TEST_TEMPLATE.format(index=idx, value=style, + char=get_html_entity(code), + code='U+{:04X}'.format(code), + title=name)) + print("== {} {}".format(filename, REF_FILE.format(idx))) + +idx = 10 +def write_files(style, code): + global idx + idx += 1 + fill, shape = style + basic_style = "{} {}".format(fill, shape) + write_file(REF_FILE.format(idx), + REF_TEMPLATE.format(basic_style, get_html_entity(code))) + suffix = iter(SUFFIXES) + write_test_file(idx, next(suffix), basic_style, code) + write_test_file(idx, next(suffix), "{} {}".format(shape, fill), code) + if fill == 'filled': + write_test_file(idx, next(suffix), shape, code) + if shape == 'circle': + write_test_file(idx, next(suffix), fill, code, fill + ', horizontal') + +print("# START tests from {}".format(__file__)) +for name, code, _ in DATA_SET: + write_files(('filled', name), code) +for name, _, code in DATA_SET: + write_files(('open', name), code) +print("# END tests from {}".format(__file__)) diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001-ref.html new file mode 100644 index 00000000000..00c87eeb062 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-color: currentColor + + + +

Pass if there is a green '●' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001.html new file mode 100644 index 00000000000..2d4676ad709 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-color: untouched + + + + + +

Pass if there is a green '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001a.html new file mode 100644 index 00000000000..34c817e6815 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-color: initial + + + + + +

Pass if there is a green '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001b.html new file mode 100644 index 00000000000..0acb0f76829 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-001b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-color: initial from text-emphasis + + + + + +

Pass if there is a green '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002-ref.html new file mode 100644 index 00000000000..2bcc1d6b9be --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-color: green + + + +

Pass if there is a green '●' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002.html new file mode 100644 index 00000000000..a215267eb5b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-color-property-002.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-color: green + + + + + +

Pass if there is a green '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001-ref.html new file mode 100644 index 00000000000..a401c67beb1 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-position: over + + + +

Pass if the emphasis marks are over the text below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001.html new file mode 100644 index 00000000000..feef0532c73 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over right, horizontal-tb + + + + + +

Pass if the emphasis marks are over the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001a.html new file mode 100644 index 00000000000..731a04e119a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right over, horizontal-tb + + + + + +

Pass if the emphasis marks are over the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001b.html new file mode 100644 index 00000000000..36b8e455ee9 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over left, horizontal-tb + + + + + +

Pass if the emphasis marks are over the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001c.html new file mode 100644 index 00000000000..81cf7fd7cbd --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-001c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left over, horizontal-tb + + + + + +

Pass if the emphasis marks are over the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002-ref.html new file mode 100644 index 00000000000..46659494783 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-position: under + + + +

Pass if the emphasis marks are under the text below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002.html new file mode 100644 index 00000000000..034a41ac80b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under right, horizontal-tb + + + + + +

Pass if the emphasis marks are under the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002a.html new file mode 100644 index 00000000000..4aae003b7a2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right under, horizontal-tb + + + + + +

Pass if the emphasis marks are under the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002b.html new file mode 100644 index 00000000000..3ae17dcabf5 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under left, horizontal-tb + + + + + +

Pass if the emphasis marks are under the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002c.html new file mode 100644 index 00000000000..e67fce56653 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-002c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left under, horizontal-tb + + + + + +

Pass if the emphasis marks are under the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003-ref.html new file mode 100644 index 00000000000..770fa1e8f5b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-position: right + + + +

Pass if the emphasis marks are to the right of the text below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003.html new file mode 100644 index 00000000000..b8fcd3d8dc7 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right over, vertical-rl + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003a.html new file mode 100644 index 00000000000..ded96690c20 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over right, vertical-rl + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003b.html new file mode 100644 index 00000000000..25e69eb1dae --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right under, vertical-rl + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003c.html new file mode 100644 index 00000000000..0cf05a3d4da --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under right, vertical-rl + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003d.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003d.html new file mode 100644 index 00000000000..64872191927 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003d.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right over, vertical-lr + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003e.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003e.html new file mode 100644 index 00000000000..b2dc58b2dc2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003e.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over right, vertical-lr + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003f.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003f.html new file mode 100644 index 00000000000..ad2613bda9a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003f.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right under, vertical-lr + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003g.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003g.html new file mode 100644 index 00000000000..c2cc3d6a886 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-003g.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under right, vertical-lr + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004-ref.html new file mode 100644 index 00000000000..1e56f5877a9 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-position: left + + + +

Pass if the emphasis marks are to the left of the text below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004.html new file mode 100644 index 00000000000..10a42ce812b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left over, vertical-rl + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004a.html new file mode 100644 index 00000000000..e1fc0a7275f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over left, vertical-rl + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004b.html new file mode 100644 index 00000000000..2deb2e66afa --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left under, vertical-rl + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004c.html new file mode 100644 index 00000000000..45b14882d7b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under left, vertical-rl + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004d.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004d.html new file mode 100644 index 00000000000..2c0dd023415 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004d.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left over, vertical-lr + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004e.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004e.html new file mode 100644 index 00000000000..4b17e87c928 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004e.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over left, vertical-lr + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004f.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004f.html new file mode 100644 index 00000000000..1e7b48b56fc --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004f.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left under, vertical-lr + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004g.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004g.html new file mode 100644 index 00000000000..02860e4fbd1 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-004g.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under left, vertical-lr + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005-ref.html new file mode 100644 index 00000000000..7427dec9d0a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-position: right, sideways + + + +

Pass if the emphasis marks are to the right of the text below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005.html new file mode 100644 index 00000000000..2eaca9cf002 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right over, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005a.html new file mode 100644 index 00000000000..1061e936fff --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over right, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005b.html new file mode 100644 index 00000000000..f535eb2bc3e --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right under, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005c.html new file mode 100644 index 00000000000..1118047118f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under right, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005d.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005d.html new file mode 100644 index 00000000000..390446cdf95 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005d.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right over, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005e.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005e.html new file mode 100644 index 00000000000..6f65274d0c9 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005e.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over right, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005f.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005f.html new file mode 100644 index 00000000000..ecec98122cd --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005f.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: right under, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005g.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005g.html new file mode 100644 index 00000000000..81b220bffb9 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-005g.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under right, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the right of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006-ref.html new file mode 100644 index 00000000000..85af6c250e2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-position: left, sideways + + + +

Pass if the emphasis marks are to the left of the text below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006.html new file mode 100644 index 00000000000..8933513b74d --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left over, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006a.html new file mode 100644 index 00000000000..5aa8067f5f6 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over left, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006b.html new file mode 100644 index 00000000000..6d98ea15f25 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left under, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006c.html new file mode 100644 index 00000000000..1d1acd964d0 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under left, vertical-rl, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006d.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006d.html new file mode 100644 index 00000000000..575f07d5f73 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006d.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left over, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006e.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006e.html new file mode 100644 index 00000000000..d03a66cc285 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006e.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: over left, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006f.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006f.html new file mode 100644 index 00000000000..955a5e21212 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006f.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: left under, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006g.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006g.html new file mode 100644 index 00000000000..9f21cc5c9c6 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-position-property-006g.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-position: under left, vertical-lr, sideways + + + + + +

Pass if the emphasis marks are to the left of the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-001.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-001.html new file mode 100644 index 00000000000..ed5635bbce2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-001.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: none + + + + + +

Pass if there is NO emphasis marks above the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-002.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-002.html new file mode 100644 index 00000000000..6e8050a87e6 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-002.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: string + + + + + +

Pass if there is a '^' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003.html new file mode 100644 index 00000000000..fc35010e3ab --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: circle + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003a.html new file mode 100644 index 00000000000..e70518b0624 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: filled + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003b.html new file mode 100644 index 00000000000..79e66bc93a2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-003b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: filled circle + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004.html new file mode 100644 index 00000000000..15d2ab001cc --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: circle green + + + + + +

Pass if there is a green '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004a.html new file mode 100644 index 00000000000..6d0d80d2941 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-property-004a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis: green circle + + + + + +

Pass if there is a green '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001-ref.html new file mode 100644 index 00000000000..60f8fa7b95c --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001-ref.html @@ -0,0 +1,7 @@ + + +CSS Reference: text-emphasis-style: none + + +

Pass if there is NO emphasis marks above the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001.html new file mode 100644 index 00000000000..5073a3e5d04 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-001.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: none + + + + + +

Pass if there is NO emphasis marks above the text below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002-ref.html new file mode 100644 index 00000000000..e9cf74415ce --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: string + + + +

Pass if there is a '^' above every character below:

+
^^^^^
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002.html new file mode 100644 index 00000000000..6860a00362f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-002.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: string + + + + + +

Pass if there is a '^' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003-ref.html new file mode 100644 index 00000000000..d9c29d7499e --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: filled sesame, vertical + + + +

Pass if there is a '﹅' to the right of every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003.html new file mode 100644 index 00000000000..b2af7448f1d --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-003.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled, vertical + + + + + +

Pass if there is a '﹅' to the right of every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004-ref.html new file mode 100644 index 00000000000..a1065f4193f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: open sesame, vertical + + + +

Pass if there is a '﹆' to the right of every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004.html new file mode 100644 index 00000000000..60c718653a2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-004.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open, vertical + + + + + +

Pass if there is a '﹆' to the right of every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005-ref.html new file mode 100644 index 00000000000..b6549026703 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style, vertical + + + +

Pass if the emphasis marks 'V' are upright:

+
VVVVV
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005.html new file mode 100644 index 00000000000..29be3abda07 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style, vertical-rl + + + + + +

Pass if the emphasis marks 'V' are upright:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005a.html new file mode 100644 index 00000000000..af0ad4e0aa7 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-005a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style, vertical-lr + + + + + +

Pass if the emphasis marks 'V' are upright:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010-ref.html new file mode 100644 index 00000000000..93028d6e7c9 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010-ref.html @@ -0,0 +1,7 @@ + + +CSS Test: text-emphasis on characters without emphasis mark + + +

Pass if there is nothing rendered below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cc.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cc.html new file mode 100644 index 00000000000..78ded1ca286 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cc.html @@ -0,0 +1,83 @@ + + +CSS Test: text-emphasis, Cc + + + + + +

Pass if there is nothing rendered below:

+
+ +
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cf.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cf.html new file mode 100644 index 00000000000..012ef378527 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cf.html @@ -0,0 +1,168 @@ + + +CSS Test: text-emphasis, Cf + + + + + +

Pass if there is nothing rendered below:

+
+ +
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cn.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cn.html new file mode 100644 index 00000000000..90f583df33a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Cn.html @@ -0,0 +1,26 @@ + + +CSS Test: text-emphasis, Cn + + + + + +

Pass if there is nothing rendered below:

+
+ +
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zl.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zl.html new file mode 100644 index 00000000000..38840ba3839 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zl.html @@ -0,0 +1,19 @@ + + +CSS Test: text-emphasis, Zl + + + + + +

Pass if there is nothing rendered below:

+
+ +
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zp.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zp.html new file mode 100644 index 00000000000..f0bbdbc8ad1 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zp.html @@ -0,0 +1,19 @@ + + +CSS Test: text-emphasis, Zp + + + + + +

Pass if there is nothing rendered below:

+
+ +
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zs.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zs.html new file mode 100644 index 00000000000..c6e4152522b --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-010Zs.html @@ -0,0 +1,35 @@ + + +CSS Test: text-emphasis, Zs + + + + + +

Pass if there is nothing rendered below:

+
+ +
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011-ref.html new file mode 100644 index 00000000000..9f28f3f411d --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: filled dot + + + +

Pass if there is a '•' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011.html new file mode 100644 index 00000000000..ed8d0fd4e0a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled dot + + + + + +

Pass if there is a '•' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011a.html new file mode 100644 index 00000000000..8492801983f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: dot filled + + + + + +

Pass if there is a '•' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011b.html new file mode 100644 index 00000000000..894b57e243a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-011b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: dot + + + + + +

Pass if there is a '•' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012-ref.html new file mode 100644 index 00000000000..672a659f4e9 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: filled circle + + + +

Pass if there is a '●' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012.html new file mode 100644 index 00000000000..97c8dfde079 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled circle + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012a.html new file mode 100644 index 00000000000..5aa13441c3c --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: circle filled + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012b.html new file mode 100644 index 00000000000..a9ece184d2f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: circle + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012c.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012c.html new file mode 100644 index 00000000000..62447324734 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-012c.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled, horizontal + + + + + +

Pass if there is a '●' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013-ref.html new file mode 100644 index 00000000000..5d6cb187df6 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: filled double-circle + + + +

Pass if there is a '◉' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013.html new file mode 100644 index 00000000000..074ef47f1dc --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled double-circle + + + + + +

Pass if there is a '◉' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013a.html new file mode 100644 index 00000000000..b641c21e585 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: double-circle filled + + + + + +

Pass if there is a '◉' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013b.html new file mode 100644 index 00000000000..2f68d44841a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-013b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: double-circle + + + + + +

Pass if there is a '◉' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014-ref.html new file mode 100644 index 00000000000..a18fc957be5 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: filled triangle + + + +

Pass if there is a '▲' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014.html new file mode 100644 index 00000000000..60231abf935 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled triangle + + + + + +

Pass if there is a '▲' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014a.html new file mode 100644 index 00000000000..1c72bda8092 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: triangle filled + + + + + +

Pass if there is a '▲' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014b.html new file mode 100644 index 00000000000..9b32cdd67f8 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-014b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: triangle + + + + + +

Pass if there is a '▲' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015-ref.html new file mode 100644 index 00000000000..a9cef72d31f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: filled sesame + + + +

Pass if there is a '﹅' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015.html new file mode 100644 index 00000000000..6c62462adae --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: filled sesame + + + + + +

Pass if there is a '﹅' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015a.html new file mode 100644 index 00000000000..e059497b048 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: sesame filled + + + + + +

Pass if there is a '﹅' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015b.html new file mode 100644 index 00000000000..a243600b064 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-015b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: sesame + + + + + +

Pass if there is a '﹅' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016-ref.html new file mode 100644 index 00000000000..6b104021b1c --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: open dot + + + +

Pass if there is a '◦' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016.html new file mode 100644 index 00000000000..954f9f4e849 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open dot + + + + + +

Pass if there is a '◦' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016a.html new file mode 100644 index 00000000000..aeabcfa7021 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-016a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: dot open + + + + + +

Pass if there is a '◦' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017-ref.html new file mode 100644 index 00000000000..c0be7ffd8ca --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: open circle + + + +

Pass if there is a '○' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017.html new file mode 100644 index 00000000000..948ccf083f5 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open circle + + + + + +

Pass if there is a '○' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017a.html new file mode 100644 index 00000000000..b9f58a8885f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: circle open + + + + + +

Pass if there is a '○' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017b.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017b.html new file mode 100644 index 00000000000..19ae3c8cb45 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-017b.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open, horizontal + + + + + +

Pass if there is a '○' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018-ref.html new file mode 100644 index 00000000000..f9d2980a80c --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: open double-circle + + + +

Pass if there is a '◎' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018.html new file mode 100644 index 00000000000..30713e614b2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open double-circle + + + + + +

Pass if there is a '◎' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018a.html new file mode 100644 index 00000000000..b3e577df10a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-018a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: double-circle open + + + + + +

Pass if there is a '◎' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019-ref.html new file mode 100644 index 00000000000..b8f4f201f00 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: open triangle + + + +

Pass if there is a '△' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019.html new file mode 100644 index 00000000000..20c8069ecc1 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open triangle + + + + + +

Pass if there is a '△' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019a.html new file mode 100644 index 00000000000..f73bf211146 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-019a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: triangle open + + + + + +

Pass if there is a '△' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020-ref.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020-ref.html new file mode 100644 index 00000000000..1502d3d7f5a --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020-ref.html @@ -0,0 +1,8 @@ + + +CSS Reference: text-emphasis-style: open sesame + + + +

Pass if there is a '﹆' above every character below:

+
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020.html new file mode 100644 index 00000000000..09c5ae5348f --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: open sesame + + + + + +

Pass if there is a '﹆' above every character below:

+
試験テスト
diff --git a/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020a.html b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020a.html new file mode 100644 index 00000000000..a32781d618e --- /dev/null +++ b/layout/reftests/w3c-css/submitted/text-decor-3/text-emphasis-style-property-020a.html @@ -0,0 +1,10 @@ + + +CSS Test: text-emphasis-style: sesame open + + + + + +

Pass if there is a '﹆' above every character below:

+
試験テスト
From c3363a790520907e37fd46b6c0ef9700ba752259 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Fri, 27 Nov 2015 20:01:32 -0800 Subject: [PATCH 049/135] Back out 350ecdaedef8 (bug 1223781) for test_killswitch_gonk.js permaorange CLOSED TREE --- .../filepicker_path_handler_chrome.js | 9 +- dom/settings/SettingsDB.jsm | 201 +++++++----------- dom/settings/tests/chrome.ini | 5 +- dom/settings/tests/test_settings_db.js | 148 ------------- dom/settings/tests/test_settings_db.xul | 19 -- .../test_settingsrequestmanager_messages.js | 42 +--- 6 files changed, 79 insertions(+), 345 deletions(-) delete mode 100644 dom/settings/tests/test_settings_db.js delete mode 100644 dom/settings/tests/test_settings_db.xul diff --git a/b2g/components/test/mochitest/filepicker_path_handler_chrome.js b/b2g/components/test/mochitest/filepicker_path_handler_chrome.js index 7cc7a84fd04..a175746cb93 100644 --- a/b2g/components/test/mochitest/filepicker_path_handler_chrome.js +++ b/b2g/components/test/mochitest/filepicker_path_handler_chrome.js @@ -12,18 +12,13 @@ var ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1'] .getService(Ci.nsIMessageListenerManager); var pickResult = null; -var timer = null; function processPickMessage(message) { let sender = message.target.QueryInterface(Ci.nsIMessageSender); // reply FilePicker's message sender.sendAsyncMessage('file-picked', pickResult); - timer = Cc["@mozilla.org/timer;1"] - .createInstance(Components.interfaces.nsITimer); - timer.initWithCallback(function() { - // notify caller - sendAsyncMessage('file-picked-posted', { type: 'file-picked-posted' }); - }, 3000, Ci.nsITimer.TYPE_ONE_SHOT); + // notify caller + sendAsyncMessage('file-picked-posted', { type: 'file-picked-posted' }); } function updatePickResult(result) { diff --git a/dom/settings/SettingsDB.jsm b/dom/settings/SettingsDB.jsm index 3c1cbd79117..d4b07a624fe 100644 --- a/dom/settings/SettingsDB.jsm +++ b/dom/settings/SettingsDB.jsm @@ -8,16 +8,10 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu.importGlobalProperties(["Blob", "File"]); +Cu.importGlobalProperties(['Blob', 'File']); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/AppsUtils.jsm"); -this.EXPORTED_SYMBOLS = [ - "SettingsDB", - "SETTINGSDB_NAME", - "SETTINGSSTORE_NAME", - "SETTINGSDB_VERSION" -]; +this.EXPORTED_SYMBOLS = ["SettingsDB", "SETTINGSDB_NAME", "SETTINGSSTORE_NAME"]; var DEBUG = false; var VERBOSE = false; @@ -59,10 +53,7 @@ SettingsDB.prototype = { __proto__: IndexedDBHelper.prototype, - _dbVersion: SETTINGSDB_VERSION, - - upgradeSchema(aTransaction, aDb, aOldVersion, aNewVersion) { - if (DEBUG) debug("Upgrade schema ", aOldVersion, aNewVersion); + upgradeSchema: function upgradeSchema(aTransaction, aDb, aOldVersion, aNewVersion) { let objectStore; if (aOldVersion == 0) { objectStore = aDb.createObjectStore(SETTINGSSTORE_NAME, { keyPath: "settingName" }); @@ -76,11 +67,75 @@ SettingsDB.prototype = { objectStore = aTransaction.objectStore(SETTINGSSTORE_NAME); } - this.loadDefaultSettings(objectStore, aOldVersion); + // Loading resource://app/defaults/settings.json doesn't work because + // settings.json is not in the omnijar. + // So we look for the app dir instead and go from here... + let settingsFile = FileUtils.getFile("DefRt", ["settings.json"], false); + if (!settingsFile || (settingsFile && !settingsFile.exists())) { + // On b2g desktop builds the settings.json file is moved in the + // profile directory by the build system. + settingsFile = FileUtils.getFile("ProfD", ["settings.json"], false); + if (!settingsFile || (settingsFile && !settingsFile.exists())) { + return; + } + } + + let chan = NetUtil.newChannel({ + uri: NetUtil.newURI(settingsFile), + loadUsingSystemPrincipal: true}); + let stream = chan.open(); + // Obtain a converter to read from a UTF-8 encoded input stream. + let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"] + .createInstance(Ci.nsIScriptableUnicodeConverter); + converter.charset = "UTF-8"; + let rawstr = converter.ConvertToUnicode(NetUtil.readInputStreamToString( + stream, + stream.available()) || ""); + let settings; + try { + settings = JSON.parse(rawstr); + } catch(e) { + if (DEBUG) debug("Error parsing " + settingsFile.path + " : " + e); + return; + } + stream.close(); + + objectStore.openCursor().onsuccess = function(event) { + let cursor = event.target.result; + if (cursor) { + let value = cursor.value; + if (value.settingName in settings) { + if (VERBOSE) debug("Upgrade " +settings[value.settingName]); + value.defaultValue = this.prepareValue(settings[value.settingName]); + delete settings[value.settingName]; + if ("settingValue" in value) { + value.userValue = this.prepareValue(value.settingValue); + delete value.settingValue; + } + cursor.update(value); + } else if ("userValue" in value || "settingValue" in value) { + value.defaultValue = undefined; + if (aOldVersion == 1 && value.settingValue) { + value.userValue = this.prepareValue(value.settingValue); + delete value.settingValue; + } + cursor.update(value); + } else { + cursor.delete(); + } + cursor.continue(); + } else { + for (let name in settings) { + let value = this.prepareValue(settings[name]); + if (VERBOSE) debug("Set new:" + name +", " + value); + objectStore.add({ settingName: name, defaultValue: value, userValue: undefined }); + } + } + }.bind(this); }, // If the value is a data: uri, convert it to a Blob. - convertDataURIToBlob(aValue) { + convertDataURIToBlob: function(aValue) { /* base64 to ArrayBuffer decoding, from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding */ @@ -144,7 +199,7 @@ SettingsDB.prototype = { return aValue }, - getObjectKind(aObject) { + getObjectKind: function(aObject) { if (aObject === null || aObject === undefined) { return "primitive"; } else if (Array.isArray(aObject)) { @@ -165,7 +220,7 @@ SettingsDB.prototype = { }, // Makes sure any property that is a data: uri gets converted to a Blob. - prepareValue(aObject) { + prepareValue: function(aObject) { let kind = this.getObjectKind(aObject); if (kind == "array") { let res = []; @@ -187,118 +242,8 @@ SettingsDB.prototype = { return res; }, - loadDefaultSettings(aObjectStore, aOldVersion) { - // Loading resource://app/defaults/settings.json doesn't work because - // settings.json is not in the omnijar. - // So we look for the app dir instead and go from here... - let settingsFile = FileUtils.getFile("DefRt", ["settings.json"], false); - if (!settingsFile || (settingsFile && !settingsFile.exists())) { - // On b2g desktop builds the settings.json file is moved in the - // profile directory by the build system. - settingsFile = FileUtils.getFile("ProfD", ["settings.json"], false); - if (!settingsFile || (settingsFile && !settingsFile.exists())) { - return; - } - } - - let chan = NetUtil.newChannel({ - uri: NetUtil.newURI(settingsFile), - loadUsingSystemPrincipal: true - }); - let stream = chan.open(); - // Obtain a converter to read from a UTF-8 encoded input stream. - let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"] - .createInstance(Ci.nsIScriptableUnicodeConverter); - converter.charset = "UTF-8"; - let rawstr = converter.ConvertToUnicode( - NetUtil.readInputStreamToString(stream, stream.available()) || "" - ); - let settings; - try { - settings = JSON.parse(rawstr); - } catch(e) { - if (DEBUG) debug("Error parsing " + settingsFile.path + " : " + e); - return; - } - stream.close(); - - aObjectStore.openCursor().onsuccess = event => { - let cursor = event.target.result; - if (cursor) { - let value = cursor.value; - if (value.settingName in settings) { - if (VERBOSE) { - debug("Upgrade " + value.settingName + " " + - settings[value.settingName]); - } - value.defaultValue = this.prepareValue(settings[value.settingName]); - delete settings[value.settingName]; - if ("settingValue" in value) { - value.userValue = this.prepareValue(value.settingValue); - delete value.settingValue; - } - cursor.update(value); - } else if ("userValue" in value || "settingValue" in value) { - value.defaultValue = undefined; - if (aOldVersion !== undefined && - aOldVersion == 1 && value.settingValue) { - value.userValue = this.prepareValue(value.settingValue); - delete value.settingValue; - } - cursor.update(value); - } else { - cursor.delete(); - } - cursor.continue(); - } else { - for (let name in settings) { - let value = this.prepareValue(settings[name]); - if (VERBOSE) debug("Set new:" + name +", " + value); - aObjectStore.add({ - settingName: name, - defaultValue: value, - userValue: undefined - }); - } - } - }; - }, - - /** - * Only for testing purposes. - */ - set dbVersion(version) { - this._dbVersion = SETTINGSDB_VERSION || version; - }, - - init() { - this.initDBHelper(SETTINGSDB_NAME, this._dbVersion, + init: function init() { + this.initDBHelper(SETTINGSDB_NAME, SETTINGSDB_VERSION, [SETTINGSSTORE_NAME]); - - // We need to store the db version to avoid reading the setting.json - // file twice on the very first run and after an OTA update where - // the db version was bumped. - // upgradeSchema already takes care of loading and applying the - // setting.json content in these two scenarios. - const dbVersionPref = "settings.api.db.version"; - let oldDbVersion = 0; - try { - oldDbVersion = Services.prefs.getIntPref(dbVersionPref); - } catch(e) {} - Services.prefs.setIntPref(dbVersionPref, this._dbVersion); - - if (!AppsUtils.isFirstRun(Services.prefs) || - oldDbVersion != this._dbVersion) { - return; - } - - // We get there in case of a first run after an OTA update where - // the settings db version was not bumped. In this case, we need to - // load and apply the content of the settings.json file. - this.newTxn("readwrite", SETTINGSSTORE_NAME, (txn, store) => { - this.loadDefaultSettings(store); - }, null, error => { - dump("*** WARNING *** Settings DB initialization error " + error + "\n"); - }); } } diff --git a/dom/settings/tests/chrome.ini b/dom/settings/tests/chrome.ini index 8f3861b05fa..f2fca29a73c 100644 --- a/dom/settings/tests/chrome.ini +++ b/dom/settings/tests/chrome.ini @@ -1,13 +1,10 @@ [DEFAULT] skip-if = buildapp != 'b2g' support-files = - test_settings_db.js test_settings_service.js test_settings_service_callback.js [test_settings_service.xul] -skip-if = buildapp == 'mulet' +skip-if= buildapp == 'mulet' [test_settings_service_callback.xul] -[test_settings_db.xul] -skip-if = toolkit == 'gonk' # Bug 1225157 diff --git a/dom/settings/tests/test_settings_db.js b/dom/settings/tests/test_settings_db.js deleted file mode 100644 index 75f7c663aab..00000000000 --- a/dom/settings/tests/test_settings_db.js +++ /dev/null @@ -1,148 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -const Cu = Components.utils; - -Cu.import("resource://gre/modules/AppsUtils.jsm"); -Cu.import("resource://gre/modules/FileUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/SettingsDB.jsm"); - -SimpleTest.waitForExplicitFinish(); - -let settings = { - "setting1": "value1" -}; - -let settingsDB; - -const saveTestSettingsJson = () => { - let file = FileUtils.getFile("ProfD", ["settings.json"], false); - let foStream = FileUtils.openFileOutputStream(file); - let json = JSON.stringify(settings); - foStream.write(json, json.length); - foStream.close(); -}; - -const getSettings = () => { - return new Promise((resolve, reject) => { - settingsDB.newTxn("readonly", SETTINGSSTORE_NAME, (txn, store) => { - txn.onabort = reject; - txn.onerror = reject; - let req = store.getAll(); - req.onsuccess = () => { - resolve(req.result); - }; - req.onerror = reject; - }, null, reject); - }); -}; - -const checkSettings = expected => { - return getSettings().then(settings => { - settings.forEach(setting => { - if (expected.has(setting.settingName)) { - let value = expected.get(setting.settingName); - ok(value == setting.defaultValue, - `${setting.defaultValue} should be ${value}`); - expected.delete(setting.settingName); - } - }); - ok(expected.size == 0, `should remove all expected settings`); - }); -}; - -const setFirstRun = () => { - let promises = []; - promises.push(new Promise(resolve => { - SpecialPowers.pushPrefEnv({ - "set": [["gecko.mstone", ""]] - }, resolve); - })); - promises.push(new Promise(resolve => { - SpecialPowers.pushPrefEnv({ - "set": [["gecko.buildID", ""]] - }, resolve); - })); - - return Promise.all(promises); -}; - -const cleanup = () => { - settingsDB.close(); - settingsDB = null; - next(); -}; - -const tests = [() => { - // Create dummy settings.json in the profile dir. - saveTestSettingsJson(); - ok(true, "should create settings.json"); - next(); -}, () => { - // settings.json should be applied on first boot. - settingsDB = new SettingsDB(); - settingsDB.init(); - let expected = new Map(); - expected.set("setting1", "value1"); - checkSettings(expected).then(next); -}, () => { - cleanup(); -}, () => { - // Modifying settings.json but not updating the platform should not - // apply the changes to settings.json. - settings["setting1"] = "modifiedValue1"; - settings["setting2"] = "value2"; - saveTestSettingsJson(); - settingsDB = new SettingsDB(); - settingsDB.init(); - let expected = new Map(); - expected.set("setting1", "value1"); - checkSettings(expected).then(next); -}, () => { - cleanup(); -}, () => { - setFirstRun().then(next); -}, () => { - // Updating the platform should apply changes to settings.json. - settingsDB = new SettingsDB(); - settingsDB.init(); - let expected = new Map(); - expected.set("setting1", "modifiedValue1"); - expected.set("setting2", "value2"); - checkSettings(expected).then(next); -}, () => { - cleanup(); -}, () => { - setFirstRun().then(next); -}, () => { - // Updating the platform and bumping DB version should also apply changes - // to settings.json - settings["setting2"] = "modifiedValue2"; - saveTestSettingsJson(); - settingsDB = new SettingsDB(); - SettingsDB.dbVersion = SETTINGSDB_VERSION + 1; - settingsDB.init(); - let expected = new Map(); - expected.set("setting1", "modifiedValue1"); - expected.set("setting2", "modifiedValue2"); - checkSettings(expected).then(next); -}, () => { - cleanup(); -}]; - -const next = () => { - let step = tests.shift(); - if (!step) { - return SimpleTest.finish(); - } - try { - step(); - } catch(e) { - ok(false, "Test threw: " + e); - } -} - -SpecialPowers.pushPrefEnv({"set":[["settings.api.db.version", 0]]}, next); diff --git a/dom/settings/tests/test_settings_db.xul b/dom/settings/tests/test_settings_db.xul deleted file mode 100644 index 7451bdecbdf..00000000000 --- a/dom/settings/tests/test_settings_db.xul +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - Mozilla Bug 1223781 - - - + + + +Mozilla Bug 696253 + +
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/layout/style/test/test_flexbox_align_self_auto.html b/layout/style/test/test_flexbox_align_self_auto.html deleted file mode 100644 index 6072a9a6960..00000000000 --- a/layout/style/test/test_flexbox_align_self_auto.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - Test behavior of 'align-self:auto' (Bug 696253) - - - - -Mozilla Bug 696253 -
-
-
-
-
-
- - From a84a61872fe7bd18d84a3b67b74059eae8ced5e4 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 056/135] Bug 1225376 part 3 - [css-grid] Crashtest. --- layout/generic/crashtests/1225376.html | 10 ++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 11 insertions(+) create mode 100644 layout/generic/crashtests/1225376.html diff --git a/layout/generic/crashtests/1225376.html b/layout/generic/crashtests/1225376.html new file mode 100644 index 00000000000..f6e35be3eed --- /dev/null +++ b/layout/generic/crashtests/1225376.html @@ -0,0 +1,10 @@ + + + + +
+
+
+ + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 975e78b4621..2d6415f4212 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -598,6 +598,7 @@ load 1223568-1.html load 1223568-2.html load 1224230-1.html pref(layout.css.grid.enabled,true) load 1225118.html +pref(layout.css.grid.enabled,true) load 1225376.html load first-letter-638937-1.html load first-letter-638937-2.html pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 From b93c028d47d61562f9d5b4b1b62131dbe8194ccc Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 057/135] Bug 1225592 - [css-grid] Apply a max limit to the number of explicit tracks we will store (kMaxLine - 1). Also make the layout code more robust so it doesn't depend on that. r=dholbert --- layout/generic/nsGridContainerFrame.cpp | 23 +++++++++++++---------- layout/style/nsRuleNode.cpp | 4 ++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index c58df8496e2..ab97cfc64b2 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -1927,28 +1927,31 @@ nsGridContainerFrame::Tracks::Initialize( explicitGridOffset + aFunctions.mMinSizingFunctions.Length()); MOZ_ASSERT(aFunctions.mMinSizingFunctions.Length() == aFunctions.mMaxSizingFunctions.Length()); + // First we initialize the implicit tracks before the explicit grid starts. uint32_t i = 0; - for (; i < explicitGridOffset; ++i) { + uint32_t sentinel = std::min(explicitGridOffset, mSizes.Length()); + for (; i < sentinel; ++i) { mSizes[i].Initialize(percentageBasis, aFunctions.mAutoMinSizing, aFunctions.mAutoMaxSizing); } - uint32_t j = 0; - for (uint32_t len = aFunctions.mMinSizingFunctions.Length(); j < len; ++j) { - mSizes[i + j].Initialize(percentageBasis, - aFunctions.mMinSizingFunctions[j], - aFunctions.mMaxSizingFunctions[j]); + // Now initialize the explicit grid tracks. + sentinel = std::min(i + aFunctions.mMinSizingFunctions.Length(), + mSizes.Length()); + for (uint32_t j = 0; i < sentinel; ++i, ++j) { + mSizes[i].Initialize(percentageBasis, + aFunctions.mMinSizingFunctions[j], + aFunctions.mMaxSizingFunctions[j]); } - i += j; - for (; i < mSizes.Length(); ++i) { + // Finally, initialize the implicit tracks that comes after the explicit grid. + sentinel = mSizes.Length(); + for (; i < sentinel; ++i) { mSizes[i].Initialize(percentageBasis, aFunctions.mAutoMinSizing, aFunctions.mAutoMaxSizing); } mGridGap = aGridGap; - // XXX allow negative values? pending outcome of www-style thread: - // https://lists.w3.org/Archives/Public/www-style/2015Oct/0028.html MOZ_ASSERT(mGridGap >= nscoord(0), "negative grid gap"); } diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 523de8f520b..9fee0a12abb 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -7797,11 +7797,11 @@ SetGridTrackList(const nsCSSValue& aValue, // starting with a (sub list of identifiers), // and alternating between that and . aResult.mIsSubgrid = false; - for (;;) { + for (int32_t line = 1; ; ++line) { AppendGridLineNames(item->mValue, aResult); item = item->mNext; - if (!item) { + if (!item || line == nsStyleGridLine::kMaxLine) { break; } From aebe6de5e12fb75cdd35cdcb591eb18bec365dfd Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 058/135] Bug 1225592 - [css-grid] Crashtest. --- layout/generic/crashtests/1225592.html | 13 +++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 14 insertions(+) create mode 100644 layout/generic/crashtests/1225592.html diff --git a/layout/generic/crashtests/1225592.html b/layout/generic/crashtests/1225592.html new file mode 100644 index 00000000000..e4b5e6e6d95 --- /dev/null +++ b/layout/generic/crashtests/1225592.html @@ -0,0 +1,13 @@ + + + +
+
+ +
+ + +
+ + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 2d6415f4212..c25d31b5511 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -599,6 +599,7 @@ load 1223568-2.html load 1224230-1.html pref(layout.css.grid.enabled,true) load 1225118.html pref(layout.css.grid.enabled,true) load 1225376.html +pref(layout.css.grid.enabled,true) load 1225592.html load first-letter-638937-1.html load first-letter-638937-2.html pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 From 32d039708c4edb15443a3711a394c5f3891cef45 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 059/135] Bug 1227099 - [css-grid] Grid container block-size should include a grid-row-gap between each row. r=dholbert --- layout/generic/nsGridContainerFrame.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index ab97cfc64b2..fdb3c430e39 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -2984,6 +2984,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext, for (uint32_t i = 0; i < mGridRowEnd; ++i) { bSize += gridReflowState.mRows.mSizes[i].mBase; } + bSize += gridReflowState.mRows.SumOfGridGaps(); } else { bSize = computedBSize; } From a6dd910d5c5a13f1cf1ddb1afc4dfaa00050ef43 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 060/135] Bug 1227099 - [css-grid] Additional reftests for 'grid-row-gap'. --- .../css-grid/grid-row-gap-002-ref.html | 120 +++++++++++++++++ .../reftests/css-grid/grid-row-gap-002.html | 97 ++++++++++++++ .../css-grid/grid-row-gap-003-ref.html | 122 ++++++++++++++++++ .../reftests/css-grid/grid-row-gap-003.html | 99 ++++++++++++++ .../css-grid/grid-row-gap-004-ref.html | 118 +++++++++++++++++ .../reftests/css-grid/grid-row-gap-004.html | 99 ++++++++++++++ layout/reftests/css-grid/reftest.list | 5 +- 7 files changed, 659 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/css-grid/grid-row-gap-002-ref.html create mode 100644 layout/reftests/css-grid/grid-row-gap-002.html create mode 100644 layout/reftests/css-grid/grid-row-gap-003-ref.html create mode 100644 layout/reftests/css-grid/grid-row-gap-003.html create mode 100644 layout/reftests/css-grid/grid-row-gap-004-ref.html create mode 100644 layout/reftests/css-grid/grid-row-gap-004.html diff --git a/layout/reftests/css-grid/grid-row-gap-002-ref.html b/layout/reftests/css-grid/grid-row-gap-002-ref.html new file mode 100644 index 00000000000..27e1da041e8 --- /dev/null +++ b/layout/reftests/css-grid/grid-row-gap-002-ref.html @@ -0,0 +1,120 @@ + + + + + Reference: 'grid-row-gap' + + + + + + + + + diff --git a/layout/reftests/css-grid/grid-row-gap-002.html b/layout/reftests/css-grid/grid-row-gap-002.html new file mode 100644 index 00000000000..8be50dd368b --- /dev/null +++ b/layout/reftests/css-grid/grid-row-gap-002.html @@ -0,0 +1,97 @@ + + + + + CSS Grid Test: 'grid-row-gap' + + + + + + + + + + + diff --git a/layout/reftests/css-grid/grid-row-gap-003-ref.html b/layout/reftests/css-grid/grid-row-gap-003-ref.html new file mode 100644 index 00000000000..257d5d2f50d --- /dev/null +++ b/layout/reftests/css-grid/grid-row-gap-003-ref.html @@ -0,0 +1,122 @@ + + + + + Reference: 'grid-row-gap' sideways-lr + + + + + + + + + diff --git a/layout/reftests/css-grid/grid-row-gap-003.html b/layout/reftests/css-grid/grid-row-gap-003.html new file mode 100644 index 00000000000..02e0c318b6f --- /dev/null +++ b/layout/reftests/css-grid/grid-row-gap-003.html @@ -0,0 +1,99 @@ + + + + + CSS Grid Test: 'grid-row-gap' sideways-lr + + + + + + + + + + + diff --git a/layout/reftests/css-grid/grid-row-gap-004-ref.html b/layout/reftests/css-grid/grid-row-gap-004-ref.html new file mode 100644 index 00000000000..e29cb7f66f6 --- /dev/null +++ b/layout/reftests/css-grid/grid-row-gap-004-ref.html @@ -0,0 +1,118 @@ + + + + + Reference: 'grid-row-gap' sideways-rl + + + + + + + + + diff --git a/layout/reftests/css-grid/grid-row-gap-004.html b/layout/reftests/css-grid/grid-row-gap-004.html new file mode 100644 index 00000000000..f1667035e0e --- /dev/null +++ b/layout/reftests/css-grid/grid-row-gap-004.html @@ -0,0 +1,99 @@ + + + + + CSS Grid Test: 'grid-row-gap' sideways-rl + + + + + + + + + + + diff --git a/layout/reftests/css-grid/reftest.list b/layout/reftests/css-grid/reftest.list index ab5a32357a3..060e34531c3 100644 --- a/layout/reftests/css-grid/reftest.list +++ b/layout/reftests/css-grid/reftest.list @@ -73,4 +73,7 @@ fuzzy-if(winWidget,1,36) == grid-auto-min-sizing-definite-001.html grid-auto-min == grid-column-gap-001.html grid-column-gap-001-ref.html == grid-column-gap-002.html grid-column-gap-002-ref.html == grid-column-gap-003.html grid-column-gap-003-ref.html -== grid-row-gap-001-ref.html grid-row-gap-001-ref.html +== grid-row-gap-001.html grid-row-gap-001-ref.html +== grid-row-gap-002.html grid-row-gap-002-ref.html +== grid-row-gap-003.html grid-row-gap-003-ref.html +== grid-row-gap-004.html grid-row-gap-004-ref.html From 045fc08846b1a9924feef900c15a408a6034c554 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 061/135] Bug 1227162 - [css-grid][css-align] Make the scrolled pseudo frame inherit more CSS Align / Grid properties. r=dholbert --- layout/style/ua.css | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/layout/style/ua.css b/layout/style/ua.css index 87aaea8cc64..98ae01904de 100644 --- a/layout/style/ua.css +++ b/layout/style/ua.css @@ -165,16 +165,28 @@ blocks with overflow: scroll; */ unicode-bidi: inherit; text-overflow: inherit; + /* Multicol container */ -moz-column-count: inherit; -moz-column-width: inherit; -moz-column-gap: inherit; -moz-column-rule: inherit; - /* CSS3 flexbox properties that apply to the flex container: */ - align-content: inherit; - align-items: inherit; + /* Flex container */ flex-direction: inherit; flex-wrap: inherit; + /* Grid container */ + grid-auto-columns: inherit; + grid-auto-rows: inherit; + grid-auto-flow: inherit; + grid-column-gap: inherit; + grid-row-gap: inherit; + grid-template-areas: inherit; + grid-template-columns: inherit; + grid-template-rows: inherit; + /* CSS Align */ + align-content: inherit; + align-items: inherit; justify-content: inherit; + justify-items: inherit; /* Do not change these. nsCSSFrameConstructor depends on them to create a good frame tree. */ position: static !important; From 43009fa56f0a1217e92329c04aea2768eabd09c7 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 062/135] Bug 1227162 - [css-grid] Reftests for grid container with overflow:hidden. --- .../grid-container-overflow-001-ref.html | 113 ++++++++++++++++ .../css-grid/grid-container-overflow-001.html | 124 ++++++++++++++++++ layout/reftests/css-grid/reftest.list | 1 + 3 files changed, 238 insertions(+) create mode 100644 layout/reftests/css-grid/grid-container-overflow-001-ref.html create mode 100644 layout/reftests/css-grid/grid-container-overflow-001.html diff --git a/layout/reftests/css-grid/grid-container-overflow-001-ref.html b/layout/reftests/css-grid/grid-container-overflow-001-ref.html new file mode 100644 index 00000000000..ace9dfdc617 --- /dev/null +++ b/layout/reftests/css-grid/grid-container-overflow-001-ref.html @@ -0,0 +1,113 @@ + + + + + Reference: overflow:hidden/auto + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ + + diff --git a/layout/reftests/css-grid/grid-container-overflow-001.html b/layout/reftests/css-grid/grid-container-overflow-001.html new file mode 100644 index 00000000000..1279d4c1c36 --- /dev/null +++ b/layout/reftests/css-grid/grid-container-overflow-001.html @@ -0,0 +1,124 @@ + + + + + CSS Grid Test: overflow:hidden/auto + + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ + + diff --git a/layout/reftests/css-grid/reftest.list b/layout/reftests/css-grid/reftest.list index 060e34531c3..19ca69dae42 100644 --- a/layout/reftests/css-grid/reftest.list +++ b/layout/reftests/css-grid/reftest.list @@ -77,3 +77,4 @@ fuzzy-if(winWidget,1,36) == grid-auto-min-sizing-definite-001.html grid-auto-min == grid-row-gap-002.html grid-row-gap-002-ref.html == grid-row-gap-003.html grid-row-gap-003-ref.html == grid-row-gap-004.html grid-row-gap-004-ref.html +== grid-container-overflow-001.html grid-container-overflow-001-ref.html From 3410901b20042fa063607ca4bea057fc9dda4050 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 063/135] Bug 1225368 - [css-grid] Make CollectGrowable() deal with frozen tracks; i.e. subtract their base size but don't collect them since they aren't growable. r=dholbert --- layout/generic/nsGridContainerFrame.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index fdb3c430e39..d1acf79976a 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -271,9 +271,11 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::Tracks const LineRange& aRange, nsIFrame* aGridItem); /** - * Collect the tracks which are growable (matching aSelector) and return - * aAvailableSpace minus the sum of mBase's in aPlan for the tracks - * in aRange, or 0 if this subtraction goes below 0. + * Collect the tracks which are growable (matching aSelector) into + * aGrowableTracks, and return the amount of space that can be used + * to grow those tracks. Specifically, we return aAvailableSpace minus + * the sum of mBase's in aPlan (clamped to 0) for the tracks in aRange, + * or zero when there are no growable tracks. * @note aPlan[*].mBase represents a planned new base or limit. */ static nscoord CollectGrowable(nscoord aAvailableSpace, @@ -288,16 +290,15 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::Tracks const uint32_t end = aRange.mEnd; for (uint32_t i = start; i < end; ++i) { const TrackSize& sz = aPlan[i]; - MOZ_ASSERT(!sz.IsFrozen()); space -= sz.mBase; if (space <= 0) { return 0; } - if (sz.mState & aSelector) { + if ((sz.mState & aSelector) && !sz.IsFrozen()) { aGrowableTracks.AppendElement(i); } } - return space; + return aGrowableTracks.IsEmpty() ? 0 : space; } void SetupGrowthPlan(nsTArray& aPlan, From 82815b55877373c37e6c4c33ff2d7e06ecc86e3c Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 28 Nov 2015 21:37:44 +0100 Subject: [PATCH 064/135] Bug 1225368 - [css-grid] More Track Sizing reftests. --- .../css-grid/grid-track-sizing-002-ref.html | 243 ++++++++++++++++++ .../css-grid/grid-track-sizing-002.html | 238 +++++++++++++++++ layout/reftests/css-grid/reftest.list | 1 + 3 files changed, 482 insertions(+) create mode 100644 layout/reftests/css-grid/grid-track-sizing-002-ref.html create mode 100644 layout/reftests/css-grid/grid-track-sizing-002.html diff --git a/layout/reftests/css-grid/grid-track-sizing-002-ref.html b/layout/reftests/css-grid/grid-track-sizing-002-ref.html new file mode 100644 index 00000000000..170283b35dd --- /dev/null +++ b/layout/reftests/css-grid/grid-track-sizing-002-ref.html @@ -0,0 +1,243 @@ + + + + + Reference: freezing tracks in step 2.5 of the Track Sizing Algorithm + + + + + +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ + + diff --git a/layout/reftests/css-grid/grid-track-sizing-002.html b/layout/reftests/css-grid/grid-track-sizing-002.html new file mode 100644 index 00000000000..e09818fb200 --- /dev/null +++ b/layout/reftests/css-grid/grid-track-sizing-002.html @@ -0,0 +1,238 @@ + + + + + CSS Grid Test: freezing tracks in step 2.5 of the Track Sizing Algorithm + + + + + + + +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ + + diff --git a/layout/reftests/css-grid/reftest.list b/layout/reftests/css-grid/reftest.list index 19ca69dae42..bdf337780c7 100644 --- a/layout/reftests/css-grid/reftest.list +++ b/layout/reftests/css-grid/reftest.list @@ -13,6 +13,7 @@ fails == grid-whitespace-handling-1b.xhtml grid-whitespace-handling-1-ref.xhtml == grid-placement-auto-col-dense-001.html grid-placement-auto-col-dense-001-ref.html == grid-placement-implicit-named-areas-001.html grid-placement-implicit-named-areas-001-ref.html == grid-track-sizing-001.html grid-track-sizing-001-ref.html +== grid-track-sizing-002.html grid-track-sizing-002-ref.html == grid-abspos-items-001.html grid-abspos-items-001-ref.html == grid-abspos-items-002.html grid-abspos-items-002-ref.html == grid-abspos-items-003.html grid-abspos-items-003-ref.html From 3943af288f7d2e3353349a6ca3774a39350da8a8 Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Sun, 25 Oct 2015 23:53:21 -0700 Subject: [PATCH 065/135] Bug 1218179: move from transitional to non-transitional IDNA2008 processing, r=jfkthame --- netwerk/dns/nsIDNService.cpp | 10 +++++----- netwerk/test/unit/test_idna2008.js | 2 +- netwerk/test/unit/xpcshell.ini | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/netwerk/dns/nsIDNService.cpp b/netwerk/dns/nsIDNService.cpp index e2c1b8a2ca7..da027e26424 100644 --- a/netwerk/dns/nsIDNService.cpp +++ b/netwerk/dns/nsIDNService.cpp @@ -18,12 +18,12 @@ #include "punycode.h" #ifdef IDNA2008 -// Currently we use the transitional processing option -- see +// Currently we use the non-transitional processing option -- see // http://unicode.org/reports/tr46/ -// To switch to non-transitional processing, change the value of this flag -// and kTransitionalProcessing in netwerk/test/unit/test_idna2008.js to false -// (patch in bug 1218179). -const bool kIDNA2008_TransitionalProcessing = true; +// To switch to transitional processing, change the value of this flag +// and kTransitionalProcessing in netwerk/test/unit/test_idna2008.js to true +// (revert bug 1218179). +const bool kIDNA2008_TransitionalProcessing = false; #include "ICUUtils.h" #endif diff --git a/netwerk/test/unit/test_idna2008.js b/netwerk/test/unit/test_idna2008.js index 4b4db14ff4a..9221a0e605e 100644 --- a/netwerk/test/unit/test_idna2008.js +++ b/netwerk/test/unit/test_idna2008.js @@ -1,4 +1,4 @@ -const kTransitionalProcessing = true; +const kTransitionalProcessing = false; // Four characters map differently under non-transitional processing: const labels = [ diff --git a/netwerk/test/unit/xpcshell.ini b/netwerk/test/unit/xpcshell.ini index ebe9a04eb51..941f4620e7b 100644 --- a/netwerk/test/unit/xpcshell.ini +++ b/netwerk/test/unit/xpcshell.ini @@ -220,6 +220,8 @@ skip-if = bits != 32 [test_idn_blacklist.js] [test_idn_urls.js] [test_idna2008.js] +# IDNA2008 depends on ICU, not available on android +skip-if = os == "android" [test_invalidport.js] [test_localstreams.js] [test_mismatch_last-modified.js] From 6bfa219b609011d8a58deb1aaa236406610adcf0 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Fri, 27 Nov 2015 13:24:56 -0800 Subject: [PATCH 066/135] Bug 1226907 - Part 1: Check _write and strerror_r return values in mozjemalloc. r=njn --- memory/mozjemalloc/jemalloc.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c index 7e64ff5d72b..f08ef722eef 100644 --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -1571,10 +1571,16 @@ wrtmessage(const char *p1, const char *p2, const char *p3, const char *p4) #if defined(MOZ_MEMORY) && !defined(MOZ_MEMORY_WINDOWS) #define _write write #endif - _write(STDERR_FILENO, p1, (unsigned int) strlen(p1)); - _write(STDERR_FILENO, p2, (unsigned int) strlen(p2)); - _write(STDERR_FILENO, p3, (unsigned int) strlen(p3)); - _write(STDERR_FILENO, p4, (unsigned int) strlen(p4)); + // Pretend to check _write() errors to suppress gcc warnings about + // warn_unused_result annotations in some versions of glibc headers. + if (_write(STDERR_FILENO, p1, (unsigned int) strlen(p1)) < 0) + return; + if (_write(STDERR_FILENO, p2, (unsigned int) strlen(p2)) < 0) + return; + if (_write(STDERR_FILENO, p3, (unsigned int) strlen(p3)) < 0) + return; + if (_write(STDERR_FILENO, p4, (unsigned int) strlen(p4)) < 0) + return; } MOZ_JEMALLOC_API @@ -2446,9 +2452,10 @@ pages_map(void *addr, size_t size) if (munmap(ret, size) == -1) { char buf[STRERROR_BUF]; - strerror_r(errno, buf, sizeof(buf)); - _malloc_message(_getprogname(), - ": (malloc) Error in munmap(): ", buf, "\n"); + if (strerror_r(errno, buf, sizeof(buf)) == 0) { + _malloc_message(_getprogname(), + ": (malloc) Error in munmap(): ", buf, "\n"); + } if (opt_abort) abort(); } @@ -2475,9 +2482,10 @@ pages_unmap(void *addr, size_t size) if (munmap(addr, size) == -1) { char buf[STRERROR_BUF]; - strerror_r(errno, buf, sizeof(buf)); - _malloc_message(_getprogname(), - ": (malloc) Error in munmap(): ", buf, "\n"); + if (strerror_r(errno, buf, sizeof(buf)) == 0) { + _malloc_message(_getprogname(), + ": (malloc) Error in munmap(): ", buf, "\n"); + } if (opt_abort) abort(); } From c07b197ba249a62ebda02a962e73710fffd8e232 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Sun, 15 Nov 2015 13:21:56 -0800 Subject: [PATCH 067/135] Bug 1226907 - Part 2: Fix warnings in mozjemalloc and remove ALLOW_COMPILER_WARNINGS. r=glandium --- memory/mozjemalloc/jemalloc.c | 10 +++++++++- memory/mozjemalloc/moz.build | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c index f08ef722eef..ee9e2885374 100644 --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -435,7 +435,9 @@ static const bool isthreaded = true; #define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */ #endif +#ifndef __DECONST #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) +#endif #ifdef MOZ_MEMORY_WINDOWS /* MSVC++ does not support C99 variable-length arrays. */ @@ -1607,6 +1609,12 @@ void (*_malloc_message)(const char *p1, const char *p2, const char *p3, // Note: MozTaggedAnonymousMmap() could call an LD_PRELOADed mmap // instead of the one defined here; use only MozTagAnonymousMemory(). +#ifdef MOZ_MEMORY_ANDROID +// Android's pthread.h does not declare pthread_atfork() until SDK 21. +extern MOZ_EXPORT +int pthread_atfork(void (*)(void), void (*)(void), void(*)(void)); +#endif + /* RELEASE_ASSERT calls jemalloc_crash() instead of calling MOZ_CRASH() * directly because we want crashing to add a frame to the stack. This makes * it easier to find the failing assertion in crash stacks. */ @@ -4974,7 +4982,7 @@ arena_new(arena_t *arena) bin->runcur = NULL; arena_run_tree_new(&bin->runs); - bin->reg_size = (1U << (TINY_MIN_2POW + i)); + bin->reg_size = (1ULL << (TINY_MIN_2POW + i)); prev_run_size = arena_bin_run_size_calc(bin, prev_run_size); diff --git a/memory/mozjemalloc/moz.build b/memory/mozjemalloc/moz.build index 7aac8328e5f..b4eddfd8cfd 100644 --- a/memory/mozjemalloc/moz.build +++ b/memory/mozjemalloc/moz.build @@ -42,8 +42,8 @@ LOCAL_INCLUDES += [ '/memory/build', ] -# XXX: We should fix these warnings. -ALLOW_COMPILER_WARNINGS = True - if CONFIG['GNU_CC']: CFLAGS += ['-Wshadow'] + +if CONFIG['_MSC_VER']: + CFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163) From f3bf739cba88e876409c4797e53d4bf0d0cdbba1 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Sun, 8 Nov 2015 22:46:00 -0800 Subject: [PATCH 068/135] Bug 1223258 - Fix -Wunreachable-code warnings in widget. r=masayuki widget/tests/TestAppShellSteadyState.cpp:397:5: warning: code will never be executed [-Wunreachable-code] widget\widgetutils.cpp(95) : warning C4702: unreachable code widget\mouseevents.h(97) : warning C4702: unreachable code widget\textevents.h(492) : warning C4702: unreachable code --- widget/MouseEvents.h | 1 - widget/TextEvents.h | 1 - widget/WidgetUtils.cpp | 1 - widget/tests/TestAppShellSteadyState.cpp | 4 ++-- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h index c913af29951..f4056c67010 100644 --- a/widget/MouseEvents.h +++ b/widget/MouseEvents.h @@ -94,7 +94,6 @@ public: virtual WidgetEvent* Duplicate() const override { MOZ_CRASH("WidgetMouseEventBase must not be most-subclass"); - return nullptr; } /// The possible related target diff --git a/widget/TextEvents.h b/widget/TextEvents.h index 53a4fe1bd5c..15f112ac3d1 100644 --- a/widget/TextEvents.h +++ b/widget/TextEvents.h @@ -489,7 +489,6 @@ public: NS_ASSERTION(!IsAllowedToDispatchDOMEvent(), "WidgetQueryContentEvent needs to support Duplicate()"); MOZ_CRASH("WidgetQueryContentEvent doesn't support Duplicate()"); - return nullptr; } void InitForQueryTextContent(uint32_t aOffset, uint32_t aLength, diff --git a/widget/WidgetUtils.cpp b/widget/WidgetUtils.cpp index fe15181d021..95bbb8475f4 100644 --- a/widget/WidgetUtils.cpp +++ b/widget/WidgetUtils.cpp @@ -92,7 +92,6 @@ nsIntRect RotateRect(nsIntRect aRect, aRect.height, aRect.width); default: MOZ_CRASH("Unknown rotation"); - return aRect; } } diff --git a/widget/tests/TestAppShellSteadyState.cpp b/widget/tests/TestAppShellSteadyState.cpp index 8156335c97a..b7e05a976c0 100644 --- a/widget/tests/TestAppShellSteadyState.cpp +++ b/widget/tests/TestAppShellSteadyState.cpp @@ -391,8 +391,7 @@ Test4Internal(nsIAppShell* aAppShell) #ifndef XP_WIN // Not sure how to test on other platforms. return false; -#endif - +#else nsCOMPtr appService = do_GetService(NS_APPSHELLSERVICE_CONTRACTID); if (!appService) { @@ -437,6 +436,7 @@ Test4Internal(nsIAppShell* aAppShell) } return true; +#endif } void From 79fa52c4747302cb635ad31071db43ec0398acd1 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sat, 28 Nov 2015 17:11:16 -0800 Subject: [PATCH 069/135] Bug 1218762 followup, annotate the assertion on Android since there's certainly no way to fix "an assertion failed, I'm not going to tell you which one" --- gfx/tests/crashtests/crashtests.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/tests/crashtests/crashtests.list b/gfx/tests/crashtests/crashtests.list index fe5f88aa4ed..bcda391c508 100644 --- a/gfx/tests/crashtests/crashtests.list +++ b/gfx/tests/crashtests/crashtests.list @@ -54,7 +54,7 @@ load 404112-2.html load 405268-1.xhtml load 407761-1.html load 407842.html -load 408754-1.html +asserts-if(Android,1) load 408754-1.html load 410728-1.xml load 416637-1.html load 419095-1.html From 3b89c1d6b6e53d17c8b67dffb0ca538cd3c8c6a1 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Sat, 28 Nov 2015 21:35:36 -0500 Subject: [PATCH 070/135] Bug 1206872 - Enable C++ APZ in Fennec nightly builds. r=mfinkle --- mobile/android/confvars.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mobile/android/confvars.sh b/mobile/android/confvars.sh index a6e417bd9ed..78c117834b0 100644 --- a/mobile/android/confvars.sh +++ b/mobile/android/confvars.sh @@ -107,6 +107,11 @@ if test "$NIGHTLY_BUILD"; then MOZ_ANDROID_GCM=1 fi +# Enable C++ APZ on Nightly builds only. +if test "$NIGHTLY_BUILD"; then + MOZ_ANDROID_APZ=1 +fi + # Enable checking that add-ons are signed by the trusted root MOZ_ADDON_SIGNING=1 From 54af341c78e7f953b508a2171be3c203c36a1685 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sun, 29 Nov 2015 17:58:36 +0100 Subject: [PATCH 071/135] Bug 1228755 - Map "C.UTF-8" to "en-US.UTF-8" in GetXPLocale(). r=smontagu --- intl/locale/unix/nsPosixLocale.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intl/locale/unix/nsPosixLocale.cpp b/intl/locale/unix/nsPosixLocale.cpp index c35bc0ccc91..5a13e8859ec 100644 --- a/intl/locale/unix/nsPosixLocale.cpp +++ b/intl/locale/unix/nsPosixLocale.cpp @@ -66,6 +66,10 @@ nsPosixLocale::GetXPLocale(const char* posixLocale, nsAString& locale) locale.AssignLiteral("en-US"); return NS_OK; } + if (strcmp(posixLocale,"C.UTF-8")==0) { + locale.AssignLiteral("en-US.UTF-8"); + return NS_OK; + } if (!ParseLocaleString(posixLocale,lang_code,country_code,extra,'_')) { // * locale = "x-user-defined"; // use posix if parse failed From 3eed137d9a0b52ad0d8191cca6e23cf896d1baea Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sun, 29 Nov 2015 17:58:36 +0100 Subject: [PATCH 072/135] Bug 1226627 - Use fmin[f]/fmax[f] when clamping floating point values (perf). r=roc --- gfx/src/nsCoord.h | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/gfx/src/nsCoord.h b/gfx/src/nsCoord.h index bb53611cfdd..0ecdd6c5b7a 100644 --- a/gfx/src/nsCoord.h +++ b/gfx/src/nsCoord.h @@ -110,6 +110,8 @@ inline nscoord NSToCoordRoundWithClamp(float aValue) if (aValue <= nscoord_MIN) { return nscoord_MIN; } + // NOTE: we can't replace the early returns above with fminf/fmaxf because + // NSToCoordRound(float(nscoord_MAX)) is negative on win32 (bug 1226627). #endif return NSToCoordRound(aValue); } @@ -259,12 +261,8 @@ inline nscoord NSToCoordFloorClamped(float aValue) { #ifndef NS_COORD_IS_FLOAT // Bounds-check before converting out of float, to avoid overflow - if (aValue >= nscoord_MAX) { - return nscoord_MAX; - } - if (aValue <= nscoord_MIN) { - return nscoord_MIN; - } + aValue = fminf(aValue, nscoord_MAX); + aValue = fmaxf(aValue, nscoord_MIN); #endif return NSToCoordFloor(aValue); } @@ -283,12 +281,8 @@ inline nscoord NSToCoordCeilClamped(double aValue) { #ifndef NS_COORD_IS_FLOAT // Bounds-check before converting out of double, to avoid overflow - if (aValue >= nscoord_MAX) { - return nscoord_MAX; - } - if (aValue <= nscoord_MIN) { - return nscoord_MIN; - } + aValue = fmin(aValue, nscoord_MAX); + aValue = fmax(aValue, nscoord_MIN); #endif return NSToCoordCeil(aValue); } @@ -315,12 +309,8 @@ inline nscoord NSToCoordTruncClamped(float aValue) { #ifndef NS_COORD_IS_FLOAT // Bounds-check before converting out of float, to avoid overflow - if (aValue >= nscoord_MAX) { - return nscoord_MAX; - } - if (aValue <= nscoord_MIN) { - return nscoord_MIN; - } + aValue = fminf(aValue, nscoord_MAX); + aValue = fmaxf(aValue, nscoord_MIN); #endif return NSToCoordTrunc(aValue); } @@ -329,12 +319,8 @@ inline nscoord NSToCoordTruncClamped(double aValue) { #ifndef NS_COORD_IS_FLOAT // Bounds-check before converting out of double, to avoid overflow - if (aValue >= nscoord_MAX) { - return nscoord_MAX; - } - if (aValue <= nscoord_MIN) { - return nscoord_MIN; - } + aValue = fmin(aValue, nscoord_MAX); + aValue = fmax(aValue, nscoord_MIN); #endif return NSToCoordTrunc(aValue); } From ae5c61f89f3920c8e92310d3ba382cb556016757 Mon Sep 17 00:00:00 2001 From: Sunny Sidhu Date: Sun, 29 Nov 2015 02:07:55 -0500 Subject: [PATCH 073/135] Bug 1220873 - Make Layer::mVisibleRegion a LayerIntRegion. r=botond --- dom/base/nsDOMWindowUtils.cpp | 4 ++-- embedding/browser/nsWebBrowser.cpp | 2 +- gfx/ipc/GfxMessageUtils.h | 8 +++++--- gfx/layers/LayerMetricsWrapper.h | 4 ++-- gfx/layers/LayerSorter.cpp | 4 ++-- gfx/layers/LayerTreeInvalidation.cpp | 14 +++++++------- gfx/layers/Layers.cpp | 18 +++++++++--------- gfx/layers/Layers.h | 12 ++++++------ gfx/layers/ReadbackProcessor.cpp | 2 +- gfx/layers/RotatedBuffer.cpp | 8 ++++---- .../test/gtest/TestAsyncPanZoomController.cpp | 4 ++-- gfx/layers/basic/BasicCanvasLayer.h | 2 +- gfx/layers/basic/BasicColorLayer.cpp | 2 +- gfx/layers/basic/BasicContainerLayer.cpp | 4 ++-- gfx/layers/basic/BasicContainerLayer.h | 2 +- gfx/layers/basic/BasicImageLayer.cpp | 2 +- gfx/layers/basic/BasicLayerManager.cpp | 10 +++++----- gfx/layers/basic/BasicLayersImpl.h | 2 +- gfx/layers/basic/BasicPaintedLayer.cpp | 4 ++-- gfx/layers/basic/BasicPaintedLayer.h | 4 ++-- gfx/layers/client/ClientCanvasLayer.h | 2 +- gfx/layers/client/ClientColorLayer.cpp | 2 +- gfx/layers/client/ClientContainerLayer.h | 2 +- gfx/layers/client/ClientImageLayer.cpp | 2 +- gfx/layers/client/ClientPaintedLayer.cpp | 4 ++-- gfx/layers/client/ClientPaintedLayer.h | 2 +- gfx/layers/client/ClientTiledPaintedLayer.cpp | 4 ++-- .../composite/ContainerLayerComposite.cpp | 12 ++++++------ gfx/layers/composite/LayerManagerComposite.cpp | 10 +++++----- gfx/layers/composite/LayerManagerComposite.h | 8 ++++---- gfx/layers/composite/PaintedLayerComposite.cpp | 2 +- gfx/layers/ipc/CompositorParent.cpp | 2 +- gfx/layers/ipc/LayersMessages.ipdlh | 3 ++- gfx/tests/gtest/TestCompositor.cpp | 6 +++--- gfx/tests/gtest/TestLayers.cpp | 2 +- layout/base/FrameLayerBuilder.cpp | 12 ++++++------ layout/base/nsPresContext.cpp | 2 +- layout/base/nsPresShell.cpp | 2 +- widget/gonk/HwcComposer2D.cpp | 2 +- 39 files changed, 98 insertions(+), 95 deletions(-) diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 9c0b9d01d44..03e6b16a55d 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -2567,7 +2567,7 @@ CheckLeafLayers(Layer* aLayer, const nsIntPoint& aOffset, nsIntRegion* aCoveredR child = child->GetNextSibling(); } } else { - nsIntRegion rgn = aLayer->GetVisibleRegion(); + nsIntRegion rgn = aLayer->GetVisibleRegion().ToUnknownRegion(); rgn.MoveBy(offset); nsIntRegion tmp; tmp.And(rgn, *aCoveredRegion); @@ -2603,7 +2603,7 @@ nsDOMWindowUtils::LeafLayersPartitionWindow(bool* aResult) if (!CheckLeafLayers(root, offset, &coveredRegion)) { *aResult = false; } - if (!coveredRegion.IsEqual(root->GetVisibleRegion())) { + if (!coveredRegion.IsEqual(root->GetVisibleRegion().ToUnknownRegion())) { *aResult = false; } #endif diff --git a/embedding/browser/nsWebBrowser.cpp b/embedding/browser/nsWebBrowser.cpp index 16dd55fff4c..ef7a29f9dca 100644 --- a/embedding/browser/nsWebBrowser.cpp +++ b/embedding/browser/nsWebBrowser.cpp @@ -1737,7 +1737,7 @@ nsWebBrowser::PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion) RefPtr root = layerManager->CreatePaintedLayer(); if (root) { nsIntRect dirtyRect = aRegion.GetBounds(); - root->SetVisibleRegion(dirtyRect); + root->SetVisibleRegion(LayerIntRegion::FromUnknownRegion(dirtyRect)); layerManager->SetRoot(root); } diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index af1ba71fbf7..feac536f85b 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -396,9 +396,11 @@ struct RegionParamTraits } }; -template<> -struct ParamTraits - : RegionParamTraits +template +struct ParamTraits> + : RegionParamTraits, + mozilla::gfx::IntRectTyped, + typename mozilla::gfx::IntRegionTyped::RectIterator> {}; template<> diff --git a/gfx/layers/LayerMetricsWrapper.h b/gfx/layers/LayerMetricsWrapper.h index a14a7735e56..e18fdeec37f 100644 --- a/gfx/layers/LayerMetricsWrapper.h +++ b/gfx/layers/LayerMetricsWrapper.h @@ -343,14 +343,14 @@ public: return nullptr; } - nsIntRegion GetVisibleRegion() const + LayerIntRegion GetVisibleRegion() const { MOZ_ASSERT(IsValid()); if (AtBottomLayer()) { return mLayer->GetVisibleRegion(); } - nsIntRegion region = mLayer->GetVisibleRegion(); + LayerIntRegion region = mLayer->GetVisibleRegion(); region.Transform(mLayer->GetTransform()); return region; } diff --git a/gfx/layers/LayerSorter.cpp b/gfx/layers/LayerSorter.cpp index f3149063f67..3408d3c4924 100644 --- a/gfx/layers/LayerSorter.cpp +++ b/gfx/layers/LayerSorter.cpp @@ -76,8 +76,8 @@ static gfxFloat RecoverZDepth(const Matrix4x4& aTransform, const gfxPoint& aPoin * unsolved without changing our rendering code. */ static LayerSortOrder CompareDepth(Layer* aOne, Layer* aTwo) { - gfxRect ourRect = ThebesRect(aOne->GetEffectiveVisibleRegion().GetBounds()); - gfxRect otherRect = ThebesRect(aTwo->GetEffectiveVisibleRegion().GetBounds()); + gfxRect ourRect = ThebesRect(aOne->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds()); + gfxRect otherRect = ThebesRect(aTwo->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds()); MOZ_ASSERT(aOne->GetParent() && aOne->GetParent()->Extend3DContext() && aTwo->GetParent() && aTwo->GetParent()->Extend3DContext()); diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp index 8425cd8f804..146ff820b2f 100644 --- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -125,7 +125,7 @@ NotifySubdocumentInvalidationRecursive(Layer* aLayer, NotifySubDocInvalidationFu NotifySubdocumentInvalidationRecursive(child, aCallback); } - aCallback(container, container->GetVisibleRegion()); + aCallback(container, container->GetVisibleRegion().ToUnknownRegion()); } struct LayerPropertiesBase : public LayerProperties @@ -133,7 +133,7 @@ struct LayerPropertiesBase : public LayerProperties explicit LayerPropertiesBase(Layer* aLayer) : mLayer(aLayer) , mMaskLayer(nullptr) - , mVisibleRegion(aLayer->GetVisibleRegion()) + , mVisibleRegion(aLayer->GetVisibleRegion().ToUnknownRegion()) , mInvalidRegion(aLayer->GetInvalidRegion()) , mPostXScale(aLayer->GetPostXScale()) , mPostYScale(aLayer->GetPostYScale()) @@ -235,13 +235,13 @@ struct LayerPropertiesBase : public LayerProperties IntRect NewTransformedBounds() { - return TransformRect(mLayer->GetVisibleRegion().GetBounds(), + return TransformRect(mLayer->GetVisibleRegion().ToUnknownRegion().GetBounds(), GetTransformForInvalidation(mLayer)); } IntRect OldTransformedBounds() { - return TransformRect(mVisibleRegion.GetBounds(), mTransform); + return TransformRect(mVisibleRegion.ToUnknownRegion().GetBounds(), mTransform); } virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, @@ -347,7 +347,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase } if (invalidateChildsCurrentArea) { aGeometryChanged = true; - AddTransformedRegion(result, child->GetVisibleRegion(), + AddTransformedRegion(result, child->GetVisibleRegion().ToUnknownRegion(), GetTransformForInvalidation(child)); if (aCallback) { NotifySubdocumentInvalidationRecursive(child, aCallback); @@ -454,7 +454,7 @@ struct ImageLayerProperties : public LayerPropertiesBase { ImageLayer* imageLayer = static_cast(mLayer.get()); - if (!imageLayer->GetVisibleRegion().IsEqual(mVisibleRegion)) { + if (!imageLayer->GetVisibleRegion().ToUnknownRegion().IsEqual(mVisibleRegion)) { aGeometryChanged = true; IntRect result = NewTransformedBounds(); result = result.Union(OldTransformedBounds()); @@ -596,7 +596,7 @@ LayerPropertiesBase::ComputeDifferences(Layer* aRoot, NotifySubDocInvalidationFu } else { ClearInvalidations(aRoot); } - IntRect result = TransformRect(aRoot->GetVisibleRegion().GetBounds(), + IntRect result = TransformRect(aRoot->GetVisibleRegion().ToUnknownRegion().GetBounds(), aRoot->GetLocalTransform()); result = result.Union(OldTransformedBounds()); if (aGeometryChanged != nullptr) { diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index ee1ef230a12..8693819f181 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -619,7 +619,7 @@ Layer::GetEffectiveClipRect() return GetClipRect(); } -const nsIntRegion& +const LayerIntRegion& Layer::GetEffectiveVisibleRegion() { if (LayerComposite* shadow = AsLayerComposite()) { @@ -1023,7 +1023,7 @@ Layer::GetVisibleRegionRelativeToRootLayer(nsIntRegion& aResult, } IntPoint offset; - aResult = GetEffectiveVisibleRegion(); + aResult = GetEffectiveVisibleRegion().ToUnknownRegion(); for (Layer* layer = this; layer; layer = layer->GetParent()) { gfx::Matrix matrix; if (!layer->GetLocalTransform().Is2D(&matrix) || @@ -1060,7 +1060,7 @@ Layer::GetVisibleRegionRelativeToRootLayer(nsIntRegion& aResult, // Retreive the translation from sibling to |layer|. The accumulated // visible region is currently oriented with |layer|. IntPoint siblingOffset = RoundedToInt(siblingMatrix.GetTranslation()); - nsIntRegion siblingVisibleRegion(sibling->GetEffectiveVisibleRegion()); + nsIntRegion siblingVisibleRegion(sibling->GetEffectiveVisibleRegion().ToUnknownRegion()); // Translate the siblings region to |layer|'s origin. siblingVisibleRegion.MoveBy(-siblingOffset.x, -siblingOffset.y); // Apply the sibling's clip. @@ -1894,7 +1894,7 @@ Layer::PrintInfo(std::stringstream& aStream, const char* aPrefix) AppendToString(aStream, mLayerBounds, " [bounds=", "]"); } if (!mVisibleRegion.IsEmpty()) { - AppendToString(aStream, mVisibleRegion, " [visible=", "]"); + AppendToString(aStream, mVisibleRegion.ToUnknownRegion(), " [visible=", "]"); } else { aStream << " [not visible]"; } @@ -2013,7 +2013,7 @@ Layer::DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent) DumpTransform(s->mutable_transform(), lc->GetShadowTransform()); } if (!lc->GetShadowVisibleRegion().IsEmpty()) { - DumpRegion(s->mutable_vregion(), lc->GetShadowVisibleRegion()); + DumpRegion(s->mutable_vregion(), lc->GetShadowVisibleRegion().ToUnknownRegion()); } } // Clip @@ -2025,8 +2025,8 @@ Layer::DumpPacket(layerscope::LayersPacket* aPacket, const void* aParent) DumpTransform(layer->mutable_transform(), mTransform); } // Visible region - if (!mVisibleRegion.IsEmpty()) { - DumpRegion(layer->mutable_vregion(), mVisibleRegion); + if (!mVisibleRegion.ToUnknownRegion().IsEmpty()) { + DumpRegion(layer->mutable_vregion(), mVisibleRegion.ToUnknownRegion()); } // EventRegions if (!mEventRegions.IsEmpty()) { @@ -2422,7 +2422,7 @@ PrintInfo(std::stringstream& aStream, LayerComposite* aLayerComposite) AppendToString(aStream, aLayerComposite->GetShadowTransform(), " [shadow-transform=", "]"); } if (!aLayerComposite->GetShadowVisibleRegion().IsEmpty()) { - AppendToString(aStream, aLayerComposite->GetShadowVisibleRegion(), " [shadow-visible=", "]"); + AppendToString(aStream, aLayerComposite->GetShadowVisibleRegion().ToUnknownRegion(), " [shadow-visible=", "]"); } } @@ -2435,7 +2435,7 @@ SetAntialiasingFlags(Layer* aLayer, DrawTarget* aTarget) return; } - const IntRect& bounds = aLayer->GetVisibleRegion().GetBounds(); + const IntRect& bounds = aLayer->GetVisibleRegion().ToUnknownRegion().GetBounds(); gfx::Rect transformedBounds = aTarget->GetTransform().TransformBounds(gfx::Rect(Float(bounds.x), Float(bounds.y), Float(bounds.width), Float(bounds.height))); transformedBounds.RoundOut(); diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index c72b11650e7..eb85e37e4e3 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -845,7 +845,7 @@ public: * visible region will be ignored. So if a layer draws outside the bounds * of its visible region, it needs to ensure that what it draws is valid. */ - virtual void SetVisibleRegion(const nsIntRegion& aRegion) + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) { if (!mVisibleRegion.IsEqual(aRegion)) { MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) VisibleRegion was %s is %s", this, @@ -1261,7 +1261,7 @@ public: const Maybe& GetClipRect() const { return mClipRect; } uint32_t GetContentFlags() { return mContentFlags; } const gfx::IntRect& GetLayerBounds() const { return mLayerBounds; } - const nsIntRegion& GetVisibleRegion() const { return mVisibleRegion; } + const LayerIntRegion& GetVisibleRegion() const { return mVisibleRegion; } const FrameMetrics& GetFrameMetrics(uint32_t aIndex) const; uint32_t GetFrameMetricsCount() const { return mFrameMetrics.Length(); } const nsTArray& GetAllFrameMetrics() { return mFrameMetrics; } @@ -1473,7 +1473,7 @@ public: // values that should be used when drawing this layer to screen, // accounting for this layer possibly being a shadow. const Maybe& GetEffectiveClipRect(); - const nsIntRegion& GetEffectiveVisibleRegion(); + const LayerIntRegion& GetEffectiveVisibleRegion(); bool Extend3DContext() { return GetContentFlags() & CONTENT_EXTEND_3D_CONTEXT; @@ -1644,7 +1644,7 @@ public: /** * Mark the entirety of the layer's visible region as being invalid. */ - void SetInvalidRectToVisibleRegion() { mInvalidRegion = GetVisibleRegion(); } + void SetInvalidRectToVisibleRegion() { mInvalidRegion = GetVisibleRegion().ToUnknownRegion(); } /** * Adds to the current invalid rect. @@ -1787,7 +1787,7 @@ protected: nsTArray> mAncestorMaskLayers; gfx::UserData mUserData; gfx::IntRect mLayerBounds; - nsIntRegion mVisibleRegion; + LayerIntRegion mVisibleRegion; nsTArray mFrameMetrics; EventRegions mEventRegions; gfx::Matrix4x4 mTransform; @@ -2088,7 +2088,7 @@ public: RenderTargetIntRect GetIntermediateSurfaceRect() { NS_ASSERTION(mUseIntermediateSurface, "Must have intermediate surface"); - return RenderTargetIntRect::FromUnknownRect(GetEffectiveVisibleRegion().GetBounds()); + return RenderTargetIntRect::FromUnknownRect(GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds()); } /** diff --git a/gfx/layers/ReadbackProcessor.cpp b/gfx/layers/ReadbackProcessor.cpp index 657e6b93822..22d7a53affc 100644 --- a/gfx/layers/ReadbackProcessor.cpp +++ b/gfx/layers/ReadbackProcessor.cpp @@ -63,7 +63,7 @@ FindBackgroundLayer(ReadbackLayer* aLayer, nsIntPoint* aOffset) nsIntPoint backgroundOffset(int32_t(backgroundTransform._31), int32_t(backgroundTransform._32)); IntRect rectInBackground(transformOffset - backgroundOffset, aLayer->GetSize()); - const nsIntRegion& visibleRegion = l->GetEffectiveVisibleRegion(); + const nsIntRegion visibleRegion = l->GetEffectiveVisibleRegion().ToUnknownRegion(); if (!visibleRegion.Intersects(rectInBackground)) continue; // Since l is present in the background, from here on we either choose l diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index e0a026799c5..6bf67b1b2b1 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -221,14 +221,14 @@ RotatedContentBuffer::DrawTo(PaintedLayer* aLayer, // Also clip to the visible region if we're told to. if (!aLayer->GetValidRegion().Contains(BufferRect()) || (ToData(aLayer)->GetClipToVisibleRegion() && - !aLayer->GetVisibleRegion().Contains(BufferRect())) || - IsClippingCheap(aTarget, aLayer->GetEffectiveVisibleRegion())) { + !aLayer->GetVisibleRegion().ToUnknownRegion().Contains(BufferRect())) || + IsClippingCheap(aTarget, aLayer->GetEffectiveVisibleRegion().ToUnknownRegion())) { // We don't want to draw invalid stuff, so we need to clip. Might as // well clip to the smallest area possible --- the visible region. // Bug 599189 if there is a non-integer-translation transform in aTarget, // we might sample pixels outside GetEffectiveVisibleRegion(), which is wrong // and may cause gray lines. - gfxUtils::ClipToRegion(aTarget, aLayer->GetEffectiveVisibleRegion()); + gfxUtils::ClipToRegion(aTarget, aLayer->GetEffectiveVisibleRegion().ToUnknownRegion()); clipped = true; } @@ -454,7 +454,7 @@ RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer, while (true) { mode = aLayer->GetSurfaceMode(); - neededRegion = aLayer->GetVisibleRegion(); + neededRegion = aLayer->GetVisibleRegion().ToUnknownRegion(); canReuseBuffer &= BufferSizeOkFor(neededRegion.GetBounds().Size()); result.mContentType = layerContentType; diff --git a/gfx/layers/apz/test/gtest/TestAsyncPanZoomController.cpp b/gfx/layers/apz/test/gtest/TestAsyncPanZoomController.cpp index 412117fd104..cc5b131811f 100644 --- a/gfx/layers/apz/test/gtest/TestAsyncPanZoomController.cpp +++ b/gfx/layers/apz/test/gtest/TestAsyncPanZoomController.cpp @@ -2080,7 +2080,7 @@ protected: if (aScrollId == FrameMetrics::START_SCROLL_ID) { metrics.SetIsLayersIdRoot(true); } - IntRect layerBound = aLayer->GetVisibleRegion().GetBounds(); + IntRect layerBound = aLayer->GetVisibleRegion().ToUnknownRegion().GetBounds(); metrics.SetCompositionBounds(ParentLayerRect(layerBound.x, layerBound.y, layerBound.width, layerBound.height)); metrics.SetScrollableRect(aScrollableRect); @@ -2755,7 +2755,7 @@ TEST_F(APZHitTestingTester, Bug1148350) { } mcc->AdvanceByMillis(100); - layers[0]->SetVisibleRegion(nsIntRegion(IntRect(0,50,200,150))); + layers[0]->SetVisibleRegion(LayerIntRegion(LayerIntRect(0,50,200,150))); layers[0]->SetBaseTransform(Matrix4x4::Translation(0, 50, 0)); manager->UpdateHitTestingTree(nullptr, root, false, 0, 0); diff --git a/gfx/layers/basic/BasicCanvasLayer.h b/gfx/layers/basic/BasicCanvasLayer.h index 3e5d4a19d4a..3cd930c1ea2 100644 --- a/gfx/layers/basic/BasicCanvasLayer.h +++ b/gfx/layers/basic/BasicCanvasLayer.h @@ -24,7 +24,7 @@ public: CopyableCanvasLayer(aLayerManager, static_cast(this)) { } - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/basic/BasicColorLayer.cpp b/gfx/layers/basic/BasicColorLayer.cpp index 3281574be7e..e847af9d1e0 100644 --- a/gfx/layers/basic/BasicColorLayer.cpp +++ b/gfx/layers/basic/BasicColorLayer.cpp @@ -39,7 +39,7 @@ protected: } public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/basic/BasicContainerLayer.cpp b/gfx/layers/basic/BasicContainerLayer.cpp index 25ee8bb0e0b..d73131e9b17 100644 --- a/gfx/layers/basic/BasicContainerLayer.cpp +++ b/gfx/layers/basic/BasicContainerLayer.cpp @@ -109,7 +109,7 @@ BasicContainerLayer::ChildrenPartitionVisibleRegion(const gfx::IntRect& aInRect) return false; nsIntPoint offset(int32_t(transform._31), int32_t(transform._32)); - gfx::IntRect rect = aInRect.Intersect(GetEffectiveVisibleRegion().GetBounds() + offset); + gfx::IntRect rect = aInRect.Intersect(GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds() + offset); nsIntRegion covered; for (Layer* l = mFirstChild; l; l = l->GetNextSibling()) { @@ -121,7 +121,7 @@ BasicContainerLayer::ChildrenPartitionVisibleRegion(const gfx::IntRect& aInRect) ThebesMatrix(childTransform).HasNonIntegerTranslation() || l->GetEffectiveOpacity() != 1.0) return false; - nsIntRegion childRegion = l->GetEffectiveVisibleRegion(); + nsIntRegion childRegion = l->GetEffectiveVisibleRegion().ToUnknownRegion(); childRegion.MoveBy(int32_t(childTransform._31), int32_t(childTransform._32)); childRegion.And(childRegion, rect); if (l->GetClipRect()) { diff --git a/gfx/layers/basic/BasicContainerLayer.h b/gfx/layers/basic/BasicContainerLayer.h index beca21da3ff..c8227f6e97d 100644 --- a/gfx/layers/basic/BasicContainerLayer.h +++ b/gfx/layers/basic/BasicContainerLayer.h @@ -29,7 +29,7 @@ protected: virtual ~BasicContainerLayer(); public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index 3023b6f641d..12ce1b00039 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -38,7 +38,7 @@ protected: } public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index 32c206133d3..937fa474767 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -245,7 +245,7 @@ public: // Set the opaque rect to match the bounds of the visible region. void AnnotateOpaqueRect() { - const nsIntRegion& visibleRegion = mLayer->GetEffectiveVisibleRegion(); + const nsIntRegion visibleRegion = mLayer->GetEffectiveVisibleRegion().ToUnknownRegion(); const IntRect& bounds = visibleRegion.GetBounds(); DrawTarget *dt = mTarget->GetDrawTarget(); @@ -432,7 +432,7 @@ MarkLayersHidden(Layer* aLayer, const IntRect& aClipRect, return; } - nsIntRegion region = aLayer->GetEffectiveVisibleRegion(); + nsIntRegion region = aLayer->GetEffectiveVisibleRegion().ToUnknownRegion(); IntRect r = region.GetBounds(); TransformIntRect(r, transform, ToOutsideIntRect); r.IntersectRect(r, aDirtyRect); @@ -920,7 +920,7 @@ BasicLayerManager::FlushGroup(PaintLayerContext& aPaintContext, bool aNeedsClipT if (!mTransactionIncomplete) { if (aNeedsClipToVisibleRegion) { gfxUtils::ClipToRegion(aPaintContext.mTarget, - aPaintContext.mLayer->GetEffectiveVisibleRegion()); + aPaintContext.mLayer->GetEffectiveVisibleRegion().ToUnknownRegion()); } CompositionOp op = GetEffectiveOperator(aPaintContext.mLayer); @@ -1032,7 +1032,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget, paintLayerContext.Apply2DTransform(); - const nsIntRegion& visibleRegion = aLayer->GetEffectiveVisibleRegion(); + const nsIntRegion visibleRegion = aLayer->GetEffectiveVisibleRegion().ToUnknownRegion(); // If needsGroup is true, we'll clip to the visible region after we've popped the group if (needsClipToVisibleRegion && !needsGroup) { gfxUtils::ClipToRegion(aTarget, visibleRegion); @@ -1053,7 +1053,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget, if (is2D) { if (needsGroup) { PushedGroup pushedGroup = - PushGroupForLayer(aTarget, aLayer, aLayer->GetEffectiveVisibleRegion()); + PushGroupForLayer(aTarget, aLayer, aLayer->GetEffectiveVisibleRegion().ToUnknownRegion()); PaintSelfOrChildren(paintLayerContext, pushedGroup.mGroupTarget); PopGroupForLayer(pushedGroup); } else { diff --git a/gfx/layers/basic/BasicLayersImpl.h b/gfx/layers/basic/BasicLayersImpl.h index eb2cc981ce6..8ea3f9f0599 100644 --- a/gfx/layers/basic/BasicLayersImpl.h +++ b/gfx/layers/basic/BasicLayersImpl.h @@ -62,7 +62,7 @@ protected: } public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/basic/BasicPaintedLayer.cpp b/gfx/layers/basic/BasicPaintedLayer.cpp index b93ac4d1dab..81acd0b630f 100644 --- a/gfx/layers/basic/BasicPaintedLayer.cpp +++ b/gfx/layers/basic/BasicPaintedLayer.cpp @@ -63,7 +63,7 @@ BasicPaintedLayer::PaintThebes(gfxContext* aContext, mValidRegion.SetEmpty(); mContentClient->Clear(); - nsIntRegion toDraw = IntersectWithClip(GetEffectiveVisibleRegion(), aContext); + nsIntRegion toDraw = IntersectWithClip(GetEffectiveVisibleRegion().ToUnknownRegion(), aContext); RenderTraceInvalidateStart(this, "FFFF00", toDraw.GetBounds()); @@ -168,7 +168,7 @@ BasicPaintedLayer::Validate(LayerManager::DrawPaintedLayerCallback aCallback, // from RGB to RGBA, because we might need to repaint with // subpixel AA) state.mRegionToInvalidate.And(state.mRegionToInvalidate, - GetEffectiveVisibleRegion()); + GetEffectiveVisibleRegion().ToUnknownRegion()); SetAntialiasingFlags(this, target); RenderTraceInvalidateStart(this, "FFFF00", state.mRegionToDraw.GetBounds()); diff --git a/gfx/layers/basic/BasicPaintedLayer.h b/gfx/layers/basic/BasicPaintedLayer.h index ae5d896121b..4518b64fce9 100644 --- a/gfx/layers/basic/BasicPaintedLayer.h +++ b/gfx/layers/basic/BasicPaintedLayer.h @@ -44,7 +44,7 @@ protected: } public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); @@ -119,7 +119,7 @@ protected: // here (OR doesn't automatically simplify to the simplest possible // representation of a region.) nsIntRegion tmp; - tmp.Or(mVisibleRegion, aExtendedRegionToDraw); + tmp.Or(mVisibleRegion.ToUnknownRegion(), aExtendedRegionToDraw); mValidRegion.Or(mValidRegion, tmp); } diff --git a/gfx/layers/client/ClientCanvasLayer.h b/gfx/layers/client/ClientCanvasLayer.h index d2308197b17..6e633ad4b7c 100644 --- a/gfx/layers/client/ClientCanvasLayer.h +++ b/gfx/layers/client/ClientCanvasLayer.h @@ -44,7 +44,7 @@ protected: virtual ~ClientCanvasLayer(); public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(ClientManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/client/ClientColorLayer.cpp b/gfx/layers/client/ClientColorLayer.cpp index 9452b15d784..d58d1e108c7 100644 --- a/gfx/layers/client/ClientColorLayer.cpp +++ b/gfx/layers/client/ClientColorLayer.cpp @@ -34,7 +34,7 @@ protected: } public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) { NS_ASSERTION(ClientManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/client/ClientContainerLayer.h b/gfx/layers/client/ClientContainerLayer.h index 30d6669d98b..c6ad5b65800 100644 --- a/gfx/layers/client/ClientContainerLayer.h +++ b/gfx/layers/client/ClientContainerLayer.h @@ -71,7 +71,7 @@ public: } } - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(ClientManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/client/ClientImageLayer.cpp b/gfx/layers/client/ClientImageLayer.cpp index d3104fbead0..454dfe20ddf 100644 --- a/gfx/layers/client/ClientImageLayer.cpp +++ b/gfx/layers/client/ClientImageLayer.cpp @@ -46,7 +46,7 @@ protected: mImageClientTypeContainer = CompositableType::UNKNOWN; } - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(ClientManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/client/ClientPaintedLayer.cpp b/gfx/layers/client/ClientPaintedLayer.cpp index 69ed841d579..8192d93cec2 100644 --- a/gfx/layers/client/ClientPaintedLayer.cpp +++ b/gfx/layers/client/ClientPaintedLayer.cpp @@ -75,7 +75,7 @@ ClientPaintedLayer::PaintThebes() // from RGB to RGBA, because we might need to repaint with // subpixel AA) state.mRegionToInvalidate.And(state.mRegionToInvalidate, - GetEffectiveVisibleRegion()); + GetEffectiveVisibleRegion().ToUnknownRegion()); bool didUpdate = false; RotatedContentBuffer::DrawIterator iter; @@ -110,7 +110,7 @@ ClientPaintedLayer::PaintThebes() // so deleting this Hold for whatever reason will break things. ClientManager()->Hold(this); contentClientRemote->Updated(state.mRegionToDraw, - mVisibleRegion, + mVisibleRegion.ToUnknownRegion(), state.mDidSelfCopy); } } diff --git a/gfx/layers/client/ClientPaintedLayer.h b/gfx/layers/client/ClientPaintedLayer.h index 670a1c75fd5..cfc17ba10e6 100644 --- a/gfx/layers/client/ClientPaintedLayer.h +++ b/gfx/layers/client/ClientPaintedLayer.h @@ -50,7 +50,7 @@ protected: } public: - virtual void SetVisibleRegion(const nsIntRegion& aRegion) override + virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(ClientManager()->InConstruction(), "Can only set properties in construction phase"); diff --git a/gfx/layers/client/ClientTiledPaintedLayer.cpp b/gfx/layers/client/ClientTiledPaintedLayer.cpp index eee40667829..ef0d6783816 100644 --- a/gfx/layers/client/ClientTiledPaintedLayer.cpp +++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp @@ -410,7 +410,7 @@ ClientTiledPaintedLayer::RenderLayer() ClientManager()->GetPaintedLayerCallback(); void *data = ClientManager()->GetPaintedLayerCallbackData(); - IntSize layerSize = mVisibleRegion.GetBounds().Size(); + IntSize layerSize = mVisibleRegion.ToUnknownRegion().GetBounds().Size(); if (mContentClient && !mContentClient->SupportsLayerSize(layerSize, ClientManager())) { ClearCachedResources(); MOZ_ASSERT(!mContentClient); @@ -439,7 +439,7 @@ ClientTiledPaintedLayer::RenderLayer() TILING_LOG("TILING %p: Initial valid region %s\n", this, Stringify(mValidRegion).c_str()); TILING_LOG("TILING %p: Initial low-precision valid region %s\n", this, Stringify(mLowPrecisionValidRegion).c_str()); - nsIntRegion neededRegion = mVisibleRegion; + nsIntRegion neededRegion = mVisibleRegion.ToUnknownRegion(); #ifndef MOZ_IGNORE_PAINT_WILL_RESAMPLE // This is handled by PadDrawTargetOutFromRegion in TiledContentClient for mobile if (MayResample()) { diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp index d35a519ead5..d1ae2e8e573 100755 --- a/gfx/layers/composite/ContainerLayerComposite.cpp +++ b/gfx/layers/composite/ContainerLayerComposite.cpp @@ -83,11 +83,11 @@ static void DrawLayerInfo(const RenderTargetIntRect& aClipRect, std::stringstream ss; aLayer->PrintInfo(ss, ""); - nsIntRegion visibleRegion = aLayer->GetVisibleRegion(); + LayerIntRegion visibleRegion = aLayer->GetVisibleRegion(); uint32_t maxWidth = std::min(visibleRegion.GetBounds().width, 500); - IntPoint topLeft = visibleRegion.GetBounds().TopLeft(); + IntPoint topLeft = visibleRegion.ToUnknownRegion().GetBounds().TopLeft(); aManager->GetTextRenderer()->RenderText(ss.str().c_str(), topLeft, aLayer->GetEffectiveTransform(), 16, maxWidth); @@ -96,7 +96,7 @@ static void DrawLayerInfo(const RenderTargetIntRect& aClipRect, template static gfx::IntRect ContainerVisibleRect(ContainerT* aContainer) { - gfx::IntRect surfaceRect = aContainer->GetEffectiveVisibleRegion().GetBounds(); + gfx::IntRect surfaceRect = aContainer->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds(); return surfaceRect; } @@ -233,7 +233,7 @@ ContainerRenderVR(ContainerT* aContainer, IntRectToRect(static_cast(layer)->GetBounds()); } else { layerBounds = - IntRectToRect(layer->GetEffectiveVisibleRegion().GetBounds()); + IntRectToRect(layer->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds()); } const gfx::Matrix4x4 childTransform = layer->GetEffectiveTransform(); layerBounds = childTransform.TransformBounds(layerBounds); @@ -642,7 +642,7 @@ CreateTemporaryTargetAndCopyFromBackground(ContainerT* aContainer, LayerManagerComposite* aManager) { Compositor* compositor = aManager->GetCompositor(); - gfx::IntRect visibleRect = aContainer->GetEffectiveVisibleRegion().GetBounds(); + gfx::IntRect visibleRect = aContainer->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds(); RefPtr previousTarget = compositor->GetCurrentRenderTarget(); gfx::IntRect surfaceRect = gfx::IntRect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height); @@ -710,7 +710,7 @@ ContainerRender(ContainerT* aContainer, return; } - gfx::Rect visibleRect(aContainer->GetEffectiveVisibleRegion().GetBounds()); + gfx::Rect visibleRect(aContainer->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds()); RefPtr compositor = aManager->GetCompositor(); #ifdef MOZ_DUMP_PAINTING if (gfxEnv::DumpCompositorTextures()) { diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index e8074aed99b..593ace4d584 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -238,7 +238,7 @@ LayerManagerComposite::PostProcessLayers(Layer* aLayer, // Recalculate our visible region. LayerComposite* composite = aLayer->AsLayerComposite(); - LayerIntRegion visible = LayerIntRegion::FromUnknownRegion(composite->GetShadowVisibleRegion()); + LayerIntRegion visible = composite->GetShadowVisibleRegion(); // If we have descendants, throw away the visible region stored on this // layer, and use the region accumulated by our descendants instead. @@ -251,7 +251,7 @@ LayerManagerComposite::PostProcessLayers(Layer* aLayer, visible.SubOut(LayerIntRegion::FromUnknownRegion(obscured)); } - composite->SetShadowVisibleRegion(visible.ToUnknownRegion()); + composite->SetShadowVisibleRegion(visible); // Transform the newly calculated visible region into our parent's space, // apply our clip to it (if any), and accumulate it into |aVisibleRegion| @@ -1140,7 +1140,7 @@ LayerManagerComposite::ComputeRenderIntegrityInternal(Layer* aLayer, } // See if there's any incomplete rendering - nsIntRegion incompleteRegion = aLayer->GetEffectiveVisibleRegion(); + nsIntRegion incompleteRegion = aLayer->GetEffectiveVisibleRegion().ToUnknownRegion(); incompleteRegion.Sub(incompleteRegion, paintedLayer->GetValidRegion()); if (!incompleteRegion.IsEmpty()) { @@ -1475,14 +1475,14 @@ nsIntRegion LayerComposite::GetFullyRenderedRegion() { if (TiledContentHost* tiled = GetCompositableHost() ? GetCompositableHost()->AsTiledContentHost() : nullptr) { - nsIntRegion shadowVisibleRegion = GetShadowVisibleRegion(); + nsIntRegion shadowVisibleRegion = GetShadowVisibleRegion().ToUnknownRegion(); // Discard the region which hasn't been drawn yet when doing // progressive drawing. Note that if the shadow visible region // shrunk the tiled valig region may not have discarded this yet. shadowVisibleRegion.And(shadowVisibleRegion, tiled->GetValidRegion()); return shadowVisibleRegion; } else { - return GetShadowVisibleRegion(); + return GetShadowVisibleRegion().ToUnknownRegion(); } } diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index ed07925e054..9762c3630de 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -449,7 +449,7 @@ public: * * They are analogous to the Layer interface. */ - void SetShadowVisibleRegion(const nsIntRegion& aRegion) + void SetShadowVisibleRegion(const LayerIntRegion& aRegion) { mShadowVisibleRegion = aRegion; } @@ -486,7 +486,7 @@ public: // These getters can be used anytime. float GetShadowOpacity() { return mShadowOpacity; } const Maybe& GetShadowClipRect() { return mShadowClipRect; } - const nsIntRegion& GetShadowVisibleRegion() { return mShadowVisibleRegion; } + const LayerIntRegion& GetShadowVisibleRegion() { return mShadowVisibleRegion; } const gfx::Matrix4x4& GetShadowTransform() { return mShadowTransform; } bool GetShadowTransformSetByAnimation() { return mShadowTransformSetByAnimation; } bool HasLayerBeenComposited() { return mLayerComposited; } @@ -501,7 +501,7 @@ public: protected: gfx::Matrix4x4 mShadowTransform; - nsIntRegion mShadowVisibleRegion; + LayerIntRegion mShadowVisibleRegion; Maybe mShadowClipRect; LayerManagerComposite* mCompositeManager; RefPtr mCompositor; @@ -576,7 +576,7 @@ RenderWithAllMasks(Layer* aLayer, Compositor* aCompositor, // into. The final mask gets rendered into the original render target. // Calculate the size of the intermediate surfaces. - gfx::Rect visibleRect(aLayer->GetEffectiveVisibleRegion().GetBounds()); + gfx::Rect visibleRect(aLayer->GetEffectiveVisibleRegion().ToUnknownRegion().GetBounds()); gfx::Matrix4x4 transform = aLayer->GetEffectiveTransform(); // TODO: Use RenderTargetIntRect and TransformTo<...> here gfx::IntRect surfaceRect = diff --git a/gfx/layers/composite/PaintedLayerComposite.cpp b/gfx/layers/composite/PaintedLayerComposite.cpp index 3e040305604..e6493d3edfd 100644 --- a/gfx/layers/composite/PaintedLayerComposite.cpp +++ b/gfx/layers/composite/PaintedLayerComposite.cpp @@ -112,7 +112,7 @@ PaintedLayerComposite::RenderLayer(const gfx::IntRect& aClipRect) mBuffer->GetLayer() == this, "buffer is corrupted"); - const nsIntRegion& visibleRegion = GetEffectiveVisibleRegion(); + const nsIntRegion visibleRegion = GetEffectiveVisibleRegion().ToUnknownRegion(); #ifdef MOZ_DUMP_PAINTING if (gfxEnv::DumpCompositorTextures()) { diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index cf4389d17c1..da6bf3e7549 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -773,7 +773,7 @@ CompositorParent::Invalidate() { if (mLayerManager && mLayerManager->GetRoot()) { mLayerManager->AddInvalidRegion( - mLayerManager->GetRoot()->GetVisibleRegion().GetBounds()); + mLayerManager->GetRoot()->GetVisibleRegion().ToUnknownRegion().GetBounds()); } } diff --git a/gfx/layers/ipc/LayersMessages.ipdlh b/gfx/layers/ipc/LayersMessages.ipdlh index 5e8302333c0..d7c58ce0bb6 100644 --- a/gfx/layers/ipc/LayersMessages.ipdlh +++ b/gfx/layers/ipc/LayersMessages.ipdlh @@ -34,6 +34,7 @@ using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h using mozilla::LayerMargin from "Units.h"; using mozilla::LayerPoint from "Units.h"; using mozilla::LayerRect from "Units.h"; +using mozilla::LayerIntRegion from "Units.h"; using mozilla::ParentLayerIntRect from "Units.h"; using mozilla::layers::ScaleMode from "mozilla/layers/LayersTypes.h"; using mozilla::layers::EventRegions from "mozilla/layers/LayersTypes.h"; @@ -202,7 +203,7 @@ struct Animation { // Change a layer's attributes struct CommonLayerAttributes { IntRect layerBounds; - nsIntRegion visibleRegion; + LayerIntRegion visibleRegion; EventRegions eventRegions; TransformMatrix transform; bool transformIsPerspective; diff --git a/gfx/tests/gtest/TestCompositor.cpp b/gfx/tests/gtest/TestCompositor.cpp index 04eaa8ab65f..d6b7442cbcb 100644 --- a/gfx/tests/gtest/TestCompositor.cpp +++ b/gfx/tests/gtest/TestCompositor.cpp @@ -243,19 +243,19 @@ TEST(Gfx, CompositorSimpleTree) { // background ColorLayer* colorLayer = layers[1]->AsColorLayer(); colorLayer->SetColor(Color(1.f, 0.f, 1.f, 1.f)); - colorLayer->SetBounds(colorLayer->GetVisibleRegion().GetBounds()); + colorLayer->SetBounds(colorLayer->GetVisibleRegion().ToUnknownRegion().GetBounds()); } { ColorLayer* colorLayer = layers[2]->AsColorLayer(); colorLayer->SetColor(Color(1.f, 0.f, 0.f, 1.f)); - colorLayer->SetBounds(colorLayer->GetVisibleRegion().GetBounds()); + colorLayer->SetBounds(colorLayer->GetVisibleRegion().ToUnknownRegion().GetBounds()); } { ColorLayer* colorLayer = layers[3]->AsColorLayer(); colorLayer->SetColor(Color(0.f, 0.f, 1.f, 1.f)); - colorLayer->SetBounds(colorLayer->GetVisibleRegion().GetBounds()); + colorLayer->SetBounds(colorLayer->GetVisibleRegion().ToUnknownRegion().GetBounds()); } RefPtr refDT = CreateDT(); diff --git a/gfx/tests/gtest/TestLayers.cpp b/gfx/tests/gtest/TestLayers.cpp index 5f63a66af23..ac7ab49272b 100644 --- a/gfx/tests/gtest/TestLayers.cpp +++ b/gfx/tests/gtest/TestLayers.cpp @@ -214,7 +214,7 @@ already_AddRefed CreateLayerTree( } else { RefPtr layer = CreateLayer(aLayerTreeDescription[i], manager.get()); if (aVisibleRegions) { - layer->SetVisibleRegion(aVisibleRegions[layerNumber]); + layer->SetVisibleRegion(LayerIntRegion::FromUnknownRegion(aVisibleRegions[layerNumber])); layer->SetEventRegions(EventRegions(aVisibleRegions[layerNumber])); } if (aTransforms) { diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 586b74453c7..ca4568f8296 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -2284,7 +2284,7 @@ ComputeAndSetIgnoreInvalidationRect(PaintedLayer* aLayer, nsIntRect maxNewVisibleBounds = dirtyRect.ScaleToOutsidePixels(aData->mXScale, aData->mYScale, aData->mAppUnitsPerDevPixel) - aLayerTranslation; - aData->mOldVisibleBounds = aLayer->GetVisibleRegion().GetBounds(); + aData->mOldVisibleBounds = aLayer->GetVisibleRegion().ToUnknownRegion().GetBounds(); // When the visible region of aLayer changes (e.g. due to scrolling), // three distinct types of invalidations need to be triggered: @@ -2462,7 +2462,7 @@ SetOuterVisibleRegion(Layer* aLayer, nsIntRegion* aOuterVisibleRegion, } } - aLayer->SetVisibleRegion(*aOuterVisibleRegion); + aLayer->SetVisibleRegion(LayerIntRegion::FromUnknownRegion(*aOuterVisibleRegion)); } void @@ -3181,7 +3181,7 @@ void ContainerState::FinishPaintedLayerData(PaintedLayerData& aData, FindOpaqueB // can find and recycle it later. ParentLayerIntRect emptyRect; data->mLayer->SetClipRect(Some(emptyRect)); - data->mLayer->SetVisibleRegion(nsIntRegion()); + data->mLayer->SetVisibleRegion(LayerIntRegion()); data->mLayer->InvalidateRegion(data->mLayer->GetValidRegion().GetBounds()); data->mLayer->SetEventRegions(EventRegions()); } @@ -4808,7 +4808,7 @@ InvalidateVisibleBoundsChangesForScrolledLayer(PaintedLayer* aLayer) // window that are in the visible region's bounds but not in the visible // region itself, but that is acceptable for scrolled layers. nsIntRegion rgn; - rgn.Or(data->mOldVisibleBounds, aLayer->GetVisibleRegion().GetBounds()); + rgn.Or(data->mOldVisibleBounds, aLayer->GetVisibleRegion().ToUnknownRegion().GetBounds()); rgn.Sub(rgn, *data->mIgnoreInvalidationsOutsideRect); if (!rgn.IsEmpty()) { aLayer->InvalidateRegion(rgn); @@ -5408,7 +5408,7 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder, // If aContainerItem is non-null some BuildContainerLayer further up the // call stack is responsible for setting containerLayer's visible region. if (!aContainerItem) { - containerLayer->SetVisibleRegion(pixBounds); + containerLayer->SetVisibleRegion(LayerIntRegion::FromUnknownRegion(pixBounds)); } if (aParameters.mLayerContentsVisibleRect) { *aParameters.mLayerContentsVisibleRect = pixBounds + scaleParameters.mOffset; @@ -5743,7 +5743,7 @@ static void DrawForcedBackgroundColor(DrawTarget& aDrawTarget, aBackgroundColor) { if (NS_GET_A(aBackgroundColor) > 0) { - nsIntRect r = aLayer->GetVisibleRegion().GetBounds(); + LayerIntRect r = aLayer->GetVisibleRegion().GetBounds(); ColorPattern color(ToDeviceColor(aBackgroundColor)); aDrawTarget.FillRect(Rect(r.x, r.y, r.width, r.height), color); } diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index db352b3cda6..80492021dd2 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -2543,7 +2543,7 @@ nsPresContext::NotifySubDocInvalidation(ContainerLayer* aContainer, return; } - nsIntPoint topLeft = aContainer->GetVisibleRegion().GetBounds().TopLeft(); + nsIntPoint topLeft = aContainer->GetVisibleRegion().ToUnknownRegion().GetBounds().TopLeft(); nsIntRegionRectIterator iter(aRegion); while (const nsIntRect* r = iter.Next()) { diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 9f28d2a20e1..8aa73e87b5f 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -6130,7 +6130,7 @@ PresShell::Paint(nsView* aViewToPaint, pc->GetVisibleArea().ToOutsidePixels(pc->AppUnitsPerDevPixel()); bgcolor = NS_ComposeColors(bgcolor, mCanvasBackgroundColor); root->SetColor(Color::FromABGR(bgcolor)); - root->SetVisibleRegion(bounds); + root->SetVisibleRegion(LayerIntRegion::FromUnknownRegion(bounds)); layerManager->SetRoot(root); } MaybeSetupTransactionIdAllocator(layerManager, aViewToPaint); diff --git a/widget/gonk/HwcComposer2D.cpp b/widget/gonk/HwcComposer2D.cpp index 842189fa464..d9ac2ebbf08 100644 --- a/widget/gonk/HwcComposer2D.cpp +++ b/widget/gonk/HwcComposer2D.cpp @@ -278,7 +278,7 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer, bool fillColor = false; - const nsIntRegion& visibleRegion = aLayer->GetEffectiveVisibleRegion(); + const nsIntRegion visibleRegion = aLayer->GetEffectiveVisibleRegion().ToUnknownRegion(); if (visibleRegion.IsEmpty()) { return true; } From 030af34a850603c7dbc38298e025910a283a9466 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sun, 29 Nov 2015 12:38:30 -0800 Subject: [PATCH 074/135] Back out a25efba616ac (bug 1218473) on suspicion of causing Windows 8 shutdown crashes "with exit code 3221225477" --- toolkit/xre/test/win/moz.build | 1 - xpcom/build/nsWindowsDllInterceptor.h | 92 --------------------------- 2 files changed, 93 deletions(-) diff --git a/toolkit/xre/test/win/moz.build b/toolkit/xre/test/win/moz.build index be6b4ed90ed..127b0aa98b9 100644 --- a/toolkit/xre/test/win/moz.build +++ b/toolkit/xre/test/win/moz.build @@ -19,7 +19,6 @@ LOCAL_INCLUDES += [ '/toolkit/xre', ] -DISABLE_STL_WRAPPING = True USE_STATIC_LIBS = True OS_LIBS += [ diff --git a/xpcom/build/nsWindowsDllInterceptor.h b/xpcom/build/nsWindowsDllInterceptor.h index a15b6e2bc65..1ef9a7a5fd7 100644 --- a/xpcom/build/nsWindowsDllInterceptor.h +++ b/xpcom/build/nsWindowsDllInterceptor.h @@ -6,15 +6,9 @@ #ifndef NS_WINDOWS_DLL_INTERCEPTOR_H_ #define NS_WINDOWS_DLL_INTERCEPTOR_H_ - -#include #include #include -#include "mozilla/ArrayUtils.h" -#include "nsAutoPtr.h" -#include "nsWindowsHelpers.h" - /* * Simple function interception. * @@ -146,12 +140,6 @@ public: void Init(const char* aModuleName) { - if (!IsCompatible()) { -#if defined(MOZILLA_INTERNAL_API) - NS_WARNING("NOP space patching is unavailable for compatibility reasons"); -#endif - return; - } mModule = LoadLibraryExA(aModuleName, nullptr, 0); if (!mModule) { //printf("LoadLibraryEx for '%s' failed\n", aModuleName); @@ -159,92 +147,12 @@ public: } } - /** - * NVIDIA Optimus drivers utilize Microsoft Detours 2.x to patch functions - * in our address space. There is a bug in Detours 2.x that causes it to - * patch at the wrong address when attempting to detour code that is already - * NOP space patched. This function is an effort to detect the presence of - * this NVIDIA code in our address space and disable NOP space patching if it - * is. We also check AppInit_DLLs since this is the mechanism that the Optimus - * drivers use to inject into our process. - */ - static bool IsCompatible() - { - // These DLLs are known to have bad interactions with this style of patching - const wchar_t* kIncompatibleDLLs[] = { - MOZ_UTF16("detoured.dll"), - MOZ_UTF16("_etoured.dll"), - MOZ_UTF16("nvd3d9wrap.dll"), - MOZ_UTF16("nvdxgiwrap.dll") - }; - // See if the infringing DLLs are already loaded - for (unsigned int i = 0; i < mozilla::ArrayLength(kIncompatibleDLLs); ++i) { - if (GetModuleHandleW(kIncompatibleDLLs[i])) { - return false; - } - } - if (GetModuleHandleW(MOZ_UTF16("user32.dll"))) { - // user32 is loaded but the infringing DLLs are not, assume we're safe to - // proceed. - return true; - } - // If user32 has not loaded yet, check AppInit_DLLs to ensure that Optimus - // won't be loaded once user32 is initialized. - HKEY hkey = NULL; - if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, - MOZ_UTF16("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows"), - 0, KEY_QUERY_VALUE, &hkey)) { - nsAutoRegKey key(hkey); - DWORD numBytes = 0; - const wchar_t kAppInitDLLs[] = MOZ_UTF16("AppInit_DLLs"); - // Query for required buffer size - LONG status = RegQueryValueExW(hkey, kAppInitDLLs, nullptr, - nullptr, nullptr, &numBytes); - nsAutoArrayPtr data; - if (!status) { - // Allocate the buffer and query for the actual data - data = new wchar_t[numBytes / sizeof(wchar_t)]; - status = RegQueryValueExW(hkey, kAppInitDLLs, nullptr, - nullptr, (LPBYTE)data.get(), &numBytes); - } - if (!status) { - // For each token, split up the filename components and then check the - // name of the file. - const wchar_t kDelimiters[] = MOZ_UTF16(", "); - wchar_t* tokenContext = nullptr; - wchar_t* token = wcstok_s(data, kDelimiters, &tokenContext); - while (token) { - wchar_t fname[_MAX_FNAME] = {0}; - if (!_wsplitpath_s(token, nullptr, 0, nullptr, 0, - fname, mozilla::ArrayLength(fname), - nullptr, 0)) { - // nvinit.dll is responsible for bootstrapping the DLL injection, so - // that is the library that we check for here - const wchar_t kNvInitName[] = MOZ_UTF16("nvinit"); - if (!_wcsnicmp(fname, kNvInitName, - mozilla::ArrayLength(kNvInitName))) { - return false; - } - } - token = wcstok_s(nullptr, kDelimiters, &tokenContext); - } - } - } - return true; - } - #if defined(_M_IX86) bool AddHook(const char* aName, intptr_t aHookDest, void** aOrigFunc) { if (!mModule) { return false; } - if (!IsCompatible()) { -#if defined(MOZILLA_INTERNAL_API) - NS_WARNING("NOP space patching is unavailable for compatibility reasons"); -#endif - return false; - } if (mPatchedFnsLen == maxPatchedFns) { // printf ("No space for hook in mPatchedFns.\n"); From 25317f88addf5d1433668f857ec226f7ba209dca Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Sun, 29 Nov 2015 16:11:16 -0500 Subject: [PATCH 075/135] Bug 1133873 - some spdy logs r=hurley --- netwerk/protocol/http/SpdySession31.cpp | 2 +- netwerk/protocol/http/SpdyStream31.cpp | 56 ++++++++++++++++++++----- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/netwerk/protocol/http/SpdySession31.cpp b/netwerk/protocol/http/SpdySession31.cpp index f7abf9ceeee..2a807321cfb 100644 --- a/netwerk/protocol/http/SpdySession31.cpp +++ b/netwerk/protocol/http/SpdySession31.cpp @@ -2057,7 +2057,7 @@ SpdySession31::WriteSegments(nsAHttpSegmentWriter *writer, mInputFrameDataStream->SetRecvdData(true); rv = ResponseHeadersComplete(); if (rv == NS_ERROR_ILLEGAL_VALUE) { - LOG3(("SpdySession31 %p PROTOCOL_ERROR detected 0x%X\n", + LOG3(("SpdySession31 %p ResponseHeadersComplete PROTOCOL_ERROR detected 0x%X\n", this, streamID)); CleanupStream(mInputFrameDataStream, rv, RST_PROTOCOL_ERROR); ChangeDownstreamState(DISCARDING_DATA_FRAME); diff --git a/netwerk/protocol/http/SpdyStream31.cpp b/netwerk/protocol/http/SpdyStream31.cpp index a81c4aeaabc..777b2aeae0f 100644 --- a/netwerk/protocol/http/SpdyStream31.cpp +++ b/netwerk/protocol/http/SpdyStream31.cpp @@ -1179,17 +1179,26 @@ SpdyStream31::FindHeader(nsCString name, nsresult SpdyStream31::ConvertHeaders(nsACString &aHeadersOut) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x\n", + mSession, this, mStreamID)); + // :status and :version are required. nsDependentCSubstring status, version; nsresult rv = FindHeader(NS_LITERAL_CSTRING(":status"), status); - if (NS_FAILED(rv)) + if (NS_FAILED(rv)) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x missing :status\n", + mSession, this, mStreamID)); return (rv == NS_ERROR_NOT_AVAILABLE) ? NS_ERROR_ILLEGAL_VALUE : rv; + } rv = FindHeader(NS_LITERAL_CSTRING(":version"), version); - if (NS_FAILED(rv)) + if (NS_FAILED(rv)) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x missing :version\n", + mSession, this, mStreamID)); return (rv == NS_ERROR_NOT_AVAILABLE) ? NS_ERROR_ILLEGAL_VALUE : rv; + } if (mDecompressedBytes && mDecompressBufferUsed) { Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_SIZE, mDecompressedBytes); @@ -1212,31 +1221,51 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut) aHeadersOut.Append(status); aHeadersOut.AppendLiteral("\r\n"); + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x decompressed size %d\n", + mSession, this, mStreamID, mDecompressBufferUsed)); + const unsigned char *nvpair = reinterpret_cast (mDecompressBuffer.get()) + 4; const unsigned char *lastHeaderByte = reinterpret_cast (mDecompressBuffer.get()) + mDecompressBufferUsed; - if (lastHeaderByte < nvpair) + if (lastHeaderByte < nvpair) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x format err 1\n", + mSession, this, mStreamID)); return NS_ERROR_ILLEGAL_VALUE; + } do { uint32_t numPairs = PR_ntohl(reinterpret_cast(nvpair)[-1]); + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x numPairs %d\n", + mSession, this, mStreamID, numPairs)); for (uint32_t index = 0; index < numPairs; ++index) { - if (lastHeaderByte < nvpair + 4) + LOG5(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x index=%u remaining=%u\n", + mSession, this, mStreamID, index, lastHeaderByte - nvpair)); + if (lastHeaderByte < nvpair + 4) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x format err 2\n", + mSession, this, mStreamID)); return NS_ERROR_ILLEGAL_VALUE; - + } uint32_t nameLen = (nvpair[0] << 24) + (nvpair[1] << 16) + (nvpair[2] << 8) + nvpair[3]; - if (lastHeaderByte < nvpair + 4 + nameLen) + LOG5(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x namelen=%u\n", + mSession, this, mStreamID, nameLen)); + if (lastHeaderByte < nvpair + 4 + nameLen) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x format err 3\n", + mSession, this, mStreamID)); return NS_ERROR_ILLEGAL_VALUE; + } nsDependentCSubstring nameString = Substring(reinterpret_cast(nvpair) + 4, reinterpret_cast(nvpair) + 4 + nameLen); - if (lastHeaderByte < nvpair + 8 + nameLen) + if (lastHeaderByte < nvpair + 8 + nameLen) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x format err 4\n", + mSession, this, mStreamID)); return NS_ERROR_ILLEGAL_VALUE; + } // Look for illegal characters in the nameString. // This includes upper case characters and nulls (as they will @@ -1256,8 +1285,11 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut) } // check for null characters - if (*cPtr == '\0') + if (*cPtr == '\0') { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x unexpected null\n", + mSession, this, mStreamID)); return NS_ERROR_ILLEGAL_VALUE; + } } // HTTP Chunked responses are not legal over spdy. We do not need @@ -1275,9 +1307,13 @@ SpdyStream31::ConvertHeaders(nsACString &aHeadersOut) uint32_t valueLen = (nvpair[4 + nameLen] << 24) + (nvpair[5 + nameLen] << 16) + (nvpair[6 + nameLen] << 8) + nvpair[7 + nameLen]; - - if (lastHeaderByte < nvpair + 8 + nameLen + valueLen) + LOG5(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x valueLen=%u\n", + mSession, this, mStreamID, valueLen)); + if (lastHeaderByte < nvpair + 8 + nameLen + valueLen) { + LOG3(("SpdyStream31::ConvertHeaders session=%p stream=%p id=0x%x format err 5\n", + mSession, this, mStreamID)); return NS_ERROR_ILLEGAL_VALUE; + } // spdy transport level headers shouldn't be gatewayed into http/1 if (!nameString.IsEmpty() && nameString[0] != ':' && From 7d9b78118d644dc2f73ed3e0cb643a5063c478db Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 24 Nov 2015 16:54:27 -0800 Subject: [PATCH 076/135] Bug 1187151 (part 3) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey. --- dom/indexedDB/IDBDatabase.cpp | 61 +++++++++++------------------------ 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index 00902d501ef..0d501ac9a7d 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -1025,27 +1025,15 @@ IDBDatabase::NoteFinishedFileActor(PBackgroundIDBDatabaseFileChild* aFileActor) AssertIsOnOwningThread(); MOZ_ASSERT(aFileActor); - class MOZ_STACK_CLASS Helper final - { - public: - static PLDHashOperator - Remove(nsISupports* aKey, - PBackgroundIDBDatabaseFileChild*& aValue, - void* aClosure) - { - MOZ_ASSERT(aKey); - MOZ_ASSERT(aValue); - MOZ_ASSERT(aClosure); + for (auto iter = mFileActors.Iter(); !iter.Done(); iter.Next()) { + MOZ_ASSERT(iter.Key()); + PBackgroundIDBDatabaseFileChild* actor = iter.Data(); + MOZ_ASSERT(actor); - if (aValue == static_cast(aClosure)) { - return PL_DHASH_REMOVE; - } - - return PL_DHASH_NEXT; + if (actor == aFileActor) { + iter.Remove(); } - }; - - mFileActors.Enumerate(&Helper::Remove, aFileActor); + } } void @@ -1163,23 +1151,16 @@ IDBDatabase::ExpireFileActors(bool aExpireAll) { AssertIsOnOwningThread(); - class MOZ_STACK_CLASS Helper final - { - public: - static PLDHashOperator - MaybeExpireFileActors(nsISupports* aKey, - PBackgroundIDBDatabaseFileChild*& aValue, - void* aClosure) - { - MOZ_ASSERT(aKey); - MOZ_ASSERT(aValue); - MOZ_ASSERT(aClosure); + if (mBackgroundActor && mFileActors.Count()) { + for (auto iter = mFileActors.Iter(); !iter.Done(); iter.Next()) { + nsISupports* key = iter.Key(); + PBackgroundIDBDatabaseFileChild* actor = iter.Data(); + MOZ_ASSERT(key); + MOZ_ASSERT(actor); - const bool expiringAll = *static_cast(aClosure); - - bool shouldExpire = expiringAll; + bool shouldExpire = aExpireAll; if (!shouldExpire) { - nsCOMPtr weakRef = do_QueryInterface(aKey); + nsCOMPtr weakRef = do_QueryInterface(key); MOZ_ASSERT(weakRef); nsCOMPtr referent = do_QueryReferent(weakRef); @@ -1187,19 +1168,13 @@ IDBDatabase::ExpireFileActors(bool aExpireAll) } if (shouldExpire) { - PBackgroundIDBDatabaseFileChild::Send__delete__(aValue); + PBackgroundIDBDatabaseFileChild::Send__delete__(actor); - if (!expiringAll) { - return PL_DHASH_REMOVE; + if (!aExpireAll) { + iter.Remove(); } } - - return PL_DHASH_NEXT; } - }; - - if (mBackgroundActor && mFileActors.Count()) { - mFileActors.Enumerate(&Helper::MaybeExpireFileActors, &aExpireAll); if (aExpireAll) { mFileActors.Clear(); } From 2dc625f2a0c193851cadc6a65fb253ddd590575f Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 24 Nov 2015 16:54:42 -0800 Subject: [PATCH 077/135] Bug 1187151 (part 4) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey. --- dom/indexedDB/ActorsParent.cpp | 68 ++++++++++++++-------------------- 1 file changed, 27 insertions(+), 41 deletions(-) diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index 8250c9b6d58..04980f90bf8 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -14955,46 +14955,6 @@ VersionChangeTransaction::UpdateMetadata(nsresult aResult) MOZ_ASSERT(!!mActorWasAlive == !!mOpenDatabaseOp->mDatabase); MOZ_ASSERT_IF(mActorWasAlive, !mOpenDatabaseOp->mDatabaseId.IsEmpty()); - class MOZ_STACK_CLASS Helper final - { - public: - static PLDHashOperator - Enumerate(const uint64_t& aKey, - RefPtr& aValue, - void* /* aClosure */) - { - MOZ_ASSERT(aKey); - MOZ_ASSERT(aValue); - - if (aValue->mDeleted) { - return PL_DHASH_REMOVE; - } - - aValue->mIndexes.Enumerate(Enumerate, nullptr); -#ifdef DEBUG - aValue->mIndexes.MarkImmutable(); -#endif - - return PL_DHASH_NEXT; - } - - private: - static PLDHashOperator - Enumerate(const uint64_t& aKey, - RefPtr& aValue, - void* /* aClosure */) - { - MOZ_ASSERT(aKey); - MOZ_ASSERT(aValue); - - if (aValue->mDeleted) { - return PL_DHASH_REMOVE; - } - - return PL_DHASH_NEXT; - } - }; - if (IsActorDestroyed() || !mActorWasAlive) { return; } @@ -15011,7 +14971,33 @@ VersionChangeTransaction::UpdateMetadata(nsresult aResult) if (NS_SUCCEEDED(aResult)) { // Remove all deleted objectStores and indexes, then mark immutable. - info->mMetadata->mObjectStores.Enumerate(Helper::Enumerate, nullptr); + for (auto objectStoreIter = info->mMetadata->mObjectStores.Iter(); + !objectStoreIter.Done(); + objectStoreIter.Next()) { + MOZ_ASSERT(objectStoreIter.Key()); + RefPtr& metadata = objectStoreIter.Data(); + MOZ_ASSERT(metadata); + + if (metadata->mDeleted) { + objectStoreIter.Remove(); + continue; + } + + for (auto indexIter = metadata->mIndexes.Iter(); + !indexIter.Done(); + indexIter.Next()) { + MOZ_ASSERT(indexIter.Key()); + RefPtr& index = indexIter.Data(); + MOZ_ASSERT(index); + + if (index->mDeleted) { + indexIter.Remove(); + } + } +#ifdef DEBUG + metadata->mIndexes.MarkImmutable(); +#endif + } #ifdef DEBUG info->mMetadata->mObjectStores.MarkImmutable(); #endif From b61d55b94c45ba90a075c05de8c98dd674e189cc Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 24 Nov 2015 16:55:01 -0800 Subject: [PATCH 078/135] Bug 1187151 (part 5) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey. --- dom/indexedDB/ActorsParent.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index 04980f90bf8..14d2293ddc9 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -15895,22 +15895,6 @@ FileManager::Init(nsIFile* aDirectory, nsresult FileManager::Invalidate() { - class MOZ_STACK_CLASS Helper final - { - public: - static PLDHashOperator - ClearDBRefs(const uint64_t& aKey, FileInfo*& aValue, void* aUserArg) - { - MOZ_ASSERT(aValue); - - if (aValue->LockedClearDBRefs()) { - return PL_DHASH_NEXT; - } - - return PL_DHASH_REMOVE; - } - }; - if (IndexedDatabaseManager::IsClosed()) { MOZ_ASSERT(false, "Shouldn't be called after shutdown!"); return NS_ERROR_UNEXPECTED; @@ -15921,7 +15905,14 @@ FileManager::Invalidate() MOZ_ASSERT(!mInvalidated); mInvalidated = true; - mFileInfos.Enumerate(Helper::ClearDBRefs, nullptr); + for (auto iter = mFileInfos.Iter(); !iter.Done(); iter.Next()) { + FileInfo* info = iter.Data(); + MOZ_ASSERT(info); + + if (!info->LockedClearDBRefs()) { + iter.Remove(); + } + } return NS_OK; } From 6a729805d47a1477602eaf6e7c089dfde0d6cc7e Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 19 Nov 2015 15:31:28 -0800 Subject: [PATCH 079/135] Bug 1186783 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in netwerk/ with iterators. r=valentin. --- netwerk/cache/nsDiskCacheDeviceSQL.cpp | 24 ++++---------- netwerk/cache/nsDiskCacheDeviceSQL.h | 4 --- netwerk/cache2/CacheStorageService.cpp | 44 ++++++++++++-------------- 3 files changed, 27 insertions(+), 45 deletions(-) diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index 4d58556555f..14899adfb78 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -1365,22 +1365,6 @@ nsOfflineCacheDevice::InitActiveCaches() return NS_OK; } -/* static */ -PLDHashOperator -nsOfflineCacheDevice::ShutdownApplicationCache(const nsACString &key, - nsIWeakReference *weakRef, - void *ctx) -{ - nsCOMPtr obj = do_QueryReferent(weakRef); - if (obj) - { - nsApplicationCache *appCache = static_cast(obj.get()); - appCache->MarkInvalid(); - } - - return PL_DHASH_NEXT; -} - nsresult nsOfflineCacheDevice::Shutdown() { @@ -1388,7 +1372,13 @@ nsOfflineCacheDevice::Shutdown() { MutexAutoLock lock(mLock); - mCaches.EnumerateRead(ShutdownApplicationCache, this); + for (auto iter = mCaches.Iter(); !iter.Done(); iter.Next()) { + nsCOMPtr obj = do_QueryReferent(iter.UserData()); + if (obj) { + auto appCache = static_cast(obj.get()); + appCache->MarkInvalid(); + } + } } { diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.h b/netwerk/cache/nsDiskCacheDeviceSQL.h index 6dafdddecba..fe2e6d642de 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.h +++ b/netwerk/cache/nsDiskCacheDeviceSQL.h @@ -199,10 +199,6 @@ private: friend class nsApplicationCache; - static PLDHashOperator ShutdownApplicationCache(const nsACString &key, - nsIWeakReference *weakRef, - void *ctx); - static bool GetStrictFileOriginPolicy(); bool Initialized() { return mDB != nullptr; } diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index cd4abf3e866..a7d953f33c8 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -1,3 +1,5 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ @@ -237,8 +239,24 @@ private: return NS_ERROR_NOT_INITIALIZED; CacheEntryTable* entries; - if (sGlobalEntryTables->Get(mContextKey, &entries)) - entries->EnumerateRead(&WalkMemoryCacheRunnable::WalkStorage, this); + if (sGlobalEntryTables->Get(mContextKey, &entries)) { + for (auto iter = entries->Iter(); !iter.Done(); iter.Next()) { + CacheEntry* entry = iter.UserData(); + + // Ignore disk entries + if (entry->IsUsingDisk()) { + continue; + } + + mSize += entry->GetMetadataMemoryConsumption(); + + int64_t size; + if (NS_SUCCEEDED(entry->GetDataSize(&size))) { + mSize += size; + } + mEntryArray.AppendElement(entry); + } + } // Next, we dispatch to the main thread } else if (NS_IsMainThread()) { @@ -287,28 +305,6 @@ private: ProxyReleaseMainThread(mCallback); } - static PLDHashOperator - WalkStorage(const nsACString& aKey, - CacheEntry* aEntry, - void* aClosure) - { - WalkMemoryCacheRunnable* walker = - static_cast(aClosure); - - // Ignore disk entries - if (aEntry->IsUsingDisk()) - return PL_DHASH_NEXT; - - walker->mSize += aEntry->GetMetadataMemoryConsumption(); - - int64_t size; - if (NS_SUCCEEDED(aEntry->GetDataSize(&size))) - walker->mSize += size; - - walker->mEntryArray.AppendElement(aEntry); - return PL_DHASH_NEXT; - } - virtual void OnEntryInfo(const nsACString & aURISpec, const nsACString & aIdEnhance, int64_t aDataSize, int32_t aFetchCount, uint32_t aLastModifiedTime, uint32_t aExpirationTime, From acba203d284b33210c6e3f305caae5324937074a Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 19 Nov 2015 16:44:24 -0800 Subject: [PATCH 080/135] Bug 1186783 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in netwerk/ with iterators. r=valentin. --- netwerk/cache2/CacheStorageService.cpp | 38 ++++++++------------------ 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index a7d953f33c8..fc422464325 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -501,29 +501,6 @@ private: uint32_t mCount; }; -PLDHashOperator CollectPrivateContexts(const nsACString& aKey, - CacheEntryTable* aTable, - void* aClosure) -{ - nsCOMPtr info = CacheFileUtils::ParseKey(aKey); - if (info && info->IsPrivate()) { - nsTArray* keys = static_cast*>(aClosure); - keys->AppendElement(aKey); - } - - return PL_DHASH_NEXT; -} - -PLDHashOperator CollectContexts(const nsACString& aKey, - CacheEntryTable* aTable, - void* aClosure) -{ - nsTArray* keys = static_cast*>(aClosure); - keys->AppendElement(aKey); - - return PL_DHASH_NEXT; -} - } // namespace void CacheStorageService::DropPrivateBrowsingEntries() @@ -534,10 +511,17 @@ void CacheStorageService::DropPrivateBrowsingEntries() return; nsTArray keys; - sGlobalEntryTables->EnumerateRead(&CollectPrivateContexts, &keys); + for (auto iter = sGlobalEntryTables->Iter(); !iter.Done(); iter.Next()) { + const nsACString& key = iter.Key(); + nsCOMPtr info = CacheFileUtils::ParseKey(key); + if (info && info->IsPrivate()) { + keys.AppendElement(key); + } + } - for (uint32_t i = 0; i < keys.Length(); ++i) + for (uint32_t i = 0; i < keys.Length(); ++i) { DoomStorageEntries(keys[i], nullptr, true, false, nullptr); + } } namespace { @@ -788,7 +772,9 @@ NS_IMETHODIMP CacheStorageService::Clear() NS_ENSURE_TRUE(!mShutdown, NS_ERROR_NOT_INITIALIZED); nsTArray keys; - sGlobalEntryTables->EnumerateRead(&CollectContexts, &keys); + for (auto iter = sGlobalEntryTables->Iter(); !iter.Done(); iter.Next()) { + keys.AppendElement(iter.Key()); + } for (uint32_t i = 0; i < keys.Length(); ++i) { DoomStorageEntries(keys[i], nullptr, true, false, nullptr); From 3972bc8629401afa812923c69cbe951c080f1a9f Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 19 Nov 2015 16:46:10 -0800 Subject: [PATCH 081/135] Bug 1186783 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in netwerk/ with iterators. r=valentin. --- netwerk/cache2/CacheStorageService.cpp | 89 ++++++++++---------------- 1 file changed, 34 insertions(+), 55 deletions(-) diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index fc422464325..d6eeea5adb0 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -2048,57 +2048,6 @@ CacheStorageService::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) con return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); } -namespace { - -class ReportStorageMemoryData -{ -public: - nsIMemoryReporterCallback *mHandleReport; - nsISupports *mData; -}; - -PLDHashOperator ReportStorageMemory(const nsACString& aKey, - CacheEntryTable* aTable, - void* aClosure) -{ - CacheStorageService::Self()->Lock().AssertCurrentThreadOwns(); - - size_t size = 0; - mozilla::MallocSizeOf mallocSizeOf = CacheStorageService::MallocSizeOf; - - size += aTable->ShallowSizeOfIncludingThis(mallocSizeOf); - for (auto iter = aTable->Iter(); !iter.Done(); iter.Next()) { - size += iter.Key().SizeOfExcludingThisIfUnshared(mallocSizeOf); - - // Bypass memory-only entries, those will be reported when iterating - // the memory only table. Memory-only entries are stored in both ALL_ENTRIES - // and MEMORY_ONLY hashtables. - RefPtr const& entry = iter.Data(); - if (aTable->Type() == CacheEntryTable::MEMORY_ONLY || - entry->IsUsingDisk()) { - size += entry->SizeOfIncludingThis(mallocSizeOf); - } - } - - ReportStorageMemoryData& data = - *static_cast(aClosure); - // These key names are not privacy-sensitive. - data.mHandleReport->Callback( - EmptyCString(), - nsPrintfCString("explicit/network/cache2/%s-storage(%s)", - aTable->Type() == CacheEntryTable::MEMORY_ONLY ? "memory" : "disk", - aKey.BeginReading()), - nsIMemoryReporter::KIND_HEAP, - nsIMemoryReporter::UNITS_BYTES, - size, - NS_LITERAL_CSTRING("Memory used by the cache storage."), - data.mData); - - return PL_DHASH_NEXT; -} - -} // namespace - NS_IMETHODIMP CacheStorageService::CollectReports(nsIMemoryReporterCallback* aHandleReport, nsISupports* aData, bool aAnonymize) @@ -2141,10 +2090,40 @@ CacheStorageService::CollectReports(nsIMemoryReporterCallback* aHandleReport, // 1 CacheFileOutputStream // N CacheFileInputStream if (sGlobalEntryTables) { - ReportStorageMemoryData data; - data.mHandleReport = aHandleReport; - data.mData = aData; - sGlobalEntryTables->EnumerateRead(&ReportStorageMemory, &data); + for (auto iter1 = sGlobalEntryTables->Iter(); !iter1.Done(); iter1.Next()) { + CacheStorageService::Self()->Lock().AssertCurrentThreadOwns(); + + CacheEntryTable* table = iter1.UserData(); + + size_t size = 0; + mozilla::MallocSizeOf mallocSizeOf = CacheStorageService::MallocSizeOf; + + size += table->ShallowSizeOfIncludingThis(mallocSizeOf); + for (auto iter2 = table->Iter(); !iter2.Done(); iter2.Next()) { + size += iter2.Key().SizeOfExcludingThisIfUnshared(mallocSizeOf); + + // Bypass memory-only entries, those will be reported when iterating the + // memory only table. Memory-only entries are stored in both ALL_ENTRIES + // and MEMORY_ONLY hashtables. + RefPtr const& entry = iter2.Data(); + if (table->Type() == CacheEntryTable::MEMORY_ONLY || + entry->IsUsingDisk()) { + size += entry->SizeOfIncludingThis(mallocSizeOf); + } + } + + // These key names are not privacy-sensitive. + aHandleReport->Callback( + EmptyCString(), + nsPrintfCString("explicit/network/cache2/%s-storage(%s)", + table->Type() == CacheEntryTable::MEMORY_ONLY ? "memory" : "disk", + iter1.Key().BeginReading()), + nsIMemoryReporter::KIND_HEAP, + nsIMemoryReporter::UNITS_BYTES, + size, + NS_LITERAL_CSTRING("Memory used by the cache storage."), + aData); + } } return NS_OK; From 066c76341a76b408880272036c2f4e0f5a569d1c Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 19 Nov 2015 16:46:24 -0800 Subject: [PATCH 082/135] Bug 1186783 (part 4) - Replace nsBaseHashtable::EnumerateRead() calls in netwerk/ with iterators. r=valentin. --- netwerk/base/nsBaseChannel.cpp | 17 +++++------------ netwerk/protocol/http/HttpBaseChannel.cpp | 16 +++++----------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/netwerk/base/nsBaseChannel.cpp b/netwerk/base/nsBaseChannel.cpp index 278134fc0ca..a736b7965dd 100644 --- a/netwerk/base/nsBaseChannel.cpp +++ b/netwerk/base/nsBaseChannel.cpp @@ -23,16 +23,6 @@ #include "nsContentSecurityManager.h" #include "LoadInfo.h" -static PLDHashOperator -CopyProperties(const nsAString &key, nsIVariant *data, void *closure) -{ - nsIWritablePropertyBag *bag = - static_cast(closure); - - bag->SetProperty(key, data); - return PL_DHASH_NEXT; -} - // This class is used to suspend a request across a function scope. class ScopedRequestSuspender { public: @@ -121,8 +111,11 @@ nsBaseChannel::Redirect(nsIChannel *newChannel, uint32_t redirectFlags, } nsCOMPtr bag = ::do_QueryInterface(newChannel); - if (bag) - mPropertyHash.EnumerateRead(CopyProperties, bag.get()); + if (bag) { + for (auto iter = mPropertyHash.Iter(); !iter.Done(); iter.Next()) { + bag->SetProperty(iter.Key(), iter.UserData()); + } + } // Notify consumer, giving chance to cancel redirect. For backwards compat, // we support nsIHttpEventSink if we are an HTTP channel and if this is not diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index 3a8b39ea089..82075c34334 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -2530,15 +2530,6 @@ HttpBaseChannel::AddCookiesToRequest() SetRequestHeader(nsDependentCString(nsHttp::Cookie), cookie, false); } -static PLDHashOperator -CopyProperties(const nsAString& aKey, nsIVariant *aData, void *aClosure) -{ - nsIWritablePropertyBag* bag = static_cast - (aClosure); - bag->SetProperty(aKey, aData); - return PL_DHASH_NEXT; -} - bool HttpBaseChannel::ShouldRewriteRedirectToGET(uint32_t httpStatus, nsHttpRequestHead::ParsedMethodType method) @@ -2734,8 +2725,11 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI, // transfer any properties nsCOMPtr bag(do_QueryInterface(newChannel)); - if (bag) - mPropertyHash.EnumerateRead(CopyProperties, bag.get()); + if (bag) { + for (auto iter = mPropertyHash.Iter(); !iter.Done(); iter.Next()) { + bag->SetProperty(iter.Key(), iter.UserData()); + } + } // Transfer the timing data (if we are dealing with an nsITimedChannel). nsCOMPtr newTimedChannel(do_QueryInterface(newChannel)); From fc3ed84c27f959a501f1d4b6aeb061dc6b634bce Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 19 Nov 2015 16:46:35 -0800 Subject: [PATCH 083/135] Bug 1186783 (part 5) - Replace nsBaseHashtable::EnumerateRead() calls in netwerk/ with iterators. r=valentin. --- netwerk/base/nsIOService.cpp | 24 +++++------------------- netwerk/base/nsIOService.h | 1 - 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index 5e093eee22e..f1054d2de9a 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -1370,23 +1370,6 @@ IsWifiActive() #endif } -struct EnumeratorParams { - nsIOService *service; - int32_t status; -}; - -PLDHashOperator -nsIOService::EnumerateWifiAppsChangingState(const unsigned int &aKey, - int32_t aValue, - void *aUserArg) -{ - EnumeratorParams *params = reinterpret_cast(aUserArg); - if (aValue == nsIAppOfflineInfo::WIFI_ONLY) { - params->service->NotifyAppOfflineStatus(aKey, params->status); - } - return PL_DHASH_NEXT; -} - class nsWakeupNotifier : public nsRunnable { @@ -1506,8 +1489,11 @@ nsIOService::Observe(nsISupports *subject, int32_t status = wifiActive ? nsIAppOfflineInfo::ONLINE : nsIAppOfflineInfo::OFFLINE; - EnumeratorParams params = {this, status}; - mAppsOfflineStatus.EnumerateRead(EnumerateWifiAppsChangingState, ¶ms); + for (auto it = mAppsOfflineStatus.Iter(); !it.Done(); it.Next()) { + if (iter.UserData() == nsIAppOfflineInfo::WIFI_ONLY) { + NotifyAppOfflineStatus(iter.Key(), status); + } + } } mPreviousWifiState = newWifiState; diff --git a/netwerk/base/nsIOService.h b/netwerk/base/nsIOService.h index 1a07b2ca178..e948ffdfbb2 100644 --- a/netwerk/base/nsIOService.h +++ b/netwerk/base/nsIOService.h @@ -125,7 +125,6 @@ private: // notify content processes of offline status // 'status' must be a nsIAppOfflineInfo mode constant. void NotifyAppOfflineStatus(uint32_t appId, int32_t status); - static PLDHashOperator EnumerateWifiAppsChangingState(const unsigned int &, int32_t, void*); nsresult NewChannelFromURIWithProxyFlagsInternal(nsIURI* aURI, nsIURI* aProxyURI, From 61111bc3ae8f337383231ad2fbb31fbd0c45861c Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 29 Nov 2015 15:25:32 -0800 Subject: [PATCH 084/135] Bug 1186783 (follow-up) - Bustage fix for Gonk. --- netwerk/base/nsIOService.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index f1054d2de9a..352a5852f3d 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -1490,8 +1490,8 @@ nsIOService::Observe(nsISupports *subject, nsIAppOfflineInfo::ONLINE : nsIAppOfflineInfo::OFFLINE; for (auto it = mAppsOfflineStatus.Iter(); !it.Done(); it.Next()) { - if (iter.UserData() == nsIAppOfflineInfo::WIFI_ONLY) { - NotifyAppOfflineStatus(iter.Key(), status); + if (it.UserData() == nsIAppOfflineInfo::WIFI_ONLY) { + NotifyAppOfflineStatus(it.Key(), status); } } } From 409736b8f8c82eb106ad9703ac6d6a8a723843ab Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 19 Nov 2015 17:34:20 +1100 Subject: [PATCH 085/135] Bug 1225007 (part 2, attempt 3) - Use LayoutDevicePixel more in Cocoa widget code. r=kats. --- accessible/mac/mozAccessible.mm | 2 +- widget/cocoa/nsChildView.h | 2 +- widget/cocoa/nsChildView.mm | 37 ++++++++++++++++++--------------- widget/cocoa/nsCocoaUtils.h | 7 ++++--- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/accessible/mac/mozAccessible.mm b/accessible/mac/mozAccessible.mm index 60488aebaf0..770df417e0e 100644 --- a/accessible/mac/mozAccessible.mm +++ b/accessible/mac/mozAccessible.mm @@ -552,7 +552,7 @@ ConvertToNSArray(nsTArray& aArray) NSScreen* mainView = [[NSScreen screens] objectAtIndex:0]; NSPoint tmpPoint = NSMakePoint(point.x, [mainView frame].size.height - point.y); - nsIntPoint geckoPoint = nsCocoaUtils:: + LayoutDeviceIntPoint geckoPoint = nsCocoaUtils:: CocoaPointsToDevPixels(tmpPoint, nsCocoaUtils::GetBackingScaleFactor(mainView)); mozAccessible* nativeChild = nil; diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 37683f33857..9020c34bbf5 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -522,7 +522,7 @@ public: int32_t CocoaPointsToDevPixels(CGFloat aPts) const { return nsCocoaUtils::CocoaPointsToDevPixels(aPts, BackingScaleFactor()); } - nsIntPoint CocoaPointsToDevPixels(const NSPoint& aPt) const { + LayoutDeviceIntPoint CocoaPointsToDevPixels(const NSPoint& aPt) const { return nsCocoaUtils::CocoaPointsToDevPixels(aPt, BackingScaleFactor()); } LayoutDeviceIntRect CocoaPointsToDevPixels(const NSRect& aRect) const { diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index d7578af5cda..f12e196550b 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -93,6 +93,8 @@ #include "VibrancyManager.h" #include "nsNativeThemeCocoa.h" #include "nsIDOMWindowUtils.h" +#include "Units.h" +#include "UnitTransforms.h" using namespace mozilla; using namespace mozilla::layers; @@ -191,7 +193,7 @@ static uint32_t gNumberOfWidgetsNeedingEventThread = 0; - (id)accessible; #endif -- (nsIntPoint)convertWindowCoordinates:(NSPoint)aPoint; +- (LayoutDeviceIntPoint)convertWindowCoordinates:(NSPoint)aPoint; - (APZCTreeManager*)apzctm; - (BOOL)inactiveWindowAcceptsMouseEvent:(NSEvent*)aEvent; @@ -1528,7 +1530,7 @@ LayoutDeviceIntPoint nsChildView::GetClientOffset() NSPoint origin = [mView convertPoint:NSMakePoint(0, 0) toView:nil]; origin.y = [[mView window] frame].size.height - origin.y; - return LayoutDeviceIntPoint::FromUnknownPoint(CocoaPointsToDevPixels(origin)); + return CocoaPointsToDevPixels(origin); NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(LayoutDeviceIntPoint(0, 0)); } @@ -1553,7 +1555,7 @@ LayoutDeviceIntPoint nsChildView::WidgetToScreenOffset() FlipCocoaScreenCoordinate(origin); // convert to device pixels - return LayoutDeviceIntPoint::FromUnknownPoint(CocoaPointsToDevPixels(origin)); + return CocoaPointsToDevPixels(origin); NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(LayoutDeviceIntPoint(0,0)); } @@ -4568,8 +4570,7 @@ NSEvent* gLastDragMouseDownEvent = nil; EventMessage msg = aEnter ? eMouseEnterIntoWidget : eMouseExitFromWidget; WidgetMouseEvent event(true, msg, mGeckoChild, WidgetMouseEvent::eReal); - event.refPoint = LayoutDeviceIntPoint::FromUnknownPoint( - mGeckoChild->CocoaPointsToDevPixels(localEventLocation)); + event.refPoint = mGeckoChild->CocoaPointsToDevPixels(localEventLocation); event.exit = aType; @@ -4901,8 +4902,9 @@ PanGestureTypeForEvent(NSEvent* aEvent) NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(theEvent, [self window]); - ScreenPoint position = ScreenPoint::FromUnknownPoint( - [self convertWindowCoordinates:locationInWindow]); + ScreenPoint position = ViewAs( + [self convertWindowCoordinates:locationInWindow], + PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent); bool usePreciseDeltas = nsCocoaUtils::HasPreciseScrollingDeltas(theEvent) && Preferences::GetBool("mousewheel.enable_pixel_scrolling", true); @@ -4976,7 +4978,9 @@ PanGestureTypeForEvent(NSEvent* aEvent) CGPoint loc = CGEventGetLocation(cgEvent); loc.y = nsCocoaUtils::FlippedScreenY(loc.y); NSPoint locationInWindow = [[self window] convertScreenToBase:NSPointFromCGPoint(loc)]; - ScreenIntPoint location = ScreenIntPoint::FromUnknownPoint([self convertWindowCoordinates:locationInWindow]); + ScreenIntPoint location = ViewAs( + [self convertWindowCoordinates:locationInWindow], + PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent); static NSTimeInterval sStartTime = [NSDate timeIntervalSinceReferenceDate]; static TimeStamp sStartTimeStamp = TimeStamp::Now(); @@ -4993,8 +4997,9 @@ PanGestureTypeForEvent(NSEvent* aEvent) NSPoint locationInWindowMoved = NSMakePoint( locationInWindow.x + pixelDeltaX, locationInWindow.y - pixelDeltaY); - ScreenIntPoint locationMoved = ScreenIntPoint::FromUnknownPoint( - [self convertWindowCoordinates:locationInWindowMoved]); + ScreenIntPoint locationMoved = ViewAs( + [self convertWindowCoordinates:locationInWindowMoved], + PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent); ScreenPoint delta = ScreenPoint(locationMoved - location); ScrollableLayerGuid guid; @@ -5140,8 +5145,7 @@ PanGestureTypeForEvent(NSEvent* aEvent) // convert point to view coordinate system NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(aMouseEvent, [self window]); - outGeckoEvent->refPoint = LayoutDeviceIntPoint::FromUnknownPoint( - [self convertWindowCoordinates:locationInWindow]); + outGeckoEvent->refPoint = [self convertWindowCoordinates:locationInWindow]; WidgetMouseEventBase* mouseEvent = outGeckoEvent->AsMouseEventBase(); mouseEvent->buttons = 0; @@ -5591,10 +5595,10 @@ PanGestureTypeForEvent(NSEvent* aEvent) return NSDragOperationNone; } -- (nsIntPoint)convertWindowCoordinates:(NSPoint)aPoint +- (LayoutDeviceIntPoint)convertWindowCoordinates:(NSPoint)aPoint { if (!mGeckoChild) { - return nsIntPoint(0, 0); + return LayoutDeviceIntPoint(0, 0); } NSPoint localPoint = [self convertPoint:aPoint fromView:nil]; @@ -5673,8 +5677,7 @@ PanGestureTypeForEvent(NSEvent* aEvent) // Convert event from gecko global coords to gecko view coords. NSPoint draggingLoc = [aSender draggingLocation]; - geckoEvent.refPoint = LayoutDeviceIntPoint::FromUnknownPoint( - [self convertWindowCoordinates:draggingLoc]); + geckoEvent.refPoint = [self convertWindowCoordinates:draggingLoc]; nsAutoRetainCocoaObject kungFuDeathGrip(self); mGeckoChild->DispatchInputEvent(&geckoEvent); @@ -5780,7 +5783,7 @@ PanGestureTypeForEvent(NSEvent* aEvent) NSPoint pnt = [NSEvent mouseLocation]; FlipCocoaScreenCoordinate(pnt); - nsIntPoint devPoint = mGeckoChild->CocoaPointsToDevPixels(pnt); + LayoutDeviceIntPoint devPoint = mGeckoChild->CocoaPointsToDevPixels(pnt); dragService->DragMoved(devPoint.x, devPoint.y); } } diff --git a/widget/cocoa/nsCocoaUtils.h b/widget/cocoa/nsCocoaUtils.h index 287cec0b448..4e45032507a 100644 --- a/widget/cocoa/nsCocoaUtils.h +++ b/widget/cocoa/nsCocoaUtils.h @@ -129,6 +129,7 @@ struct KeyBindingsCommand class nsCocoaUtils { typedef mozilla::gfx::SourceSurface SourceSurface; + typedef mozilla::LayoutDeviceIntPoint LayoutDeviceIntPoint; typedef mozilla::LayoutDeviceIntRect LayoutDeviceIntRect; public: @@ -153,11 +154,11 @@ public: return NSToIntRound(aPts * aBackingScale); } - static nsIntPoint + static LayoutDeviceIntPoint CocoaPointsToDevPixels(const NSPoint& aPt, CGFloat aBackingScale) { - return nsIntPoint(NSToIntRound(aPt.x * aBackingScale), - NSToIntRound(aPt.y * aBackingScale)); + return LayoutDeviceIntPoint(NSToIntRound(aPt.x * aBackingScale), + NSToIntRound(aPt.y * aBackingScale)); } static LayoutDeviceIntRect From 685647ff2b1141ed7a499e17738a9fdd1b90e057 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 16:13:25 +1100 Subject: [PATCH 086/135] Bug 1227396: P1. Remove TimestampedMediaByteRange object. r=cpearce --- dom/media/MediaResource.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index 9b37f14e83d..282efbfd214 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -128,9 +128,6 @@ private: bool mIsStarted; }; -// Forward declaration for use in MediaByteRange. -class TimestampedMediaByteRange; - // Represents a section of contiguous media, with a start and end offset. // Used to denote ranges of data which are cached. class MediaByteRange { @@ -143,8 +140,6 @@ public: NS_ASSERTION(mStart <= mEnd, "Range should end after start!"); } - explicit MediaByteRange(TimestampedMediaByteRange& aByteRange); - bool IsNull() const { return mStart == 0 && mEnd == 0; } @@ -178,38 +173,6 @@ public: int64_t mStart, mEnd; }; -// Represents a section of contiguous media, with a start and end offset, and -// a timestamp representing the start time. -class TimestampedMediaByteRange : public MediaByteRange { -public: - TimestampedMediaByteRange() : MediaByteRange(), mStartTime(-1) {} - - TimestampedMediaByteRange(int64_t aStart, int64_t aEnd, int64_t aStartTime) - : MediaByteRange(aStart, aEnd), mStartTime(aStartTime) - { - NS_ASSERTION(aStartTime >= 0, "Start time should not be negative!"); - } - - bool IsNull() const { - return MediaByteRange::IsNull() && mStartTime == -1; - } - - // Clears byte range values. - void Clear() { - MediaByteRange::Clear(); - mStartTime = -1; - } - - // In usecs. - int64_t mStartTime; -}; - -inline MediaByteRange::MediaByteRange(TimestampedMediaByteRange& aByteRange) - : mStart(aByteRange.mStart), mEnd(aByteRange.mEnd) -{ - NS_ASSERTION(mStart < mEnd, "Range should end after start!"); -} - class RtspMediaResource; /** From 5b2057a20960e79c14c270a9753dcc0e3ae9bb8c Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 16:26:38 +1100 Subject: [PATCH 087/135] Bug 1227396: P2. Rename some MediaByteRange methods. r=cpearce Will facilitate the replacement of MediaByteRange by Interval --- dom/media/MediaResource.cpp | 10 +++++----- dom/media/MediaResource.h | 6 +++--- dom/media/mediasource/ContainerParser.cpp | 2 +- dom/media/mediasource/TrackBuffersManager.cpp | 8 ++++---- media/libstagefright/binding/Index.cpp | 2 +- media/libstagefright/binding/MoofParser.cpp | 8 ++++---- .../libstagefright/binding/include/mp4_demuxer/Box.h | 2 +- media/libstagefright/gtest/TestParser.cpp | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index 9b8ab4b89df..cef5b242eed 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -236,7 +236,7 @@ ChannelMediaResource::OnStartRequest(nsIRequest* aRequest) // Content-Range header tells us otherwise. bool boundedSeekLimit = true; // Check response code for byte-range requests (seeking, chunk requests). - if (!mByteRange.IsNull() && (responseStatus == HTTP_PARTIAL_RESPONSE_CODE)) { + if (!mByteRange.IsEmpty() && (responseStatus == HTTP_PARTIAL_RESPONSE_CODE)) { // Parse Content-Range header. int64_t rangeStart = 0; int64_t rangeEnd = 0; @@ -273,7 +273,7 @@ ChannelMediaResource::OnStartRequest(nsIRequest* aRequest) mOffset = rangeStart; // We received 'Content-Range', so the server accepts range requests. acceptsRanges = true; - } else if (((mOffset > 0) || !mByteRange.IsNull()) + } else if (((mOffset > 0) || !mByteRange.IsEmpty()) && (responseStatus == HTTP_OK_CODE)) { // If we get an OK response but we were seeking, or requesting a byte // range, then we have to assume that seeking doesn't work. We also need @@ -534,7 +534,7 @@ nsresult ChannelMediaResource::OpenChannel(nsIStreamListener** aStreamListener) *aStreamListener = nullptr; } - if (mByteRange.IsNull()) { + if (mByteRange.IsEmpty()) { // We're not making a byte range request, so set the content length, // if it's available as an HTTP header. This ensures that MediaResource // wrapping objects for platform libraries that expect to know @@ -583,14 +583,14 @@ nsresult ChannelMediaResource::SetupChannelHeaders() // Use |mByteRange| for a specific chunk, or |mOffset| if seeking in a // complete file download. nsAutoCString rangeString("bytes="); - if (!mByteRange.IsNull()) { + if (!mByteRange.IsEmpty()) { rangeString.AppendInt(mByteRange.mStart); mOffset = mByteRange.mStart; } else { rangeString.AppendInt(mOffset); } rangeString.Append('-'); - if (!mByteRange.IsNull()) { + if (!mByteRange.IsEmpty()) { rangeString.AppendInt(mByteRange.mEnd); } nsresult rv = hc->SetRequestHeader(NS_LITERAL_CSTRING("Range"), rangeString, false); diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index 282efbfd214..3bbdaf61196 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -140,7 +140,7 @@ public: NS_ASSERTION(mStart <= mEnd, "Range should end after start!"); } - bool IsNull() const { + bool IsEmpty() const { return mStart == 0 && mEnd == 0; } @@ -158,8 +158,8 @@ public: return aByteRange.mStart >= mStart && aByteRange.mEnd <= mEnd; } - MediaByteRange Extents(const MediaByteRange& aByteRange) const { - if (IsNull()) { + MediaByteRange Span(const MediaByteRange& aByteRange) const { + if (IsEmpty()) { return aByteRange; } return MediaByteRange(std::min(mStart, aByteRange.mStart), diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp index 349723ef045..6fe9caaea6d 100644 --- a/dom/media/mediasource/ContainerParser.cpp +++ b/dom/media/mediasource/ContainerParser.cpp @@ -267,7 +267,7 @@ public: return false; } - if (mCompleteMediaHeaderRange.IsNull()) { + if (mCompleteMediaHeaderRange.IsEmpty()) { mCompleteMediaHeaderRange = MediaByteRange(mapping[0].mSyncOffset, mapping[0].mEndOffset); } diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp index 360b3f43487..3cece0247c8 100644 --- a/dom/media/mediasource/TrackBuffersManager.cpp +++ b/dom/media/mediasource/TrackBuffersManager.cpp @@ -680,7 +680,7 @@ TrackBuffersManager::SegmentParserLoop() // 5. If the append state equals PARSING_INIT_SEGMENT, then run the // following steps: if (mAppendState == AppendState::PARSING_INIT_SEGMENT) { - if (mParser->InitSegmentRange().IsNull()) { + if (mParser->InitSegmentRange().IsEmpty()) { mInputBuffer = nullptr; NeedMoreData(); return; @@ -707,7 +707,7 @@ TrackBuffersManager::SegmentParserLoop() ResetDemuxingState(); return; } - if (newData || !mParser->MediaSegmentRange().IsNull()) { + if (newData || !mParser->MediaSegmentRange().IsEmpty()) { if (mPendingInputBuffer) { // We now have a complete media segment header. We can resume parsing // the data. @@ -1135,7 +1135,7 @@ TrackBuffersManager::CodedFrameProcessing() MOZ_ASSERT(mProcessingPromise.IsEmpty()); MediaByteRange mediaRange = mParser->MediaSegmentRange(); - if (mediaRange.IsNull()) { + if (mediaRange.IsEmpty()) { AppendDataToCurrentInputBuffer(mInputBuffer); mInputBuffer = nullptr; } else { @@ -1309,7 +1309,7 @@ TrackBuffersManager::CompleteCodedFrameProcessing() } // 5. If the input buffer does not contain a complete media segment, then jump to the need more data step below. - if (mParser->MediaSegmentRange().IsNull()) { + if (mParser->MediaSegmentRange().IsEmpty()) { ResolveProcessing(true, __func__); return; } diff --git a/media/libstagefright/binding/Index.cpp b/media/libstagefright/binding/Index.cpp index e5320584388..de8dff49738 100644 --- a/media/libstagefright/binding/Index.cpp +++ b/media/libstagefright/binding/Index.cpp @@ -117,7 +117,7 @@ already_AddRefed SampleIterator::GetNext() return nullptr; } - if (!s->mCencRange.IsNull()) { + if (!s->mCencRange.IsEmpty()) { MoofParser* parser = mIndex->mMoofParser.get(); if (!parser || !parser->mSinf.IsValid()) { diff --git a/media/libstagefright/binding/MoofParser.cpp b/media/libstagefright/binding/MoofParser.cpp index 415ac353a32..c3c0b8bd458 100644 --- a/media/libstagefright/binding/MoofParser.cpp +++ b/media/libstagefright/binding/MoofParser.cpp @@ -41,7 +41,7 @@ MoofParser::RebuildFragmentedIndex(BoxContext& aContext) bool foundMdat = false; for (Box box(&aContext, mOffset); box.IsAvailable(); box = box.Next()) { - if (box.IsType("moov") && mInitRange.IsNull()) { + if (box.IsType("moov") && mInitRange.IsEmpty()) { mInitRange = MediaByteRange(0, box.Range().mEnd); ParseMoov(box); } else if (box.IsType("moof")) { @@ -68,7 +68,7 @@ MoofParser::RebuildFragmentedIndex(BoxContext& aContext) media::Interval mdat(box.Range().mStart, box.Range().mEnd, 0); if (datarange.Intersects(mdat)) { mMediaRanges.LastElement() = - mMediaRanges.LastElement().Extents(box.Range()); + mMediaRanges.LastElement().Span(box.Range()); } } mOffset = box.NextOffset(); @@ -164,7 +164,7 @@ MoofParser::ScanForMetadata(mozilla::MediaByteRange& aFtyp, break; } } - mInitRange = aFtyp.Extents(aMoov); + mInitRange = aFtyp.Span(aMoov); } bool @@ -559,7 +559,7 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, u // FIXME: Make this infallible after bug 968520 is done. MOZ_ALWAYS_TRUE(mIndex.AppendElement(sample, fallible)); - mMdatRange = mMdatRange.Extents(sample.mByteRange); + mMdatRange = mMdatRange.Span(sample.mByteRange); } mMaxRoundingError += aMdhd.ToMicroseconds(sampleCount); diff --git a/media/libstagefright/binding/include/mp4_demuxer/Box.h b/media/libstagefright/binding/include/mp4_demuxer/Box.h index edc5d1d0ee9..b2899a70250 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/Box.h +++ b/media/libstagefright/binding/include/mp4_demuxer/Box.h @@ -38,7 +38,7 @@ public: Box(BoxContext* aContext, uint64_t aOffset, const Box* aParent = nullptr); Box(); - bool IsAvailable() const { return !mRange.IsNull(); } + bool IsAvailable() const { return !mRange.IsEmpty(); } uint64_t Offset() const { return mRange.mStart; } uint64_t Length() const { return mRange.mEnd - mRange.mStart; } uint64_t NextOffset() const { return mRange.mEnd; } diff --git a/media/libstagefright/gtest/TestParser.cpp b/media/libstagefright/gtest/TestParser.cpp index 45f7b60c7b6..8f40ee06f71 100644 --- a/media/libstagefright/gtest/TestParser.cpp +++ b/media/libstagefright/gtest/TestParser.cpp @@ -107,14 +107,14 @@ TEST(stagefright_MoofParser, EmptyStream) EXPECT_FALSE(parser.RebuildFragmentedIndex(byteRanges)); EXPECT_TRUE(parser.GetCompositionRange(byteRanges).IsNull()); - EXPECT_TRUE(parser.mInitRange.IsNull()); + EXPECT_TRUE(parser.mInitRange.IsEmpty()); EXPECT_EQ(0u, parser.mOffset); EXPECT_TRUE(parser.ReachedEnd()); EXPECT_FALSE(parser.HasMetadata()); RefPtr metadataBuffer = parser.Metadata(); EXPECT_FALSE(metadataBuffer); - EXPECT_TRUE(parser.FirstCompleteMediaSegment().IsNull()); - EXPECT_TRUE(parser.FirstCompleteMediaHeader().IsNull()); + EXPECT_TRUE(parser.FirstCompleteMediaSegment().IsEmpty()); + EXPECT_TRUE(parser.FirstCompleteMediaHeader().IsEmpty()); } nsTArray @@ -297,14 +297,14 @@ TEST(stagefright_MoofParser, test_case_mp4) EXPECT_FALSE(parser.RebuildFragmentedIndex(byteRanges)); EXPECT_TRUE(parser.GetCompositionRange(byteRanges).IsNull()); - EXPECT_TRUE(parser.mInitRange.IsNull()); + EXPECT_TRUE(parser.mInitRange.IsEmpty()); EXPECT_EQ(0u, parser.mOffset); EXPECT_FALSE(parser.ReachedEnd()); EXPECT_TRUE(parser.HasMetadata()); RefPtr metadataBuffer = parser.Metadata(); EXPECT_TRUE(metadataBuffer); - EXPECT_TRUE(parser.FirstCompleteMediaSegment().IsNull()); - EXPECT_TRUE(parser.FirstCompleteMediaHeader().IsNull()); + EXPECT_TRUE(parser.FirstCompleteMediaSegment().IsEmpty()); + EXPECT_TRUE(parser.FirstCompleteMediaHeader().IsEmpty()); } } From 20e90b63c7be5cfd6dfaf6fa21749b6c4c5d14c5 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 19:41:20 +1100 Subject: [PATCH 088/135] Bug 1227396: P3. Add IntervalSet::LastInterval method. r=gerald --- dom/media/Intervals.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dom/media/Intervals.h b/dom/media/Intervals.h index 1ffa8c0f748..baa4ac6a231 100644 --- a/dom/media/Intervals.h +++ b/dom/media/Intervals.h @@ -652,6 +652,18 @@ public: return mIntervals.end(); } + ElemType& LastInterval() + { + MOZ_ASSERT(!mIntervals.IsEmpty()); + return mIntervals.LastElement(); + } + + const ElemType& LastInterval() const + { + MOZ_ASSERT(!mIntervals.IsEmpty()); + return mIntervals.LastElement(); + } + protected: ContainerType mIntervals; From 4f2f174bc6a255e9a672e2e655891dbbf2d421e9 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 19:44:14 +1100 Subject: [PATCH 089/135] Bug 1227396: P4. Add IntervalSet::Clear method. r=gerald --- dom/media/Intervals.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dom/media/Intervals.h b/dom/media/Intervals.h index baa4ac6a231..c674d84546d 100644 --- a/dom/media/Intervals.h +++ b/dom/media/Intervals.h @@ -664,6 +664,11 @@ public: return mIntervals.LastElement(); } + void Clear() + { + mIntervals.Clear(); + } + protected: ContainerType mIntervals; From ec54deeacdf5271933c1bc4efc3fb81321cb4a91 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 25 Nov 2015 16:37:34 +1100 Subject: [PATCH 090/135] Bug 1227396: P5. Make Interval::Span ignore empty interval. r=gerald An interval with a length of 0 doesn't really exist and will be removed when used in an IntervalSet. As such, calculating a Span with an empty intervals didn't really make sense --- dom/media/Intervals.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dom/media/Intervals.h b/dom/media/Intervals.h index c674d84546d..42a4372e94d 100644 --- a/dom/media/Intervals.h +++ b/dom/media/Intervals.h @@ -188,6 +188,9 @@ public: SelfType Span(const SelfType& aOther) const { + if (IsEmpty()) { + return aOther; + } SelfType result(*this); if (aOther.mStart < mStart) { result.mStart = aOther.mStart; From 15775bdad8247054682468b7d3cc387cc03f36a4 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 17:57:37 +1100 Subject: [PATCH 091/135] Bug 1227396: P6. Replace MediaByteBuffer with Interval. r=cpearce --- dom/media/MediaResource.h | 56 +++++++++++++-------------------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index 3bbdaf61196..21b81e11dcc 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -14,6 +14,7 @@ #include "nsIStreamListener.h" #include "nsIChannelEventSink.h" #include "nsIInterfaceRequestor.h" +#include "Intervals.h" #include "MediaCache.h" #include "MediaData.h" #include "MediaResourceCallback.h" @@ -130,47 +131,26 @@ private: // Represents a section of contiguous media, with a start and end offset. // Used to denote ranges of data which are cached. -class MediaByteRange { + +class MediaByteRange : public media::Interval { public: - MediaByteRange() : mStart(0), mEnd(0) {} + typedef Interval BaseType; + // We can't use inherited constructors yet. So we have to duplicate the + // constructors found in Interval base class. + // all this could be later replaced with: + // using Interval::Interval; + + MOZ_IMPLICIT MediaByteRange(const BaseType& aOther) + : BaseType(aOther) + {} + MOZ_IMPLICIT MediaByteRange(BaseType&& aOther) + : BaseType(Move(aOther)) + {} MediaByteRange(int64_t aStart, int64_t aEnd) - : mStart(aStart), mEnd(aEnd) - { - NS_ASSERTION(mStart <= mEnd, "Range should end after start!"); - } - - bool IsEmpty() const { - return mStart == 0 && mEnd == 0; - } - - bool operator==(const MediaByteRange& aRange) const { - return mStart == aRange.mStart && mEnd == aRange.mEnd; - } - - // Clears byte range values. - void Clear() { - mStart = 0; - mEnd = 0; - } - - bool Contains(const MediaByteRange& aByteRange) const { - return aByteRange.mStart >= mStart && aByteRange.mEnd <= mEnd; - } - - MediaByteRange Span(const MediaByteRange& aByteRange) const { - if (IsEmpty()) { - return aByteRange; - } - return MediaByteRange(std::min(mStart, aByteRange.mStart), - std::max(mEnd, aByteRange.mEnd)); - } - - int64_t Length() const { - return mEnd - mStart; - } - - int64_t mStart, mEnd; + : media::Interval(aStart, aEnd) + {} + MediaByteRange() = default; }; class RtspMediaResource; From 8abd913bda18a88dd16a7c268d0ff1384c729464 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 20:16:52 +1100 Subject: [PATCH 092/135] Bug 1227396: P7. Replace nsTArray with dedicated MediaByteRangeSet object. r=cpearce --- dom/media/BufferMediaResource.h | 4 ++-- dom/media/MediaCache.cpp | 4 ++-- dom/media/MediaCache.h | 5 +++-- dom/media/MediaResource.cpp | 8 ++++---- dom/media/MediaResource.h | 6 ++++-- dom/media/RtspMediaResource.h | 2 +- dom/media/directshow/DirectShowReader.cpp | 2 +- dom/media/fmp4/MP4Demuxer.cpp | 4 ++-- dom/media/gstreamer/GStreamerReader.cpp | 4 ++-- dom/media/gtest/MockMediaResource.cpp | 7 +++---- dom/media/gtest/MockMediaResource.h | 4 ++-- dom/media/mediasource/ContainerParser.cpp | 5 ++--- dom/media/mediasource/MediaSourceResource.h | 4 ++-- dom/media/mediasource/SourceBufferResource.h | 6 +++--- dom/media/ogg/OggReader.cpp | 6 +++--- dom/media/omx/MediaOmxReader.cpp | 2 +- dom/media/webm/WebMBufferedParser.cpp | 2 +- dom/media/webm/WebMBufferedParser.h | 2 +- dom/media/webm/WebMDemuxer.cpp | 4 ++-- dom/media/webm/WebMReader.cpp | 4 ++-- media/libstagefright/binding/Box.cpp | 4 ++-- media/libstagefright/binding/Index.cpp | 10 +++++----- media/libstagefright/binding/MoofParser.cpp | 20 +++++++++---------- .../binding/include/mp4_demuxer/Box.h | 4 ++-- .../binding/include/mp4_demuxer/Index.h | 6 +++--- .../binding/include/mp4_demuxer/MoofParser.h | 8 ++++---- media/libstagefright/gtest/TestParser.cpp | 9 +++------ 27 files changed, 72 insertions(+), 74 deletions(-) diff --git a/dom/media/BufferMediaResource.h b/dom/media/BufferMediaResource.h index 82ff184fdf1..a5bf11b30fc 100644 --- a/dom/media/BufferMediaResource.h +++ b/dom/media/BufferMediaResource.h @@ -99,9 +99,9 @@ private: return NS_ERROR_FAILURE; } - virtual nsresult GetCachedRanges(nsTArray& aRanges) override + virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override { - aRanges.AppendElement(MediaByteRange(0, mLength)); + aRanges += MediaByteRange(0, mLength); return NS_OK; } diff --git a/dom/media/MediaCache.cpp b/dom/media/MediaCache.cpp index 0ebe1578fd1..e42a236f8cd 100644 --- a/dom/media/MediaCache.cpp +++ b/dom/media/MediaCache.cpp @@ -2442,7 +2442,7 @@ MediaCacheStream::InitAsClone(MediaCacheStream* aOriginal) return NS_OK; } -nsresult MediaCacheStream::GetCachedRanges(nsTArray& aRanges) +nsresult MediaCacheStream::GetCachedRanges(MediaByteRangeSet& aRanges) { // Take the monitor, so that the cached data ranges can't grow while we're // trying to loop over them. @@ -2457,7 +2457,7 @@ nsresult MediaCacheStream::GetCachedRanges(nsTArray& aRanges) int64_t endOffset = GetCachedDataEndInternal(startOffset); NS_ASSERTION(startOffset < endOffset, "Buffered range must end after its start"); // Bytes [startOffset..endOffset] are cached. - aRanges.AppendElement(MediaByteRange(startOffset, endOffset)); + aRanges += MediaByteRange(startOffset, endOffset); startOffset = GetNextCachedDataInternal(endOffset); NS_ASSERTION(startOffset == -1 || startOffset > endOffset, "Must have advanced to start of next range, or hit end of stream"); diff --git a/dom/media/MediaCache.h b/dom/media/MediaCache.h index 36b96a8ceba..0c49986f39e 100644 --- a/dom/media/MediaCache.h +++ b/dom/media/MediaCache.h @@ -11,13 +11,14 @@ #include "nsCOMPtr.h" #include "nsHashKeys.h" #include "nsTHashtable.h" +#include "Intervals.h" class nsIPrincipal; namespace mozilla { // defined in MediaResource.h class ChannelMediaResource; -class MediaByteRange; +typedef media::IntervalSet MediaByteRangeSet; class MediaResource; class ReentrantMonitorAutoEnter; @@ -300,7 +301,7 @@ public: // cached. Locks the media cache while running, to prevent any ranges // growing. The stream should be pinned while this runs and while its results // are used, to ensure no data is evicted. - nsresult GetCachedRanges(nsTArray& aRanges); + nsresult GetCachedRanges(MediaByteRangeSet& aRanges); // Reads from buffered data only. Will fail if not all data to be read is // in the cache. Will not mark blocks as read. Can be called from the main diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index cef5b242eed..ed40054e1bc 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -738,7 +738,7 @@ int64_t ChannelMediaResource::Tell() return mCacheStream.Tell(); } -nsresult ChannelMediaResource::GetCachedRanges(nsTArray& aRanges) +nsresult ChannelMediaResource::GetCachedRanges(MediaByteRangeSet& aRanges) { return mCacheStream.GetCachedRanges(aRanges); } @@ -1202,7 +1202,7 @@ public: virtual bool IsSuspended() override { return true; } virtual bool IsTransportSeekable() override { return true; } - nsresult GetCachedRanges(nsTArray& aRanges) override; + nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override; virtual size_t SizeOfExcludingThis( MallocSizeOf aMallocSizeOf) const override @@ -1274,7 +1274,7 @@ void FileMediaResource::EnsureSizeInitialized() } } -nsresult FileMediaResource::GetCachedRanges(nsTArray& aRanges) +nsresult FileMediaResource::GetCachedRanges(MediaByteRangeSet& aRanges) { MutexAutoLock lock(mLock); @@ -1282,7 +1282,7 @@ nsresult FileMediaResource::GetCachedRanges(nsTArray& aRanges) if (mSize == -1) { return NS_ERROR_FAILURE; } - aRanges.AppendElement(MediaByteRange(0, mSize)); + aRanges += MediaByteRange(0, mSize); return NS_OK; } diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index 21b81e11dcc..845cccca7bf 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -153,6 +153,8 @@ public: MediaByteRange() = default; }; +typedef media::IntervalSet MediaByteRangeSet; + class RtspMediaResource; /** @@ -343,7 +345,7 @@ public: * in the media cache. Stream should be pinned during call and while * aRanges is being used. */ - virtual nsresult GetCachedRanges(nsTArray& aRanges) = 0; + virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) = 0; // Ensure that the media cache writes any data held in its partial block. // Called on the main thread only. @@ -655,7 +657,7 @@ public: }; friend class Listener; - virtual nsresult GetCachedRanges(nsTArray& aRanges) override; + virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override; protected: // These are called on the main thread by Listener. diff --git a/dom/media/RtspMediaResource.h b/dom/media/RtspMediaResource.h index 224da67b5ec..04ed36c00f0 100644 --- a/dom/media/RtspMediaResource.h +++ b/dom/media/RtspMediaResource.h @@ -162,7 +162,7 @@ public: return false; } // dummy - nsresult GetCachedRanges(nsTArray& aRanges) override { + nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override { return NS_ERROR_FAILURE; } diff --git a/dom/media/directshow/DirectShowReader.cpp b/dom/media/directshow/DirectShowReader.cpp index ed6390a79e5..14d7b368cd4 100644 --- a/dom/media/directshow/DirectShowReader.cpp +++ b/dom/media/directshow/DirectShowReader.cpp @@ -384,7 +384,7 @@ DirectShowReader::NotifyDataArrivedInternal() } AutoPinned resource(mDecoder->GetResource()); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv)) { diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp index 6c11eca7bbb..a853182e5c5 100644 --- a/dom/media/fmp4/MP4Demuxer.cpp +++ b/dom/media/fmp4/MP4Demuxer.cpp @@ -264,7 +264,7 @@ MP4TrackDemuxer::EnsureUpToDateIndex() return; } AutoPinned resource(mParent->mResource); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv)) { return; @@ -413,7 +413,7 @@ MP4TrackDemuxer::GetBuffered() { EnsureUpToDateIndex(); AutoPinned resource(mParent->mResource); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv)) { diff --git a/dom/media/gstreamer/GStreamerReader.cpp b/dom/media/gstreamer/GStreamerReader.cpp index aff07e08581..f6d61cbf111 100644 --- a/dom/media/gstreamer/GStreamerReader.cpp +++ b/dom/media/gstreamer/GStreamerReader.cpp @@ -885,7 +885,7 @@ media::TimeIntervals GStreamerReader::GetBuffered() GstFormat format = GST_FORMAT_TIME; #endif AutoPinned resource(mDecoder->GetResource()); - nsTArray ranges; + MediaByteRangeSet ranges; resource->GetCachedRanges(ranges); if (resource->IsDataCachedToEndOfResource(0)) { @@ -1286,7 +1286,7 @@ void GStreamerReader::NotifyDataArrivedInternal() } AutoPinned resource(mResource.GetResource()); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv)) { diff --git a/dom/media/gtest/MockMediaResource.cpp b/dom/media/gtest/MockMediaResource.cpp index 32a77c916de..951f44bb125 100644 --- a/dom/media/gtest/MockMediaResource.cpp +++ b/dom/media/gtest/MockMediaResource.cpp @@ -77,7 +77,7 @@ MockMediaResource::MockClearBufferedRanges() void MockMediaResource::MockAddBufferedRange(int64_t aStart, int64_t aEnd) { - mRanges.AppendElement(MediaByteRange(aStart, aEnd)); + mRanges += MediaByteRange(aStart, aEnd); } int64_t @@ -107,10 +107,9 @@ MockMediaResource::GetCachedDataEnd(int64_t aOffset) } nsresult -MockMediaResource::GetCachedRanges(nsTArray& aRanges) +MockMediaResource::GetCachedRanges(MediaByteRangeSet& aRanges) { - aRanges.Clear(); - aRanges.AppendElements(mRanges); + aRanges = mRanges; return NS_OK; } diff --git a/dom/media/gtest/MockMediaResource.h b/dom/media/gtest/MockMediaResource.h index 20a0ea4cab0..331e32640f6 100644 --- a/dom/media/gtest/MockMediaResource.h +++ b/dom/media/gtest/MockMediaResource.h @@ -58,7 +58,7 @@ public: virtual bool IsTransportSeekable() override { return true; } virtual nsresult Open(nsIStreamListener** aStreamListener) override; - virtual nsresult GetCachedRanges(nsTArray& aRanges) + virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override; virtual const nsCString& GetContentType() const override { @@ -74,7 +74,7 @@ protected: private: FILE* mFileHandle; const char* mFileName; - nsTArray mRanges; + MediaByteRangeSet mRanges; Atomic mEntry; nsCString mContentType; }; diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp index 6fe9caaea6d..cf86937fd08 100644 --- a/dom/media/mediasource/ContainerParser.cpp +++ b/dom/media/mediasource/ContainerParser.cpp @@ -438,10 +438,9 @@ public: } mResource->AppendData(aData); - nsTArray byteRanges; - MediaByteRange mbr = + MediaByteRangeSet byteRanges; + byteRanges += MediaByteRange(mParser->mOffset, mResource->GetLength()); - byteRanges.AppendElement(mbr); mParser->RebuildFragmentedIndex(byteRanges); if (initSegment || !HasCompleteInitData()) { diff --git a/dom/media/mediasource/MediaSourceResource.h b/dom/media/mediasource/MediaSourceResource.h index 467232117d0..6349f81d4a3 100644 --- a/dom/media/mediasource/MediaSourceResource.h +++ b/dom/media/mediasource/MediaSourceResource.h @@ -54,10 +54,10 @@ public: return RefPtr(mPrincipal).forget(); } - virtual nsresult GetCachedRanges(nsTArray& aRanges) override + virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override { UNIMPLEMENTED(); - aRanges.AppendElement(MediaByteRange(0, GetLength())); + aRanges += MediaByteRange(0, GetLength()); return NS_OK; } diff --git a/dom/media/mediasource/SourceBufferResource.h b/dom/media/mediasource/SourceBufferResource.h index bac9b4c08a2..0faea0ad2aa 100644 --- a/dom/media/mediasource/SourceBufferResource.h +++ b/dom/media/mediasource/SourceBufferResource.h @@ -70,12 +70,12 @@ public: virtual bool IsTransportSeekable() override { UNIMPLEMENTED(); return true; } virtual nsresult Open(nsIStreamListener** aStreamListener) override { UNIMPLEMENTED(); return NS_ERROR_FAILURE; } - virtual nsresult GetCachedRanges(nsTArray& aRanges) override + virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override { ReentrantMonitorAutoEnter mon(mMonitor); if (mInputBuffer.GetLength()) { - aRanges.AppendElement(MediaByteRange(mInputBuffer.GetOffset(), - mInputBuffer.GetLength())); + aRanges += MediaByteRange(mInputBuffer.GetOffset(), + mInputBuffer.GetLength()); } return NS_OK; } diff --git a/dom/media/ogg/OggReader.cpp b/dom/media/ogg/OggReader.cpp index 338990038a2..f0f379a5551 100644 --- a/dom/media/ogg/OggReader.cpp +++ b/dom/media/ogg/OggReader.cpp @@ -1160,12 +1160,12 @@ nsresult OggReader::GetSeekRanges(nsTArray& aRanges) { MOZ_ASSERT(OnTaskQueue()); AutoPinned resource(mDecoder->GetResource()); - nsTArray cached; + MediaByteRangeSet cached; nsresult res = resource->GetCachedRanges(cached); NS_ENSURE_SUCCESS(res, res); for (uint32_t index = 0; index < cached.Length(); index++) { - MediaByteRange& range = cached[index]; + auto& range = cached[index]; int64_t startTime = -1; int64_t endTime = -1; if (NS_FAILED(ResetDecode())) { @@ -1841,7 +1841,7 @@ media::TimeIntervals OggReader::GetBuffered() } AutoPinned resource(mDecoder->GetResource()); - nsTArray ranges; + MediaByteRangeSet ranges; nsresult res = resource->GetCachedRanges(ranges); NS_ENSURE_SUCCESS(res, media::TimeIntervals::Invalid()); diff --git a/dom/media/omx/MediaOmxReader.cpp b/dom/media/omx/MediaOmxReader.cpp index 65a370b260b..aa37beeccee 100644 --- a/dom/media/omx/MediaOmxReader.cpp +++ b/dom/media/omx/MediaOmxReader.cpp @@ -464,7 +464,7 @@ void MediaOmxReader::NotifyDataArrivedInternal() } AutoPinned resource(mDecoder->GetResource()); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv)) { diff --git a/dom/media/webm/WebMBufferedParser.cpp b/dom/media/webm/WebMBufferedParser.cpp index 9c7049a427c..3d9679a2427 100644 --- a/dom/media/webm/WebMBufferedParser.cpp +++ b/dom/media/webm/WebMBufferedParser.cpp @@ -383,7 +383,7 @@ void WebMBufferedState::Reset() { mTimeMapping.Clear(); } -void WebMBufferedState::UpdateIndex(const nsTArray& aRanges, MediaResource* aResource) +void WebMBufferedState::UpdateIndex(const MediaByteRangeSet& aRanges, MediaResource* aResource) { for (uint32_t index = 0; index < aRanges.Length(); index++) { const MediaByteRange& range = aRanges[index]; diff --git a/dom/media/webm/WebMBufferedParser.h b/dom/media/webm/WebMBufferedParser.h index d33f66468a2..c65897407d6 100644 --- a/dom/media/webm/WebMBufferedParser.h +++ b/dom/media/webm/WebMBufferedParser.h @@ -266,7 +266,7 @@ public: void NotifyDataArrived(const unsigned char* aBuffer, uint32_t aLength, int64_t aOffset); void Reset(); - void UpdateIndex(const nsTArray& aRanges, MediaResource* aResource); + void UpdateIndex(const MediaByteRangeSet& aRanges, MediaResource* aResource); bool CalculateBufferedForRange(int64_t aStartOffset, int64_t aEndOffset, uint64_t* aStartTime, uint64_t* aEndTime); diff --git a/dom/media/webm/WebMDemuxer.cpp b/dom/media/webm/WebMDemuxer.cpp index be95e933734..ec109d71e5f 100644 --- a/dom/media/webm/WebMDemuxer.cpp +++ b/dom/media/webm/WebMDemuxer.cpp @@ -439,7 +439,7 @@ WebMDemuxer::EnsureUpToDateIndex() return; } AutoPinned resource(mResource.GetResource()); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv) || !byteRanges.Length()) { return; @@ -732,7 +732,7 @@ WebMDemuxer::GetBuffered() media::TimeIntervals buffered; - nsTArray ranges; + MediaByteRangeSet ranges; nsresult rv = resource->GetCachedRanges(ranges); if (NS_FAILED(rv)) { return media::TimeIntervals(); diff --git a/dom/media/webm/WebMReader.cpp b/dom/media/webm/WebMReader.cpp index 4083d49483f..fdee7285d6f 100644 --- a/dom/media/webm/WebMReader.cpp +++ b/dom/media/webm/WebMReader.cpp @@ -749,7 +749,7 @@ media::TimeIntervals WebMReader::GetBuffered() // Either we the file is not fully cached, or we couldn't find a duration in // the WebM bitstream. - nsTArray ranges; + MediaByteRangeSet ranges; nsresult res = resource->GetCachedRanges(ranges); NS_ENSURE_SUCCESS(res, media::TimeIntervals::Invalid()); @@ -788,7 +788,7 @@ void WebMReader::NotifyDataArrivedInternal() { MOZ_ASSERT(OnTaskQueue()); AutoPinned resource(mDecoder->GetResource()); - nsTArray byteRanges; + MediaByteRangeSet byteRanges; nsresult rv = resource->GetCachedRanges(byteRanges); if (NS_FAILED(rv)) { diff --git a/media/libstagefright/binding/Box.cpp b/media/libstagefright/binding/Box.cpp index fdc2665cdf6..46a46b4e427 100644 --- a/media/libstagefright/binding/Box.cpp +++ b/media/libstagefright/binding/Box.cpp @@ -56,7 +56,7 @@ Box::Box(BoxContext* aContext, uint64_t aOffset, const Box* aParent) return; } - byteRange = &mContext->mByteRanges[i]; + byteRange = static_cast(&mContext->mByteRanges[i]); if (byteRange->Contains(headerRange)) { break; } @@ -88,7 +88,7 @@ Box::Box(BoxContext* aContext, uint64_t aOffset, const Box* aParent) mBodyOffset = bigLengthRange.mEnd; } else if (size == 0) { // box extends to end of file. - size = mContext->mByteRanges.LastElement().mEnd - aOffset; + size = mContext->mByteRanges.LastInterval().mEnd - aOffset; mBodyOffset = headerRange.mEnd; } else { mBodyOffset = headerRange.mEnd; diff --git a/media/libstagefright/binding/Index.cpp b/media/libstagefright/binding/Index.cpp index de8dff49738..13e689133e8 100644 --- a/media/libstagefright/binding/Index.cpp +++ b/media/libstagefright/binding/Index.cpp @@ -25,7 +25,7 @@ public: // Given that we're processing this in order we don't use a binary search // to find the apropriate time range. Instead we search linearly from the // last used point. - explicit RangeFinder(const nsTArray& ranges) + explicit RangeFinder(const MediaByteRangeSet& ranges) : mRanges(ranges), mIndex(0) { // Ranges must be normalised for this to work @@ -34,7 +34,7 @@ public: bool Contains(MediaByteRange aByteRange); private: - const nsTArray& mRanges; + const MediaByteRangeSet& mRanges; size_t mIndex; }; @@ -266,7 +266,7 @@ Index::Index(const nsTArray& aIndex, Index::~Index() {} void -Index::UpdateMoofIndex(const nsTArray& aByteRanges) +Index::UpdateMoofIndex(const MediaByteRangeSet& aByteRanges) { if (!mMoofParser) { return; @@ -276,7 +276,7 @@ Index::UpdateMoofIndex(const nsTArray& aByteRanges) } Microseconds -Index::GetEndCompositionIfBuffered(const nsTArray& aByteRanges) +Index::GetEndCompositionIfBuffered(const MediaByteRangeSet& aByteRanges) { FallibleTArray* index; if (mMoofParser) { @@ -305,7 +305,7 @@ Index::GetEndCompositionIfBuffered(const nsTArray& aByteRanges) void Index::ConvertByteRangesToTimeRanges( - const nsTArray& aByteRanges, + const MediaByteRangeSet& aByteRanges, nsTArray>* aTimeRanges) { RangeFinder rangeFinder(aByteRanges); diff --git a/media/libstagefright/binding/MoofParser.cpp b/media/libstagefright/binding/MoofParser.cpp index c3c0b8bd458..310539048e4 100644 --- a/media/libstagefright/binding/MoofParser.cpp +++ b/media/libstagefright/binding/MoofParser.cpp @@ -28,7 +28,7 @@ using namespace mozilla; bool MoofParser::RebuildFragmentedIndex( - const nsTArray& aByteRanges) + const MediaByteRangeSet& aByteRanges) { BoxContext context(mSource, aByteRanges); return RebuildFragmentedIndex(context); @@ -59,7 +59,7 @@ MoofParser::RebuildFragmentedIndex(BoxContext& aContext) } mMoofs.AppendElement(moof); - mMediaRanges.AppendElement(moof.mRange); + mMediaRanges += moof.mRange; foundValidMoof = true; } else if (box.IsType("mdat") && !Moofs().IsEmpty()) { // Check if we have all our data from last moof. @@ -67,8 +67,8 @@ MoofParser::RebuildFragmentedIndex(BoxContext& aContext) media::Interval datarange(moof.mMdatRange.mStart, moof.mMdatRange.mEnd, 0); media::Interval mdat(box.Range().mStart, box.Range().mEnd, 0); if (datarange.Intersects(mdat)) { - mMediaRanges.LastElement() = - mMediaRanges.LastElement().Span(box.Range()); + mMediaRanges.LastInterval() = + mMediaRanges.LastInterval().Span(box.Range()); } } mOffset = box.NextOffset(); @@ -128,15 +128,15 @@ MoofParser::BlockingReadNextMoof() { int64_t length = std::numeric_limits::max(); mSource->Length(&length); - nsTArray byteRanges; - byteRanges.AppendElement(MediaByteRange(0, length)); + MediaByteRangeSet byteRanges; + byteRanges += MediaByteRange(0, length); RefPtr stream = new BlockingStream(mSource); BoxContext context(stream, byteRanges); for (Box box(&context, mOffset); box.IsAvailable(); box = box.Next()) { if (box.IsType("moof")) { byteRanges.Clear(); - byteRanges.AppendElement(MediaByteRange(mOffset, box.Range().mEnd)); + byteRanges += MediaByteRange(mOffset, box.Range().mEnd); return RebuildFragmentedIndex(context); } } @@ -149,8 +149,8 @@ MoofParser::ScanForMetadata(mozilla::MediaByteRange& aFtyp, { int64_t length = std::numeric_limits::max(); mSource->Length(&length); - nsTArray byteRanges; - byteRanges.AppendElement(MediaByteRange(0, length)); + MediaByteRangeSet byteRanges; + byteRanges += MediaByteRange(0, length); RefPtr stream = new BlockingStream(mSource); BoxContext context(stream, byteRanges); @@ -207,7 +207,7 @@ MoofParser::Metadata() } Interval -MoofParser::GetCompositionRange(const nsTArray& aByteRanges) +MoofParser::GetCompositionRange(const MediaByteRangeSet& aByteRanges) { Interval compositionRange; BoxContext context(mSource, aByteRanges); diff --git a/media/libstagefright/binding/include/mp4_demuxer/Box.h b/media/libstagefright/binding/include/mp4_demuxer/Box.h index b2899a70250..e79b0130f83 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/Box.h +++ b/media/libstagefright/binding/include/mp4_demuxer/Box.h @@ -23,13 +23,13 @@ class Stream; class BoxContext { public: - BoxContext(Stream* aSource, const nsTArray& aByteRanges) + BoxContext(Stream* aSource, const MediaByteRangeSet& aByteRanges) : mSource(aSource), mByteRanges(aByteRanges) { } RefPtr mSource; - const nsTArray& mByteRanges; + const MediaByteRangeSet& mByteRanges; }; class Box diff --git a/media/libstagefright/binding/include/mp4_demuxer/Index.h b/media/libstagefright/binding/include/mp4_demuxer/Index.h index c2e4b878b80..b7375087c5c 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/Index.h +++ b/media/libstagefright/binding/include/mp4_demuxer/Index.h @@ -60,11 +60,11 @@ public: bool aIsAudio, mozilla::Monitor* aMonitor); - void UpdateMoofIndex(const nsTArray& aByteRanges); + void UpdateMoofIndex(const mozilla::MediaByteRangeSet& aByteRanges); Microseconds GetEndCompositionIfBuffered( - const nsTArray& aByteRanges); + const mozilla::MediaByteRangeSet& aByteRanges); void ConvertByteRangesToTimeRanges( - const nsTArray& aByteRanges, + const mozilla::MediaByteRangeSet& aByteRanges, nsTArray>* aTimeRanges); uint64_t GetEvictionOffset(Microseconds aTime); bool IsFragmented() { return mMoofParser; } diff --git a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h b/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h index ee2a22d7fa4..9feba016d6a 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h +++ b/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h @@ -165,7 +165,7 @@ public: class AuxInfo { public: AuxInfo(int64_t aMoofOffset, Saiz& aSaiz, Saio& aSaio); - bool GetByteRanges(nsTArray* aByteRanges); + bool GetByteRanges(MediaByteRangeSet* aByteRanges); private: int64_t mMoofOffset; @@ -212,10 +212,10 @@ public: // the composition range for MSE. We need an array of tracks. } bool RebuildFragmentedIndex( - const nsTArray& aByteRanges); + const mozilla::MediaByteRangeSet& aByteRanges); bool RebuildFragmentedIndex(BoxContext& aContext); Interval GetCompositionRange( - const nsTArray& aByteRanges); + const mozilla::MediaByteRangeSet& aByteRanges); bool ReachedEnd(); void ParseMoov(Box& aBox); void ParseTrak(Box& aBox); @@ -250,7 +250,7 @@ private: void ScanForMetadata(mozilla::MediaByteRange& aFtyp, mozilla::MediaByteRange& aMoov); nsTArray mMoofs; - nsTArray mMediaRanges; + MediaByteRangeSet mMediaRanges; bool mIsAudio; }; } diff --git a/media/libstagefright/gtest/TestParser.cpp b/media/libstagefright/gtest/TestParser.cpp index 8f40ee06f71..4903121c019 100644 --- a/media/libstagefright/gtest/TestParser.cpp +++ b/media/libstagefright/gtest/TestParser.cpp @@ -102,8 +102,7 @@ TEST(stagefright_MoofParser, EmptyStream) EXPECT_EQ(0u, parser.mOffset); EXPECT_TRUE(parser.ReachedEnd()); - nsTArray byteRanges; - byteRanges.AppendElement(MediaByteRange(0, 0)); + MediaByteRangeSet byteRanges; EXPECT_FALSE(parser.RebuildFragmentedIndex(byteRanges)); EXPECT_TRUE(parser.GetCompositionRange(byteRanges).IsNull()); @@ -292,8 +291,7 @@ TEST(stagefright_MoofParser, test_case_mp4) EXPECT_EQ(0u, parser.mOffset); EXPECT_FALSE(parser.ReachedEnd()); - nsTArray byteRanges; - byteRanges.AppendElement(MediaByteRange(0, 0)); + MediaByteRangeSet byteRanges; EXPECT_FALSE(parser.RebuildFragmentedIndex(byteRanges)); EXPECT_TRUE(parser.GetCompositionRange(byteRanges).IsNull()); @@ -329,8 +327,7 @@ TEST(stagefright_MoofParser, test_case_mp4_subsets) new TestStream(buffer.Elements() + offset, size); MoofParser parser(stream, 0, false, &monitor); - nsTArray byteRanges; - byteRanges.AppendElement(MediaByteRange(0, 0)); + MediaByteRangeSet byteRanges; EXPECT_FALSE(parser.RebuildFragmentedIndex(byteRanges)); parser.GetCompositionRange(byteRanges); parser.HasMetadata(); From 9ffb614ce1ea3e6f60ad85b1cf422ca6134bee2a Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Tue, 24 Nov 2015 20:37:21 +1100 Subject: [PATCH 093/135] Bug 1227396: P8. Replace MediaByteRange with Interval typedef. r=cpearce It's now okay to simplify. --- dom/media/BufferMediaResource.h | 2 +- dom/media/MediaResource.h | 22 +------------------ dom/media/mediasource/ContainerParser.cpp | 4 ++-- .../mediasource/gtest/TestContainerParser.cpp | 2 +- .../binding/include/mp4_demuxer/MP4Metadata.h | 2 -- 5 files changed, 5 insertions(+), 27 deletions(-) diff --git a/dom/media/BufferMediaResource.h b/dom/media/BufferMediaResource.h index a5bf11b30fc..f252e6590d5 100644 --- a/dom/media/BufferMediaResource.h +++ b/dom/media/BufferMediaResource.h @@ -101,7 +101,7 @@ private: virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override { - aRanges += MediaByteRange(0, mLength); + aRanges += MediaByteRange(0, int64_t(mLength)); return NS_OK; } diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index 845cccca7bf..6f5c2df9eda 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -132,27 +132,7 @@ private: // Represents a section of contiguous media, with a start and end offset. // Used to denote ranges of data which are cached. -class MediaByteRange : public media::Interval { -public: - typedef Interval BaseType; - - // We can't use inherited constructors yet. So we have to duplicate the - // constructors found in Interval base class. - // all this could be later replaced with: - // using Interval::Interval; - - MOZ_IMPLICIT MediaByteRange(const BaseType& aOther) - : BaseType(aOther) - {} - MOZ_IMPLICIT MediaByteRange(BaseType&& aOther) - : BaseType(Move(aOther)) - {} - MediaByteRange(int64_t aStart, int64_t aEnd) - : media::Interval(aStart, aEnd) - {} - MediaByteRange() = default; -}; - +typedef media::Interval MediaByteRange; typedef media::IntervalSet MediaByteRangeSet; class RtspMediaResource; diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp index cf86937fd08..fb06440fe75 100644 --- a/dom/media/mediasource/ContainerParser.cpp +++ b/dom/media/mediasource/ContainerParser.cpp @@ -440,7 +440,7 @@ public: mResource->AppendData(aData); MediaByteRangeSet byteRanges; byteRanges += - MediaByteRange(mParser->mOffset, mResource->GetLength()); + MediaByteRange(int64_t(mParser->mOffset), mResource->GetLength()); mParser->RebuildFragmentedIndex(byteRanges); if (initSegment || !HasCompleteInitData()) { @@ -609,7 +609,7 @@ public: return false; } mHasInitData = true; - mCompleteInitSegmentRange = MediaByteRange(0, header.header_length); + mCompleteInitSegmentRange = MediaByteRange(0, int64_t(header.header_length)); // Cache raw header in case the caller wants a copy. mInitData = new MediaByteBuffer(header.header_length); diff --git a/dom/media/mediasource/gtest/TestContainerParser.cpp b/dom/media/mediasource/gtest/TestContainerParser.cpp index a65d691fade..d29770cd35c 100644 --- a/dom/media/mediasource/gtest/TestContainerParser.cpp +++ b/dom/media/mediasource/gtest/TestContainerParser.cpp @@ -85,7 +85,7 @@ TEST(ContainerParser, ADTSHeader) { ASSERT_NE(init, nullptr); EXPECT_EQ(init->Length(), header->Length()); - EXPECT_EQ(parser->InitSegmentRange(), MediaByteRange(0, header->Length())); + EXPECT_EQ(parser->InitSegmentRange(), MediaByteRange(0, int64_t(header->Length()))); // Media segment range should be empty here. EXPECT_EQ(parser->MediaHeaderRange(), MediaByteRange()); EXPECT_EQ(parser->MediaSegmentRange(), MediaByteRange()); diff --git a/media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h b/media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h index 33eda84fe2a..e0b8e362cda 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h +++ b/media/libstagefright/binding/include/mp4_demuxer/MP4Metadata.h @@ -14,8 +14,6 @@ #include "MediaInfo.h" #include "MediaResource.h" -namespace mozilla { class MediaByteRange; } - namespace stagefright { class MetaData; } namespace mp4_demuxer From 3ccc47c48a56654d7866d2b8c94bb3763c98a198 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 25 Nov 2015 12:24:42 +1100 Subject: [PATCH 094/135] Bug 1227396: P9. Remove unnecessary monitor. r=cpearce The Index and MoofParser are now only used via the MP4Demuxer which is guaranteed to always be called on the same taskqueue. --- dom/media/fmp4/MP4Demuxer.cpp | 13 +------------ dom/media/mediasource/ContainerParser.cpp | 6 +----- media/libstagefright/binding/Index.cpp | 6 ++---- media/libstagefright/binding/MP4Metadata.cpp | 11 ++--------- .../binding/include/mp4_demuxer/Index.h | 5 +---- .../binding/include/mp4_demuxer/MoofParser.h | 8 ++------ media/libstagefright/gtest/TestParser.cpp | 12 +++--------- 7 files changed, 12 insertions(+), 49 deletions(-) diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp index a853182e5c5..c0c92135f4e 100644 --- a/dom/media/fmp4/MP4Demuxer.cpp +++ b/dom/media/fmp4/MP4Demuxer.cpp @@ -59,9 +59,6 @@ private: RefPtr mParent; RefPtr mStream; UniquePtr mInfo; - // We do not actually need a monitor, however MoofParser (in mIndex) will - // assert if a monitor isn't held. - Monitor mMonitor; RefPtr mIndex; UniquePtr mIterator; Maybe mNextKeyframeTime; @@ -228,12 +225,10 @@ MP4TrackDemuxer::MP4TrackDemuxer(MP4Demuxer* aParent, : mParent(aParent) , mStream(new mp4_demuxer::ResourceStream(mParent->mResource)) , mInfo(Move(aInfo)) - , mMonitor("MP4TrackDemuxer") , mIndex(new mp4_demuxer::Index(indices, mStream, mInfo->mTrackId, - mInfo->IsAudio(), - &mMonitor)) + mInfo->IsAudio())) , mIterator(MakeUnique(mIndex)) , mNeedReIndex(true) { @@ -269,7 +264,6 @@ MP4TrackDemuxer::EnsureUpToDateIndex() if (NS_FAILED(rv)) { return; } - MonitorAutoLock mon(mMonitor); mIndex->UpdateMoofIndex(byteRanges); mNeedReIndex = false; } @@ -280,7 +274,6 @@ MP4TrackDemuxer::Seek(media::TimeUnit aTime) int64_t seekTime = aTime.ToMicroseconds(); mQueuedSample = nullptr; - MonitorAutoLock mon(mMonitor); mIterator->Seek(seekTime); // Check what time we actually seeked to. @@ -307,7 +300,6 @@ MP4TrackDemuxer::GetSamples(int32_t aNumSamples) mQueuedSample = nullptr; aNumSamples--; } - MonitorAutoLock mon(mMonitor); RefPtr sample; while (aNumSamples && (sample = mIterator->GetNext())) { samples->mSamples.AppendElement(sample); @@ -338,7 +330,6 @@ MP4TrackDemuxer::Reset() { mQueuedSample = nullptr; // TODO, Seek to first frame available, which isn't always 0. - MonitorAutoLock mon(mMonitor); mIterator->Seek(0); SetNextKeyFrameTime(); } @@ -386,7 +377,6 @@ MP4TrackDemuxer::GetNextRandomAccessPoint(media::TimeUnit* aTime) RefPtr MP4TrackDemuxer::SkipToNextRandomAccessPoint(media::TimeUnit aTimeThreshold) { - MonitorAutoLock mon(mMonitor); mQueuedSample = nullptr; // Loop until we reach the next keyframe after the threshold. uint32_t parsed = 0; @@ -421,7 +411,6 @@ MP4TrackDemuxer::GetBuffered() } nsTArray> timeRanges; - MonitorAutoLock mon(mMonitor); mIndex->ConvertByteRangesToTimeRanges(byteRanges, &timeRanges); // convert timeRanges. media::TimeIntervals ranges = media::TimeIntervals(); diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp index fb06440fe75..2ed765d4d73 100644 --- a/dom/media/mediasource/ContainerParser.cpp +++ b/dom/media/mediasource/ContainerParser.cpp @@ -334,7 +334,6 @@ class MP4ContainerParser : public ContainerParser { public: explicit MP4ContainerParser(const nsACString& aType) : ContainerParser(aType) - , mMonitor("MP4ContainerParser Index Monitor") {} bool IsInitSegmentPresent(MediaByteBuffer* aData) override @@ -421,8 +420,6 @@ public: bool ParseStartAndEndTimestamps(MediaByteBuffer* aData, int64_t& aStart, int64_t& aEnd) override { - MonitorAutoLock mon(mMonitor); // We're not actually racing against anything, - // but mParser requires us to hold a monitor. bool initSegment = IsInitSegmentPresent(aData); if (initSegment) { mResource = new SourceBufferResource(NS_LITERAL_CSTRING("video/mp4")); @@ -431,7 +428,7 @@ public: // consumers of ParseStartAndEndTimestamps to add their timestamp offset // manually. This allows the ContainerParser to be shared across different // timestampOffsets. - mParser = new mp4_demuxer::MoofParser(mStream, 0, /* aIsAudio = */ false, &mMonitor); + mParser = new mp4_demuxer::MoofParser(mStream, 0, /* aIsAudio = */ false); mInitData = new MediaByteBuffer(); } else if (!mStream || !mParser) { return false; @@ -495,7 +492,6 @@ public: private: RefPtr mStream; nsAutoPtr mParser; - Monitor mMonitor; }; #endif // MOZ_FMP4 diff --git a/media/libstagefright/binding/Index.cpp b/media/libstagefright/binding/Index.cpp index 13e689133e8..c3a4e20f84c 100644 --- a/media/libstagefright/binding/Index.cpp +++ b/media/libstagefright/binding/Index.cpp @@ -236,13 +236,11 @@ SampleIterator::GetNextKeyframeTime() Index::Index(const nsTArray& aIndex, Stream* aSource, uint32_t aTrackId, - bool aIsAudio, - Monitor* aMonitor) + bool aIsAudio) : mSource(aSource) - , mMonitor(aMonitor) { if (aIndex.IsEmpty()) { - mMoofParser = new MoofParser(aSource, aTrackId, aIsAudio, aMonitor); + mMoofParser = new MoofParser(aSource, aTrackId, aIsAudio); } else { if (!mIndex.SetCapacity(aIndex.Length(), fallible)) { // OOM. diff --git a/media/libstagefright/binding/MP4Metadata.cpp b/media/libstagefright/binding/MP4Metadata.cpp index 5ab8ecf3133..a3f68b73b19 100644 --- a/media/libstagefright/binding/MP4Metadata.cpp +++ b/media/libstagefright/binding/MP4Metadata.cpp @@ -8,7 +8,6 @@ #include "media/stagefright/MediaSource.h" #include "media/stagefright/MetaData.h" #include "mozilla/Logging.h" -#include "mozilla/Monitor.h" #include "mozilla/Telemetry.h" #include "mp4_demuxer/MoofParser.h" #include "mp4_demuxer/MP4Metadata.h" @@ -333,20 +332,14 @@ MP4Metadata::GetTrackNumber(mozilla::TrackID aTrackID) /*static*/ bool MP4Metadata::HasCompleteMetadata(Stream* aSource) { - // The MoofParser requires a monitor, but we don't need one here. - mozilla::Monitor monitor("MP4Metadata::HasCompleteMetadata"); - mozilla::MonitorAutoLock mon(monitor); - auto parser = mozilla::MakeUnique(aSource, 0, false, &monitor); + auto parser = mozilla::MakeUnique(aSource, 0, false); return parser->HasMetadata(); } /*static*/ already_AddRefed MP4Metadata::Metadata(Stream* aSource) { - // The MoofParser requires a monitor, but we don't need one here. - mozilla::Monitor monitor("MP4Metadata::HasCompleteMetadata"); - mozilla::MonitorAutoLock mon(monitor); - auto parser = mozilla::MakeUnique(aSource, 0, false, &monitor); + auto parser = mozilla::MakeUnique(aSource, 0, false); return parser->Metadata(); } diff --git a/media/libstagefright/binding/include/mp4_demuxer/Index.h b/media/libstagefright/binding/include/mp4_demuxer/Index.h index b7375087c5c..cd42481e727 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/Index.h +++ b/media/libstagefright/binding/include/mp4_demuxer/Index.h @@ -7,7 +7,6 @@ #include "MediaData.h" #include "MediaResource.h" -#include "mozilla/Monitor.h" #include "mp4_demuxer/Interval.h" #include "mp4_demuxer/Stream.h" #include "nsISupportsImpl.h" @@ -57,8 +56,7 @@ public: Index(const nsTArray& aIndex, Stream* aSource, uint32_t aTrackId, - bool aIsAudio, - mozilla::Monitor* aMonitor); + bool aIsAudio); void UpdateMoofIndex(const mozilla::MediaByteRangeSet& aByteRanges); Microseconds GetEndCompositionIfBuffered( @@ -77,7 +75,6 @@ private: Stream* mSource; FallibleTArray mIndex; nsAutoPtr mMoofParser; - mozilla::Monitor* mMonitor; }; } diff --git a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h b/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h index 9feba016d6a..7b6d8bfd4f4 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h +++ b/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h @@ -5,7 +5,6 @@ #ifndef MOOF_PARSER_H_ #define MOOF_PARSER_H_ -#include "mozilla/Monitor.h" #include "mp4_demuxer/Atom.h" #include "mp4_demuxer/AtomType.h" #include "mp4_demuxer/SinfParser.h" @@ -14,7 +13,6 @@ #include "MediaResource.h" namespace mp4_demuxer { -using mozilla::Monitor; typedef int64_t Microseconds; class Box; @@ -201,11 +199,10 @@ private: class MoofParser { public: - MoofParser(Stream* aSource, uint32_t aTrackId, bool aIsAudio, Monitor* aMonitor) + MoofParser(Stream* aSource, uint32_t aTrackId, bool aIsAudio) : mSource(aSource) , mOffset(0) , mTrex(aTrackId) - , mMonitor(aMonitor) , mIsAudio(aIsAudio) { // Setting the mTrex.mTrackId to 0 is a nasty work around for calculating @@ -244,8 +241,7 @@ public: Tfdt mTfdt; Edts mEdts; Sinf mSinf; - Monitor* mMonitor; - nsTArray& Moofs() { mMonitor->AssertCurrentThreadOwns(); return mMoofs; } + nsTArray& Moofs() { return mMoofs; } private: void ScanForMetadata(mozilla::MediaByteRange& aFtyp, mozilla::MediaByteRange& aMoov); diff --git a/media/libstagefright/gtest/TestParser.cpp b/media/libstagefright/gtest/TestParser.cpp index 4903121c019..26942abe431 100644 --- a/media/libstagefright/gtest/TestParser.cpp +++ b/media/libstagefright/gtest/TestParser.cpp @@ -96,9 +96,7 @@ TEST(stagefright_MoofParser, EmptyStream) { RefPtr stream = new TestStream(nullptr, 0); - Monitor monitor("MP4Metadata::gtest"); - MonitorAutoLock mon(monitor); - MoofParser parser(stream, 0, false, &monitor); + MoofParser parser(stream, 0, false); EXPECT_EQ(0u, parser.mOffset); EXPECT_TRUE(parser.ReachedEnd()); @@ -285,9 +283,7 @@ TEST(stagefright_MoofParser, test_case_mp4) ASSERT_FALSE(buffer.IsEmpty()); RefPtr stream = new TestStream(buffer.Elements(), buffer.Length()); - Monitor monitor("MP4Metadata::HasCompleteMetadata"); - MonitorAutoLock mon(monitor); - MoofParser parser(stream, 0, false, &monitor); + MoofParser parser(stream, 0, false); EXPECT_EQ(0u, parser.mOffset); EXPECT_FALSE(parser.ReachedEnd()); @@ -315,8 +311,6 @@ TEST(stagefright_MoofParser, test_case_mp4_subsets) nsTArray buffer = ReadTestFile(testFiles[test].mFilename); ASSERT_FALSE(buffer.IsEmpty()); ASSERT_LE(step, buffer.Length()); - Monitor monitor("MP4Metadata::HasCompleteMetadata"); - MonitorAutoLock mon(monitor); // Just exercizing the parser starting at different points through the file, // making sure it doesn't crash. // No checks because results would differ for each position. @@ -326,7 +320,7 @@ TEST(stagefright_MoofParser, test_case_mp4_subsets) RefPtr stream = new TestStream(buffer.Elements() + offset, size); - MoofParser parser(stream, 0, false, &monitor); + MoofParser parser(stream, 0, false); MediaByteRangeSet byteRanges; EXPECT_FALSE(parser.RebuildFragmentedIndex(byteRanges)); parser.GetCompositionRange(byteRanges); From c0593734db2ffe8c60c234f12199ffd5acdc7f90 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 25 Nov 2015 13:17:27 +1100 Subject: [PATCH 095/135] Bug 1227396: P10: Remove stray function definition. r=cpearce --- media/libstagefright/binding/include/mp4_demuxer/MoofParser.h | 1 - 1 file changed, 1 deletion(-) diff --git a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h b/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h index 7b6d8bfd4f4..af5b8ed8028 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h +++ b/media/libstagefright/binding/include/mp4_demuxer/MoofParser.h @@ -163,7 +163,6 @@ public: class AuxInfo { public: AuxInfo(int64_t aMoofOffset, Saiz& aSaiz, Saio& aSaio); - bool GetByteRanges(MediaByteRangeSet* aByteRanges); private: int64_t mMoofOffset; From 31b48c06412bcbdbe79d3f4b2f19e63eda23aa9e Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 25 Nov 2015 20:46:11 +1100 Subject: [PATCH 096/135] Bug 1227396: P11. Add IntervalSet::operator- operand. r=gerald Also fix constness. --- dom/media/Intervals.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dom/media/Intervals.h b/dom/media/Intervals.h index 42a4372e94d..fa3ea2ed08e 100644 --- a/dom/media/Intervals.h +++ b/dom/media/Intervals.h @@ -401,7 +401,7 @@ public: return intervals; } - SelfType operator+ (const ElemType& aInterval) + SelfType operator+ (const ElemType& aInterval) const { SelfType intervals(*this); intervals.Add(aInterval); @@ -442,7 +442,14 @@ public: return *this; } - SelfType operator- (const ElemType& aInterval) + SelfType operator- (const SelfType& aInterval) const + { + SelfType intervals(*this); + intervals -= aInterval; + return intervals; + } + + SelfType operator- (const ElemType& aInterval) const { SelfType intervals(*this); intervals -= aInterval; From 6108e7a8c1c495fad0df4c058bd8a29e16d932ae Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Wed, 25 Nov 2015 20:30:09 +1100 Subject: [PATCH 097/135] Bug 1227396: P12. Use MediaByteRangeSet capabilities to filter already processed data. r=cpearce --- dom/media/MP3FrameParser.h | 18 ------------------ dom/media/directshow/DirectShowReader.cpp | 9 +++++---- dom/media/directshow/DirectShowReader.h | 3 ++- dom/media/gstreamer/GStreamerReader.cpp | 9 +++++---- dom/media/gstreamer/GStreamerReader.h | 2 +- dom/media/omx/MediaOmxReader.cpp | 8 +++++--- dom/media/omx/MediaOmxReader.h | 2 +- 7 files changed, 19 insertions(+), 32 deletions(-) diff --git a/dom/media/MP3FrameParser.h b/dom/media/MP3FrameParser.h index f0489db784b..9941fe1aad8 100644 --- a/dom/media/MP3FrameParser.h +++ b/dom/media/MP3FrameParser.h @@ -214,24 +214,6 @@ private: }; -class NotifyDataArrivedFilter { -public: - media::IntervalSet NotifyDataArrived(uint32_t aLength, int64_t aOffset) { - media::Interval interval(aOffset, aOffset + aLength); - media::IntervalSet newIntervals(interval); - newIntervals -= mIntervals; - mIntervals += interval; - return newIntervals; - } - - const media::IntervalSet& GetIntervals() { - return mIntervals; - } - -private: - media::IntervalSet mIntervals; -}; - } // namespace mozilla #endif diff --git a/dom/media/directshow/DirectShowReader.cpp b/dom/media/directshow/DirectShowReader.cpp index 14d7b368cd4..9e3372e86ce 100644 --- a/dom/media/directshow/DirectShowReader.cpp +++ b/dom/media/directshow/DirectShowReader.cpp @@ -11,7 +11,6 @@ #include "AudioSinkFilter.h" #include "SourceFilter.h" #include "SampleSink.h" -#include "MediaResource.h" #include "VideoUtils.h" using namespace mozilla::media; @@ -391,10 +390,12 @@ DirectShowReader::NotifyDataArrivedInternal() return; } - IntervalSet intervals; - for (auto& range : byteRanges) { - intervals += mFilter.NotifyDataArrived(range.Length(), range.mStart); + if (byteRanges == mLastCachedRanges) { + return; } + MediaByteRangeSet intervals = byteRanges - mLastCachedRanges; + mLastCachedRanges = byteRanges; + for (const auto& interval : intervals) { RefPtr bytes = resource->MediaReadAt(interval.mStart, interval.Length()); diff --git a/dom/media/directshow/DirectShowReader.h b/dom/media/directshow/DirectShowReader.h index c15f083f6b2..50ea70b5999 100644 --- a/dom/media/directshow/DirectShowReader.h +++ b/dom/media/directshow/DirectShowReader.h @@ -9,6 +9,7 @@ #include "windows.h" // HRESULT, DWORD #include "MediaDecoderReader.h" +#include "MediaResource.h" #include "mozilla/RefPtr.h" #include "MP3FrameParser.h" @@ -105,7 +106,7 @@ private: // Duration of the stream, in microseconds. int64_t mDuration; - NotifyDataArrivedFilter mFilter; + MediaByteRangeSet mLastCachedRanges; }; } // namespace mozilla diff --git a/dom/media/gstreamer/GStreamerReader.cpp b/dom/media/gstreamer/GStreamerReader.cpp index f6d61cbf111..431a5188ab8 100644 --- a/dom/media/gstreamer/GStreamerReader.cpp +++ b/dom/media/gstreamer/GStreamerReader.cpp @@ -1292,11 +1292,12 @@ void GStreamerReader::NotifyDataArrivedInternal() if (NS_FAILED(rv)) { return; } - - IntervalSet intervals; - for (auto& range : byteRanges) { - intervals += mFilter.NotifyDataArrived(range.Length(), range.mStart); + if (byteRanges == mLastCachedRanges) { + return; } + MediaByteRangeSet intervals = byteRanges - mLastCachedRanges; + mLastCachedRanges = byteRanges; + for (const auto& interval : intervals) { RefPtr bytes = resource->MediaReadAt(interval.mStart, interval.Length()); diff --git a/dom/media/gstreamer/GStreamerReader.h b/dom/media/gstreamer/GStreamerReader.h index 5de06a946ea..01e5320ac1f 100644 --- a/dom/media/gstreamer/GStreamerReader.h +++ b/dom/media/gstreamer/GStreamerReader.h @@ -256,7 +256,7 @@ private: int fpsDen; MediaResourceIndex mResource; - NotifyDataArrivedFilter mFilter; + MediaByteRangeSet mLastCachedRanges; }; } // namespace mozilla diff --git a/dom/media/omx/MediaOmxReader.cpp b/dom/media/omx/MediaOmxReader.cpp index aa37beeccee..e31a9119bc0 100644 --- a/dom/media/omx/MediaOmxReader.cpp +++ b/dom/media/omx/MediaOmxReader.cpp @@ -471,10 +471,12 @@ void MediaOmxReader::NotifyDataArrivedInternal() return; } - IntervalSet intervals; - for (auto& range : byteRanges) { - intervals += mFilter.NotifyDataArrived(range.Length(), range.mStart); + if (byteRanges == mLastCachedRanges) { + return; } + MediaByteRangeSet intervals = byteRanges - mLastCachedRanges; + mLastCachedRanges = byteRanges; + for (const auto& interval : intervals) { RefPtr bytes = resource->MediaReadAt(interval.mStart, interval.Length()); diff --git a/dom/media/omx/MediaOmxReader.h b/dom/media/omx/MediaOmxReader.h index 8c9e56751e8..b0e230c734a 100644 --- a/dom/media/omx/MediaOmxReader.h +++ b/dom/media/omx/MediaOmxReader.h @@ -120,7 +120,7 @@ private: already_AddRefed SafeGetDecoder(); - NotifyDataArrivedFilter mFilter; + MediaByteRangeSet mLastCachedRanges; }; } // namespace mozilla From 9945ff818845f0a693328610b05b691ca33c9f21 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Fri, 27 Nov 2015 15:03:19 +1100 Subject: [PATCH 098/135] Bug 1227396: P13. Refactor how MP4 buffered range is calculated. r=cpearce We now use an index of samples made of block of samples delimited by keyframes. The search is performed using a binary search. This allows to quickly find which blocks are found within the media cache. On a 8 core mac pro, this leads to a 67% improvement on CPU time spent playing a long MP4 video (from 112s CPU to 45s CPU) The optimisation is only possible if all mp4 data chunks are continuous (which they almost always are) --- dom/media/fmp4/MP4Demuxer.cpp | 11 +- media/libstagefright/binding/Index.cpp | 112 ++++++++++++++++-- .../binding/include/mp4_demuxer/Index.h | 50 +++++++- 3 files changed, 146 insertions(+), 27 deletions(-) diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp index c0c92135f4e..dc9fb427909 100644 --- a/dom/media/fmp4/MP4Demuxer.cpp +++ b/dom/media/fmp4/MP4Demuxer.cpp @@ -409,17 +409,8 @@ MP4TrackDemuxer::GetBuffered() if (NS_FAILED(rv)) { return media::TimeIntervals(); } - nsTArray> timeRanges; - mIndex->ConvertByteRangesToTimeRanges(byteRanges, &timeRanges); - // convert timeRanges. - media::TimeIntervals ranges = media::TimeIntervals(); - for (size_t i = 0; i < timeRanges.Length(); i++) { - ranges += - media::TimeInterval(media::TimeUnit::FromMicroseconds(timeRanges[i].start), - media::TimeUnit::FromMicroseconds(timeRanges[i].end)); - } - return ranges; + return mIndex->ConvertByteRangesToTimeRanges(byteRanges); } void diff --git a/media/libstagefright/binding/Index.cpp b/media/libstagefright/binding/Index.cpp index c3a4e20f84c..993011cc38a 100644 --- a/media/libstagefright/binding/Index.cpp +++ b/media/libstagefright/binding/Index.cpp @@ -5,7 +5,6 @@ #include "mp4_demuxer/ByteReader.h" #include "mp4_demuxer/Index.h" #include "mp4_demuxer/Interval.h" -#include "mp4_demuxer/MoofParser.h" #include "mp4_demuxer/SinfParser.h" #include "nsAutoPtr.h" #include "mozilla/RefPtr.h" @@ -15,6 +14,7 @@ using namespace stagefright; using namespace mozilla; +using namespace mozilla::media; namespace mp4_demuxer { @@ -45,7 +45,7 @@ RangeFinder::Contains(MediaByteRange aByteRange) return false; } - if (mRanges[mIndex].Contains(aByteRange)) { + if (mRanges[mIndex].ContainsStrict(aByteRange)) { return true; } @@ -56,7 +56,7 @@ RangeFinder::Contains(MediaByteRange aByteRange) return false; } --mIndex; - if (mRanges[mIndex].Contains(aByteRange)) { + if (mRanges[mIndex].ContainsStrict(aByteRange)) { return true; } } while (aByteRange.mStart < mRanges[mIndex].mStart); @@ -69,7 +69,7 @@ RangeFinder::Contains(MediaByteRange aByteRange) return false; } ++mIndex; - if (mRanges[mIndex].Contains(aByteRange)) { + if (mRanges[mIndex].ContainsStrict(aByteRange)) { return true; } } @@ -246,8 +246,19 @@ Index::Index(const nsTArray& aIndex, // OOM. return; } - for (size_t i = 0; i < aIndex.Length(); i++) { - const Indice& indice = aIndex[i]; + media::IntervalSet intervalTime; + MediaByteRange intervalRange; + bool haveSync = false; + bool progressive = true; + int64_t lastOffset = 0; + for (const Indice& indice : aIndex) { + if (indice.sync) { + haveSync = true; + } + if (!haveSync) { + continue; + } + Sample sample; sample.mByteRange = MediaByteRange(indice.start_offset, indice.end_offset); @@ -257,6 +268,40 @@ Index::Index(const nsTArray& aIndex, sample.mSync = indice.sync; // FIXME: Make this infallible after bug 968520 is done. MOZ_ALWAYS_TRUE(mIndex.AppendElement(sample, fallible)); + if (indice.start_offset < lastOffset) { + NS_WARNING("Chunks in MP4 out of order, expect slow down"); + progressive = false; + } + lastOffset = indice.end_offset; + + if (sample.mSync && progressive) { + if (mDataOffset.Length()) { + auto& last = mDataOffset.LastElement(); + last.mEndOffset = intervalRange.mEnd; + NS_ASSERTION(intervalTime.Length() == 1, "Discontinuous samples between keyframes"); + last.mTime.start = intervalTime.GetStart(); + last.mTime.end = intervalTime.GetEnd(); + } + if (!mDataOffset.AppendElement(MP4DataOffset(mIndex.Length() - 1, + indice.start_offset), + fallible)) { + // OOM. + return; + } + intervalTime = media::IntervalSet(); + intervalRange = MediaByteRange(); + } + intervalTime += media::Interval(sample.mCompositionRange.start, + sample.mCompositionRange.end); + intervalRange = intervalRange.Span(sample.mByteRange); + } + + if (mDataOffset.Length() && progressive) { + auto& last = mDataOffset.LastElement(); + last.mEndOffset = aIndex.LastElement().end_offset; + last.mTime = Interval(intervalTime.GetStart(), intervalTime.GetEnd()); + } else { + mDataOffset.Clear(); } } } @@ -301,14 +346,47 @@ Index::GetEndCompositionIfBuffered(const MediaByteRangeSet& aByteRanges) return 0; } -void -Index::ConvertByteRangesToTimeRanges( - const MediaByteRangeSet& aByteRanges, - nsTArray>* aTimeRanges) +TimeIntervals +Index::ConvertByteRangesToTimeRanges(const MediaByteRangeSet& aByteRanges) { + if (aByteRanges == mLastCachedRanges) { + return mLastBufferedRanges; + } + mLastCachedRanges = aByteRanges; + + if (mDataOffset.Length()) { + TimeIntervals timeRanges; + for (const auto& range : aByteRanges) { + uint32_t start = mDataOffset.IndexOfFirstElementGt(range.mStart - 1); + if (start == mDataOffset.Length()) { + continue; + } + uint32_t end = mDataOffset.IndexOfFirstElementGt(range.mEnd, MP4DataOffset::EndOffsetComparator()); + if (end < start) { + continue; + } + if (end > start) { + timeRanges += + TimeInterval(TimeUnit::FromMicroseconds(mDataOffset[start].mTime.start), + TimeUnit::FromMicroseconds(mDataOffset[end-1].mTime.end)); + } + if (end < mDataOffset.Length()) { + // Find samples in partial block contained in the byte range. + for (size_t i = mDataOffset[end].mIndex; + i < mIndex.Length() && range.ContainsStrict(mIndex[i].mByteRange); + i++) { + timeRanges += + TimeInterval(TimeUnit::FromMicroseconds(mIndex[i].mCompositionRange.start), + TimeUnit::FromMicroseconds(mIndex[i].mCompositionRange.end)); + } + } + } + mLastBufferedRanges = timeRanges; + return timeRanges; + } + RangeFinder rangeFinder(aByteRanges); nsTArray> timeRanges; - nsTArray*> indexes; if (mMoofParser) { // We take the index out of the moof parser and move it into a local @@ -353,7 +431,17 @@ Index::ConvertByteRangesToTimeRanges( } // This fixes up when the compositon order differs from the byte range order - Interval::Normalize(timeRanges, aTimeRanges); + nsTArray> timeRangesNormalized; + Interval::Normalize(timeRanges, &timeRangesNormalized); + // convert timeRanges. + media::TimeIntervals ranges; + for (size_t i = 0; i < timeRangesNormalized.Length(); i++) { + ranges += + media::TimeInterval(media::TimeUnit::FromMicroseconds(timeRangesNormalized[i].start), + media::TimeUnit::FromMicroseconds(timeRangesNormalized[i].end)); + } + mLastBufferedRanges = ranges; + return ranges; } uint64_t diff --git a/media/libstagefright/binding/include/mp4_demuxer/Index.h b/media/libstagefright/binding/include/mp4_demuxer/Index.h index cd42481e727..605cecd6223 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/Index.h +++ b/media/libstagefright/binding/include/mp4_demuxer/Index.h @@ -7,6 +7,8 @@ #include "MediaData.h" #include "MediaResource.h" +#include "TimeUnits.h" +#include "mp4_demuxer/MoofParser.h" #include "mp4_demuxer/Interval.h" #include "mp4_demuxer/Stream.h" #include "nsISupportsImpl.h" @@ -17,8 +19,6 @@ namespace mp4_demuxer { class Index; -class MoofParser; -struct Sample; typedef int64_t Microseconds; @@ -53,6 +53,42 @@ public: bool sync; }; + struct MP4DataOffset + { + MP4DataOffset(uint32_t aIndex, int64_t aStartOffset) + : mIndex(aIndex) + , mStartOffset(aStartOffset) + , mEndOffset(0) + {} + + bool operator==(int64_t aStartOffset) const { + return mStartOffset == aStartOffset; + } + + bool operator!=(int64_t aStartOffset) const { + return mStartOffset != aStartOffset; + } + + bool operator<(int64_t aStartOffset) const { + return mStartOffset < aStartOffset; + } + + struct EndOffsetComparator { + bool Equals(const MP4DataOffset& a, const int64_t& b) const { + return a.mEndOffset == b; + } + + bool LessThan(const MP4DataOffset& a, const int64_t& b) const { + return a.mEndOffset < b; + } + }; + + uint32_t mIndex; + int64_t mStartOffset; + int64_t mEndOffset; + Interval mTime; + }; + Index(const nsTArray& aIndex, Stream* aSource, uint32_t aTrackId, @@ -61,9 +97,8 @@ public: void UpdateMoofIndex(const mozilla::MediaByteRangeSet& aByteRanges); Microseconds GetEndCompositionIfBuffered( const mozilla::MediaByteRangeSet& aByteRanges); - void ConvertByteRangesToTimeRanges( - const mozilla::MediaByteRangeSet& aByteRanges, - nsTArray>* aTimeRanges); + mozilla::media::TimeIntervals ConvertByteRangesToTimeRanges( + const mozilla::MediaByteRangeSet& aByteRanges); uint64_t GetEvictionOffset(Microseconds aTime); bool IsFragmented() { return mMoofParser; } @@ -74,7 +109,12 @@ private: Stream* mSource; FallibleTArray mIndex; + FallibleTArray mDataOffset; nsAutoPtr mMoofParser; + + // ConvertByteRangesToTimeRanges cache + mozilla::MediaByteRangeSet mLastCachedRanges; + mozilla::media::TimeIntervals mLastBufferedRanges; }; } From 4ac83d3195f5c6fe20b152c4b713eb653cbbeeaa Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Fri, 27 Nov 2015 15:51:58 +1100 Subject: [PATCH 099/135] Bug 1227396: P14. Reduce memory usage of sample index for audio tracks. r=cpearce All samples in an audio track are keyframes. As such, use block on 128 samples instead. --- media/libstagefright/binding/Index.cpp | 23 +++++++++++++++---- .../binding/include/mp4_demuxer/Index.h | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/media/libstagefright/binding/Index.cpp b/media/libstagefright/binding/Index.cpp index 993011cc38a..606dc8b956a 100644 --- a/media/libstagefright/binding/Index.cpp +++ b/media/libstagefright/binding/Index.cpp @@ -238,6 +238,7 @@ Index::Index(const nsTArray& aIndex, uint32_t aTrackId, bool aIsAudio) : mSource(aSource) + , mIsAudio(aIsAudio) { if (aIndex.IsEmpty()) { mMoofParser = new MoofParser(aSource, aTrackId, aIsAudio); @@ -251,7 +252,8 @@ Index::Index(const nsTArray& aIndex, bool haveSync = false; bool progressive = true; int64_t lastOffset = 0; - for (const Indice& indice : aIndex) { + for (size_t i = 0; i < aIndex.Length(); i++) { + const Indice& indice = aIndex[i]; if (indice.sync) { haveSync = true; } @@ -274,7 +276,8 @@ Index::Index(const nsTArray& aIndex, } lastOffset = indice.end_offset; - if (sample.mSync && progressive) { + // Pack audio samples in group of 128. + if (sample.mSync && progressive && (!mIsAudio || !(i % 128))) { if (mDataOffset.Length()) { auto& last = mDataOffset.LastElement(); last.mEndOffset = intervalRange.mEnd; @@ -358,13 +361,25 @@ Index::ConvertByteRangesToTimeRanges(const MediaByteRangeSet& aByteRanges) TimeIntervals timeRanges; for (const auto& range : aByteRanges) { uint32_t start = mDataOffset.IndexOfFirstElementGt(range.mStart - 1); - if (start == mDataOffset.Length()) { + if (!mIsAudio && start == mDataOffset.Length()) { continue; } uint32_t end = mDataOffset.IndexOfFirstElementGt(range.mEnd, MP4DataOffset::EndOffsetComparator()); - if (end < start) { + if (!mIsAudio && end < start) { continue; } + if (mIsAudio && start && + range.Intersects(MediaByteRange(mDataOffset[start-1].mStartOffset, + mDataOffset[start-1].mEndOffset))) { + // Check if previous audio data block contains some available samples. + for (size_t i = mDataOffset[start-1].mIndex; i < mIndex.Length(); i++) { + if (range.ContainsStrict(mIndex[i].mByteRange)) { + timeRanges += + TimeInterval(TimeUnit::FromMicroseconds(mIndex[i].mCompositionRange.start), + TimeUnit::FromMicroseconds(mIndex[i].mCompositionRange.end)); + } + } + } if (end > start) { timeRanges += TimeInterval(TimeUnit::FromMicroseconds(mDataOffset[start].mTime.start), diff --git a/media/libstagefright/binding/include/mp4_demuxer/Index.h b/media/libstagefright/binding/include/mp4_demuxer/Index.h index 605cecd6223..048f98fc89e 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/Index.h +++ b/media/libstagefright/binding/include/mp4_demuxer/Index.h @@ -115,6 +115,7 @@ private: // ConvertByteRangesToTimeRanges cache mozilla::MediaByteRangeSet mLastCachedRanges; mozilla::media::TimeIntervals mLastBufferedRanges; + bool mIsAudio; }; } From 4cac41d9834ce49b10e12ebf6573463de47d3974 Mon Sep 17 00:00:00 2001 From: Eddy Bruel Date: Mon, 30 Nov 2015 06:00:31 +0100 Subject: [PATCH 100/135] Bug 1218817 - Implement RootActor.listServiceWorkerRegistrations;r=janx --- devtools/server/actors/root.js | 33 ++++++++++++++++++++ devtools/server/actors/webbrowser.js | 4 ++- devtools/shared/client/main.js | 10 ++++++ toolkit/components/telemetry/Histograms.json | 16 ++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) diff --git a/devtools/server/actors/root.js b/devtools/server/actors/root.js index a892d8fd854..f0156fe1f60 100644 --- a/devtools/server/actors/root.js +++ b/devtools/server/actors/root.js @@ -95,6 +95,7 @@ function RootActor(aConnection, aParameters) { this._onTabListChanged = this.onTabListChanged.bind(this); this._onAddonListChanged = this.onAddonListChanged.bind(this); this._onWorkerListChanged = this.onWorkerListChanged.bind(this); + this._onServiceWorkerRegistrationListChanged = this.onServiceWorkerRegistrationListChanged.bind(this); this._extraActors = {}; this._globalActorPool = new ActorPool(this.conn); @@ -386,6 +387,37 @@ RootActor.prototype = { this._parameters.workerList.onListChanged = null; }, + onListServiceWorkerRegistrations: function () { + let registrationList = this._parameters.serviceWorkerRegistrationList; + if (!registrationList) { + return { from: this.actorID, error: "noServiceWorkerRegistrations", + message: "This root actor has no service worker registrations." }; + } + + return registrationList.getList().then(actors => { + let pool = new ActorPool(this.conn); + for (let actor of actors) { + pool.addActor(actor); + } + + this.conn.removeActorPool(this._serviceWorkerRegistrationActorPool); + this._serviceWorkerRegistrationActorPool = pool; + this.conn.addActorPool(this._serviceWorkerRegistrationActorPool); + + registrationList.onListChanged = this._onServiceWorkerRegistrationListChanged; + + return { + "from": this.actorID, + "registrations": actors.map(actor => actor.form()) + }; + }); + }, + + onServiceWorkerRegistrationListChanged: function () { + this.conn.send({ from: this.actorID, type: "serviceWorkerRegistrationListChanged" }); + this._parameters.serviceWorkerRegistrationList.onListChanged = null; + }, + onListProcesses: function () { let processes = []; for (let i = 0; i < ppmm.childCount; i++) { @@ -473,6 +505,7 @@ RootActor.prototype.requestTypes = { "getTab": RootActor.prototype.onGetTab, "listAddons": RootActor.prototype.onListAddons, "listWorkers": RootActor.prototype.onListWorkers, + "listServiceWorkerRegistrations": RootActor.prototype.onListServiceWorkerRegistrations, "listProcesses": RootActor.prototype.onListProcesses, "getProcess": RootActor.prototype.onGetProcess, "echo": RootActor.prototype.onEcho, diff --git a/devtools/server/actors/webbrowser.js b/devtools/server/actors/webbrowser.js index 6d7b7444b5f..73fad140623 100644 --- a/devtools/server/actors/webbrowser.js +++ b/devtools/server/actors/webbrowser.js @@ -12,7 +12,7 @@ var promise = require("promise"); var { ActorPool, createExtraActors, appendExtraActors } = require("devtools/server/actors/common"); var { DebuggerServer } = require("devtools/server/main"); var DevToolsUtils = require("devtools/shared/DevToolsUtils"); -var { assert } = DevToolsUtils; +var { assert } = DevToolsUtils; var { TabSources } = require("./utils/TabSources"); var makeDebugger = require("./utils/make-debugger"); @@ -23,6 +23,7 @@ loader.lazyRequireGetter(this, "ThreadActor", "devtools/server/actors/script", t loader.lazyRequireGetter(this, "unwrapDebuggerObjectGlobal", "devtools/server/actors/script", true); loader.lazyRequireGetter(this, "BrowserAddonActor", "devtools/server/actors/addon", true); loader.lazyRequireGetter(this, "WorkerActorList", "devtools/server/actors/worker", true); +loader.lazyRequireGetter(this, "ServiceWorkerRegistrationActorList", "devtools/server/actors/worker", true); loader.lazyImporter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm"); // Assumptions on events module: @@ -130,6 +131,7 @@ function createRootActor(aConnection) tabList: new BrowserTabList(aConnection), addonList: new BrowserAddonList(aConnection), workerList: new WorkerActorList({}), + serviceWorkerRegistrationList: new ServiceWorkerRegistrationActorList(), globalActorFactories: DebuggerServer.globalActorFactories, onShutdown: sendShutdownEvent }); diff --git a/devtools/shared/client/main.js b/devtools/shared/client/main.js index 420777f55fc..afd382aec4b 100644 --- a/devtools/shared/client/main.js +++ b/devtools/shared/client/main.js @@ -160,6 +160,7 @@ const UnsolicitedNotifications = { "reflowActivity": "reflowActivity", "addonListChanged": "addonListChanged", "workerListChanged": "workerListChanged", + "serviceWorkerRegistrationListChanged": "serviceWorkerRegistrationList", "tabNavigated": "tabNavigated", "frameUpdate": "frameUpdate", "pageError": "pageError", @@ -1529,6 +1530,15 @@ RootClient.prototype = { listWorkers: DebuggerClient.requester({ type: "listWorkers" }, { telemetry: "LISTWORKERS" }), + /** + * List the registered service workers. + * + * @param function aOnResponse + * Called with the response packet. + */ + listServiceWorkerRegistrations: DebuggerClient.requester({ type: "listServiceWorkerRegistrations" }, + { telemetry: "LISTSERVICEWORKERREGISTRATIONS" }), + /** * List the running processes. * diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 6b7bada491c..3d28f466b1b 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -6112,6 +6112,22 @@ "n_buckets": "1000", "description": "The time (in milliseconds) that it took a 'listTabs' request to go round trip." }, + "DEVTOOLS_DEBUGGER_RDP_LOCAL_LISTSERVICEWORKERREGISTRATIONS_MS": { + "alert_emails": ["dev-developer-tools@lists.mozilla.org", "ejpbruel@mozilla.com"], + "expires_in_version": "50", + "kind": "exponential", + "high": "10000", + "n_buckets": "100", + "description": "The time (in milliseconds) that it took a 'listServiceWorkerRegistrations' request to go round trip." + }, + "DEVTOOLS_DEBUGGER_RDP_REMOTE_LISTSERVICEWORKERREGISTRATIONS_MS": { + "alert_emails": ["dev-developer-tools@lists.mozilla.org", "ejpbruel@mozilla.com"], + "expires_in_version": "50", + "kind": "exponential", + "high": "10000", + "n_buckets": "100", + "description": "The time (in milliseconds) that it took a 'listServiceWorkerRegistrations' request to go round trip." + }, "DEVTOOLS_DEBUGGER_RDP_LOCAL_PROTOCOLDESCRIPTION_MS": { "expires_in_version": "never", "kind": "exponential", From 03570807c368bfeef866ead578d32d9e0f6d8d67 Mon Sep 17 00:00:00 2001 From: Eddy Bruel Date: Mon, 30 Nov 2015 06:05:35 +0100 Subject: [PATCH 101/135] Bug 1220741 - We should not be able to interact with a detached BrowserTabActor;r=janx --- devtools/server/actors/webbrowser.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/devtools/server/actors/webbrowser.js b/devtools/server/actors/webbrowser.js index 73fad140623..01ea7d136bb 100644 --- a/devtools/server/actors/webbrowser.js +++ b/devtools/server/actors/webbrowser.js @@ -1348,7 +1348,26 @@ TabActor.prototype = { this._tabActorPool = null; } + // Make sure that no more workerListChanged notifications are sent. + if (this._workerActorList !== null) { + this._workerActorList.onListChanged = null; + this._workerActorList = null; + } + + if (this._workerActorPool !== null) { + this.conn.removeActorPool(this._workerActorPool); + this._workerActorPool = null; + } + + // Make sure that no more serviceWorkerRegistrationChanged notifications are + // sent. + if (this._mustNotifyServiceWorkerRegistrationChanged) { + swm.removeListener(this); + this._mustNotifyServiceWorkerRegistrationChanged = false; + } + this._attached = false; + return true; }, From 0c169a51a606a05a38013572cba424c0af963429 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Mon, 30 Nov 2015 13:06:19 +0800 Subject: [PATCH 102/135] Bug 1227797 - Use MediaEventSource to publish playback events for MDSM. r=jya. --- dom/media/MediaDecoder.cpp | 19 +++++++++++++ dom/media/MediaDecoder.h | 39 +++++++++++++------------- dom/media/MediaDecoderStateMachine.cpp | 23 ++++----------- dom/media/MediaDecoderStateMachine.h | 16 +++++++++++ 4 files changed, 60 insertions(+), 37 deletions(-) diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 00e8997ebd2..e774a0f92f8 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -615,6 +615,12 @@ MediaDecoder::Shutdown() mTimedMetadataListener.Disconnect(); mMetadataLoadedListener.Disconnect(); mFirstFrameLoadedListener.Disconnect(); + mOnPlaybackStart.Disconnect(); + mOnPlaybackStop.Disconnect(); + mOnPlaybackEnded.Disconnect(); + mOnDecodeError.Disconnect(); + mOnInvalidate.Disconnect(); + mOnSeekingStart.Disconnect(); } // Force any outstanding seek and byterange requests to complete @@ -698,6 +704,19 @@ MediaDecoder::SetStateMachineParameters() AbstractThread::MainThread(), this, &MediaDecoder::MetadataLoaded); mFirstFrameLoadedListener = mDecoderStateMachine->FirstFrameLoadedEvent().Connect( AbstractThread::MainThread(), this, &MediaDecoder::FirstFrameLoaded); + + mOnPlaybackStart = mDecoderStateMachine->OnPlaybackStart().Connect( + AbstractThread::MainThread(), this, &MediaDecoder::OnPlaybackStarted); + mOnPlaybackStop = mDecoderStateMachine->OnPlaybackStop().Connect( + AbstractThread::MainThread(), this, &MediaDecoder::OnPlaybackStopped); + mOnPlaybackEnded = mDecoderStateMachine->OnPlaybackEnded().Connect( + AbstractThread::MainThread(), this, &MediaDecoder::PlaybackEnded); + mOnDecodeError = mDecoderStateMachine->OnDecodeError().Connect( + AbstractThread::MainThread(), this, &MediaDecoder::DecodeError); + mOnInvalidate = mDecoderStateMachine->OnInvalidate().Connect( + AbstractThread::MainThread(), this, &MediaDecoder::Invalidate); + mOnSeekingStart = mDecoderStateMachine->OnSeekingStart().Connect( + AbstractThread::MainThread(), this, &MediaDecoder::SeekingStarted); } void diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index e9d88ad6f7d..c31df2d57fb 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -570,26 +570,6 @@ private: // so recompute it. The monitor must be held. virtual void UpdatePlaybackRate(); - // Used to estimate rates of data passing through the decoder's channel. - // Records activity stopping on the channel. - void DispatchPlaybackStarted() { - RefPtr self = this; - nsCOMPtr r = - NS_NewRunnableFunction([self] () { self->mPlaybackStatistics->Start(); }); - AbstractThread::MainThread()->Dispatch(r.forget()); - } - - // Used to estimate rates of data passing through the decoder's channel. - // Records activity stopping on the channel. - void DispatchPlaybackStopped() { - RefPtr self = this; - nsCOMPtr r = NS_NewRunnableFunction([self] () { - self->mPlaybackStatistics->Stop(); - self->ComputePlaybackRate(); - }); - AbstractThread::MainThread()->Dispatch(r.forget()); - } - // The actual playback rate computation. The monitor must be held. void ComputePlaybackRate(); @@ -820,6 +800,18 @@ private: MediaEventSource* DataArrivedEvent() override { return &mDataArrivedEvent; } + // Used to estimate rates of data passing through the decoder's channel. + // Records activity stopping on the channel. + void OnPlaybackStarted() { mPlaybackStatistics->Start(); } + + // Used to estimate rates of data passing through the decoder's channel. + // Records activity stopping on the channel. + void OnPlaybackStopped() + { + mPlaybackStatistics->Stop(); + ComputePlaybackRate(); + } + MediaEventProducer mDataArrivedEvent; // The state machine object for handling the decoding. It is safe to @@ -941,6 +933,13 @@ protected: MediaEventListener mMetadataLoadedListener; MediaEventListener mFirstFrameLoadedListener; + MediaEventListener mOnPlaybackStart; + MediaEventListener mOnPlaybackStop; + MediaEventListener mOnPlaybackEnded; + MediaEventListener mOnDecodeError; + MediaEventListener mOnInvalidate; + MediaEventListener mOnSeekingStart; + protected: // Whether the state machine is shut down. Mirror mStateMachineIsShutdown; diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index 26a0a96b742..009d5c72455 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -1054,7 +1054,7 @@ void MediaDecoderStateMachine::StopPlayback() MOZ_ASSERT(OnTaskQueue()); DECODER_LOG("StopPlayback()"); - mDecoder->DispatchPlaybackStopped(); + mOnPlaybackStop.Notify(); if (IsPlaying()) { mMediaSink->SetPlaying(false); @@ -1087,7 +1087,7 @@ void MediaDecoderStateMachine::MaybeStartPlayback() } DECODER_LOG("MaybeStartPlayback() starting playback"); - mDecoder->DispatchPlaybackStarted(); + mOnPlaybackStart.Notify(); StartMediaSink(); if (!IsPlaying()) { @@ -1599,12 +1599,7 @@ MediaDecoderStateMachine::InitiateSeek() StopPlayback(); UpdatePlaybackPositionInternal(mCurrentSeek.mTarget.mTime); - nsCOMPtr startEvent = - NS_NewRunnableMethodWithArg( - mDecoder, - &MediaDecoder::SeekingStarted, - mCurrentSeek.mTarget.mEventVisibility); - AbstractThread::MainThread()->Dispatch(startEvent.forget()); + mOnSeekingStart.Notify(mCurrentSeek.mTarget.mEventVisibility); // Reset our state machine and decoding pipeline before seeking. Reset(); @@ -1897,9 +1892,7 @@ MediaDecoderStateMachine::DecodeError() // MediaDecoder::DecodeError notifies the owner, and then shuts down the state // machine. - nsCOMPtr event = - NS_NewRunnableMethod(mDecoder, &MediaDecoder::DecodeError); - AbstractThread::MainThread()->Dispatch(event.forget()); + mOnDecodeError.Notify(); } void @@ -2158,9 +2151,7 @@ MediaDecoderStateMachine::SeekCompleted() if (video) { mMediaSink->Redraw(); - nsCOMPtr event = - NS_NewRunnableMethod(mDecoder, &MediaDecoder::Invalidate); - AbstractThread::MainThread()->Dispatch(event.forget()); + mOnInvalidate.Notify(); } } @@ -2413,9 +2404,7 @@ nsresult MediaDecoderStateMachine::RunStateMachine() // Ensure readyState is updated before firing the 'ended' event. UpdateNextFrameStatus(); - nsCOMPtr event = - NS_NewRunnableMethod(mDecoder, &MediaDecoder::PlaybackEnded); - AbstractThread::MainThread()->Dispatch(event.forget()); + mOnPlaybackEnded.Notify(); mSentPlaybackEndedEvent = true; diff --git a/dom/media/MediaDecoderStateMachine.h b/dom/media/MediaDecoderStateMachine.h index 047553b582e..e42a4b4a88f 100644 --- a/dom/media/MediaDecoderStateMachine.h +++ b/dom/media/MediaDecoderStateMachine.h @@ -233,6 +233,15 @@ public: MediaDecoderEventVisibility>& FirstFrameLoadedEvent() { return mFirstFrameLoadedEvent; } + MediaEventSource& OnPlaybackStart() { return mOnPlaybackStart; } + MediaEventSource& OnPlaybackStop() { return mOnPlaybackStop; } + MediaEventSource& OnPlaybackEnded() { return mOnPlaybackEnded; } + MediaEventSource& OnDecodeError() { return mOnDecodeError; } + MediaEventSource& OnInvalidate() { return mOnInvalidate; } + + MediaEventSource& + OnSeekingStart() { return mOnSeekingStart; } + // Immutable after construction - may be called on any thread. bool IsRealTime() const { return mRealTime; } @@ -1201,6 +1210,13 @@ private: MediaEventProducerExc, MediaDecoderEventVisibility> mFirstFrameLoadedEvent; + MediaEventProducer mOnPlaybackStart; + MediaEventProducer mOnPlaybackStop; + MediaEventProducer mOnPlaybackEnded; + MediaEventProducer mOnDecodeError; + MediaEventProducer mOnInvalidate; + MediaEventProducer mOnSeekingStart; + // True if audio is offloading. // Playback will not start when audio is offloading. bool mAudioOffloading; From ab1b92deb8e1f356f4d201504d54c81d1b34dfcf Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 22 Nov 2015 14:39:01 -0800 Subject: [PATCH 103/135] Bug 1186808 - Replace nsBaseHashtable::EnumerateRead() calls in dom/camera/ with iterators. r=mikeh. --- dom/camera/GonkCameraControl.cpp | 15 +++------------ dom/camera/GonkCameraControl.h | 3 --- dom/camera/GonkCameraParameters.cpp | 24 ++++++++---------------- dom/camera/GonkCameraParameters.h | 2 -- dom/camera/GonkRecorderProfiles.cpp | 16 +++------------- dom/camera/GonkRecorderProfiles.h | 3 --- 6 files changed, 14 insertions(+), 49 deletions(-) diff --git a/dom/camera/GonkCameraControl.cpp b/dom/camera/GonkCameraControl.cpp index b58c8a56449..425d46104f4 100644 --- a/dom/camera/GonkCameraControl.cpp +++ b/dom/camera/GonkCameraControl.cpp @@ -2213,17 +2213,6 @@ nsGonkCameraControl::LoadRecorderProfiles() return NS_OK; } -/* static */ PLDHashOperator -nsGonkCameraControl::Enumerate(const nsAString& aProfileName, - RecorderProfile* aProfile, - void* aUserArg) -{ - nsTArray* profiles = static_cast*>(aUserArg); - MOZ_ASSERT(profiles); - profiles->AppendElement(aProfileName); - return PL_DHASH_NEXT; -} - nsresult nsGonkCameraControl::GetRecorderProfiles(nsTArray& aProfiles) { @@ -2233,7 +2222,9 @@ nsGonkCameraControl::GetRecorderProfiles(nsTArray& aProfiles) } aProfiles.Clear(); - mRecorderProfiles.EnumerateRead(Enumerate, static_cast(&aProfiles)); + for (auto iter = mRecorderProfiles.Iter(); !iter.Done(); iter.Next()) { + aProfiles.AppendElement(iter.Key()); + } return NS_OK; } diff --git a/dom/camera/GonkCameraControl.h b/dom/camera/GonkCameraControl.h index e3a2e828046..8cb289027c1 100644 --- a/dom/camera/GonkCameraControl.h +++ b/dom/camera/GonkCameraControl.h @@ -156,9 +156,6 @@ protected: void CreatePoster(layers::Image* aImage, uint32_t aWidth, uint32_t aHeight, int32_t aRotation); nsresult LoadRecorderProfiles(); - static PLDHashOperator Enumerate(const nsAString& aProfileName, - RecorderProfile* aProfile, - void* aUserArg); friend class SetPictureSize; friend class SetThumbnailSize; diff --git a/dom/camera/GonkCameraParameters.cpp b/dom/camera/GonkCameraParameters.cpp index 09f6820553f..ba798733854 100644 --- a/dom/camera/GonkCameraParameters.cpp +++ b/dom/camera/GonkCameraParameters.cpp @@ -69,27 +69,19 @@ GonkCameraParameters::FindVendorSpecificKey(const char* aPotentialKeys[], return nullptr; } -/* static */ PLDHashOperator -GonkCameraParameters::EnumerateFlatten(const nsACString& aKey, - nsCString* aValue, - void* aUserArg) -{ - nsCString* data = static_cast(aUserArg); - if (!data->IsEmpty()) { - data->Append(';'); - } - data->Append(aKey); - data->Append('='); - data->Append(*aValue); - return PL_DHASH_NEXT; -} - String8 GonkCameraParameters::Flatten() const { MutexAutoLock lock(mLock); nsCString data; - mParams.EnumerateRead(EnumerateFlatten, static_cast(&data)); + for (auto iter = mParams.ConstIter(); !iter.Done(); iter.Next()) { + if (!data.IsEmpty()) { + data.Append(';'); + } + data.Append(iter.Key()); + data.Append('='); + data.Append(*iter.UserData()); + } return String8(data.Data()); } diff --git a/dom/camera/GonkCameraParameters.h b/dom/camera/GonkCameraParameters.h index b32763ff253..830685a96b3 100644 --- a/dom/camera/GonkCameraParameters.h +++ b/dom/camera/GonkCameraParameters.h @@ -93,8 +93,6 @@ protected: nsClassHashtable mIsoModeMap; nsClassHashtable mParams; - static PLDHashOperator EnumerateFlatten(const nsACString& aKey, nsCString* aValue, void* aUserArg); - nsresult SetImpl(const char* aKey, const char* aValue) { if (!aValue || strchr(aValue, ';') || strchr(aValue, '=')) { diff --git a/dom/camera/GonkRecorderProfiles.cpp b/dom/camera/GonkRecorderProfiles.cpp index 61ed6dc23c8..4479d927884 100644 --- a/dom/camera/GonkRecorderProfiles.cpp +++ b/dom/camera/GonkRecorderProfiles.cpp @@ -269,18 +269,6 @@ GonkRecorderProfile::GonkRecorderProfile(uint32_t aCameraId, mIsValid = isValid && mAudio.IsValid() && mVideo.IsValid(); } -/* static */ PLDHashOperator -GonkRecorderProfile::Enumerate(const nsAString& aProfileName, - GonkRecorderProfile* aProfile, - void* aUserArg) -{ - nsTArray>* profiles = - static_cast>*>(aUserArg); - MOZ_ASSERT(profiles); - profiles->AppendElement(aProfile); - return PL_DHASH_NEXT; -} - /* static */ already_AddRefed GonkRecorderProfile::CreateProfile(uint32_t aCameraId, int aQuality) @@ -379,7 +367,9 @@ GonkRecorderProfile::GetAll(uint32_t aCameraId, } aProfiles.Clear(); - profiles->EnumerateRead(Enumerate, static_cast(&aProfiles)); + for (auto iter = profiles->Iter(); !iter.Done(); iter.Next()) { + aProfiles.AppendElement(iter.UserData()); + } return NS_OK; } diff --git a/dom/camera/GonkRecorderProfiles.h b/dom/camera/GonkRecorderProfiles.h index b6fe8d0e9a3..dd2a0869e99 100644 --- a/dom/camera/GonkRecorderProfiles.h +++ b/dom/camera/GonkRecorderProfiles.h @@ -142,9 +142,6 @@ protected: static already_AddRefed CreateProfile(uint32_t aCameraId, int aQuality); static ProfileHashtable* GetProfileHashtable(uint32_t aCameraId); - static PLDHashOperator Enumerate(const nsAString& aProfileName, - GonkRecorderProfile* aProfile, - void* aUserArg); uint32_t mCameraId; int mQuality; From 69eb33ff31356d48c6435c2bc63cbfab208c5be4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 22 Nov 2015 14:39:01 -0800 Subject: [PATCH 104/135] Bug 1181444 (part 1) - Remove nsBaseHashtable::EnumerateRead(). r=froydnj. --- xpcom/glue/nsBaseHashtable.h | 38 ++----------- xpcom/tests/TestHashtables.cpp | 99 +++++++++++++++------------------- 2 files changed, 47 insertions(+), 90 deletions(-) diff --git a/xpcom/glue/nsBaseHashtable.h b/xpcom/glue/nsBaseHashtable.h index 54a35c48000..99705b3f323 100644 --- a/xpcom/glue/nsBaseHashtable.h +++ b/xpcom/glue/nsBaseHashtable.h @@ -7,16 +7,14 @@ #ifndef nsBaseHashtable_h__ #define nsBaseHashtable_h__ -#include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Move.h" #include "nsTHashtable.h" #include "nsDebug.h" -// These are the codes returned by |EnumReadFunction| and |EnumFunction|, which -// control the behavior of EnumerateRead() and Enumerate(). The PLD/PL_D prefix -// is because they originated in PLDHashTable, but that class no longer uses -// them. +// These type is returned by |EnumFunction| and controls the behavior of +// Enumerate(). The PLD/PL_D prefix is because it originated in PLDHashTable, +// but that class no longer uses it. enum PLDHashOperator { PL_DHASH_NEXT = 0, // enumerator says continue @@ -157,36 +155,6 @@ public: */ void Remove(KeyType aKey) { this->RemoveEntry(aKey); } - /** - * function type provided by the application for enumeration. - * @param aKey the key being enumerated - * @param aData data being enumerated - * @param aUserArg passed unchanged from Enumerate - * @return @link PLDHashOperator::PL_DHASH_NEXT PL_DHASH_NEXT @endlink - */ - typedef PLDHashOperator (*EnumReadFunction)(KeyType aKey, - UserDataType aData, - void* aUserArg); - - /** - * enumerate entries in the hashtable, without allowing changes - * WARNING: this function is deprecated. Please use Iterator instead. - * @param aEnumFunc enumeration callback - * @param aUserArg passed unchanged to the EnumReadFunction - */ - uint32_t EnumerateRead(EnumReadFunction aEnumFunc, void* aUserArg) const - { - uint32_t n = 0; - for (auto iter = this->mTable.ConstIter(); !iter.Done(); iter.Next()) { - auto entry = static_cast(iter.Get()); - mozilla::DebugOnly op = - aEnumFunc(entry->GetKey(), entry->mData, aUserArg); - n++; - MOZ_ASSERT(!(op & PL_DHASH_REMOVE)); - } - return n; - } - /** * function type provided by the application for enumeration. * @param aKey the key being enumerated diff --git a/xpcom/tests/TestHashtables.cpp b/xpcom/tests/TestHashtables.cpp index 43c719c452d..b72fe45985a 100644 --- a/xpcom/tests/TestHashtables.cpp +++ b/xpcom/tests/TestHashtables.cpp @@ -170,25 +170,12 @@ testTHashtable(nsTHashtable& hash, uint32_t numEntries) { } } -PLDHashOperator -nsDEnumRead(const uint32_t& aKey, const char* aData, void* userArg) { - printf(" enumerated %u = \"%s\"\n", aKey, aData); - return PL_DHASH_NEXT; -} - PLDHashOperator nsDEnum(const uint32_t& aKey, const char*& aData, void* userArg) { printf(" enumerated %u = \"%s\"\n", aKey, aData); return PL_DHASH_NEXT; } -PLDHashOperator -nsCEnumRead(const nsACString& aKey, TestUniChar* aData, void* userArg) { - printf(" enumerated \"%s\" = %c\n", - PromiseFlatCString(aKey).get(), aData->GetChar()); - return PL_DHASH_NEXT; -} - PLDHashOperator nsCEnum(const nsACString& aKey, nsAutoPtr& aData, void* userArg) { printf(" enumerated \"%s\" = %c\n", @@ -339,15 +326,6 @@ CreateIFoo( IFoo** result ) return NS_OK; } -PLDHashOperator -nsIEnumRead(const uint32_t& aKey, IFoo* aFoo, void* userArg) { - nsAutoCString str; - aFoo->GetString(str); - - printf(" enumerated %u = \"%s\"\n", aKey, str.get()); - return PL_DHASH_NEXT; -} - PLDHashOperator nsIEnum(const uint32_t& aKey, nsCOMPtr& aData, void* userArg) { nsAutoCString str; @@ -357,17 +335,6 @@ nsIEnum(const uint32_t& aKey, nsCOMPtr& aData, void* userArg) { return PL_DHASH_NEXT; } -PLDHashOperator -nsIEnum2Read(nsISupports* aKey, uint32_t aData, void* userArg) { - nsAutoCString str; - nsCOMPtr foo = do_QueryInterface(aKey); - foo->GetString(str); - - - printf(" enumerated \"%s\" = %u\n", str.get(), aData); - return PL_DHASH_NEXT; -} - PLDHashOperator nsIEnum2(nsISupports* aKey, uint32_t& aData, void* userArg) { nsAutoCString str; @@ -458,17 +425,21 @@ main(void) { printf("FOUND! BAD!\n"); exit (13); } - + printf("not found; good.\n"); - + printf("Enumerating:\n"); - - count = UniToEntity.EnumerateRead(nsDEnumRead, nullptr); + + count = 0; + for (auto iter = UniToEntity.Iter(); !iter.Done(); iter.Next()) { + printf(" enumerated %u = \"%s\"\n", iter.Key(), iter.UserData()); + count++; + } if (count != ENTITY_COUNT) { printf(" Bad count!\n"); exit (14); } - + printf("Clearing..."); UniToEntity.Clear(); printf("OK\n"); @@ -518,17 +489,22 @@ main(void) { printf("FOUND! BAD!\n"); exit (19); } - + printf("not found; good.\n"); - + printf("Enumerating:\n"); - - count = EntToUniClass.EnumerateRead(nsCEnumRead, nullptr); + + count = 0; + for (auto iter = EntToUniClass.Iter(); !iter.Done(); iter.Next()) { + printf(" enumerated \"%s\" = %c\n", + PromiseFlatCString(iter.Key()).get(), iter.UserData()->GetChar()); + count++; + } if (count != ENTITY_COUNT) { printf(" Bad count!\n"); exit (20); } - + printf("Clearing...\n"); EntToUniClass.Clear(); printf(" Clearing OK\n"); @@ -571,7 +547,7 @@ main(void) { for (i = 0; i < ENTITY_COUNT; ++i) { printf(" Getting entry %s...", gEntities[i].mStr); - + if (!EntToUniClass2.Get(fooArray[i], &myChar2)) { printf("FAILED\n"); exit (24); @@ -585,17 +561,24 @@ main(void) { printf("FOUND! BAD!\n"); exit (25); } - + printf("not found; good.\n"); - + printf("Enumerating:\n"); - - count = EntToUniClass2.EnumerateRead(nsIEnum2Read, nullptr); + + count = 0; + for (auto iter = EntToUniClass2.Iter(); !iter.Done(); iter.Next()) { + nsAutoCString s; + nsCOMPtr foo = do_QueryInterface(iter.Key()); + foo->GetString(s); + printf(" enumerated \"%s\" = %u\n", s.get(), iter.UserData()); + count++; + } if (count != ENTITY_COUNT) { printf(" Bad count!\n"); exit (26); } - + printf("Clearing...\n"); EntToUniClass2.Clear(); printf(" Clearing OK\n"); @@ -633,7 +616,7 @@ main(void) { for (i = 0; i < ENTITY_COUNT; ++i) { printf(" Getting entry %s...", gEntities[i].mStr); - + nsCOMPtr myEnt; if (!UniToEntClass2.Get(gEntities[i].mUnicode, getter_AddRefs(myEnt))) { printf("FAILED\n"); @@ -651,17 +634,23 @@ main(void) { printf("FOUND! BAD!\n"); exit (31); } - + printf("not found; good.\n"); - + printf("Enumerating:\n"); - - count = UniToEntClass2.EnumerateRead(nsIEnumRead, nullptr); + + count = 0; + for (auto iter = UniToEntClass2.Iter(); !iter.Done(); iter.Next()) { + nsAutoCString s; + iter.UserData()->GetString(s); + printf(" enumerated %u = \"%s\"\n", iter.Key(), s.get()); + count++; + } if (count != ENTITY_COUNT) { printf(" Bad count!\n"); exit (32); } - + printf("Clearing...\n"); UniToEntClass2.Clear(); printf(" Clearing OK\n"); From c32dae0be27e5ca68e00c7c1808a829e2b1a868d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 02:20:30 -0800 Subject: [PATCH 105/135] Bumping gaia.json for 8 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/26aa3485a30b Author: Luke Chang Desc: Merge pull request #33378 from luke-chang/1227808_tv_remote_control_settings_object Bug 1227808 - [TV 2.5] Change the settings of Authorized Devices in Remote Control feature to a simple object instead of a serialized string, r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/7bf5f94e6be2 Author: Luke Chang Desc: Bug 1227808 - [TV 2.5] Change the settings of Authorized Devices in Remote Control feature to a simple object instead of a serialized string ======== https://hg.mozilla.org/integration/gaia-central/rev/1961d691ac7f Author: Luke Chang Desc: Merge pull request #33409 from luke-chang/1228405_tv_remote_control_qrcode_default Bug 1228405 - [TV][Remote Control] The QR code should be selected by default after saving the new settings, r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/9a52b354a380 Author: Luke Chang Desc: Bug 1228405 - [TV][Remote Control] The QR code should be selected by default after saving the new settings ======== https://hg.mozilla.org/integration/gaia-central/rev/4b5231a678c9 Author: Fernando Jiménez Moreno Desc: Merge pull request #33353 from begeeben/1220605_the_browser_setting_page Bug 1220605 - [TV Browser] The Browser Setting page disappears for a … ======== https://hg.mozilla.org/integration/gaia-central/rev/f25a03cc0551 Author: yifan Desc: Bug 1220605 - [TV Browser] The Browser Setting page disappears for a few seconds ======== https://hg.mozilla.org/integration/gaia-central/rev/7012390e35b2 Author: Yi-Fan Liao Desc: Merge pull request #33420 from begeeben/revert_1228212 Revert "Bug 1228212 - update built-in app list in engineering build." ======== https://hg.mozilla.org/integration/gaia-central/rev/e3595f4abef0 Author: yifan Desc: Revert "Bug 1228212 - update built-in app list in engineering build." This reverts commit 182eb430b8aba35641104f81d50996fa63fe5b2e. --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e3277e0138b..91a853c6663 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "ee6d8625c9d76de2f6614c87bb82b301bc37c7a9", + "git_revision": "8653b0647613713be6357484515516b24ee745b6", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "553d04c277d58581b55701f1978b82b257990a7e", + "revision": "26aa3485a30ba910811ab91c7e9bde4e3c2fbd90", "repo_path": "integration/gaia-central" } From 5c55bbc1d37ea2627475f200bb070425a19f3863 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 02:21:54 -0800 Subject: [PATCH 106/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 425807a1376..50621facd98 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index c3f760b8777..a926d943e40 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 1dac9fbad52..503e656d174 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index eb9a45a949d..b170522fae1 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index c3c55d259f9..c1decddc22b 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index fe748c45a03..f68b136ba4c 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 1dac9fbad52..503e656d174 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 5c7073c764d..1e1d718224e 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 455996e33b2..25fb848581f 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 419930d8de3..6089e493ae6 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 6a543235eb4..73f1000c64b 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 419298a42fb1f06c33d153e813c3d95737ea6303 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 03:10:14 -0800 Subject: [PATCH 107/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/a4196b0059d6 Author: Luke Chang Desc: Merge pull request #33373 from luke-chang/1225081_marketplace_preview_app Bug 1225081 - [TV][2.5] Open, close and navigate marketplace hosted/packaged app by preview window, r=evelyn ======== https://hg.mozilla.org/integration/gaia-central/rev/1a8a4158efbd Author: Luke Chang Desc: Bug 1225081 - [TV][2.5] Open, close and navigate marketplace hosted/packaged app by preview window --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 91a853c6663..f70058c0850 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "8653b0647613713be6357484515516b24ee745b6", + "git_revision": "b9541e27ca33e78954f8fb2cada170053c7f436b", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "26aa3485a30ba910811ab91c7e9bde4e3c2fbd90", + "revision": "a4196b0059d68e552c3ba3e2129f720bfc007019", "repo_path": "integration/gaia-central" } From d78965f7d041eefe411213a6c1a77225c256b11f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 03:11:54 -0800 Subject: [PATCH 108/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 50621facd98..25aee8a2163 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a926d943e40..8488066e99c 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 503e656d174..3a061f421ac 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index b170522fae1..d32d420dc4b 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index c1decddc22b..24259072712 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index f68b136ba4c..e6e763e3573 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 503e656d174..3a061f421ac 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 1e1d718224e..984824a235f 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 25fb848581f..d72fd09edaa 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 6089e493ae6..03aa368b5ed 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 73f1000c64b..1805ed164fc 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From b1a22e7badef6903f65b83d2198ca8f443437bde Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 04:10:12 -0800 Subject: [PATCH 109/135] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/0445530a3a08 Author: evelynhung Desc: Merge pull request #33427 from evelynhung/issue-1228562 Bug 1228562 - change mock TV API video order. r=me ======== https://hg.mozilla.org/integration/gaia-central/rev/318db69e0ac3 Author: Evelyn Hung Desc: Bug 1228562 - change mock TV API video order. ======== https://hg.mozilla.org/integration/gaia-central/rev/5e36ced1e776 Author: evelynhung Desc: Merge pull request #33422 from evelynhung/issue-1228212 Bug 1228212 - update built-in app list in engineering build. r=me ======== https://hg.mozilla.org/integration/gaia-central/rev/5053eeb85e25 Author: Evelyn Hung Desc: Bug 1228212 - update built-in app list in engineering build. --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index f70058c0850..8f05f1cd65c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "b9541e27ca33e78954f8fb2cada170053c7f436b", + "git_revision": "49cd76bc4787925cac5a35dff1bbdbacb21f4c5f", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "a4196b0059d68e552c3ba3e2129f720bfc007019", + "revision": "0445530a3a0894dca7f53e9464040df9bf369692", "repo_path": "integration/gaia-central" } From 374772625aa796947162974c79f8aeeb1d9706c5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 04:11:50 -0800 Subject: [PATCH 110/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 25aee8a2163..a59e557bf35 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 8488066e99c..5cfc7ace645 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 3a061f421ac..23f29dda29f 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index d32d420dc4b..3aefcc089e8 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 24259072712..bb80e9ac0bb 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index e6e763e3573..9742d346492 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3a061f421ac..23f29dda29f 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 984824a235f..94945076471 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index d72fd09edaa..84481d33fff 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 03aa368b5ed..af435c6f2bb 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 1805ed164fc..98b33058c75 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From a9713cfd02ea3e7471e0cc00344fba5a271fcfdb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 06:14:01 -0800 Subject: [PATCH 111/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/fa0b2f3a66d8 Author: Julien Wajsberg Desc: Merge pull request #31211 from julienw/1190275-dont-revoke-blob-urls-when-going-to-subview Bug 1190275 - Do not revoke blob urls when staying in a subview r=azasypkin ======== https://hg.mozilla.org/integration/gaia-central/rev/6a373dd5bd23 Author: Julien Wajsberg Desc: Bug 1190275 - Do not revoke blob urls when staying in a subview r=azasypkin --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 8f05f1cd65c..0aa2a07322f 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "49cd76bc4787925cac5a35dff1bbdbacb21f4c5f", + "git_revision": "3cdfeecb40621249352218a693796a51fcbc2ebe", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "0445530a3a0894dca7f53e9464040df9bf369692", + "revision": "fa0b2f3a66d8c62d81b68121039c0934b496f357", "repo_path": "integration/gaia-central" } From 48641e66fe1ae60f3b12262753523e68704d29d4 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 06:15:37 -0800 Subject: [PATCH 112/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index a59e557bf35..bc428d43f4f 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 5cfc7ace645..cc2dad09934 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 23f29dda29f..c2968294bd5 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 3aefcc089e8..e560b8631ba 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index bb80e9ac0bb..6df0dcb5a20 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 9742d346492..11ad0f0aaac 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 23f29dda29f..c2968294bd5 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 94945076471..af06ec917ee 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 84481d33fff..6f93a4cfe69 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index af435c6f2bb..c5f1caff69b 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 98b33058c75..d25f531c686 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 624d07fcd000c2864f85f0b4c38ead018ba7aafc Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 07:23:11 -0800 Subject: [PATCH 113/135] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/280a2583a0ca Author: lissyx Desc: Merge pull request #33397 from lissyx/bug1191978 Bug 1191978 - Avoid duplicated URLs in asyncStorage topSites r=daleharvey ======== https://hg.mozilla.org/integration/gaia-central/rev/9238c0fa5d0e Author: Alexandre Lissy Desc: Bug 1191978 - Avoid duplicated URLs in asyncStorage topSites r=daleharvey ======== https://hg.mozilla.org/integration/gaia-central/rev/36b7fec7aa5f Author: Fischer-L Desc: Merge pull request #33375 from Fischer-L/bug_1227812-send-to-tv-new-offline-content Bug 1227812 - [TV] The new offline content for the Send-to-TV FTE tutorial, r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/c45407cfed06 Author: Fischer.json Desc: Bug 1227812 - [TV] The new offline content for the Send-to-TV FTE tutorial --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 0aa2a07322f..9e41a1e34b4 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "3cdfeecb40621249352218a693796a51fcbc2ebe", + "git_revision": "09c3d2f593799fa781b94006d3389e9cbb156c6e", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "fa0b2f3a66d8c62d81b68121039c0934b496f357", + "revision": "280a2583a0ca647ace63a59a023b05ecd695bbae", "repo_path": "integration/gaia-central" } From 21d20601a0177c8d940b30155c35ef898664a0a2 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 07:24:34 -0800 Subject: [PATCH 114/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index bc428d43f4f..ce817e8c26b 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index cc2dad09934..ff52cfd97ab 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index c2968294bd5..3202ea19d06 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index e560b8631ba..7900c73dad6 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 6df0dcb5a20..86394e68894 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 11ad0f0aaac..fcdba91a694 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index c2968294bd5..3202ea19d06 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index af06ec917ee..a87c7a3e8bc 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 6f93a4cfe69..66bf0ee320d 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index c5f1caff69b..942960f0e85 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index d25f531c686..c77dbce0a78 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 5b9452d9e8b2976b81938e464478651d135b7207 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 27 Nov 2015 14:06:32 +0100 Subject: [PATCH 115/135] Bug 1228544 - [firefox-ui-tests] Disable usage of proxxy server. r=armenzg a=tomcat DONTBUILD --- testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py b/testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py index e5cedc48fb2..afc333d8dbd 100644 --- a/testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py +++ b/testing/mozharness/configs/firefox_ui_tests/qa_jenkins.py @@ -16,6 +16,9 @@ config = { 'PIP_TRUSTED_HOST': 'pypi.pub.build.mozilla.org', }, + # Don't use any kind of proxxy support + 'proxxy': {}, + # General local variable overwrite 'exes': { 'gittool.py': [ From 36319b2d86e1d70a2275bd65c4ebe9fbf4481271 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 08:09:30 -0800 Subject: [PATCH 116/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index ce817e8c26b..9b466936b3f 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -110,7 +110,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index ff52cfd97ab..18fa460aadf 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -116,7 +116,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 7900c73dad6..fc381c84f06 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -118,7 +118,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 86394e68894..bfe82eaf290 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -114,7 +114,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index fcdba91a694..870e1428aa8 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -126,7 +126,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index a87c7a3e8bc..30d871f551e 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -109,7 +109,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 66bf0ee320d..aa1dc65047c 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -116,7 +116,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 942960f0e85..d604dd2815d 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -119,7 +119,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index c77dbce0a78..b88a1c0aa15 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -127,7 +127,7 @@ - + From a492ad1a935e98399d0be085856f1fb7cdf42976 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 09:15:12 -0800 Subject: [PATCH 117/135] Bumping gaia.json for 6 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/1dcfed07baba Author: albertopq Desc: Merge pull request #33331 from albertopq/1223733-migrate-pin-dialog Bug 1223733 - Migrating Pin page dialog into web components r=mhenretty ======== https://hg.mozilla.org/integration/gaia-central/rev/cc086cd627de Author: albertopq Desc: Bug 1223733 - Migrating Pin page dialog into web components ======== https://hg.mozilla.org/integration/gaia-central/rev/c011f1a4c71c Author: Carsten Book Desc: Merge pull request #33423 from ChunMinChang/bug-1223677 Bug 1223677 - Deny presentation request if it's url protocol is non-a…. r=cchang ======== https://hg.mozilla.org/integration/gaia-central/rev/bd3008d9e68c Author: chunminchang Desc: Bug 1223677 - Deny presentation request if it's url protocol is non-app r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/08db2dc1477e Author: Carsten Book Desc: Merge pull request #32887 from mozfreddyb/bug-1218725-eslint-postmessage Bug 1218725 - Add no-wildcard-postmessage plugin to eslint. r=felash ======== https://hg.mozilla.org/integration/gaia-central/rev/aab6060bac03 Author: Frederik Braun Desc: Bug 1218725 - Add no-wildcard-postmessage plugin to eslint r=julienw --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 9e41a1e34b4..78bb61ec782 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "09c3d2f593799fa781b94006d3389e9cbb156c6e", + "git_revision": "5b75fa8e7c71eca70be2c777a75e5814c88e1e14", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "280a2583a0ca647ace63a59a023b05ecd695bbae", + "revision": "1dcfed07baba6ff94e9dacf58230114f5cc882e2", "repo_path": "integration/gaia-central" } From ee92675a7c9bb24cebb6538e59ddf4d2b236bd46 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 09:16:35 -0800 Subject: [PATCH 118/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 9b466936b3f..e756fe855da 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 18fa460aadf..69e32b36d0e 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 3202ea19d06..32b68c0cdcd 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index fc381c84f06..120d7f51784 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index bfe82eaf290..4a6f41461e1 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 870e1428aa8..bd6dabede4b 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3202ea19d06..32b68c0cdcd 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 30d871f551e..2b38d7e4b0b 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index aa1dc65047c..ef1d815d1ad 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index d604dd2815d..b5b2f02a497 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index b88a1c0aa15..387ec0eb218 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 3fd323f77408cc0cffae222929d0316a70d67438 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 09:53:10 -0800 Subject: [PATCH 119/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/0f912eaa38d4 Author: Julien Wajsberg Desc: Merge pull request #33323 from julienw/1227068-fix-chunk-size Bug 1227068 - [Messages] Display the messages 50 by 50 r=azasypkin ======== https://hg.mozilla.org/integration/gaia-central/rev/ed02a697607a Author: Julien Wajsberg Desc: Bug 1227068 - [Messages] Display the messages 50 by 50 r=azasypkin --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 78bb61ec782..ca21f82c093 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "5b75fa8e7c71eca70be2c777a75e5814c88e1e14", + "git_revision": "9d4faca327c1ea23758949d61d76bcdc4d21cb24", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "1dcfed07baba6ff94e9dacf58230114f5cc882e2", + "revision": "0f912eaa38d45751d1db9534060b19b021ca2433", "repo_path": "integration/gaia-central" } From 6dd4ba95252d8ed4e0713dc9951dad85378d3242 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 09:54:33 -0800 Subject: [PATCH 120/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index e756fe855da..e89aa67d197 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 69e32b36d0e..1d14e5aaeec 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 32b68c0cdcd..b4d2c6dd0b7 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 120d7f51784..990fff570ae 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 4a6f41461e1..b0d04ba44d9 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index bd6dabede4b..e268dec3ad6 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 32b68c0cdcd..b4d2c6dd0b7 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 2b38d7e4b0b..50000818011 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index ef1d815d1ad..257995be59a 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b5b2f02a497..18eaf3118c1 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 387ec0eb218..0586ea89690 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 89e344d8e9c0bb4098506a0bac0986e8aa023163 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 15:44:05 -0800 Subject: [PATCH 121/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/ab5868dc9e59 Author: Kevin Grandon Desc: Merge pull request #33399 from KevinGrandon/bug_1228448_remove_unused_switches_css Bug 1228448 - Remove unused switches.css file from the system index.html ======== https://hg.mozilla.org/integration/gaia-central/rev/7aa56d7fb47c Author: Kevin Grandon Desc: Bug 1228448 - Remove unused switches.css file from the system index.html r=apastor --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index ca21f82c093..c36c3b5b0a2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "9d4faca327c1ea23758949d61d76bcdc4d21cb24", + "git_revision": "a0d541d8c5ab93fe655201820ad5fad7558a9cdd", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "0f912eaa38d45751d1db9534060b19b021ca2433", + "revision": "ab5868dc9e59f95a686ad4c7e63bf2dffe985501", "repo_path": "integration/gaia-central" } From 0a323a31a4c45b7f4abf14111e607d961ed54e8b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 15:45:35 -0800 Subject: [PATCH 122/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index e89aa67d197..70cf84997bd 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 1d14e5aaeec..cfad41a666e 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index b4d2c6dd0b7..67df38b90d5 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 990fff570ae..336d789090a 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index b0d04ba44d9..8ee09b05ab4 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index e268dec3ad6..9757e1e9415 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index b4d2c6dd0b7..67df38b90d5 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 50000818011..87c4a701389 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 257995be59a..1b04ec8d70e 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 18eaf3118c1..c7f0f6d102c 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 0586ea89690..a8f8f3edc85 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From b95d87f03fcd7959bcd5192817c49a9fc93749ee Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 27 Nov 2015 16:04:28 -0800 Subject: [PATCH 123/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 70cf84997bd..e1875fef409 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index cfad41a666e..6c8995ac6ad 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 67df38b90d5..0c8d7493816 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -31,7 +31,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 336d789090a..e4124621096 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 8ee09b05ab4..4855f83de24 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 9757e1e9415..1e5c4f53e1c 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 67df38b90d5..0c8d7493816 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -31,7 +31,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 87c4a701389..8396368937c 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 1b04ec8d70e..52e144ff941 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index c7f0f6d102c..40aa842e606 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index a8f8f3edc85..e4b836db2b3 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -18,7 +18,7 @@ - + From d3742f2439354dd911ab342fe239be0691d9c5ba Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 07:00:15 -0800 Subject: [PATCH 124/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/278c062e8d0e Author: Fischer-L Desc: Merge pull request #33068 from Fischer-L/bug_1222364-ft-presentation-cast-video Bug 1222364 - [Stingray][fling-player][TV][2.5] UI polish, behaviour updates and skip error message, r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/cb15a0892aca Author: Fischer.json Desc: Bug 1222364 - [Stingray][fling-player][TV][2.5] UI polish, behaviour updates and skip error message --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c36c3b5b0a2..07cb5ce1b2c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "a0d541d8c5ab93fe655201820ad5fad7558a9cdd", + "git_revision": "4b768fbab05eb46b7bf8cb39bd5217fdd2c193c3", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "ab5868dc9e59f95a686ad4c7e63bf2dffe985501", + "revision": "278c062e8d0e69cc1967cc65b12220d46dd02a2b", "repo_path": "integration/gaia-central" } From 41c6a814258776e97d0b347ed148626680fa2bd6 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 07:01:38 -0800 Subject: [PATCH 125/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index e1875fef409..2013d180819 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 6c8995ac6ad..43a8ad7e864 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 0c8d7493816..c969327ac99 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index e4124621096..c85345ac9f1 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 4855f83de24..15f3a04a26b 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 1e5c4f53e1c..d0d704990a0 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 0c8d7493816..c969327ac99 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 8396368937c..76940bd3991 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 52e144ff941..bdfb98b1e5d 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 40aa842e606..690c0929bd9 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index e4b836db2b3..5b818249770 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 548cc6fafbd398769da7bb92cb00ad234ca651ff Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 13:50:32 -0800 Subject: [PATCH 126/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/74dd09dd2ae8 Author: Ghislain 'Aus' Lacroix Desc: Merge pull request #33365 from nullaus/bug1228205 Bug 1228205 - Publish updated jsmarionette-client. r=eli ======== https://hg.mozilla.org/integration/gaia-central/rev/f7fa78d10146 Author: Ghislain 'Aus' Lacroix Desc: Bug 1228205 - Publish updated jsmarionette-client. r=eli --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 07cb5ce1b2c..87419b3707c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "4b768fbab05eb46b7bf8cb39bd5217fdd2c193c3", + "git_revision": "1827409ed1a9ca8686e41abce0c4f14e88c691f4", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "278c062e8d0e69cc1967cc65b12220d46dd02a2b", + "revision": "74dd09dd2ae84fb15991161bc3335251b02e67c2", "repo_path": "integration/gaia-central" } From ce782707120ef722468b3baa34226e0520078551 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 13:51:54 -0800 Subject: [PATCH 127/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 2013d180819..755ab27d715 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 43a8ad7e864..ddc2257d5a6 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index c969327ac99..0a69cc9c037 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index c85345ac9f1..a0fc037c207 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 15f3a04a26b..f8d7d730265 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index d0d704990a0..053e4422c88 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index c969327ac99..0a69cc9c037 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 76940bd3991..b7fcae92368 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index bdfb98b1e5d..ada49ca8323 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 690c0929bd9..9436e8f82c3 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 5b818249770..d50d5f8311b 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From ffc5fd4c54d975242927b30e5fa05383aae19def Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 14:15:13 -0800 Subject: [PATCH 128/135] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c90b68bf3c30 Author: Ghislain 'Aus' Lacroix Desc: Merge pull request #31273 from nullaus/bug1174901 Bug 1174901 - Use mocha 2.x instead of 1.20. r=gaye ======== https://hg.mozilla.org/integration/gaia-central/rev/a219e1701d92 Author: Ghislain 'Aus' Lacroix Desc: Bug 1174901 - Update to mocha 2. r=eli ======== https://hg.mozilla.org/integration/gaia-central/rev/fdea280d2adf Author: Ghislain 'Aus' Lacroix Desc: Merge pull request #33431 from nullaus/master Bug 1228205 - Publish new marionette-client. r=eli ======== https://hg.mozilla.org/integration/gaia-central/rev/5c91402917da Author: Ghislain 'Aus' Lacroix Desc: Bug 1228205 - Publish new marionette-client. r=eli --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 87419b3707c..b741d66b576 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "1827409ed1a9ca8686e41abce0c4f14e88c691f4", + "git_revision": "6d66a9eff9fd33fafc97bc75753558969de48cc3", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "74dd09dd2ae84fb15991161bc3335251b02e67c2", + "revision": "c90b68bf3c30023a1abefb2bc20383e40b16cafc", "repo_path": "integration/gaia-central" } From fdd0d04e508760f44f52ec1c2053fe682ac08de6 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 14:16:36 -0800 Subject: [PATCH 129/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 755ab27d715..7146c6e989b 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index ddc2257d5a6..47f0c8dbd03 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 0a69cc9c037..18e5f45cf38 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index a0fc037c207..2690078b98d 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index f8d7d730265..28b506a1388 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 053e4422c88..3e3963f3ef6 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 0a69cc9c037..18e5f45cf38 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index b7fcae92368..0934debeabf 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index ada49ca8323..15986dc87d9 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 9436e8f82c3..71c720f94ad 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index d50d5f8311b..b536eecbf5d 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 88d175da5fbbd1cd9123a2cea719e3cf12f74faf Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 15:03:10 -0800 Subject: [PATCH 130/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/3781fedd2610 Author: Kevin Grandon Desc: Merge pull request #33288 from KevinGrandon/bug_1225418_downlaod_cancel_menu Bug 1225418 - Port Download menu to use gaia-menu instead of building blocks ======== https://hg.mozilla.org/integration/gaia-central/rev/5bb5499e2541 Author: Kevin Grandon Desc: Bug 1225418 - Port Download menu to use gaia-menu instead of building blocks r=aus --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b741d66b576..c607b69aeb6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "6d66a9eff9fd33fafc97bc75753558969de48cc3", + "git_revision": "fa9b88501c84cbb171db9d778cca74b70d80f433", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "c90b68bf3c30023a1abefb2bc20383e40b16cafc", + "revision": "3781fedd261025bb22e81a90842c4d4549a0b406", "repo_path": "integration/gaia-central" } From 4632b34f4bfbcc41eb0dc1f313fadf1a361097f8 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sat, 28 Nov 2015 15:04:33 -0800 Subject: [PATCH 131/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 7146c6e989b..018d4f93c8c 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 47f0c8dbd03..ef5bbe58c0e 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 18e5f45cf38..0ead878d3e2 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 2690078b98d..566266ed08f 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 28b506a1388..4423ec473ea 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 3e3963f3ef6..805442e7ce7 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 18e5f45cf38..0ead878d3e2 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 0934debeabf..df2c020d921 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 15986dc87d9..eee29aade59 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 71c720f94ad..b2376209740 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index b536eecbf5d..5a66d30c7cf 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From a3db1d086a1a24adc51fabe4e3256486ed7155ef Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Nov 2015 18:40:12 -0800 Subject: [PATCH 132/135] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/05dafe79b46a Author: steveck-chung Desc: Merge pull request #33370 from steveck-chung/bug-1224497-dailer-emergency-call Bug 1224497 - [Dialer] The emergency number can't be dialed from contact detail page, r=arcturus ======== https://hg.mozilla.org/integration/gaia-central/rev/17e0d515c988 Author: steveck-chung Desc: Bug 1224497 - [Dialer] The emergency number can't be dialed from contact detail page, r=arcturus --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c607b69aeb6..8c9275c6dc1 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "fa9b88501c84cbb171db9d778cca74b70d80f433", + "git_revision": "ad7f2b548242fbe73036cfd8661cb450b42b7310", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "3781fedd261025bb22e81a90842c4d4549a0b406", + "revision": "05dafe79b46a334896adafd4cdb6286494487718", "repo_path": "integration/gaia-central" } From b1f3afb36b05a6d065e66860275db13e0e1a2013 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Nov 2015 18:41:54 -0800 Subject: [PATCH 133/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 018d4f93c8c..94dbf5de4bc 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index ef5bbe58c0e..4a422bcce6e 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 0ead878d3e2..a939908f25c 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 566266ed08f..53f7576503c 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 4423ec473ea..66432a37d4b 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 805442e7ce7..c20dc866257 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 0ead878d3e2..a939908f25c 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index df2c020d921..2fe7bd8fd65 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index eee29aade59..1e9d249374c 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b2376209740..3b536a031b1 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 5a66d30c7cf..3eb648498fb 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 78aea7eec047efc603dac01ab82de36a62f1e361 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Nov 2015 19:33:11 -0800 Subject: [PATCH 134/135] Bumping gaia.json for 6 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/d8d3b630339c Author: Ray Lin Desc: Merge pull request #33403 from raylin/1228236-refactor-keyboard-gij Bug 1228236 - Refator testapp and lib in Keyboard Gij, r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/f6e627eea39b Author: Ray Lin Desc: Bug 1228236 - Refator testapp and lib in Keyboard Gij, r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/152bec88b828 Author: danhuang1202 Desc: Merge pull request #33419 from danhuang1202/1227836_compress_pocket_menu_block_icon Bug 1227836 - Compress pocket menu icon image. r=yifan ======== https://hg.mozilla.org/integration/gaia-central/rev/e93998f15dc8 Author: danhuang1202 Desc: Bug 1227836 - Compress pocket menu icon image. r=yifan ======== https://hg.mozilla.org/integration/gaia-central/rev/532d1b5c4333 Author: Ray Lin Desc: Merge pull request #33364 from raylin/1210680-wifi-to-dialog-service Bug 1210680 - Use dialog service to show wifi bad credential dialog, … ======== https://hg.mozilla.org/integration/gaia-central/rev/2d85b11a310a Author: Ray Lin Desc: Bug 1210680 - Use dialog service to show wifi bad credential dialog, r=gasolin --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 8c9275c6dc1..d84b1d2379a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "ad7f2b548242fbe73036cfd8661cb450b42b7310", + "git_revision": "702773bee0b70e479ccebe5e061f571e977bc376", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "05dafe79b46a334896adafd4cdb6286494487718", + "revision": "d8d3b630339c16b3bf5292813143da11a8bbb0f0", "repo_path": "integration/gaia-central" } From 08e1257cd9a359867aa582532798c84f92e38d43 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Nov 2015 19:34:33 -0800 Subject: [PATCH 135/135] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 94dbf5de4bc..b317c64588f 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 4a422bcce6e..346f47e0cd7 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a939908f25c..52737c5b984 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 53f7576503c..30ee08effb2 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 66432a37d4b..daf13ec74fb 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index c20dc866257..56ec9e05d1a 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a939908f25c..52737c5b984 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 2fe7bd8fd65..f4a25798d79 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4-kk/sources.xml b/b2g/config/nexus-4-kk/sources.xml index 1e9d249374c..6a58e102333 100644 --- a/b2g/config/nexus-4-kk/sources.xml +++ b/b2g/config/nexus-4-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 3b536a031b1..be1af9c3664 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 3eb648498fb..76aa11d25a5 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - +