Closed
Bug 769848
Opened 13 years ago
Closed 12 years ago
window.resizeTo fails is blocked in apps
Categories
(Firefox Graveyard :: Webapp Runtime, defect, P2)
Firefox Graveyard
Webapp Runtime
Tracking
(firefox16 wontfix)
RESOLVED
FIXED
Firefox 26
| Tracking | Status | |
|---|---|---|
| firefox16 | --- | wontfix |
People
(Reporter: dmosedale, Assigned: marco)
References
Details
Attachments
(1 file, 3 obsolete files)
|
1.82 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
Tested in an app installed on a Mac Nightly with this UA: 16.0a1 (2012-06-29).
I have game with a canvas in it, and I want to resize the window to exactly the size of the canvas. resizeTo simply does nothing, leaving me with a canvas and a giant ell of whitespace that looks very odd.
This is presumably a consequence of Gecko intentionally blocking it in untrusted content <https://bugzilla.mozilla.org/show_bug.cgi?id=565541#c24>. I would expect that this restriction wants to be lifted in the more trusted app context.
| Reporter | ||
Updated•13 years ago
|
Group: webtools-security
Updated•13 years ago
|
Assignee: ianb → nobody
Component: HTML → Webapp Runtime
Product: Web Apps → Firefox
QA Contact: webapp-runtime
Updated•13 years ago
|
QA Contact: jsmith
Updated•13 years ago
|
Priority: -- → P2
Updated•13 years ago
|
status-firefox16:
--- → wontfix
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
| Assignee | ||
Comment 1•12 years ago
|
||
The other possible approach is overriding the resizeTo function and calling it again from Chrome code (I'm not sure it would actually work, it's just an idea).
| Assignee | ||
Comment 2•12 years ago
|
||
Forgot to qref...
Attachment #782052 -
Attachment is obsolete: true
Attachment #782052 -
Flags: feedback?(myk)
Attachment #782053 -
Flags: feedback?(myk)
Comment 3•12 years ago
|
||
Comment on attachment 782053 [details] [diff] [review]
allow_window_resize_webapps
This seems reasonable to me, but I'd like to see what a DOM peer thinks about it.
jst: apps running in the desktop runtime should be able to determine the sizes of their windows, so we're trying to figure out the best way to enable resizeTo in the runtime (without affecting its behavior in desktop Firefox).
(In reply to Marco Castelluccio [:marco] from comment #1)
> The other possible approach is overriding the resizeTo function and calling
> it again from Chrome code (I'm not sure it would actually work, it's just an
> idea).
That might work, but it seems better to make the platform be runtime-aware.
Attachment #782053 -
Flags: feedback?(myk)
Attachment #782053 -
Flags: feedback?(jst)
Attachment #782053 -
Flags: feedback+
Comment 4•12 years ago
|
||
Comment on attachment 782053 [details] [diff] [review]
allow_window_resize_webapps
In general this seems fine, but this patch as written is not good enough. In particular we must not bypass the drag service code at the end of this changed method. feedback- because of that.
Attachment #782053 -
Flags: feedback?(jst) → feedback-
| Assignee | ||
Comment 5•12 years ago
|
||
Attachment #782053 -
Attachment is obsolete: true
Attachment #787085 -
Flags: review?(jst)
Comment 6•12 years ago
|
||
Comment on attachment 787085 [details] [diff] [review]
Patch
if (mDocShell) {
bool allow;
nsresult rv = mDocShell->GetAllowWindowControl(&allow);
+
+ // This preference is useful for the webapp runtime. Webapps should be able
+ // to resize or move their window.
+ if (Preferences::GetBool("dom.always_allow_move_resize_window", false)) {
+ allow = true;
+ }
+
Given that this just ignores what GetAllowWindowControl() says we could just avoid making that call here. I.e. combine the pref check with the mDocShell null check.
r=jst with that changed. I'd happily look over another patch once you have it...
Attachment #787085 -
Flags: review?(jst) → review+
| Assignee | ||
Comment 7•12 years ago
|
||
Attachment #787085 -
Attachment is obsolete: true
Attachment #787134 -
Flags: review?(jst)
Comment 8•12 years ago
|
||
Comment on attachment 787134 [details] [diff] [review]
Patch v2
Looks good!
Attachment #787134 -
Flags: review?(jst) → review+
| Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 9•12 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 10•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•