Closed Bug 784055 Opened 12 years ago Closed 12 years ago

Remove code dealing with offsetWidth in Readability.js

Categories

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

All
Android
defect
Not set
normal

Tracking

(firefox16 verified, firefox17 verified, firefox18 verified)

VERIFIED FIXED
Firefox 17
Tracking Status
firefox16 --- verified
firefox17 --- verified
firefox18 --- verified

People

(Reporter: lucasr, Assigned: lucasr)

Details

Attachments

(1 file)

We don't run readability.js on top of a live DOM tree anymore. This means all the runtime dimension bits are undefined while running the readability check in the worker thread.
Comment on attachment 653405 [details] [diff] [review]
Remove all code dealing with offsetWidth in Readability.js

I assume that since we don't support _fixImageFloats(), this could cause floated images to look bad in some cases. If we run into this, maybe we could fake support for offsetWidth if we pass in the viewport width to the worker/DOMParser, then attach the width to the document.
Attachment #653405 - Flags: review?(bnicholson) → review+
(In reply to Brian Nicholson (:bnicholson) from comment #2)
> Comment on attachment 653405 [details] [diff] [review]
> Remove all code dealing with offsetWidth in Readability.js
> 
> I assume that since we don't support _fixImageFloats(), this could cause
> floated images to look bad in some cases. If we run into this, maybe we
> could fake support for offsetWidth if we pass in the viewport width to the
> worker/DOMParser, then attach the width to the document.

I've added all the intelligence to handle block images and floats to the reader itself given our use of web workers to parse pages.
https://hg.mozilla.org/mozilla-central/rev/359d21e0b88a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Comment on attachment 653405 [details] [diff] [review]
Remove all code dealing with offsetWidth in Readability.js

[Approval Request Comment]
User impact if declined: Remove overhead from readability check. 
Testing completed (on m-c, etc.): Landed on m-c, no regressions.
Risk to taking this patch (and alternatives if risky): Low, this patch is removing no-op code from readability.js.
String or UUID changes made by this patch: None.
Attachment #653405 - Flags: approval-mozilla-aurora?
Attachment #653405 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
The code was cleaned up on the latest Nightly, Aurora and Beta builds. Closing bug as verified fixed.

--
Device: Galaxy Note
OS: Android 4.0.4
Status: RESOLVED → VERIFIED
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: