Closed Bug 773774 Opened 13 years ago Closed 13 years ago

Don't clone document for reader mode check

Categories

(Firefox for Android Graveyard :: Reader View, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox16 fixed)

RESOLVED FIXED
Firefox 17
Tracking Status
firefox16 --- fixed

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
We now avoid any DOM manipulations when checking readability, so there's no need to clone the document.
Attachment #642012 - Flags: review?(mark.finkle)
Attached patch patch v2Splinter Review
forgot to qref
Attachment #642012 - Attachment is obsolete: true
Attachment #642012 - Flags: review?(mark.finkle)
Attachment #642013 - Flags: review?(mark.finkle)
Comment on attachment 642013 [details] [diff] [review] patch v2 ># HG changeset patch ># Parent 7c1e2b2a718357bf9d045aa59ede37dd97251cb5 ># User Brian Nicholson <bnicholson@mozilla.com> > >diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js >--- a/mobile/android/chrome/content/browser.js >+++ b/mobile/android/chrome/content/browser.js >@@ -6353,20 +6353,18 @@ let Reader = { > // First, try to find a cached parsed article in the DB > this.getArticleFromCache(url, function(article) { > if (article) { > this.log("Page found in cache, page is definitely readable"); > callback(true); > return; > } > >- // FIXME: Make the readability check not require a separate copy >- // of the document by making the operation fully non-destructive. >- let doc = tab.browser.contentWindow.document.cloneNode(true); > let uri = Services.io.newURI(url, null, null); >+ let doc = tab.browser.contentWindow.document; > > let readability = new Readability(uri, doc); > callback(readability.check()); > }.bind(this)); > } catch (e) { > this.log("Error checking tab readability: " + e); > callback(false); > }
Attachment #642013 - Flags: review?(mark.finkle) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Target Milestone: Firefox 17 → Firefox 16
Target Milestone: Firefox 16 → Firefox 17
Comment on attachment 642013 [details] [diff] [review] patch v2 [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Reader parse will be slower Testing completed (on m-c, etc.): m-c Risk to taking this patch (and alternatives if risky): low risk String or UUID changes made by this patch: none
Attachment #642013 - Flags: approval-mozilla-aurora?
Attachment #642013 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: