Closed Bug 1132925 Opened 9 years ago Closed 9 years ago

Don't set preferences in AboutReader.jsm (so that it can run in the child process)

Categories

(Toolkit :: Reader Mode, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: Margaret, Assigned: abdelrahman, Mentored)

References

Details

(Whiteboard: [lang=js][good next bug])

Attachments

(1 file, 3 obsolete files)

This is needed for bug 1129106. To do this, we should pass messages to the parent process to set reader mode prefs, rather than do it directly in AboutReader.jsm.
Mentor: margaret.leibovic
Whiteboard: [lang=js][good next bug]
Assignee: nobody → a.ahmed1026
Status: NEW → ASSIGNED
Attachment #8564634 - Flags: review?(margaret.leibovic)
Comment on attachment 8564634 [details] [diff] [review]
rev 1 - set reader mode prefs through parent process

Review of attachment 8564634 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry for the slow review, this looks good! You'll just need to update your tree and rebase, since some changes have landed that make your patch fail to apply.
Attachment #8564634 - Flags: review?(margaret.leibovic) → review+
Attachment #8564634 - Attachment is obsolete: true
Attachment #8567221 - Flags: review?(margaret.leibovic)
Comment on attachment 8567221 [details] [diff] [review]
rev 2 - set reader mode prefs through parent process

Review of attachment 8567221 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! I just have one small nit.

::: browser/modules/ReaderParent.jsm
@@ +28,5 @@
>      "Reader:Share",
>      "Reader:SystemUIVisibility",
>      "Reader:UpdateReaderButton",
> +    "Reader:setIntPref",
> +    "Reader:setCharPref",

Nit: I think we should capitialize Set here, to be consistent with the other messages, e.g. "Reader:SetIntPref".
Attachment #8567221 - Flags: review?(margaret.leibovic) → review+
Attachment #8567221 - Attachment is obsolete: true
Attachment #8567298 - Flags: review?(margaret.leibovic)
Comment on attachment 8567298 [details] [diff] [review]
rev 3 - set reader mode prefs through parent process

Review of attachment 8567298 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks!
Attachment #8567298 - Flags: review?(margaret.leibovic) → review+
Gah, I failed at reviewing this patch and had to back it out:
https://hg.mozilla.org/integration/fx-team/rev/d5cf77595feb

We also need to update Firefox for Android's Reader.js file to handle these messages on mobile:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/Reader.js

And we register the listeners in browser.js here:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#173

Can you update the patch to do this? I can test for you on Android if you don't have a mobile build environment set up.
Comment on attachment 8567298 [details] [diff] [review]
rev 3 - set reader mode prefs through parent process

Review of attachment 8567298 [details] [diff] [review]:
-----------------------------------------------------------------

We need to fix this for mobile, as mentioned in my last comment.
Attachment #8567298 - Flags: review+ → review-
(In reply to :Margaret Leibovic from comment #8)
> Can you update the patch to do this? I can test for you on Android if you
> don't have a mobile build environment set up.

Currently I don't have a mobile build environment so please test it on Android.
Attachment #8567298 - Attachment is obsolete: true
Attachment #8567377 - Flags: review?(margaret.leibovic)
Comment on attachment 8567377 [details] [diff] [review]
rev 4 - set reader mode prefs through parent process

Review of attachment 8567377 [details] [diff] [review]:
-----------------------------------------------------------------

Confirmed this works on mobile. Thanks for the quick update, and I'm sorry about missing this the first time!
Attachment #8567377 - Flags: review?(margaret.leibovic) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/f2fd19c776cf
Keywords: checkin-needed
Whiteboard: [lang=js][good next bug] → [lang=js][good next bug][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/f2fd19c776cf
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [lang=js][good next bug][fixed-in-fx-team] → [lang=js][good next bug]
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: