Closed Bug 1072781 Opened 5 years ago Closed 5 years ago

[Window Management] Get screenshot for homescreen app by new getScreenshot API

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alive, Assigned: steveck)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
alive
: review+
Details | Review
Now we are always ignoring any getscreenshot request to homescreen because in the past we cannot fetch the transparent background for the mozbrowser iframe.

We should try to implement this because :timdream had completed https://bugzilla.mozilla.org/show_bug.cgi?id=878003
Lemme know if either of you are interested to take.
Flags: needinfo?(schung)
Flags: needinfo?(evanxd)
I'll take a look first in sprint 6
Flags: needinfo?(schung)
Flags: needinfo?(evanxd)
Attached file Link to github
Hi alive, I simply remove the homescreen checking in app window close handler, since it's the only place that blocks the screenshot for homescreen. Please correct me if any ignorance, thanks.
Attachment #8514122 - Flags: review?(alive)
Assignee: nobody → schung
Status: NEW → ASSIGNED
Comment on attachment 8514122 [details] [review]
Link to github

I am sorry if this not clear enough, but the core part of this issue is we should enable PNG format in getScreen browserAPI here:
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/browser_mixin.js#L94

See https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement.getScreenshot
Attachment #8514122 - Flags: review?(alive)
Comment on attachment 8514122 [details] [review]
Link to github

Applied mime-type for screenshot creation. I move the checking inside the browser-mixing to handle this in more general way, and hop this could handle screenshot properly.
Attachment #8514122 - Flags: review?(alive)
Comment on attachment 8514122 [details] [review]
Link to github

r+ with nits, lemme know you have problems.
Attachment #8514122 - Flags: review?(alive) → review+
Thanks!
In master: 995b6794eb984ca5cd13884acab250dd7f4f11db
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.