Bug 777562 - Pass the right node to have styles cleaned after parsing (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Sat, 25 Aug 2012 11:27:27 +0100
changeset 105463 6edc438cb29af5ffc7467629c6a8aa50eca2e4f1
parent 105462 66cd9a4209973a4a7b80f899a1564aaae1d68dec
child 105465 3ee8dd0d4bd74f2a9cd211c0d491b1430bb8d1c7
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersmfinkle
bugs777562
milestone17.0a1
Bug 777562 - Pass the right node to have styles cleaned after parsing (r=mfinkle)
mobile/android/chrome/content/Readability.js
--- a/mobile/android/chrome/content/Readability.js
+++ b/mobile/android/chrome/content/Readability.js
@@ -293,17 +293,17 @@ Readability.prototype = {
   /**
    * Prepare the article node for display. Clean out any inline styles,
    * iframes, forms, strip extraneous <p> tags, etc.
    *
    * @param Element
    * @return void
    **/
   _prepArticle: function(articleContent) {
-    this._cleanStyles(this._doc, articleContent);
+    this._cleanStyles(articleContent);
     this._killBreaks(articleContent);
 
     // Clean out junk from the article content
     this._cleanConditionally(articleContent, "form");
     this._clean(articleContent, "object");
     this._clean(articleContent, "h1");
 
     // If there is only one h2, they are probably using it as a header