Граф коммитов

18135 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Kaspari 2284846401 Bug 1335355 - Switchboard: Ignore empty matchers in experiments configuration. r=ahunt
MozReview-Commit-ID: 10T90TjJlGY

--HG--
extra : rebase_source : 42ad84c79ba87f64d237b80e88bfede91bf5b93a
2017-01-31 14:26:01 +01:00
Andrzej Hunt f254b7dc1a Bug 1325440 - Use 16:9 keyline for BottomSheet menu r=sebastian
Newer versions of the support library do this automatically, but we need to
roll our own implentation for now.

16:9 keyline means that the top of the menu is placed such that a 16:9 window
of application content is still visible above the menu. This is illustrated in:
https://material.io/guidelines/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
(The menu itself is _not_ 16:9.)

MozReview-Commit-ID: FSUdssb5eBN

--HG--
extra : rebase_source : 735cfb9ce7f78e4247780011c76850560f67d40e
2017-01-31 10:43:04 -08:00
Andrzej Hunt f912e21d23 Bug 1325096 - Post: only use deprecated setBackgroundDrawable on older platforms r=maliu
This has no benefit right now, but this lets us avoid forgetting to upgrade to the non-deprecated
method once we no longer need to support api 15.

MozReview-Commit-ID: FmRoP5PnGDC

--HG--
extra : rebase_source : 2c5df232fd526f044bd10b3e6cf9920ddb2e4e7b
2017-01-23 15:59:18 -08:00
Andrzej Hunt 956a5a7ffe Bug 1325096 - Wrap FaviconView to workaround ignored margin r=maliu
This seems to be an Android platform bug affecting Android 4.X, which
is visible primarily on tablets (on phones, page titles are often broken
over two lines, which isn't the case on tablets, hence it's easy
to spot if this bug is happening).

MozReview-Commit-ID: AfSw3AJHFqH

--HG--
extra : rebase_source : 125789099f5c7309f2bb049b49341183fa99c3a2
2017-01-23 15:55:46 -08:00
Andrzej Hunt 2e824e81aa Bug 1325096 - Fix menu button padding on select devices r=maliu
On some devices, ImageView appears to lose it's padding when calling
setBackground[Drawable](). We therefore need to save and restore the
padding on those devices.

Known affected devices are various Asus Transformer tablets,
and also the Motorola Droid 4, running various Android 4.X versions.
We therefore make this workaround conditional on Android 4 to minimise
the number of devices where this workaround is used. (Having the conditional
should also make it easy to notice when we can remove the workaround, i.e.
whenever Android 5 becomes the baseline.)

MozReview-Commit-ID: B88gWwEx48x

--HG--
extra : rebase_source : f22fb850c919a25dd14b46e6dec558e8e8998d7b
2017-01-23 15:53:49 -08:00
Kris Maglione f229e3220d Bug 1260548: Part 9 - Make sure Android mochitests do not leave extra tabs open. r=aswan
MozReview-Commit-ID: 7N3KuVX8kRC

--HG--
extra : rebase_source : b8cb8051887d07e8d278e76260f295b5c59f4076
2017-02-01 13:46:09 -08:00
Kris Maglione fd255572fb Bug 1260548: Part 7 - Add mochitests for the Android tabs API. r=aswan
MozReview-Commit-ID: DndSw3di4Jw

--HG--
rename : browser/components/extensions/test/browser/context.html => mobile/android/components/extensions/test/mochitest/context.html
rename : browser/components/extensions/test/browser/context_tabs_onUpdated_iframe.html => mobile/android/components/extensions/test/mochitest/context_tabs_onUpdated_iframe.html
rename : browser/components/extensions/test/browser/context_tabs_onUpdated_page.html => mobile/android/components/extensions/test/mochitest/context_tabs_onUpdated_page.html
rename : browser/components/extensions/test/browser/file_bypass_cache.sjs => mobile/android/components/extensions/test/mochitest/file_bypass_cache.sjs
rename : browser/components/extensions/test/browser/file_dummy.html => mobile/android/components/extensions/test/mochitest/file_dummy.html
rename : browser/components/extensions/test/browser/file_iframe_document.html => mobile/android/components/extensions/test/mochitest/file_iframe_document.html
rename : browser/components/extensions/test/browser/file_iframe_document.sjs => mobile/android/components/extensions/test/mochitest/file_iframe_document.sjs
rename : browser/components/extensions/test/browser/browser_ext_tab_runtimeConnect.js => mobile/android/components/extensions/test/mochitest/test_ext_tab_runtimeConnect.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_captureVisibleTab.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_create.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_create.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_events.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_events.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_executeScript.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_executeScript_bad.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript_bad.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript_good.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_executeScript_no_create.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript_no_create.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_executeScript_runAt.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_executeScript_runAt.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_getCurrent.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_getCurrent.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_insertCSS.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_insertCSS.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_onUpdated.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_reload.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_reload.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_reload_bypass_cache.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_reload_bypass_cache.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_sendMessage.html
rename : browser/components/extensions/test/browser/browser_ext_tabs_update_url.js => mobile/android/components/extensions/test/mochitest/test_ext_tabs_update_url.html
extra : rebase_source : 92ca08140c55550c7d4c14b3c08062b4a9635cd9
2017-02-01 15:24:29 -08:00
Kris Maglione fb7ac8b531 Bug 1260548: Part 6 - Add basic tabs API support for Android. r=aswan
MozReview-Commit-ID: JJgcKp4AZ9S

--HG--
rename : browser/components/extensions/ext-c-tabs.js => mobile/android/components/extensions/ext-c-tabs.js
rename : browser/components/extensions/ext-tabs.js => mobile/android/components/extensions/ext-tabs.js
rename : browser/components/extensions/ext-utils.js => mobile/android/components/extensions/ext-utils.js
rename : browser/components/extensions/schemas/tabs.json => mobile/android/components/extensions/schemas/tabs.json
extra : rebase_source : 8bb2c73556b90db852b6cff09cf9cd6b32e0162f
2017-02-01 15:21:00 -08:00
Jim Chen f45b77cea8 Bug 1334728 - 1. Add missing argument to dispatch call in HelperApps.jsm; r=sebastian
Add the missing "type" argument to the EventDispatcher.instance.dispatch call.
2017-02-01 17:35:45 -05:00
Jim Chen 62e0b641a7 Bug 1333590 - 7. Add more callback tests to testEventDispatcher; r=snorp
Add more callback tests to testEventDispatcher,

1) Test for checking that the callback for a Gecko thread event,
dispatched from Gecko, is synchronous. We depend on this behavior in
several places where we require a "function call" style event.

2) Test for checking that callbacks accept a variety of data types as
the response object, including the standard types supported by
GeckoBundle, as well as primitive types that are convertible to standard
types.
2017-02-01 17:35:45 -05:00
Jim Chen c9a4e01072 Bug 1333590 - 6. Remove GeckoEventListener and NativeEventListener; r=snorp r=sebastian
Remove GeckoEventListener and NativeEventListener now that we uniformly
use BundleEventListener. Also remove related classes NativeJSContainer,
NativeJSObject, and GeckoRequest, as well as related tests and C++
code.

The "Messaging" object in Messaging.jsm is replaced with a dummy object
that redirect calls to the global and/or window event dispatcher.
2017-02-01 17:35:45 -05:00
Jim Chen 735fe99d21 Bug 1333590 - 5. Support other primitive types in event callback; r=snorp
Add support for byte, short, float, long, and char types as the response
object for event callbacks.
2017-02-01 17:35:45 -05:00
Jim Chen 168ac1fcb4 Bug 1333590 - 4. Convert remaining Robocop events to bundle events; r=gbrown
Convert the remaining events used in Robocop to bundle events.
2017-02-01 17:35:44 -05:00
Jim Chen 9ad1c54661 Bug 1333590 - 3. Change remaining Messaging calls to EventDispatcher calls; r=sebastian
Convert calls in several places where we still use Messaging.* instead
of EventDispatcher.
2017-02-01 17:35:44 -05:00
Jim Chen ba693cf082 Bug 1333590 - 2. Convert SearchEngine observers to events; r=sebastian
Convert the "SearchEngine:*" observers to events that go through
GlobalEventDispatcher.
2017-02-01 17:35:44 -05:00
Jim Chen 167d8d6ad2 Bug 1333590 - 1. Convert GeckoRequest usages to events; r=sebastian
Convert places where we use GeckoRequest (to get a callback from JS to
Java) to bundle events that use the built-in callback support.
2017-02-01 17:35:44 -05:00
Krishna 69547a9027 Bug 1318544 - DLC: Only download known content if it is actually excluded from the APK r=sebastian
MozReview-Commit-ID: E3X9u2MkRpX

--HG--
extra : rebase_source : 65b98e87382b5d6cc25ad7eed07d42a9c72dd6e3
2016-12-04 23:17:44 +08:00
Sebastian Kaspari 65cf5887e7 Bug 1334562 - DLC: Start study action from BrowserApp.onCreate() and never in automation. r=ahunt
Previously we started the DLC service from GeckoApplication. The reason for that was that we wanted to
download content like fonts as early as possible so that they are available the next time we display
a website.

However we do not know whether we are running in automation until the BrowserApp activity is launched.
This patch will start the service from BrowserApp.onCreate() now if we are not running in automation.

MozReview-Commit-ID: C3Ob6S3yve4

--HG--
extra : rebase_source : 3dbe64f6cbc0a90149e9c46849d4b68e5674b532
2017-01-30 17:41:38 +01:00
Wes Kocher e457683b2d Merge m-c to autoland, a=merge
MozReview-Commit-ID: BipzgOEInZh
2017-01-30 15:54:34 -08:00
Wes Kocher 584127af5f Merge inbound to central, a=merge
MozReview-Commit-ID: 4GYZ5Pzy7BY
2017-01-30 15:44:58 -08:00
Benjamin Smedberg 270de3f511 Bug 1333826 - Remove all references to MOZ_AUTOMATION_SDK, r=mshal
MozReview-Commit-ID: CuTK1hn0pVl

--HG--
extra : rebase_source : 4581c71360ccd81505079ee9e068ed2ca0431a6a
2017-01-25 12:30:49 -05:00
Florian Quèze bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Phil Ringnalda 5d4072a82c Merge m-i to m-c, a=merge 2017-01-28 13:09:00 -08:00
Wes Kocher 4cf8a40463 Merge m-c to autoland, a=merge
MozReview-Commit-ID: J5UyPvoy89k
2017-01-27 16:39:56 -08:00
Sebastian Kaspari e13030aa3e Bug 1325264 - Update wording of 'disconnect from sync' dialog. r=Grisha
MozReview-Commit-ID: 1xsc0Q1upf5

--HG--
extra : rebase_source : efdb1d121d0a433aecfd05876ed95efce792469b
2017-01-27 18:11:44 +01:00
jwu 5b02eb2870 Bug 1237956 - Use temporary folder instead of modifying the filename while uploading, r=sebastian
MozReview-Commit-ID: 3MQWkPOIRGB

--HG--
extra : rebase_source : 3f7994ee1124e98139c8d4079129b2262c0524b3
2017-01-25 15:56:23 +08:00
Grigory Kruglov 04becc33ae Bug 1325303 - Adjust A-S telemetry docs to reflect greater use of action_position r=sebastian
MozReview-Commit-ID: IUDMovBjzjg

--HG--
extra : rebase_source : 4f6718e01d50b4e13b28366d26e206f6c65b7d7a
2017-01-27 12:17:31 -08:00
Grigory Kruglov 771195ba7b Bug 1325303 - A-S Telemetry: track position of highlights for menu interactions r=sebastian
MozReview-Commit-ID: GXl5asf2rEq

--HG--
extra : rebase_source : 9aa7ee95ed9fe563e31a276b6c0438faa72e9918
2017-01-26 23:14:08 -08:00
Grigory Kruglov e14db054b4 Bug 1325303 - A-S Telemetry: track positions of Top Site items for tile and menu interactions r=sebastian
MozReview-Commit-ID: B4XpqpwfjMi

--HG--
extra : rebase_source : 93d70efb5410f8af8f977fa2310f8d0c55d16bd0
2017-01-27 12:13:13 -08:00
Andrew Swan 30deceecf8 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X

--HG--
extra : rebase_source : bf02d79e3fbab84892be8a7e52ea7a1caf2e003d
2017-01-26 20:00:33 -08:00
Phil Ringnalda 9447dfdbd4 Backed out 3 changesets (bug 1203330) for failures in test_delay_update_webextension.js
CLOSED TREE

Backed out changeset 2d42350d209a (bug 1203330)
Backed out changeset 3a12c51c3eca (bug 1203330)
Backed out changeset 31fac390e15d (bug 1203330)
2017-01-26 19:13:11 -08:00
Carsten "Tomcat" Book dca07ffc3a merge mozilla-central to mozilla-inbound 2017-01-27 11:16:17 +01:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Florian Quèze 2cf30507bd Bug 1334261 - script-generated patch to remove more newURI null parameters, r=jaws. 2017-01-27 10:51:02 +01:00
Florian Quèze be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Wes Kocher 8fa84ca644 Merge inbound to central, a=merge
MozReview-Commit-ID: BZgxmhS6OtM
2017-01-26 16:19:05 -08:00
Wes Kocher 7365007b83 Merge autoland to central, a=merge
MozReview-Commit-ID: EnErkgbuNge
2017-01-26 16:08:33 -08:00
Wes Kocher c3cc3b6407 Backed out 13 changesets (bug 1296767) for xpcshell failures a=backout CLOSED TREE
Backed out changeset 41ed77788333 (bug 1296767)
Backed out changeset 1c0c9289b532 (bug 1296767)
Backed out changeset 50294db1d871 (bug 1296767)
Backed out changeset 26c065f79c54 (bug 1296767)
Backed out changeset 0362a78d6978 (bug 1296767)
Backed out changeset 4e71cf94e4ee (bug 1296767)
Backed out changeset f6f59447d22a (bug 1296767)
Backed out changeset 6c9b792cc296 (bug 1296767)
Backed out changeset 46a52b10a868 (bug 1296767)
Backed out changeset 5d70d87d2a8f (bug 1296767)
Backed out changeset 8219686be6a2 (bug 1296767)
Backed out changeset 0a989b0cea67 (bug 1296767)
Backed out changeset 9f59a0b75c1f (bug 1296767)

MozReview-Commit-ID: 2XBNsd8JrZL

--HG--
extra : amend_source : 1afafaa8127fcebac31ce1d7743dc16872fa0522
2017-01-26 11:16:12 -08:00
Justin Wood d01d00bce4 Bug 1333921 - Taskcluster Android l10n nightlies broken due to missing API key. r=mshal a=bustage
MozReview-Commit-ID: CxiqFKZZpaz

--HG--
extra : source : ea60d075a998cf5037cd9c31bf5ee8d0719bd816
2017-01-26 09:37:14 -05:00
Phil Ringnalda 39e57631eb Merge m-c to m-i 2017-01-25 20:48:39 -08:00
Eugen Sawin 714ebcecb4 Bug 1323429 - [2.1] Remove the context reference from Clipboard. r=jchen 2017-01-26 15:52:21 +01:00
Jim Chen caaf58697a Bug 1333589 - 3. Convert SiteIdentityPopup observers to events; r=sebastian
Convert the "Permissions:*" and "Session:Reload" observers to events
that go through GlobalEventDispatcher.
2017-01-25 18:57:32 -05:00
Jim Chen 174b21ef30 Bug 1333589 - 2. Convert SiteIdentityPopup events to bundle events; r=sebastian
Convert the events used in SiteIdentityPopup to bundle events. UI thread
events are used because the listeners perform operations on the UI
thread.
2017-01-25 18:57:31 -05:00
Jim Chen a8edf60a6c Bug 1333589 - 1. Use GeckoBundle for DoorHanger.OnButtonClickListener; r=sebastian
Convert the onButtonClick method to provide GeckoBundle as the response.
2017-01-25 18:57:31 -05:00
Jim Chen f6a51590a8 Bug 1333588 - Convert PageActions events to bundle events; r=sebastian
Convert events used in PageActions to bundle events. UI thread events
are used because the listeners require the UI thread. The observer
notifications from Java to Gecko are converted to events as well.
2017-01-25 18:57:31 -05:00
Jim Chen 2e56d7739e Bug 1333586 - Convert AccountsHelper events to bundle events; r=sebastian
Convert events used in AccountsHelper to bundle events. Most events are
kept as Gecko thread events, but a couple events that start activities
are converted to UI thread events.
2017-01-25 18:57:31 -05:00
Jim Chen a396212751 Bug 1333581 - Convert IntentHelper events to bundle events; r=sebastian
Convert events used in IntentHelper to bundle events. UI thread events
are used for most events because the listeners perform operations on
Intent objects, which is best done on the UI thread. For
"Intent:GetHandlers", use a Gecko thread event because it's possible we
want a synchronous callback response.
2017-01-25 18:57:31 -05:00
Jim Chen 296c0b8b43 Bug 1330439 - 4. Convert home panel observers to events; r=sebastian
Convert nsIObserverService observers used in home panels to events that
go through EventDispatcher.
2017-01-25 18:53:58 -05:00
Jim Chen dfcdeb5ce1 Bug 1330439 - 3. Convert HomePanelsManager events to bundle events; r=sebastian
Convert events used in HomePanelsManager to bundle events. Background
thread events are used because HomePanelsManager processes panel changes
in the background thread. Changing to background thread events also lets
us make the change queue a simple ArrayList instead of a
ConcurrentLinkedQueue, because there is no longer multiple threads
involved.
2017-01-25 18:53:58 -05:00
Jim Chen 768eb3905e Bug 1330439 - 2. Convert HomeBanner events to bundle events; r=sebastian
Convert the events in HomeBanner to bundle events. "HomeBanner:Shown" is
removed in favor of using a callback.
2017-01-25 18:53:58 -05:00
Jim Chen 6738ee9866 Bug 1330439 - 1. Convert PanelInfoManager events to bundle events; r=sebastian
Convert the "HomePanels:Data" event to a GeckoBundle/BundleEventListener
event. UI thread event is used because the listener invokes the callback
on the UI thread.
2017-01-25 18:53:58 -05:00
Jim Chen a1a65941ef Bug 1330411 - 2. Convert FindInPageBar events to bundle events; r=sebastian
Convert events used in FindInPageBar to GeckoBundle/BundleEventListener
events. UI thread events are used because the listener performs UI
operations. FindInPageBar also sends some events like "FindInPage:Find"
from Java to Gecko; those events will be converted in another bug.
2017-01-25 18:53:58 -05:00
Jim Chen 59b3ffa09c Bug 1330411 - 1. Convert ActionBarHandler observers to events; r=sebastian
Convert observers in ActionBarHandler.js to events that go through
WindowEventDispatcher. "TextSelection:Get" now replies through the
callback interface rather than a "TextSelection:Data" event. The patch
also adds new lazy-loading events in browser.js to replace the
lazy-loading observers that ActionBarHandler relied on.
2017-01-25 18:53:58 -05:00
Jim Chen 9a9702cab0 Bug 1330409 - Convert CastingApps events to bundle events; r=sebastian
Convert the events used in MediaCastingBar and ChromeCastPlayer to
GeckoBundle/BundleEventListener events. UI thread events are used
because the listener performs operations on the UI thread.
2017-01-25 18:53:57 -05:00
Grigory Kruglov 4f96795b02 Bug 1331091 - Document behaviour of special "experiment" telemetry sessions r=liuche
MozReview-Commit-ID: KKT2maMyDqj

--HG--
extra : rebase_source : 338e6b7cdde9cf61c1e2b7ab74d02d68c512363a
2017-01-25 12:28:41 -08:00
Tooru Fujisawa ddd36fec56 Bug 1332245 - Move nsScriptError from js/xpconnect to dom/bindings. r=bz
--HG--
rename : js/xpconnect/idl/nsIScriptError.idl => dom/bindings/nsIScriptError.idl
rename : js/xpconnect/src/nsScriptError.cpp => dom/bindings/nsScriptError.cpp
rename : js/xpconnect/src/nsScriptErrorWithStack.cpp => dom/bindings/nsScriptErrorWithStack.cpp
2017-01-28 00:42:47 +09:00
Edouard Oger 0c915a6f46 Bug 1296767 part 1 - Remove J-PAKE from Sync. r=markh
MozReview-Commit-ID: iD4OJv436i

--HG--
extra : rebase_source : 1653284a3b2e014719a7eb37588f99df868e2060
2017-01-10 13:47:24 -05:00
Tomer Cohen 4ea01a8b63 Bug 1335010 - mobile/android/themes/core/config.css uses float: inline-* r=sebastian
MozReview-Commit-ID: A9yYnF5U2f0

--HG--
extra : rebase_source : 3e6bf0cb49bea547d57dde152bc37844b44dfe14
2017-01-30 15:48:38 +02:00
Jan Henning de6d526e3c Bug 1062859 - Part 1 - Restore scroll position when going back through bookmark folders. r=ahunt
When going down one folder level, we store the current scroll position of the list view and then scroll to the top of the list, so that we always show a child folder starting from the beginning. When navigating back up to its parent, we then restore the previously stored scroll position.

MozReview-Commit-ID: 9C2RMXrlUm1

--HG--
extra : rebase_source : 7ec5a3f1d602db9454efa52603e0f50704c1418d
2017-01-22 22:02:35 +01:00
Jan Henning 9ae155958c Bug 1062859 - Part 0 - Bookmarks panel cleanups. r=ahunt
Fix up javadoc so it matches the actual function parameter and remove unneeded imports.

MozReview-Commit-ID: I91NuqLlpL1

--HG--
extra : rebase_source : 13366049ee9fe1487b3cf24f4e6f610f66bee5ee
2017-01-23 19:23:55 +01:00
Andrzej Hunt 68b1cebd29 Bug 1120441 - Don't try to show tab-history panel if app has been shutdown r=sebastian
Showing the tab history panel involves a gecko call to retrieve tab history. This
can be slow, meaning we have no idea what state the app will be in when the tab
history data is returned. Thus we need to protect the code that shows the tab
history fragment against a number of scenarios to avoid crashes in those cases
where the app might be shutting down:

1. If onSaveInstanceState() has been called (which might happen before or after onPause(),
   and might be linked to app shutdown - but the docs don't appear to give any guarantees),
   fragment transactions cannot be performed. We protect against this by accepting loss
   of state in fragment transactions.
2. If the Activity has been completely destroyed, trying to perform a fragment transaction
   will likewise fail. We protect against this by not even trying to perform the transaction
   if we definitively know that the Activity is being shut down (ie isFinishing()).

In both of these cases, we simply must accept that we're potentially losing UI state: i.e.
a user could request the tab history panel via long-back-press, followed by exiting the app;
we now end up never ever showing the panel. This scenario doesn't seem like a major loss - and
fixing this issue properly would require significant investment (i.e. we would need to either
cache tab history on frontend side, or cache the tab-history panel request - and it's not clear
users will still care about seeing the panel the next time they open firefox).

MozReview-Commit-ID: JsAK1By8yqn

--HG--
extra : rebase_source : 9a3b64d2829a969e4de2775c2714874aa8708031
2017-01-18 22:09:20 +01:00
Jan Henning db207e8e6c Bug 1333567 - Send the notification expected by the session store when restarting, too. r=sebastian
Since bug 1228593, the mobile session store
- once again flushes its data when we are quitting, to make sure the latest state (including any potential cleaning of history/tabs) is flushed to disk
- ignores windows/tabs closing as a byproduct of shutdown

The latter point is dependent on a new shutdown notification introduced in that bug. Because we forgot to add that notification to the restart code used for add-on updates, in that case the session store currently doesn't enter shutdown mode and therefore records the window being closed during shutdown before flushing its data to disk, which means that all open tabs are lost.

MozReview-Commit-ID: LgtdQoYwacM

--HG--
extra : rebase_source : 1bf6c544d9e25961a0e64236678ca5938e8a69fe
2017-01-25 20:31:30 +01:00
Carsten "Tomcat" Book 65f7bfd24d Merge mozilla-central to autoland 2017-01-30 16:21:32 +01:00
Andrzej Hunt 121fe4fced Bug 1325375 - Make PopupContextMenu visible on Android 4 Asus tablets r=sebastian
MozReview-Commit-ID: 1XSiiyQPAXb

--HG--
extra : rebase_source : 6d04d2642129b6e4e5822bd5580b2ff53145a011
2017-01-24 12:28:57 -08:00
Edouard Oger 2458eff863 Bug 1333494 - Bump Android Sync tab records TTL to 21 days. r=Grisha
MozReview-Commit-ID: DpuIkqPlztd

--HG--
extra : rebase_source : b869f21a78b5de1001d58777e8604faaa05b66d3
2017-01-24 13:25:09 -05:00
Carsten "Tomcat" Book 58b6101373 Merge mozilla-central to autoland 2017-01-26 12:37:41 +01:00
Jan Henning 5812dc3cb2 Bug 1333386 - Use {once: true} for session store window "load" listener. r=sebastian
MozReview-Commit-ID: Kc9ydTUrLy1

--HG--
extra : rebase_source : 5dd77f5bff248c305674ef0f7cfbef53675d0a90
2017-01-25 20:19:14 +01:00
Jan Henning 668da1fdc7 Bug 1333046 - Part 2 - Move zombification function into the tab object. r=ahunt
A tab object should know how to zombify itself instead of having to rely on the MemoryObserver. This also simplifies the situation for anybody else who wants to call this function since it is no longer necessary to figure out how to load the MemoryObserver for this.

MozReview-Commit-ID: 5IX114QUjBT

--HG--
extra : rebase_source : 964186678848b804e5f0550e1b6a328d7fcfbc50
2017-01-19 21:45:03 +01:00
Jan Henning 8464eb0fcf Bug 1333046 - Part 1 - Expose a method to restore delay-loaded tabs via the tab object. r=ahunt
Actors outside of the session store shouldn't have to poke around within the session store's data structure and end up reimplementing parts of the session store code (and cause data loss if the implementation is incomplete) in order to restore delay loaded zombie tabs. Therefore, we simply expose a method for this via BrowserApp's tab object.

To simplify handling and make the method a little more fool-proof for external callers, the check whether the tab is actually zombified is moved into the restoreZombieTab() function.

Later on, we can also hook up this method to the appropriate web extension API (see bug 1322485).

MozReview-Commit-ID: 85lnbCpMcP3

--HG--
extra : rebase_source : a6f1cfa11debcb18471b49804776521c60655fce
2017-01-25 21:33:33 +01:00
Carsten "Tomcat" Book 182312677f merge mozilla-inbound to mozilla-central a=merge 2017-01-25 13:47:25 +01:00
Makoto Kato 812588087b Bug 1332792 - Add mozIntl.xpt to Android package for xpcshell test failure. r=gandalf
With --with-intl-api, xpcshell test for MozIntl is always failure on Android.  So we should add mozIntl.xpt to package.

MozReview-Commit-ID: BWBKSG3gSqr

--HG--
extra : histedit_source : d4091b91221bc2ef282d0855dbf4856adb403c9b
2017-01-25 15:31:15 +09:00
Florian Quèze 0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Tomer Cohen b670b52324 Bug 1298913 - [RTL] RTL the preferences in about:config r=sebastian
MozReview-Commit-ID: 132jVEEFH2W

--HG--
extra : rebase_source : 0bbe5586abdb82b2abb41d0be71ca8debff9e056
2017-01-19 22:52:07 +02:00
Phil Ringnalda 1b60bc19eb Merge m-c to autoland 2017-01-24 18:56:54 -08:00
Phil Ringnalda bf98cd4315 Merge m-i to m-c, a=merge 2017-01-24 18:53:29 -08:00
Wes Kocher a65c1b1dfe Merge inbound to central, a=merge
MozReview-Commit-ID: BeGxZAeguBr
2017-01-24 16:08:16 -08:00
Eugen Sawin e03bb44096 Bug 1333241 - [1.0] Initialize screen orientation on instantiation. r=jchen 2017-01-24 21:47:08 +01:00
James Cheng a72c2a70e2 Bug 1332981 - [EME][Fennec] Pref on EME API not only for Nightly build. r=cpearce
MozReview-Commit-ID: 77MrnKZRtoN

--HG--
extra : rebase_source : ca59175b50c5b17623f913be36854473bb8d8bed
2017-01-23 12:31:34 +08:00
Wes Kocher 8439919627 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 7eiveonzAo4
2017-01-24 16:11:28 -08:00
Phil Ringnalda 9823741350 Merge m-c to m-i 2017-01-23 18:57:15 -08:00
Michael Kaply 506dc7f883 Bug 1107942 - Allow zh-CN distribution to add Quit menu. r=sebastian 2017-01-23 17:43:47 -06:00
Jim Chen 8b160783a8 Bug 1319660 - Fix possible crash when editing contentEditable; r=esawin r=masayuki r=smaug
Bug 1319660 - 1. Don't take shortcut if old replacement ranges don't match; r=esawin

The block at [1] is a shortcut we take when we reconcile Java text
changes with Gecko text changes. However, we only checked that the new
ranges are the same, i.e. that the new Gecko text is the same as the new
Java text. We should also be checking that the old ranges are the same,
i.e. that the replaced Gecko text is the same as the replaced Java text.

[1] https://dxr.mozilla.org/mozilla-central/rev/bbbd2f7539f224a482cc6d2dd10e6a5f31c8baf3/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEditable.java#1233

Bug 1319660 - 2. Use previous node instead of sibling when adjusting last node; r=masayuki r=smaug

nsContentIterator in pre mode adjusts its last node if the node is a
childless node like <br>. However, right now it's using GetPrevSibling,
which can lead to error in some edge cases such as:

<p></p><div><br></div>

In this case, if the last node is <br> with offset 0, GetPrevSibling
will return <p> because <p> is <br>'s parent's previous sibling, and the
last node will be set to <p>. However, the correct last node in this
case is <div>, because <br> with offset 0 refers to the position to the
left of <br>, which is <div> with offset 0. In this case, PrevNode
returns the correct <div> value, so we should set the last node to the
result of PrevNode.

For the first node, for a childless node in pre mode, GetNextSibling and
NextNode are the same, so there is no bug in this case. Nevertheless,
this patch changes the call to NextNode to be consistent with calling
PrevNode for the last node.

Bug 1319660 - 3. Add test for correctly adjusting last node in content iterator; r=masayuki

Add a test for the previous patch that makes sure querying selected text
in an edge case works correctly.

Bug 1319660 - 4. Add test for start node regression; r=me

Add a new test case for the NextNode() regression. r=me for trivial
test-only patch.

Bug 1319660 - 5. Restore GetNextSibling call for first node of pre-content-iterator; r=smaug

The last patch changed the `GetNextSibling()` call to `NextNode()`
because I assumed they're equivalent in this case. That turned out to
not be the case because we can reach this line even if the node has
children -- the index just has to be after the last child. So this patch
restores the `GetNextSibling` call to restore the correct behavior.

I also added some comment to clarify that we can reach this line due to
one of two conditions: 1) the node has no children; 2) the node has
children but the index is after the last child.

This patch also replaces the `HasChildren()` check when setting
`cChild`.  If the index is after the last child (i.e. index ==
childCount), `GetChildAt()` fails and we erroneously log an assertion
warning, even though the input was valid. The new check handles all
cases whether start node has children or not.
2017-01-23 14:35:04 -05:00
Ralph Giles 6af75bbd06 Bug 1332759 - Update android builders to rust 1.15.0-beta.4. r=rillian
Bump the Android builders to the latest beta release to reduce
the variance when we update Firefox 53 to 1.15.0 stable early
in the Aurora phase.

Android builds were moved to 1.15 early to address a code generation
issue with devices without neon.

Work around an issue with tarball naming in the cargo packages.

MozReview-Commit-ID: KQfkWmXV9hQ

--HG--
extra : rebase_source : 9448e0b948740fc3905ef70c8df316dc7342d52e
2017-01-20 15:18:26 -08:00
Tomer Cohen 3dcaa6b2cd Bug 1332694 - Add chevron-rtl.png to android chrome manifest r=sebastian
MozReview-Commit-ID: 8jtEMtqZWOg

--HG--
extra : rebase_source : 1a2e5c86b9d6df77f9f92131cd8328a56db0003d
2017-01-20 20:24:03 +02:00
Tomer Cohen a5c096dde5 Bug 1332396 - [about:config] Unable to store non latin-1 characters r=sebastian
MozReview-Commit-ID: 3JBTcHePyl3

--HG--
extra : rebase_source : d7dde5561bcb186020456d4c390d1975ee97d584
2017-01-19 21:07:26 +02:00
Tomer Cohen a3277b929b Bug 1332471 - about:config on Android is missing a page title r=sebastian
MozReview-Commit-ID: 81jNo9jxNNY

--HG--
extra : rebase_source : 60a71b5604b2aeee1e8f087f93fcaadb6d15ba1a
2017-01-20 00:19:20 +02:00
Jan Henning 7f37054663 Bug 1332863 - Turn on strict mode for mobile session store. r=sebastian
MozReview-Commit-ID: 20KRW4yxPm4

--HG--
extra : rebase_source : 31cda3723011281523468643a5a48da22066fc6f
2017-01-21 19:58:57 +01:00
Makoto Kato c69d395f8b Bug 1332806 - Check AppConstants.MOZ_ENABLE_PROFILER_SPS to use Profiler object on browser.js. r=sebastian
When turning off SPS profiler by configure option, or we build non-SPS arch build  such as android/aarch64, Tab.prototype.onStateChange already throws the exception because Profiler isn't defined.

So we should check AppConstants.MOZ_ENABLE_PROFILER_SPS to use Profiler object.

MozReview-Commit-ID: A9ISurxiRmc

--HG--
extra : rebase_source : 25103e97cd4827edef33335e3aec9384a6695526
2017-01-21 12:41:22 +09:00
cnevinc 8dde17828f Bug 1333006 - Add localization note explaining that "Open" here is not an action, like a button, but an adjective. r=sebastian
MozReview-Commit-ID: 8y8g8CfpdzJ

--HG--
extra : rebase_source : bc56c27f41277909d5d3016c7e43e7365f735bb6
2017-01-23 16:05:25 +08:00
Jan Henning 7886887a86 Bug 1330422 - Use arrow functions instead of capturing "this" in the session store. r=sebastian
MozReview-Commit-ID: AlLHJipN6kL

--HG--
extra : rebase_source : f279021f013bcfb4e671b9c6d609f342b57faac9
2017-01-12 21:36:01 +01:00
Jan Henning c90cc004dc Bug 1317079 - Avoid spurious exception when snackbar is dismissed. r=jchen
When a snackbar with a button callback is dismissed, this translates to a rejected promise from sendRequestForResult(). We need to catch this in order to avoid a spurious 'JavaScript Error: "uncaught exception: undefined"' message appearing in the console and possibly causing confusion.

MozReview-Commit-ID: 7hsAOAMTeDP

--HG--
extra : rebase_source : 6c5eb28d2e0dcf39a35b310d1e1c45cfc47f272b
2017-01-21 21:47:08 +01:00
Jan Henning 629cf290d4 Bug 1329330 - Remove old session store code that's no longer needed. r=sebastian
We've been parsing the session store file and doing the initial tab creation on the Java side for a long time now, so the code to open completely new tabs on the session store side instead of using tab stubs is no longer necessary.

Besides, because of bug 1301160 the on-disk session file is now containing tab IDs as well, so this distinction between tabs read directly from the raw session file and those contained in a session string passed over from the Java UI is no longer available.

MozReview-Commit-ID: Hmq0TwClqMQ

--HG--
extra : rebase_source : 1f9ab6da18a7fd0f40a1cb0784082abb2384404f
2017-01-07 22:26:51 +01:00
Nevin Chen 333884f49b Bug 1320900 - Do not show Reader View icon on error pages. r=sebastian
MozReview-Commit-ID: GrQqKqccicf

--HG--
extra : rebase_source : 1cd6b57ad7958f607da17101b9b313f9cd508759
2016-12-30 11:11:09 +08:00
cnevinc 506742c281 Bug 1317632 - If the bookmark to add is a reader mode page, defer db action till it cache completely and save the same url in bookmarks and uriannotations table to avoid URL chagne between two http requests. r=sebastian
MozReview-Commit-ID: 8ZwteTOKe1G

--HG--
extra : rebase_source : 1ca9d9a24d3dca32dd394414ffad88304d06a28c
2017-01-14 12:05:48 +08:00
Nicholas Nethercote 22b6d342d7 Bug 1333296 (part 1) - Rename MOZ_ENABLE_PROFILER_SPS as MOZ_GECKO_PROFILER. r=mstange,glandium.
--HG--
extra : rebase_source : 223f3a17f009645369be503392cc1f0cea7f19a1
2017-01-24 14:15:12 +11:00
Swaroop Rao 7e12d23496 Bug 1328837 - Move 'Switchboard' code into our module/package. Refactored SwitchBoard component to pull it into the app module. r=sebastian
MozReview-Commit-ID: HfypfVFdPwP

--HG--
rename : mobile/android/thirdparty/com/keepsafe/switchboard/AsyncConfigLoader.java => mobile/android/base/java/org/mozilla/gecko/switchboard/AsyncConfigLoader.java
rename : mobile/android/thirdparty/com/keepsafe/switchboard/DeviceUuidFactory.java => mobile/android/base/java/org/mozilla/gecko/switchboard/DeviceUuidFactory.java
rename : mobile/android/thirdparty/com/keepsafe/switchboard/Preferences.java => mobile/android/base/java/org/mozilla/gecko/switchboard/Preferences.java
rename : mobile/android/thirdparty/com/keepsafe/switchboard/Switch.java => mobile/android/base/java/org/mozilla/gecko/switchboard/Switch.java
rename : mobile/android/thirdparty/com/keepsafe/switchboard/SwitchBoard.java => mobile/android/base/java/org/mozilla/gecko/switchboard/SwitchBoard.java
extra : rebase_source : 696e6169c616f7a7540d452b27318c9647f620ee
2017-01-28 16:26:13 -05:00
Andrew Swan f04f785725 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X

--HG--
extra : rebase_source : 43988ee453e965e1c591b1c64603c22f5a103cff
2017-01-26 13:43:12 -08:00
John Lin dfdaf47766 Bug 1333323 - remove nightly flag to enable OOP decoding for all versions. r=snorp
MozReview-Commit-ID: AjOsDiSmuz2

--HG--
extra : rebase_source : 63f7384bbe54077e5bbfd89016be2188856ae1de
2017-01-24 14:28:55 +08:00
Phil Ringnalda bcbe2e1fcc Merge m-c to autoland 2017-01-20 19:15:16 -08:00
Dave Townsend c5f0e2be67 Bug 1331968: Implement the moz: protocol handler to redirect to a fixed website. r=gijs
The protocol handler is intentionally simple. It works for the entering into the
urlbar case but not a lot else. Included some basic tests.

MozReview-Commit-ID: 4FQ1irdt3Nj

--HG--
extra : rebase_source : 30d9fc7ba2c500f268d282e47d291724d9899ba4
2017-01-18 14:10:46 -08:00