Merge lp:~michael-sheldon/webbrowser-app/fix-1354388 into lp:webbrowser-app

Proposed by Michael Sheldon
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 736
Merged at revision: 721
Proposed branch: lp:~michael-sheldon/webbrowser-app/fix-1354388
Merge into: lp:webbrowser-app
Prerequisite: lp:~michael-sheldon/webbrowser-app/ssl-status
Diff against target: 55 lines (+10/-2)
3 files modified
src/app/webbrowser/AddressBar.qml (+7/-2)
src/app/webbrowser/Browser.qml (+2/-0)
src/app/webbrowser/Chrome.qml (+1/-0)
To merge this branch: bzr merge lp:~michael-sheldon/webbrowser-app/fix-1354388
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Olivier Tilloy Approve
Review via email: mp+235796@code.launchpad.net

Commit message

Ensure that the url of the page we're loading is displayed, instead of the currently loaded url.

Description of the change

Ensure that the url of the page we're loading is displayed, instead of the currently loaded url.

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/webbrowser-app) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

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

Looks good, and works as expected. Thanks!

I’m seeing an additional use case that doesn’t seem to be covered (although I don’t think it’s a new regression, so it may be fine to tackle it separately):

  - browse to any page that triggers the display of a certificate warning page (e.g. https://testssl-expire.disig.sk/) and choose to proceed anyway
  - close the browser and open it again, the previously open page is re-loaded
  - the certificate warning page is displayed, but the address bar is empty, until you choose to proceed anyway

If you think it can be addressed easily and with minimal changes to this MR, then go ahead, otherwise I’m happy to report it separately afterwards.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
734. By Michael Sheldon

When a certificate error is displayed set that page's URL in the address bar to ensure we show the URL if a page with an error is loaded at start up

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

That seems to work well, however I’m wondering if there isn’t a more general way to fix that, because in the case where there is no certificate error, opening the browser on a previously open page will still display a blank address bar for a short while.

Basically we need to set chrome.requestedUrl accordingly when the currently active webview starts loading, regardless of whether there is a certificate error. Not sure exactly where in the code this needs to be done though, I’d need to take a closer look.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
735. By Michael Sheldon

Display the URL in the address bar as soon as a tab is created

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

19 + if(actualUrl.length > 0) {

actualUrl is of type url, which doesn’t have a 'length' property, so actualUrl.length will always return undefined. You’ll need to do "actualUrl.toString().length".

review: Needs Fixing
736. By Michael Sheldon

Fix check for empty string

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

Looks good now, thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/webbrowser/AddressBar.qml'
--- src/app/webbrowser/AddressBar.qml 2014-09-25 12:34:49 +0000
+++ src/app/webbrowser/AddressBar.qml 2014-09-25 12:34:51 +0000
@@ -351,7 +351,7 @@
351 onActiveFocusChanged: {351 onActiveFocusChanged: {
352 if (activeFocus) {352 if (activeFocus) {
353 addressbar.textFieldFocused();353 addressbar.textFieldFocused();
354 } else if (addressbar.actualUrl.toString()) {354 } else if (!addressbar.loading && addressbar.actualUrl.toString()) {
355 text = addressbar.simplifyUrl(addressbar.actualUrl)355 text = addressbar.simplifyUrl(addressbar.actualUrl)
356 }356 }
357 }357 }
@@ -455,5 +455,10 @@
455 }455 }
456 }456 }
457457
458 onActualUrlChanged: text = simplifyUrl(actualUrl)458 onActualUrlChanged: {
459 if(actualUrl.toString().length > 0) {
460 text = simplifyUrl(actualUrl)
461 }
462 }
463 onRequestedUrlChanged: text = simplifyUrl(requestedUrl)
459}464}
460465
=== modified file 'src/app/webbrowser/Browser.qml'
--- src/app/webbrowser/Browser.qml 2014-09-25 12:34:49 +0000
+++ src/app/webbrowser/Browser.qml 2014-09-25 12:34:51 +0000
@@ -252,6 +252,7 @@
252 onSelected: {252 onSelected: {
253 browser.currentWebview.url = url253 browser.currentWebview.url = url
254 browser.currentWebview.forceActiveFocus()254 browser.currentWebview.forceActiveFocus()
255 chrome.requestedUrl = url
255 }256 }
256 }257 }
257 }258 }
@@ -475,6 +476,7 @@
475 var index = tabsModel.add(tab)476 var index = tabsModel.add(tab)
476 if (setCurrent) {477 if (setCurrent) {
477 tabsModel.setCurrent(index)478 tabsModel.setCurrent(index)
479 chrome.requestedUrl = tab.initialUrl
478 if (focusAddressBar) {480 if (focusAddressBar) {
479 internal.focusAddressBar()481 internal.focusAddressBar()
480 }482 }
481483
=== modified file 'src/app/webbrowser/Chrome.qml'
--- src/app/webbrowser/Chrome.qml 2014-09-25 12:34:49 +0000
+++ src/app/webbrowser/Chrome.qml 2014-09-25 12:34:51 +0000
@@ -28,6 +28,7 @@
28 property alias bookmarked: addressbar.bookmarked28 property alias bookmarked: addressbar.bookmarked
29 property list<Action> drawerActions29 property list<Action> drawerActions
30 readonly property bool drawerOpen: internal.openDrawer30 readonly property bool drawerOpen: internal.openDrawer
31 property alias requestedUrl: addressbar.requestedUrl
3132
32 signal validated()33 signal validated()
3334

Subscribers

People subscribed via source and target branches

to status/vote changes: