Firefox/Windows 8 Integration: Difference between revisions

no edit summary
(Undo revision 750414 by Jmathies (talk))
No edit summary
 
(46 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Wiki ==
== Links ==


* [https://wiki.mozilla.org/Firefox/Metro Metro Project] - meeting times, bug lists, project goals, team info, etc.
* [[Firefox/Metro|Metro project page]] - meeting times, bug lists, project goals, team info, etc.
* [[Firefox/Features|General Firefox Product Feature Tracking]] - Firefox feature tracking.
* [[Windows 8 Integration]] - General 3rd party browser collaboration page dedicated to overview, architecture, and challenges for vendors. Early research with Google.
* [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_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
* [[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


== 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
Contact Brian Bondy with questions (bbondy on [http://irc.mozilla.org IRC]). The Windows 8 integration team can be found in in #windev.


[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]
=== Bugzilla ===


* Metro Firefox complete list
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.
* 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
===Blockers===


[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]
We are using the following whiteboard tags to track bugs that block our release with Firefox 28:


* Core, Toolkit, mozilla.org
* [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


== Getting Involved ==
Queries:
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/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
* the front end code is to be literally a user friendly. it helps developers to get understood easily.


=== 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


== Metro Builds ==
== Firefox for Windows 8 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 in the [http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/ Firefox build archives].
 
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 Firefox as the default. You should also receive a 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.) 


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].


=== Nightly Crash Reports ===
=== Browser Crash Reports ===


[https://crash-stats.mozilla.com/topcrasher/byversion/MetroFirefox/22.0a1/7 Firefox for Metro]
[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>
(obj)/dist/bin/firefox.exe -metrodesktop
./mach run -metrodesktop
</pre>
</pre>


To register local builds as the default browser:
To run in the real "immersive" (full-screen) Metro environment, first launch the desktop browser by typing:


* For debug builds: run the resulting firefox.exe on the desktop and set as the default through Options menu -> Advanced -> General tab -> Make default button.
<pre>
* For release builds: run the resulting firefox.exe on the desktop and click yes to the default settings dialog, then select 'Nightly' in the Windows 8 prompt.
./mach run
* Open up Control Panel -> Default Programs. You should see 'Metro Firefox' in the list of applications.
</pre>
* Set all Metro Firefox defaults in Default Programs.


At which point you should have a Firefox tile in Win8 that launches the browser.
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 start the tests, run the following command in the mozilla-build shell, at the top level of your obj-dir:
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


mach mochitest-metro
(old way was  pymake mochitest-metro-chrome)
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.


=== DOM Inspector ===
=== JS Console ===
 
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>
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.
<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.
=== Enable Add-ons ===


=== Venkman Debugger ===
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:


(10/5/12 - Note, since we've changed the app id, this probably doesn't work.)
* Open Firefox for Metro.
* Go to "about:config" and set "extensions.defaultProviders.enabled" to "true".
* Restart Firefox for Metro.


* Copy the '{f13b157f-b174-47e7-a34d-4815ddfdfeb8}' xpi under your Firefox profile's extension directory over to your MetroFirefox profile extensions directory.
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.)


* Launch the browser with the '-venkman' command line option.
=== DOM Inspector ===


=== JS Shell ===
Follow these directions to make the [https://addons.mozilla.org/en-US/firefox/addon/dom-inspector-6622/ DOM Inspector] add-on work in Metro:


For debugging the ede js shell and javascript console are available on the app bar in desktop builds.
* 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 just need to follow similar steps as for the DOM Inspector to enable it.
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.
* Install the Crash Me addon (if you do not have it already) on your desktop firefox
* Copy the 'crashme@ted.mielczarek.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)
* - OR - you can just download and unzip the .xpi file into a crashme@ted.mielczarek.org folder in your profile extensions directory
* To allow discovery and install of add-ons, set extensions.autoDisableScopes to 15, either via your local metro.js or in about:config
* If you are using a local build, you may need to edit the metroapp.ini (generated from the metroapp.ini.in template) to ensure the Crash Reporter Enabled=1 flag is set.  


To use, you'll find a new "Crash Now!" entry in the Settings charm. Tap it to crash.
* 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.
=== WinRT Compiler Generated Code ===
* Restart Metro. You should see the crash dialog as shown here: [https://bug903426.bugzilla.mozilla.org/attachment.cgi?id=8343538 screenshot]
 
Compiler switches:
* /d1ZWtokens - dump C++ code generated code for C++/CX.  
* /d1reportAllClassLayout - dump class layouts
* /d1reportSingleClassLayoutXXX - where XXX performs substring matches against the class name.


=== 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 Startup Problems ===
=== Diagnosing Launch Issues ===


Due to the embedded nature of metro browsers, diagnosing startup problems can be a bit of a pain. There are a few things you can do to help devs figure out what's going wrong.
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.


<b>
* Open regedit.exe and browse to HKEY_CURRENT_USER/Software/Mozilla/Firefox
1) Launch the metro browser interface on desktop to confirm the install is working.
* Add a new DWORD value names 'CEHDump', value 01
</b>
* Run a debug output viewer such as [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView].
* Launch the browser.


* Navigate to firefox's install location in explorer
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.
* Hold shift, right-click the folder with firefox.exe and select open command prompt.
* in the prompt type 'firefox.exe -metrodesktop'


The metro front end should launch in a window on the desktop. If not, try uninstalling and re-installing. If that doesn't help, please file a bug.
To turn off debug output for the CEH, change the registry value from 01 to 00, or delete the CEHDump key.


<b>
=== Localized Build ===
2) Check Direct3D start up check results
</b>


Using regedit.exe, check under the following key for a value named 'MetroD3DAvailable':
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.


HKEY_CURRENT_USER\SOFTWARE\Mozilla\Firefox
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.


If the value is 0, Direct3D startup checks failed. Please file a bug, and post the Graphics section of your desktop browser's about:support section to the bug. If there is no value, please file a bug. If the value is 1, startup checks succeeded.
<pre>
 
$ cd ../firefox-build
<b>
$ pymake package
3) Check for submitted crashes reports
$ cd ../firefox-build/browser/locales
</b>
$ pymake unpack
 
$ pymake merge-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir
To check if metro fx is generating and submitting crash reports open explorer to the following path:
$ pymake installers-x-testing LOCALE_MERGEDIR=$(PWD)/mergedir
 
</pre>
C:\Users\(youraccount)\AppData\Roaming\Mozilla\MetroFirefox\Crash Reports\submitted\
 
If the folder exists and contains text files please file a bug and copy the contents of a few of the most recent files into the bug.
 
<b>
4) Check for unsubmitted crashes reports
</b>
 
Metro firefox can not submit crashes for analysis unless the browser fully starts ({{bug|797023}}).
 
To check if metro fx is crashing on startup, open explorer to the following path:
 
C:\Users\(youraccount)\AppData\Roaming\Mozilla\MetroFirefox\Crash Reports\
 
In this folder look for two files:
 
LastCrash lastCrashFilename
 
If both files are present, delete them, and try restarting Metro Firefox again. After doing this, check the folder again. If the files return, a startup crash is likely.
 
There are two things you can do t this point to help diagnose the problem:
 
<b>Option 1</b>: Use Desktop Firefox to submit the crash report to Mozilla's crash server -


* open lastCrashFilename with notepad.exe
Your localized repack will be available at ''../firefox-build/dist'' folder.
* copy the temp path and note the file name of the crash report
* open the temp path in explorer and locate the two files associated with the report.


There will be two files, both will have the same file name (a uuid string) and the extensions .dmp and .extra.
Appropriate l10n sources (to use with --with-l10n-base parameter in .mozconfig) can be downloaded from the following locations:


* shutdown desktop firefox if it is running
* [http://hg.mozilla.org/l10n-central/ http://hg.mozilla.org/l10n-central/x-testing]
* In explorer, copy both files from their location into the follow folder:
* [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]


C:\Users\(youraccount)\AppData\Roaming\Mozilla\Firefox\Crash Reports\pending\
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.
 
* start Desktop Firefox.
* Navigate to 'about:crashes'.
* find the uuid of the report you copied and click on its link
 
If the link does not resolve to a crash server crash report immediately, wait a few minutes and try again. Once the link resolves, file a bug and copy the report's link into the bug report.
 
<b>Option 2</b>:
 
File a bug and contact a dev. who you can share your crash report with. Note crash reports can contain user specific info, do not submit these files to bugzilla as attachments.
 
<b>
4) Logging startup
</b>
 
..
 
<b>
5) CEH logging
</b>
 
..


== Testing Harness ==
== Testing Harness ==
Line 456: Line 374:


== Using Devtools ==
== Using Devtools ==
* Tracking bug https://bugzilla.mozilla.org/show_bug.cgi?id=850019
** There are known issues with the profiler. All other parts should be functional, modulo the refactoring work the devtools team is doing on them.
* 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.


* For <strong>remote profiling</strong>, follow the steps here revolving around prefs/settings and read {{bug|886555}} on getting the profiler going.
See [https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Metro Remotely debugging Firefox for Metro] on MDN for instructions.


* Before you start
Notes:
** You must have metro installed & working
** You must access to a classic/desktop fx. This need not be a local build
** If you are connecting remotely, you must make sure both machines can ping each other before starting. 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 inbound/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 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 for it.


* Setup
* I usually pair on localhost, using an external monitor so I can see metrofx & classicfx at the same time.
** Go to about:config on classic/desktop fx
* 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.
*** devtools.debugger.force-local -> false
* While you can pair classic/metrofx running out of the same obj dir, I frequently experienced unexpected hangs and crashes as a result.
*** devtools.debugger.remote-enabled -> true
* if you close the devtools window, this usually results in the metro browser shutting down
*** 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.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)
*** It is unclear if a restart is required. I frequently do in the test-build-dev cycle anyway.
** 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
=== Using DevTools Profiler ===
** 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.
** 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


== Samsung Series 7 ==
* 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'.


The Series seven is the first device we started developing with. Details below on getting the hardware set up with Windows 8.
For additional detail read {{bug|886555}} on getting things going.


* To order, file a bug under mozilla.org, Server Operations: Desktop Issues. See {{bug|738613}}, CC your PM or Asa.
For reference: [https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler Profiler Wiki].


* Once you have the tablet, dock, and keyboard, unpack. Charge up the device. It'll be running Win7, ignore all the default software.
=== Profiling Local Builds ===


* 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?
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.


* 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.
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


* 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.
[SymbolPaths]
Firefox = T:\Mozilla\MC-REL\dist\crashreporter-symbols\
Windows = T:\Temp
</pre>


* After the tablet is set up, download Firefox nightly or build a local copy and start debugging!
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.


=== Firmware Updates ===
Note, for switching back to nightly profiling, set the default symbol server url in classic back to http://symbolapi.mozilla.org/.


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.
== Development and Planning Notes ==
 
[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 ==


(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.  


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]
* [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.
<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).
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)
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/]
 
<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/mobile/xul/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.
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 - 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.
* 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 - currently using Fennec’s out of process tabs.
* 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.
=== 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 ====
==== 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.
9

edits