Commit 45492c66 authored by Chaoting Liu's avatar Chaoting Liu

firefox: update to 57.0.2

parent 87666beb
pkgname=firefox-i18n
pkgver=57.0.1
pkgver=57.0.2
pkgrel=1
pkgdesc="Language pack for Firefox"
arch=('any')
......@@ -134,95 +134,95 @@ _package() {
"$pkgdir/usr/lib/firefox/browser/extensions/langpack-$1@firefox.mozilla.org.xpi"
}
sha256sums=('23449794ff0e205dd7807e52af2bd458a9e47880637a3d3314b91ec1bbe3d98c'
'dcf0c6f8399cc344af9b82c4a0577a3de0f89b69900a00aea0222eaccaeefc6a'
'5a1cfdf729625150b2e998c541758d69dcf6800d2a0c566542c27afc26533e42'
'eca0ab16032c1d311797c9f28ac23f1a6bd28a45b8c76cf90e80a124134dba0f'
'44e5db2d34cde3e7a5ac5943536c88ff951c1791800cb3f05780d8fd43332a29'
'97128bdb6d278c9e285556ef7dcc70779c5e53789ac272e0924fd87e498c53b7'
'6b87b1dd796a66b182dbf163d8a997fa8cb4859239c3a45ee505244fb368f2eb'
'b2b8b2628b1d27d9ea4c2f8d4d50e3a1c92c1869effb903923342480474d9630'
'e5535f67b981f3e3a4774f02e3882c9ce6f5e18ee420fcffd03c247ceaaf6308'
'c47a25939ad1784c0b378dc3c08feb8c5fdb913ab2003742691044c95d693feb'
'998bcaed3fd4c0267f4b694ee9abb2c85f98c125f1669e12d56ab59ef1f3ca2e'
'ccda8ff3cbc2f8ed558a47ba06389d9a9915bb033426b6a12188a2c7d9634326'
'4436bcf3ab99b377c4042a4c217d712988478294212e691d57d9c01c4b57be5b'
'bce7ba848a718b8d0663652ae3fdf55d633e7141037c20a6b6b609a712270a0c'
'62870573cdbe75195f72614a8f7e4b07ee697a74d0d7a0c431110046bfe78c0b'
'58398ab3299bd4bd560b8d2f8c5e194927529da89166ab2c4a32f5e512072a4b'
'2354a4c6274659c70a3c7531cba1641c8fabc7eb62e860e007d7be85762d2d92'
'5c57a38da9f551a9be9741a118a1092c606b11383139607775e44c7da27debb9'
'3e47b747fcc9b0517d6cecfbfb015558b82c644d4d23df9849e9c71875a2ef79'
'06826c752ef6bf3a50e580ba77dd047c47eb6fc71b48fa3ed7288ab2c6b86191'
'ee2b92634aa6fb274c2c958d3d032bdf4ca9a7cece9737cf891c6642feb46c61'
'1c090de3691debb556768f66805917553862c716007e8152ec1bf9558b2e3ce3'
'874d8c10ec2bb9e92916cdb64626c63482e36e08524131542fe7ad9f80f57202'
'7ed1d2dd07d9163be684e13814f12fb68af6b9679d13c996d640c4ef907da580'
'ad3abbd845e338e188ae7e05ff91293a8f57b5620bebe1b7ad4627c7bfffd320'
'393a3cfd2ab382014debe9a6527d8dc00b4e987744effcb5f2f6f67957004dde'
'ed685179c98fcebaecfc29fcd60eb8919712bc05077e3cd491d204609199a8dd'
'381b77cb3b4756aade94a8c9821356b6a04b2d1135d82bf189b95a4b8dcfc3e8'
'8d3600a3fbef164c373941339f217f920aa93583dcb4156104f992afe0de6514'
'd5ac06c1de58650fd475253bdd2cb440c370c18196b198c35065fa8a9f027902'
'dc36aa6b0c3e524a9bd9504e556bd904edefe719cce7b129820963e219215535'
'3fa3f4dcdb4124e375b6d00f8f4e0e3dfd9ddd733e339ef6a342687ecfe40731'
'ec7dee8010141a0eb0f2dd887ca1f3cee6ee2fe1a0244e6de16e46409fba6452'
'bd5cc153d689d37633dd45fea86886d6b7ed123ae2cd7d95841eca1528d4cb26'
'0822b480e9e2443a2d059cf31cbceb83eebff1d19160c8986c9296b2f32ffa2e'
'edb563595195fc6c421d63c66a92b99ec3b230471df4db2d43a64d0c37fc86fe'
'27802a7355069b6010dc580481c09f63306ace3ceb8557f37a112e5f98f2ed96'
'5b2fd8b0ffe15a3320a4c768c7267825bd575dcb4b02139f461a8933d935e11b'
'e8a01029f93f316657fa2f7b68accd98b72f088485363ccc85b5a888b1a0ba71'
'f6b118c26b0ba8039281e81f101db84d2d4c4455fdffdf4f72cd1d41057dce1c'
'0a3200b8b742ffd2eb6b5df5a8af7044d11a2d8dd788d1236dd28032d54acfdf'
'e5ee0eba7802e41e2ba32adb87d5352af18bfdf954e7f1f08b2405eddf8628c2'
'76b4948b44da2a452918f83471449e23dff4b06be2ea6260dbaff5485d77ed98'
'b0a1c974e9d51a40698858abb2f2c107b256eb4720040a9f3cf9bccb0b003d39'
'b8692eddf653a0729c200e8c65cd8fa4b5e40af53b8ffe16a883956f8d868cb9'
'1d8937c02dab5a081ef0b0d87ae478b6f4fb7182c890fe7d884cead3e7544ee8'
'1aa6dcace91361aa92964f34b3e546a3764d311a381a7813e6c186c63e5f3ed5'
'9a17e36d09ff87b602b7daa4a37d642b489df69050f9c43ec558acba3beeab46'
'03c7c6d0effb764ad441c3255660e4f12b87b7284218faed5de5c787c233aaad'
'15fa0a80e63c25638d7985287121399b85a456dd209385e82a45a68bb2ea55d3'
'debc3614a350f77358ab5cfcf6aa13fc789abaee9a8258e419cc188badb2f6e0'
'ce79ac981eb427bca722ba1cfae1705f328eaff6cc57e3667eaf517339cf92b2'
'84f2ac426048a913b9cc15ecdce9f4814308da1a3d771c7ae0b0a32f27d982ba'
'979d93f800a7dcdd9726a746b9e1eb0707eda3d13dece5ec578c761b685c9914'
'd5243cdcd52c2b1dc82c0e4780166e2d174ad4d3c1446daa076fe5266186630d'
'dcb7d7c6cb12209a0b82de98e48e33dd762264d414150098abdb351c6bbdab42'
'3a015bf49c92df2a311d0c80c3dc14e32b53687e9d7e5636bbdc7736bb73bfa7'
'435480f4afafe0211cfc314f9d79aa7487847a632909347e71df726211de130d'
'1dabde202597a5c5d868c6e9543ffb10b6b30bdd1a7a7d1dc805812b7347c941'
'eb0037c5c4e47a6138f361b6737fbc57e21ef0ec9ab6567a105579eae33e32e2'
'df6aa54fc987305fc4c62833bd1f95e7cf2b44fa924b13d79b7d3ef4c39e8131'
'e7a624606622582cb714066fad7f9c5989bf29e6dc40e2de4b9108bb67f16481'
'6f7f0ea963f348eb62dadfdcec3cf0d3dcb5fc598dfade7281ad9b98f0aaaeb1'
'2097541b6c4337977c94afe73a940c9efab8eba1237b8c8e8abe4294ff6fd907'
'33849337fd01110f2348cd610accdbe07dc6496c4a8457a803626a0a2e5f4c89'
'd2f2267e775f49d82ad0ce92576b207ece350e87b8f9978f69cf140179892894'
'baf5ea04b5c0340bc737a7219968244230a105f44695709f2701f4df323f7c1d'
'802aed09cbbe0dedec9e1c7cf5d5b678c098508ad691db952d6a5fc23d2efd9c'
'5639662a8dbee09356472b6607e66459cfc1e1205e770a387fdfde3f39dfb539'
'912692f1f4be5591590c1525438e252620beae64a8508fafbeb04bbb12a3432e'
'6d9b7651de05d463cd76099e5af5046c6e95f68fce60d1b4f580409af684d90c'
'70b032e83325c33a92cd7ac1aaf95a02b62d08eb96497fcf26e62bf78822ae93'
'd6b021fdc4174117ad445fadba4f312d234afef59b1adee8578a788f27a38b5d'
'a2abd277dd434b39359c54b24e0e73b14045774a6770b800c329c4ff1ddfd3df'
'74acbdce8b2aa358afc49755fa2793b15000248a753f2bf7105ca090d74d46d8'
'a1c1d4359a0f58fdf2964a009e9bd7ec1ed0dcc2e7286c013b4d6656d99dd7ed'
'467f0bd8a9026e14c87e8b5365ab5306ffd9582fa09268cee281ac8527875d3a'
'09c0513e2bacd1bc729ed20e9552254aa2fa1d6b13c4e2029f75dfc20ecda341'
'2470ab9a4f8f433e3c8dc7bf772586fe9883ab5571dd153099cfcfd74e54c0ac'
'4789ff607a2515274bbeb945e251f7cad7d48a770e10d23059d4b2159a7086fe'
'0c08a84ef400033c05aa4f01bbe089a4e37f9d8dd5776c2b2f768a336caa0ed6'
'f9e38845299ce0a5eb3986620ead77676df82e0e1e704b63960ed6bc06960785'
'a4f0906297c30f5646049683d3fc4d687a8b2a08122eb2b5ec09298e5a6aaef0'
'dbdc46f26b9edf7505ee33d93d7bd81c623793251bc2828b19ec4e5d5e2998d5'
'fad9dcdb3fdf613ea70c3a412521460be868ff38bbc557fe5f20a01a0b8f5f4c'
'e0223d8263369a5d388c9517fe373e6621a4f4d243a33fa96ce70fd5eedd4a4d'
'db043d95e2f06c642d53eb75b35a8ed7a7f43ead9cb49e47df60cc14eb0778e1'
'c1142cce6923f8623e3b71c712d524bb39750f7a0c2c4a5386fc9298f4f98b6c'
'0056d13eb20f56973280ec8b4ea47da36455be39b5a574b337970606a58b0298'
'966f56eeceec23b3371ab4ab12aafb8dcd609617e28917de216802aa9148f520'
'35e179f912fec78d49108077bbe8ddfd4cc9d0237c521b035beeac66248a7543'
'1c8a4b2c4b2ae732b45e55480040aaf960d8a88b3f7bbcea4d83eb63c8beb482')
sha256sums=('6e4e35ac6dd6881aceacbb897a88db4dbc35bb15e6aef9069e69e29f3d6af72a'
'98328045407b459bc9d03cfb5fd509f65a73d373f2524727346f66b73890977f'
'd5c1541a51b59a62ef0f76d37b23a31aea9eef5586c2a912258a1bb08b256c47'
'501ef924d8521a64e9a477db734b50d8b30a9f40cd21da6a5f170c7623736081'
'75d2c6d17da3ad0f3821882490c8af144cb8485db147db0af21643a14e192168'
'8a8e1b26600833fa663d0d8ed4ab63bb33b3b4247259f1a90461005821511f34'
'34463c8aab4571f2b45bea2a440997e1848d8175db4cf02659743947c40b7c60'
'54dd40cfb62782b99d16ff191dcf511907844293c67b241e3b230992e0c8e783'
'135c18d3d173dba24179935866e2334fb0eeca28993de66ac04ee7a57a241d10'
'acfbf33249908eaed55b467077c6030fc38cda915cdf55b819548130ac153a69'
'7c9e03f9f4080309291fe2379840d30ac19f3f9bb62e7d0ddd10fda706ef4733'
'db1d167959c903034cd2e2645f650edd33b542b5802914a8991a617034a31ba2'
'8c7ff8d726790aae2506dcb29af145dc0da41ab252cee38cf441680a085ce01b'
'cc7f99940468ca3e9e11d432f87f1e04d0c6299c46fa3518a63cd61ad7bd8275'
'0f66afc9cb1d67b235f763f15a97ea2336bf706bbca6687789c6e9fafb24da9b'
'ae32aa8b3a172f26b13ee0909e0e4166d0a4301ed84a90c94a140f893f1fc48f'
'3902e8f16d8dbc9071a91dc0ab4179ee2a1d4193da44e988c25a620b22b2cf8c'
'e0520ef5f0c4d915a640b6bff9539d767703644b82818cd1efdaf60b8a9099ec'
'bfa87f8e8675f123554792efe9c53653247c04935912c57ecda78de57f0064e0'
'e1075d9fd62fd5131ce6b3b470c449acc9543c703210f85cbd53d780f0cc1562'
'7c830511020b3c3d941d6b699b569a3a7a0897affe70ae4f55229af657b4696b'
'322fc7e30545b0c417bd4065e75705fa2f388c58932bb094ea1f05e401589186'
'6db08bf03342576572a5df73403d5329fc6f2774b1c548745a20ba0d3868b1c8'
'eb00fbe4181b758e29192310882e90fee83ab48f4dd068e3d3c24f86862cf2e0'
'00add571f8d89d246c64bd7dcf63a270c2b1765138cb177e2d791ad17cc6394c'
'afcd189b83683e1f4248fd8241ac68a8b66eaaa71364864d48f0972fedc39143'
'849511a3477a93d8d58e38181b8e5182c63119c4aa5b69253d261a7ba8b89353'
'b6cb88eb351b3c8d52694712094ebf5441f2f9616d797268992bb7163708521b'
'bf9b6e1998142d43e80efc56f66d485257503a360e9a68d61eff7443be64627f'
'fe744c9d48b3b7932ba4b34ff3e7b7e945c1f5455144d074abda84763a80a17b'
'b80774f01679539693f1a159162ce45257f373aeaa07367a59d2750772928dcb'
'd376d8e25b4ef247fff63867bf5f4dfa8be608cc65d2d206d967e3259f2c40f4'
'e6e26b0da88bd79b808e5c901197c032c438526334a103bcc70a22a7e96a346e'
'5230e8782646ddfdcdb09f9efc4b060e403556a4b87ad0d0c2b304da909c57fb'
'2f685faf86aacda1322fb663d6c39ebcdb45f9e19053e87d441bf5c89a0523fb'
'c77188c83afcf22e8243822cdc3d51f75ce222d379de9456cc780cb9edd6aca5'
'bd63815fac2de2d2ab769836b877e0d88a096b72e5711bfb3ffd327c6400f946'
'4d62a918541d5b09ab0abf60a0056f9352c219d9d61315f998895c62dfed709d'
'f65a91aee0d07dc86d517dee090d499ec0bfc80a062ac73844f2a95b5e59a0e1'
'd551db38885246ede09facd9d1b3446f8dd1073a07997ea8daef33ce5d11ca63'
'11468e46911f48ebde6fe663d1f426523e9dd2ee5f3a4556b9bd6f01714dbbfa'
'4bf7695f4ed4b3bb5b76336c9c65c857db92240aef5fe05282cff42cbfbc8a87'
'2d29f32b8e8c83444916a5d3a4abaf8d49114b9740597afed2136672894a8577'
'c03f86bf8a1edfc1d3e5aeb7bb3f106dcdef12adb3a6960fa551d111ad5022e2'
'08699bbd2aaa4955e9ef26486c4ed78199d47646e411aa1e8b4084f394790887'
'9a51455e1e02532e43a15c74a33c07286fa5473c1e5f20021cdc8c303f590e8e'
'a0b6b2214838bc1ca54fad61ec3efff6822f4549284cf279d0ac03a60d2d0bdf'
'e6b857028976758221afb59c1a93a7f9313a0c1e481746e816e85a04f725a9fa'
'88573b68e2f74bb58469bb294b2099ab94eded41e003d5f2528bb825fef6b68b'
'3634f4d039fbd9bb706aa37fdaabbaf3c43a0ed9c57425ef8b91edcd41a612fa'
'72830982f07693047cb56d2179f9ef016d7e712dbc7cafd9d2f56ae27f6d00c0'
'89d2cfe73a574120c2e700fbf6425968be192c485158867108ff2b31dd06aff3'
'c1d7966325c1d326311b2aa2c6df10877a8a9ef4b92977e9d4700be9646cbaff'
'1858583b8cd7409c13de825289226330a79300c980420c8c3691c1b27daf2634'
'8f31e6df57a7087c8347b8edfb0625727c2e6fbc4310ce31cb0ca82c1c387e24'
'a9f55cecd5b115f653366a8f38763e57060b9bf61b15ef0cea6fd6692fbb492e'
'e1f993470e7743543e758c7d792b2845ba30e35b9c86e2353656c20c1a7b06b6'
'faa23874d8e1e43c644e7fb4d02bd9d54378b00b2085f6e522fe9255da65f517'
'815b15bb7a3894e4614613079499d6fd753bc98dc3147516e296739812c4e8ae'
'3b52ab2e01cd6db9c9f948a18deb160c86bf86e4daaf250ee813a4f46654f517'
'0365dfaec3ac71d6daa81d6eb4a23ca71bdf146b750187b09942eae6382bcfb3'
'e72c0d934e2585b0a99d9557630dadbb62e7c5498953a4a33c80bebbb3c3430f'
'b5b9891ce75d0ef84f71ab8edb7f841d4cbe616d1c50ecffac138cb7a2272925'
'eb271781dc61f109c418a0f5075fded4dd2d25dc43672b47f2d07093c02d2bc1'
'ab79095d0df46d8ea36503a32da6bb9edca5e4d99ac0ce53ea9c83b7baefd0ab'
'0b78ab9a6d507aa56e40ccebc09ddb5410a21191d7954903a9ae6595767e9b60'
'28b05f2e805721362fb3c85cc7f0ca589c344642297248fa9dd9991a8e2813be'
'ac349cbf3ae5d3f274027fa1d0a31b91566d94af2518a73079c98cc32ed0d585'
'31bc2abc789aa25c64dbaed7bc1bf480e8ab62d705ae29afdb7b1af554e66c83'
'8451142783244371a2e24cb28b4f61f0c710f041dfa43b0f30c3563999621a3f'
'05f0c1bd1277c0c50fb309fccb6d88e792ad2558b103644b3fef994987f251ad'
'7bb5eb31678a9b2e37c8d0fc5a1627d8f10cb494dfe4fa0ce784677ff27387e0'
'a1ba6dd10d1277d19297bc63bd16e5a973152d092b1135ab18479e897735ce1a'
'48ac606540ed9911f49f1334beff5e034deb797dd11af5520b831f6464543260'
'50932ff3537a30bed13432dfa9bb6cf4abb7659fe08923d1c4b2b835f1d5c86c'
'55bb41d5fdcc0fe58f4239cc31a980ceb202b4627b42e737e14170ab59e71185'
'c64047564a88a5f4562759199a80b3ce258376f433b3d15d62cd6e7554aa63a0'
'65db6c1662714b30ca3d5480664f02baaf80ce173c698adaeea23582927c3ef2'
'b49c082d8410ce2b6e89db3d36ab4724ad873285b78ebc05726023eae9a2a9d0'
'6fb3de4aab16dc7dfbfcda9f79c8be3a4c500a6e1ddaec92b4bfb770e7f3d097'
'0c617640a865fa8a9088a502b2f9d66e7f09ff64de8feac4b1aaaae8cbbc6784'
'dc084a3ff1c690328f87a963a38d0e807ae9f611d93fbb2f3607d15572322c84'
'02145c407a5675645ad5cf2bfbcda2120f9a21002b0edccdb2d4acc59c91b7f1'
'ee88ed22294610d530da21df6ba033c15cf105af7f1197de0cf90baa05e6d06a'
'1eece283a06a36c6dd206b022672ef7c25f77bc9827f5a7e1dbcdf823948786c'
'35a1e1235b6b8c2f2c1d72e7c189b78bbe2e979dc935bfd7e0100805e934e381'
'b0dfbc6cd5737715a9c80f344e37ec3a07244b2f2c3bb9e6a34b4dbdc23b9247'
'f5dd58659d4168785f9bb4eb3c32dfc3c84d75f943cd8a7b313e9a18b39eebfb'
'f14dff5567ce4c9b248ae3078291e0a1d9b17961d0e5b8332bdf0bfa2a811a67'
'3368bb712e1234970daef8b8fa261112218109a652e5892768ad2012bfe8765d'
'3bec2ff2bb4ced1b578c00508fe49874527d4e4f7ad8bc1fec26e11410751f76'
'fced0d1ad64213ee29d98ef40fa3226f462e6a3509f7e2ca9bad2b87f46c68fb')
From f19a0f3bc5e1e87d3c663cc2b147c5c0831519c5 Mon Sep 17 00:00:00 2001
Message-Id: <f19a0f3bc5e1e87d3c663cc2b147c5c0831519c5.1512038840.git.jan.steffens@gmail.com>
In-Reply-To: <05ec1aa0d5e8806dd0c5c6d08c82846a1389b599.1512038840.git.jan.steffens@gmail.com>
References: <05ec1aa0d5e8806dd0c5c6d08c82846a1389b599.1512038840.git.jan.steffens@gmail.com>
From: Bob Silverberg <bsilverberg@mozilla.com>
Date: Fri, 24 Nov 2017 07:45:03 -0500
Subject: [PATCH 2/2] Bug 1419426 - Implement
browserSettings.contextMenuShowEvent, r=kmag a=gchang
Uplift for 58.
---
.../components/extensions/ext-browserSettings.js | 45 ++++++++++++++++
.../extensions/schemas/browser_settings.json | 10 ++++
.../test/xpcshell/test_ext_browserSettings.js | 62 ++++++++++++++++++++--
3 files changed, 114 insertions(+), 3 deletions(-)
diff --git a/toolkit/components/extensions/ext-browserSettings.js b/toolkit/components/extensions/ext-browserSettings.js
index f3212f351baf6975..2b24bcc1d09091f2 100644
--- a/toolkit/components/extensions/ext-browserSettings.js
+++ b/toolkit/components/extensions/ext-browserSettings.js
@@ -2,17 +2,23 @@
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
+XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
+ "resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ExtensionSettingsStore",
"resource://gre/modules/ExtensionSettingsStore.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
"@mozilla.org/browser/aboutnewtab-service;1",
"nsIAboutNewTabService");
Cu.import("resource://gre/modules/ExtensionPreferencesManager.jsm");
+var {
+ ExtensionError,
+} = ExtensionUtils;
+
const HOMEPAGE_OVERRIDE_SETTING = "homepage_override";
const HOMEPAGE_URL_PREF = "browser.startup.homepage";
const URL_STORE_TYPE = "url_overrides";
@@ -82,6 +88,16 @@ ExtensionPreferencesManager.addSetting("imageAnimationBehavior", {
},
});
+ExtensionPreferencesManager.addSetting("contextMenuShowEvent", {
+ prefNames: [
+ "ui.context_menus.after_mouseup",
+ ],
+
+ setCallback(value) {
+ return {[this.prefNames[0]]: value === "mouseup"};
+ },
+});
+
this.browserSettings = class extends ExtensionAPI {
getAPI(context) {
let {extension} = context;
@@ -114,6 +130,35 @@ this.browserSettings = class extends ExtensionAPI {
() => {
return aboutNewTabService.newTabURL;
}, URL_STORE_TYPE, true),
+ contextMenuShowEvent: Object.assign(
+ getSettingsAPI(
+ extension,
+ "contextMenuShowEvent",
+ () => {
+ if (AppConstants.platform === "win") {
+ return "mouseup";
+ }
+ let prefValue = Services.prefs.getBoolPref(
+ "ui.context_menus.after_mouseup", null);
+ return prefValue ? "mouseup" : "mousedown";
+ }
+ ),
+ {
+ set: details => {
+ if (!["mouseup", "mousedown"].includes(details.value)) {
+ throw new ExtensionError(
+ `${details.value} is not a valid value for contextMenuShowEvent.`);
+ }
+ if (AppConstants.platform === "android" ||
+ (AppConstants.platform === "win" &&
+ details.value === "mousedown")) {
+ return false;
+ }
+ return ExtensionPreferencesManager.setSetting(
+ extension, "contextMenuShowEvent", details.value);
+ },
+ }
+ ),
},
};
}
diff --git a/toolkit/components/extensions/schemas/browser_settings.json b/toolkit/components/extensions/schemas/browser_settings.json
index af073d933723cbd5..4f354e69dfedaf96 100644
--- a/toolkit/components/extensions/schemas/browser_settings.json
+++ b/toolkit/components/extensions/schemas/browser_settings.json
@@ -27,28 +27,38 @@
"type": "string",
"enum": ["normal", "none", "once"],
"description": "How images should be animated in the browser."
+ },
+ {
+ "id": "ContextMenuMouseEvent",
+ "type": "string",
+ "enum": ["mouseup", "mousedown"],
+ "description": "After which mouse event context menus should popup."
}
],
"properties": {
"allowPopupsForUserEvents": {
"$ref": "types.Setting",
"description": "Allows or disallows pop-up windows from opening in response to user events."
},
"cacheEnabled": {
"$ref": "types.Setting",
"description": "Enables or disables the browser cache."
},
"homepageOverride": {
"$ref": "types.Setting",
"description": "Returns the value of the overridden home page. Read-only."
},
"imageAnimationBehavior": {
"$ref": "types.Setting",
"description": "Controls the behaviour of image animation in the browser. This setting's value is of type ImageAnimationBehavior, defaulting to <code>normal</code>."
},
"newTabPageOverride": {
"$ref": "types.Setting",
"description": "Returns the value of the overridden new tab page. Read-only."
+ },
+ "contextMenuShowEvent": {
+ "$ref": "types.Setting",
+ "description": "Controls after which mouse event context menus popup. This setting's value is of type ContextMenuMouseEvent, which has possible values of <code>mouseup</code> and <code>mousedown</code>."
}
}
}
diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js b/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
index 5c441df3e4198671..7e9c1576a723dfc6 100644
--- a/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
@@ -24,13 +24,20 @@ add_task(async function test_browser_settings() {
"browser.cache.memory.enable": true,
"dom.popup_allowed_events": Preferences.get("dom.popup_allowed_events"),
"image.animation_mode": "none",
+ "ui.context_menus.after_mouseup": false,
};
async function background() {
browser.test.onMessage.addListener(async (msg, apiName, value) => {
let apiObj = browser.browserSettings[apiName];
- await apiObj.set({value});
- browser.test.sendMessage("settingData", await apiObj.get({}));
+ let result = await apiObj.set({value});
+ if (msg === "set") {
+ browser.test.assertTrue(result, "set returns true.");
+ browser.test.sendMessage("settingData", await apiObj.get({}));
+ } else {
+ browser.test.assertFalse(result, "set returns false for a no-op.");
+ browser.test.sendMessage("no-op set");
+ }
});
}
@@ -69,33 +76,82 @@ add_task(async function test_browser_settings() {
}
}
+ async function testNoOpSetting(setting, value, expected) {
+ extension.sendMessage("setNoOp", setting, value);
+ await extension.awaitMessage("no-op set");
+ for (let pref in expected) {
+ equal(Preferences.get(pref), expected[pref], `${pref} set correctly for ${value}`);
+ }
+ }
+
await testSetting(
"cacheEnabled", false,
{
"browser.cache.disk.enable": false,
"browser.cache.memory.enable": false,
});
await testSetting(
"cacheEnabled", true,
{
"browser.cache.disk.enable": true,
"browser.cache.memory.enable": true,
});
await testSetting(
"allowPopupsForUserEvents", false,
{"dom.popup_allowed_events": ""});
await testSetting(
"allowPopupsForUserEvents", true,
{"dom.popup_allowed_events": PREFS["dom.popup_allowed_events"]});
for (let value of ["normal", "none", "once"]) {
await testSetting(
"imageAnimationBehavior", value,
{"image.animation_mode": value});
}
- await extension.unload();
+ // This setting is a no-op on Android.
+ if (AppConstants.platform === "android") {
+ await testNoOpSetting("contextMenuShowEvent", "mouseup",
+ {"ui.context_menus.after_mouseup": false});
+ } else {
+ await testSetting(
+ "contextMenuShowEvent", "mouseup",
+ {"ui.context_menus.after_mouseup": true});
+ }
+ // "mousedown" is also a no-op on Windows.
+ if (["android", "win"].includes(AppConstants.platform)) {
+ await testNoOpSetting("contextMenuShowEvent", "mousedown",
+ {"ui.context_menus.after_mouseup": AppConstants.platform === "win"});
+ } else {
+ await testSetting(
+ "contextMenuShowEvent", "mousedown",
+ {"ui.context_menus.after_mouseup": false});
+ }
+
+ await extension.unload();
await promiseShutdownManager();
});
+
+add_task(async function test_bad_value() {
+ async function background() {
+ await browser.test.assertRejects(
+ browser.browserSettings.contextMenuShowEvent.set({value: "bad"}),
+ /bad is not a valid value for contextMenuShowEvent/,
+ "contextMenuShowEvent.set rejects with an invalid value.");
+
+ browser.test.sendMessage("done");
+ }
+
+ let extension = ExtensionTestUtils.loadExtension({
+ background,
+ manifest: {
+ permissions: ["browserSettings"],
+ },
+ });
+
+ await extension.startup();
+ await extension.awaitMessage("done");
+ await extension.unload();
+});
--
2.15.1
pkgname=firefox-kde
pkgver=57.0.1
pkgver=57.0.2
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
arch=('x86_64')
......@@ -44,6 +44,7 @@ source=("https://download-installer.cdn.mozilla.net/pub/firefox/releases/${pkgve
'firefox-install-dir.patch'
'pgo-fix-missing-kdejs.patch'
'0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch'
'0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch'
'wifi-disentangle.patch'
'wifi-fix-interface.patch'
'no-plt.diff' 'no-crmf.diff'
......@@ -71,13 +72,14 @@ source=("https://download-installer.cdn.mozilla.net/pub/firefox/releases/${pkgve
#"$_patchurl/mozilla-prefer_plugin_pref.patch" removed from opensuse. reason: dropped mozilla-prefer_plugin_pref.patch as this feature is likely not worth maintaining further
#"$_patchurl/mozilla-shared-nss-db.patch" shared by default now
)
sha256sums=('7db7829e0771acf1be253a8841b9dc96d2ad6490a8f1430fa074e5fd857181ba'
sha256sums=('cad021a13daf8fd2c951fab763e784c82aabef45e68a34c941fb64d62f1a5707'
'SKIP'
'33dd0347a0d74ab30ee6f2b8b6b0c60780f94d459d0e89cf752e33627a62fe02'
'6c2ea431c36afef67710547ae67e81975254309e9e1c82d8312f765caa950fe5'
'1190f251471305f4c96a313b32aa66ee1549125300d7ce385356f45bd8ebcb3d'
'b5466017083d81719355b6b88269cc3e526d005739d4e32fcb80ee5ace911abe'
'8eaa41d3eae6a45bf4e1e5b63e3e48f12223319ea84cdb14fad9277aeabd61e0'
'6d457c1e623d2ca3ed11d169f23275545b4b60dc296e005700139b3f25f6f56d'
'52c56c33f7ab98232d9c0644965f149da9b7266f607c84b80aca8a5534cee3bb'
'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa'
......@@ -120,6 +122,9 @@ prepare() {
# https://bugzilla.mozilla.org/show_bug.cgi?id=1360278
patch -Np1 -i ../0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1419426
patch -Np1 -i ../0002-Bug-1419426-Implement-browserSettings.contextMenuSho.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1341234
patch -Np1 -i ../mozilla-bindgen-systemlibs.patch
......@@ -201,7 +206,7 @@ ac_add_options --disable-updater
ac_add_options --disable-crashreporter
# PGO
mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 $(MAKE) -C $(MOZ_OBJDIR) pgo-profile-run'
mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff
STRIP_FLAGS="--strip-debug"
END
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment