Merge lp://staging/~osomon/webbrowser-app/historyUpdateOnLoadCommitted into lp://staging/webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 1029
Merged at revision: 1372
Proposed branch: lp://staging/~osomon/webbrowser-app/historyUpdateOnLoadCommitted
Merge into: lp://staging/webbrowser-app
Diff against target: 391 lines (+229/-40)
6 files modified
src/app/webbrowser/Browser.qml (+29/-2)
src/app/webbrowser/history-model.cpp (+37/-1)
src/app/webbrowser/history-model.h (+2/-1)
tests/autopilot/webbrowser_app/tests/http_server.py (+32/-1)
tests/autopilot/webbrowser_app/tests/test_history.py (+80/-34)
tests/unittests/history-model/tst_HistoryModelTests.cpp (+49/-1)
To merge this branch: bzr merge lp://staging/~osomon/webbrowser-app/historyUpdateOnLoadCommitted
Reviewer Review Type Date Requested Status
Riccardo Padovani (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+259361@code.staging.launchpad.net

Commit message

Store entries in the history database on load committed, not load succeeded.
This ensures that content-initiated navigations are also stored.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

+ browser.historyModel.add(webviewInternal.storedUrl, webviewInternal.storedTitle, icon)

Why this and not

browser.historyModel.add(webviewInternal.storedUrl, title, icon)

?

I mean, we're updating the database, it's better to do it with last data we have, isn't it?

review: Needs Information
Revision history for this message
Olivier Tilloy (osomon) wrote :

> + browser.historyModel.add(webviewInternal.storedUrl,
> webviewInternal.storedTitle, icon)
>
> Why this and not
>
> browser.historyModel.add(webviewInternal.storedUrl, title, icon)
>
> ?
>
> I mean, we're updating the database, it's better to do it with last data we
> have, isn't it?

Some pages dynamically update the title to convey live information (like the ugly "scrolling title" effect, see e.g. http://htmlmarquee.com/title.html). In that case we don’t want to update the history DB everytime the title changes. And if the title has changed when we get an icon, we don’t want to update it either, because it’s most likely a dynamic change.
This is consistent with how chromium on desktop behaves.

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Looks good to me now :-)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1021. By Olivier Tilloy

Merge the latest changes from trunk and resolve conflicts.

1022. By Olivier Tilloy

Add an update(…) method to HistoryModel, to allow updating the title and icon of an entry without incrementing the corresponding number of visits.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1023. By Olivier Tilloy

Simplify code a bit.
Do not prevent dynamic favicon updates from updating the history database, to be consistent with what chromium does.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1024. By Olivier Tilloy

Add some autopilot tests to verify that favicons are stored and updated in the history database.

1025. By Olivier Tilloy

Factor out common code.

1026. By Olivier Tilloy

Add autopilot tests to verify that a page’s title is stored in history, but not dynamically updated.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1027. By Olivier Tilloy

Add an autopilot test to verify that history.pushState() inserts a new entry in the history database.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

I only read the code and seems good to me, just a couple of very little improvements inline.

I'll test asap.

review: Needs Fixing
1028. By Olivier Tilloy

Swap the order in which conditions are evaluated, from cheapest to most expensive.

1029. By Olivier Tilloy

Move code out of else block to avoid compiler warning (control reaches end of non-void function [-Wreturn-type]).

Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks, those were very good points, I addressed them.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

Thanks! Tested a bit and seems to work like a charm.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: