Firefox on the Windows 8 Metro

Windows 8 Overview

  • Start Menu -> Start Screen
  • Win32 -> WinRT
  • Contracts
  • Minimum system requirements:
    x86: DX9, 1GB RAM, 1GHz processor, 16GB space
    x64: double everything for minimum.
  • 3 application types:
    i) Metro application (sandboxed),
    ii) Desktop application (same as Win7),
    iii) Metro style enabled desktop browsers

Firefox Windows 8 overview

  • Using Fennec XUL
  • Registry junk, Cairo code, event handling.
  • Windows store?
  • Metro reserves left and right edge for OS specific functionality.
  • Default browser (selection by OS, only one Metro)
  • Built with C++/CX, WRL

What is C++/CX (C++ component extensions)

  • Only enabled in widget/windows/winrt
  • Enabled via /ZW command line argument
  • .winmd files instead of header files for metadata
  • Reference counted types with
  • ref class Cat { ...  };
  • Using reference counted types with hat (^):
    Cat ^minoo = ref new Cat();
  • Use it just like a pointer (use -> member access) but don't delete it.
  • Use safe_cast() for casting from one interface to another for the same object
  • Other features: partial classes, delegates, events, exceptions (wrapper for HRESULT)

What is Windows Runtime C++ Template Library (WRL)

  • WinRT is built with WRL
  • Samples and documentation is rare
  • 10x longer
  • Similar to Active Template Libary (ATL)
  • Can use it in conjunction with C++/CX when you need more control

Integration points for Windows 8 Metro (Charms and contracts)

  • Search from any screen using Firefox
  • Share from Firefox
  • Print from Firefox
  • Play To from Firefox
  • Settings from Firefox
  • File Picker from Firefox
  • ...

Unsolved problems

  • Plugin support
  • Blocklisted graphics drivers
  • Windows on ARM (WOA), Windows Store
  • Figure out how to build and package everything together
  • Windows XP and Visual Studio 2011
  • User profile sharing

Getting started

  • Install the OS: Virtual Box, VMWare, Parallels, XenDesktop, Hyper-V, Desktop, Tablet
  • Install VS2011 Beta
  • Setup new LIBPATH
  • Use new VS2011 Mozilla Build script
  • Setup metro specific build options in .mozconfig:
                  ac_add_options --enable-application=mobile
                  ac_add_options --enable-win8metro
                  ac_add_options --with-windows-version=602
  • Run installer to get defaults
  • Modify registry to point to your objdir .exe instead

The End.