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

2889 Коммитов

Автор SHA1 Сообщение Дата
Ryan VanderMeulen f4a0d77ffc Merge inbound to m-c. a=merge 2017-03-29 09:41:54 -04:00
Ehsan Akhgari f2a992e41a Bug 1347425 - Part 3: Remove the site-specific user agent service; r=baku,jchen
This used to be the glue layer between DOM and Necko which is no longer
being used.
2017-03-28 22:10:53 -04:00
Dale Harvey f36bbc62c5 Bug 1347616 - Fall back to bookmark when manifest invalid. r=sebastian 2017-03-28 21:42:22 +01:00
Phil Ringnalda e7905e8e6d Backed out 3 changesets (bug 1348803) for failures in audio and playback browser-chrome tests
CLOSED TREE

Backed out changeset 4ac559eea9ec (bug 1348803)
Backed out changeset 2ab6e0b8aec6 (bug 1348803)
Backed out changeset f966aef934b1 (bug 1348803)
2017-03-27 21:47:02 -07:00
Alastor Wu 7509784040 Bug 1348803 - part2 : modify event name to lower case letter. r=sebastian
Other events in browser.js are all lower case letter, also change these two to make them consistent.

MozReview-Commit-ID: LkzYUo6OrEA

--HG--
extra : rebase_source : 8b134332e32cae29a1f963e604f2507433c694b8
2017-03-28 10:58:32 +08:00
Alastor Wu 31d5fff67b Bug 1348803 - part1 : move fennec-only code to android/browser.js. r=sebastian
We could register media control related event after the tab has active media.
But we still need to register "audioFocusChange" in the beginning, because it
affect every tab even the tab has no active media.

MozReview-Commit-ID: 4pBKIR8F5tV

--HG--
extra : rebase_source : fc26c98ed7b33552b4eba5b20168394b1b1a4390
2017-03-28 10:57:50 +08:00
brainbreaker 2baa0a9e9f Bug 1271570 - Ask for storage permission when accessing file:// uris; r=sebastian
This commit adds a check for not prompting the user in case
 the permissions have already been granted for accessing
 file:// uris

MozReview-Commit-ID: A62AUqqTJSb

--HG--
extra : rebase_source : c5109c2fede109e1942cce240e26b12a220e8574
2017-03-29 00:43:43 +05:30
Sebastian Kaspari b464c542ca Bug 1348820 - Always collect metadata from visited pages. r=Grisha
We are going to need this in the future and starting collection even before releasing
Activity Stream will create a better experience once we turn it on.

And this flag is hard to miss. So let's just get rid of it.

MozReview-Commit-ID: 5oDzXhpQdSA

--HG--
extra : rebase_source : c96800257070af9287d5236625150dbb62985c4b
2017-03-21 12:08:30 +01:00
Carsten "Tomcat" Book 5f408d092d Merge mozilla-central to mozilla-inbound 2017-03-24 14:29:00 +01:00
Matthew Wein 32477d70c1 Bug 1329027 - Fix regression caused by bug 1300808 r=kmag
MozReview-Commit-ID: CM5cyueJcNk

--HG--
extra : rebase_source : cd24e1485959f3d8513a1d5b4dfa60cca75fe1ba
2017-03-15 15:57:38 -04:00
Samael Wang d19130f17a Bug 1303838 - Switch to existing target tab when clicking links. r=smaug
Merge "DOMServiceWorkerFocusClient" & "DOMWebNotificationClicked"
to "DOMWindowFocus" event. Utilize the event to switch tab when
loading links to an existing target tab.

MozReview-Commit-ID: Hd1NkVkrJA1

--HG--
extra : rebase_source : 745c0d66c3afd8e487c616891c0f10bd820da1fe
2017-03-23 15:59:01 +08:00
Julian_Chu 14a267bf2b Bug 1325955 - Prevent providing wrong baseDomain if scheme is not recognized r=sebastian
If location change to some special scheme, we might misuse the
location to parse domain. Now only get base domain from host if
the scheme is recognized.(http/https/ftp)

MozReview-Commit-ID: 4MkrNfsUJqQ
---
 mobile/android/chrome/content/browser.js | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

--HG--
extra : rebase_source : d7acb12c3e7498a8bc8a03e40727fbe050616df2
2017-03-16 18:12:04 +08:00
Jan Henning 6a3517605c Bug 1346004 - Part 5 - Replace Gecko customtab tab attribute by a generic type attribute. r=sebastian
This'll allow customising context menu/session store/... behaviour in Gecko depending on the tab type, since in the future we might not only have special behaviour for custom tabs, but for web app tabs etc. as well.

MozReview-Commit-ID: LS6oGfO4KpR

--HG--
extra : rebase_source : 677a013a05cc683cae82c84864509d8f4799b474
2017-03-12 16:13:10 +01:00
Jan Henning 0c9a69e4ab Bug 1346004 - Part 1 - Keep track of a tab type on the Java tab object. r=sebastian
As long as the tabs are opened in the same Gecko browser window, splitting the Java UI tabs list into multiple parts breaks too many assumptions, so the easier solution is to allow setting a type attribute on each tab object, which will allow filtering of them later on.

MozReview-Commit-ID: 1PbxMkWTK47

--HG--
extra : rebase_source : ea7b82271b681e04590046a1d5cf9c2230729781
2017-03-11 20:04:07 +01:00
Jan Henning 1d3de902a3 Bug 1345460 - Implement FX_SANITIZE telemetry on Android. r=liuche
To gauge the impact of bug 1343995 on perceived shutdown times, we want to measure how long sanitising actually takes in practice on Android.

MozReview-Commit-ID: 3gSfT8IoO70

--HG--
extra : rebase_source : 19ffdfbf1005ae4beebaa0c9d8befea31e1aa01f
2017-03-08 20:17:06 +01:00
Carsten "Tomcat" Book 3e0a5441c6 Merge mozilla-central to mozilla-inbound 2017-03-17 14:55:15 +01:00
Carsten "Tomcat" Book d9ee923985 Backed out changeset 20537ebcebdb (bug 1303838) for eslint failure 2017-03-17 11:21:32 +01:00
Samael Wang 9e49902c09 Bug 1303838 - Switch to existing target tab when clicking links. r=smaug
Merge "DOMServiceWorkerFocusClient" & "DOMWebNotificationClicked"
to "DOMWindowFocus" event. Utilize the event to switch tab when
loading links to an existing target tab.

MozReview-Commit-ID: Hd1NkVkrJA1
2017-03-16 18:39:31 +08:00
Florian Quèze 9c4d40bb54 Bug 1345294 - script generated patch (+ some hand cleanup) to replace {get,set}ComplexValue for nsISupportsString by {get,set}StringPref, r=Mossop. 2017-03-16 19:26:01 +01:00
Jim Chen 8ae81abdc5 Bug 1345967 - Use global EventDispatcher for update messaging; r=sebastian
Use the global EventDispatcher for signaling update results. The event
listener in about.js must be unregistered after every event to prevent
memory leaks, so expectUpdateResult() is added and called whenever we
are expecting update results.
2017-03-16 12:37:41 -04:00
nechen 5f8404dfd0 Bug 1036764 - Add telemetry for flash. r=bsmedberg,snorp data-r?bsmedberg
MozReview-Commit-ID: 1tsNZlEmx6s

--HG--
extra : rebase_source : 81bae8d6a3b4fb5c1ab037d4bb83722d3152dd86
2017-03-14 14:12:26 +08:00
Dale Harvey 6895048221 Bug 1336355 - Open webapps in new activity. r=sebastian 2017-03-15 15:39:01 +00:00
Jim Chen c27710ffad Bug 1346942 - Fix "Menu:Clicked" event listener; r=me
Change the undefined `aTopic` reference in the "Menu:Clicked" event
listener to `event`. r=me for trivial patch.
2017-03-14 17:46:14 -04:00
Zibi Braniecki 7cb5e257c7 Bug 1346617 - Add LocaleService::SetRequestedLocales. r=jfkthame
MozReview-Commit-ID: FrziO9fOs3R

--HG--
extra : rebase_source : a2f1b5c31317c80666fbda334ea7bfcef28397b6
2017-03-12 12:34:56 -07:00
Dão Gottwald 40034ab5b7 Bug 1345432 - Clean up XUL checkbox styling, remove fallback styling and fix the focus indicator. r=karlt
MozReview-Commit-ID: CcqLKFVvLwC

--HG--
extra : rebase_source : 8665cf698dfc561a2bdc84de27a75bea00cd44f9
2017-03-13 13:12:37 +01:00
Timothy Guan-tin Chien 0127cd03e2 Bug 1344431 - Tell parent the non-reader-able reader page is not readable, r=Gijs
Although regression window testing pin this to bug 1260276, I believe
this is a regression from bug 1126967. Bug 1260276 just make it more
visible because we stop automatically redirect users to the original
page.

This patch fix the bug by checking if the current page is in readerable
state (i.e. not error state), and send the message accordingly.

MozReview-Commit-ID: B5UJcPvVlAc

--HG--
extra : rebase_source : 630347e1f4256550857d84bc6e8a30036b114362
2017-03-06 16:31:47 +08:00
Tom Klein c68bc06849 Bug 1331154 - 6. Notify session store when a tab is moved. r=JanH
MozReview-Commit-ID: 66PqTqMiy0T

--HG--
extra : rebase_source : 99fa467f136a8ba7d2a970fc5f416c0bf952f9a3
2017-02-02 21:32:26 -06:00
Tom Klein 9994c5b150 Bug 1331154 - 5. Notify browser.js when a tab gets moved. r=sebastian
Session store will be notified in the next patch.

MozReview-Commit-ID: APTJykdnMF2

--HG--
extra : rebase_source : f3cdd3e5529f470834c32d6ae2289a6d272cba67
2017-02-02 21:02:51 -06:00
Tom Klein 8494bb4923 Bug 1331154 - 4. Don't use deck for user-visible tabs order. r=JanH,sebastian
Every way I've tried to move a browser in the deck results in the browser being
reset (it loses its docShell and contentDocument).  So now we treat
deck.children as a set of browsers instead of a list, and make BrowserApp._tabs
the sole keeper of the user visible tabs list order.  That means
deck.selectedIndex should no longer be used to get the user visible index of the
currently selected tab (deck.selectedPanel is still valid), and that all
additions to deck can be appends.

Note if this gets reverted at some later date: there's currently a bug, which
this change renders moot, where we reinsert a close-undo tab correctly in the
_tabs list, but incorrectly append it to the deck instead of inserting it.

MozReview-Commit-ID: Id7FR1p1nfN

--HG--
extra : rebase_source : 1506f513e653c67d066601fb9038bee098be9479
2017-02-12 16:17:29 -06:00
Jim Chen 1294cccf48 Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian
Bug 1337467 - 1. Convert "Window:Resize" observer to event; r=rbarker

Bug 1337467 - 2. Convert "ScrollTo:FocusedInput" observer to event; r=rbarker

Bug 1337467 - 3. Convert "Update:CheckResult" observer to event; r=sebastian

Also remove notifyCheckUpdateResult from GeckoInterface.

Bug 1337467 - 4. Convert "GeckoView:ImportScript" observer to event; r=sebastian

Bug 1337467 - 5. Convert accessibility observers to events; r=sebastian

Bug 1337467 - 6. Convert media/casting observers to events; r=sebastian

Bug 1337467 - 7. Convert "Sanitize:ClearData" observer to event; r=sebastian

Bug 1337467 - 8. Convert "Notification:Event" observer to event; r=sebastian

Bug 1337467 - 9. Convert BrowserApp observers to events; r=sebastian

Bug 1337467 - 10. Convert Tab observers to events; r=sebastian

Bug 1337467 - 11. Convert "Passwords:Init" and "FormHistory:Init" observers to events; r=sebastian

Bug 1337467 - 12. Convert Reader observers to events; r=sebastian

Bug 1337467 - 13. Convert Distribution observers to events; r=sebastian

Bug 1337467 - 14. Convert "Fonts:Reload" observer to event; r=sebastian

Bug 1337467 - 15. Convert RecentTabsAdapter observers to events; r=sebastian

Bug 1337467 - 16. Convert "Session:Prefetch" observer to event; r=sebastian

Bug 1337467 - 17. Convert "Browser:Quit" and "FullScreen:Exit" observers to events; r=sebastian

Bug 1337467 - 18. Convert SessionStore observers to events; r=sebastian

The "Session:NotifyLocationChange" observer is sent by browser.js and
requires passing a browser reference, so it's left as an observer.

Bug 1337467 - 19. Remove unused "Tab:Screenshot:Cancel" notifyObserver call; r=me

Bug 1337467 - 20. Convert "Session:Navigate" observer to event; r=sebastian

Bug 1337467 - 21. Convert "Locale:*" observers to events; r=sebastian

Bug 1337467 - Add log for unhandled events; r=me

Add back the log indicating no listener for an event, which can be
useful when reading logcat. r=me for trivial change.

Bug 1337467 - Don't return error from EventDispatcher when OnEvent fails; r=me

When a listener's OnEvent method returns an error, continue to dispatch
to other listeners and don't return an error from the dispatch function.
This avoids unexpected errors when dispatching events. r=me for trivial
patch.
2017-03-07 12:34:04 -05:00
Florian Quèze cd762cc83c Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws.
--HG--
extra : rebase_source : c6e20e6e79b0ca5de751c52712d96cbea9432d26
2017-03-07 15:29:48 +01:00
Jan Henning 702a8c80a6 Bug 1343174 - Part 1 - When looking for tabs with the same URL, fall back to the session store data for zombie tabs. r=ahunt
Delay-loaded tabs all have browsers pointing to about:blank, so there's not much sense in querying browser.currentURI for them. Instead we read their session data to determine the correct URL, which allows selectOrAddTab to successfully detect duplicate tabs even when they are zombified.

MozReview-Commit-ID: JZ179Y85Ehe

--HG--
extra : rebase_source : bc34d34d501a994ce989c27858cc529b78b5ae3d
2017-02-28 21:09:39 +01:00
Jan Henning 53cf8e265c Bug 743662 - Restore session once when addons require a restart. r=sebastian
MozReview-Commit-ID: C5Q9cYnxnhj

--HG--
extra : rebase_source : 3f50c6a4a207e7950dd9eeaaf089fbeac078d627
2017-03-03 19:05:49 +01:00
Carsten "Tomcat" Book 0c91af7ef6 Merge mozilla-central to autoland 2017-02-28 13:04:30 +01:00
Carsten "Tomcat" Book 9c1c7106ee merge mozilla-inbound to mozilla-central a=merge 2017-02-28 11:24:33 +01:00
Eugen Sawin 585bf70c8b Bug 1342508 - [2.1] Make code style consistent across GeckoView. r=jchen 2017-02-27 20:39:45 +01:00
Jan Henning 644356e330 Bug 1337325 - Remove unused zoom and scroll code from browser.js r=kats
More JPZ leftovers, I presume. In any case what's left doesn't do anything really useful and a DXR search didn't reveal any remaining users, so this can be thrown out.

MozReview-Commit-ID: 9dN6Jifpbvw

--HG--
extra : rebase_source : 04614d729a55e00c5331ecc321ca2ef5b5e73747
2017-02-12 13:33:42 +01:00
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Dave Townsend 428143ec78 Bug 1341737: Remove SpatialNavigation.jsm. r=blassey
MozReview-Commit-ID: JIbo1jvwZRW

--HG--
extra : rebase_source : b4e13e75d5dd9ac0e1229c4c54a968ea3f3eda73
2017-02-22 10:46:56 -08:00
Carsten "Tomcat" Book e6b82618f4 merge mozilla-inbound to mozilla-central a=merge 2017-02-23 14:59:37 +01:00
Jim Chen 371103fac0 Bug 1340960 - Correctly invoke print callbacks; r=sebastian
generatePDF returns a Promise. We shouldn't feed the Promise to the
callback, but rather invoke the callbacks when the Promise is
resolved/rejected.
2017-02-22 23:10:17 -05:00
Eugen Sawin 8598247dd1 Bug 1322576 - [3.3] Add GeckoView settings module. r=snorp 2017-02-22 14:57:40 +01:00
Iris Hsiao bc5590a600 Merge mozilla-central to autoland 2017-02-22 16:17:36 +08:00
Iris Hsiao 4b9cf39daa Backed out changeset 0172497c1024 (bug 1337940) 2017-02-22 16:16:10 +08:00
Iris Hsiao cac0976ded Backed out changeset 28c5827d707c (bug 1337325) for tc-M(31) perma failure 2017-02-22 16:15:49 +08:00
Jan Henning 9c78f37fc6 Bug 1337325 - Remove unused zoom and scroll code from browser.js r=kats
More JPZ leftovers, I presume. In any case what's left doesn't do anything really useful and a DXR search didn't reveal any remaining users, so this can be thrown out.

MozReview-Commit-ID: 9dN6Jifpbvw

--HG--
extra : rebase_source : 04614d729a55e00c5331ecc321ca2ef5b5e73747
2017-02-12 13:33:42 +01:00
Jan Henning 2e443a5728 Bug 1337940 - Part 1 - Capture session store tab data on history listener notifications. r=ahunt
So far we've simply used DOMTitleChanged as a proxy for navigation, since it's the earliest opportunity at which we have all necessary data for a new history entry (session history itself as well as tab URL and *title*) available.

However it turns out that this is not 100 % reliable, since some pages might e.g. implement their navigation in JS using the history API, which won't necessarily trigger any DOMTitleChanged events. In those case we'd fail to update the tab's session history in the session store unless the user eventually navigated to someplace else that actually triggers a title change event again - if the browser was closed before that, we'd fail to properly restore the user's state.

To fix this, we take a similar approach as the desktop session store and collect a tab's history data again when receiving any history change notification for that tab.

Because the OnHistory... notifications are mostly cancellable, the session history hasn't been actually updated yet at the point the history listener is being called. We therefore can't synchronously call onTabLoad() from within our history change notification handler and have to schedule an async timeout instead so as to give the session history a chance to complete updating its state.

MozReview-Commit-ID: LgHer940QwT

--HG--
extra : rebase_source : a9634be57f3f43e30f42431e8a28846d958534ee
2017-02-11 21:07:29 +01:00
cnevinc 9fd32c8622 Bug 1341276 - Correctly exit full screen. r=jchen
MozReview-Commit-ID: ErPilSXPWFr

--HG--
extra : rebase_source : 383d2a476d462fea34e06fb445de7b6bad428454
2017-02-21 21:47:43 +08:00
Alastor Wu 1cbd80653d Bug 1326114 - only do duration checking for active-media. r=sebastian
Since we don't want to show the media control for the short sound, so we added the duration checking.
And this checking only needs to be run when the media is active, we don't need to check the inactive media.

MozReview-Commit-ID: AaVGi77nXJ1

--HG--
extra : rebase_source : c565fe64ec4030f0519eb0a8cfe493e95bae4fe4
2017-02-23 12:13:49 +08:00
Alastor Wu aae0c127cd Bug 1340191 - reverse the checking condition. r=sebastian
Since BBC website puts their audio in another iframe, we can't get the media
element to check its duration, so we always return false.

The ideal way to fix it is to get every iframe and check its element, but I think
it's not very easy to do considering the flexibility of using iframe and the cost time.

First, if we want to get the information inside iframe, we need to listen the
onload event, but it's async operation. If there are lots iframe, we need to spend
lots time to wait every iframe. The worst situation is we got the nested iframe,
it would need lots time and effect to wait every iframe loaded and get the element we want.

Therefore, I would prefer the workaround which is to reverse the checking condition,
that is we only check duration for the main window.

MozReview-Commit-ID: F93BjbzRMXO

--HG--
extra : rebase_source : 9409649db241b466967ab1e7f467e177c06c728f
2017-02-22 15:51:08 +08:00
Jan Henning 9d27e01ba2 Bug 1339519 - Set "pending" attribute on browser when creating a new delay-loaded tab. r=sebastian
I don't think we ever check this attribute in our code and rely on the presence of "__SS_restore" instead, but we should fix this for consistency and any add-ons or future code that might depend on this.

MozReview-Commit-ID: JwB6kpiKsaR

--HG--
extra : rebase_source : a3c98f4c76a67a8c1a42e1740cf09ab121f8f5b5
2017-02-17 18:43:52 +01:00
Dale Harvey 8ad9541ad3 Bug 1321320 - Track installed manifests. r=marcos, r=s.kaspari 2017-02-17 08:24:06 +00:00
Jan Henning 927128811e Bug 1269210 - Part 2 - Notify the UI to update the button state on subframe navigation. r=ahunt
Even if we do the rest of our location change processing only for top level location changes, we still need to update the state of the back and forward buttons even on subframe navigation, so they can become enabled/disabled as necessary.

MozReview-Commit-ID: 2wuFZMKtTfj

--HG--
extra : rebase_source : 6085fee3818b0ce610f2ddca3f8be0657f355916
2017-02-11 20:32:32 +01:00
Jan Henning 01929d06f7 Bug 1269210 - Part 1 - Remove unused variables from location change message and Java tab object. r=ahunt
We used to need these for the back button long press history menu, but now we no longer do.

MozReview-Commit-ID: LAZYffLODN3

--HG--
extra : rebase_source : b6c10e3dc785230d247587b1a34c3b819424db9c
2017-02-11 20:13:00 +01:00
Jan Henning cc94d60ffc Bug 1338899 - Part 1 - Use getter/setter for accessing/modifying a tab's parent ID in Gecko. r=sebastian
This should be more foolproof than having to remember to use the dedicated setParentId() function when writing to that variable from outside of the tab constructor.

MozReview-Commit-ID: 1KlXf60VsoF

--HG--
extra : rebase_source : 3ae5234a0113b6077a91e873c7a5e5919b162af3
2017-02-12 15:34:00 +01:00
Dylan Roeh cdd384261f Bug 1332463 - Implement ProgressListener. r=jchen 2017-02-10 16:49:42 -06:00
Jan Henning 36d681723d Bug 1337940 - Part 1 - Capture session store tab data on history listener notifications. r=ahunt
So far we've simply used DOMTitleChanged as a proxy for navigation, since it's the earliest opportunity at which we have all necessary data for a new history entry (session history itself as well as tab URL and *title*) available.

However it turns out that this is not 100 % reliable, since some pages might e.g. implement their navigation in JS using the history API, which won't necessarily trigger any DOMTitleChanged events. In those case we'd fail to update the tab's session history in the session store unless the user eventually navigated to someplace else that actually triggers a title change event again - if the browser was closed before that, we'd fail to properly restore the user's state.

To fix this, we take a similar approach as the desktop session store and collect a tab's history data again when receiving any history change notification for that tab.

Because the OnHistory... notifications are mostly cancellable, the session history hasn't been actually updated yet at the point the history listener is being called. We therefore can't synchronously call onTabLoad() from within our history change notification handler and have to schedule an async timeout instead so as to give the session history a chance to complete updating its state.

MozReview-Commit-ID: LgHer940QwT

--HG--
extra : rebase_source : f5ec320bd21dac91bf1baa162aaabae3ced911e3
2017-02-11 21:07:29 +01:00
Nevin Chen 6c1328a7f4 Bug 1319366 - When fullscreen, defer new tab selection until exiting fullscreen completed. r=jchen,sebastian
MozReview-Commit-ID: 2vAkpp7M7Cv

--HG--
extra : rebase_source : f6444974a190e8f0992bb7af6446739c14821a11
2017-02-03 18:00:27 +08:00
Eugen Sawin 7fedfdca7a Bug 1322592 - [3.3] Add GeckoViewModule base class and integrate GeckoViewNavigation. r=snorp,jchen 2017-02-09 15:44:00 +01:00
Shan 35f3b97b30 Bug 1277464 - Fixed Localization in text selection Context Menus; r=sebastian
MozReview-Commit-ID: 6QR5aHbeD97

--HG--
extra : rebase_source : 9d522ecb6418ee771df50b5d3771f2611b254598
2016-12-20 17:47:35 +05:30
Sebastian Hengst 0264cdf6be Bug 1336311 - Change code comments with http://hg.mozilla.org to https://. r=gps
For components also referencing it in code, see the blockers of bug 1336311.

MozReview-Commit-ID: 4tUZ24HKBWy

--HG--
extra : rebase_source : ec16149f525b9b7eaca7f96f1369929d21497121
2017-02-07 17:52:56 +01:00
Jan Henning 9c6d725ad7 Bug 1148797 - Don't offer "Undo close tab" for empty tabs with no session history. r=ahunt
MozReview-Commit-ID: CsYgUDrCmUQ

--HG--
extra : rebase_source : 5d5b21563c61333c1061f9f87f49abac4f00263b
2017-01-30 22:40:58 +01:00
Dylan Roeh 81892271a5 Bug 1322590 - Add and hook up ContentListener for GeckoView. r=jchen 2017-01-25 15:13:58 -06:00
Tim Huang 42a2c99db5 Bug 1312954 - Part 11: Update speculativeConnect to speculativeConnect2 for Fennec. r=sebastian 2017-02-02 22:18:00 -05:00
Tim Huang 1ed1228b60 Bug 1312954 - Part 9: Update speculativeConnect to speculativeConnect2 for the search service. r=Gijs 2017-02-02 22:17:00 -05:00
srivatsav 32dab0d403 Bug 1199752 - Removing all tab mirroring UI code. r=sebastian
MozReview-Commit-ID: GKcqpknJSAD

--HG--
extra : amend_source : cde365c92d4427726b29c80c9ea7619ccc629561
2017-02-02 11:27:28 +05:30
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
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
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
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 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
Carsten "Tomcat" Book 58b6101373 Merge mozilla-central to autoland 2017-01-26 12:37:41 +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 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 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
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
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 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
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
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
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
Nevin Chen 790b6fa100 Bug 1275662 - Close all tabs and clean up session files when "Open Tabs" is selected in "Clear private data on exit" or "Clear private data" pref. r=JanH,sebastian
MozReview-Commit-ID: GoUQVDIzYbI

--HG--
extra : rebase_source : 13bbf3477a29cf301df72b521a0e02875bb5ef14
2016-12-29 14:22:45 +08:00
Dylan Roeh 9d83c8ce5e Bug 1303362 - Set a flag on custom tabs so that links do not open in a new tab. r=snorp 2017-01-19 09:18:40 -06:00
Jim Chen ea0faaf540 Bug 1329268 - 3. Convert Tabs observers to events; r=sebastian
Convert the "Tab:*" observers in browser.js, which go through the observer
service, to events that go through GlobalEventDispatcher.

FindHelper.js uses "Tab:Selected" through a lazy loader, but I don't
think FindHelper should listen to "Tab:Selected" at all until it is
being used. THerefore, this patch adds "Tab:Selected" registration to
FindHelper.js itself.
2017-01-17 20:06:08 -05:00
Jim Chen ba440de455 Bug 1329268 - 2. Convert Tabs events to bundle events; r=sebastian
Convert events used in Tabs to GeckoBundle/BundleEventListener events.

All of the events are converted to UI thread events, because a lot of
the listeners modify states in Tab (e.g. through
`Tab.handleLocationChange()`), and those states are later accessed on
the UI thread. We used to modify the states on the Gecko thread, and
then access them on the UI thread, which introduces potential race
conditions. Therefore, I think it's best to convert these events
wholesale to UI thread events to avoid races.

Tabs.notifyListeners now calls the listeners directly if it's already on
the UI thread, instead of posting to the UI thread again. This is meant
as an optimization because the events are now coming in on the UI thread
already.

The "Tab:SelectAndForeground" and "Tab:Select" events are merged into
one "Tab:Select" event, and a "foreground" option is added.

The "Tab:StreamStart" and "Tab:StreamStop" events are merged into one
"Tab:RecordingChange" event, and a "recording" option is added to
indicate starting or stopping.
2017-01-17 20:06:07 -05:00
Jim Chen ddc86569ce Bug 1328991 - Convert ZoomedView events to bundle events; r=sebastian
Convert events used in ZoomedView to GeckoBundle/BundleEventListener
events.

"Window:Resize", "Browser:ZoomToPageWidth", and
"Browser:ZoomToRect" listeners are removed because they are not sent
anywhere.

The "Content:LocationChange" listener is merged into the
"Gesture:CloseZoomedView" listener, so that we can leave
"Content:LocationChange" alone for now. Otherwise we would have to
convert the "Content:LocationChange" listener in Tabs as well.

The listeners are changed from global listeners to per-GeckoApp
listeners, because two of the events, "FormAssist:AutoCompleteResult" and
"FormAssist:Hide", are per-GeckoApp events also used by FormAssistPopup.
Because the events are now per-GeckoApp events, they are now registered
from onAttachedToWindow and onDetachedFromWindow.
2017-01-17 20:06:07 -05:00
Jim Chen 58eee87559 Bug 1328990 - Convert FormAssistPopup events to bundle events; r=sebastian
Convert "FormAssist:*" events in FormAssistPopup to
GeckoBundle/BundleEventListener events.  UI thread events are used
because the listener performs operations on the UI thread.

Also convert the "FormAssist:*" observers in browser.js to use
WindowEventDispatcher.

The "FormAssist:AutoComplete" event that goes from Gecko to Java is
renamed to "FormAssist:AutoCompleteResult" to prevent conflict with the
event with the same name that goes from Java to Gecko.
2017-01-17 20:06:07 -05:00
Dale Harvey 0a37fafed0 Bug 1234558 - Use icons from app manifest. r=marcosc, r=sebastian 2017-01-17 18:24:53 +00:00
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Jan Henning 7e58d7d4e5 Bug 1301160 - Part 3 - Pass the saved parent tab ID when restoring tabs. r=sebastian
When restoring recently closed tabs during a browsing session, we can just pass the stored parentId as a parameter to addTab and be done with it.

During startup however, we first need to update the parent tab IDs before being able to use it.

At the moment, new tabs are always opened at the end of the tab list and cannot be resorted by the user, so child tabs always appear *after* their parent tabs in the tab list. However because we don't want to rely on this behaviour, we still need to collect a complete mapping between old and new tab IDs first before being able to update the stored parent tab IDs.

Therefore we cannot use the usual method of passing in the parentId during tab creation and have to set it after the fact for this case.

MozReview-Commit-ID: JT5YSkuOSZw

--HG--
extra : rebase_source : 5487f05ed5fd99e12e4f33170688243b36da55e4
2017-01-07 22:26:36 +01:00
Jan Henning 62eb2dc0df Bug 1301160 - Part 1 - Include tab IDs in the session store data. r=sebastian
Having the previous tab ID in the session store data is required in order to be able to create a mapping between old and new IDs on starting up.
Likewise, the parent ID now needs to be tracked on the Gecko side as well, so it can be saved by the session store and later used when restoring a tab/session.

MozReview-Commit-ID: 3zwoZ9YpZlC

--HG--
extra : rebase_source : 25254f6dbbfbf8291fd1d6dcd194540b15da0cef
2017-01-04 15:34:11 +01:00
Andrew Swan 630f1e4a05 Bug 1329450 Fix amIWebInstallInfo fallout on fennec r=JanH
MozReview-Commit-ID: FJsJiYs5Ole

--HG--
extra : rebase_source : a09691c32eaf7d7436efc718ac60374301dcaae0
2017-01-13 08:06:22 -08:00
Florian Quèze a03918c148 Bug 1330147 - automatic removal of the third boolean parameter in removeObserver calls, r=jaws. 2017-01-11 22:27:42 +01:00