The function was trying to access `stylesheet` parameter's ownerNode property,
which is undefined when the parameter is a StyleSheetActor. In the latter case,
we use nodeHref and styleSheetIndex properties to match what is done when the
parameter is a StyleSheet.
MozReview-Commit-ID: 7FNoKasFYLL
For people with customised home panels, we need to explicitly remove the Recent Tabs panel. We also unhide the Combined History panel if it was previously hidden and additionally turn it into the default panel if the Recent Tabs panel was the previous default panel.
MozReview-Commit-ID: 5CSJUTRysQU
--HG--
extra : transplant_source : A.%23%F5%5D%CE%09%E4%F1%BE%24%7E%13Q%1B%0Bx%15e%91
By passing the panel types to be removed/set as new default panel as arguments instead of hard coding them, we can reuse that function for our own home panel config migration.
MozReview-Commit-ID: BsMxcbInRbX
--HG--
extra : transplant_source : %89zh6%85%F9r%D5%BDu%3E%80%86%AB%7C%1D%B6P%8E%0B
After detecting multiple successive crashes in a row, we temporarily switch off automatic session restoring and display the Recent Tabs panel instead. As that panel is going to be removed, we intercept loads of the Recent Tabs panel about:home?panel=... URL and redirect them to the Combined History panel. We also use the facilities provided by bug 1060544 to jump directly to the Recent Tabs folder in that case.
MozReview-Commit-ID: 7dQ7tW2dD1M
--HG--
extra : transplant_source : %AA%1C%F1%2AD%DDR%29%D5%A2%AA%8D%1B%B6%EE%81%BE%A9%0B%CF
This adds telemetry for clicking on a closed tab or the "Open all" button. Methods and extras strings are based on those used for the old Recent Tabs panel.
MozReview-Commit-ID: 1Kc8fACkmIc
--HG--
extra : transplant_source : m%09%FA%DB%8E%E5%DEG%FF%D1%83%AB%EA%D8%3B%10%9E%08%E3%85
Recently closed tabs aren't synced, therefore being able to swipe to refresh within the Recent tabs folder isn't necessary. To avoid triggering a refresh by accident, we restrict swipe to refresh to the Synced devices folder itself.
MozReview-Commit-ID: YwekSwQr2q
--HG--
extra : transplant_source : %BB%AE%CB%A8W%9B%9F%CD%ECM%C5%B1%94u%9A%25%EE%FDN%AD
Sessionstore.bak is only read when we are initialising the home panels, so after clearing all history from the button in the Combined History panel, the "Tabs from last time" section would still linger around until the home panels have been closed and reopened. To prevent this, we now directly notify the RecentTabsAdapter when all history has been deleted, so it can immediately clear its own copy of the last session's tabs.
MozReview-Commit-ID: 3EFY2WbWqzh
--HG--
extra : transplant_source : %C1%3FyzYZ%81F%5E%F9%98%FE%DC%B0%3F%0D%D3%18%7Bt
Depending on the History panel's PanelLevel state, we now dynamically set the panel footer button's text and determine its onClick behaviour.
MozReview-Commit-ID: EjesnHsntyC
--HG--
extra : transplant_source : NCs%94C%DE%F5%FC%E6%D7%EA%F8%05%1E%D4%0E%2B%2B6%02
Clicking a tab in the list of recently closed tabs now sends the appropriate message back to the session store.
MozReview-Commit-ID: KF3UJjq5zQK
--HG--
extra : transplant_source : %3FU%EB%87%1B%C4%13I/a%FB%C5%C2v%06%26V%0C%A0%D8
We need to update the recent tabs count displayed by the smart folder as necessary. To do this, we copy the approach used for updating the synced devices count.
MozReview-Commit-ID: BFwv5bY1DWk
--HG--
extra : transplant_source : %1A%EB%B0g%05%94%F3%E9%26%D8%1F%15%DF7%C3%EB%1E%27%C6_
The recent tabs count might change while the Recent Tabs folder is open, e.g. immediately after startup, once we receive the first "ClosedTabs:Data" message from the session store. Therefore, we need to hide/unhide the empty view as necessary, which is normally handled by the Combined History panel's updateEmptyView() function. Since we aren't using a cursor, we can't hinge calling that on the CursorLoader's onLoadFinished() callback, so instead, we include our own callback to the Combined History panel, modelled after the DeviceUpdateHandler used for updating the count of synced devices.
MozReview-Commit-ID: GLHM9LoWk2h
--HG--
extra : transplant_source : %09E%B2D%DCB%F6%D3%B5%8A%28%DCx%94e%A2%0F%14%A3%96
This fills the new smart folder we've previously added with life and displays the recently closed tabs as we receive them from the session store. If we can find a sessionstore.bak file (previously the "Tabs from last time"), we also add those tabs to the bottom of the list.
Most of the code for communicating with the session store and reading sessionstore.bak is adapted from the original Recent Tabs panel, however unlike the previous implementation, I've opted for a cursor-less approach of storing and retrieving the recent tabs data, since the recent tabs data isn't actually powered by a database anyway. Instead, the RecentTabsAdapter maintains two arrays for storing "Recently closed tabs" (as received through messages from the Gecko session store) and "Tabs from last time" (as read from sessionstore.bak during panel initialisation).
Also, as per the other Combined History panel adapters and because we're now using a RecyclerView instead of a ListView, list item types are now determined on demand through getItemTypeForPosition() instead of precalculating them during a data update and directly storing together with the tab data items in a cursor.
MozReview-Commit-ID: IpoUr9f0JBP
--HG--
extra : transplant_source : %C4%D5%AF%CA%A4_-%85%1AL%1D%9CF%2B%20Lh%7B%02%21
This folder can be opened and closed to get back to the history view, however it doesn't contain any actual content (closed tabs) yet. Its empty view is based on the original empty view of the Recent Tabs panel.
For displaying the recently closed tabs count within the smart folder similarly to how we display the number of synced devices, two new strings need to be added.
MozReview-Commit-ID: IAL0yDrc2Ld
--HG--
extra : transplant_source : %A1%80jZ%1Eg%14p%7D%DD%DD%EA%E8%7E%CA%0E%CD%28%99%3C
Bug 1277277 will track getting this icon used for the search term history, too, so we can remove the old resources (icon_most_recent_empty.png) completely.
MozReview-Commit-ID: GFFovwiRokc
--HG--
extra : transplant_source : %5C%E5%EA%E4%D5%B7%F7%11%8E%DDSG%3C%93%13%DE%18%14%0E%03
OnPanelLevelChangeListener.PanelLevel.CHILD_SYNC really is a mouthful.
MozReview-Commit-ID: 3uEHQjUlTxf
--HG--
extra : transplant_source : %C8%E3%7E%D3%DB%84%92%0DPQ5/a%23%18%8F%8D%FD%BB7
Otherwise, depending on the device's display dimensions, a second smart folder would be overlapped by the empty view message that is displayed when no history is present for the history panel to display.
Once we've updated to a newer version of the support library (see bug 1267884), we should revisit this and see if using "wrap_content" is working properly instead.
MozReview-Commit-ID: 1xBCeiST9n4
--HG--
extra : transplant_source : %E5%A6%C7%DB%8E%DCQ%3D%B29%94%9BZ%EC%0CbJ%0F%08%B0
(because of platforms not supporting wasm at all)
MozReview-Commit-ID: 4GNERAe3YTD
--HG--
extra : rebase_source : 43fd616838fd5fca8d69081461d09b968c3a0622