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)
Tracking
(firefox16 fixed)
RESOLVED
FIXED
Firefox 17
Tracking | Status | |
---|---|---|
firefox16 | --- | fixed |
People
(Reporter: bnicholson, Assigned: bnicholson)
References
Details
Attachments
(1 file, 1 obsolete file)
1.15 KB,
patch
|
mfinkle
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | 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)
Assignee | ||
Comment 1•13 years ago
|
||
forgot to qref
Attachment #642012 -
Attachment is obsolete: true
Attachment #642012 -
Flags: review?(mark.finkle)
Attachment #642013 -
Flags: review?(mark.finkle)
Comment 2•13 years ago
|
||
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+
Assignee | ||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Assignee | ||
Updated•13 years ago
|
Target Milestone: Firefox 17 → Firefox 16
Assignee | ||
Updated•13 years ago
|
Target Milestone: Firefox 16 → Firefox 17
Assignee | ||
Comment 5•13 years ago
|
||
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?
Assignee | ||
Updated•13 years ago
|
status-firefox16:
--- → affected
Updated•13 years ago
|
Attachment #642013 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 6•13 years ago
|
||
Updated•5 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
•