Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real tabs support for browser #46

Merged
merged 156 commits into from
Apr 7, 2014
Merged

Real tabs support for browser #46

merged 156 commits into from
Apr 7, 2014

Conversation

rainemak
Copy link
Member

Working in progress pull request for reviewing.

  • Maximum number of real tabs is 5. Should we have an advanced settings for it with a meaningful description... Something like "Unlimited number of real tabs" (with a cost of memory consumption) / "Normal". 5 tabs was a number that I came up once running memory consumption measurements in real world scenarios.
  • Tab is virtualized once it reaches 6th position in the grid (MRU). A virtual tab remembers its position / zoom level while browser running. Tab is resurrected to the previous position once activated from the tab grid. Position and zoom level are not persisted to the database (not available over browser launches). Virtualized tab loses its JS engine state.
  • Back / forward navigation is do through gecko when QuickMozView instance can used for navigation. In other cases, navigation is based on data that we have in database.
  • Once tab is closed, memory is released. QuickMozView instances are not kept in pool. This way we get always clean instance when tab is activated (relates to back / forward navigation and visual appearance).
  • Only one tab active (resumed state) and visible at the time. When activating a tab the tab is resumed and made visible and the previous active tab is suspended and made invisible. Opening a new window (tab) through window.open() does an exception here so that then parent window (tab) is kept alive.

There are following topics that we should do. Not necessarily immediate actions needed but in my opinion would be still best to do these fast so that we don't start building up more too much new stuff on top of these.

Will write down tasks of these.

Raine Makelainen added 30 commits February 28, 2014 13:52
WebView contains all dependencies that it used to have. Mininal
number of changes have been done inorder to isolate WebView from
BrowserPage to and a new component. Upcoming commits will move
WebView related functions from BrowserPage to WebView.
This also adds property tabModel for WebView
This commit also moves load function to WebView.
DeclarativeTab contains now always update to date information.
When tab is activate, bookmark clicked, or history item clicked,
DeclarativeTab gets update immediately. Database actions are triggered
in parallel and that might update tab's properties when transaction
is done.
In reality exposing these like this would require that matching
api would be met, now there is no guarantee but this is still
internal.
…gered.

This handles tab change from the grid and closing of active
tab.
Loading is now started immediately when active tab changes.
suspendView and resumeView of active MozView directly.
This fixes first load not to emit activeTabChanged twice.

Currently title text blinks in toolbar when navigating links. This
is not visible in update3 version.
Raine Makelainen and others added 18 commits March 31, 2014 18:37
Replace firstFrameRendered with DomContentLoaded
[sailfish-browser] First use with real tabs. Contributes to JB#17886
- parent is QQuickItem pointer
- container property is read-only to QML side
Send available composition size to embedlite components when virtual keyboard open
It is still assumed that contentItem can only be DeclarativeWebPage.
Remove explicit DeclartiveWebPage dependency from DeclarativeTabModel
There are lot of small changes done. DeclarativeWebContainer
uses now only title and url from the active page and those
are also exposed to QML side. DeclarativeTabModel owns now one Tab
instance that matches to the current active tab. This is the tab that
is pushed back to model data when a new tab is activated or an active tab is changed.
This commit adds getters and setters for url, title, and
thumbnail path. Also currentLink() is there but now it is returning
the linkId similarly as previousLink() and nextLink() methods.
Now signal has oldTabId and activeTabId parameters.
Now tst_webview is the only linking against xulrunner. Other
unit tests are more less standalone but e.g. tst_declarativetabmodel
needs mocked DeclarativeWebPage.

Linking to gecko caused random bad binaries (don't completely understand)
as inside gecko RTLD_GLOBAL is used to when calling dlopen. What I saw
is that Qt SQL module found sqlite3_bind_int64 from ibmozsqlite3.so causing
unexpected behaviour when running tst_declarativetabmodel.
When BrowserPage is not active we should wait until it is the active
page. This leaves time to animate the PageStack pop if TabPage
happens to be the active page when new tab is requested.
Don't let new tab creation to block PageStack animation
@@ -15,11 +15,12 @@
#include <QAbstractListModel>
#include <QQmlParserStatus>
#include <QPointer>
#include <QScopedPointer>
#include <QQuickItem>
#include <QQmlComponent>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQuickItem and QQmlComponent are not needed anymore here. Left overs and should be removed.

@rainemak rainemak changed the title WIP: Real tabs support for browser Real tabs support for browser Apr 7, 2014
@@ -23,8 +23,8 @@ BuildRequires: qt5-qttools-linguist
BuildRequires: gdb
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong line but...

BuildRequires:  pkgconfig(qt5embedwidget) >= 1.7.3

Needs to be updated.

rainemak pushed a commit that referenced this pull request Apr 7, 2014
Real tabs support for browser
@rainemak rainemak merged commit 10b08f9 into master Apr 7, 2014
rainemak pushed a commit that referenced this pull request Jun 24, 2015
Cleanup garbage from test name
@mlehtima mlehtima deleted the newWebView branch April 8, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants