<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trond</id>
	<title>MozillaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trond"/>
	<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/Special:Contributions/Trond"/>
	<updated>2026-11-21T22:56:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia/Browser&amp;diff=389022</id>
		<title>Gaia/Browser</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia/Browser&amp;diff=389022"/>
		<updated>2012-01-21T02:19:17Z</updated>

		<summary type="html">&lt;p&gt;Trond: Created page with &amp;quot;The Gaia Browser app is a web browser implemented as a web app.  This app will depend largely on the Browser API, which is tracked by {{bug|693515}}.  == Current Features == * Ca...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Gaia Browser app is a web browser implemented as a web app.&lt;br /&gt;
&lt;br /&gt;
This app will depend largely on the Browser API, which is tracked by {{bug|693515}}.&lt;br /&gt;
&lt;br /&gt;
== Current Features ==&lt;br /&gt;
* Can navigate to a user-entered URL&lt;br /&gt;
* Can navigate back (but using re-implementation of History API inside the app)&lt;br /&gt;
* Loading indicator (throbber) works for user-entered URLs&lt;br /&gt;
&lt;br /&gt;
Note that B2G currently ignores X-Frame-Options headers for the whole of Gaia so that popular sites like Google can be rendered inside iframes. This is a hack.&lt;br /&gt;
&lt;br /&gt;
== Next Steps ==&lt;br /&gt;
&lt;br /&gt;
* Continuing to work on Browser API ({{bug|693515}})&lt;br /&gt;
* [https://github.com/andreasgal/gaia/issues/288 Browser Title &amp;amp; URL Update on Navigate] (depends on {{bug|710231}})&lt;br /&gt;
* [https://github.com/andreasgal/gaia/issues/181 Stop Button] (depends on {{bug|709759}})&lt;br /&gt;
* Find a way to use the iframe&#039;s window.history instead of having to re-implement the history API inside the app. (some discussion in {{bug|708179}})&lt;br /&gt;
* Window.top should stop at the iFrame to prevent parent navigation &amp;amp; frame busting ({{bug|704037}})&lt;br /&gt;
* Re-design UI to be more consistent with Fennec Android Native UI ([[Fennec/NativeUI/UserExperience]])&lt;br /&gt;
** Make [https://github.com/andreasgal/gaia/issues/61 navigating to a URL] and [https://github.com/andreasgal/gaia/issues/62 navigating back &amp;amp; forward] work more like Fennec Native UI.&lt;br /&gt;
** Add the ability to [https://github.com/andreasgal/gaia/issues/66 create], [https://github.com/andreasgal/gaia/issues/67 switch] and [https://github.com/andreasgal/gaia/issues/287 close] tabs.&lt;br /&gt;
&lt;br /&gt;
== Open Questions ==&lt;br /&gt;
* Should the Browser app rely on a hardware back button? If not, where should the back button go?&lt;br /&gt;
* Should the Browser app rely on a hardware menu button?&lt;br /&gt;
* Where should the menu go?&lt;br /&gt;
* Should the Browser app have an &amp;quot;awesomescreen&amp;quot; like Fennec including bookmarks, or could that be part of the homescreen? See [https://wiki.mozilla.org/B2G/UI#Ben.27s_Gaia_Concept here] for a design concept which features an &amp;quot;awesomescreen&amp;quot; as part of the homescreen app.&lt;br /&gt;
* Should the Browser app use the same visual theme as either the Gingerbread or Ice Cream Sandwich native versions of Fennec? Are re-usable assets available?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A mockup of a fennec-like address bar for Gaia&#039;s browser app.&lt;br /&gt;
&lt;br /&gt;
[[Image:fennec-like_address_bar.png]]&lt;/div&gt;</summary>
		<author><name>Trond</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia&amp;diff=389021</id>
		<title>Gaia</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia&amp;diff=389021"/>
		<updated>2012-01-21T02:18:43Z</updated>

		<summary type="html">&lt;p&gt;Trond: /* Apps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hacking Gaia ==&lt;br /&gt;
&lt;br /&gt;
see [[Gaia/Hacking]]&lt;br /&gt;
&lt;br /&gt;
=== Coding Style ===&lt;br /&gt;
* Background:&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#General practices]]&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#JavaScript practices]]&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#Naming and formatting code]]&lt;br /&gt;
&lt;br /&gt;
* make sure HTML files are declared &amp;amp;lt;!DOCTYPE html&amp;amp;gt; (i.e., HTML5).  IE9+ will load them in compatibility mode otherwise.&lt;br /&gt;
&lt;br /&gt;
* add a &amp;lt;code&amp;gt;&amp;quot;use strict&amp;quot;;&amp;lt;/code&amp;gt; statement (exactly that!) to the top of your JS files&lt;br /&gt;
&lt;br /&gt;
* 2 spaces for indentation - do not use tab.&lt;br /&gt;
&lt;br /&gt;
* Line break are free (I promise) don&#039;t hesitate to use them to separate logical block inside your functions.&lt;br /&gt;
&lt;br /&gt;
* Files are named &amp;lt;code&amp;gt;like_this.js&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Use single quote instead of double quotes.&lt;br /&gt;
&lt;br /&gt;
* Additional rules:&lt;br /&gt;
Bad:&lt;br /&gt;
 if (expression) doSomething();&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 if (expression)&lt;br /&gt;
   doSomething();&lt;br /&gt;
&lt;br /&gt;
=== Before submitting a patch ===&lt;br /&gt;
On each javascript files you are adding or you have modified, run:&lt;br /&gt;
 gjslint --nojsdoc my_file.js&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/closure/utilities/docs/linter_howto.html&lt;br /&gt;
 &lt;br /&gt;
=== Apps ===&lt;br /&gt;
* Home screen (webGL cjones/ HTML vingtetun)&lt;br /&gt;
** Keyboard/IME (vingtetun/timdream)&lt;br /&gt;
*** Chinese ZhuYing IME (timdream)&lt;br /&gt;
* Lock screen (gal)&lt;br /&gt;
* Dialer (vingtetun)&lt;br /&gt;
* SMS application (vingtetun)&lt;br /&gt;
*Browser (benfrancis)&lt;br /&gt;
** See [[Gaia/Browser]] for details.&lt;br /&gt;
* Gallery (benfrancis)&lt;br /&gt;
** Downloads sample photos from the app&#039;s web server and saves them as files in IndexedDB to be loaded locally&lt;br /&gt;
** Can select a photo which zooms in using CSS transitions&lt;br /&gt;
** Next:&lt;br /&gt;
*** Swipe to next photo (asynchronously pre-load nearby photos) https://github.com/andreasgal/gaia/issues/42&lt;br /&gt;
*** Figure out where to store photos and other media on the device going forward ({{bug|717103}})&lt;br /&gt;
* Camera (benfrancis)&lt;br /&gt;
** Currently just a file picker &amp;lt;input type=&amp;quot;file&amp;quot; accept=&amp;quot;image/*&amp;quot;&amp;gt; which should allow the user to capture a photo from the camera&#039;s device. Waiting on back end for gonk ({{bug|708484}})&lt;br /&gt;
** In future would like to use getUserMedia() from WebRTC to provide a more acceptable user experience (http://dev.w3.org/2011/webrtc/editor/getusermedia.html)&lt;br /&gt;
** Next:&lt;br /&gt;
*** Figure out how to store photos captured with the camera app in the gallery app (Web Intents? Media storage API?)&lt;br /&gt;
* Music (benfrancis)&lt;br /&gt;
** Currently just lists ogg files stored in IndexedDB and allows playback using an HTML5 &amp;lt;audio&amp;gt; tag&lt;br /&gt;
** Next:&lt;br /&gt;
*** Store files as binary blobs in IndexedDB like in the gallery app&lt;br /&gt;
*** Discuss MP3 support&lt;br /&gt;
*** Figure out where to store music files on the device going forward (Media Storage API?)&lt;br /&gt;
*** Work on improving the UI&lt;br /&gt;
* App Manager (justindarc)&lt;br /&gt;
* Settings (justindarc)&lt;br /&gt;
* UI/widget library (justindarc)&lt;br /&gt;
* Apps store (justindarc)&lt;br /&gt;
* eBook reader&lt;/div&gt;</summary>
		<author><name>Trond</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia/Hacking&amp;diff=389019</id>
		<title>Gaia/Hacking</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia/Hacking&amp;diff=389019"/>
		<updated>2012-01-21T02:16:32Z</updated>

		<summary type="html">&lt;p&gt;Trond: Created page with &amp;quot;Inside Gaia everything is a Web Application, see {{MDN|Apps|Apps on MDN}}.  When Gaia starts, the homescreen application is the first application displayed on the screen.  The ho...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Inside Gaia everything is a Web Application, see {{MDN|Apps|Apps on MDN}}.&lt;br /&gt;
&lt;br /&gt;
When Gaia starts, the homescreen application is the first application displayed on the screen.&lt;br /&gt;
&lt;br /&gt;
The homescreen application reads all installed web applications and shows an icon for each. This is done by using the window.navigator.mozApps object that exposes the Application Registry API [http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/apps/nsIDOMApplicationRegistry.idl].&lt;br /&gt;
&lt;br /&gt;
Gaia can be run in 3 different ways, each one requiring some specific steps to be set-up:&lt;br /&gt;
&lt;br /&gt;
- inside a web browser such a Firefox&lt;br /&gt;
&lt;br /&gt;
- inside a device emulator&lt;br /&gt;
&lt;br /&gt;
- on the device&lt;br /&gt;
&lt;br /&gt;
Throughout these instructions the following is assumed:&lt;br /&gt;
&lt;br /&gt;
 GAIA = PATH_TO_GAIA_REPOSITORY&lt;br /&gt;
 &lt;br /&gt;
 DOMAIN_NAME = gaiamobile.org&lt;br /&gt;
 &lt;br /&gt;
 PROFILE = PATH_TO_PROFILE&lt;br /&gt;
&lt;br /&gt;
== Building B2G ==&lt;br /&gt;
&lt;br /&gt;
=== Pull the code ===&lt;br /&gt;
  hg clone http://hg.mozilla.org/mozilla-central src&lt;br /&gt;
  git clone http://github.com/andreasgal/gaia gaia&lt;br /&gt;
&lt;br /&gt;
=== Create a mozconfig ===&lt;br /&gt;
Create a file named &amp;quot;mozconfig&amp;quot; in the mozilla-central directory.&lt;br /&gt;
Here&#039;s an example mozconfig.&lt;br /&gt;
&lt;br /&gt;
 mk_add_options MOZ_OBJDIR=../build&lt;br /&gt;
 mk_add_options MOZ_MAKE_FLAGS=&amp;quot;-j9 -s&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ac_add_options --enable-application=b2g&lt;br /&gt;
 ac_add_options --disable-libjpeg-turbo&lt;br /&gt;
&lt;br /&gt;
=== Build ===&lt;br /&gt;
In the mozilla-central directory:&lt;br /&gt;
&lt;br /&gt;
 make -f client.mk build&lt;br /&gt;
&lt;br /&gt;
The build will appear in ../build (or whatever MOZ_OBJDIR is set to in your mozconfig).&lt;br /&gt;
&lt;br /&gt;
==== Mac ====&lt;br /&gt;
&lt;br /&gt;
Build will fail on checking phase and complains about g++ and gcc executable not found. Please do the following first:&lt;br /&gt;
&lt;br /&gt;
  sudo ln -s /Developer/usr/bin/gcc /Developer/usr/bin/gcc-4.2&lt;br /&gt;
  sudo ln -s /Developer/usr/bin/g++ /Developer/usr/bin/g++-4.2&lt;br /&gt;
&lt;br /&gt;
== Running B2G ==&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
 declare -x B2G_HOMESCREEN=file://${GAIA}/homescreen.html&lt;br /&gt;
 ../build/dist/bin/b2g&lt;br /&gt;
&lt;br /&gt;
You may want to add the $MOZ_OBJDIR/dist/bin directory to your shell&#039;s $PATH and B2G_HOMESCREEN to your shell environment so you can just type &amp;quot;b2g&amp;quot; anywhere.&lt;br /&gt;
&lt;br /&gt;
==== Mac ====&lt;br /&gt;
&lt;br /&gt;
For Mac users, please run&lt;br /&gt;
&lt;br /&gt;
 ../build/dist/B2G.app/Contents/MacOS/b2g&lt;br /&gt;
&lt;br /&gt;
instead. In ./bin/b2g all the keyboard/mouse event will be redirect to Terminal for unknown reason.&lt;br /&gt;
&lt;br /&gt;
== Running tests ==&lt;br /&gt;
There is a dedicated test framework for B2G at [[Auto-tools/Projects/Marionette]].&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
If you are running a desktop build you can also write browser-chrome tests.&lt;br /&gt;
&lt;br /&gt;
==== Running tests ====&lt;br /&gt;
Be sure to have MOZ_OBJDIR define in your shell environment.&lt;br /&gt;
MOZ_OBJDIR should point to your b2g desktop build directory - the one specified in the .mozconfig file.&lt;br /&gt;
&lt;br /&gt;
  cd $GAIA&lt;br /&gt;
  MOZ_OBJDIR=PATH/TO/THE/BUILD/DIR make mochitest&lt;br /&gt;
&lt;br /&gt;
The desktop build of b2g should be lanched with a new window containing the result of the tests run.&lt;br /&gt;
&lt;br /&gt;
==== Caveat ====&lt;br /&gt;
The test tools will be looking for an executable at path&lt;br /&gt;
&lt;br /&gt;
  $MOZ_OBJDIR/dist/B2G.app/Contents/MacOS/b2g-bin&lt;br /&gt;
  on a mac, or&lt;br /&gt;
  $MOZ_OBJDIR/dist/bin/b2g-bin&lt;br /&gt;
  on linux&lt;br /&gt;
&lt;br /&gt;
Which isn&#039;t generated by the build. So you&#039;ll have to symlink your b2g binary to b2g&#039;&#039;-bin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
  cd $MOZ_OBJDIR/dist/B2G.app/Contents/MacOS&lt;br /&gt;
  # or&lt;br /&gt;
  cd $MOZ_OBJDIR/dist/bin&lt;br /&gt;
  &lt;br /&gt;
  ln -s b2g b2g-bin&lt;br /&gt;
&lt;br /&gt;
==== Writing tests ====&lt;br /&gt;
For more information about Mochitest, please refer to {{MDN|Mochitest#Test_functions}}&lt;br /&gt;
&lt;br /&gt;
For more information about browser-chrome tests, please refer to {{MDN|Browser_chrome_tests}}&lt;br /&gt;
&lt;br /&gt;
New browser-chrome tests should be put directly in the $GAIA/tests/ directory.&lt;br /&gt;
There is already a few of them there that you can look at to have a better idea about how to write yours!&lt;br /&gt;
&lt;br /&gt;
== Configuring your system ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Until issue #165 is resolved you can ignore those steps&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring Apache ===&lt;br /&gt;
Locate the main configuration file of Apache aka &#039;&#039;&#039;httpd.conf&#039;&#039;&#039; and add the following entries:&lt;br /&gt;
&lt;br /&gt;
 # load modules&lt;br /&gt;
 LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so&lt;br /&gt;
 LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so&lt;br /&gt;
 &lt;br /&gt;
 # listen on port 8888&lt;br /&gt;
 Listen 8888&lt;br /&gt;
 &lt;br /&gt;
 ServerName gaiamobile.org&lt;br /&gt;
 NameVirtualHost *:8888&lt;br /&gt;
 UseCanonicalName Off&lt;br /&gt;
 &lt;br /&gt;
 # Redirect [browser|sms|...].gaiamobile.org to ${GAIA}/apps/[browser|sms|...]/.&lt;br /&gt;
 &amp;lt;VirtualHost *:8888&amp;gt;&lt;br /&gt;
 ServerAlias *.gaiamobile.org&lt;br /&gt;
 VirtualDocumentRoot /var/www/gaia/apps/%1/&lt;br /&gt;
 ServerAlias gaiamobile.org&lt;br /&gt;
 VirtualDocumentRoot /var/www/gaia&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 # Add the correct mimetypes for offline cache manifest&lt;br /&gt;
 AddType text/cache-manifest .appcache&lt;br /&gt;
 &lt;br /&gt;
 # Prevent Apache from caching apps files&lt;br /&gt;
 &amp;lt;IfModule mod_expires.c&amp;gt;&lt;br /&gt;
 ExpiresActive on&lt;br /&gt;
 ExpiresDefault &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType text/html &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType text/xml &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType text/css &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType text/plain &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType application/x-javascript &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType application/javascript &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType text/javascript &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType text/cache-manifest &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType image/gif &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType image/png &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType image/jpeg &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 ExpiresByType image/x-icon &amp;quot;access plus 0 hours&amp;quot;&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find that apache2 fails to listen on port 8888. Add the following lines to your /etc/apache2/ports.conf file. &lt;br /&gt;
&lt;br /&gt;
 NameVirtualHost *:8888&lt;br /&gt;
 Listen 8888&lt;br /&gt;
&lt;br /&gt;
=== Map ${DOMAIN_NAME} to localhost ===&lt;br /&gt;
Locate the main hosts file of your system [http://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system] to map ${DOMAIN_NAME} to localhost and add the following lines:&lt;br /&gt;
&lt;br /&gt;
 127.0.0.1    	gaiamobile.org browser.gaiamobile.org sms.gaiamobile.org camera.gaiamobile.org gallery.gaiamobile.org settings.gaiamobile.org dialer.gaiamobile.org homescreen.gaiamobile.org foo.gaiamobile.org&lt;br /&gt;
&lt;br /&gt;
For the example the main hosts file on unix/linux systems is /etc/hosts.&lt;br /&gt;
&lt;br /&gt;
=== Tell B2G which Web Applications are installed (aka avoid the empty homescreen) ===&lt;br /&gt;
At this point B2G should startwith an empty homescreen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order for B2G to know which applications are available on your system you need to declare them in the profile folder of B2G.&lt;br /&gt;
&lt;br /&gt;
All the necessary files live in ${GAIA}/profile/webapps so the only thing you need to do is to make a link between this folder and ${PROFILE}/webapps.&lt;br /&gt;
&lt;br /&gt;
First locate your profile folder [http://support.mozilla.com/en-US/kb/Profiles] and then execute the following lines:&lt;br /&gt;
&lt;br /&gt;
 ln -s ${GAIA}/profile/webapps ${PROFILE}/webapps&lt;br /&gt;
 ln -s ${GAIA}/profile/OfflineCache ${PROFILE}/OfflineCache&lt;br /&gt;
&lt;br /&gt;
|ln| is the standard way to make link on unix/linux systems. The method of creating such a link can vary depending on your system, see [http://en.wikipedia.org/wiki/Symbolic_link] for help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart B2G&lt;br /&gt;
 ../build/dist/bin/b2g&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
=== Preferences ===&lt;br /&gt;
There are many preferences used in B2G. Here are the most useful ones you need to know while hacking on top of it.&lt;br /&gt;
&lt;br /&gt;
There is no about:config page in B2G so you will need to edit the ${PROFILE}/prefs.js file while the B2G application is closed (this is important if you don&#039;t want your changes to be overwritten) and add lines like:&lt;br /&gt;
&lt;br /&gt;
 user_pref(my.pref.name, true);&lt;br /&gt;
&lt;br /&gt;
First go to {{MDN|Setting_up_extension_development_environment#Development_preferences|MDC development preferences}} and set up the preferences declared there.&lt;br /&gt;
&lt;br /&gt;
If you want to disable the offline cache use:&lt;br /&gt;
 user_pref(&#039;browser.cache.offline.enable&#039;, false);&lt;br /&gt;
&lt;br /&gt;
=== Javascript Console ===&lt;br /&gt;
You can open the Javascript Console by running:&lt;br /&gt;
 ../build/dist/bin/b2g -jsconsole&lt;br /&gt;
&lt;br /&gt;
=== Touch events ===&lt;br /&gt;
To enable the necessary interfaces in the Firefox web browser you need to go to about:config and add the boolean preference &#039;&#039;&#039;dom.w3c_touch_events.enabled&#039;&#039;&#039; and set it to &#039;&#039;&#039;true&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Trond</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia&amp;diff=389018</id>
		<title>Gaia</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia&amp;diff=389018"/>
		<updated>2012-01-21T02:15:53Z</updated>

		<summary type="html">&lt;p&gt;Trond: /* Hacking Gaia */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hacking Gaia ==&lt;br /&gt;
&lt;br /&gt;
see [[Gaia/Hacking]]&lt;br /&gt;
&lt;br /&gt;
=== Coding Style ===&lt;br /&gt;
* Background:&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#General practices]]&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#JavaScript practices]]&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#Naming and formatting code]]&lt;br /&gt;
&lt;br /&gt;
* make sure HTML files are declared &amp;amp;lt;!DOCTYPE html&amp;amp;gt; (i.e., HTML5).  IE9+ will load them in compatibility mode otherwise.&lt;br /&gt;
&lt;br /&gt;
* add a &amp;lt;code&amp;gt;&amp;quot;use strict&amp;quot;;&amp;lt;/code&amp;gt; statement (exactly that!) to the top of your JS files&lt;br /&gt;
&lt;br /&gt;
* 2 spaces for indentation - do not use tab.&lt;br /&gt;
&lt;br /&gt;
* Line break are free (I promise) don&#039;t hesitate to use them to separate logical block inside your functions.&lt;br /&gt;
&lt;br /&gt;
* Files are named &amp;lt;code&amp;gt;like_this.js&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Use single quote instead of double quotes.&lt;br /&gt;
&lt;br /&gt;
* Additional rules:&lt;br /&gt;
Bad:&lt;br /&gt;
 if (expression) doSomething();&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 if (expression)&lt;br /&gt;
   doSomething();&lt;br /&gt;
&lt;br /&gt;
=== Before submitting a patch ===&lt;br /&gt;
On each javascript files you are adding or you have modified, run:&lt;br /&gt;
 gjslint --nojsdoc my_file.js&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/closure/utilities/docs/linter_howto.html&lt;br /&gt;
 &lt;br /&gt;
=== Apps ===&lt;br /&gt;
* Home screen (webGL cjones/ HTML vingtetun)&lt;br /&gt;
** Keyboard/IME (vingtetun/timdream)&lt;br /&gt;
*** Chinese ZhuYing IME (timdream)&lt;br /&gt;
* Lock screen (gal)&lt;br /&gt;
* Dialer (vingtetun)&lt;br /&gt;
* SMS application (vingtetun)&lt;br /&gt;
*Browser (benfrancis)&lt;br /&gt;
** See [[B2G/Gaia/Browser]] for details.&lt;br /&gt;
* Gallery (benfrancis)&lt;br /&gt;
** Downloads sample photos from the app&#039;s web server and saves them as files in IndexedDB to be loaded locally&lt;br /&gt;
** Can select a photo which zooms in using CSS transitions&lt;br /&gt;
** Next:&lt;br /&gt;
*** Swipe to next photo (asynchronously pre-load nearby photos) https://github.com/andreasgal/gaia/issues/42&lt;br /&gt;
*** Figure out where to store photos and other media on the device going forward ({{bug|717103}})&lt;br /&gt;
* Camera (benfrancis)&lt;br /&gt;
** Currently just a file picker &amp;lt;input type=&amp;quot;file&amp;quot; accept=&amp;quot;image/*&amp;quot;&amp;gt; which should allow the user to capture a photo from the camera&#039;s device. Waiting on back end for gonk ({{bug|708484}})&lt;br /&gt;
** In future would like to use getUserMedia() from WebRTC to provide a more acceptable user experience (http://dev.w3.org/2011/webrtc/editor/getusermedia.html)&lt;br /&gt;
** Next:&lt;br /&gt;
*** Figure out how to store photos captured with the camera app in the gallery app (Web Intents? Media storage API?)&lt;br /&gt;
* Music (benfrancis)&lt;br /&gt;
** Currently just lists ogg files stored in IndexedDB and allows playback using an HTML5 &amp;lt;audio&amp;gt; tag&lt;br /&gt;
** Next:&lt;br /&gt;
*** Store files as binary blobs in IndexedDB like in the gallery app&lt;br /&gt;
*** Discuss MP3 support&lt;br /&gt;
*** Figure out where to store music files on the device going forward (Media Storage API?)&lt;br /&gt;
*** Work on improving the UI&lt;br /&gt;
* App Manager (justindarc)&lt;br /&gt;
* Settings (justindarc)&lt;br /&gt;
* UI/widget library (justindarc)&lt;br /&gt;
* Apps store (justindarc)&lt;br /&gt;
* eBook reader&lt;/div&gt;</summary>
		<author><name>Trond</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia&amp;diff=389015</id>
		<title>Gaia</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia&amp;diff=389015"/>
		<updated>2012-01-21T01:34:15Z</updated>

		<summary type="html">&lt;p&gt;Trond: Created page with &amp;quot;== Hacking Gaia ==  see B2G/Gaia/Hacking  === Coding Style === * Background: ** MDC:Developer Guide/Coding Style#General practices ** [[MDC:Developer Guide/Coding Style#J...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hacking Gaia ==&lt;br /&gt;
&lt;br /&gt;
see [[B2G/Gaia/Hacking]]&lt;br /&gt;
&lt;br /&gt;
=== Coding Style ===&lt;br /&gt;
* Background:&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#General practices]]&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#JavaScript practices]]&lt;br /&gt;
** [[MDC:Developer Guide/Coding Style#Naming and formatting code]]&lt;br /&gt;
&lt;br /&gt;
* make sure HTML files are declared &amp;amp;lt;!DOCTYPE html&amp;amp;gt; (i.e., HTML5).  IE9+ will load them in compatibility mode otherwise.&lt;br /&gt;
&lt;br /&gt;
* add a &amp;lt;code&amp;gt;&amp;quot;use strict&amp;quot;;&amp;lt;/code&amp;gt; statement (exactly that!) to the top of your JS files&lt;br /&gt;
&lt;br /&gt;
* 2 spaces for indentation - do not use tab.&lt;br /&gt;
&lt;br /&gt;
* Line break are free (I promise) don&#039;t hesitate to use them to separate logical block inside your functions.&lt;br /&gt;
&lt;br /&gt;
* Files are named &amp;lt;code&amp;gt;like_this.js&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Use single quote instead of double quotes.&lt;br /&gt;
&lt;br /&gt;
* Additional rules:&lt;br /&gt;
Bad:&lt;br /&gt;
 if (expression) doSomething();&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 if (expression)&lt;br /&gt;
   doSomething();&lt;br /&gt;
&lt;br /&gt;
=== Before submitting a patch ===&lt;br /&gt;
On each javascript files you are adding or you have modified, run:&lt;br /&gt;
 gjslint --nojsdoc my_file.js&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/closure/utilities/docs/linter_howto.html&lt;br /&gt;
 &lt;br /&gt;
=== Apps ===&lt;br /&gt;
* Home screen (webGL cjones/ HTML vingtetun)&lt;br /&gt;
** Keyboard/IME (vingtetun/timdream)&lt;br /&gt;
*** Chinese ZhuYing IME (timdream)&lt;br /&gt;
* Lock screen (gal)&lt;br /&gt;
* Dialer (vingtetun)&lt;br /&gt;
* SMS application (vingtetun)&lt;br /&gt;
*Browser (benfrancis)&lt;br /&gt;
** See [[B2G/Gaia/Browser]] for details.&lt;br /&gt;
* Gallery (benfrancis)&lt;br /&gt;
** Downloads sample photos from the app&#039;s web server and saves them as files in IndexedDB to be loaded locally&lt;br /&gt;
** Can select a photo which zooms in using CSS transitions&lt;br /&gt;
** Next:&lt;br /&gt;
*** Swipe to next photo (asynchronously pre-load nearby photos) https://github.com/andreasgal/gaia/issues/42&lt;br /&gt;
*** Figure out where to store photos and other media on the device going forward ({{bug|717103}})&lt;br /&gt;
* Camera (benfrancis)&lt;br /&gt;
** Currently just a file picker &amp;lt;input type=&amp;quot;file&amp;quot; accept=&amp;quot;image/*&amp;quot;&amp;gt; which should allow the user to capture a photo from the camera&#039;s device. Waiting on back end for gonk ({{bug|708484}})&lt;br /&gt;
** In future would like to use getUserMedia() from WebRTC to provide a more acceptable user experience (http://dev.w3.org/2011/webrtc/editor/getusermedia.html)&lt;br /&gt;
** Next:&lt;br /&gt;
*** Figure out how to store photos captured with the camera app in the gallery app (Web Intents? Media storage API?)&lt;br /&gt;
* Music (benfrancis)&lt;br /&gt;
** Currently just lists ogg files stored in IndexedDB and allows playback using an HTML5 &amp;lt;audio&amp;gt; tag&lt;br /&gt;
** Next:&lt;br /&gt;
*** Store files as binary blobs in IndexedDB like in the gallery app&lt;br /&gt;
*** Discuss MP3 support&lt;br /&gt;
*** Figure out where to store music files on the device going forward (Media Storage API?)&lt;br /&gt;
*** Work on improving the UI&lt;br /&gt;
* App Manager (justindarc)&lt;br /&gt;
* Settings (justindarc)&lt;br /&gt;
* UI/widget library (justindarc)&lt;br /&gt;
* Apps store (justindarc)&lt;br /&gt;
* eBook reader&lt;/div&gt;</summary>
		<author><name>Trond</name></author>
	</entry>
</feed>