Closed Bug 959800 Opened 12 years ago Closed 12 years ago

[Offline] mozbrowser iframes don't display correct offline content

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, firefox27 wontfix, firefox28 fixed, firefox29 fixed, b2g-v1.2 unaffected, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)

VERIFIED FIXED
1.4 S1 (14feb)
blocking-b2g 1.3+
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed
firefox29 --- fixed
b2g-v1.2 --- unaffected
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed

People

(Reporter: jschmitt, Assigned: mikehenrty)

References

Details

(Keywords: regression, Whiteboard: dogfood1.3 [systemsfe][p=5])

Attachments

(4 files, 2 obsolete files)

Attached image Close_button.png
Description: The user encountered an error message that the user could not close when selecting the close button while trying to import a Google account. Repro Steps: 1) Updated Buri to BuildID: 20140113004002 2) Proceed to setting and turn off wifi and data 3) Proceed to the Calendar app 4) Select the 'Drawer' icon 5) Select the '+' icon 6) Select 'Google' Actual: Selecting the 'Cancel' button does not cancel the current action or close the error message. Expected: Selecting the 'Cancel' button will take the user back to the account page and close the error message. Environmental Variables: Device: Buri 1.3 MOZ BuildID: 20140113004002 Gaia: b3fc4f712562ee92b0ed0bd17abc61be9a36a8da Gecko: 5bb1837de7c0 Version: 28.0a2 Firmware Version: V1.2-device.cfg
Does not reproduce in the calendar app on 1.2 Environmental Variables: Device: Buri 1.2 COM BuildID: 20140113004002 Gaia: 539a25e1887b902b8b25038c547048e691bd97f6 Gecko: e672faf1e6a1 Version: 26.0 RIL Version: 01.02.00.019.102 Firmware Version: V1.2-device.cfg
Whiteboard: dogfood1.3
This likely implies that the patch in bug 942325 didn't fix the bug correctly, as this means we're still showing the close button on a mozbrowser iframe.
Blocks: 882186
blocking-b2g: --- → 1.3?
Component: Gaia::Calendar → Gaia::System::Window Mgmt
Keywords: regression
Whiteboard: dogfood1.3 → dogfood1.3 [systemsfe]
Gregor, Please investigate for sfe.
Flags: needinfo?(anygregor)
Mike, can you investigate?
Flags: needinfo?(anygregor) → needinfo?(mhenretty)
Yup, bug 942325 didn't fix the mozbrowser iframe case, since we use mozbrowser for apps too. I didn't know we use mozbrowser frames within apps. I'm wondering if we can get away with not using mozbrowser iframe here: https://github.com/mozilla-b2g/gaia/blob/4416166f0d228cdd727d1a425900dc9177088314/apps/calendar/js/oauth_window.js#L139 In any case, I will take this.
Assignee: nobody → mhenretty
Flags: needinfo?(mhenretty)
(In reply to Michael Henretty [:mhenretty] from comment #5) > Yup, bug 942325 didn't fix the mozbrowser iframe case, since we use > mozbrowser for apps too. I didn't know we use mozbrowser frames within apps. > I'm wondering if we can get away with not using mozbrowser iframe here: > > https://github.com/mozilla-b2g/gaia/blob/ > 4416166f0d228cdd727d1a425900dc9177088314/apps/calendar/js/oauth_window. > js#L139 > > > In any case, I will take this. mozbrowser is allowed to be used by third party privileged apps, so I don't think we can solve this by removing the mozbrowser iframe from the calendar app. We really need to fix this generally for all mozbrowser iframes.
I spoke with Fabrice about this on IRC. Currently there is no way to tell the difference between being in an app vs being in a mozbrowser iframe. It seems we will need to pass a flag from gecko "isApp" or something to detect the difference from net_error.
blocking-b2g: 1.3? → 1.3+
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
Summary: [B2G][Calendar] "Close" button on app error page doesn't close → [Offline] mozbrowser iframes don't display correct offline content
Whiteboard: dogfood1.3 [systemsfe] → dogfood1.3 [systemsfe][p=5]
(In reply to Michael Henretty [:mhenretty] from comment #7) > Currently there is no way to tell > the difference between being in an app vs being in a mozbrowser iframe. This is not the exact problem. The real problem is that, according to spec, browser tabs need to show both "Retry" and "Close" buttons, whereas iframes need to have only a "Retry" button. Right now, there is no way to distinguish between a browser tab, and a mozbrowser iframe within an app from net_error.html. I think the best way forward is to embed the browser manifest url into net_error.html at build time, so that we can check if we are in a browser tab at runtime.
Note: this will not pass in Travis until we land the above gecko patch.
Attachment #8366321 - Flags: review?(fabrice)
Comment on attachment 8366307 [details] [diff] [review] Append frameType to about:error URL Review of attachment 8366307 [details] [diff] [review]: ----------------------------------------------------------------- I'm really not a fan of using the int value there. You should map it to the "regular", "browser", "app" string instead.
Attachment #8366307 - Flags: review?(fabrice)
Attachment #8366321 - Flags: review?(fabrice)
Attached patch frametype.patch (obsolete) — Splinter Review
Attachment #8366307 - Attachment is obsolete: true
Attachment #8367019 - Flags: review?(fabrice)
Comment on attachment 8366321 [details] [review] Use frameType, and browser manifest url to determine if we are framed Updated the pull request to use descriptive frameType strings.
Attachment #8366321 - Flags: review?(fabrice)
Comment on attachment 8367019 [details] [diff] [review] frametype.patch Review of attachment 8367019 [details] [diff] [review]: ----------------------------------------------------------------- Please ask review to a docShell peer, like bz. ::: docshell/base/nsDocShell.cpp @@ +4776,5 @@ > errorPageUrl.AppendLiteral("&m="); > errorPageUrl.AppendASCII(manifestParam.get()); > } > > + nsCString frameType = NS_ConvertUTF16toUTF8(FrameTypeToString(mFrameType)); s/nsCString/nsAutoCString ::: docshell/base/nsDocShell.h @@ +666,5 @@ > eFrameTypeBrowser, > eFrameTypeApp > }; > > + static const nsString FrameTypeToString(FrameType aFrameType) you could use nsAutoCString and NS_LITERAL_CSTRING since this is what you actually want.
Attachment #8367019 - Flags: review?(fabrice) → feedback+
Attachment #8366321 - Flags: review?(fabrice) → review+
Hi BZ, could you review this change to DocShell?
Attachment #8367019 - Attachment is obsolete: true
Attachment #8368233 - Flags: superreview?(bzbarsky)
Comment on attachment 8368233 [details] [diff] [review] Add frameType to about:*error documentURI sr=me
Attachment #8368233 - Flags: superreview?(bzbarsky) → superreview+
Whiteboard: dogfood1.3 [systemsfe][p=5] → dogfood1.3 [systemsfe][p=5][keep-open]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Keywords: verifyme
QA Contact: jsmith
https://hg.mozilla.org/releases/mozilla-aurora/rev/2ae9d67a8df5 Looks like the Gaia patch has conflicts with the v1.3 branch. I'm going to have to leave that for someone else to cherry-pick.
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #20) > https://hg.mozilla.org/releases/mozilla-aurora/rev/2ae9d67a8df5 > > Looks like the Gaia patch has conflicts with the v1.3 branch. I'm going to > have to leave that for someone else to cherry-pick. Mike - Can you cherry pick this?
Flags: needinfo?(mhenretty)
Submitting a new pull request for the uplift to make sure this doesn't burn aurora travis. https://travis-ci.org/mozilla-b2g/gaia/builds/18114735
Flags: needinfo?(mhenretty)
Attached file 1.3 Specific Uplift
Needed to change some existing 1.3 specific code, so having aus take a look.
Attachment #8369922 - Flags: review?(aus)
Comment on attachment 8369922 [details] [review] 1.3 Specific Uplift Looks good! I like the addition of caching the error as well. When we have travis green, let's land it!
Attachment #8369922 - Flags: review?(aus) → review+
Verified on trunk using comment 0's STR - lgtm.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Target Milestone: 1.3 C3/1.4 S3(31jan) → 1.4 S1 (14feb)
Whiteboard: dogfood1.3 [systemsfe][p=5][keep-open] → dogfood1.3 [systemsfe][p=5]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: