Closed Bug 1050319 Opened 10 years ago Closed 10 years ago

Implement 'open new window' item in browser overflow menu

Categories

(Firefox OS Graveyard :: Gaia::System::Browser Chrome, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S2 (15aug)

People

(Reporter: cwiiis, Assigned: cwiiis)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 1 obsolete file)

This adds the option and adds a placeholder implementation that uses a view activity to open a minimal data uri. To work properly, this will need bug 1041620. I'd have preferred to use window.open, but that doesn't work for some reason :/ The branch can be viewed here: https://github.com/Cwiiis/gaia/tree/bug1050319-add-new-window-to-system-browser
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Attachment #8469423 - Flags: review?(21)
(In reply to Chris Lord [:cwiiis] from comment #1) > Created attachment 8469423 [details] [diff] [review] > Add 'New Window' to browser system overflow menu > > This adds the option and adds a placeholder implementation that uses a view > activity to open a minimal data uri. To work properly, this will need bug > 1041620. > > I'd have preferred to use window.open, but that doesn't work for some reason > :/ window.open will end up firing a mozbrowseropenwindow in b2g/, where nobody is listening for it. Also window.open may results into opening the window into the same process as the system app, which may be unsecure, so this is a good thing that it does not work until some platform fixes make it better.
Comment on attachment 8469423 [details] [diff] [review] Add 'New Window' to browser system overflow menu Review of attachment 8469423 [details] [diff] [review]: ----------------------------------------------------------------- r+ with nits and a test for the onNewWindow thing. ::: apps/system/js/app_chrome.js @@ +241,5 @@ > this.hideOverflowMenu(); > break; > > + case this.newWindowButton: > + evt.stopImmediatePropagation(); More or less the same question than the Share bug. @@ +588,5 @@ > + // XXX Until we have a start page (Bug 1041620), open a new window with > + // the minimal valid URL that doesn't incur bandwidth use. > + var activity = new MozActivity({name: 'view', data: { > + type: 'url', > + url: 'data:1' Can't we just do a about:blank instead of this ? I guess it does not matter since it is coming soon... @@ +591,5 @@ > + type: 'url', > + url: 'data:1' > + }}); > + // For jshint > + activity.onsuccess = function() {}; Maybe /*jshint -W031 */ new MozActivity(....); ::: apps/system/style/chrome/chrome.css @@ +359,5 @@ > } > > +.option#new-window > .icon { > + background-image: url("images/menu_new_window.png"); > +} Does it miss the new image or does bugzilla lies to me ?
Attachment #8469423 - Flags: review?(21) → review+
Whiteboard: [systemsfe]
Target Milestone: --- → 2.1 S2 (15aug)
Depends on: 1041620
Addressed Vivien's review comments, but given that the method of launching a new window is now different, would appreciate review of the whole patch again really.
Attachment #8469423 - Attachment is obsolete: true
Attachment #8472497 - Flags: review?(kgrandon)
Comment on attachment 8472497 [details] Add 'New Window' to browser system overflow menu (v2, with test) Looks good. I am mainly concerned about adding a settings observer for every app window. Can you address that and re-flag me for review?
Attachment #8472497 - Flags: review?(kgrandon) → feedback+
Comment on attachment 8472497 [details] Add 'New Window' to browser system overflow menu (v2, with test) Wow, that is a silly mistake... Corrected, thanks for spotting :)
Attachment #8472497 - Flags: review?(kgrandon)
Comment on attachment 8472497 [details] Add 'New Window' to browser system overflow menu (v2, with test) Great work as usual. Thanks Chris!
Attachment #8472497 - Flags: review?(kgrandon) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
this commit broke unit test of build system.
No longer blocks: 1054822
Depends on: 1054822
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: