Closed
Bug 1237823
Opened 10 years ago
Closed 10 years ago
[Simulator] The Simulator can't resize for full screen on Mac.
Categories
(Firefox OS Graveyard :: Simulator, defect)
Tracking
(firefox47 fixed)
RESOLVED
FIXED
2.6 S9 - 3/11
| Tracking | Status | |
|---|---|---|
| firefox47 | --- | fixed |
People
(Reporter: mantaroh, Assigned: mantaroh)
Details
Attachments
(2 files, 2 obsolete files)
|
3.98 MB,
video/quicktime
|
Details | |
|
1.64 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
The simulator can't resize to full screen size on OSX.
The simulator repeated full screen and normal size.
Reproduce Step:
1. Launch the Firefox OS 2.6 Simulaotr on OSX.
2. Click the maximize button.
Actually Result:
The simulator alternated between full screen size and normal size.
Expected Result:
We can resize to full screen.
This bug reported by twitter(https://twitter.com/hikaru__m/status/685140804805853184).
Additional Information:
- This phenomenon occurred on Max OS only.
- This phenomenon occurred when click maximize button with option button.[1]
[1] http://osxdaily.com/2015/03/11/change-the-green-button-maximize-behavior-in-os-x-yosemite-with-bettertouchtool/
| Assignee | ||
Comment 1•10 years ago
|
||
Hi Janx,
I investigating this bug. Please let me ask the question about Simulator's window.
It is my understanding that Mulet and B2G-Desktop used shell.html as Chrome window. Am I right?
Flags: needinfo?(janx)
Comment 2•10 years ago
|
||
Hi Mantaroh,
Thank you for looking into this bug. I believe that both Mulet and B2G-Desktop use shell.html, but they probably use different chrome windows around that.
Alex should know more about this.
Flags: needinfo?(janx) → needinfo?(poirot.alex)
I found this bug.
This environment is
Mac OSX 10.10.5 Yosemite,
Firefox Developer Edition 45.0a2,
Simulator Firefox OS 2.2 or later(2.2, 2.6, 2.6_tv, (3.0)).
Comment 4•10 years ago
|
||
(In reply to Mantaroh Yoshinaga[:mantaroh] from comment #1)
> Hi Janx,
>
> I investigating this bug. Please let me ask the question about Simulator's
> window.
>
> It is my understanding that Mulet and B2G-Desktop used shell.html as Chrome
> window. Am I right?
Mulet uses browser.xul (the Firefox top level document), but b2g-desktop and simulators are using shell.html. Simulators are based on mulet, but overrides the top level document back to shell.html.
So that even if simulators are based on mulet, they act like b2g-desktop.
This bug most likely lives in this function:
http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/screen.js#193
Flags: needinfo?(poirot.alex)
| Assignee | ||
Comment 5•10 years ago
|
||
Thanks janx, ochameau.
Sorry for late reply.
I can reproduce on Desktop using by the following code, in case of OSX.
----------------------
window.onresize = (msg) => {
timeoutId = setTimeout(function() {
timeoutId = undefined;
window.resizeTo(window.outerWidth, window.outerHeight);
},0);
};
----------------------
I don't know the reason yet.
I'll continue investigating this problem.
Assignee: nobody → mantaroh
| Assignee | ||
Comment 6•10 years ago
|
||
Perhaps, The reason of this phenomenon was reduced window width when resize to maximum window size.
Reproduce Step:
1) Launch browser and go to "about:about".
2) open the |Web Console|.
3) execute the following scripts.
3-1 ) window.onresize = (msg) => { console.log(window.outerWidth); };
3-2 ) window.resizeTo(screen.availWidth, screen.availHeight);
3-3 ) window.resizeTo(window.outerWidth, window.outerHeight);
Actually Result:
window width is dwindling.
Expected Result:
window width is NOT dwindling.
| Assignee | ||
Comment 7•10 years ago
|
||
| Assignee | ||
Comment 8•10 years ago
|
||
| Assignee | ||
Comment 9•10 years ago
|
||
I think that cocoa widget is identified maximized window size when step 3-2) of comment #6.
And cocoa widget zoomed when step 3-3 of comment #6 [1]. This condition is occurred by nsXULWindow::SetSize[2].
So We had better to change the gaia part in order to prevent this phenomenon.
[1] https://dxr.mozilla.org/mozilla-central/rev/584870f1cbc5d060a57e147ce249f736956e2b62/widget/cocoa/nsCocoaWindow.mm#1235
[2] https://dxr.mozilla.org/mozilla-central/rev/584870f1cbc5d060a57e147ce249f736956e2b62/xpfe/appshell/nsXULWindow.cpp#641
| Assignee | ||
Comment 10•10 years ago
|
||
rebased and added check-in comment.
Hi Alexandre,
Could you confirm this patch?
I would like to change screen.js in order to prevent endless loop.
Attachment #8713429 -
Attachment is obsolete: true
Attachment #8714688 -
Flags: review?(poirot.alex)
Comment 11•10 years ago
|
||
Comment on attachment 8714688 [details] [diff] [review]
Not call resizeTo() when resize to same width as last time.
Review of attachment 8714688 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not peer of that code. But that looks good to me.
Please submit an updated patch and ask review to :fabrice.
::: b2g/chrome/content/screen.js
@@ +158,5 @@
> +
> + if (lastResizedWidth == (width + chromewidth)) {
> + return;
> + }
> + lastResizedWidth = (width + chromewidth);
Would that work with:
if (width+chromewidth == window.outerWidth) {
return;
}
Or:
if (lastResizedWidth == width) {
return;
}
lastResizedWidth = width;
It would be better to use the first if that works.
Attachment #8714688 -
Flags: review?(poirot.alex) → feedback+
| Assignee | ||
Comment 12•10 years ago
|
||
Thanks Alexandre.
(In reply to Alexandre Poirot [:ochameau] from comment #11)
> I'm not peer of that code. But that looks good to me.
> Please submit an updated patch and ask review to :fabrice.
OK.
I'll request to fabrice.
> ::: b2g/chrome/content/screen.js
> @@ +158,5 @@
> > +
> > + if (lastResizedWidth == (width + chromewidth)) {
> > + return;
> > + }
> > + lastResizedWidth = (width + chromewidth);
>
> Would that work with:
> if (width+chromewidth == window.outerWidth) {
> return;
> }
> Or:
> if (lastResizedWidth == width) {
> return;
> }
> lastResizedWidth = width;
>
> It would be better to use the first if that works.
I guess that we had better to choice second.
The outerWidth same value of |width+chromewidth| already this statement.
Hi fabrice.
I work on Mulet resizing problem on Mac OSX.
Could you confirm this patch?
Attachment #8714688 -
Attachment is obsolete: true
Attachment #8715107 -
Flags: review?(fabrice)
Updated•10 years ago
|
Attachment #8715107 -
Flags: review?(fabrice) → review+
| Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Comment 14•10 years ago
|
||
Keywords: checkin-needed
Comment 15•10 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 2.6 S9 - 3/11
You need to log in
before you can comment on or make changes to this bug.
Description
•