mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
commit
0a1e0ca8a1
@ -267,6 +267,7 @@ var paymentDialogWrapper = {
|
||||
country = "",
|
||||
addressLines = [],
|
||||
region = "",
|
||||
regionCode = "",
|
||||
city = "",
|
||||
dependentLocality = "",
|
||||
postalCode = "",
|
||||
@ -286,6 +287,7 @@ var paymentDialogWrapper = {
|
||||
paymentAddress.init(country,
|
||||
addressLine,
|
||||
region,
|
||||
regionCode,
|
||||
city,
|
||||
dependentLocality,
|
||||
postalCode,
|
||||
|
@ -10,8 +10,10 @@ ac_add_options --enable-optimize
|
||||
ac_add_options --enable-clang-plugin
|
||||
|
||||
. $topsrcdir/build/win32/mozconfig.vs-latest
|
||||
# Regardless of what mozconfig.vs-latest sets, clang-plugin builds need to use
|
||||
# the Microsoft linker until at least bugs 1414287 and 1427808 are resolved.
|
||||
|
||||
# Regardless of what mozconfig.vs-latest sets, lld-link that comes with the old
|
||||
# clang version used for static analysis fails to link multiple things. So
|
||||
# until bug 1427808 is resolved, use the Microsoft linker.
|
||||
export LINKER=link
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -11,8 +11,10 @@ ac_add_options --enable-debug
|
||||
ac_add_options --enable-clang-plugin
|
||||
|
||||
. $topsrcdir/build/win32/mozconfig.vs-latest
|
||||
# Regardless of what mozconfig.vs-latest sets, clang-plugin builds need to use
|
||||
# the Microsoft linker until at least bugs 1414287 and 1427808 are resolved.
|
||||
|
||||
# Regardless of what mozconfig.vs-latest sets, lld-link that comes with the old
|
||||
# clang version used for static analysis fails to link multiple things. So
|
||||
# until bug 1427808 is resolved, use the Microsoft linker.
|
||||
export LINKER=link
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"llvm_revision": "317840",
|
||||
"stages": "3",
|
||||
"build_libcxx": false,
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
|
||||
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
|
||||
"lld_repo": "https://llvm.org/svn/llvm-project/lld/trunk",
|
||||
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
|
||||
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
|
||||
"python_path": "c:/mozilla-build/python/python.exe",
|
||||
"cc": "cl.exe",
|
||||
"cxx": "cl.exe",
|
||||
"patches": [
|
||||
"r318309.patch",
|
||||
"r320462.patch",
|
||||
"msvc-host-x64.patch",
|
||||
"aarch64-vastart-checking.patch",
|
||||
"loosen-msvc-detection.patch"
|
||||
]
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
When looking for a linker, 32-bit clang-cl.exe wants to use the 32-bit-native link.exe located in Hostx86/x86, but this executable does not exist in our releng package, because we only use 64-bit-host toolchains.
|
||||
|
||||
This patch makes clang-cl use the Hostx64/x86 linker instead. Ideally we wouldn't be using 32-bit clang-cl.exe in the first place. Bug 1414287 is on file to do so and remove this hack.
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp
|
||||
--- a/clang/lib/Driver/ToolChains/MSVC.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/MSVC.cpp
|
||||
@@ -817,8 +816,7 @@
|
||||
switch (Type) {
|
||||
case SubDirectoryType::Bin:
|
||||
if (VSLayout == ToolsetLayout::VS2017OrNewer) {
|
||||
- const bool HostIsX64 =
|
||||
- llvm::Triple(llvm::sys::getProcessTriple()).isArch64Bit();
|
||||
+ const bool HostIsX64 = true;
|
||||
const char *const HostName = HostIsX64 ? "HostX64" : "HostX86";
|
||||
llvm::sys::path::append(Path, "bin", HostName, SubdirName);
|
||||
} else { // OlderVS or DevDivInternal
|
@ -21,6 +21,9 @@ if [ -d "${VSPATH}" ]; then
|
||||
export WIN64_LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/10.0.17134.0/ucrt/x64:${VSPATH}/SDK/Lib/10.0.17134.0/um/x64:${VSPATH}/DIA SDK/lib/amd64"
|
||||
fi
|
||||
|
||||
ac_add_options --target=i686-pc-mingw32
|
||||
ac_add_options --host=x86_64-pc-mingw32
|
||||
|
||||
. $topsrcdir/build/mozconfig.vs-common
|
||||
|
||||
mk_export_correct_style WINDOWSSDKDIR
|
||||
|
@ -201,6 +201,13 @@ HOST_CFLAGS = $(COMPUTED_HOST_CFLAGS) $(_DEPEND_CFLAGS)
|
||||
HOST_CXXFLAGS = $(COMPUTED_HOST_CXXFLAGS) $(_DEPEND_CFLAGS)
|
||||
HOST_C_LDFLAGS = $(COMPUTED_HOST_C_LDFLAGS)
|
||||
HOST_CXX_LDFLAGS = $(COMPUTED_HOST_CXX_LDFLAGS)
|
||||
# Win32 Cross-builds on win64 need to override LIB when invoking the linker,
|
||||
# which we do for rust through cargo-linker.bat, so we abuse it here.
|
||||
# Ideally, we'd empty LIB and pass -LIBPATH options to the linker somehow but
|
||||
# we don't have this in place for rust, so...
|
||||
ifdef WIN64_CARGO_LINKER
|
||||
HOST_LINKER = $(topobjdir)/build/win64/cargo-linker.bat
|
||||
endif
|
||||
|
||||
ifdef MOZ_LTO
|
||||
ifeq (Darwin,$(OS_TARGET))
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h" // for nsAutoMicroTask
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/FeaturePolicyUtils.h"
|
||||
#include "mozilla/dom/PermissionMessageUtils.h"
|
||||
#include "mozilla/dom/PositionError.h"
|
||||
#include "mozilla/dom/PositionErrorBinding.h"
|
||||
@ -1161,6 +1162,23 @@ Geolocation::ShouldBlockInsecureRequests() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Geolocation::FeaturePolicyBlocked() const
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindowInner> win = do_QueryReferent(mOwner);
|
||||
if (!win) {
|
||||
return true;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = win->GetExtantDoc();
|
||||
if (!doc) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return FeaturePolicyUtils::IsFeatureAllowed(doc,
|
||||
NS_LITERAL_STRING("geolocation"));
|
||||
}
|
||||
|
||||
bool
|
||||
Geolocation::ClearPendingRequest(nsGeolocationRequest* aRequest)
|
||||
{
|
||||
@ -1221,7 +1239,8 @@ Geolocation::GetCurrentPosition(GeoPositionCallback callback,
|
||||
std::move(options), static_cast<uint8_t>(mProtocolType), target,
|
||||
false, EventStateManager::IsHandlingUserInput());
|
||||
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests()) {
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests() ||
|
||||
!FeaturePolicyBlocked()) {
|
||||
nsCOMPtr<nsIRunnable> ev = new RequestAllowEvent(false, request);
|
||||
target->Dispatch(ev.forget());
|
||||
return NS_OK;
|
||||
@ -1304,7 +1323,8 @@ Geolocation::WatchPosition(GeoPositionCallback aCallback,
|
||||
static_cast<uint8_t>(mProtocolType), target, true,
|
||||
EventStateManager::IsHandlingUserInput(), watchId);
|
||||
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests()) {
|
||||
if (!sGeoEnabled || ShouldBlockInsecureRequests() ||
|
||||
!FeaturePolicyBlocked()) {
|
||||
nsCOMPtr<nsIRunnable> ev = new RequestAllowEvent(false, request);
|
||||
target->Dispatch(ev.forget());
|
||||
return watchId;
|
||||
|
@ -207,6 +207,10 @@ private:
|
||||
// within a context that is not secure.
|
||||
bool ShouldBlockInsecureRequests() const;
|
||||
|
||||
// Return whather the Feature 'geolocation' is blocked by FeaturePolicy
|
||||
// directive.
|
||||
bool FeaturePolicyBlocked() const;
|
||||
|
||||
// Two callback arrays. The first |mPendingCallbacks| holds objects for only
|
||||
// one callback and then they are released/removed from the array. The second
|
||||
// |mWatchingCallbacks| holds objects until the object is explictly removed or
|
||||
|
@ -13,6 +13,7 @@ interface nsIPaymentAddress : nsISupports
|
||||
readonly attribute AString country;
|
||||
readonly attribute nsIArray addressLine;
|
||||
readonly attribute AString region;
|
||||
readonly attribute AString regionCode;
|
||||
readonly attribute AString city;
|
||||
readonly attribute AString dependentLocality;
|
||||
readonly attribute AString postalCode;
|
||||
@ -24,6 +25,7 @@ interface nsIPaymentAddress : nsISupports
|
||||
void init(in AString aCountry,
|
||||
in nsIArray aAddressLine,
|
||||
in AString aRegion,
|
||||
in AString aRegionCode,
|
||||
in AString aCity,
|
||||
in AString aDependentLocality,
|
||||
in AString aPostalCode,
|
||||
|
@ -36,6 +36,7 @@ namespace dom {
|
||||
#define Country NS_LITERAL_STRING("country")
|
||||
#define AddressLine NS_LITERAL_STRING("addressLine")
|
||||
#define Region NS_LITERAL_STRING("region")
|
||||
#define RegionCode NS_LITERAL_STRING("regionCode")
|
||||
#define City NS_LITERAL_STRING("city")
|
||||
#define DependentLocality NS_LITERAL_STRING("dependentLocality")
|
||||
#define PostalCode NS_LITERAL_STRING("postalCode")
|
||||
@ -114,6 +115,7 @@ bool IsAddressKey(const nsAString& aKey)
|
||||
return Country.Equals(aKey) ||
|
||||
AddressLine.Equals(aKey) ||
|
||||
Region.Equals(aKey) ||
|
||||
RegionCode.Equals(aKey) ||
|
||||
City.Equals(aKey) ||
|
||||
DependentLocality.Equals(aKey) ||
|
||||
PostalCode.Equals(aKey) ||
|
||||
@ -258,6 +260,7 @@ BasicCardService::EncodeBasicCardData(const nsAString& aCardholderName,
|
||||
}
|
||||
EncodeBasicCardProperty(AddressLine ,addressLineString , aResult);
|
||||
EncodeAddressProperty(aBillingAddress, Region, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, RegionCode, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, City, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, DependentLocality, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, PostalCode, aResult);
|
||||
@ -278,6 +281,7 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
nsTArray<nsString> addressLine;
|
||||
nsAutoString country;
|
||||
nsAutoString region;
|
||||
nsAutoString regionCode;
|
||||
nsAutoString city;
|
||||
nsAutoString dependentLocality;
|
||||
nsAutoString postalCode;
|
||||
@ -311,6 +315,7 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
|
||||
DecodeAddressProperty(key, value, Country, country);
|
||||
DecodeAddressProperty(key, value, Region, region);
|
||||
DecodeAddressProperty(key, value, RegionCode, regionCode);
|
||||
DecodeAddressProperty(key, value, City, city);
|
||||
DecodeAddressProperty(key, value, DependentLocality, dependentLocality);
|
||||
DecodeAddressProperty(key, value, PostalCode, postalCode);
|
||||
@ -332,6 +337,7 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
country,
|
||||
addressLine,
|
||||
region,
|
||||
regionCode,
|
||||
city,
|
||||
dependentLocality,
|
||||
postalCode,
|
||||
@ -379,6 +385,7 @@ BasicCardService::IsValidBasicCardErrors(JSContext* aCx,
|
||||
#undef Country
|
||||
#undef AddressLine
|
||||
#undef Region
|
||||
#undef RegionCode
|
||||
#undef City
|
||||
#undef DependentLocality
|
||||
#undef PostalCode
|
||||
|
@ -24,6 +24,7 @@ PaymentAddress::PaymentAddress(nsPIDOMWindowInner* aWindow,
|
||||
const nsAString& aCountry,
|
||||
const nsTArray<nsString>& aAddressLine,
|
||||
const nsAString& aRegion,
|
||||
const nsAString& aRegionCode,
|
||||
const nsAString& aCity,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
@ -34,6 +35,7 @@ PaymentAddress::PaymentAddress(nsPIDOMWindowInner* aWindow,
|
||||
: mCountry(aCountry)
|
||||
, mAddressLine(aAddressLine)
|
||||
, mRegion(aRegion)
|
||||
, mRegionCode(aRegionCode)
|
||||
, mCity(aCity)
|
||||
, mDependentLocality(aDependentLocality)
|
||||
, mPostalCode(aPostalCode)
|
||||
@ -63,6 +65,12 @@ PaymentAddress::GetRegion(nsAString& aRetVal) const
|
||||
aRetVal = mRegion;
|
||||
}
|
||||
|
||||
void
|
||||
PaymentAddress::GetRegionCode(nsAString& aRetVal) const
|
||||
{
|
||||
aRetVal = mRegionCode;
|
||||
}
|
||||
|
||||
void
|
||||
PaymentAddress::GetCity(nsAString& aRetVal) const
|
||||
{
|
||||
|
@ -24,6 +24,7 @@ public:
|
||||
const nsAString& aCountry,
|
||||
const nsTArray<nsString>& aAddressLine,
|
||||
const nsAString& aRegion,
|
||||
const nsAString& aRegionCode,
|
||||
const nsAString& aCity,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
@ -47,6 +48,8 @@ public:
|
||||
|
||||
void GetRegion(nsAString& aRetVal) const;
|
||||
|
||||
void GetRegionCode(nsAString& aRetVal) const;
|
||||
|
||||
void GetCity(nsAString& aRetVal) const;
|
||||
|
||||
void GetDependentLocality(nsAString& aRetVal) const;
|
||||
@ -67,6 +70,7 @@ private:
|
||||
nsString mCountry;
|
||||
nsTArray<nsString> mAddressLine;
|
||||
nsString mRegion;
|
||||
nsString mRegionCode;
|
||||
nsString mCity;
|
||||
nsString mDependentLocality;
|
||||
nsString mPostalCode;
|
||||
|
@ -1040,6 +1040,7 @@ nsresult
|
||||
PaymentRequest::UpdateShippingAddress(const nsAString& aCountry,
|
||||
const nsTArray<nsString>& aAddressLine,
|
||||
const nsAString& aRegion,
|
||||
const nsAString& aRegionCode,
|
||||
const nsAString& aCity,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
@ -1050,11 +1051,13 @@ PaymentRequest::UpdateShippingAddress(const nsAString& aCountry,
|
||||
{
|
||||
nsTArray<nsString> emptyArray;
|
||||
mShippingAddress = new PaymentAddress(GetOwner(), aCountry, emptyArray,
|
||||
aRegion, aCity, aDependentLocality,
|
||||
aPostalCode, aSortingCode,
|
||||
EmptyString(), EmptyString(), EmptyString());
|
||||
aRegion, aRegionCode, aCity,
|
||||
aDependentLocality, aPostalCode,
|
||||
aSortingCode, EmptyString(),
|
||||
EmptyString(), EmptyString());
|
||||
mFullShippingAddress = new PaymentAddress(GetOwner(), aCountry, aAddressLine,
|
||||
aRegion, aCity, aDependentLocality,
|
||||
aRegion, aRegionCode, aCity,
|
||||
aDependentLocality,
|
||||
aPostalCode, aSortingCode,
|
||||
aOrganization, aRecipient, aPhone);
|
||||
// Fire shippingaddresschange event
|
||||
|
@ -126,6 +126,7 @@ public:
|
||||
nsresult UpdateShippingAddress(const nsAString& aCountry,
|
||||
const nsTArray<nsString>& aAddressLine,
|
||||
const nsAString& aRegion,
|
||||
const nsAString& aRegionCode,
|
||||
const nsAString& aCity,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
|
@ -815,6 +815,7 @@ NS_IMETHODIMP
|
||||
PaymentAddress::Init(const nsAString& aCountry,
|
||||
nsIArray* aAddressLine,
|
||||
const nsAString& aRegion,
|
||||
const nsAString& aRegionCode,
|
||||
const nsAString& aCity,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
@ -826,6 +827,7 @@ PaymentAddress::Init(const nsAString& aCountry,
|
||||
mCountry = aCountry;
|
||||
mAddressLine = aAddressLine;
|
||||
mRegion = aRegion;
|
||||
mRegionCode = aRegionCode;
|
||||
mCity = aCity;
|
||||
mDependentLocality = aDependentLocality;
|
||||
mPostalCode = aPostalCode;
|
||||
@ -859,6 +861,13 @@ PaymentAddress::GetRegion(nsAString& aRegion)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PaymentAddress::GetRegionCode(nsAString& aRegionCode)
|
||||
{
|
||||
aRegionCode = mRegionCode;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PaymentAddress::GetCity(nsAString& aCity)
|
||||
{
|
||||
|
@ -287,6 +287,7 @@ private:
|
||||
nsString mCountry;
|
||||
nsCOMPtr<nsIArray> mAddressLine;
|
||||
nsString mRegion;
|
||||
nsString mRegionCode;
|
||||
nsString mCity;
|
||||
nsString mDependentLocality;
|
||||
nsString mPostalCode;
|
||||
|
@ -652,6 +652,7 @@ PaymentRequestManager::ChangeShippingAddress(PaymentRequest* aRequest,
|
||||
return aRequest->UpdateShippingAddress(aAddress.country(),
|
||||
aAddress.addressLine(),
|
||||
aAddress.region(),
|
||||
aAddress.regionCode(),
|
||||
aAddress.city(),
|
||||
aAddress.dependentLocality(),
|
||||
aAddress.postalCode(),
|
||||
|
@ -175,6 +175,7 @@ struct IPCPaymentAddress
|
||||
nsString country;
|
||||
nsString[] addressLine;
|
||||
nsString region;
|
||||
nsString regionCode;
|
||||
nsString city;
|
||||
nsString dependentLocality;
|
||||
nsString postalCode;
|
||||
|
@ -221,6 +221,10 @@ PaymentRequestParent::ChangeShippingAddress(const nsAString& aRequestId,
|
||||
rv = aAddress->GetRegion(region);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoString regionCode;
|
||||
rv = aAddress->GetRegionCode(regionCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoString city;
|
||||
rv = aAddress->GetCity(city);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -262,7 +266,7 @@ PaymentRequestParent::ChangeShippingAddress(const nsAString& aRequestId,
|
||||
addressLine.AppendElement(address);
|
||||
}
|
||||
|
||||
IPCPaymentAddress ipcAddress(country, addressLine, region, city,
|
||||
IPCPaymentAddress ipcAddress(country, addressLine, region, regionCode, city,
|
||||
dependentLocality, postalCode, sortingCode,
|
||||
organization, recipient, phone);
|
||||
|
||||
|
@ -34,6 +34,7 @@ function makeBillingAddress() {
|
||||
"USA", // country
|
||||
addressLine, // address line
|
||||
"CA", // region
|
||||
"CA", // regionCode
|
||||
"San Bruno", // city
|
||||
"", // dependent locality
|
||||
"94066", // postal code
|
||||
|
@ -17,9 +17,10 @@ const addressLine = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray
|
||||
const address = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
||||
address.data = "Easton Ave";
|
||||
addressLine.appendElement(address);
|
||||
billingAddress.init("USA", // country
|
||||
billingAddress.init("USA", // country
|
||||
addressLine, // address line
|
||||
"CA", // region
|
||||
"CA", // region code
|
||||
"San Bruno", // city
|
||||
"", // dependent locality
|
||||
"94066", // postal code
|
||||
|
@ -20,16 +20,17 @@ const addressLine = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray
|
||||
const address = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
||||
address.data = "Easton Ave";
|
||||
addressLine.appendElement(address);
|
||||
billingAddress.init("USA", // country
|
||||
billingAddress.init("USA", // country
|
||||
addressLine, // address line
|
||||
"CA", // region
|
||||
"CA", // region code
|
||||
"San Bruno", // city
|
||||
"", // dependent locality
|
||||
"94066", // postal code
|
||||
"123456", // sorting code
|
||||
"", // organization
|
||||
"Bill A. Pacheco", // recipient
|
||||
"+14344413879"); // phone
|
||||
"+14344413879"); // phone
|
||||
|
||||
function acceptPayment(requestId) {
|
||||
const basiccardResponseData = Cc["@mozilla.org/dom/payments/basiccard-response-data;1"].
|
||||
|
@ -20,6 +20,7 @@ addressLine.appendElement(address);
|
||||
shippingAddress.init("", // country
|
||||
addressLine, // address line
|
||||
"", // region
|
||||
"", // region code
|
||||
"", // city
|
||||
"", // dependent locality
|
||||
"", // postal code
|
||||
|
@ -20,16 +20,17 @@ const addressLine = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray
|
||||
const address = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
||||
address.data = "Easton Ave";
|
||||
addressLine.appendElement(address);
|
||||
billingAddress.init("USA", // country
|
||||
billingAddress.init("USA", // country
|
||||
addressLine, // address line
|
||||
"CA", // region
|
||||
"CA", // region code
|
||||
"San Bruno", // city
|
||||
"", // dependent locality
|
||||
"94066", // postal code
|
||||
"123456", // sorting code
|
||||
"", // organization
|
||||
"Bill A. Pacheco", // recipient
|
||||
"+14344413879"); // phone
|
||||
"+14344413879"); // phone
|
||||
|
||||
function acceptPayment(requestId, mode) {
|
||||
const basiccardResponseData = Cc["@mozilla.org/dom/payments/basiccard-response-data;1"].
|
||||
|
@ -26,6 +26,7 @@ addressLine.appendElement(address);
|
||||
shippingAddress.init("USA", // country
|
||||
addressLine, // address line
|
||||
"CA", // region
|
||||
"CA", // region code
|
||||
"San Bruno", // city
|
||||
"Test locality", // dependent locality
|
||||
"94066", // postal code
|
||||
|
@ -23,6 +23,7 @@ addressLine.appendElement(address);
|
||||
shippingAddress.init("USA", // country
|
||||
addressLine, // address line
|
||||
"CA", // region
|
||||
"CA", // region code
|
||||
"San Bruno", // city
|
||||
"Test locality", // dependent locality
|
||||
"94066", // postal code
|
||||
@ -122,6 +123,10 @@ function checkAddressErrors(errors) {
|
||||
emitTestFail("Expect shippingAddressErrors.region as 'region error', but got" +
|
||||
errors.region);
|
||||
}
|
||||
if (errors.regionCode != "regionCode error") {
|
||||
emitTestFail("Expect shippingAddressErrors.regionCode as 'regionCode error', but got" +
|
||||
errors.region);
|
||||
}
|
||||
if (errors.sortingCode != "sortingCode error") {
|
||||
emitTestFail("Expect shippingAddressErrors.sortingCode as 'sortingCode error', but got" +
|
||||
errors.sortingCode);
|
||||
|
@ -220,6 +220,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375345
|
||||
is(billingAddress.addressLine.length, 1, "addressLine.length should be 1.");
|
||||
is(billingAddress.addressLine[0], "Easton Ave", "addressLine[0] should be 'Easton Ave'.");
|
||||
is(billingAddress.region, "CA", "region should be 'CA'.");
|
||||
is(billingAddress.regionCode, "CA", "regionCode should be 'CA'.");
|
||||
is(billingAddress.city, "San Bruno", "city should be 'San Bruno'.");
|
||||
is(billingAddress.dependentLocality, "", "dependentLocality should be empty.");
|
||||
is(billingAddress.postalCode, "94066", "postalCode should be '94066'.");
|
||||
|
@ -31,7 +31,6 @@ static FeatureMap sSupportedFeatures[] = {
|
||||
{ "camera", FeatureMap::eAll },
|
||||
{ "encrypted-media", FeatureMap::eAll },
|
||||
{ "fullscreen", FeatureMap::eAll },
|
||||
// TODO: not supported yet!!!
|
||||
{ "geolocation", FeatureMap::eAll },
|
||||
// TODO: not supported yet!!!
|
||||
{ "microphone", FeatureMap::eAll },
|
||||
|
47
dom/tests/mochitest/geolocation/file_featurePolicy.html
Normal file
47
dom/tests/mochitest/geolocation/file_featurePolicy.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="geolocation_common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
resume_geolocationProvider(function() {
|
||||
force_prompt(true, test_currentPosition);
|
||||
});
|
||||
|
||||
let tests = [];
|
||||
|
||||
function test_currentPosition() {
|
||||
navigator.geolocation.getCurrentPosition(() => {
|
||||
tests.push("allowed");
|
||||
test_watchPosition();
|
||||
}, () => {
|
||||
tests.push("denied");
|
||||
test_watchPosition();
|
||||
})
|
||||
}
|
||||
|
||||
function test_watchPosition() {
|
||||
navigator.geolocation.watchPosition(() => {
|
||||
tests.push("allowed");
|
||||
send_results();
|
||||
}, () => {
|
||||
tests.push("denied");
|
||||
send_results();
|
||||
});
|
||||
}
|
||||
|
||||
function send_results() {
|
||||
if (tests.length != 2 || tests[0] != tests[1]) {
|
||||
parent.continueTest("error");
|
||||
return;
|
||||
}
|
||||
|
||||
parent.continueTest(tests[0]);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -29,6 +29,8 @@ support-files = test_geolocation_is_undefined_when_pref_is_off_iframe.html
|
||||
[test_timerRestartWatch.html]
|
||||
[test_windowClose.html]
|
||||
[test_worseAccuracyDoesNotBlockCallback.html]
|
||||
[test_featurePolicy.html]
|
||||
support-files = file_featurePolicy.html
|
||||
|
||||
# This test REQUIRES to run on HTTP (_NOT_ HTTPS).
|
||||
[test_geoWatchPositionBlockedInInsecureContext.html]
|
||||
|
51
dom/tests/mochitest/geolocation/test_featurePolicy.html
Normal file
51
dom/tests/mochitest/geolocation/test_featurePolicy.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for geolocation + featurePolicy</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var tests = [
|
||||
[ "geolocation 'none'", "denied"],
|
||||
[ "geolocation", "allowed"],
|
||||
[ "geolocation 'src'", "allowed"],
|
||||
[ "geolocation 'self'", "allowed"],
|
||||
[ "geolocation *", "allowed"],
|
||||
[ "geolocation http://random.net", "denied"],
|
||||
[ null, "allowed" ],
|
||||
];
|
||||
|
||||
function nextTest() {
|
||||
if (tests.length == 0) {
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
let test = tests.shift();
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
if (test[0]) {
|
||||
iframe.setAttribute("allow", test[0]);
|
||||
}
|
||||
|
||||
window.continueTest = msg => {
|
||||
delete window.continueTest;
|
||||
|
||||
is(msg, test[1], "Expected " + test[1] + " for " + test[0]);
|
||||
document.body.removeChild(iframe);
|
||||
SimpleTest.executeSoon(nextTest);
|
||||
};
|
||||
|
||||
iframe.src = "file_featurePolicy.html";
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.security.featurePolicy.enabled", true]]}).then(nextTest);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -21,6 +21,7 @@ interface PaymentAddress {
|
||||
[Frozen, Cached, Pure]
|
||||
readonly attribute sequence<DOMString> addressLine;
|
||||
readonly attribute DOMString region;
|
||||
readonly attribute DOMString regionCode;
|
||||
readonly attribute DOMString city;
|
||||
readonly attribute DOMString dependentLocality;
|
||||
readonly attribute DOMString postalCode;
|
||||
|
@ -90,6 +90,7 @@ struct BlobItemData
|
||||
|
||||
// XXX: only used for debugging
|
||||
bool mInvalid;
|
||||
bool mInvalidRegion;
|
||||
bool mEmpty;
|
||||
|
||||
// properties that are used to emulate layer tree invalidation
|
||||
@ -107,6 +108,7 @@ struct BlobItemData
|
||||
, mOpacity(0.0)
|
||||
{
|
||||
mInvalid = false;
|
||||
mInvalidRegion = false;
|
||||
mEmpty = false;
|
||||
mDisplayItemKey = aItem->GetPerFrameKey();
|
||||
AddFrame(aItem->Frame());
|
||||
@ -411,6 +413,7 @@ struct DIGroup
|
||||
/*if (aItem->IsReused() && aData->mGeometry) {
|
||||
return;
|
||||
}*/
|
||||
aData->mInvalidRegion = false;
|
||||
|
||||
GP("pre mInvalidRect: %s %p-%d - inv: %d %d %d %d\n", aItem->Name(), aItem->Frame(), aItem->GetPerFrameKey(),
|
||||
mInvalidRect.x, mInvalidRect.y, mInvalidRect.width, mInvalidRect.height);
|
||||
@ -489,6 +492,7 @@ struct DIGroup
|
||||
aData->mRect = transformedRect.Intersect(imageRect);
|
||||
|
||||
aData->mInvalid = true;
|
||||
aData->mInvalidRegion = true;
|
||||
} else {
|
||||
if (aData->mClip != clip) {
|
||||
UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
|
||||
@ -743,9 +747,9 @@ struct DIGroup
|
||||
const Matrix4x4Flagged& t = transformItem->GetTransform();
|
||||
Matrix t2d;
|
||||
bool is2D = t.Is2D(&t2d);
|
||||
gfxCriticalError() << "DisplayItemTransform-" << is2D << "-should-be-invalid";
|
||||
gfxCriticalError() << "DisplayItemTransform-" << is2D << "-region-" << data->mInvalidRegion << "-should-be-invalid";
|
||||
} else {
|
||||
gfxCriticalError() << "DisplayItem" << item->Name() << "should be invalid";
|
||||
gfxCriticalError() << "DisplayItem" << item->Name() << "-region-" << data->mInvalidRegion << "-should be invalid";
|
||||
}
|
||||
}
|
||||
// if the item is invalid it needs to be fully contained
|
||||
|
@ -39,7 +39,7 @@ transform(qcms_profile* src_profile, qcms_profile* dst_profile, size_t size)
|
||||
qcms_intent intent = qcms_profile_get_rendering_intent(src_profile);
|
||||
// Firefox calls this on the display profile to increase performance.
|
||||
// Skip with low probability to increase coverage.
|
||||
if (size % 0x10) {
|
||||
if (size % 15) {
|
||||
qcms_profile_precache_output_transform(dst_profile);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -280,7 +280,7 @@ qcms_bool qcms_profile_is_bogus(qcms_profile *profile)
|
||||
if (profile->color_space != RGB_SIGNATURE)
|
||||
return false;
|
||||
|
||||
if (profile->A2B0 || profile->B2A0)
|
||||
if (profile->A2B0 || profile->B2A0 || profile->mAB || profile->mBA)
|
||||
return false;
|
||||
|
||||
rX = s15Fixed16Number_to_float(profile->redColorant.X);
|
||||
@ -929,6 +929,7 @@ qcms_profile* qcms_profile_create_rgb_with_gamma(
|
||||
profile->class = DISPLAY_DEVICE_PROFILE;
|
||||
profile->rendering_intent = QCMS_INTENT_PERCEPTUAL;
|
||||
profile->color_space = RGB_SIGNATURE;
|
||||
profile->pcs = XYZ_SIGNATURE;
|
||||
return profile;
|
||||
}
|
||||
|
||||
@ -958,6 +959,7 @@ qcms_profile* qcms_profile_create_rgb_with_table(
|
||||
profile->class = DISPLAY_DEVICE_PROFILE;
|
||||
profile->rendering_intent = QCMS_INTENT_PERCEPTUAL;
|
||||
profile->color_space = RGB_SIGNATURE;
|
||||
profile->pcs = XYZ_SIGNATURE;
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- bindings.rs
|
||||
+++ bindings.rs
|
||||
@@ -1017,7 +1023,7 @@
|
||||
sampler: Some(Box::new(SamplerCallback::new(window_id))),
|
||||
max_texture_size: Some(8192), // Moz2D doesn't like textures bigger than this
|
||||
clear_color: Some(ColorF::new(0.0, 0.0, 0.0, 0.0)),
|
||||
- precache_shaders: env_var_to_bool("MOZ_WR_PRECACHE_SHADERS"),
|
||||
+ precache_flags,
|
||||
..Default::default()
|
||||
};
|
||||
|
@ -48,8 +48,8 @@ jobs:
|
||||
- builds/taskcluster_base_win32.py
|
||||
- builds/taskcluster_sub_win32/clang_debug.py
|
||||
toolchains:
|
||||
- win32-clang-cl-st-an
|
||||
- win32-rust
|
||||
- win64-clang-cl-st-an
|
||||
- win64-rust
|
||||
- win64-cbindgen
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
@ -79,8 +79,8 @@ jobs:
|
||||
- builds/taskcluster_base_win32.py
|
||||
- builds/taskcluster_sub_win32/clang.py
|
||||
toolchains:
|
||||
- win32-clang-cl-st-an
|
||||
- win32-rust
|
||||
- win64-clang-cl-st-an
|
||||
- win64-rust
|
||||
- win64-cbindgen
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
|
@ -23,27 +23,6 @@ win64-clang-cl:
|
||||
- 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
|
||||
toolchain-artifact: public/build/clang.tar.bz2
|
||||
|
||||
win32-clang-cl-st-an:
|
||||
description: "Clang-cl static analysis toolchain build"
|
||||
treeherder:
|
||||
kind: build
|
||||
platform: toolchains/opt
|
||||
symbol: TW32(clang-cl-st-an)
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: build-clang32-st-an-windows.sh
|
||||
resources:
|
||||
- 'build/build-clang/build-clang.py'
|
||||
- 'build/build-clang/clang-win32-st-an.json'
|
||||
- 'taskcluster/scripts/misc/build-clang-windows-helper32.sh'
|
||||
toolchain-artifact: public/build/clang.tar.bz2
|
||||
|
||||
win64-clang-cl-st-an:
|
||||
description: "Clang-cl static analysis toolchain build"
|
||||
treeherder:
|
||||
@ -209,30 +188,6 @@ win64-node:
|
||||
arguments: ['win64']
|
||||
toolchain-artifact: public/build/node.tar.bz2
|
||||
|
||||
win32-rust-1.29:
|
||||
description: "rust repack"
|
||||
treeherder:
|
||||
kind: build
|
||||
platform: toolchains/opt
|
||||
symbol: TW32(rust)
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
docker-image: {in-tree: toolchain-build}
|
||||
max-run-time: 7200
|
||||
env:
|
||||
UPLOAD_DIR: artifacts
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: repack_rust.py
|
||||
arguments: [
|
||||
'--channel', '1.29.0',
|
||||
'--host', 'i686-pc-windows-msvc',
|
||||
'--target', 'i686-pc-windows-msvc',
|
||||
]
|
||||
toolchain-alias: win32-rust
|
||||
toolchain-artifact: public/build/rustc.tar.bz2
|
||||
|
||||
mingw32-rust-1.29:
|
||||
description: "rust repack"
|
||||
treeherder:
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source build/src/taskcluster/scripts/misc/build-clang-windows-helper32.sh clang-win32-st-an.json
|
@ -179,7 +179,8 @@
|
||||
if not e10s: FAIL
|
||||
|
||||
[PaymentAddress interface: attribute regionCode]
|
||||
expected: FAIL
|
||||
expected:
|
||||
if not e10s: FAIL
|
||||
|
||||
[PaymentAddress interface: attribute sortingCode]
|
||||
expected:
|
||||
|
@ -440,7 +440,8 @@
|
||||
if not e10s: FAIL
|
||||
|
||||
[PaymentAddress interface: attribute regionCode]
|
||||
expected: FAIL
|
||||
expected:
|
||||
if not e10s: FAIL
|
||||
|
||||
[PaymentRequest interface: operation show([object Object\])]
|
||||
expected:
|
||||
|
Loading…
Reference in New Issue
Block a user