merge mozilla-central to mozilla-inbound. r=merge a=merge
|
@ -1215,7 +1215,7 @@ static const EStateRule sWAIUnivStateMap[] = {
|
|||
eARIACurrent,
|
||||
eARIADisabled,
|
||||
eARIAExpanded, // Currently under spec review but precedent exists
|
||||
eARIAHasPopup, // Note this is technically a "property"
|
||||
eARIAHasPopup, // Note this is a tokenised attribute starting in ARIA 1.1
|
||||
eARIAInvalid,
|
||||
eARIAModal,
|
||||
eARIARequired, // XXX not global, Bug 553117
|
||||
|
@ -1248,7 +1248,7 @@ static const AttrCharacteristics gWAIUnivAttrMap[] = {
|
|||
{&nsGkAtoms::aria_expanded, ATTR_BYPASSOBJ | ATTR_VALTOKEN },
|
||||
{&nsGkAtoms::aria_flowto, ATTR_BYPASSOBJ | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_grabbed, ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_haspopup, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_haspopup, ATTR_BYPASSOBJ_IF_FALSE | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_hidden, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL }, /* handled special way */
|
||||
{&nsGkAtoms::aria_invalid, ATTR_BYPASSOBJ | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{&nsGkAtoms::aria_label, ATTR_BYPASSOBJ | ATTR_GLOBAL },
|
||||
|
|
|
@ -956,10 +956,6 @@ Accessible::Attributes()
|
|||
NS_LITERAL_STRING("true"));
|
||||
}
|
||||
|
||||
// XXX: In ARIA 1.1, the value of aria-haspopup became a token (bug 1355449).
|
||||
if (aria::UniversalStatesFor(mContent->AsElement()) & states::HASPOPUP)
|
||||
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::haspopup, NS_LITERAL_STRING("true"));
|
||||
|
||||
// If there is no aria-live attribute then expose default value of 'live'
|
||||
// object attribute used for ARIA role of this accessible.
|
||||
const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
|
||||
|
|
|
@ -40,6 +40,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
|||
testAttrs("haspopupTrue", { "haspopup": "true" }, true);
|
||||
testAbsentAttrs("haspopupFalse", { "haspopup": "false" });
|
||||
testAbsentAttrs("haspopupEmpty", { "haspopup": "" });
|
||||
testAttrs("haspopupDialog", { "haspopup": "dialog" }, true);
|
||||
testAttrs("haspopupListbox", { "haspopup": "listbox" }, true);
|
||||
testAttrs("haspopupMenu", { "haspopup": "menu" }, true);
|
||||
testAttrs("haspopupTree", { "haspopup": "tree" }, true);
|
||||
testAttrs("hidden", {"hidden": "true"}, true);
|
||||
testAbsentAttrs("hidden_false", { "hidden": "false" });
|
||||
testAbsentAttrs("modal", {"modal": "true"});
|
||||
|
@ -218,6 +222,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
|||
<div id="haspopupTrue" aria-haspopup="true"></div>
|
||||
<div id="haspopupFalse" aria-haspopup="false"></div>
|
||||
<div id="haspopupEmpty" aria-haspopup=""></div>
|
||||
<div id="haspopupDialog" aria-haspopup="dialog"></div>
|
||||
<div id="haspopupListbox" aria-haspopup="listbox"></div>
|
||||
<div id="haspopupMenu" aria-haspopup="menu"></div>
|
||||
<div id="haspopupTree" aria-haspopup="tree"></div>
|
||||
<div id="hidden" aria-hidden="true"></div>
|
||||
<div id="hidden_false" aria-hidden="false"></div>
|
||||
<div id="modal" aria-modal="true"></div>
|
||||
|
|
|
@ -437,9 +437,9 @@
|
|||
position="bottomcenter topright"
|
||||
tabspecific="true"
|
||||
noautofocus="true"
|
||||
copyURL-title="©LinkCmd.label;"
|
||||
copyURL-title="©URLCmd.label;"
|
||||
emailLink-title="&emailPageCmd.label;"
|
||||
sendToDevice-title="&sendTabToDevice.label;"
|
||||
sendToDevice-title="&sendToDevice.label3;"
|
||||
sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;">
|
||||
<photonpanelmultiview id="pageActionPanelMultiView"
|
||||
mainViewId="pageActionPanelMainView"
|
||||
|
|
|
@ -137,18 +137,6 @@ browser.jar:
|
|||
content/browser/tabbrowser.xml (content/tabbrowser.xml)
|
||||
* content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
|
||||
content/browser/utilityOverlay.js (content/utilityOverlay.js)
|
||||
content/browser/usercontext-briefcase.svg (content/usercontext-briefcase.svg)
|
||||
content/browser/usercontext-cart.svg (content/usercontext-cart.svg)
|
||||
content/browser/usercontext-circle.svg (content/usercontext-circle.svg)
|
||||
content/browser/usercontext-dollar.svg (content/usercontext-dollar.svg)
|
||||
content/browser/usercontext-fingerprint.svg (content/usercontext-fingerprint.svg)
|
||||
content/browser/usercontext-gift.svg (content/usercontext-gift.svg)
|
||||
content/browser/usercontext-vacation.svg (content/usercontext-vacation.svg)
|
||||
content/browser/usercontext-food.svg (content/usercontext-food.svg)
|
||||
content/browser/usercontext-fruit.svg (content/usercontext-fruit.svg)
|
||||
content/browser/usercontext-pet.svg (content/usercontext-pet.svg)
|
||||
content/browser/usercontext-tree.svg (content/usercontext-tree.svg)
|
||||
content/browser/usercontext-chill.svg (content/usercontext-chill.svg)
|
||||
content/browser/web-panels.js (content/web-panels.js)
|
||||
* content/browser/web-panels.xul (content/web-panels.xul)
|
||||
content/browser/webext-panels.js (content/webext-panels.js)
|
||||
|
|
До Ширина: | Высота: | Размер: 917 B После Ширина: | Высота: | Размер: 917 B |
До Ширина: | Высота: | Размер: 1.7 KiB После Ширина: | Высота: | Размер: 1.7 KiB |
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 1.1 KiB |
До Ширина: | Высота: | Размер: 364 B После Ширина: | Высота: | Размер: 364 B |
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.2 KiB |
До Ширина: | Высота: | Размер: 3.3 KiB После Ширина: | Высота: | Размер: 3.3 KiB |
До Ширина: | Высота: | Размер: 658 B После Ширина: | Высота: | Размер: 658 B |
До Ширина: | Высота: | Размер: 647 B После Ширина: | Высота: | Размер: 647 B |
До Ширина: | Высота: | Размер: 864 B После Ширина: | Высота: | Размер: 864 B |
До Ширина: | Высота: | Размер: 932 B После Ширина: | Высота: | Размер: 932 B |
До Ширина: | Высота: | Размер: 675 B После Ширина: | Высота: | Размер: 675 B |
|
@ -39,51 +39,51 @@
|
|||
}
|
||||
|
||||
[data-identity-icon="fingerprint"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-fingerprint.svg");
|
||||
--identity-icon: url("resource://usercontext-content/fingerprint.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="briefcase"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-briefcase.svg");
|
||||
--identity-icon: url("resource://usercontext-content/briefcase.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="dollar"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-dollar.svg");
|
||||
--identity-icon: url("resource://usercontext-content/dollar.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="cart"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-cart.svg");
|
||||
--identity-icon: url("resource://usercontext-content/cart.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="circle"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-circle.svg");
|
||||
--identity-icon: url("resource://usercontext-content/circle.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="vacation"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-vacation.svg");
|
||||
--identity-icon: url("resource://usercontext-content/vacation.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="gift"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-gift.svg");
|
||||
--identity-icon: url("resource://usercontext-content/gift.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="food"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-food.svg");
|
||||
--identity-icon: url("resource://usercontext-content/food.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="fruit"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-fruit.svg");
|
||||
--identity-icon: url("resource://usercontext-content/fruit.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="pet"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-pet.svg");
|
||||
--identity-icon: url("resource://usercontext-content/pet.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="tree"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-tree.svg");
|
||||
--identity-icon: url("resource://usercontext-content/tree.svg");
|
||||
}
|
||||
|
||||
[data-identity-icon="chill"] {
|
||||
--identity-icon: url("chrome://browser/content/usercontext-chill.svg");
|
||||
--identity-icon: url("resource://usercontext-content/chill.svg");
|
||||
}
|
||||
|
||||
#userContext-indicator {
|
||||
|
|
До Ширина: | Высота: | Размер: 1.7 KiB После Ширина: | Высота: | Размер: 1.7 KiB |
|
@ -4,3 +4,17 @@
|
|||
|
||||
browser.jar:
|
||||
content/browser/usercontext/usercontext.css (content/usercontext.css)
|
||||
|
||||
% resource usercontext-content %content/ contentaccessible=yes
|
||||
content/briefcase.svg (content/briefcase.svg)
|
||||
content/cart.svg (content/cart.svg)
|
||||
content/circle.svg (content/circle.svg)
|
||||
content/dollar.svg (content/dollar.svg)
|
||||
content/fingerprint.svg (content/fingerprint.svg)
|
||||
content/gift.svg (content/gift.svg)
|
||||
content/vacation.svg (content/vacation.svg)
|
||||
content/food.svg (content/food.svg)
|
||||
content/fruit.svg (content/fruit.svg)
|
||||
content/pet.svg (content/pet.svg)
|
||||
content/tree.svg (content/tree.svg)
|
||||
content/chill.svg (content/chill.svg)
|
||||
|
|
|
@ -256,6 +256,12 @@ const CustomizableWidgets = [
|
|||
TABS_PER_PAGE: 25,
|
||||
NEXT_PAGE_MIN_TABS: 5, // Minimum number of tabs displayed when we click "Show All"
|
||||
onCreated(aNode) {
|
||||
this._initialize(aNode);
|
||||
},
|
||||
_initialize(aNode) {
|
||||
if (this._initialized) {
|
||||
return;
|
||||
}
|
||||
// Add an observer to the button so we get the animation during sync.
|
||||
// (Note the observer sets many attributes, including label and
|
||||
// tooltiptext, but we only want the 'syncstatus' attribute for the
|
||||
|
@ -300,8 +306,10 @@ const CustomizableWidgets = [
|
|||
doc.defaultView.openUILinkIn(link, "tab");
|
||||
CustomizableUI.hidePanelForNode(e.target);
|
||||
});
|
||||
this._initialized = true;
|
||||
},
|
||||
onViewShowing(aEvent) {
|
||||
this._initialize(aEvent.target);
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
this._tabsList = doc.getElementById("PanelUI-remotetabs-tabslist");
|
||||
Services.obs.addObserver(this, SyncedTabs.TOPIC_TABS_CHANGED);
|
||||
|
|
|
@ -536,6 +536,8 @@ FormAutofillHandler.prototype = {
|
|||
// are multiple options being selected. The empty option is usually
|
||||
// assumed to be default along with a meaningless text to users.
|
||||
if (!value || element.selectedOptions.length != 1) {
|
||||
// Keep the property and preserve more information for address updating
|
||||
data[type].record[detail.fieldName] = "";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -544,6 +546,8 @@ FormAutofillHandler.prototype = {
|
|||
}
|
||||
|
||||
if (!value) {
|
||||
// Keep the property and preserve more information for updating
|
||||
data[type].record[detail.fieldName] = "";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -556,7 +560,8 @@ FormAutofillHandler.prototype = {
|
|||
});
|
||||
|
||||
if (data.address &&
|
||||
Object.keys(data.address.record).length < FormAutofillUtils.AUTOFILL_FIELDS_THRESHOLD) {
|
||||
Object.values(data.address.record).filter(v => v).length <
|
||||
FormAutofillUtils.AUTOFILL_FIELDS_THRESHOLD) {
|
||||
log.debug("No address record saving since there are only",
|
||||
Object.keys(data.address.record).length,
|
||||
"usable fields");
|
||||
|
|
|
@ -370,7 +370,7 @@ FormAutofillParent.prototype = {
|
|||
break;
|
||||
case "update":
|
||||
if (!changedGUIDs.length) {
|
||||
this.profileStorage.addresses.update(address.guid, address.record);
|
||||
this.profileStorage.addresses.update(address.guid, address.record, true);
|
||||
changedGUIDs.push(address.guid);
|
||||
} else {
|
||||
this.profileStorage.addresses.remove(address.guid);
|
||||
|
|
|
@ -374,8 +374,10 @@ class AutofillRecords {
|
|||
* Indicates which record to update.
|
||||
* @param {Object} record
|
||||
* The new record used to overwrite the old one.
|
||||
* @param {boolean} [preserveOldProperties = false]
|
||||
* Preserve old record's properties if they don't exist in new record.
|
||||
*/
|
||||
update(guid, record) {
|
||||
update(guid, record, preserveOldProperties = false) {
|
||||
this.log.debug("update:", guid, record);
|
||||
|
||||
let recordFound = this._findByGUID(guid);
|
||||
|
@ -383,17 +385,23 @@ class AutofillRecords {
|
|||
throw new Error("No matching record.");
|
||||
}
|
||||
|
||||
let recordToUpdate = this._clone(record);
|
||||
// Clone the record by Object assign API to preserve the property with empty string.
|
||||
let recordToUpdate = Object.assign({}, record);
|
||||
this._normalizeRecord(recordToUpdate);
|
||||
|
||||
for (let field of this.VALID_FIELDS) {
|
||||
let oldValue = recordFound[field];
|
||||
let newValue = recordToUpdate[field];
|
||||
|
||||
if (newValue != null) {
|
||||
recordFound[field] = newValue;
|
||||
} else {
|
||||
// Resume the old field value in the perserve case
|
||||
if (preserveOldProperties && newValue === undefined) {
|
||||
newValue = oldValue;
|
||||
}
|
||||
|
||||
if (!newValue) {
|
||||
delete recordFound[field];
|
||||
} else {
|
||||
recordFound[field] = newValue;
|
||||
}
|
||||
|
||||
this._maybeStoreLastSyncedField(recordFound, field, oldValue);
|
||||
|
|
|
@ -3,6 +3,7 @@ head = head.js
|
|||
|
||||
support-files =
|
||||
../fixtures/autocomplete_basic.html
|
||||
../fixtures/autocomplete_simple_basic.html
|
||||
../fixtures/autocomplete_creditcard_basic.html
|
||||
|
||||
[browser_autocomplete_footer.js]
|
||||
|
|
|
@ -137,3 +137,38 @@ add_task(async function test_submit_untouched_fields() {
|
|||
is(addresses[0].organization, "Organization", "organization should change");
|
||||
is(addresses[0].tel, "+16172535702", "tel should remain unchanged");
|
||||
});
|
||||
|
||||
add_task(async function test_submit_reduced_fields() {
|
||||
let addresses = await getAddresses();
|
||||
is(addresses.length, 2, "2 addresses in storage");
|
||||
|
||||
let url = BASE_URL + "autocomplete_simple_basic.html";
|
||||
await BrowserTestUtils.withNewTab({gBrowser, url},
|
||||
async function(browser) {
|
||||
let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
|
||||
"popupshown");
|
||||
await openPopupOn(browser, "form#simple input[name=tel]");
|
||||
await BrowserTestUtils.synthesizeKey("VK_DOWN", {}, browser);
|
||||
await BrowserTestUtils.synthesizeKey("VK_RETURN", {}, browser);
|
||||
|
||||
await ContentTask.spawn(browser, null, async function() {
|
||||
let form = content.document.querySelector("form#simple");
|
||||
let tel = form.querySelector("input[name=tel]");
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
tel.setUserInput("123456789");
|
||||
|
||||
// Wait 1000ms before submission to make sure the input value applied
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
form.querySelector("input[type=submit]").click();
|
||||
});
|
||||
|
||||
await promiseShown;
|
||||
await clickDoorhangerButton(MAIN_BUTTON);
|
||||
}
|
||||
);
|
||||
|
||||
addresses = await getAddresses();
|
||||
is(addresses.length, 2, "Still 2 addresses in storage");
|
||||
is(addresses[0].tel, "123456789", "tel should should be changed");
|
||||
is(addresses[0]["postal-code"], "02139", "postal code should be kept");
|
||||
});
|
||||
|
|
19
browser/extensions/formautofill/test/fixtures/autocomplete_simple_basic.html
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Form Autofill Demo Page for Simplified Form Case</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Form Autofill Demo Page for Simplified Form Case</h1>
|
||||
|
||||
<form id="simple">
|
||||
<p><label>Organization: <input type="text" /></label></p>
|
||||
<p><label>Telephone: <input id="simple_tel" name="tel" /></label></p>
|
||||
<p><label>Email: <input type="text" id="simple_email" name="email" /></label></p>
|
||||
<p><input type="submit" /></p>
|
||||
<p><button type="reset">Reset</button></p>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -26,6 +26,8 @@ const TEST_ADDRESS_2 = {
|
|||
};
|
||||
|
||||
const TEST_ADDRESS_3 = {
|
||||
"given-name": "Timothy",
|
||||
"family-name": "Berners-Lee",
|
||||
"street-address": "Other Address",
|
||||
"postal-code": "12345",
|
||||
};
|
||||
|
@ -37,6 +39,11 @@ const TEST_ADDRESS_4 = {
|
|||
organization: "World Wide Web Consortium",
|
||||
};
|
||||
|
||||
const TEST_ADDRESS_FOR_UPDATE = {
|
||||
"name": "Tim Berners",
|
||||
"street-address": "",
|
||||
};
|
||||
|
||||
const TEST_ADDRESS_WITH_INVALID_FIELD = {
|
||||
"street-address": "Another Address",
|
||||
invalidField: "INVALID",
|
||||
|
@ -322,6 +329,22 @@ add_task(async function test_update() {
|
|||
do_check_record_matches(address, TEST_ADDRESS_3);
|
||||
do_check_eq(getSyncChangeCounter(profileStorage.addresses, guid), 1);
|
||||
|
||||
// Test preserveOldProperties parameter and field with empty string.
|
||||
profileStorage.addresses.update(guid, TEST_ADDRESS_FOR_UPDATE, true);
|
||||
await onChanged;
|
||||
await profileStorage._saveImmediately();
|
||||
|
||||
profileStorage.addresses.pullSyncChanges(); // force sync metadata, which we check below.
|
||||
|
||||
address = profileStorage.addresses.get(guid, {rawData: true});
|
||||
|
||||
do_check_eq(address["given-name"], "Tim");
|
||||
do_check_eq(address["family-name"], "Berners");
|
||||
do_check_eq(address["street-address"], undefined);
|
||||
do_check_eq(address["postal-code"], "12345");
|
||||
do_check_neq(address.timeLastModified, timeLastModified);
|
||||
do_check_eq(getSyncChangeCounter(profileStorage.addresses, guid), 2);
|
||||
|
||||
Assert.throws(
|
||||
() => profileStorage.addresses.update("INVALID_GUID", TEST_ADDRESS_3),
|
||||
/No matching record\./
|
||||
|
|
|
@ -66,7 +66,10 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"address-level1": "",
|
||||
"address-level2": "",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "1-650-903-0800",
|
||||
},
|
||||
untouchedFields: [],
|
||||
|
@ -116,7 +119,10 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"address-level1": "",
|
||||
"address-level2": "",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "1-650-903-0800",
|
||||
},
|
||||
untouchedFields: [],
|
||||
|
@ -148,7 +154,10 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"address-level1": "",
|
||||
"address-level2": "",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "1-650-903-0800",
|
||||
},
|
||||
untouchedFields: [],
|
||||
|
@ -171,7 +180,10 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"address-level1": "",
|
||||
"address-level2": "",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "1-650-903-0800",
|
||||
},
|
||||
untouchedFields: [],
|
||||
|
@ -193,8 +205,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"address-level1": "CA",
|
||||
"address-level2": "",
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -215,8 +230,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"address-level1": "CA",
|
||||
"address-level2": "",
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -237,8 +255,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"address-level1": "AR",
|
||||
"address-level2": "",
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -259,8 +280,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"address-level1": "CA",
|
||||
"address-level2": "",
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -281,8 +305,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"address-level1": "AZ",
|
||||
"address-level2": "",
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -303,8 +330,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"address-level1": "Arizonac",
|
||||
"address-level2": "",
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"country": "USA",
|
||||
"email": "",
|
||||
"tel": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -326,8 +356,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"address-level1": "",
|
||||
"address-level2": "",
|
||||
"country": "USA",
|
||||
"tel": "1-650-903-0800",
|
||||
"email": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
@ -349,8 +382,11 @@ const TESTCASES = [
|
|||
guid: null,
|
||||
record: {
|
||||
"street-address": "331 E. Evelyn Avenue",
|
||||
"address-level1": "",
|
||||
"address-level2": "",
|
||||
"country": "USA",
|
||||
"tel": "1-650-903-0800",
|
||||
"email": "",
|
||||
},
|
||||
untouchedFields: [],
|
||||
},
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
|
||||
@keyframes library-pocket-animation-rtl {
|
||||
from {
|
||||
transform: scaleX(-1) translateX(0);
|
||||
transform: translateX(1056px);
|
||||
fill: inherit;
|
||||
}
|
||||
25% {
|
||||
|
@ -129,7 +129,7 @@
|
|||
fill: #ef4056;
|
||||
}
|
||||
to {
|
||||
transform: scaleX(-1) translateX(-1056px);
|
||||
transform: translateX(0);
|
||||
fill: #ef4056;
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,6 @@
|
|||
|
||||
.toolbarbutton-animatable-box[animate="pocket"]:-moz-locale-dir(rtl) > .toolbarbutton-animatable-image {
|
||||
animation-name: library-pocket-animation-rtl;
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.toolbarbutton-animatable-box[animate="pocket"][fade] > .toolbarbutton-animatable-image {
|
||||
|
|
|
@ -1437,7 +1437,10 @@ Function CheckInstall
|
|||
${EndIf}
|
||||
|
||||
${If} $ProgressCompleted < ${PROGRESS_BAR_INSTALL_END_STEP}
|
||||
IntOp $ProgressCompleted $ProgressCompleted + 1
|
||||
IntOp $0 ${PROGRESS_BAR_INSTALL_END_STEP} - ${PROGRESS_BAR_DOWNLOAD_END_STEP}
|
||||
IntOp $0 $InstallCounterStep * $0
|
||||
IntOp $0 $0 / $InstallTotalSteps
|
||||
IntOp $ProgressCompleted ${PROGRESS_BAR_DOWNLOAD_END_STEP} + $0
|
||||
Call SetProgressBars
|
||||
${EndIf}
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY bookmarkThisLinkCmd.accesskey "L">
|
||||
<!ENTITY bookmarkThisFrameCmd.label "Bookmark This Frame">
|
||||
<!ENTITY bookmarkThisFrameCmd.accesskey "m">
|
||||
<!ENTITY copyLinkCmd.label "Copy Link">
|
||||
<!ENTITY copyURLCmd.label "Copy URL">
|
||||
<!ENTITY copyURLFeedback.label "Copied!">
|
||||
<!ENTITY emailPageCmd.label "Email Link…">
|
||||
<!ENTITY emailPageCmd.accesskey "E">
|
||||
|
@ -974,7 +974,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
|||
<!ENTITY pageAction.addToUrlbar.label "Add to Address Bar">
|
||||
<!ENTITY pageAction.removeFromUrlbar.label "Remove from Address Bar">
|
||||
|
||||
<!ENTITY sendTabToDevice.label "Send Tab to Device">
|
||||
<!ENTITY sendToDevice.label3 "Send Page to Device">
|
||||
<!ENTITY sendToDevice.syncNotReady.label "Syncing Devices…">
|
||||
|
||||
<!ENTITY libraryButton.tooltip "View history, saved bookmarks, and more">
|
||||
|
|
|
@ -805,7 +805,8 @@ toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-it
|
|||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
#appMenu-fxa-icon[syncstatus="active"] > .toolbarbutton-icon {
|
||||
#appMenu-fxa-icon[syncstatus="active"] > .toolbarbutton-icon,
|
||||
#PanelUI-remotetabs-syncnow[syncstatus="active"] > .toolbarbutton-icon {
|
||||
animation: syncRotate 0.8s linear infinite;
|
||||
fill: #0a84ff;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ toolbar[brighttext] .toolbarbutton-1 {
|
|||
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#reload-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#library-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#nav-bar-overflow-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#PlacesChevron:-moz-locale-dir(rtl) > .toolbarbutton-icon,
|
||||
#panic-button:-moz-locale-dir(rtl) > .toolbarbutton-icon {
|
||||
|
@ -434,7 +433,7 @@ toolbar[brighttext] .toolbarbutton-1 {
|
|||
|
||||
@keyframes library-bookmark-animation-rtl {
|
||||
from {
|
||||
transform: scaleX(-1) translateX(0);
|
||||
transform: translateX(1056px);
|
||||
fill: inherit;
|
||||
}
|
||||
25% {
|
||||
|
@ -444,7 +443,7 @@ toolbar[brighttext] .toolbarbutton-1 {
|
|||
fill: var(--toolbarbutton-icon-fill-attention);
|
||||
}
|
||||
to {
|
||||
transform: scaleX(-1) translateX(-1056px);
|
||||
transform: translateX(0);
|
||||
fill: var(--toolbarbutton-icon-fill-attention);
|
||||
}
|
||||
}
|
||||
|
@ -499,7 +498,6 @@ toolbar[brighttext] .toolbarbutton-1 {
|
|||
|
||||
.toolbarbutton-animatable-box[animate="bookmark"]:-moz-locale-dir(rtl) > .toolbarbutton-animatable-image {
|
||||
animation-name: library-bookmark-animation-rtl;
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.toolbarbutton-animatable-box[animate="bookmark"][fade] > .toolbarbutton-animatable-image {
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
%include build/sparse-profiles/mach
|
||||
|
||||
[include]
|
||||
# Code for generating docs.
|
||||
glob:tools/docs/**
|
||||
|
||||
# Potential docs sources
|
||||
glob:**/*.rst
|
||||
|
||||
# Python API docs.
|
||||
glob:**/*.py
|
||||
|
||||
# moz.build files are read to discover location of docs.
|
||||
glob:**/moz.build
|
||||
|
||||
# Read to set the version of the docs.
|
||||
path:config/milestone.txt
|
|
@ -1973,6 +1973,7 @@ Toolbox.prototype = {
|
|||
front.setBoolPref(DISABLE_AUTOHIDE_PREF, toggledValue);
|
||||
|
||||
this.autohideButton.isChecked = toggledValue;
|
||||
this._autohideHasBeenToggled = true;
|
||||
}),
|
||||
|
||||
_isDisableAutohideEnabled: Task.async(function* () {
|
||||
|
@ -2716,6 +2717,13 @@ Toolbox.prototype = {
|
|||
if (!this._preferenceFront) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only reset the autohide pref in the Browser Toolbox if it's been toggled
|
||||
// in the UI (don't reset the pref if it was already set before opening)
|
||||
if (this._autohideHasBeenToggled) {
|
||||
yield this._preferenceFront.clearUserPref(DISABLE_AUTOHIDE_PREF);
|
||||
}
|
||||
|
||||
this._preferenceFront.destroy();
|
||||
this._preferenceFront = null;
|
||||
}),
|
||||
|
|
|
@ -1008,16 +1008,16 @@ waitForAllPaints(function() {
|
|||
});
|
||||
|
||||
add_task_if_omta_enabled(
|
||||
function* no_restyling_for_compositor_animation_on_unrelated_style_change() {
|
||||
async function no_restyling_for_compositor_animation_on_unrelated_style_change() {
|
||||
var div = addDiv(null);
|
||||
var animation = div.animate({ opacity: [0, 1] }, 100 * MS_PER_SEC);
|
||||
|
||||
yield animation.ready;
|
||||
await animation.ready;
|
||||
ok(animation.isRunningOnCompositor,
|
||||
'The opacity animation is running on the compositor');
|
||||
|
||||
div.style.setProperty('color', 'blue', '');
|
||||
var markers = yield observeStyling(5);
|
||||
var markers = await observeStyling(5);
|
||||
if (isServo) {
|
||||
is(markers.length, 0,
|
||||
'The opacity animation keeps running on the compositor when ' +
|
||||
|
@ -1027,7 +1027,7 @@ waitForAllPaints(function() {
|
|||
'Bug 1307341 The opacity animation keeps running on the ' +
|
||||
'compositor when color style is changed');
|
||||
}
|
||||
yield ensureElementRemoval(div);
|
||||
await ensureElementRemoval(div);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -375,6 +375,41 @@ CollectWindowReports(nsGlobalWindow *aWindow,
|
|||
aWindowTotalSizes->mLayoutServoStyleSetsStylistRuleTree +=
|
||||
windowSizes.mLayoutServoStyleSetsStylistRuleTree;
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/precomputed-pseudos",
|
||||
windowSizes.mLayoutServoStyleSetsStylistPrecomputedPseudos,
|
||||
"Memory used by precomputed pseudo-element declarations within "
|
||||
"Servo style sets within a window.");
|
||||
aWindowTotalSizes->mLayoutServoStyleSetsStylistPrecomputedPseudos +=
|
||||
windowSizes.mLayoutServoStyleSetsStylistPrecomputedPseudos;
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/element-and-pseudos-maps",
|
||||
windowSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps,
|
||||
"Memory used by element and pseudos maps within Servo style "
|
||||
"sets within a window.");
|
||||
aWindowTotalSizes->mLayoutServoStyleSetsStylistElementAndPseudosMaps +=
|
||||
windowSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps;
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/invalidation-map",
|
||||
windowSizes.mLayoutServoStyleSetsStylistInvalidationMap,
|
||||
"Memory used by invalidation maps within Servo style sets "
|
||||
"within a window.");
|
||||
aWindowTotalSizes->mLayoutServoStyleSetsStylistInvalidationMap +=
|
||||
windowSizes.mLayoutServoStyleSetsStylistInvalidationMap;
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/revalidation-selectors",
|
||||
windowSizes.mLayoutServoStyleSetsStylistRevalidationSelectors,
|
||||
"Memory used by selectors for cache revalidation within Servo "
|
||||
"style sets within a window.");
|
||||
aWindowTotalSizes->mLayoutServoStyleSetsStylistRevalidationSelectors +=
|
||||
windowSizes.mLayoutServoStyleSetsStylistRevalidationSelectors;
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/stylist/other",
|
||||
windowSizes.mLayoutServoStyleSetsStylistOther,
|
||||
"Memory used by other Stylist data within Servo style sets "
|
||||
"within a window.");
|
||||
aWindowTotalSizes->mLayoutServoStyleSetsStylistOther +=
|
||||
windowSizes.mLayoutServoStyleSetsStylistOther;
|
||||
|
||||
REPORT_SIZE("/layout/servo-style-sets/other",
|
||||
windowSizes.mLayoutServoStyleSetsOther,
|
||||
"Memory used by other parts of Servo style sets within a "
|
||||
|
@ -658,6 +693,11 @@ nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
|
|||
|
||||
REPORT("window-objects/layout/servo-style-sets",
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistRuleTree +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistPrecomputedPseudos +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistInvalidationMap +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistRevalidationSelectors +
|
||||
windowTotalSizes.mLayoutServoStyleSetsStylistOther +
|
||||
windowTotalSizes.mLayoutServoStyleSetsOther,
|
||||
"This is the sum of all windows' 'layout/servo-style-sets/' numbers.");
|
||||
|
||||
|
|
|
@ -177,6 +177,11 @@ class nsWindowSizes
|
|||
macro(Other, mLayoutPresShellSize) \
|
||||
macro(Style, mLayoutGeckoStyleSets) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistRuleTree) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistPrecomputedPseudos) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistElementAndPseudosMaps) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistInvalidationMap) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistRevalidationSelectors) \
|
||||
macro(Style, mLayoutServoStyleSetsStylistOther) \
|
||||
macro(Style, mLayoutServoStyleSetsOther) \
|
||||
macro(Other, mLayoutTextRunsSize) \
|
||||
macro(Other, mLayoutPresContextSize) \
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
|
||||
// Original string. Note that "type/subtype" may not be lowercase,
|
||||
// use Type().AsString() instead to get the normalized "type/subtype".
|
||||
const nsACString& OriginalString() const { return mExtendedMIMEType.OriginalString(); }
|
||||
const nsCString& OriginalString() const { return mExtendedMIMEType.OriginalString(); }
|
||||
|
||||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
|
|
|
@ -1560,6 +1560,8 @@ MediaDecoder::RequestDebugInfo()
|
|||
void
|
||||
MediaDecoder::GetMozDebugReaderData(nsACString& aString)
|
||||
{
|
||||
aString += nsPrintfCString("Container Type: %s\n",
|
||||
ContainerType().Type().AsString().get());
|
||||
if (mReader) {
|
||||
mReader->GetMozDebugReaderData(aString);
|
||||
}
|
||||
|
|
|
@ -3117,7 +3117,7 @@ MediaFormatReader::GetImageContainer()
|
|||
void
|
||||
MediaFormatReader::GetMozDebugReaderData(nsACString& aString)
|
||||
{
|
||||
nsAutoCString result;
|
||||
nsCString result;
|
||||
nsAutoCString audioDecoderName("unavailable");
|
||||
nsAutoCString videoDecoderName = audioDecoderName;
|
||||
nsAutoCString audioType("none");
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
}
|
||||
|
||||
// MIME "type/subtype", always lowercase.
|
||||
const nsACString& AsString() const { return mMIMEType; }
|
||||
const nsCString& AsString() const { return mMIMEType; }
|
||||
|
||||
// Comparison with DependentMediaMIMEType.
|
||||
// Useful to compare to MEDIAMIMETYPE literals.
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
}
|
||||
|
||||
bool IsEmpty() const { return mCodecs.IsEmpty(); }
|
||||
const nsAString& AsString() const { return mCodecs; }
|
||||
const nsString& AsString() const { return mCodecs; }
|
||||
|
||||
using RangeType =
|
||||
const StringListRange<nsString, StringListRangeEmptyItems::ProcessEmptyItems>;
|
||||
|
@ -180,7 +180,7 @@ public:
|
|||
|
||||
// Original string. Note that "type/subtype" may not be lowercase,
|
||||
// use Type().AsString() instead to get the normalized "type/subtype".
|
||||
const nsACString& OriginalString() const { return mOriginalString; }
|
||||
const nsCString& OriginalString() const { return mOriginalString; }
|
||||
|
||||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
|
|
|
@ -816,9 +816,10 @@ private:
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
CleanupStreams();
|
||||
|
||||
NS_DispatchToMainThread(
|
||||
new DispatchStartEventRunnable(this, NS_LITERAL_STRING("start")));
|
||||
if (!mIsStartEventFired) {
|
||||
NS_DispatchToMainThread(
|
||||
new DispatchStartEventRunnable(this, NS_LITERAL_STRING("start")));
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
mRecorder->ForceInactive();
|
||||
|
|
|
@ -255,6 +255,7 @@ MediaSourceDecoder::SetMediaSourceDuration(double aDuration)
|
|||
void
|
||||
MediaSourceDecoder::GetMozDebugReaderData(nsACString& aString)
|
||||
{
|
||||
aString += NS_LITERAL_CSTRING("Container Type: MediaSource\n");
|
||||
if (mReader && mDemuxer) {
|
||||
mReader->GetMozDebugReaderData(aString);
|
||||
mDemuxer->GetMozDebugReaderData(aString);
|
||||
|
|
|
@ -262,7 +262,7 @@ MediaSourceDemuxer::GetMozDebugReaderData(nsACString& aString)
|
|||
"\t\tAudio Track Buffer Details: NumSamples=%zu"
|
||||
" Size=%u Evictable=%u "
|
||||
"NextGetSampleIndex=%u NextInsertionIndex=%d\n",
|
||||
mAudioTrack->mAudioTracks.mInfo->mMimeType.get(),
|
||||
mAudioTrack->mType.Type().AsString().get(),
|
||||
mAudioTrack->mAudioTracks.mNextSampleTime.ToSeconds(),
|
||||
mAudioTrack->mAudioTracks.mBuffers[0].Length(),
|
||||
mAudioTrack->mAudioTracks.mSizeBuffer,
|
||||
|
@ -280,7 +280,7 @@ MediaSourceDemuxer::GetMozDebugReaderData(nsACString& aString)
|
|||
"\t\tVideo Track Buffer Details: NumSamples=%zu"
|
||||
" Size=%u Evictable=%u "
|
||||
"NextGetSampleIndex=%u NextInsertionIndex=%d\n",
|
||||
mVideoTrack->mVideoTracks.mInfo->mMimeType.get(),
|
||||
mVideoTrack->mType.Type().AsString().get(),
|
||||
mVideoTrack->mVideoTracks.mNextSampleTime.ToSeconds(),
|
||||
mVideoTrack->mVideoTracks.mBuffers[0].Length(),
|
||||
mVideoTrack->mVideoTracks.mSizeBuffer,
|
||||
|
|
|
@ -211,7 +211,7 @@ private:
|
|||
// Set to true once a new segment is started.
|
||||
bool mNewMediaSegmentStarted;
|
||||
bool mActiveTrack;
|
||||
MediaContainerType mType;
|
||||
const MediaContainerType mType;
|
||||
|
||||
// ContainerParser objects and methods.
|
||||
// Those are used to parse the incoming input buffer.
|
||||
|
|
|
@ -230,7 +230,7 @@ PDMFactory::CreateDecoder(const CreateDecoderParams& aParams)
|
|||
}
|
||||
|
||||
for (auto& current : mCurrentPDMs) {
|
||||
if (!current->SupportsMimeType(config.mMimeType, diagnostics)) {
|
||||
if (!current->Supports(config, diagnostics)) {
|
||||
continue;
|
||||
}
|
||||
RefPtr<MediaDataDecoder> m = CreateDecoderWithPDM(current, aParams);
|
||||
|
|
|
@ -825,6 +825,9 @@ tags=msg capturestream
|
|||
[test_mediarecorder_creation_fail.html]
|
||||
skip-if = android_version == '17' # android(bug 1232305)
|
||||
tags=msg
|
||||
[test_mediarecorder_fires_start_event_once_when_erroring.html]
|
||||
skip-if = android_version == '17' # android(bug 1232305)
|
||||
tags=msg
|
||||
[test_mediarecorder_getencodeddata.html]
|
||||
skip-if = android_version == '17' # android(bug 1232305)
|
||||
tags=msg
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1395022 - MediaRecorder fires start event when erroring.</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1395022">Mozilla Bug 1395022</a>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
function startTest() {
|
||||
let audioContext = new AudioContext();
|
||||
let destination1 = audioContext.createMediaStreamDestination();
|
||||
let oscilator = audioContext.createOscillator();
|
||||
oscilator.connect(destination1);
|
||||
oscilator.start();
|
||||
|
||||
let destination2 = audioContext.createMediaStreamDestination();
|
||||
|
||||
let rec = new MediaRecorder(destination1.stream);
|
||||
|
||||
let numStartEvents = 0;
|
||||
|
||||
rec.onstart = () => {
|
||||
numStartEvents += 1;
|
||||
is(numStartEvents, 1, "One start event should be fired by the recorder");
|
||||
// Trigger an error in the recorder
|
||||
destination1.stream.addTrack(destination2.stream.getTracks()[0]);
|
||||
};
|
||||
|
||||
rec.onerror = () => {
|
||||
is(numStartEvents, 1, "One start event should have been fired by the recorder");
|
||||
SimpleTest.finish();
|
||||
};
|
||||
|
||||
rec.start();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
startTest();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -43,7 +43,7 @@ public:
|
|||
MOZ_CRASH();
|
||||
}
|
||||
|
||||
void* m = moz_xmalloc(size.value());
|
||||
void* m = operator new(size.value());
|
||||
RefPtr<AudioBlockBuffer> p = new (m) AudioBlockBuffer();
|
||||
NS_ASSERTION((reinterpret_cast<char*>(p.get() + 1) - reinterpret_cast<char*>(p.get())) % 4 == 0,
|
||||
"AudioBlockBuffers should be at least 4-byte aligned");
|
||||
|
|
|
@ -10,6 +10,24 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(AuthenticatorAssertionResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AuthenticatorAssertionResponse,
|
||||
AuthenticatorResponse)
|
||||
tmp->mAuthenticatorDataCachedObj = nullptr;
|
||||
tmp->mSignatureCachedObj = nullptr;
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(AuthenticatorAssertionResponse,
|
||||
AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mAuthenticatorDataCachedObj)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mSignatureCachedObj)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AuthenticatorAssertionResponse,
|
||||
AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(AuthenticatorAssertionResponse, AuthenticatorResponse)
|
||||
NS_IMPL_RELEASE_INHERITED(AuthenticatorAssertionResponse, AuthenticatorResponse)
|
||||
|
||||
|
@ -18,10 +36,16 @@ NS_INTERFACE_MAP_END_INHERITING(AuthenticatorResponse)
|
|||
|
||||
AuthenticatorAssertionResponse::AuthenticatorAssertionResponse(nsPIDOMWindowInner* aParent)
|
||||
: AuthenticatorResponse(aParent)
|
||||
{}
|
||||
, mAuthenticatorDataCachedObj(nullptr)
|
||||
, mSignatureCachedObj(nullptr)
|
||||
{
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
|
||||
AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse()
|
||||
{}
|
||||
{
|
||||
mozilla::DropJSObjects(this);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
AuthenticatorAssertionResponse::WrapObject(JSContext* aCx,
|
||||
|
@ -32,9 +56,12 @@ AuthenticatorAssertionResponse::WrapObject(JSContext* aCx,
|
|||
|
||||
void
|
||||
AuthenticatorAssertionResponse::GetAuthenticatorData(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aRetVal) const
|
||||
JS::MutableHandle<JSObject*> aRetVal)
|
||||
{
|
||||
aRetVal.set(mAuthenticatorData.ToUint8Array(aCx));
|
||||
if (!mAuthenticatorDataCachedObj) {
|
||||
mAuthenticatorDataCachedObj = mAuthenticatorData.ToUint8Array(aCx);
|
||||
}
|
||||
aRetVal.set(mAuthenticatorDataCachedObj);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -48,9 +75,12 @@ AuthenticatorAssertionResponse::SetAuthenticatorData(CryptoBuffer& aBuffer)
|
|||
|
||||
void
|
||||
AuthenticatorAssertionResponse::GetSignature(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aRetVal) const
|
||||
JS::MutableHandle<JSObject*> aRetVal)
|
||||
{
|
||||
aRetVal.set(mSignature.ToUint8Array(aCx));
|
||||
if (!mSignatureCachedObj) {
|
||||
mSignatureCachedObj = mSignature.ToUint8Array(aCx);
|
||||
}
|
||||
aRetVal.set(mSignatureCachedObj);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -23,6 +23,8 @@ class AuthenticatorAssertionResponse final : public AuthenticatorResponse
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(AuthenticatorAssertionResponse,
|
||||
AuthenticatorResponse)
|
||||
|
||||
explicit AuthenticatorAssertionResponse(nsPIDOMWindowInner* aParent);
|
||||
|
||||
|
@ -34,20 +36,22 @@ public:
|
|||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
void
|
||||
GetAuthenticatorData(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal) const;
|
||||
GetAuthenticatorData(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
|
||||
|
||||
nsresult
|
||||
SetAuthenticatorData(CryptoBuffer& aBuffer);
|
||||
|
||||
void
|
||||
GetSignature(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal) const;
|
||||
GetSignature(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
|
||||
|
||||
nsresult
|
||||
SetSignature(CryptoBuffer& aBuffer);
|
||||
|
||||
private:
|
||||
CryptoBuffer mAuthenticatorData;
|
||||
JS::Heap<JSObject*> mAuthenticatorDataCachedObj;
|
||||
CryptoBuffer mSignature;
|
||||
JS::Heap<JSObject*> mSignatureCachedObj;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -10,6 +10,22 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(AuthenticatorAttestationResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AuthenticatorAttestationResponse,
|
||||
AuthenticatorResponse)
|
||||
tmp->mAttestationObjectCachedObj = nullptr;
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(AuthenticatorAttestationResponse,
|
||||
AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mAttestationObjectCachedObj)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AuthenticatorAttestationResponse,
|
||||
AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(AuthenticatorAttestationResponse, AuthenticatorResponse)
|
||||
NS_IMPL_RELEASE_INHERITED(AuthenticatorAttestationResponse, AuthenticatorResponse)
|
||||
|
||||
|
@ -18,10 +34,15 @@ NS_INTERFACE_MAP_END_INHERITING(AuthenticatorResponse)
|
|||
|
||||
AuthenticatorAttestationResponse::AuthenticatorAttestationResponse(nsPIDOMWindowInner* aParent)
|
||||
: AuthenticatorResponse(aParent)
|
||||
{}
|
||||
, mAttestationObjectCachedObj(nullptr)
|
||||
{
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
|
||||
AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse()
|
||||
{}
|
||||
{
|
||||
mozilla::DropJSObjects(this);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
AuthenticatorAttestationResponse::WrapObject(JSContext* aCx,
|
||||
|
@ -32,9 +53,12 @@ AuthenticatorAttestationResponse::WrapObject(JSContext* aCx,
|
|||
|
||||
void
|
||||
AuthenticatorAttestationResponse::GetAttestationObject(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aRetVal) const
|
||||
JS::MutableHandle<JSObject*> aRetVal)
|
||||
{
|
||||
aRetVal.set(mAttestationObject.ToUint8Array(aCx));
|
||||
if (!mAttestationObjectCachedObj) {
|
||||
mAttestationObjectCachedObj = mAttestationObject.ToUint8Array(aCx);
|
||||
}
|
||||
aRetVal.set(mAttestationObjectCachedObj);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -23,6 +23,8 @@ class AuthenticatorAttestationResponse final : public AuthenticatorResponse
|
|||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(AuthenticatorAttestationResponse,
|
||||
AuthenticatorResponse)
|
||||
|
||||
explicit AuthenticatorAttestationResponse(nsPIDOMWindowInner* aParent);
|
||||
|
||||
|
@ -34,13 +36,14 @@ public:
|
|||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
void
|
||||
GetAttestationObject(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal) const;
|
||||
GetAttestationObject(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
|
||||
|
||||
nsresult
|
||||
SetAttestationObject(CryptoBuffer& aBuffer);
|
||||
|
||||
private:
|
||||
CryptoBuffer mAttestationObject;
|
||||
JS::Heap<JSObject*> mAttestationObjectCachedObj;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -10,10 +10,25 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
// Only needed for refcounted objects.
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AuthenticatorResponse, mParent)
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
tmp->mClientDataJSONCachedObj = nullptr;
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mClientDataJSONCachedObj)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mParent)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(AuthenticatorResponse)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(AuthenticatorResponse)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AuthenticatorResponse)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
|
@ -21,10 +36,15 @@ NS_INTERFACE_MAP_END
|
|||
|
||||
AuthenticatorResponse::AuthenticatorResponse(nsPIDOMWindowInner* aParent)
|
||||
: mParent(aParent)
|
||||
{}
|
||||
, mClientDataJSONCachedObj(nullptr)
|
||||
{
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
|
||||
AuthenticatorResponse::~AuthenticatorResponse()
|
||||
{}
|
||||
{
|
||||
mozilla::DropJSObjects(this);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
AuthenticatorResponse::WrapObject(JSContext* aCx,
|
||||
|
@ -35,9 +55,12 @@ AuthenticatorResponse::WrapObject(JSContext* aCx,
|
|||
|
||||
void
|
||||
AuthenticatorResponse::GetClientDataJSON(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aRetVal) const
|
||||
JS::MutableHandle<JSObject*> aRetVal)
|
||||
{
|
||||
aRetVal.set(mClientDataJSON.ToUint8Array(aCx));
|
||||
if (!mClientDataJSONCachedObj) {
|
||||
mClientDataJSONCachedObj = mClientDataJSON.ToUint8Array(aCx);
|
||||
}
|
||||
aRetVal.set(mClientDataJSONCachedObj);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
GetFormat(nsString& aRetVal) const;
|
||||
|
||||
void
|
||||
GetClientDataJSON(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal) const;
|
||||
GetClientDataJSON(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
|
||||
|
||||
nsresult
|
||||
SetClientDataJSON(CryptoBuffer& aBuffer);
|
||||
|
@ -52,6 +52,7 @@ public:
|
|||
private:
|
||||
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
||||
CryptoBuffer mClientDataJSON;
|
||||
JS::Heap<JSObject*> mClientDataJSONCachedObj;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -11,7 +11,19 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(PublicKeyCredential, Credential, mResponse)
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(PublicKeyCredential)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PublicKeyCredential,
|
||||
Credential)
|
||||
tmp->mRawIdCachedObj = nullptr;
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PublicKeyCredential, Credential)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mRawIdCachedObj)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PublicKeyCredential, Credential)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(PublicKeyCredential, Credential)
|
||||
NS_IMPL_RELEASE_INHERITED(PublicKeyCredential, Credential)
|
||||
|
@ -19,15 +31,17 @@ NS_IMPL_RELEASE_INHERITED(PublicKeyCredential, Credential)
|
|||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PublicKeyCredential)
|
||||
NS_INTERFACE_MAP_END_INHERITING(Credential)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PublicKeyCredential, Credential)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
PublicKeyCredential::PublicKeyCredential(nsPIDOMWindowInner* aParent)
|
||||
: Credential(aParent)
|
||||
{}
|
||||
, mRawIdCachedObj(nullptr)
|
||||
{
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
|
||||
PublicKeyCredential::~PublicKeyCredential()
|
||||
{}
|
||||
{
|
||||
mozilla::DropJSObjects(this);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
PublicKeyCredential::WrapObject(JSContext* aCx,
|
||||
|
@ -38,9 +52,12 @@ PublicKeyCredential::WrapObject(JSContext* aCx,
|
|||
|
||||
void
|
||||
PublicKeyCredential::GetRawId(JSContext* aCx,
|
||||
JS::MutableHandle<JSObject*> aRetVal) const
|
||||
JS::MutableHandle<JSObject*> aRetVal)
|
||||
{
|
||||
aRetVal.set(mRawId.ToUint8Array(aCx));
|
||||
if (!mRawIdCachedObj) {
|
||||
mRawIdCachedObj = mRawId.ToUint8Array(aCx);
|
||||
}
|
||||
aRetVal.set(mRawIdCachedObj);
|
||||
}
|
||||
|
||||
already_AddRefed<AuthenticatorResponse>
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
void
|
||||
GetRawId(JSContext* cx, JS::MutableHandle<JSObject*> aRetVal) const;
|
||||
GetRawId(JSContext* cx, JS::MutableHandle<JSObject*> aRetVal);
|
||||
|
||||
already_AddRefed<AuthenticatorResponse>
|
||||
Response() const;
|
||||
|
@ -48,6 +48,7 @@ public:
|
|||
|
||||
private:
|
||||
CryptoBuffer mRawId;
|
||||
JS::Heap<JSObject*> mRawIdCachedObj;
|
||||
RefPtr<AuthenticatorResponse> mResponse;
|
||||
// Extensions are not supported yet.
|
||||
// <some type> mClientExtensionResults;
|
||||
|
|
|
@ -56,6 +56,11 @@ function() {
|
|||
ok(aCredInfo.rawId.length > 0, "Key ID exists");
|
||||
is(aCredInfo.id, bytesToBase64UrlSafe(aCredInfo.rawId), "Encoded Key ID and Raw Key ID match");
|
||||
|
||||
ok(aCredInfo.rawId === aCredInfo.rawId, "PublicKeyCredential.RawID is SameObject");
|
||||
ok(aCredInfo.response === aCredInfo.response, "PublicKeyCredential.Response is SameObject");
|
||||
ok(aCredInfo.response.clientDataJSON === aCredInfo.response.clientDataJSON, "PublicKeyCredential.Response.ClientDataJSON is SameObject");
|
||||
ok(aCredInfo.response.attestationObject === aCredInfo.response.attestationObject, "PublicKeyCredential.Response.AttestationObject is SameObject");
|
||||
|
||||
let clientData = JSON.parse(buffer2string(aCredInfo.response.clientDataJSON));
|
||||
is(clientData.challenge, bytesToBase64UrlSafe(gCredentialChallenge), "Challenge is correct");
|
||||
// WD-05 vs. WD-06: In WD-06, the second parameter should be "window.location.origin". Fix
|
||||
|
@ -90,6 +95,9 @@ function() {
|
|||
ok(aAssertion.rawId.length > 0, "Key ID exists");
|
||||
is(aAssertion.id, bytesToBase64UrlSafe(aAssertion.rawId), "Encoded Key ID and Raw Key ID match");
|
||||
|
||||
ok(aAssertion.response.authenticatorData === aAssertion.response.authenticatorData, "AuthenticatorAssertionResponse.AuthenticatorData is SameObject");
|
||||
ok(aAssertion.response.signature === aAssertion.response.signature, "AuthenticatorAssertionResponse.Signature is SameObject");
|
||||
|
||||
ok(aAssertion.response.authenticatorData.length > 0, "Authenticator data exists");
|
||||
let clientData = JSON.parse(buffer2string(aAssertion.response.clientDataJSON));
|
||||
is(clientData.challenge, bytesToBase64UrlSafe(gAssertionChallenge), "Challenge is correct");
|
||||
|
|
|
@ -101,7 +101,7 @@ case $cmd in
|
|||
cp -pPR ${TOPSRCDIR}/.cargo/config.in ${tgtpath}/.cargo
|
||||
|
||||
# generate configure files to avoid build dependency on autoconf-2.13
|
||||
cp -pPR ${TOPSRCDIR}/js/src/configure.in ${tgtpath}/js/src/configure
|
||||
cp -PR ${TOPSRCDIR}/js/src/configure.in ${tgtpath}/js/src/configure
|
||||
chmod a+x ${tgtpath}/js/src/configure
|
||||
${AUTOCONF} --localdir=${TOPSRCDIR}/js/src \
|
||||
${TOPSRCDIR}/js/src/old-configure.in >${tgtpath}/js/src/old-configure
|
||||
|
|
|
@ -1596,15 +1596,16 @@ Evaluate(JSContext* cx, unsigned argc, Value* vp)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (v.isObject()) {
|
||||
if (!envChain.append(&v.toObject())) {
|
||||
JS_ReportOutOfMemory(cx);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!v.isObject()) {
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_UNEXPECTED_TYPE,
|
||||
"\"envChainObject\" passed to evaluate()", "not an object");
|
||||
return false;
|
||||
} else if (v.toObject().is<GlobalObject>()) {
|
||||
JS_ReportErrorASCII(cx, "\"envChainObject\" passed to evaluate() should not be a global");
|
||||
return false;
|
||||
} else if (!envChain.append(&v.toObject())) {
|
||||
JS_ReportOutOfMemory(cx);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,4 +33,14 @@ evaluate("(function() { assertEq(someVar, 2);})()", evalOpt);
|
|||
evaluate("(function() { assertEq(this !== alsoSomeObject, true);})()", evalOpt);
|
||||
evaluate("(function() { assertEq(this.someVar, 1);})()", evalOpt);
|
||||
|
||||
var globalEvalOpt = {
|
||||
envChainObject: this
|
||||
};
|
||||
try {
|
||||
evaluate("assertEq(someVar, 1);", globalEvalOpt);
|
||||
throw new Error("Globals aren't allowed as a envChainObject argument to evaluate");
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
|
||||
reportCompare(true, true);
|
||||
|
|
|
@ -432,12 +432,12 @@ RestyleManager::ChangeHintToString(nsChangeHint aHint)
|
|||
"ReflowChangesSizeOrPosition", "UpdateComputedBSize",
|
||||
"UpdateUsesOpacity", "UpdateBackgroundPosition",
|
||||
"AddOrRemoveTransform", "CSSOverflowChange",
|
||||
"UpdateWidgetProperties"
|
||||
"UpdateWidgetProperties", "UpdateTableCellSpans"
|
||||
};
|
||||
static_assert(nsChangeHint_AllHints == (1 << ArrayLength(names)) - 1,
|
||||
static_assert(nsChangeHint_AllHints == (1u << ArrayLength(names)) - 1,
|
||||
"Name list doesn't match change hints.");
|
||||
uint32_t hint = aHint & ((1 << ArrayLength(names)) - 1);
|
||||
uint32_t rest = aHint & ~((1 << ArrayLength(names)) - 1);
|
||||
uint32_t hint = aHint & ((1u << ArrayLength(names)) - 1);
|
||||
uint32_t rest = aHint & ~((1u << ArrayLength(names)) - 1);
|
||||
if ((hint & NS_STYLE_HINT_REFLOW) == NS_STYLE_HINT_REFLOW) {
|
||||
result.AppendLiteral("NS_STYLE_HINT_REFLOW");
|
||||
hint = hint & ~NS_STYLE_HINT_REFLOW;
|
||||
|
@ -1697,6 +1697,9 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
|||
if (hint & nsChangeHint_UpdateWidgetProperties) {
|
||||
frame->UpdateWidgetProperties();
|
||||
}
|
||||
if (hint & nsChangeHint_UpdateTableCellSpans) {
|
||||
frameConstructor->UpdateTableCellSpans(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9958,6 +9958,21 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(
|
|||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
nsCSSFrameConstructor::UpdateTableCellSpans(nsIContent* aContent)
|
||||
{
|
||||
nsTableCellFrame* cellFrame = do_QueryFrame(aContent->GetPrimaryFrame());
|
||||
|
||||
// It's possible that this warning could fire if some other style change
|
||||
// simultaneously changes the 'display' of the element and makes it no
|
||||
// longer be a table cell.
|
||||
NS_WARNING_ASSERTION(cellFrame, "Hint should only be posted on table cells!");
|
||||
|
||||
if (cellFrame) {
|
||||
cellFrame->GetTableFrame()->RowOrColSpanChanged(cellFrame);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsCSSFrameConstructor::RecreateFramesForContent(nsIContent* aContent,
|
||||
InsertionKind aInsertionKind,
|
||||
|
|
|
@ -1803,6 +1803,11 @@ private:
|
|||
InsertionKind aInsertionKind,
|
||||
RemoveFlags aFlags);
|
||||
|
||||
/**
|
||||
* Handles change of rowspan and colspan attributes on table cells.
|
||||
*/
|
||||
void UpdateTableCellSpans(nsIContent* aContent);
|
||||
|
||||
// If removal of aFrame from the frame tree requires reconstruction of some
|
||||
// containing block (either of aFrame or of its parent) due to {ib} splits or
|
||||
// table pseudo-frames, recreate the relevant frame subtree. The return value
|
||||
|
|
|
@ -238,6 +238,12 @@ enum nsChangeHint : uint32_t {
|
|||
*/
|
||||
nsChangeHint_UpdateWidgetProperties = 1 << 29,
|
||||
|
||||
/**
|
||||
* Indicates that there has been a colspan or rowspan attribute change
|
||||
* on the cells of a table.
|
||||
*/
|
||||
nsChangeHint_UpdateTableCellSpans = 1 << 30,
|
||||
|
||||
// IMPORTANT NOTE: When adding a new hint, you will need to add it to
|
||||
// one of:
|
||||
//
|
||||
|
@ -253,7 +259,7 @@ enum nsChangeHint : uint32_t {
|
|||
/**
|
||||
* Dummy hint value for all hints. It exists for compile time check.
|
||||
*/
|
||||
nsChangeHint_AllHints = (1 << 30) - 1,
|
||||
nsChangeHint_AllHints = (1u << 31) - 1,
|
||||
};
|
||||
|
||||
// Redefine these operators to return nothing. This will catch any use
|
||||
|
@ -353,6 +359,7 @@ inline nsChangeHint operator^=(nsChangeHint& aLeft, nsChangeHint aRight)
|
|||
nsChangeHint_UpdateOverflow | \
|
||||
nsChangeHint_UpdateParentOverflow | \
|
||||
nsChangeHint_UpdatePostTransformOverflow | \
|
||||
nsChangeHint_UpdateTableCellSpans | \
|
||||
nsChangeHint_UpdateTransformLayer | \
|
||||
nsChangeHint_UpdateUsesOpacity | \
|
||||
nsChangeHint_AddOrRemoveTransform | \
|
||||
|
|
|
@ -24,7 +24,7 @@ test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLin
|
|||
== intrinsic-isize-2.html intrinsic-isize-2-ref.html
|
||||
== justification-1.html justification-1-ref.html
|
||||
== justification-2.html justification-2-ref.html
|
||||
fails-if((stylo||styloVsGecko)&&cocoaWidget) fuzzy-if(winWidget,255,792) == lang-specific-style-1.html lang-specific-style-1-ref.html # bug 1134947
|
||||
fuzzy-if(winWidget,255,792) == lang-specific-style-1.html lang-specific-style-1-ref.html # bug 1134947
|
||||
== line-breaking-1.html line-breaking-1-ref.html
|
||||
== line-breaking-2.html line-breaking-2-ref.html
|
||||
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) == line-break-suppression-1.html line-break-suppression-1-ref.html
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
<script>
|
||||
|
||||
function begin() {
|
||||
document.getElementsByTagName('input')[1].focus();
|
||||
setTimeout(function() {
|
||||
document.getElementsByTagName('input')[1].focus();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function end() {
|
||||
|
|
|
@ -36,7 +36,7 @@ skip-if(Android) == number-max-height-2.html number-max-height-2-ref.html
|
|||
== number-significant-fractional-digits.html number-significant-fractional-digits-ref.html
|
||||
|
||||
# focus
|
||||
fuzzy-if(skiaContent,2,5) needs-focus skip-if(styloVsGecko||stylo) == focus-handling.html focus-handling-ref.html
|
||||
fuzzy-if(skiaContent,2,5) needs-focus == focus-handling.html focus-handling-ref.html
|
||||
|
||||
# select
|
||||
fuzzy-if(skiaContent,1,1) == number-selected.html number-selected-ref.html
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
== values-rtl.html values-rtl-ref.html
|
||||
== margin-padding.html margin-padding-ref.html
|
||||
== margin-padding-rtl.html margin-padding-rtl-ref.html
|
||||
random-if(styloVsGecko) == bar-pseudo-element.html bar-pseudo-element-ref.html
|
||||
== bar-pseudo-element.html bar-pseudo-element-ref.html
|
||||
== bar-pseudo-element-rtl.html bar-pseudo-element-rtl-ref.html
|
||||
== indeterminate-style-width.html indeterminate-style-width-ref.html
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ fuzzy(1,2) fuzzy-if(azureSkia,1,40000) == canvas-drawImage-alpha-2.html canvas-d
|
|||
# context-fill:
|
||||
== context-fill-01.html blue100x100-ref.html
|
||||
test-pref(svg.context-properties.content.enabled,true) == context-fill-01.html lime100x100-ref.html
|
||||
fails-if(styloVsGecko||stylo) == context-fill-02.html transparent100x100-w-border-ref.html # Bug 1380590
|
||||
== context-fill-02.html transparent100x100-w-border-ref.html
|
||||
test-pref(svg.context-properties.content.enabled,true) == context-fill-02.html lime100x100-w-border-ref.html
|
||||
test-pref(svg.context-properties.content.enabled,true) == context-fill-03.html lime100x100-50pct-ref.html
|
||||
# fuzz because on win8 the r & b components are off by one
|
||||
|
|
|
@ -139,7 +139,7 @@ test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLin
|
|||
== 1158549-1-vertical-block-size-constraints.html 1158549-1-vertical-block-size-constraints-ref.html
|
||||
== 1163238-orthogonal-auto-margins.html 1163238-orthogonal-auto-margins-ref.html
|
||||
== 1174450-intrinsic-sizing.html 1174450-intrinsic-sizing-ref.html
|
||||
fails-if((stylo||styloVsGecko)&&cocoaWidget) == 1175789-underline-overline-1.html 1175789-underline-overline-1-ref.html
|
||||
== 1175789-underline-overline-1.html 1175789-underline-overline-1-ref.html
|
||||
== 1188061-1-nsChangeHint_ClearAncestorIntrinsics.html 1188061-1-nsChangeHint_ClearAncestorIntrinsics-ref.html
|
||||
== 1188061-2-nsChangeHint_UpdateComputedBSize.html 1188061-2-nsChangeHint_UpdateComputedBSize-ref.html
|
||||
|
||||
|
|
|
@ -113,9 +113,10 @@ SERVO_BINDING_FUNC(Servo_StyleSet_GetFontFaceRules, void,
|
|||
RawGeckoFontFaceRuleListBorrowedMut list)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_GetCounterStyleRule, nsCSSCounterStyleRule*,
|
||||
RawServoStyleSetBorrowed set, nsIAtom* name)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_BuildFontFeatureValueSet, bool,
|
||||
RawServoStyleSetBorrowed set,
|
||||
gfxFontFeatureValueSet* list)
|
||||
// This function may return nullptr or gfxFontFeatureValueSet with zero reference.
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_BuildFontFeatureValueSet,
|
||||
gfxFontFeatureValueSet*,
|
||||
RawServoStyleSetBorrowed set)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_ResolveForDeclarations,
|
||||
ServoStyleContextStrong,
|
||||
RawServoStyleSetBorrowed set,
|
||||
|
@ -123,6 +124,7 @@ SERVO_BINDING_FUNC(Servo_StyleSet_ResolveForDeclarations,
|
|||
RawServoDeclarationBlockBorrowed declarations)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_AddSizeOfExcludingThis, void,
|
||||
mozilla::MallocSizeOf malloc_size_of,
|
||||
mozilla::MallocSizeOf malloc_enclosing_size_of,
|
||||
mozilla::ServoStyleSetSizes* sizes,
|
||||
RawServoStyleSetBorrowed set)
|
||||
SERVO_BINDING_FUNC(Servo_StyleContext_AddRef, void, ServoStyleContextBorrowed ctx);
|
||||
|
|
|
@ -1334,6 +1334,12 @@ Gecko_nsFont_Destroy(nsFont* aDest)
|
|||
aDest->~nsFont();
|
||||
}
|
||||
|
||||
gfxFontFeatureValueSet*
|
||||
Gecko_ConstructFontFeatureValueSet()
|
||||
{
|
||||
return new gfxFontFeatureValueSet();
|
||||
}
|
||||
|
||||
nsTArray<unsigned int>*
|
||||
Gecko_AppendFeatureValueHashEntry(gfxFontFeatureValueSet* aFontFeatureValues,
|
||||
nsIAtom* aFamily, uint32_t aAlternate, nsIAtom* aName)
|
||||
|
|
|
@ -301,6 +301,8 @@ void Gecko_nsFont_InitSystem(nsFont* dst, int32_t font_id,
|
|||
const nsStyleFont* font, RawGeckoPresContextBorrowed pres_context);
|
||||
void Gecko_nsFont_Destroy(nsFont* dst);
|
||||
|
||||
// The gfxFontFeatureValueSet returned from this function has zero reference.
|
||||
gfxFontFeatureValueSet* Gecko_ConstructFontFeatureValueSet();
|
||||
nsTArray<unsigned int>* Gecko_AppendFeatureValueHashEntry(
|
||||
gfxFontFeatureValueSet* value_set, nsIAtom* family, uint32_t alternate, nsIAtom* name);
|
||||
void Gecko_nsFont_SetFontFeatureValuesLookup(nsFont* font,
|
||||
|
|
|
@ -249,6 +249,7 @@ ServoStyleSet::MediumFeaturesChangedRules(bool* aViewportUnitsUsed)
|
|||
}
|
||||
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF(ServoStyleSetMallocSizeOf)
|
||||
MOZ_DEFINE_MALLOC_ENCLOSING_SIZE_OF(ServoStyleSetMallocEnclosingSizeOf)
|
||||
|
||||
void
|
||||
ServoStyleSet::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const
|
||||
|
@ -263,10 +264,23 @@ ServoStyleSet::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const
|
|||
// Measure mRawSet. We use ServoStyleSetMallocSizeOf rather than
|
||||
// aMallocSizeOf to distinguish in DMD's output the memory measured within
|
||||
// Servo code.
|
||||
Servo_StyleSet_AddSizeOfExcludingThis(ServoStyleSetMallocSizeOf, &sizes,
|
||||
mRawSet.get());
|
||||
aSizes.mLayoutServoStyleSetsStylistRuleTree += sizes.mStylistRuleTree;
|
||||
aSizes.mLayoutServoStyleSetsOther += sizes.mOther;
|
||||
Servo_StyleSet_AddSizeOfExcludingThis(ServoStyleSetMallocSizeOf,
|
||||
ServoStyleSetMallocEnclosingSizeOf,
|
||||
&sizes, mRawSet.get());
|
||||
aSizes.mLayoutServoStyleSetsStylistRuleTree +=
|
||||
sizes.mStylistRuleTree;
|
||||
aSizes.mLayoutServoStyleSetsStylistPrecomputedPseudos +=
|
||||
sizes.mStylistPrecomputedPseudos;
|
||||
aSizes.mLayoutServoStyleSetsStylistElementAndPseudosMaps +=
|
||||
sizes.mStylistElementAndPseudosMaps;
|
||||
aSizes.mLayoutServoStyleSetsStylistInvalidationMap +=
|
||||
sizes.mStylistInvalidationMap;
|
||||
aSizes.mLayoutServoStyleSetsStylistRevalidationSelectors +=
|
||||
sizes.mStylistRevalidationSelectors;
|
||||
aSizes.mLayoutServoStyleSetsStylistOther +=
|
||||
sizes.mStylistOther;
|
||||
aSizes.mLayoutServoStyleSetsOther +=
|
||||
sizes.mOther;
|
||||
}
|
||||
|
||||
if (mStyleRuleMap) {
|
||||
|
@ -1406,11 +1420,8 @@ already_AddRefed<gfxFontFeatureValueSet>
|
|||
ServoStyleSet::BuildFontFeatureValueSet()
|
||||
{
|
||||
UpdateStylistIfNeeded();
|
||||
RefPtr<gfxFontFeatureValueSet> set = new gfxFontFeatureValueSet();
|
||||
bool setHasAnyRules = Servo_StyleSet_BuildFontFeatureValueSet(mRawSet.get(), set.get());
|
||||
if (!setHasAnyRules) {
|
||||
return nullptr;
|
||||
}
|
||||
RefPtr<gfxFontFeatureValueSet> set =
|
||||
Servo_StyleSet_BuildFontFeatureValueSet(mRawSet.get());
|
||||
return set.forget();
|
||||
}
|
||||
|
||||
|
|
|
@ -202,10 +202,20 @@ class ServoStyleSetSizes
|
|||
{
|
||||
public:
|
||||
size_t mStylistRuleTree;
|
||||
size_t mStylistPrecomputedPseudos;
|
||||
size_t mStylistElementAndPseudosMaps;
|
||||
size_t mStylistInvalidationMap;
|
||||
size_t mStylistRevalidationSelectors;
|
||||
size_t mStylistOther;
|
||||
size_t mOther;
|
||||
|
||||
ServoStyleSetSizes()
|
||||
: mStylistRuleTree(0)
|
||||
, mStylistPrecomputedPseudos(0)
|
||||
, mStylistElementAndPseudosMaps(0)
|
||||
, mStylistInvalidationMap(0)
|
||||
, mStylistRevalidationSelectors(0)
|
||||
, mStylistOther(0)
|
||||
, mOther(0)
|
||||
{}
|
||||
};
|
||||
|
|
|
@ -164,6 +164,8 @@ support-files = file_bug1089417_iframe.html
|
|||
support-files = file_bug1375944.html Ahem.ttf
|
||||
[test_bug1382568.html]
|
||||
support-files = bug1382568-iframe.html
|
||||
[test_bug1394302.html]
|
||||
skip-if = !stylo # This is a stylo test; gecko isn't deterministic here
|
||||
[test_cascade.html]
|
||||
[test_ch_ex_no_infloops.html]
|
||||
[test_change_hint_optimizations.html]
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1394302
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 1394302</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<style>
|
||||
#inner {
|
||||
animation: setFontSize 0s forwards;
|
||||
}
|
||||
@keyframes setFontSize {
|
||||
to { font-size: calc(110% + 0.1em); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id=outer>
|
||||
<div id=inner></div>
|
||||
</div>
|
||||
<script>
|
||||
var outer = document.getElementById("outer");
|
||||
outer.style.fontSize = '10px';
|
||||
is(getComputedStyle(inner).fontSize, "12px");
|
||||
|
||||
outer.style.fontSize = '20px';
|
||||
is(getComputedStyle(inner).fontSize, "24px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -3913,27 +3913,6 @@ SVGTextFrame::GetBBoxContribution(const gfx::Matrix &aToBBoxUserspace,
|
|||
return bbox;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGContainerFrame methods
|
||||
|
||||
gfxMatrix
|
||||
SVGTextFrame::GetCanvasTM()
|
||||
{
|
||||
if (!mCanvasTM) {
|
||||
NS_ASSERTION(GetParent(), "null parent");
|
||||
NS_ASSERTION(!(GetStateBits() & NS_FRAME_IS_NONDISPLAY),
|
||||
"should not call GetCanvasTM() when we are non-display");
|
||||
|
||||
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
|
||||
dom::SVGTextContentElement *content = static_cast<dom::SVGTextContentElement*>(GetContent());
|
||||
|
||||
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
|
||||
|
||||
mCanvasTM = new gfxMatrix(tm);
|
||||
}
|
||||
return *mCanvasTM;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// SVGTextFrame SVG DOM methods
|
||||
|
||||
|
|
|
@ -257,9 +257,6 @@ public:
|
|||
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||
uint32_t aFlags) override;
|
||||
|
||||
// nsSVGContainerFrame methods:
|
||||
virtual gfxMatrix GetCanvasTM() override;
|
||||
|
||||
// SVG DOM text methods:
|
||||
uint32_t GetNumberOfChars(nsIContent* aContent);
|
||||
float GetComputedTextLength(nsIContent* aContent);
|
||||
|
@ -533,11 +530,6 @@ private:
|
|||
*/
|
||||
RefPtr<MutationObserver> mMutationObserver;
|
||||
|
||||
/**
|
||||
* Cached canvasTM value.
|
||||
*/
|
||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||
|
||||
/**
|
||||
* The number of characters in the DOM after the final nsTextFrame. For
|
||||
* example, with
|
||||
|
|
|
@ -44,14 +44,6 @@ public:
|
|||
return MakeFrameName(NS_LITERAL_STRING("SVGA"), aResult);
|
||||
}
|
||||
#endif
|
||||
// nsSVGDisplayableFrame interface:
|
||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
||||
|
||||
// nsSVGContainerFrame methods:
|
||||
virtual gfxMatrix GetCanvasTM() override;
|
||||
|
||||
private:
|
||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -111,41 +103,4 @@ nsSVGAFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGDisplayableFrame methods
|
||||
|
||||
void
|
||||
nsSVGAFrame::NotifySVGChanged(uint32_t aFlags)
|
||||
{
|
||||
MOZ_ASSERT(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
|
||||
"Invalidation logic may need adjusting");
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nullptr;
|
||||
}
|
||||
|
||||
nsSVGDisplayContainerFrame::NotifySVGChanged(aFlags);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGContainerFrame methods:
|
||||
|
||||
gfxMatrix
|
||||
nsSVGAFrame::GetCanvasTM()
|
||||
{
|
||||
if (!mCanvasTM) {
|
||||
NS_ASSERTION(GetParent(), "null parent");
|
||||
|
||||
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
|
||||
dom::SVGAElement *content = static_cast<dom::SVGAElement*>(GetContent());
|
||||
|
||||
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
|
||||
|
||||
mCanvasTM = new gfxMatrix(tm);
|
||||
}
|
||||
|
||||
return *mCanvasTM;
|
||||
}
|
||||
}
|
|
@ -401,6 +401,11 @@ nsSVGDisplayContainerFrame::NotifySVGChanged(uint32_t aFlags)
|
|||
MOZ_ASSERT(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
|
||||
"Invalidation logic may need adjusting");
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nullptr;
|
||||
}
|
||||
|
||||
nsSVGUtils::NotifyChildrenOfSVGChange(this, aFlags);
|
||||
}
|
||||
|
||||
|
@ -433,3 +438,20 @@ nsSVGDisplayContainerFrame::GetBBoxContribution(
|
|||
|
||||
return bboxUnion;
|
||||
}
|
||||
|
||||
gfxMatrix
|
||||
nsSVGDisplayContainerFrame::GetCanvasTM()
|
||||
{
|
||||
if (!mCanvasTM) {
|
||||
NS_ASSERTION(GetParent(), "null parent");
|
||||
|
||||
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
|
||||
nsSVGElement *content = static_cast<nsSVGElement*>(GetContent());
|
||||
|
||||
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
|
||||
|
||||
mCanvasTM = new gfxMatrix(tm);
|
||||
}
|
||||
|
||||
return *mCanvasTM;
|
||||
}
|
||||
|
|
|
@ -147,6 +147,13 @@ public:
|
|||
virtual SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace,
|
||||
uint32_t aFlags) override;
|
||||
virtual bool IsDisplayContainer() override { return true; }
|
||||
virtual gfxMatrix GetCanvasTM() override;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Cached canvasTM value.
|
||||
*/
|
||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -44,36 +44,6 @@ nsSVGGFrame::Init(nsIContent* aContent,
|
|||
//----------------------------------------------------------------------
|
||||
// nsSVGDisplayableFrame methods
|
||||
|
||||
void
|
||||
nsSVGGFrame::NotifySVGChanged(uint32_t aFlags)
|
||||
{
|
||||
MOZ_ASSERT(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
|
||||
"Invalidation logic may need adjusting");
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nullptr;
|
||||
}
|
||||
|
||||
nsSVGDisplayContainerFrame::NotifySVGChanged(aFlags);
|
||||
}
|
||||
|
||||
gfxMatrix
|
||||
nsSVGGFrame::GetCanvasTM()
|
||||
{
|
||||
if (!mCanvasTM) {
|
||||
NS_ASSERTION(GetParent(), "null parent");
|
||||
|
||||
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
|
||||
SVGGraphicsElement *content = static_cast<SVGGraphicsElement*>(GetContent());
|
||||
|
||||
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
|
||||
|
||||
mCanvasTM = new gfxMatrix(tm);
|
||||
}
|
||||
return *mCanvasTM;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSVGGFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -43,14 +43,6 @@ public:
|
|||
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType) override;
|
||||
|
||||
// nsSVGDisplayableFrame interface:
|
||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
||||
|
||||
// nsSVGContainerFrame methods:
|
||||
virtual gfxMatrix GetCanvasTM() override;
|
||||
|
||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -187,8 +187,6 @@ protected:
|
|||
// subtree if we were to use a list (see bug 381285 comment 20).
|
||||
nsAutoPtr<nsTHashtable<nsPtrHashKey<nsSVGForeignObjectFrame> > > mForeignObjectHash;
|
||||
|
||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||
|
||||
nsRegion mInvalidRegion;
|
||||
|
||||
float mFullZoom;
|
||||
|
|
|
@ -389,8 +389,12 @@ public:
|
|||
|
||||
enum BBoxFlags {
|
||||
eBBoxIncludeFill = 1 << 0,
|
||||
// Include the geometry of the fill even when the fill does not
|
||||
// actually render (e.g. when fill="none" or fill-opacity="0")
|
||||
eBBoxIncludeFillGeometry = 1 << 1,
|
||||
eBBoxIncludeStroke = 1 << 2,
|
||||
// Include the geometry of the stroke even when the stroke does not
|
||||
// actually render (e.g. when stroke="none" or stroke-opacity="0")
|
||||
eBBoxIncludeStrokeGeometry = 1 << 3,
|
||||
eBBoxIncludeMarkers = 1 << 4,
|
||||
eBBoxIncludeClipped = 1 << 5,
|
||||
|
|
|
@ -125,11 +125,6 @@ nsSVGViewportFrame::NotifySVGChanged(uint32_t aFlags)
|
|||
}
|
||||
}
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nullptr;
|
||||
}
|
||||
|
||||
nsSVGDisplayContainerFrame::NotifySVGChanged(aFlags);
|
||||
}
|
||||
|
||||
|
@ -277,22 +272,6 @@ nsSVGViewportFrame::NotifyViewportOrTransformChanged(uint32_t aFlags)
|
|||
//----------------------------------------------------------------------
|
||||
// nsSVGContainerFrame methods:
|
||||
|
||||
gfxMatrix
|
||||
nsSVGViewportFrame::GetCanvasTM()
|
||||
{
|
||||
if (!mCanvasTM) {
|
||||
NS_ASSERTION(GetParent(), "null parent");
|
||||
|
||||
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
|
||||
SVGViewportElement *content = static_cast<SVGViewportElement*>(GetContent());
|
||||
|
||||
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
|
||||
|
||||
mCanvasTM = new gfxMatrix(tm);
|
||||
}
|
||||
return *mCanvasTM;
|
||||
}
|
||||
|
||||
bool
|
||||
nsSVGViewportFrame::HasChildrenOnlyTransform(gfx::Matrix *aTransform) const
|
||||
{
|
||||
|
|
|
@ -43,16 +43,10 @@ public:
|
|||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||
|
||||
// nsSVGContainerFrame methods:
|
||||
virtual gfxMatrix GetCanvasTM() override;
|
||||
|
||||
virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const override;
|
||||
|
||||
// nsISVGSVGFrame interface:
|
||||
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
|
||||
|
||||
protected:
|
||||
|
||||
nsAutoPtr<gfxMatrix> mCanvasTM;
|
||||
};
|
||||
|
||||
#endif // __NS_SVGVIEWPORTFRAME_H__
|
||||
|
|
|
@ -230,8 +230,12 @@ nsTableCellFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
// let the table frame decide what to do
|
||||
GetTableFrame()->AttributeChangedFor(this, mContent, aAttribute);
|
||||
|
||||
if (aAttribute == nsGkAtoms::rowspan || aAttribute == nsGkAtoms::colspan) {
|
||||
nsLayoutUtils::PostRestyleEvent(mContent->AsElement(),
|
||||
nsRestyleHint(0),
|
||||
nsChangeHint_UpdateTableCellSpans);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -355,30 +355,24 @@ nsTableFrame::SetInitialChildList(ChildListID aListID,
|
|||
}
|
||||
|
||||
void
|
||||
nsTableFrame::AttributeChangedFor(nsIFrame* aFrame,
|
||||
nsIContent* aContent,
|
||||
nsIAtom* aAttribute)
|
||||
nsTableFrame::RowOrColSpanChanged(nsTableCellFrame* aCellFrame)
|
||||
{
|
||||
nsTableCellFrame *cellFrame = do_QueryFrame(aFrame);
|
||||
if (cellFrame) {
|
||||
if ((nsGkAtoms::rowspan == aAttribute) ||
|
||||
(nsGkAtoms::colspan == aAttribute)) {
|
||||
nsTableCellMap* cellMap = GetCellMap();
|
||||
if (cellMap) {
|
||||
// for now just remove the cell from the map and reinsert it
|
||||
int32_t rowIndex, colIndex;
|
||||
cellFrame->GetRowIndex(rowIndex);
|
||||
cellFrame->GetColIndex(colIndex);
|
||||
RemoveCell(cellFrame, rowIndex);
|
||||
AutoTArray<nsTableCellFrame*, 1> cells;
|
||||
cells.AppendElement(cellFrame);
|
||||
InsertCells(cells, rowIndex, colIndex - 1);
|
||||
if (aCellFrame) {
|
||||
nsTableCellMap* cellMap = GetCellMap();
|
||||
if (cellMap) {
|
||||
// for now just remove the cell from the map and reinsert it
|
||||
int32_t rowIndex, colIndex;
|
||||
aCellFrame->GetRowIndex(rowIndex);
|
||||
aCellFrame->GetColIndex(colIndex);
|
||||
RemoveCell(aCellFrame, rowIndex);
|
||||
AutoTArray<nsTableCellFrame*, 1> cells;
|
||||
cells.AppendElement(aCellFrame);
|
||||
InsertCells(cells, rowIndex, colIndex - 1);
|
||||
|
||||
// XXX Should this use eStyleChange? It currently doesn't need
|
||||
// to, but it might given more optimization.
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
// XXX Should this use eStyleChange? It currently doesn't need
|
||||
// to, but it might given more optimization.
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -180,12 +180,12 @@ public:
|
|||
nsIFrame* aDestructRoot);
|
||||
|
||||
nsPoint GetFirstSectionOrigin(const ReflowInput& aReflowInput) const;
|
||||
|
||||
/*
|
||||
* Notification that aAttribute has changed for content inside a table (cell, row, etc)
|
||||
* Notification that rowspan or colspan has changed for content inside a
|
||||
* table cell
|
||||
*/
|
||||
void AttributeChangedFor(nsIFrame* aFrame,
|
||||
nsIContent* aContent,
|
||||
nsIAtom* aAttribute);
|
||||
void RowOrColSpanChanged(nsTableCellFrame* aCellFrame);
|
||||
|
||||
/** @see nsIFrame::DestroyFrom */
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||
|
|
|
@ -22,6 +22,9 @@ if (AppConstants.ACCESSIBILITY) {
|
|||
"resource://gre/modules/accessibility/AccessFu.jsm");
|
||||
}
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AsyncPrefs",
|
||||
"resource://gre/modules/AsyncPrefs.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Manifests",
|
||||
"resource://gre/modules/Manifest.jsm");
|
||||
|
||||
|
@ -529,6 +532,9 @@ var BrowserApp = {
|
|||
InitLater(() => Services.obs.notifyObservers(window, "browser-delayed-startup-finished"));
|
||||
InitLater(() => GlobalEventDispatcher.sendRequest({ type: "Gecko:DelayedStartup" }));
|
||||
|
||||
// AsyncPrefs is needed for reader mode.
|
||||
InitLater(() => AsyncPrefs.init());
|
||||
|
||||
if (!AppConstants.RELEASE_OR_BETA) {
|
||||
InitLater(() => WebcompatReporter.init());
|
||||
}
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/GeckoViewContentModule.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
var dump = Cu.import("resource://gre/modules/AndroidLog.jsm", {}).AndroidLog.d.bind(null, "ViewContent");
|
||||
XPCOMUtils.defineLazyGetter(this, "dump", () =>
|
||||
Cu.import("resource://gre/modules/AndroidLog.jsm",
|
||||
{}).AndroidLog.d.bind(null, "ViewContent"));
|
||||
|
||||
function debug(aMsg) {
|
||||
// dump(aMsg);
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/GeckoViewContentModule.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
var dump = Cu.import("resource://gre/modules/AndroidLog.jsm", {})
|
||||
.AndroidLog.d.bind(null, "ViewScrollContent");
|
||||
XPCOMUtils.defineLazyGetter(this, "dump", () =>
|
||||
Cu.import("resource://gre/modules/AndroidLog.jsm",
|
||||
{}).AndroidLog.d.bind(null, "ViewScrollContent"));
|
||||
|
||||
function debug(aMsg) {
|
||||
// dump(aMsg);
|
||||
|
|
|
@ -14,8 +14,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher",
|
|||
XPCOMUtils.defineLazyGetter(this, "WindowEventDispatcher",
|
||||
() => EventDispatcher.for(window));
|
||||
|
||||
var dump = Cu.import("resource://gre/modules/AndroidLog.jsm", {})
|
||||
.AndroidLog.d.bind(null, "View");
|
||||
XPCOMUtils.defineLazyGetter(this, "dump", () =>
|
||||
Cu.import("resource://gre/modules/AndroidLog.jsm",
|
||||
{}).AndroidLog.d.bind(null, "View"));
|
||||
|
||||
// Creates and manages GeckoView modules.
|
||||
// A module must extend GeckoViewModule.
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
# Stylesheets
|
||||
category agent-style-sheets browser-content-stylesheet chrome://geckoview/skin/content.css
|
||||
|
||||
# GeckoViewStartup.js
|
||||
component {8e993c34-fdd6-432c-967e-f995d888777f} GeckoViewStartup.js
|
||||
contract @mozilla.org/geckoview/startup;1 {8e993c34-fdd6-432c-967e-f995d888777f}
|
||||
category app-startup GeckoViewStartup service,@mozilla.org/geckoview/startup;1
|
||||
category profile-after-change GeckoViewStartup @mozilla.org/geckoview/startup;1 process=main
|
||||
|
||||
# GeckoViewPermission.js
|
||||
component {42f3c238-e8e8-4015-9ca2-148723a8afcf} GeckoViewPermission.js
|
||||
contract @mozilla.org/content-permission/prompt;1 {42f3c238-e8e8-4015-9ca2-148723a8afcf}
|
||||
category app-startup GeckoViewPermission service,@mozilla.org/content-permission/prompt;1
|
||||
|
||||
# GeckoViewPrompt.js
|
||||
component {076ac188-23c1-4390-aa08-7ef1f78ca5d9} GeckoViewPrompt.js
|
||||
contract @mozilla.org/embedcomp/prompt-service;1 {076ac188-23c1-4390-aa08-7ef1f78ca5d9}
|
||||
contract @mozilla.org/prompter;1 {076ac188-23c1-4390-aa08-7ef1f78ca5d9}
|
||||
category app-startup GeckoViewPrompt service,@mozilla.org/prompter;1
|
||||
category profile-after-change GeckoViewPrompt @mozilla.org/prompter;1 process=main
|
||||
component {aa0dd6fc-73dd-4621-8385-c0b377e02cee} GeckoViewPrompt.js process=main
|
||||
contract @mozilla.org/colorpicker;1 {aa0dd6fc-73dd-4621-8385-c0b377e02cee} process=main
|
||||
component {e4565e36-f101-4bf5-950b-4be0887785a9} GeckoViewPrompt.js process=main
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher",
|
||||
"resource://gre/modules/Messaging.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
EventDispatcher: "resource://gre/modules/Messaging.jsm",
|
||||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
// See: http://developer.android.com/reference/android/Manifest.permission.html
|
||||
const PERM_ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
|
||||
|
@ -16,6 +17,7 @@ const PERM_CAMERA = "android.permission.CAMERA";
|
|||
const PERM_RECORD_AUDIO = "android.permission.RECORD_AUDIO";
|
||||
|
||||
function GeckoViewPermission() {
|
||||
this.wrappedJSObject = this;
|
||||
}
|
||||
|
||||
GeckoViewPermission.prototype = {
|
||||
|
@ -29,12 +31,6 @@ GeckoViewPermission.prototype = {
|
|||
/* ---------- nsIObserver ---------- */
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "app-startup": {
|
||||
Services.obs.addObserver(this, "getUserMedia:ask-device-permission");
|
||||
Services.obs.addObserver(this, "getUserMedia:request");
|
||||
Services.obs.addObserver(this, "PeerConnection:request");
|
||||
break;
|
||||
}
|
||||
case "getUserMedia:ask-device-permission": {
|
||||
this.handleMediaAskDevicePermission(aData, aSubject);
|
||||
break;
|
||||
|
|
|
@ -4,65 +4,26 @@
|
|||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AsyncPrefs",
|
||||
"resource://gre/modules/AsyncPrefs.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ContentPrefServiceParent",
|
||||
"resource://gre/modules/ContentPrefServiceParent.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher",
|
||||
"resource://gre/modules/Messaging.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
|
||||
"resource://gre/modules/FileUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
EventDispatcher: "resource://gre/modules/Messaging.jsm",
|
||||
FileUtils: "resource://gre/modules/FileUtils.jsm",
|
||||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "UUIDGen",
|
||||
"@mozilla.org/uuid-generator;1", "nsIUUIDGenerator");
|
||||
|
||||
function PromptFactory() {
|
||||
this.wrappedJSObject = this;
|
||||
}
|
||||
|
||||
PromptFactory.prototype = {
|
||||
classID: Components.ID("{076ac188-23c1-4390-aa08-7ef1f78ca5d9}"),
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
Ci.nsIObserver, Ci.nsIPromptFactory, Ci.nsIPromptService, Ci.nsIPromptService2]),
|
||||
|
||||
/* ---------- nsIObserver ---------- */
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "app-startup": {
|
||||
Services.obs.addObserver(this, "chrome-document-global-created");
|
||||
Services.obs.addObserver(this, "content-document-global-created");
|
||||
break;
|
||||
}
|
||||
case "profile-after-change": {
|
||||
// ContentPrefServiceParent is needed for e10s file picker.
|
||||
ContentPrefServiceParent.init();
|
||||
// AsyncPrefs is needed for reader mode.
|
||||
AsyncPrefs.init();
|
||||
Services.mm.addMessageListener("GeckoView:Prompt", this);
|
||||
break;
|
||||
}
|
||||
case "chrome-document-global-created":
|
||||
case "content-document-global-created": {
|
||||
let win = aSubject.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDocShell).QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.rootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
if (win !== aSubject) {
|
||||
// Only attach to top-level windows.
|
||||
return;
|
||||
}
|
||||
win.addEventListener("click", this); // non-capture
|
||||
win.addEventListener("contextmenu", this); // non-capture
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
Ci.nsIPromptFactory, Ci.nsIPromptService, Ci.nsIPromptService2]),
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
|
@ -408,7 +369,7 @@ function PromptDelegate(aDomWin) {
|
|||
.rootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
try {
|
||||
this._dispatcher = EventDispatcher.for(gvWin);
|
||||
this._dispatcher = gvWin.WindowEventDispatcher || EventDispatcher.for(gvWin);
|
||||
} catch (e) {
|
||||
// Use global dispatcher.
|
||||
}
|
||||
|
|