Open
Bug 1483677
Opened 6 years ago
Updated 9 months ago
Add historyUrl to GeckoSession.loadData
Categories
(GeckoView :: General, enhancement, P3)
Tracking
(geckoview62 wontfix, geckoview64 wontfix, geckoview65 affected, geckoview66 affected, firefox63 wontfix, firefox64 wontfix, firefox65 affected, firefox66 affected)
People
(Reporter: jonalmeida, Unassigned)
Details
(Whiteboard: [geckoview:m92)
The Android Webview's version of loadDataWithBaseUri[1] has an argument to show a url in the browser history. Focus[2] with the system WebView is currently using it to show 'focus:about' in the URL and history: ``` public static final String URL_ABOUT = "focus:about"; webView.loadData(URL_ABOUT, data, "text/html", "UTF-8", URL_ABOUT); ``` We'd like to support this in GeckoView as a nice-to-have. [1]: https://developer.android.com/reference/android/webkit/WebView#loadDataWithBaseURL(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String) [2]: https://github.com/mozilla-mobile/focus-android/blob/5305b1d46c83ff98b786e68e8b850711328e83a7/app/src/main/java/org/mozilla/focus/browser/LocalizedContent.java#L75
Reporter | ||
Comment 1•6 years ago
|
||
Closing this since since GV dropped support for baseUrl so there's no need to request historyUrl. See bug 1478777.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Comment 2•6 years ago
|
||
I'm reopening this bug because we're realizing with Focus and A-C that having support for historyUrl is likely necessary. For focus:about I had a workaround to override the URL being displayed when the data URL was being used, but when we are now adding overridden error pages through loadData, we need the URL in history to represent the failed URL, not the data URL from loadData so that when the user reloads they are reloading the failed URL not the loaded data.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Comment 3•6 years ago
|
||
Emily says we don't need to fix in GV 62. She has a workaround for Focus 7.0. She can overload the appearance of the URL bar to display the websites URL, but then reloading the page that received an error will reload the data: URL page again. And if she instead just uses loadUri, then the data: URL will be in history when the user presses back.
status-firefox63:
--- → affected
status-firefox64:
--- → affected
status-geckoview62:
--- → wontfix
Whiteboard: [geckoview:klar:p2]
There is a new API for error pages in 63[0] which will make those work as you expect without the need for any changes to loadData(). You'll simply return the data: url in the error callback and the location will stay on the failed page. [0] https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoSession.NavigationDelegate.html#onLoadError-org.mozilla.geckoview.GeckoSession-java.lang.String-int-int-
You may find the example app useful for how this is used: https://searchfox.org/mozilla-central/source/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#759
Comment 6•6 years ago
|
||
Thanks snorp!! So these will be ready for 63? Which GV version are they available in now to try out?
Reporter | ||
Comment 7•6 years ago
|
||
ekager, a-c is adding support[0] for these error pages now as well. [0]: https://github.com/mozilla-mobile/android-components/pull/794
(In reply to Emily Kager [:ekager] from comment #6) > Thanks snorp!! So these will be ready for 63? Which GV version are they > available in now to try out? It's in 63 currently.
I'm going to put this as a P3 since the error page case is handled via the new error page API.
Priority: -- → P3
Updated•5 years ago
|
Product: Firefox for Android → GeckoView
Reporter | ||
Comment 10•5 years ago
|
||
This has come up again for loading other about pages in the Reference/AC Sample Browsers[0]. I don't think we'd want to add a workaround for it like in Focus since it's probably better to have a cleaner solution if possible. [0]: https://github.com/mozilla-mobile/android-components/issues/1455
Updated•5 years ago
|
status-firefox65:
--- → affected
status-firefox66:
--- → affected
status-geckoview64:
--- → wontfix
status-geckoview65:
--- → affected
status-geckoview66:
--- → affected
OS: Unspecified → Android
Priority: P3 → P2
Whiteboard: [geckoview:klar:p2] → [geckoview:fenix:p2]
Updated•5 years ago
|
Rank: 25
Whiteboard: [geckoview:fenix:p2]
Updated•3 years ago
|
Severity: normal → N/A
Whiteboard: [geckoview:m88]
Updated•3 years ago
|
Whiteboard: [geckoview:m88] → [geckoview:m89]
Updated•3 years ago
|
Priority: P2 → P3
Whiteboard: [geckoview:m89] → [geckoview:m92
Updated•1 year ago
|
Rank: 25 → 333
Comment 11•9 months ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit BugBot documentation.
Flags: needinfo?(Jcash0464)
You need to log in
before you can comment on or make changes to this bug.
Description
•