Commit Graph
42 Commits
Author SHA1 Message Date
Jan Henning 5987351cb3 Bug 1342820 - Reset navigation button state when clearing history. r=ahunt
Clearing history purges a tab's session history as well. Normally, we only update the navigation button state in the UI for a location change, so now we need to start listening for the appropriate message as well.

BrowserApp has already registered a background thread listener for "Sanitize:ClearHistory" - since this can be called during shutdown as well and their listener is more important (clearing the history DB), we defer to them and redispatch to the UI thread ourselves, so BrowserApp doesn't have to do this during shutdown.

MozReview-Commit-ID: C83mk6Z56Oq
2017-03-01 21:08:11 +01:00
Dale Harvey b87295edb9 Bug 1321320 - Track installed manifests. r=marcos, r=s.kaspari 2017-02-17 08:24:06 +00:00
Jan Henning db19f40f8a 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
2017-02-11 20:32:32 +01:00
Jan Henning 2f53d6a739 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
2017-02-11 20:13:00 +01:00
Jim Chen 3e3643da35 Bug 1337053 - Fix optString conversions; r=sebastian
JSONObject.optString defaults to empty string ("") if the key doesn't
exist, whereas GeckoBundle.getString defaults to null if the key doesn't
exist. So the correct conversion for `json.optString("foo")` should be
`bundle.getString("foo", "")`. This patch fixes the wrong conversions
from before. In case we did default to null, this patch gets rid of the
redundant null second argument to GeckoBundle.getString.
2017-02-08 19:50:33 -05:00
Jim Chen 25b8c19ecd 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
cnevinc f4a6834166 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
2017-01-14 12:05:48 +08:00
jwu 67f72e8aaa Bug 1325586 - Prevent creating IconDescriptor with null url, r=sebastian
MozReview-Commit-ID: 4y6fKR49DGG
2017-01-16 15:56:43 +08:00
Jim Chen 0fe17e850c 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
Dale Harvey daf3f9c959 Bug 1234558 - Use icons from app manifest. r=marcosc, r=sebastian 2017-01-17 18:24:53 +00:00
Jan Henning 3918eec784 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
2017-01-07 22:26:36 +01:00
Jim Chen 44870b81a5 Bug 1291384 - 2. Convert GeckoProfile.getDB calls to BrowserDB.from calls; r=nalexander
Mass convert GeckoProfile.getDB() calls to BrowserDB.from() calls,
whether using Context or GeckoProfile.
2016-09-14 12:46:50 -04:00
Jim Chen 44c72cf571 Bug 1258470 - 1. Remove RTL and ZoomConstraints variables from gfx; r=rbarker
We no longer send viewport metadata, so we don't actually make use of
the RTL and ZoomConstraints variables we keep in Java. There is a single
usage of an RTL flag in ImmutableViewportMetrics.offsetViewportByAndClamp,
but I think the two branches are equivalent, so the RTL flag is not needed
there either.
2016-09-14 12:43:35 -04:00
Alastor Wu 9ef6e819ba Bug 1290467 - part3 : notify MediaControlService with event 'MEDIA_PLAYING_CHANGE'. r=sebastian
The 'MEDIA_PLAYING_CHANGE' is used for controling media control interface and
the 'AUDIO_PLAYING_CHANGE' is used for showing the tab sound indicator.

MozReview-Commit-ID: 8hZjC77Ju71
2016-09-09 09:50:25 +08:00
Sebastian Kaspari dfc6c4d917 Bug 1301031 - Tab: Initialize icon request builder in constructor. r=ahunt
MozReview-Commit-ID: G6n4BAC2P17
2016-09-07 13:47:38 +02:00
Sebastian Kaspari 71e2051ab1 Bug 1290014 - Use new icon framework in UI code. r=ahunt,Grisha
This patch replaces the old favicon code with the new icon code
in the UI code.

MozReview-Commit-ID: 2YdDpYUhb0M
2016-08-16 11:44:21 +02:00
Randall Barker 8205a50286 Bug 1297850 - part 2, Background is no longer cleared by Java. Remove unused setBackgroundColor. r=jchen 2016-08-25 17:26:42 -07:00
Wes Kocher 0003442039 Backed out 2 changesets (bug 1297850) for robocop bustage a=backout CLOSED TREE
Backed out changeset e83c9eb279a9 (bug 1297850)
Backed out changeset 979694026137 (bug 1297850)
2016-08-25 11:29:35 -07:00
Randall Barker fddb74e6a6 Bug 1297850 - part 2, Background is no longer cleared by Java. Remove unused setBackgroundColor. r=jchen 2016-08-25 08:14:52 -07:00
Randall Barker e10d02e6a1 Bug 1291373 - [geckoview] part 5, Remove Layer and all derived classes r=snorp 2016-08-16 14:33:43 -07:00
Grigory Kruglov 17104337f2 Bug 1277467 - Add OfflineTabStatusDelegate for displaying tab-is-offline notifiations when appropriate r=sebastian
- Use Content:PageShow event to inform Tabs that they were actively loaded from cache
- Move offline notification logic away from browser.js and into a delegate, which displays notifications when
tab in question is user-visible

MozReview-Commit-ID: 2qCACHyWOlp
2016-06-24 16:56:04 -07:00
Margaret Leibovic 04a1daa305 Bug 1272348 - Remove insecure login doorhanger. r=sebastian
MozReview-Commit-ID: 2wQbyL13BrC
2016-06-20 11:57:32 -04:00
Sebastian Kaspari 6b08ccaa67 Bug 1227538 - Reset site identity after entering new URL. r=margaret
MozReview-Commit-ID: oOPYDUPVq9
2016-06-07 16:54:13 +02:00
Andrzej Hunt f57c002267 Bug 1265708 - Pre: remove unused variable r=sebastian
We already pass the URL inside the JSON object.

MozReview-Commit-ID: J4RjxLAzdI
2016-06-02 13:51:52 -07:00
Carsten "Tomcat" Book 9e09b1ce30 Backed out changeset f685593ac3cc (bug 1265708) for android bustage 2016-06-04 09:26:43 +02:00
Andrzej Hunt e7a6896b35 Bug 1265708 - Pre: remove unused variable r=sebastian
We already pass the URL inside the JSON object.

MozReview-Commit-ID: J4RjxLAzdI
2016-06-02 13:51:52 -07:00
Andrzej Hunt f78ebe1f4a Bug 932335 - Part 1: differentiate between unprivileged (http(s) URLs) and privileged URLs r=nalexander
Privileged URLs  can include chrome://, jar://, ..., etc.

MozReview-Commit-ID: 3lFR7djRGAH
2016-05-23 14:43:18 -07:00
Andrzej Hunt fb7b08c79e Bug 1060544 - Part 1: allow persisting/restoring home panel state r=liuche
All home panel state is currently discarded when you navigate to another page.
We want to be able to restore state (e.g. to return to the currently opened bookmarks folder,
instead of returning to the root of the bookmarks folder). This commit adds storage and a framework
to allow homepanels to persist data.

MozReview-Commit-ID: GWDX7UZrIZs
2016-05-09 09:12:28 -07:00
Andrzej Hunt e1ddbca9b4 Bug 1265004 - Try to save in-memory reader view article instead of downloading r=margaret
This should guarantee that any reader view page will also be successfully saved offline.

MozReview-Commit-ID: 4J8cY6hYeyU
2016-05-02 15:47:46 -07:00
Michael Comella 3b73d2373c Bug 1245493 - Don't animate when showing toolbar when FF is first unhidden. r=margaret
After this patch, I still occasionally see the toolbar positioned part
way down from the top of the screen. However, this state looks slightly
less janky without the animation I removed and I can't consistently
reproduce it anymore.  Given the DynamicToolbar.setVisible calls I make,
I'd guess this is likely to be a bug caused by BrowserApp.onTabChanged
(and thus DynamicToolbar.setVisible) not getting called instantly and
so the DynamicToolbar is initialized to a different location on screen.
I'd guess it's a bug in DynamicToolbar as to why it's positioned partially
off-screen.

There is a little bit of code duplication, but that is because the code
to load a url on a new intent is duplicated (i.e. once from GeckoApp.initialize
- the initial load - and once from GeckoApp.onNewIntent). This could
potentially be cleaned up if we moved the app loading code into onResume,
but that may not be possible since we need to wait for Gecko to start
up.

Additionally, this patch adds a lot of hard-to-follow global state, which is
also not good.

Preferred solution (bug 1269041): show the toolbar each time onStart is
called (i.e.  FF is unhidden).  This is good for the user - they'll be
more aware which page they're on - but it's janky with the current
implementation, where the page content does not scroll when the toolbar
is shown so previously visible content is hidden. Thus, I went with the
other approach.  fwiw, Chrome does this behavior, but scrolls the toolbar
offscreen shortly after it is shown.

This solution is blocked on bug 1245523.

MozReview-Commit-ID: 7JjCrIf4KTm
2016-03-28 18:50:52 -07:00
Michael Comella 3525432a9c Bug 1245493 - Add comments to existing code to clarify them. r=margaret
MozReview-Commit-ID: KwOy1KMoPaY
2016-03-28 18:41:34 -07:00
Sebastian Kaspari 2b65810904 Bug 1228680 - Replace default favicon with generated version. r=ahunt
MozReview-Commit-ID: L0vd0v8wOUK
2016-04-25 16:28:42 +02:00
Michael Comella b7fa7351c7 Bug 1258789 - Add synchronized & non-failing try to WhitespaceAround. r=grisha
MozReview-Commit-ID: EBnxF8j2eeY
2016-04-12 18:20:51 -07:00
Andrzej Hunt 49df3839fd Bug 1234319 - Post: Don't track or care about the reading list in Tabs r=mcomella
MozReview-Commit-ID: Ex89J6QLmrI
2016-03-08 09:31:15 -08:00
Andrzej Hunt e3eb6d005a Bug 1234331 - Remove from readercache when unbookmarking page r=margaret
MozReview-Commit-ID: EaJarGuccBE
2016-03-29 20:11:38 -07:00
Andrzej Hunt 55e235263f Bug 1234331 - Push article into readercache when bookmarking readerview page r=margaret
MozReview-Commit-ID: D7Yy45xkFd8
2016-03-29 20:08:09 -07:00
Andrzej Hunt bf1632caa6 Bug 1234331 - Allow bookmarking readerview pages r=margaret
MozReview-Commit-ID: A9n1IA0d4H8
2016-03-22 13:46:58 -07:00
Jim Chen f08147f4d4 Bug 1257319 - Convert existing broadcast events to calls; r=margaret
Convert existing places where we use broadcast events to use
new GeckoAppShell calls.
2016-03-23 14:42:38 -04:00
Carsten "Tomcat" Book 1e05e48e46 Backed out changeset 3e80b5052d0b (bug 1257319) 2016-03-23 10:55:10 +01:00
Jim Chen 8ca658a8c1 Bug 1257319 - Convert existing broadcast events to calls; r=margaret
Convert existing places where we use broadcast events to use
new GeckoAppShell calls.
2016-03-22 22:24:31 -04:00
Andrzej Hunt d443193d53 Bug 1257555 - Move readermode tools into their own package r=rnewman
MozReview-Commit-ID: LaSO3VRUOuA
2016-02-29 18:03:15 -08:00
Nick Alexander c682759005 Bug 1107811 - Part 1: Move Java code. r=mfinkle
#!/bin/bash
set -x
pushd mobile/android/base
# Can't be present in glob below.
rm -rf java/org/mozilla/gecko
for i in */ ; do
# But is necessary to copy into.
mkdir -p java/org/mozilla/gecko
hg mv $i java/org/mozilla/gecko ;
done
hg mv *.java java/org/mozilla/gecko
# Move back stuff we didn't want to move.
hg mv java/org/mozilla/gecko/crashreporter crashreporter
hg mv java/org/mozilla/gecko/docs docs
hg mv java/org/mozilla/gecko/locales locales
hg mv java/org/mozilla/gecko/resources resources
popd
2015-12-04 11:51:34 -08:00