Firefox/Windows 8 Integration: Difference between revisions

no edit summary
(→‎Enable Add-ons: restore and update DOM Inspector instructions)
No edit summary
 
(17 intermediate revisions by 3 users not shown)
Line 13: Line 13:


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.
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.
===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 21: 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 32: 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 ==


Firefox for Metro is included in [http://nightly.mozilla.org/ nightly development builds] of Firefox for Windows.
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/home/products/MetroFirefox Firefox for Metro crash stats]
[https://crash-stats.mozilla.com/home/products/MetroFirefox Firefox for Metro crash stats]
Line 161: 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 170: 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 ===
Line 238: Line 271:
* Open the "Settings" charm and choose the "Crash Now" entry.  Tap/click it to crash.
* 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]
* Restart Metro. You should see the crash dialog as shown here: [https://bug903426.bugzilla.mozilla.org/attachment.cgi?id=8343538 screenshot]
=== WinRT Compiler Generated Code ===
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 294: 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
* 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.
 
* shutdown desktop firefox if it is running
* In explorer, copy both files from their location into the follow folder:
 
C:\Users\(youraccount)\AppData\Roaming\Mozilla\Firefox\Crash Reports\pending\
 
* 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>
Your localized repack will be available at ''../firefox-build/dist'' folder.
4) Logging startup
</b>


..
Appropriate l10n sources (to use with --with-l10n-base parameter in .mozconfig) can be downloaded from the following locations:


<b>
* [http://hg.mozilla.org/l10n-central/ http://hg.mozilla.org/l10n-central/x-testing]
5) CEH logging
* [http://hg.mozilla.org/releases/l10n/mozilla-aurora/ http://hg.mozilla.org/releases/l10n/mozilla-aurora/x-testing]
</b>
* [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 ==
9

edits