9
edits
No edit summary |
|||
(46 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== | == Links == | ||
* [ | * [[Firefox/Metro|Metro project page]] - meeting times, bug lists, project goals, team info, etc. | ||
* [[ | * [[Windows 8 Integration]] - General 3rd party browser collaboration page dedicated to overview, architecture, and challenges for vendors. Early research with Google. | ||
* [[Firefox/Windows 8 Metro Style Guides]] - coding standards and UI guidelines | * [[Firefox/Windows 8 Metro Style Guides]] - coding standards and UI guidelines | ||
* [https://mail.mozilla.org/listinfo/metro Mailing list] - archive and subscription info for the metro@mozilla.org discussion list | |||
== | == 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. | |||
=== Bugzilla === | |||
Please file front end bugs under the product [https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20for%20Metro Firefox for Metro]. Back end bugs should be filed in the appropriate Platform component. | |||
[https://bugzilla.mozilla.org/ | |||
===Blockers=== | |||
We are using the following whiteboard tags to track bugs that block our release with Firefox 28: | |||
* | * [beta28] - for bugs that must be fixed before Firefox 28 reaches the beta channel | ||
* [release28] - for bugs that mut be fixed before Firefox 28 reaches the release channel | |||
Queries: | |||
* [https://bugzilla.mozilla.org/buglist.cgi?quicksearch=ALL+sw:beta28,release28 all blockers] | |||
* [https://bugzilla.mozilla.org/buglist.cgi?quicksearch=sw:beta28,release28+-sw:fixed-in-fx-team open blockers] | |||
* [https://bugzilla.mozilla.org/buglist.cgi?quicksearch=sw:beta28,release28+@nobody unassigned blockers] | |||
* [http://mzl.la/1gU09QW blockers awaiting Beta nomination] | |||
* [http://mzl.la/1ngxYJp blockers awaiting Beta landing] | |||
=== Front End Windows 8 Development === | === Front End Windows 8 Development === | ||
Line 46: | Line 36: | ||
* The front end code is located in browser/metro | * The front end code is located in browser/metro | ||
* Style guidelines of all types can be found on https://wiki.mozilla.org/Firefox/Windows_8_Metro_Style_Guides | * Style guidelines of all types can be found on https://wiki.mozilla.org/Firefox/Windows_8_Metro_Style_Guides | ||
=== Platform Integration Windows 8 Development === | === Platform Integration Windows 8 Development === | ||
Line 57: | Line 46: | ||
* You can find Windows 8 platform integration bugs here http://goo.gl/B0Xjo or by doing an advanced bugzilla search for: OS = Windows 8 Metro, Product = Core, Component = Widget: Win32 | * You can find Windows 8 platform integration bugs here http://goo.gl/B0Xjo or by doing an advanced bugzilla search for: OS = Windows 8 Metro, Product = Core, Component = Widget: Win32 | ||
== | == Firefox for Windows 8 Builds == | ||
Firefox for Windows 8 is currently included in Nightly, Aurora, and Beta builds of Firefox for Windows. It will reach the release channel with Firefox 28 around March 17th, 2014. | |||
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]. | 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]. | ||
=== | === Browser Crash Reports === | ||
[https://crash-stats.mozilla.com/ | [https://crash-stats.mozilla.com/home/products/MetroFirefox Firefox for Metro crash stats] | ||
=== Switching Default Browsers === | === Switching Default Browsers === | ||
Line 177: | Line 153: | ||
<pre> | <pre> | ||
./mach run -metrodesktop | |||
</pre> | </pre> | ||
To | To run in the real "immersive" (full-screen) Metro environment, first launch the desktop browser by typing: | ||
<pre> | |||
./mach run | |||
</pre> | |||
Then press the "Relaunch in Windows 8 Touch" button in the menu to switch to Metro mode. See [https://support.mozilla.org/en-US/kb/how-do-i-install-windows-8-metro-style-firefox#w_step-2-launch-windows-8-metro-style-firefox this support page] for details. | |||
Note, for debug builds, see [[Firefox/Windows_8_Integration#Logging_Assertions]]. | Note, for debug builds, see [[Firefox/Windows_8_Integration#Logging_Assertions]]. | ||
Line 200: | Line 175: | ||
Note on the desktop we use the desktop's Win32/Widget backend. This can behave differently from the Win8 WinRT backend. The translational layer for Win32 events is location in /browser/metro/content/base/input.js. | Note on the desktop we use the desktop's Win32/Widget backend. This can behave differently from the Win8 WinRT backend. The translational layer for Win32 events is location in /browser/metro/content/base/input.js. | ||
=== Running Desktop and Metro Simultaneously === | |||
It's possible to run desktop Firefox and Metro Firefox side-by-side by using different profiles. However, there are some problems caused by the fact that Metro Firefox will only use the default profile ({{bug|945511}}), and our startup code will always start in desktop mode if any desktop process is running ({{bug|945554}}). | |||
Here's one way to keep desktop Firefox running while testing Metro Firefox in a separate profile: | |||
# [https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles Create a new profile] named "desktop". (You can use Firefox Sync to keep this in sync with your default profile.) | |||
# Launch desktop Firefox by running <code>firefox.exe -p desktop -no-remote</code>. (You can create a [http://kb.mozillazine.org/Shortcut_to_a_specific_profile shortcut] to make this more convenient. Instructions for Windows 7+ [http://lifehacker.com/5475752/customize-pinned-shortcuts-on-the-windows-7-taskbar here]) | |||
#* If you are making changes to the Metro Firefox source code, it's useful to start desktop Firefox from separate installation rather than your objdir, so you don't need to close it each time you rebuild. | |||
# To launch Metro Firefox, run <code>firefox.exe -no-remote</code> (or <code>./mach run</code>) and then press the ''Windows 8 Touch'' menu button. | |||
#* Or you can launch the Metro UI in a desktop window by running <code>firefox.exe -no-remote -metrodesktop</code> (or <code>./mach run -metrodesktop</code>). | |||
# Use alt-tab or edge/corner gestures to switch between the Metro app and the desktop. | |||
=== Testing === | === Testing === | ||
Line 209: | Line 197: | ||
layout.css.devPixelsPerPx = 1.0 (default is -1.0, which makes Firefox autoscale CSS pixels) | layout.css.devPixelsPerPx = 1.0 (default is -1.0, which makes Firefox autoscale CSS pixels) | ||
To | To run all the tests, run the following [[mach]] command in the mozilla-build shell in your mozilla-central source directory: | ||
./mach mochitest-metro | |||
To run a single test file or directory, | |||
./mach mochitest-metro path/to/test/file.js | |||
The Metro browser will launch, run the tests and exit. Any failures will be printed to the console. The complete test log will be written to the file <code>mochitest-metro-chrome.log</code> in the objdir. | The Metro browser will launch, run the tests and exit. Any failures will be printed to the console. The complete test log will be written to the file <code>mochitest-metro-chrome.log</code> in the objdir. | ||
We have a library of convenience functions for use in metro-chrome tests, which you can find in '''[http://dxr.mozilla.org/mozilla-central/source/browser/metro/base/tests/mochitest/head.js head.js]'''. Note: These tests make heavy use of Promises and [https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Task.jsm Task.jsm]. | |||
=== Building on Linux or Mac OS X === | === 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]. | 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]. | ||
Line 247: | Line 243: | ||
<strike>{{bug|762519}}</strike> was filed on getting javascript's dump output going to OutputDebugString as well. | <strike>{{bug|762519}}</strike> was filed on getting javascript's dump output going to OutputDebugString as well. | ||
=== | === JS Console === | ||
You can access the JavaScript console 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 menu button in the navigation bar. | |||
=== Enable Add-ons === | |||
Add-ons are not yet enabled by default in Firefox for Metro, because we have not yet built the UI for users to enable/disable/install/remove add-ons. (We will do this in a future version.) For now, developers and testers can use the following steps to allow Metro Firefox to load add-ons: | |||
* Open Firefox for Metro. | |||
* Go to "about:config" and set "extensions.defaultProviders.enabled" to "true". | |||
* Restart Firefox for Metro. | |||
You can then use Firefox for desktop to install, manage, and remove add-ons. The add-ons that you install in desktop will load in Metro Firefox if they are also marked compatible with the Metro UI. If you are an extension developer, you can make your add-on compatible with Metro Firefox by adding a targetApplication to your install.rdf file with "id" set to {99bceaaa-e3c6-48c1-b981-ef9b46b67d60}. (Metro Firefox will also load extensions with a targetApplication of toolkit@mozilla.org, which are compatible with all XUL applications.) | |||
=== DOM Inspector === | |||
Follow these directions to make the [https://addons.mozilla.org/en-US/firefox/addon/dom-inspector-6622/ DOM Inspector] add-on work in Metro: | |||
* Follow the steps above to [[#Enable Add-ons]] and install DOM Inspector using Firefox for desktop. | |||
* Add the [https://developer.mozilla.org/en/XULRunner_tips startDOMi function] to /browser/metro/base/content/browser.js. | |||
=== Crash Testing === | === Crash Testing === | ||
To test the Crash Reporter UI and other crash-related behavior, you can make use of install the [http://people.mozilla.com/~tmielczarek/crashme/ Crash Me addon] (sources are on [http://code.google.com/p/crashme/ Google Code].) This extension is already Metro Firefox ready, so you | To test the Crash Reporter UI and other crash-related behavior, you can make use of install the [http://people.mozilla.com/~tmielczarek/crashme/ Crash Me addon] (sources are on [http://code.google.com/p/crashme/ Google Code].) This extension is already Metro Firefox ready, so you can install it using the steps in [[#Enable Add-ons]] above. | ||
* While in Metro mode, go to about:config and make sure both 'app.crashreporter.prompted' and 'app.crashreporter.autosubmit' preferences are set to false | |||
* Open the "Settings" charm and choose the "Crash Now" entry. Tap/click it to crash. | |||
* Restart Metro. You should see the crash dialog as shown here: [https://bug903426.bugzilla.mozilla.org/attachment.cgi?id=8343538 screenshot] | |||
=== Remote Debugging with a VM === | === Remote Debugging with a VM === | ||
Line 354: | Line 320: | ||
Note you might have to fiddle with access permissions a bit. Opening everything up to Everyone saves a lot of time, but might not be the most secure environment, depending on your situation. | Note you might have to fiddle with access permissions a bit. Opening everything up to Everyone saves a lot of time, but might not be the most secure environment, depending on your situation. | ||
=== Diagnosing | === Diagnosing Launch Issues === | ||
The CEH handles program launch on Windows 8. It's a small win32 program that Explorer launches when the browser is invoked. If issues arise, there are some debugging features built into the program to help diagnose issues. | |||
* Open regedit.exe and browse to HKEY_CURRENT_USER/Software/Mozilla/Firefox | |||
* Add a new DWORD value names 'CEHDump', value 01 | |||
* Run a debug output viewer such as [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView]. | |||
* Launch the browser. | |||
Output from the ceh and launch info from the browser will get dumped to DebugView. You can save this logging info out via the DebugView file menu and post it to bugs for diagnosis. | |||
To turn off debug output for the CEH, change the registry value from 01 to 00, or delete the CEHDump key. | |||
=== Localized Build === | |||
Language Pack extensions are not yet enabled by default in Firefox for Metro, but you can use l10n binary repack method described [https://developer.mozilla.org/en/docs/Creating_a_Language_Pack here] to get localized build. | |||
To create localized binary repack for ''x-testing'' locale that is based on current sources from Mozilla Central create package locally via [https://developer.mozilla.org/en-US/docs/pymake Pymake] instead of downloading it from Mozilla's ftp servers. | |||
<pre> | |||
$ cd ../firefox-build | |||
< | $ pymake package | ||
$ cd ../firefox-build/browser/locales | |||
$ pymake unpack | |||
$ pymake merge-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir | |||
$ pymake installers-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir | |||
</pre> | |||
Your localized repack will be available at ''../firefox-build/dist'' folder. | |||
Appropriate l10n sources (to use with --with-l10n-base parameter in .mozconfig) can be downloaded from the following locations: | |||
* | * [http://hg.mozilla.org/l10n-central/ http://hg.mozilla.org/l10n-central/x-testing] | ||
* | * [http://hg.mozilla.org/releases/l10n/mozilla-aurora/ http://hg.mozilla.org/releases/l10n/mozilla-aurora/x-testing] | ||
* [http://hg.mozilla.org/releases/l10n/mozilla-beta/ http://hg.mozilla.org/releases/l10n/mozilla-beta/x-testing] | |||
* [http://hg.mozilla.org/releases/l10n/mozilla-release/ http://hg.mozilla.org/releases/l10n/mozilla-release/x-testing] | |||
Please note that you may need to install [https://developer.mozilla.org/en/docs/Compare-locales compare-locale] python script to successfully perform merge locale step. | |||
== Testing Harness == | == Testing Harness == | ||
Line 456: | Line 374: | ||
== Using Devtools == | == Using Devtools == | ||
See [https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Metro Remotely debugging Firefox for Metro] on MDN for instructions. | |||
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 | |||
* | |||
* | |||
=== Using DevTools Profiler === | |||
* Follow all the set up instructions above to get the prefs set right for dev tools / remote debugging. | |||
* In classic install the profiler extension from: https://github.com/bgirard/Gecko-Profiler-Addon/raw/master/geckoprofiler.xpi | |||
** Note, by default this extension starts with profiling turned on (for the local build). The toolbar icon will be colored when profiling is active, grayed when off. It's best to keep this extension disabled when not in use. | |||
* In classic set the pref 'profiler.threads' and 'profiler.stackwalk' to true. | |||
* Restart classic | |||
* From the toolbar button dropdown, select TCP, enter the metro browser's ip address, and click connect. You should get a remote connection warning in the metro browser. | |||
* click the 'analyze' button and wait for the profile view to load. (This may take a while without updating the in tab ui. Give it time.) | |||
* After you have finishes collecting data, click 'stop' and wait for the button label to update from 'stop' to 'start'. | |||
For additional detail read {{bug|886555}} on getting things going. | |||
For reference: [https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler Profiler Wiki]. | |||
=== Profiling Local Builds === | |||
Profiles generated using the above config will have os symbols when working with nightly builds on the metro device. For profiling local builds, you'll need to follow [https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler_and_Local_Symbols_on_Windows these instructions] on setting up and configuring a local snappy symbol server. | |||
Example snappy symbol server config: | |||
<pre> | |||
[General] | |||
hostname = 127.0.0.1 | |||
portNumber = 8000 | |||
enableTracing = 1 | |||
remoteSymbolServer = http://symbolapi.mozilla.org:80/ | |||
maxCacheEntries = 20000000 | |||
prefetchInterval = 12 | |||
prefetchThreshold = 48 | |||
prefetchMaxSymbolsPerLib = 500 | |||
defaultApp = Firefox | |||
defaultOs = Windows | |||
[SymbolPaths] | |||
Firefox = T:\Mozilla\MC-REL\dist\crashreporter-symbols\ | |||
Windows = T:\Temp | |||
</pre> | |||
If you run into problems resolving xul symbols, try restarting the symbol server and generating a new profile. Also make sure prefetchMaxSymbolsPerLib in the ini is set to a large value. | |||
Note, for switching back to nightly profiling, set the default symbol server url in classic back to http://symbolapi.mozilla.org/. | |||
== Development and Planning Notes == | |||
(Older content from the original planning stage) | (Older content from the original planning stage) | ||
Line 552: | Line 432: | ||
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. | 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. | ||
* [http://piercedotzler.com/asa/Developing_a_Metro-Style_Enabled_Desktop_Browser.html#_Toc318127097 Developing Metro Style Enabled Desktop Browsers] | * [http://piercedotzler.com/asa/Developing_a_Metro-Style_Enabled_Desktop_Browser.html#_Toc318127097 Developing Metro Style Enabled Desktop Browsers] | ||
Line 560: | Line 437: | ||
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. | 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. | ||
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). | 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). | ||
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/browser/metro/components/] | |||
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/ | |||
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. | 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. | ||
Line 595: | Line 462: | ||
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 - | 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 - | * gfx - The surface rendered to in Metro is D2D and there is no GDI fallback. As such there are some issues with blacklisted hardware. | ||
* e10s - | * e10s - Currently using in-process content (no child processes). | ||
* Accessibility - not integrated yet. | * Accessibility - not integrated yet. | ||
* Netwerk - no issues. | * Netwerk - no issues. | ||
Line 605: | Line 472: | ||
* toolkit - very little of this is in use. Crash reporter UI will need work/integration. | * toolkit - very little of this is in use. Crash reporter UI will need work/integration. | ||
* xpcom - no issues. | * xpcom - no issues. | ||
==== Pros and Cons ==== | ==== Pros and Cons ==== | ||
Line 632: | Line 485: | ||
=== Big Issues === | === Big Issues === | ||
* Windows XP - The current VC11 Beta redist runtime is not compatible with XP. ({{bug|744942}}) | * 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> | * 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. | * 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. |
edits