Changes

Jump to: navigation, search

Firefox/Windows 8 Integration

12,190 bytes removed, 23:44, 26 November 2013
Add MDN link for devtools instructions. Remove some outdated content
== Wiki Links ==
* [https://wiki.mozilla.org/[Firefox/Metro |Metro Projectproject page]] - meeting times, bug lists, project goals, team info, etc.* [[Firefox/Features|General Firefox Product Feature Tracking]] - Firefox feature tracking.* [https://wiki.mozilla.org/Firefox_Metro_UI Firefox Metro UI wiki] - including comp work and UX bug tracking.* [[Windows8|Metro Project Status]] - not really in use.* [[Windows_8_IntegrationWindows 8 Integration]] - General 3rd party browser collaboration page dedicated to overview, architecture, and challenges for vendors. Early research with Google.* [https://bugzilla.mozilla.org/buglist.cgi?resolution=---;op_sys=Windows%208;query_format=advanced;list_id=2566504 Windows 8 (desktop)]
* [[Firefox/Windows 8 Metro Style Guides]] - coding standards and UI guidelines
== Useful Bugzilla Queries Getting Involved ==[https://bugzilla.mozilla.org/buglist.cgi?resolution=---;op_sys=Windows%208%20Metro;status_whiteboard_type=notregexp;query_format=advanced;status_whiteboard=completed-elm;list_id=5745479 Win8 Metro] * Metro Firefox complete list [https://bugzilla.mozilla.org/buglist.cgi?type0-1-0=notsubstring;list_id=5756053;field0-1-0=status_whiteboard;field0-0-0=status_whiteboard;resolution=---;op_sys=Windows%208%20Metro;query_format=advanced;value0-2-0=MetroV1;value0-1-0=feature%3Dstory;field0-2-0=short_desc;type0-0-0=notsubstring;value0-0-0=feature%3Depic;type0-2-0=notsubstring Win8 Metro] * Metro Firefox complete list* Minus feature=story, epic, and MetroV1 [https://bugzilla.mozilla.org/buglist.cgi?type0-7-0=notsubstring;value0-7-0=feature%3Ddefect;field0-3-0=status_whiteboard;type0-1-0=notequals;type0-5-0=notsubstring;value0-5-0=feature%3Dwork;value0-4-0=feature%3Dstory;list_id=5745413;field0-1-0=blocked;field0-0-0=blocked;type0-4-0=notsubstring;resolution=---;field0-6-0=status_whiteboard;value0-3-0=feature%3Depic;field0-7-0=status_whiteboard;query_format=advanced;value0-2-0=MetroV1;value0-6-0=feature%3Dchange;value0-1-0=842686;type0-3-0=notsubstring;field0-2-0=short_desc;field0-5-0=status_whiteboard;field0-4-0=status_whiteboard;type0-6-0=notsubstring;type0-0-0=notequals;value0-0-0=841214;type0-2-0=notsubstring;product=Firefox%20for%20Metro Untagged Bugs]* Not blocked by various pm triage tracking bugs* Whiteboard does not contain feature=epic, work, change, defect, story* Summary does not contain 'MetroV1' [https://bugzilla.mozilla.org/buglist.cgi?chfield=%5BBug%20creation%5D;chfieldfrom=-72h;known_name=Last%20Three%20Days;columnlist=opendate%2Cbug_severity%2Cpriority%2Cop_sys%2Cassigned_to%2Cbug_status%2Cresolution%2Cshort_desc;resolution=---;op_sys=Windows%20XP;op_sys=Windows%20Vista;op_sys=Windows%207;op_sys=Windows%208;op_sys=Windows%208%20Metro;query_based_on=Last%20Three%20Days;chfieldto=Now;query_format=advanced;product=Firefox%20for%20Metro;list_id=5745420 Last three days] * Bugs filed against product Metro Firefox in the last three days [https://bugzilla.mozilla.org/buglist.cgi?list_id=4351876;resolution=---;op_sys=Windows%208%20Metro;status_whiteboard_type=notregexp;query_format=advanced;product=Core;product=Toolkit;product=www.mozilla.org Platform] * Core, Toolkit, mozilla.org
== Getting Involved ==
Contact Brian Bondy with questions (bbondy on [http://irc.mozilla.org IRC]). The Windows 8 integration team can be found in in #windev.
== Metro Builds ==
=== Nightly Builds === Update: 6/24/2013 Nightly builds are now being generated on mozilla-central. Nightly builds off the mozilla-central repository are currently available Firefox for Metro is included in the [http://ftp.mozillanightly.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/ Firefox build archivesdevelopment builds]. To set these builds up: * Install the browser using the latest installer* Open the desktop browser - when the default browser check occurs, select yes to set of Firefox as the default. You should also receive a for Windows prompt, select Nightly. This will associate Firefox with various protocol handlers and create the Firefox tile.* To set file handler associations use Window's Control Panel for default program associations. (Options -> Advanced -> General and click the default browser button at the bottom to open this panel.)  
For more detailed help on installing / setting the browser as the default, visit the [https://support.mozilla.org/en-US/kb/how-do-i-install-windows-8-metro-style-firefox Metro Firefox support page].
=== Nightly Crash Reports ===
[https://crash-stats.mozilla.com/topcrasherhome/byversionproducts/MetroFirefox/22.0a1/7 Firefox for Metrocrash stats]
=== Switching Default Browsers ===
=== Building on Linux or Mac OS X ===
 
'''This configuration is not official supported or tested.''' It might break without anyone noticing for a while. If it doesn't work, let us know and we can help fix it.
You can use the ''--enable-metro'' configure option and the ''-metrodesktop'' command-line flag to build and run the Metro UI on other platforms too. For details, see [http://limpet.net/mbrubeck/2012/09/19/metro-firefox-without-windows.html Metro Firefox without Windows 8].
<strike>{{bug|762519}}</strike> was filed on getting javascript's dump output going to OutputDebugString as well.
=== DOM Inspector === Getting DOM Inspector attached to builds running on the desktop takes a few tweaks. * Install the dom inspector addon (if you do not have it already) on your desktop firefox* Copy the 'inspector@mozilla.org' folder under your Firefox profile's extension directory over to your MetroFirefox profile extensions directory. (Example: C:\Users\Brian\AppData\Roaming\Mozilla\MetroFirefox\Profiles\amrcb8eg.default\extensions)* add an entry in inspector's install.rdf file for metrofx and make sure the maxVersion is set correctly. <pre><em:targetApplication> <Description> <em:id>{99bceaaa-e3c6-48c1-b981-ef9b46b67d60}</em:id> <em:minVersion>1.0a1</em:minVersion> <em:maxVersion>19.0a1</em:maxVersion> </Description></em:targetApplication></pre> * Add the [https://developer.mozilla.org/en/XULRunner_tips startDOMi function] to /browser/metro/base/content/browser.js.* Add a call to startDOMi() below the BrowserUI.init() call.** If you start the browser and see a blank screen with your patch containing startDOMi() applied, it probably means the extension hasn't been enabled/installed properly. Often its the last step of flipping values.* Tweak the following extension prefs in metro.js:<pre>pref("extensions.autoDisableScopes", 15);pref("extensions.minCompatibleAppVersion", "4.0");pref("extensions.strictCompatibility", false);</pre> * The extensions.json file will be created the first time MetroFirefox is run and discovers the inspector@mozilla.org extension content in the profile, but you have to flip a couple of values to make it actually work. Set the 'active' property to boolean true and the userDisabled property to boolean false. === Venkman Debugger === (10/5/12 - Note, since we've changed the app id, this probably doesn't work.) * Copy the '{f13b157f-b174-47e7-a34d-4815ddfdfeb8}' xpi under your Firefox profile's extension directory over to your MetroFirefox profile extensions directory. * Launch the browser with the '-venkman' command line option. === JS Shell Console ===
For debugging You can access the ede js shell and javascript JavaScript console are available on by typing Control-Shift-J. You can also set devtools.errorconsole.enabled to "true" in about:config to add an "Open error console" command to the app menu button in the navigation bar in desktop builds.
=== Crash Testing ===
== Using Devtools ==
* Tracking bug https://bugzilla.mozilla.org/show_bug.cgi?id=850019
* This hooks into the tools developed & maintained by the devtools team.
* They have been refactoring & improving their tools, so it <strong>highly encouraged</strong> to use Nightly builds on both sides of the pairing if possible.
=== Before you start ===* You must have metro installed & working* You must access to a classicSee [https:/desktop fx/developer. This need not be a local build* If you are connecting remotely, you must make sure both machines can ping each other before startingmozilla. This will save you a lot of grief later** on windows ipconfig in the cmdline is helpful in getting your ip address** on windows 8 this usually means disabling the firewall (not encouraged) or adding inboundorg/en-US/docs/Tools/Remote_Debugging/outbound firewall rules to allow them to connect.*** If you need it, Peter in IT now knows a fair bit about setting up those rules if you get lost or stuck.* If you are on wifi, both devices must be Firefox_for_Metro Remotely debugging Firefox for Metro] on the same network to communicate. Mozilla != Mozilla-G. ** It sounds silly but some of the windows devices only see Mozilla-G and the older company issued thinkpads do not have the hardware MDN for itinstructions.
=== Setup ===* Go to aboutNotes:config on classic/desktop fx** devtools.debugger.force-local -> false** devtools.debugger.remote-enabled -> true** Check that these values are what you want*** devtools.debugger.remote-port -> 6000 (I'd leave this one alone unless you have a compelling reason to change it)** If you don't have these, you'll probably want these as well*** devtools.debugger.log -> true*** browser.dom.window.dump.enabled -> true* Restart classic/desktop fx** You need to restart for the next step to work.* Navigate Firefox button -> Web Developer -> "Connect.." entry between the Error Console" & "Get More Tools" Entry** https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Debugging/Setting_up is what this step is based on
* Go to about:config on metrofx
** devtools.debugger.force-local -> false
** devtools.debugger.remote-enabled -> true
** and you may want
*** devtools.chrome.enabled -> true (if you want to debug the browser code, not just web content)
*** devtools.debugger.log -> true
*** devtools.errorconsole.enabled -> true
*** browser.dom.window.dump.enabled -> true
** devtools.debugger.remote-port -> 6000 (again I'd leave this one alone)
** Restart the metro browser.
** Upon restart, you may get a firewall notification dialog on the tablet's desktop which you'll need to approve.
 
* Make sure metrofx is started (and not suspended)
* In classic fx, click the "Connect..." entry
** Depending on your version, this will launch a new tab or a new panel on firefox
** Enter the ip of metrofx if you are connecting remotely and the port number if you've changed them.
** If you are connecting on a localhost, you shouldn't need to change the default settings.
* Click the connect button in classic fx
* On metrofx a strap(the metro version of the modal dialog) will appear about an incoming connection.
** Click/tap "allow"
* On classic fx, the connect page will reload with a list of active tabs & processes. Usually 'main process' is the most interesting.
* The devtools console will appear & the aforementioned tab on classic fx will disappear
* Sally forth & debug!
 
=== Notes ===
* I usually pair on localhost, using an external monitor so I can see metrofx & classicfx at the same time.
* If you are using localhost without an external monitor, beware of windows suspending the metrofx while its waiting for the incoming connection. This will cause the pairing to fail. In Windows 8.1 you can use split-screen to keep the desktop and the Metro browser visible at the same time.
* While you can pair classic/metrofx running out of the same obj dir, I frequently experienced unexpected hangs and crashes as a result.
* if you close the devtools window, this usually results in the metro browser shutting down
Note, for switching back to nightly profiling, set the default symbol server url in classic back to http://symbolapi.mozilla.org/.
== Samsung Series 7 == The Series seven is the first device we started developing with. Details below on getting the hardware set up with Windows 8. * To order, file a bug under mozilla.org, Server Operations: Desktop Issues. See {{bug|738613}}, CC your PM or Asa. * Once you have the tablet, dock, Development and keyboard, unpack. Charge up the device. It'll be running Win7, ignore all the default software. * Download the 64-bit (3.6 gig) Win8 ISO from \\fs2\IT\Microsoft. Add your name to the list of people who will need product keys in {{bug|783811}}. Burn the ISO to a suitable memory stick. For burning on Windows you'll need to download and install the [http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool Windows 7 USB DVD Download Tool] from Microsoft. For burning on mac? * Once you have the ISO burned, plug the USB stick into the tablet's dock. Browse to the USB drive and run "setup.exe". When prompted choose that you want to save nothing from the previous install. * Samsung provides an instruction manual on hooking up the Bluetooth keyboard. You can do this after you've installed Win8 as the Win7 desktop instructions are applicable on Win8 desktop. * After the tablet is set up, download Firefox nightly or build a local copy and start debugging! === Firmware Updates === For more precise touch input, especially with tap and hold, install the "Touch Screen Sensor Firmware Configuration Updater Tool". Updating the system bios from 7 to 10 doesn't hurt either. Make sure to reboot the system after the install. [http://www.samsung.com/global/windowspreview/ Samsung Link] === Samsung Series 7 Tweaks === * To fix auto changing brightness problems for wipe Win8 installs:** Open desktop** click/tap on the battery icon in the taskbar, select "More power options"** Select your current power plan or create a new plan via the link on the left.** Under the power plan select "Change advanced power settings"** scroll down to "Display" and expand** Find the sub-option "Enable adaptive brightness" and expand** disable both options under this sub-option == Metro Planning Notes ==
(Older content from the original planning stage)
This is summary of our work / planning for a Win8 Metro browser. For testing purposes we have been working with the /mobile/xul Fennec browser. Moving forward we would like to take the base Fennec XUL code and Metro specific code we've already developed (currently on Elm with some build related work already on mc) and integrate this in with the default Firefox build and install.
We are interested in getting as much feedback as possible from stake holders and from people who have worked with these newer platforms. If you have Win8 up and running in a vm or on a test system, there are details here on how to get builds going, how to register the browser, and test builds for installing.
 
* [https://bugzilla.mozilla.org/buglist.cgi?resolution=---;op_sys=Windows%208%20Metro;query_format=advanced;list_id=2566518 Metro specific bug list]
* [http://piercedotzler.com/asa/Developing_a_Metro-Style_Enabled_Desktop_Browser.html#_Toc318127097 Developing Metro Style Enabled Desktop Browsers]
By in large platform was a nice fit for Metro. We ran into surprisingly few problems. It took us about a week to get a basic version of Fennec running in the environment and most of that time was spent combing through the registration/integration doc Microsoft sent us. Below are some specific details on the areas of the repo we are currently leveraging.
 
<strong>nsBrowserApp</strong>
 
<strike>Currently using fennec’s nsBrowserApp.</strike>
 
<strong>chrome interface markup and css</strong> (different)
Metro apps are single window applications. The current desktop UI does not fit this new environment. There are no secondary windows we create. Secondary UI (file pickers, warnings, message boxes, toasts) are all displayed and managed by the os. The interfaces to these features are also async. We will provide interfaces for invoking these. Some have already been integrated on Elm (file picker for example).
<strong>browser comps</strong> (different) <strong>dictionaries, hyphenation, res, searchplugins, extensions, plugins</strong> (shared) Due to the differences in view model most of /browser components code can’t be leveraged. Fennec's script based components are currently in use. [http://mxr.mozilla.org/mozilla-central/source/mobilebrowser/xulmetro/components/]
The current metro browser leverages the Fennec front end app code but we could switch to firefox’s code base and enable / augment what we need for metro.
Generally we’re currently leveraging a majority of our common code base without issue. Threading, timers, networking, ssl, layout, gfx, etc. have all fit in really well. Misc. detail -
* gfx - not currently using accelerated layers but plan to in the near future. The surface rendered to in Metro is D2D and there is no GDI fallback. As such there are some issues with blacklisted hardware.* e10s - currently Currently using Fennec’s out of in-process tabscontent (no child processes).
* Accessibility - not integrated yet.
* Netwerk - no issues.
* toolkit - very little of this is in use. Crash reporter UI will need work/integration.
* xpcom - no issues.
 
=== A tentative proposal ===
 
* Copy mobile/xul code down to browser level in /browser/metro.
* Integrate metro startup into firefox's nsBrowserApp {{bug|747347}}.
* Integrate building this new area into the current desktop firefox build. {{bug|747347}}
* Fixup the firefox installer so that we bring both browsers down in a single unified windows install. {{bug|737833}}
* Share the runtime between the two apps in the install. <strong>[completed]</strong>
* Have nsBrowserApp communicate to xul lib what environment we are running in. <strong>[completed]</strong>
* Dynamically switch out which code path we want in xul lib where necessary. <strong>[completed]</strong>
* Organize dist interface code and browser comps such that desktop firefox install layout remains unchanged. Layer metro specific resources down in such a way that the two sets of resources do not conflict. {{bug|755724}}
* <strike>Share a single profile between both browsers</strike> or Sync two profiles on the same machine.
 
Elm to mozilla-central migration tracking bug: {{bug|747347}}
==== Pros and Cons ====
=== Big Issues ===
* Windows XP - The current VC11 Beta redist runtime is not compatible with XP. (<strike>{{bug|744942}}</strike> - FIXED)
* Profiles – Certain areas of the user’s profile will need to be shared between two concurrently running browser apps. We’ve just begun exploring ways to do this. Potential solution might involve a mysql database connection shim that leverages a profile broker and IPC so both browsers can talk to the same profile. We also might consider using Sync. There are some hurdles here to overcome. <strong>[A decision was made to use Sync initially.]</strong>
* Accessibility - This area of the code base will be in heavy use in the Metro environment with touch interfaces. Our accessibility code will require performance work and may require a new UI Automation adapter since Win8 leverages UI Automation exclusively.
Canmove, confirm
1,584
edits

Navigation menu