Closed
Bug 782421
Opened 12 years ago
Closed 12 years ago
Use parsed result when clicking the reader icon
Categories
(Firefox for Android Graveyard :: Reader View, defect)
Tracking
(firefox16- fixed)
RESOLVED
FIXED
Firefox 17
People
(Reporter: bnicholson, Assigned: bnicholson)
Details
Attachments
(1 file, 1 obsolete file)
6.52 KB,
patch
|
lucasr
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Bug 780519 aims to fix this by storing articles in the cache. For a simpler, shorter term solution, we can attach the article to the tab, so only the most recent article is available. This makes clicking the reader mode button instant for general use (but going back/forward, restoring from OOM, etc. will require re-parsing).
Assignee | ||
Comment 1•12 years ago
|
||
This patch attaches the saved article to the tab. When the reader icon or "Reading List" in the menu is clicked, we can avoid re-parsing the current page.
Attachment #651869 -
Flags: review?(lucasr.at.mozilla)
Comment 2•12 years ago
|
||
Comment on attachment 651869 [details] [diff] [review] Use parsed result when clicking the reader icon Review of attachment 651869 [details] [diff] [review]: ----------------------------------------------------------------- Looks good but I'd like it to only cover about:reader only instead of any about pages. ::: mobile/android/chrome/content/browser.js @@ +2871,5 @@ > + let tabURL = currentURI.specIgnoringRef; > + if (article == null || (article.url != tabURL)) { > + // Don't clear the article for about pages since we don't want to > + // lose it if we go to about:reader > + if (!currentURI.schemeIs("about")) Any reason we should keep it if we go to, say, about:home? Feels like you should be more specific here to avoid any unexpected behaviour. @@ +2872,5 @@ > + if (article == null || (article.url != tabURL)) { > + // Don't clear the article for about pages since we don't want to > + // lose it if we go to about:reader > + if (!currentURI.schemeIs("about")) > + this.savedArticle = null; nit: I'd add an empty line here to make the return more prominent. @@ +6423,5 @@ > }, > > + getArticleForTab: function Reader_getArticleForTab(tabId, url, callback) { > + let tab = BrowserApp.getTabForId(tabId); > + let article = tab.savedArticle; nit: add empty line here, let me breath :-)
Attachment #651869 -
Flags: review?(lucasr.at.mozilla) → review-
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #2) > Comment on attachment 651869 [details] [diff] [review] > Use parsed result when clicking the reader icon > > Review of attachment 651869 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: mobile/android/chrome/content/browser.js > @@ +2871,5 @@ > > + let tabURL = currentURI.specIgnoringRef; > > + if (article == null || (article.url != tabURL)) { > > + // Don't clear the article for about pages since we don't want to > > + // lose it if we go to about:reader > > + if (!currentURI.schemeIs("about")) > > Any reason we should keep it if we go to, say, about:home? Feels like you > should be more specific here to avoid any unexpected behaviour. > I avoided it because there's no easy way to determine which about page we're on using nsIURI, but I can just do a simple regex test. I agree it's probably better to be more explicit.
Assignee | ||
Comment 4•12 years ago
|
||
Addressed comments.
Attachment #651869 -
Attachment is obsolete: true
Attachment #651886 -
Flags: review?(lucasr.at.mozilla)
Comment 5•12 years ago
|
||
Comment on attachment 651886 [details] [diff] [review] Use parsed result when clicking the reader icon, v2 Review of attachment 651886 [details] [diff] [review]: ----------------------------------------------------------------- Nice.
Attachment #651886 -
Flags: review?(lucasr.at.mozilla) → review+
Updated•12 years ago
|
Assignee | ||
Comment 6•12 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/bb6adf1cdfe4
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 651886 [details] [diff] [review] Use parsed result when clicking the reader icon, v2 [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: clicking reader button or "Reading List" in menu item will take longer to finish Testing completed (on m-c, etc.): just landed m-i Risk to taking this patch (and alternatives if risky): low risk String or UUID changes made by this patch: none
Attachment #651886 -
Flags: approval-mozilla-aurora?
Assignee | ||
Updated•12 years ago
|
status-firefox16:
--- → affected
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bb6adf1cdfe4
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Updated•12 years ago
|
Attachment #651886 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 9•12 years ago
|
||
http://hg.mozilla.org/releases/mozilla-aurora/rev/a5a515cfad7d
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•