mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Merge mozilla-central to autoland a=merge on a CLOSED TREE
This commit is contained in:
commit
5165b164ec
@ -4,6 +4,11 @@ WebPayments UI
|
||||
|
||||
User Interface for the WebPayments `Payment Request API <https://w3c.github.io/browser-payment-api/>`_ and `Payment Handler API <https://w3c.github.io/payment-handler/>`_.
|
||||
|
||||
|
||||
`Project Wiki <https://wiki.mozilla.org/Firefox/Features/Web_Payments>`_ |
|
||||
`#payments on IRC <ircs://irc.mozilla.org:6697/payments>`_ |
|
||||
`File a bug <https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=WebPayments%20UI&status_whiteboard=[webpayments]%20[triage]>`_
|
||||
|
||||
JSDoc style comments are used within the JS files of the component. This document will focus on higher-level and shared concepts.
|
||||
|
||||
.. toctree::
|
||||
@ -13,6 +18,8 @@ JSDoc style comments are used within the JS files of the component. This documen
|
||||
Debugging/Development
|
||||
=====================
|
||||
|
||||
Relevant preferences: ``dom.payments.*``
|
||||
|
||||
Must Have Electrolysis
|
||||
----------------------
|
||||
|
||||
@ -25,10 +32,10 @@ Set the pref ``dom.payments.loglevel`` to "Debug" to increase the verbosity of c
|
||||
|
||||
Unprivileged UI Development
|
||||
---------------------------
|
||||
During development of the unprivileged custom elements, you can load the dialog from a
|
||||
local server without even requiring a build. Simply run `./mach python browser/components/payments/server.py`
|
||||
then load `http://localhost:8000/paymentRequest.xhtml?debug=1` in the browser.
|
||||
Use the debugging console to load sample data.
|
||||
During development of the unprivileged custom elements, you can load the dialog in a tab with
|
||||
the url `resource://payments/paymentRequest.xhtml`.
|
||||
You can then use the debugging console to load sample data. Autofill add/edit form strings
|
||||
will not appear when developing this way until they are converted to FTL.
|
||||
|
||||
Debugging Console
|
||||
-----------------
|
||||
@ -43,16 +50,9 @@ Debugging the unprivileged frame with the developer tools
|
||||
To open a debugger in the context of the remote payment frame, click the "Debug frame" button in the
|
||||
debugging console.
|
||||
|
||||
Use the `tabs` variable in the Browser Content Toolbox's console to access the frame contents.
|
||||
Use the ``tabs`` variable in the Browser Content Toolbox's console to access the frame contents.
|
||||
There can be multiple frames loaded in the same process so you will need to find the correct tab
|
||||
in the array by checking the file name is `paymentRequest.xhtml` (e.g. `tabs[0].content.location`).
|
||||
|
||||
|
||||
Communication with the DOM
|
||||
==========================
|
||||
|
||||
Communication from the DOM to the UI happens via the `paymentUIService.js` (implementing ``nsIPaymentUIService``).
|
||||
The UI talks to the DOM code via the ``nsIPaymentRequestService`` interface.
|
||||
in the array by checking the file name is `paymentRequest.xhtml` (e.g. ``tabs[0].content.location``).
|
||||
|
||||
|
||||
Dialog Architecture
|
||||
@ -70,12 +70,30 @@ Instead, all communication across the privileged/unprivileged boundary is done v
|
||||
These events are converted to/from message manager messages of the same name to communicate to the other process.
|
||||
The purpose of `paymentDialogFrameScript.js` is to simply convert unprivileged DOM events to/from messages from the other process.
|
||||
|
||||
The dialog depends on the add/edit forms and storage from :doc:`Form Autofill </browser/extensions/formautofill/docs/index>` for addresses and credit cards.
|
||||
|
||||
Communication with the DOM
|
||||
--------------------------
|
||||
|
||||
Communication from the DOM to the UI happens via the `paymentUIService.js` (implementing ``nsIPaymentUIService``).
|
||||
The UI talks to the DOM code via the ``nsIPaymentRequestService`` interface.
|
||||
|
||||
|
||||
Custom Elements
|
||||
---------------
|
||||
|
||||
The Payment Request UI uses Custom Elements for the UI components.
|
||||
The Payment Request UI uses `Custom Elements <https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements>`_ for the UI components.
|
||||
|
||||
Some guidelines:
|
||||
|
||||
* There are some `mixins <https://dxr.mozilla.org/mozilla-central/source/browser/components/payments/res/mixins/>`_
|
||||
to provide commonly needed functionality to a custom element.
|
||||
* `res/containers/ <https://dxr.mozilla.org/mozilla-central/source/browser/components/payments/res/containers/>`_
|
||||
contains elements that react to application state changes,
|
||||
`res/components/ <https://dxr.mozilla.org/mozilla-central/source/browser/components/payments/res/components>`_
|
||||
contains elements that aren't connected to the state directly.
|
||||
* Elements should avoid having their own internal/private state and should react to state changes.
|
||||
Containers primarily use the application state (``requestStore``) while components primarily use attributes.
|
||||
* If you're overriding a lifecycle callback, don't forget to call that method on
|
||||
``super`` from the implementation to ensure that mixins and ancestor classes
|
||||
work properly.
|
||||
|
@ -1,9 +1,9 @@
|
||||
Form Autofill
|
||||
=============
|
||||
|
||||
[`Wiki <https://wiki.mozilla.org/Firefox/Features/Form_Autofill>`_] |
|
||||
[IRC `#formfill <ircs://irc.mozilla.org:6697/formfill>`_] |
|
||||
[Mailing list `autofill@lists.mozilla.org <mailto:autofill@lists.mozilla.org>`_]
|
||||
`Wiki <https://wiki.mozilla.org/Firefox/Features/Form_Autofill>`_ |
|
||||
`IRC: #formfill <ircs://irc.mozilla.org:6697/formfill>`_ |
|
||||
Mailing List: `autofill@lists.mozilla.org <mailto:autofill@lists.mozilla.org>`_
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
@ -69,9 +69,12 @@ WebRenderLayerScrollData::Initialize(WebRenderScrollData& aOwner,
|
||||
aOwner.GetManager(), aItem->ReferenceFrame(),
|
||||
Nothing(), nullptr);
|
||||
asr->mScrollableFrame->NotifyApzTransaction();
|
||||
MOZ_ASSERT(metadata);
|
||||
if (metadata) {
|
||||
MOZ_ASSERT(metadata->GetMetrics().GetScrollId() == scrollId);
|
||||
mScrollIds.AppendElement(aOwner.AddMetadata(metadata.ref()));
|
||||
} else {
|
||||
MOZ_ASSERT_UNREACHABLE("Expected scroll metadata to be available!");
|
||||
}
|
||||
}
|
||||
asr = asr->mParent;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||
// Version: 2018-01-01
|
||||
// Version: 2018-08-29
|
||||
|
||||
/**
|
||||
* Mapping from currency codes to the number of decimal digits used for them.
|
||||
@ -47,8 +47,10 @@ var currencyDigits = {
|
||||
TND: 3,
|
||||
// Uganda Shilling (UGANDA)
|
||||
UGX: 0,
|
||||
// Uruguay Peso en Unidades Indexadas (URUIURUI) (URUGUAY)
|
||||
// Uruguay Peso en Unidades Indexadas (UI) (URUGUAY)
|
||||
UYI: 0,
|
||||
// Unidad Previsional (URUGUAY)
|
||||
UYW: 4,
|
||||
// Dong (VIET NAM)
|
||||
VND: 0,
|
||||
// Vatu (VANUATU)
|
||||
|
@ -969,7 +969,8 @@ js::intl_FormatDateTime(JSContext* cx, unsigned argc, Value* vp)
|
||||
|
||||
ClippedTime x = TimeClip(args[1].toNumber());
|
||||
if (!x.isValid()) {
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DATE_NOT_FINITE);
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DATE_NOT_FINITE,
|
||||
"DateTimeFormat");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -186,6 +186,12 @@ function Intl_RelativeTimeFormat_format(value, unit) {
|
||||
// Step 4.
|
||||
let u = ToString(unit);
|
||||
|
||||
// PartitionRelativeTimePattern, step 4.
|
||||
if (!Number_isFinite(t)) {
|
||||
ThrowRangeError(JSMSG_DATE_NOT_FINITE, "RelativeTimeFormat");
|
||||
}
|
||||
|
||||
// PartitionRelativeTimePattern, step 5.
|
||||
switch (u) {
|
||||
case "second":
|
||||
case "seconds":
|
||||
|
@ -1206,8 +1206,8 @@ GetStubEnteredCount(ICStub* stub, uint32_t* count)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
DumpICInfo(JSScript* script)
|
||||
void
|
||||
jit::JitSpewBaselineICStats(JSScript* script, const char* dumpReason)
|
||||
{
|
||||
MOZ_ASSERT(script->hasBaselineScript());
|
||||
BaselineScript* blScript = script->baselineScript();
|
||||
@ -1218,19 +1218,23 @@ DumpICInfo(JSScript* script)
|
||||
|
||||
Fprinter& out = JitSpewPrinter();
|
||||
|
||||
const char* filename = script->filename() ? script->filename() : "unknown";
|
||||
out.printf("Dumping IC info for %s:%d\n", filename,
|
||||
PCToLineNumber(script, script->code()));
|
||||
out.printf("[BaselineICStats] Dumping IC info for %s script %s:%d:%d\n",
|
||||
dumpReason, script->filename(), script->lineno(),
|
||||
script->column());
|
||||
|
||||
for (size_t i = 0; i < blScript->numICEntries(); i++) {
|
||||
ICEntry& entry = blScript->icEntry(i);
|
||||
|
||||
unsigned column;
|
||||
uint32_t pcOffset = entry.pcOffset();
|
||||
jsbytecode* pc = entry.pc(script);
|
||||
|
||||
unsigned column;
|
||||
unsigned int line = PCToLineNumber(script, pc, &column);
|
||||
out.printf("\t%s:%u:%u (%s) \t", filename, line, column, CodeName[*pc]);
|
||||
out.printf("[BaselineICStats] %s - pc=%u line=%u col=%u\n",
|
||||
CodeName[*pc], pcOffset, line, column);
|
||||
|
||||
ICStub* stub = entry.firstStub();
|
||||
out.printf("[BaselineICStats] ");
|
||||
while (stub) {
|
||||
uint32_t count;
|
||||
if (GetStubEnteredCount(stub, &count)) {
|
||||
@ -1238,7 +1242,7 @@ DumpICInfo(JSScript* script)
|
||||
} else if (stub->isFallback()) {
|
||||
out.printf("(fb) %u", stub->toFallbackStub()->enteredCount());
|
||||
} else {
|
||||
out.printf(" <unknown> -> ");
|
||||
out.printf(" ?? -> ");
|
||||
}
|
||||
stub = stub->next();
|
||||
}
|
||||
@ -1255,10 +1259,6 @@ jit::FinishDiscardBaselineScript(FreeOp* fop, JSScript* script)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef JS_JITSPEW
|
||||
DumpICInfo(script);
|
||||
#endif
|
||||
|
||||
if (script->baselineScript()->active()) {
|
||||
// Script is live on the stack. Keep the BaselineScript, but destroy
|
||||
// stubs allocated in the optimized stub space.
|
||||
|
@ -763,6 +763,11 @@ MarkActiveBaselineScripts(Zone* zone);
|
||||
MethodStatus
|
||||
BaselineCompile(JSContext* cx, JSScript* script, bool forceDebugInstrumentation = false);
|
||||
|
||||
#ifdef JS_JITSPEW
|
||||
void
|
||||
JitSpewBaselineICStats(JSScript* script, const char* dumpReason);
|
||||
#endif
|
||||
|
||||
static const unsigned BASELINE_MAX_ARGS_LENGTH = 20000;
|
||||
|
||||
} // namespace jit
|
||||
|
@ -779,6 +779,14 @@ IonBuilder::init()
|
||||
AbortReasonOr<Ok>
|
||||
IonBuilder::build()
|
||||
{
|
||||
// Spew IC info for inlined script, but only when actually compiling,
|
||||
// not when analyzing it.
|
||||
#ifdef JS_JITSPEW
|
||||
if (!info().isAnalysis()) {
|
||||
JitSpewBaselineICStats(script(), "To-Be-Compiled");
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_TRY(init());
|
||||
|
||||
if (script()->hasBaselineScript()) {
|
||||
@ -972,6 +980,14 @@ IonBuilder::buildInline(IonBuilder* callerBuilder, MResumePoint* callerResumePoi
|
||||
{
|
||||
inlineCallInfo_ = &callInfo;
|
||||
|
||||
// Spew IC info for inlined script, but only when actually compiling,
|
||||
// not when analyzing it.
|
||||
#ifdef JS_JITSPEW
|
||||
if (!info().isAnalysis()) {
|
||||
JitSpewBaselineICStats(script(), "To-Be-Inlined");
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_TRY(init());
|
||||
|
||||
JitSpew(JitSpew_IonScripts, "Inlining script %s:%u:%u (%p)",
|
||||
|
@ -510,7 +510,7 @@ MSG_DEF(JSMSG_TESTING_SCRIPTS_ONLY, 0, JSEXN_TYPEERR, "only works on scripts")
|
||||
MSG_DEF(JSMSG_TRACELOGGER_ENABLE_FAIL, 1, JSEXN_ERR, "enabling tracelogger failed: {0}")
|
||||
|
||||
// Intl
|
||||
MSG_DEF(JSMSG_DATE_NOT_FINITE, 0, JSEXN_RANGEERR, "date value is not finite in DateTimeFormat.format()")
|
||||
MSG_DEF(JSMSG_DATE_NOT_FINITE, 1, JSEXN_RANGEERR, "date value is not finite in {0}.format()")
|
||||
MSG_DEF(JSMSG_INTERNAL_INTL_ERROR, 0, JSEXN_ERR, "internal error while computing Intl data")
|
||||
MSG_DEF(JSMSG_INTL_OBJECT_NOT_INITED, 3, JSEXN_TYPEERR, "Intl.{0}.prototype.{1} called on value that's not an object initialized as a {2}")
|
||||
MSG_DEF(JSMSG_INVALID_CURRENCY_CODE, 1, JSEXN_RANGEERR, "invalid currency code in NumberFormat(): {0}")
|
||||
|
@ -397,9 +397,7 @@ skip-if(!xulRuntime.shell) script test262/built-ins/Atomics/wake/wake-one.js
|
||||
skip-if(!xulRuntime.shell) script test262/built-ins/Atomics/wake/wake-all-on-loc.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1346081
|
||||
skip script test262/intl402/NumberFormat/prototype/format/format-fraction-digits.js
|
||||
skip script test262/intl402/NumberFormat/prototype/format/format-fraction-digits-precision.js
|
||||
skip script test262/intl402/NumberFormat/prototype/format/format-significant-digits.js
|
||||
skip script test262/intl402/NumberFormat/prototype/format/format-significant-digits-precision.js
|
||||
|
||||
# Hoisted block-level function named "arguments" not initialized with undefined per B.3.3.1
|
||||
@ -431,14 +429,6 @@ skip script test262/annexB/language/function-code/block-decl-nested-blocks-with-
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1406171
|
||||
skip script test262/built-ins/Reflect/ownKeys/return-on-corresponding-order-large-index.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1291407
|
||||
skip script test262/intl402/ListFormat/prototype/toStringTag/toString.js
|
||||
skip script test262/intl402/ListFormat/prototype/toStringTag/toStringTag.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1473228
|
||||
skip script test262/intl402/Segmenter/prototype/toStringTag/toString.js
|
||||
skip script test262/intl402/Segmenter/prototype/toStringTag/toStringTag.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1473229
|
||||
skip include test262/intl402/RelativeTimeFormat/prototype/formatToParts/jstests.list
|
||||
|
||||
@ -450,12 +440,9 @@ skip script test262/intl402/RelativeTimeFormat/prototype/format/pl-pl-style-long
|
||||
skip script test262/intl402/RelativeTimeFormat/prototype/format/pl-pl-style-narrow.js
|
||||
skip script test262/intl402/RelativeTimeFormat/prototype/format/pl-pl-style-short.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1473230
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1473588
|
||||
skip script test262/intl402/RelativeTimeFormat/prototype/format/unit-plural.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1483548
|
||||
skip script test262/intl402/RelativeTimeFormat/prototype/format/value-non-finite.js
|
||||
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1499933
|
||||
skip script test262/intl402/DateTimeFormat/prototype/resolvedOptions/order.js
|
||||
skip script test262/intl402/PluralRules/prototype/resolvedOptions/order.js
|
||||
|
@ -111,10 +111,10 @@ assertEq(rtf.format(1, "day"), "غدًا");
|
||||
|
||||
|
||||
rtf = new Intl.RelativeTimeFormat("en-US");
|
||||
assertEq(rtf.format(Infinity, "year"), "in ∞ years");
|
||||
assertEq(rtf.format(-Infinity, "year"), "∞ years ago");
|
||||
|
||||
var weirdValueCases = [
|
||||
Infinity,
|
||||
-Infinity,
|
||||
NaN,
|
||||
"word",
|
||||
[0,2],
|
||||
@ -122,7 +122,7 @@ var weirdValueCases = [
|
||||
];
|
||||
|
||||
for (let c of weirdValueCases) {
|
||||
assertEq(rtf.format(c, "year"), "in NaN years");
|
||||
assertThrowsInstanceOf(() => rtf.format(c, "year"), RangeError);
|
||||
};
|
||||
|
||||
var weirdUnitCases = [
|
||||
@ -137,7 +137,7 @@ var weirdUnitCases = [
|
||||
];
|
||||
|
||||
for (let u of weirdUnitCases) {
|
||||
assertThrows(function() {
|
||||
assertThrowsInstanceOf(function() {
|
||||
var rtf = new Intl.RelativeTimeFormat("en-US");
|
||||
rtf.format(1, u);
|
||||
}, RangeError);
|
||||
|
@ -10,7 +10,10 @@ export AR="$topsrcdir/clang/bin/llvm-ar"
|
||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
||||
|
||||
# Enable LTO if the NDK is available.
|
||||
if [ -z "$NO_NDK" ]; then
|
||||
ac_add_options --enable-lto
|
||||
fi
|
||||
|
||||
export MOZILLA_OFFICIAL=1
|
||||
export MOZ_TELEMETRY_REPORTING=1
|
||||
|
@ -20,6 +20,9 @@ export AR="$topsrcdir/clang/bin/llvm-ar"
|
||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
||||
|
||||
# Enable LTO if the NDK is available.
|
||||
if [ -z "$NO_NDK" ]; then
|
||||
ac_add_options --enable-lto
|
||||
fi
|
||||
|
||||
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
||||
|
@ -18,6 +18,9 @@ export AR="$topsrcdir/clang/bin/llvm-ar"
|
||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
||||
|
||||
# Enable LTO if the NDK is available.
|
||||
if [ -z "$NO_NDK" ]; then
|
||||
ac_add_options --enable-lto
|
||||
fi
|
||||
|
||||
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
||||
|
@ -23,8 +23,8 @@ import java.io.File
|
||||
@MediumTest
|
||||
class CrashTest {
|
||||
companion object {
|
||||
val DEFAULT_X86_EMULATOR_TIMEOUT_MILLIS = 30000L
|
||||
val DEFAULT_X86_DEVICE_TIMEOUT_MILLIS = 30000L
|
||||
val DEFAULT_X86_EMULATOR_TIMEOUT_MILLIS = 90000L
|
||||
val DEFAULT_X86_DEVICE_TIMEOUT_MILLIS = 60000L
|
||||
val DEFAULT_ARM_EMULATOR_TIMEOUT_MILLIS = 180000L
|
||||
val DEFAULT_ARM_DEVICE_TIMEOUT_MILLIS = 60000L
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ var dialog = {
|
||||
let gIOSvc = Cc["@mozilla.org/gio-service;1"]
|
||||
.getService(Ci.nsIGIOService);
|
||||
var gioApps = gIOSvc.getAppsForURIScheme(this._URI.scheme);
|
||||
for (let handler of gioApps.enumerate()) {
|
||||
for (let handler of gioApps.enumerate(Ci.nsIHandlerApp)) {
|
||||
// OS handler share the same name, it's most likely the same app, skipping...
|
||||
if (handler.name == this._handlerInfo.defaultDescription) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user