Closed Bug 1282061 Opened 8 years ago Closed 8 years ago

Firefox will not enter 'Reader Mode' after background and restoration

Categories

(Firefox for iOS :: General, defect)

All
iOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Tracking Status
fxios-v5.0 --- verified
fxios-v6.0 --- fixed
fxios 5.0+ ---

People

(Reporter: SimonB, Assigned: sleroux)

Details

Attachments

(1 file)

Build: 5.0b12
Device: iPad mini 4 (9.3.2)

Steps to reproduce:
1. Launch Firefox and go to wikipedia.org
2. Search for 'gift' 
3. Enter Readers Mode
4. Exit Reader Mode and background Firefox by pressing the home button
5. Tap the book icon in the URL bar

Actual: 
- The application will not enter 'Reader Mode' after restoration.

Expected:
- The application should enter 'Reader Mode' when the book icon from the URL bar is tapped.
Recently we've added 'privileged' localhost URL requests to help differentiate between our internal localhost requests and user initiated ones. Part of this work includes a check [1] to filter out unprivileged localhost requests. Toggling reader mode makes use of this and sends out a privileged request since reader mode is rendered using a localhost URL but this only works if the reader mode page is not cached.

In all other cases where we are moving back/forth between the cached readerized version in the back forward list, the request fails because we don't make a privileged request.

[1] https://github.com/mozilla/firefox-ios/blob/master/Client/Frontend/Browser/BrowserViewController.swift#L2172
[2] https://github.com/mozilla/firefox-ios/blob/master/Client/Frontend/Browser/BrowserViewController.swift#L2603
Attachment #8766025 - Flags: review?(bnicholson)
Not sure if this is a great fix for it but not sure how to filter out the unprivileged request we're making :(
Assignee: nobody → sleroux
Status: NEW → ASSIGNED
Comment on attachment 8766025 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/1956

Seems reasonable to me. Back/forward events are implicitly "internal", and pages will only be added to the back/forward stack if they were allowed in the first place.
Attachment #8766025 - Flags: review?(bnicholson) → review+
master f1750617c823f381754c1d233141990ea675e03a

Ya that was my thinking too.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [needsuplift]
v5.x be1b2ea
Whiteboard: [needsuplift]
Verifying as fix on 5.0b14.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: