Merge autoland to mozilla-central. a=merge
|
@ -434,7 +434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cexpr 0.6.999",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
|
@ -697,18 +697,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cexpr"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db507a7679252d2276ed0dd8113c6875ec56d3089f9225b2b42c30cc1f8e5c89"
|
||||
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
||||
dependencies = [
|
||||
"nom 6.1.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cexpr"
|
||||
version = "0.6.999"
|
||||
dependencies = [
|
||||
"cexpr 0.5.0",
|
||||
"nom 7.1.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1460,6 +1453,13 @@ dependencies = [
|
|||
"smallbitvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dom"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.8"
|
||||
|
@ -2077,6 +2077,7 @@ dependencies = [
|
|||
"bincode",
|
||||
"cssparser",
|
||||
"cstr",
|
||||
"dom",
|
||||
"gecko-profiler",
|
||||
"libc",
|
||||
"log",
|
||||
|
@ -2162,6 +2163,7 @@ dependencies = [
|
|||
"cubeb-coreaudio",
|
||||
"cubeb-pulse",
|
||||
"cubeb-sys",
|
||||
"dom",
|
||||
"encoding_glue",
|
||||
"fluent",
|
||||
"fluent-fallback",
|
||||
|
@ -3126,6 +3128,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"app_units",
|
||||
"cssparser",
|
||||
"dom",
|
||||
"euclid",
|
||||
"selectors",
|
||||
"servo_arc",
|
||||
|
@ -4996,6 +4999,7 @@ dependencies = [
|
|||
"byteorder",
|
||||
"cssparser",
|
||||
"derive_more",
|
||||
"dom",
|
||||
"euclid",
|
||||
"fxhash",
|
||||
"gecko-profiler",
|
||||
|
|
|
@ -41,6 +41,7 @@ exclude = [
|
|||
"xpcom/rust/gkrust_utils",
|
||||
"tools/lint/test/files/clippy",
|
||||
"tools/fuzzing/rust",
|
||||
"dom/base/rust",
|
||||
"dom/origin-trials/ffi",
|
||||
]
|
||||
|
||||
|
@ -93,9 +94,6 @@ mozbuild = { path = "build/rust/mozbuild" }
|
|||
# Patch itoa 0.4 to 1.0.
|
||||
itoa = { path = "build/rust/itoa" }
|
||||
|
||||
# Patch cexpr 0.6 down to cexpr 0.5, which is enough for bindgen 0.59's needs and avoids pulling another version of nom.
|
||||
cexpr = { path = "build/rust/cexpr" }
|
||||
|
||||
# Patch bindgen 0.56 to 0.59.
|
||||
bindgen = { path = "build/rust/bindgen" }
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/EditorBase.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/HTMLEditor.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/StaticPrefs_accessibility.h"
|
||||
|
@ -864,16 +863,16 @@ void DocAccessible::ContentAppended(nsIContent* aFirstNewContent) {
|
|||
MaybeHandleChangeToHiddenNameOrDescription(aFirstNewContent);
|
||||
}
|
||||
|
||||
void DocAccessible::ContentStateChanged(dom::Document* aDocument,
|
||||
nsIContent* aContent,
|
||||
EventStates aStateMask) {
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_READWRITE) &&
|
||||
aContent == mDocumentNode->GetRootElement()) {
|
||||
void DocAccessible::ElementStateChanged(dom::Document* aDocument,
|
||||
dom::Element* aElement,
|
||||
dom::ElementState aStateMask) {
|
||||
if (aStateMask.HasState(dom::ElementState::READWRITE) &&
|
||||
aElement == mDocumentNode->GetRootElement()) {
|
||||
// This handles changes to designMode. contentEditable is handled by
|
||||
// LocalAccessible::AttributeChangesState and
|
||||
// LocalAccessible::DOMAttributeChanged.
|
||||
const bool isEditable =
|
||||
aContent->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE);
|
||||
aElement->State().HasState(dom::ElementState::READWRITE);
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(this, states::EDITABLE, isEditable);
|
||||
FireDelayedEvent(event);
|
||||
|
@ -881,14 +880,14 @@ void DocAccessible::ContentStateChanged(dom::Document* aDocument,
|
|||
FireDelayedEvent(event);
|
||||
}
|
||||
|
||||
LocalAccessible* accessible = GetAccessible(aContent);
|
||||
LocalAccessible* accessible = GetAccessible(aElement);
|
||||
if (!accessible) return;
|
||||
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_CHECKED)) {
|
||||
if (aStateMask.HasState(dom::ElementState::CHECKED)) {
|
||||
LocalAccessible* widget = accessible->ContainerWidget();
|
||||
if (widget && widget->IsSelect()) {
|
||||
AccSelChangeEvent::SelChangeType selChangeType =
|
||||
aContent->AsElement()->State().HasState(NS_EVENT_STATE_CHECKED)
|
||||
aElement->State().HasState(dom::ElementState::CHECKED)
|
||||
? AccSelChangeEvent::eSelectionAdd
|
||||
: AccSelChangeEvent::eSelectionRemove;
|
||||
RefPtr<AccEvent> event =
|
||||
|
@ -899,31 +898,32 @@ void DocAccessible::ContentStateChanged(dom::Document* aDocument,
|
|||
|
||||
RefPtr<AccEvent> event = new AccStateChangeEvent(
|
||||
accessible, states::CHECKED,
|
||||
aContent->AsElement()->State().HasState(NS_EVENT_STATE_CHECKED));
|
||||
aElement->State().HasState(dom::ElementState::CHECKED));
|
||||
FireDelayedEvent(event);
|
||||
}
|
||||
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_INVALID)) {
|
||||
if (aStateMask.HasState(dom::ElementState::INVALID)) {
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(accessible, states::INVALID, true);
|
||||
FireDelayedEvent(event);
|
||||
}
|
||||
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_REQUIRED)) {
|
||||
if (aStateMask.HasState(dom::ElementState::REQUIRED)) {
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(accessible, states::REQUIRED);
|
||||
FireDelayedEvent(event);
|
||||
}
|
||||
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_VISITED)) {
|
||||
if (aStateMask.HasState(dom::ElementState::VISITED)) {
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(accessible, states::TRAVERSED, true);
|
||||
FireDelayedEvent(event);
|
||||
}
|
||||
|
||||
// We only expose NS_EVENT_STATE_DEFAULT on buttons, but we can get
|
||||
// We only expose dom::ElementState::DEFAULT on buttons, but we can get
|
||||
// notifications for other controls like checkboxes.
|
||||
if (aStateMask.HasState(NS_EVENT_STATE_DEFAULT) && accessible->IsButton()) {
|
||||
if (aStateMask.HasState(dom::ElementState::DEFAULT) &&
|
||||
accessible->IsButton()) {
|
||||
RefPtr<AccEvent> event =
|
||||
new AccStateChangeEvent(accessible, states::DEFAULT);
|
||||
FireDelayedEvent(event);
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/BinarySearch.h"
|
||||
#include "mozilla/EditorBase.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/HTMLEditor.h"
|
||||
#include "mozilla/IntegerRange.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
|
@ -188,7 +187,7 @@ role HyperTextAccessible::NativeRole() const {
|
|||
uint64_t HyperTextAccessible::NativeState() const {
|
||||
uint64_t states = AccessibleWrap::NativeState();
|
||||
|
||||
if (mContent->AsElement()->State().HasState(NS_EVENT_STATE_READWRITE)) {
|
||||
if (mContent->AsElement()->State().HasState(dom::ElementState::READWRITE)) {
|
||||
states |= states::EDITABLE;
|
||||
|
||||
} else if (mContent->IsHTMLElement(nsGkAtoms::article)) {
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
#include "mozilla/BasicEvents.h"
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
|
@ -393,11 +392,13 @@ uint64_t LocalAccessible::NativeState() const {
|
|||
if (!IsInDocument()) state |= states::STALE;
|
||||
|
||||
if (HasOwnContent() && mContent->IsElement()) {
|
||||
EventStates elementState = mContent->AsElement()->State();
|
||||
dom::ElementState elementState = mContent->AsElement()->State();
|
||||
|
||||
if (elementState.HasState(NS_EVENT_STATE_INVALID)) state |= states::INVALID;
|
||||
if (elementState.HasState(dom::ElementState::INVALID)) {
|
||||
state |= states::INVALID;
|
||||
}
|
||||
|
||||
if (elementState.HasState(NS_EVENT_STATE_REQUIRED)) {
|
||||
if (elementState.HasState(dom::ElementState::REQUIRED)) {
|
||||
state |= states::REQUIRED;
|
||||
}
|
||||
|
||||
|
|
|
@ -701,7 +701,7 @@ class LocalAccessible : public nsISupports, public Accessible {
|
|||
* Return true if the accessible state change is processed by handling proper
|
||||
* DOM UI event, if otherwise then false. For example, CheckboxAccessible
|
||||
* created for HTML:input@type="checkbox" will process
|
||||
* nsIDocumentObserver::ContentStateChanged instead of 'CheckboxStateChange'
|
||||
* nsIDocumentObserver::ElementStateChanged instead of 'CheckboxStateChange'
|
||||
* event.
|
||||
*/
|
||||
bool NeedsDOMUIEvent() const { return !(mStateFlags & eIgnoreDOMUIEvent); }
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
||||
#include "mozilla/EditorBase.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/TextEditor.h"
|
||||
|
@ -181,8 +180,8 @@ uint64_t HTMLButtonAccessible::State() {
|
|||
uint64_t HTMLButtonAccessible::NativeState() const {
|
||||
uint64_t state = HyperTextAccessibleWrap::NativeState();
|
||||
|
||||
EventStates elmState = mContent->AsElement()->State();
|
||||
if (elmState.HasState(NS_EVENT_STATE_DEFAULT)) state |= states::DEFAULT;
|
||||
ElementState elmState = mContent->AsElement()->State();
|
||||
if (elmState.HasState(ElementState::DEFAULT)) state |= states::DEFAULT;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "States.h"
|
||||
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/MutationEventBinding.h"
|
||||
|
||||
|
@ -39,10 +38,12 @@ uint64_t HTMLLinkAccessible::NativeState() const {
|
|||
}
|
||||
|
||||
uint64_t HTMLLinkAccessible::NativeLinkState() const {
|
||||
EventStates eventState = mContent->AsElement()->State();
|
||||
if (eventState.HasState(NS_EVENT_STATE_UNVISITED)) return states::LINKED;
|
||||
dom::ElementState state = mContent->AsElement()->State();
|
||||
if (state.HasState(dom::ElementState::UNVISITED)) {
|
||||
return states::LINKED;
|
||||
}
|
||||
|
||||
if (eventState.HasState(NS_EVENT_STATE_VISITED)) {
|
||||
if (state.HasState(dom::ElementState::VISITED)) {
|
||||
return states::LINKED | states::TRAVERSED;
|
||||
}
|
||||
|
||||
|
@ -128,7 +129,6 @@ already_AddRefed<nsIURI> HTMLLinkAccessible::AnchorURIAt(
|
|||
// HTMLLinkAccessible
|
||||
|
||||
bool HTMLLinkAccessible::IsLinked() const {
|
||||
EventStates state = mContent->AsElement()->State();
|
||||
return state.HasAtLeastOneOfStates(NS_EVENT_STATE_VISITED |
|
||||
NS_EVENT_STATE_UNVISITED);
|
||||
dom::ElementState state = mContent->AsElement()->State();
|
||||
return state.HasAtLeastOneOfStates(dom::ElementState::VISITED_OR_UNVISITED);
|
||||
}
|
||||
|
|
|
@ -36,11 +36,6 @@ var gExceptionPaths = [
|
|||
"chrome://browser/content/preferences/more-from-mozilla-qr-code-advanced.svg",
|
||||
"chrome://browser/content/assets/klar-qr-code.svg",
|
||||
|
||||
// These app marketplace icons are referenced based on the user's locale
|
||||
// in browser/components/newtab/content-src/aboutwelcome/components/MobileDownloads.jsx
|
||||
"chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en-US/ios.svg",
|
||||
"chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en-US/android.png",
|
||||
|
||||
// toolkit/components/pdfjs/content/build/pdf.js
|
||||
"resource://pdf.js/web/images/",
|
||||
|
||||
|
|
|
@ -621,48 +621,11 @@ body[lwt-newtab-brighttext] {
|
|||
background: none;
|
||||
}
|
||||
.onboardingContainer .mobile-downloads .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en/ios.svg");
|
||||
background-image: url("chrome://app-marketplace-icons/locale/ios.svg");
|
||||
}
|
||||
.onboardingContainer .mobile-downloads .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en/android.png");
|
||||
background-image: url("chrome://app-marketplace-icons/locale/android.png");
|
||||
}
|
||||
:root[lang|=de] .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/de/ios.svg");
|
||||
}
|
||||
:root[lang|=de] .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/de/android.png");
|
||||
}
|
||||
:root[lang|=es] .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/es/ios.svg");
|
||||
}
|
||||
:root[lang|=es] .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/es/android.png");
|
||||
}
|
||||
:root[lang|=fr] .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/fr/ios.svg");
|
||||
}
|
||||
:root[lang|=fr] .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/fr/android.png");
|
||||
}
|
||||
:root[lang|=pt] .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/pt/ios.svg");
|
||||
}
|
||||
:root[lang|=pt] .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/pt/android.png");
|
||||
}
|
||||
:root[lang|=ru] .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/ru/ios.svg");
|
||||
}
|
||||
:root[lang|=ru] .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/ru/android.png");
|
||||
}
|
||||
:root[lang|=zh] .ios button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/zh/ios.svg");
|
||||
}
|
||||
:root[lang|=zh] .android button {
|
||||
background-image: url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/zh/android.png");
|
||||
}
|
||||
|
||||
.onboardingContainer .mobile-download-buttons {
|
||||
list-style: none;
|
||||
padding: 10px 0;
|
||||
|
|
|
@ -750,80 +750,11 @@ body {
|
|||
}
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en/ios.svg');
|
||||
background-image: url('chrome://app-marketplace-icons/locale/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en/android.png');
|
||||
}
|
||||
|
||||
@at-root:root {
|
||||
|
||||
&[lang|='de'] {
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/de/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/de/android.png');
|
||||
}
|
||||
}
|
||||
|
||||
&[lang|='es'] {
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/es/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/es/android.png');
|
||||
}
|
||||
}
|
||||
|
||||
&[lang|='fr'] {
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/fr/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/fr/android.png');
|
||||
}
|
||||
}
|
||||
|
||||
&[lang|='pt'] {
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/pt/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/pt/android.png');
|
||||
}
|
||||
}
|
||||
|
||||
&[lang|='ru'] {
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/ru/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/ru/android.png');
|
||||
}
|
||||
}
|
||||
|
||||
&[lang|='zh'] {
|
||||
|
||||
.ios button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/zh/ios.svg');
|
||||
}
|
||||
|
||||
.android button {
|
||||
background-image: url('chrome://activity-stream/content/data/content/assets/app-marketplace-icons/zh/android.png');
|
||||
}
|
||||
}
|
||||
background-image: url('chrome://app-marketplace-icons/locale/android.png');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,83 +141,3 @@ add_task(async function test_aboutwelcome_localized_qr_override() {
|
|||
|
||||
setLocale("en-US"); // revert locale change
|
||||
});
|
||||
|
||||
/**
|
||||
* Test rendering localized app marketplace buttons for supported locale
|
||||
*/
|
||||
add_task(async function test_aboutwelcome_localized_marketplace_buttons() {
|
||||
const TEST_LOCALE = "es-ES";
|
||||
setLocale(TEST_LOCALE);
|
||||
|
||||
const TEST_JSON = JSON.stringify([BASE_CONTENT]);
|
||||
let browser = await openAboutWelcome(TEST_JSON);
|
||||
|
||||
await test_element_styles(
|
||||
browser,
|
||||
"li.ios button",
|
||||
// Expected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/es/ios.svg")`,
|
||||
},
|
||||
// Unexpected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en/ios.svg")`,
|
||||
}
|
||||
);
|
||||
|
||||
await test_element_styles(
|
||||
browser,
|
||||
"li.android button",
|
||||
// Expected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/es/android.png")`,
|
||||
},
|
||||
// Unexpected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/en/android.png")`,
|
||||
}
|
||||
);
|
||||
|
||||
setLocale("en-US"); // revert locale change
|
||||
});
|
||||
|
||||
/**
|
||||
* Test rendering default en-US marketplace buttons for unsupported locale
|
||||
*/
|
||||
add_task(async function test_aboutwelcome_fallback_marketplace_buttons() {
|
||||
const TEST_LOCALE = "mt-MT";
|
||||
setLocale(TEST_LOCALE);
|
||||
|
||||
const FALLBACK_LANGUAGE = "en";
|
||||
const MISSING_LANGUAGE = "mt";
|
||||
const TEST_JSON = JSON.stringify([BASE_CONTENT]);
|
||||
let browser = await openAboutWelcome(TEST_JSON);
|
||||
|
||||
await test_element_styles(
|
||||
browser,
|
||||
"li.ios button",
|
||||
// Expected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/${FALLBACK_LANGUAGE}/ios.svg")`,
|
||||
},
|
||||
// Unexpected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/${MISSING_LANGUAGE}/ios.svg")`,
|
||||
}
|
||||
);
|
||||
|
||||
await test_element_styles(
|
||||
browser,
|
||||
"li.android button",
|
||||
// Expected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/${FALLBACK_LANGUAGE}/android.png")`,
|
||||
},
|
||||
// Unexpected styles:
|
||||
{
|
||||
"background-image": `url("chrome://activity-stream/content/data/content/assets/app-marketplace-icons/${MISSING_LANGUAGE}/android.png")`,
|
||||
}
|
||||
);
|
||||
|
||||
setLocale("en-US"); // revert locale change
|
||||
});
|
||||
|
|
|
@ -49,6 +49,7 @@ l10n-%: AB_CD=$*
|
|||
l10n-%:
|
||||
$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
|
||||
$(NSINSTALL) -D $(DIST)/install
|
||||
@$(MAKE) -C ../themes/shared/app-marketplace-icons AB_CD=$* XPI_NAME=locale-$*
|
||||
@$(MAKE) -C ../../toolkit/locales l10n-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
|
||||
@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
|
||||
@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
|
||||
|
@ -66,6 +67,7 @@ chrome-%: AB_CD=$*
|
|||
chrome-%: IS_LANGUAGE_REPACK=1
|
||||
chrome-%:
|
||||
$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
|
||||
@$(MAKE) -C ../themes/shared/app-marketplace-icons chrome AB_CD=$*
|
||||
@$(MAKE) -C ../../toolkit/locales chrome-$*
|
||||
@$(MAKE) -C ../../services/sync/locales chrome AB_CD=$*
|
||||
@$(MAKE) -C ../../extensions/spellcheck/locales chrome AB_CD=$*
|
||||
|
|
|
@ -38,9 +38,7 @@ elif toolkit == "gtk":
|
|||
else:
|
||||
DIRS += ["windows"]
|
||||
|
||||
DIRS += [
|
||||
"addons",
|
||||
]
|
||||
DIRS += ["addons", "shared/app-marketplace-icons"]
|
||||
|
||||
with Files("osx/**"):
|
||||
SCHEDULES.exclusive = ["macosx"]
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# Note: `Makefile.in` is not allowed to modify `DEFINES`, so we modify
|
||||
# `MAKE_JAR_FLAGS` directly.
|
||||
|
||||
# Note: we use 'es-ES' badge for all Spanish locales like in Bedrock.
|
||||
# See https://github.com/mozilla/bedrock/blob/67fd925b4d621dde0e48e27738c4b9c397ac5169/bedrock/mozorg/templatetags/misc.py#L58.
|
||||
|
||||
# Note: it's probably possible to format these lists so they're easier to
|
||||
# modify.
|
||||
|
||||
ifneq (,$(filter es%,$(AB_CD)))
|
||||
MAKE_JARS_FLAGS += -DANDROID_MARKETPLACE_AB_CD=es-ES
|
||||
MAKE_JARS_FLAGS += -DIOS_MARKETPLACE_AB_CD=es-ES
|
||||
else
|
||||
ifneq (,$(filter $(AB_CD),af ar az be bg bn-BD bn-IN ca cs da de el es-ES et eu fa fi fr gl gu-IN he hi-IN hr hu hy-AM id is it ja ka kk km kn ko lo lt lv mk ml mr ms my nb-NO ne-NP nl nn-NO pa-IN pl pt-BR pt-PT ro ru si sk sl sq sr sv-SE sw ta te th tr uk ur uz vi zh-CN zh-TW zu))
|
||||
MAKE_JARS_FLAGS += -DANDROID_MARKETPLACE_AB_CD=$(AB_CD)
|
||||
endif # Android, does not start with es.
|
||||
ifneq (,$(filter $(AB_CD),ar az bg cs da de el es-ES et fi fr he hu id it ja ko lt lv ms mt nb-NO nl nn-NO pl pt-BR pt-PT ro ru sk sl sv-SE th tr vi zh-CN zh-TW))
|
||||
MAKE_JARS_FLAGS += -DIOS_MARKETPLACE_AB_CD=$(AB_CD)
|
||||
endif # iOS, does not start with es.
|
||||
endif # starts with es.
|
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 7.2 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 7.6 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 6.2 KiB |
После Ширина: | Высота: | Размер: 4.2 KiB |
После Ширина: | Высота: | Размер: 4.2 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 7.2 KiB |
После Ширина: | Высота: | Размер: 4.2 KiB |
После Ширина: | Высота: | Размер: 5.6 KiB |
До Ширина: | Высота: | Размер: 4.3 KiB После Ширина: | Высота: | Размер: 4.3 KiB |
До Ширина: | Высота: | Размер: 6.8 KiB После Ширина: | Высота: | Размер: 6.8 KiB |
После Ширина: | Высота: | Размер: 5.0 KiB |
После Ширина: | Высота: | Размер: 8.1 KiB |
До Ширина: | Высота: | Размер: 4.3 KiB После Ширина: | Высота: | Размер: 4.3 KiB |
До Ширина: | Высота: | Размер: 8.8 KiB После Ширина: | Высота: | Размер: 8.8 KiB |
До Ширина: | Высота: | Размер: 4.8 KiB После Ширина: | Высота: | Размер: 4.8 KiB |
До Ширина: | Высота: | Размер: 9.1 KiB После Ширина: | Высота: | Размер: 9.1 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 8.0 KiB |
После Ширина: | Высота: | Размер: 4.4 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 6.9 KiB |
До Ширина: | Высота: | Размер: 4.9 KiB После Ширина: | Высота: | Размер: 4.9 KiB |
До Ширина: | Высота: | Размер: 9.8 KiB После Ширина: | Высота: | Размер: 9.8 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 4.1 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 5.6 KiB |
После Ширина: | Высота: | Размер: 4.1 KiB |
После Ширина: | Высота: | Размер: 5.0 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 9.2 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 7.8 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 7.7 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 6.7 KiB |
|
@ -0,0 +1,17 @@
|
|||
#filter substitution
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
browser.jar:
|
||||
% locale app-marketplace-icons @AB_CD@ %locale/@AB_CD@/app-marketplace-icons/
|
||||
#if defined(ANDROID_MARKETPLACE_AB_CD)
|
||||
locale/@AB_CD@/app-marketplace-icons/android.png (@ANDROID_MARKETPLACE_AB_CD@/android.png)
|
||||
#else
|
||||
locale/@AB_CD@/app-marketplace-icons/android.png (en-US/android.png)
|
||||
#endif
|
||||
#if defined(IOS_MARKETPLACE_AB_CD)
|
||||
locale/@AB_CD@/app-marketplace-icons/ios.svg (@IOS_MARKETPLACE_AB_CD@/ios.svg)
|
||||
#else
|
||||
locale/@AB_CD@/app-marketplace-icons/ios.svg (en-US/ios.svg)
|
||||
#endif
|
После Ширина: | Высота: | Размер: 5.0 KiB |
После Ширина: | Высота: | Размер: 4.9 KiB |
После Ширина: | Высота: | Размер: 5.0 KiB |
После Ширина: | Высота: | Размер: 5.2 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 6.1 KiB |
После Ширина: | Высота: | Размер: 5.0 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 9.0 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 9.0 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 5.4 KiB |
|
@ -0,0 +1,7 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
JAR_MANIFESTS += ["jar.mn"]
|
После Ширина: | Высота: | Размер: 4.4 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 8.8 KiB |
После Ширина: | Высота: | Размер: 6.8 KiB |
После Ширина: | Высота: | Размер: 4.9 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 7.7 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 8.5 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 7.7 KiB |
После Ширина: | Высота: | Размер: 4.7 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 7.0 KiB |
До Ширина: | Высота: | Размер: 4.8 KiB После Ширина: | Высота: | Размер: 4.8 KiB |
До Ширина: | Высота: | Размер: 7.3 KiB После Ширина: | Высота: | Размер: 7.3 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 9.5 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 10 KiB |
До Ширина: | Высота: | Размер: 4.7 KiB После Ширина: | Высота: | Размер: 4.7 KiB |