diff --git a/mobile/.hgignore b/mobile/.hgignore
new file mode 100644
index 000000000000..e458c8be968e
--- /dev/null
+++ b/mobile/.hgignore
@@ -0,0 +1,8 @@
+# .hgignore - List of filenames hg should ignore
+
+# Filenames that should be ignored wherever they appear
+~$
+\.pyc$
+\.swp$
+(^|/)TAGS$
+\.DS_Store$
diff --git a/mobile/.hgtags b/mobile/.hgtags
new file mode 100644
index 000000000000..998bd76f1127
--- /dev/null
+++ b/mobile/.hgtags
@@ -0,0 +1,8 @@
+14bbac84b71cbb9d603ed571538c9c41b023d94e FENNEC_M4
+7dbca6d7d5cf0a052c658b6ba3e89068b0772734 FENNEC_M7
+eb17df1df284c8aa882ae626d6f8b298adc55c6b FENNEC_M8
+b394a7122c1018dd3d49d9049bcbbcb5b9ab17e2 FENNEC_A1
+5f1388238359c2019572316cf75c3a404d2d4e70 FENNEC_A2
+84195fc5e34609b49862f95799e21b6f790ec9cc FENNEC_M11
+9aa835472fed9cb58c809c2f3182e46bf5ce25bd FENNEC_B1
+6da60192232841d4d6a090a577585c70d790dac8 FENNEC_B5
diff --git a/mobile/LICENSE b/mobile/LICENSE
new file mode 100644
index 000000000000..875cfbeb9a72
--- /dev/null
+++ b/mobile/LICENSE
@@ -0,0 +1,1333 @@
+This code may be used and redistributed under your choice of:
+
+ * Mozilla Public License, version 1.1 or later
+ * GNU General Public License, version 2.0 or later
+ * GNU Lesser General Public License, version 2.1 or later
+
+The terms of these licenses are included here for reference:
+
+ MOZILLA PUBLIC LICENSE
+ Version 1.1
+
+ ---------------
+
+1. Definitions.
+
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
+ Covered Code available to a third party.
+
+ 1.1. "Contributor" means each entity that creates or contributes to
+ the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Code, prior Modifications used by a Contributor, and the Modifications
+ made by that particular Contributor.
+
+ 1.3. "Covered Code" means the Original Code or Modifications or the
+ combination of the Original Code and Modifications, in each case
+ including portions thereof.
+
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
+ accepted in the software development community for the electronic
+ transfer of data.
+
+ 1.5. "Executable" means Covered Code in any form other than Source
+ Code.
+
+ 1.6. "Initial Developer" means the individual or entity identified
+ as the Initial Developer in the Source Code notice required by Exhibit
+ A.
+
+ 1.7. "Larger Work" means a work which combines Covered Code or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.8. "License" means this document.
+
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means any addition to or deletion from the
+ substance or structure of either the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files, a
+ Modification is:
+ A. Any addition to or deletion from the contents of a file
+ containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+ 1.10. "Original Code" means Source Code of computer software code
+ which is described in the Source Code notice required by Exhibit A as
+ Original Code, and which, at the time of its release under this
+ License is not already Covered Code governed by this License.
+
+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.11. "Source Code" means the preferred form of the Covered Code for
+ making modifications to it, including all modules it contains, plus
+ any associated interface definition files, scripts used to control
+ compilation and installation of an Executable, or source code
+ differential comparisons against either the Original Code or another
+ well known, available Covered Code of the Contributor's choice. The
+ Source Code can be in a compressed or archival form, provided the
+ appropriate decompression or de-archiving software is widely available
+ for no charge.
+
+ 1.12. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License or a future version of this License issued under Section 6.1.
+ For legal entities, "You" includes any entity which controls, is
+ controlled by, or is under common control with You. For purposes of
+ this definition, "control" means (a) the power, direct or indirect,
+ to cause the direction or management of such entity, whether by
+ contract or otherwise, or (b) ownership of more than fifty percent
+ (50%) of the outstanding shares or beneficial ownership of such
+ entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free,
+ non-exclusive license, subject to third party intellectual property
+ claims:
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Code (or portions thereof) with or without Modifications, and/or
+ as part of a Larger Work; and
+
+ (b) under Patents Claims infringed by the making, using or
+ selling of Original Code, to make, have made, use, practice,
+ sell, and offer for sale, and/or otherwise dispose of the
+ Original Code (or portions thereof).
+
+ (c) the licenses granted in this Section 2.1(a) and (b) are
+ effective on the date Initial Developer first distributes
+ Original Code under the terms of this License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: 1) for code that You delete from the Original Code; 2)
+ separate from the Original Code; or 3) for infringements caused
+ by: i) the modification of the Original Code or ii) the
+ combination of the Original Code with other software or devices.
+
+ 2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor
+ hereby grants You a world-wide, royalty-free, non-exclusive license
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor, to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an
+ unmodified basis, with other Modifications, as Covered Code
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or
+ selling of Modifications made by that Contributor either alone
+ and/or in combination with its Contributor Version (or portions
+ of such combination), to make, use, sell, offer for sale, have
+ made, and/or otherwise dispose of: 1) Modifications made by that
+ Contributor (or portions thereof); and 2) the combination of
+ Modifications made by that Contributor with its Contributor
+ Version (or portions of such combination).
+
+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+ effective on the date Contributor first makes Commercial Use of
+ the Covered Code.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: 1) for any code that Contributor has deleted from the
+ Contributor Version; 2) separate from the Contributor Version;
+ 3) for infringements caused by: i) third party modifications of
+ Contributor Version or ii) the combination of Modifications made
+ by that Contributor with other software (except as part of the
+ Contributor Version) or other devices; or 4) under Patent Claims
+ infringed by Covered Code in the absence of Modifications made by
+ that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are
+ governed by the terms of this License, including without limitation
+ Section 2.2. The Source Code version of Covered Code may be
+ distributed only under the terms of this License or a future version
+ of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You
+ distribute. You may not offer or impose any terms on any Source Code
+ version that alters or restricts the applicable version of this
+ License or the recipients' rights hereunder. However, You may include
+ an additional document offering the additional rights described in
+ Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be
+ made available in Source Code form under the terms of this License
+ either on the same media as an Executable version or via an accepted
+ Electronic Distribution Mechanism to anyone to whom you made an
+ Executable version available; and if made available via Electronic
+ Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six
+ (6) months after a subsequent version of that particular Modification
+ has been made available to such recipients. You are responsible for
+ ensuring that the Source Code version remains available even if the
+ Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a
+ file documenting the changes You made to create that Covered Code and
+ the date of any change. You must include a prominent statement that
+ the Modification is derived, directly or indirectly, from Original
+ Code provided by the Initial Developer and including the name of the
+ Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the
+ origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+ (a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's
+ intellectual property rights is required to exercise the rights
+ granted by such Contributor under Sections 2.1 or 2.2,
+ Contributor must include a text file with the Source Code
+ distribution titled "LEGAL" which describes the claim and the
+ party making the claim in sufficient detail that a recipient will
+ know whom to contact. If Contributor obtains such knowledge after
+ the Modification is made available as described in Section 3.2,
+ Contributor shall promptly modify the LEGAL file in all copies
+ Contributor makes available thereafter and shall take other steps
+ (such as notifying appropriate mailing lists or newsgroups)
+ reasonably calculated to inform those who received the Covered
+ Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Contributor's Modifications include an application programming
+ interface and Contributor has knowledge of patent licenses which
+ are reasonably necessary to implement that API, Contributor must
+ also include this information in the LEGAL file.
+
+ (c) Representations.
+ Contributor represents that, except as disclosed pursuant to
+ Section 3.4(a) above, Contributor believes that Contributor's
+ Modifications are Contributor's original creation(s) and/or
+ Contributor has sufficient rights to grant the rights conveyed by
+ this License.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source
+ Code. If it is not possible to put such notice in a particular Source
+ Code file due to its structure, then You must include such notice in a
+ location (such as a relevant directory) where a user would be likely
+ to look for such a notice. If You created one or more Modification(s)
+ You may add your name as a Contributor to the notice described in
+ Exhibit A. You must also duplicate this License in any documentation
+ for the Source Code where You describe recipients' rights or ownership
+ rights relating to Covered Code. You may choose to offer, and to
+ charge a fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Code. However, You
+ may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than
+ any such warranty, support, indemnity or liability obligation is
+ offered by You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the
+ Initial Developer or such Contributor as a result of warranty,
+ support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the
+ requirements of Section 3.1-3.5 have been met for that Covered Code,
+ and if You include a notice stating that the Source Code version of
+ the Covered Code is available under the terms of this License,
+ including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included
+ in any notice in an Executable version, related documentation or
+ collateral in which You describe recipients' rights relating to the
+ Covered Code. You may distribute the Executable version of Covered
+ Code or ownership rights under a license of Your choice, which may
+ contain terms different from this License, provided that You are in
+ compliance with the terms of this License and that the license for the
+ Executable version does not attempt to limit or alter the recipient's
+ rights in the Source Code version from the rights set forth in this
+ License. If You distribute the Executable version under a different
+ license You must make it absolutely clear that any terms which differ
+ from this License are offered by You alone, not by the Initial
+ Developer or any Contributor. You hereby agree to indemnify the
+ Initial Developer and every Contributor for any liability incurred by
+ the Initial Developer or such Contributor as a result of any such
+ terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code
+ not governed by the terms of this License and distribute the Larger
+ Work as a single product. In such a case, You must make sure the
+ requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this
+ License with respect to some or all of the Covered Code due to
+ statute, judicial order, or regulation then You must: (a) comply with
+ the terms of this License to the maximum extent possible; and (b)
+ describe the limitations and the code they affect. Such description
+ must be included in the LEGAL file described in Section 3.4 and must
+ be included with all distributions of the Source Code. Except to the
+ extent prohibited by statute or regulation, such description must be
+ sufficiently detailed for a recipient of ordinary skill to be able to
+ understand it.
+
+5. Application of this License.
+
+ This License applies to code to which the Initial Developer has
+ attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised
+ and/or new versions of the License from time to time. Each version
+ will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the
+ License, You may always continue to use it under the terms of that
+ version. You may also choose to use such Covered Code under the terms
+ of any subsequent version of the License published by Netscape. No one
+ other than Netscape has the right to modify the terms applicable to
+ Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may
+ only do in order to apply it to code which is not already Covered Code
+ governed by this License), You must (a) rename Your license so that
+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
+ license (except to note that your license differs from this License)
+ and (b) otherwise make it clear that Your version of the license
+ contains terms which differ from the Mozilla Public License and
+ Netscape Public License. (Filling in the name of the Initial
+ Developer, Original Code or Contributor in the notice described in
+ Exhibit A shall not of themselves be deemed to be modifications of
+ this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+ 8.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to cure
+ such breach within 30 days of becoming aware of the breach. All
+ sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their
+ nature, must remain in effect beyond the termination of this License
+ shall survive.
+
+ 8.2. If You initiate litigation by asserting a patent infringement
+ claim (excluding declatory judgment actions) against Initial Developer
+ or a Contributor (the Initial Developer or Contributor against whom
+ You file such action is referred to as "Participant") alleging that:
+
+ (a) such Participant's Contributor Version directly or indirectly
+ infringes any patent, then any and all rights granted by such
+ Participant to You under Sections 2.1 and/or 2.2 of this License
+ shall, upon 60 days notice from Participant terminate prospectively,
+ unless if within 60 days after receipt of notice You either: (i)
+ agree in writing to pay Participant a mutually agreeable reasonable
+ royalty for Your past and future use of Modifications made by such
+ Participant, or (ii) withdraw Your litigation claim with respect to
+ the Contributor Version against such Participant. If within 60 days
+ of notice, a reasonable royalty and payment arrangement are not
+ mutually agreed upon in writing by the parties or the litigation claim
+ is not withdrawn, the rights granted by Participant to You under
+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+ the 60 day notice period specified above.
+
+ (b) any software, hardware, or device, other than such Participant's
+ Contributor Version, directly or indirectly infringes any patent, then
+ any rights granted to You by such Participant under Sections 2.1(b)
+ and 2.2(b) are revoked effective as of the date You first made, used,
+ sold, distributed, or had made, Modifications made by that
+ Participant.
+
+ 8.3. If You assert a patent infringement claim against Participant
+ alleging that such Participant's Contributor Version directly or
+ indirectly infringes any patent where such claim is resolved (such as
+ by license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
+ all end user license agreements (excluding distributors and resellers)
+ which have been validly granted by You or any distributor hereunder
+ prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in
+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" and "commercial computer software documentation," as such
+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+ all U.S. Government End Users acquire Covered Code with only those
+ rights set forth herein.
+
+11. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ California law provisions (except to the extent applicable law, if
+ any, provides otherwise), excluding its conflict-of-law provisions.
+ With respect to disputes in which at least one party is a citizen of,
+ or an entity chartered or registered to do business in the United
+ States of America, any litigation relating to this License shall be
+ subject to the jurisdiction of the Federal Courts of the Northern
+ District of California, with venue lying in Santa Clara County,
+ California, with the losing party responsible for costs, including
+ without limitation, court costs and reasonable attorneys' fees and
+ expenses. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded.
+ Any law or regulation which provides that the language of a contract
+ shall be construed against the drafter shall not apply to this
+ License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+ Initial Developer may designate portions of the Covered Code as
+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
+ Developer permits you to utilize portions of the Covered Code under
+ Your choice of the NPL or the alternative licenses, if any, specified
+ by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+ ``The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+
+ The Original Code is ______________________________________.
+
+ The Initial Developer of the Original Code is ________________________.
+ Portions created by ______________________ are Copyright (C) ______
+ _______________________. All Rights Reserved.
+
+ Contributor(s): ______________________________________.
+
+ Alternatively, the contents of this file may be used under the terms
+ of the _____ license (the "[___] License"), in which case the
+ provisions of [______] License are applicable instead of those
+ above. If you wish to allow use of your version of this file only
+ under the terms of the [____] License and not to allow others to use
+ your version of this file under the MPL, indicate your decision by
+ deleting the provisions above and replace them with the notice and
+ other provisions required by the [___] License. If you do not delete
+ the provisions above, a recipient may use your version of this file
+ under either the MPL or the [___] License."
+
+ [NOTE: The text of this Exhibit A may differ slightly from the text of
+ the notices in the Source Code files of the Original Code. You should
+ use the text of this Exhibit A rather than the text found in the
+ Original Code Source Code for Your Modifications.]
+
+
+
+
+
+
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
+
+
+
+
+
+
+
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/mobile/Makefile.in b/mobile/Makefile.in
new file mode 100644
index 000000000000..056d49998877
--- /dev/null
+++ b/mobile/Makefile.in
@@ -0,0 +1,62 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+# Joel Maher
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DIRS = chrome locales components modules themes app
+
+ifndef LIBXUL_SDK
+PARALLEL_DIRS += $(DEPTH)/xulrunner/tools/redit
+endif
+
+ifdef WINCE
+DIRS += installer/wince
+endif
+
+include $(topsrcdir)/config/rules.mk
+include $(topsrcdir)/testing/testsuite-targets.mk
+
+package-mobile-tests:
+ $(MAKE) stage-mochitest DIST_BIN=$(DEPTH)/$(DIST)/bin/xulrunner
+ $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
+ @(cd $(PKG_STAGE) && tar $(TAR_CREATE_FLAGS) - *) | bzip2 -f > $(DIST)/$(PKG_PATH)$(TEST_PACKAGE)
diff --git a/mobile/app/Makefile.in b/mobile/app/Makefile.in
new file mode 100644
index 000000000000..7fd88888ffe8
--- /dev/null
+++ b/mobile/app/Makefile.in
@@ -0,0 +1,219 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DIRS = profile/extensions
+
+PREF_JS_EXPORTS = $(srcdir)/mobile.js
+DIST_FILES = application.ini
+
+ifndef LIBXUL_SDK
+PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX)
+
+CPPSRCS = nsBrowserApp.cpp
+
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
+
+LIBS += $(JEMALLOC_LIBS)
+
+ifeq (Linux_1, $(OS_ARCH)_$(GNU_LD))
+OS_LDFLAGS += -Wl,-rpath='$$ORIGIN'
+NSDISTMODE = copy
+endif
+
+ifdef MOZ_ENABLE_LIBXUL
+APP_XPCOM_LIBS = $(XPCOM_GLUE_LDOPTS)
+else
+MOZILLA_INTERNAL_API = 1
+APP_XPCOM_LIBS = $(XPCOM_LIBS)
+endif
+
+LIBS += $(APP_XPCOM_LIBS) \
+ $(NSPR_LIBS) \
+ $(NULL)
+
+ifdef BUILD_STATIC_LIBS
+LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
+else
+ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
+LIBS += $(DIST)/bin/XUL
+else
+EXTRA_DSO_LIBS += xul
+LIBS += $(EXTRA_DSO_LIBS)
+endif
+ifeq ($(OS_ARCH),WINNT)
+OS_LIBS += $(call EXPAND_LIBNAME,version)
+endif
+endif # BUILD_STATIC_LIBS
+
+ifdef _MSC_VER
+# Always enter a Windows program through wmain, whether or not we're
+# a console application.
+ifdef WINCE
+WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
+else
+WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
+endif
+endif
+endif #LIBXUL_SDK
+
+include $(topsrcdir)/config/rules.mk
+
+GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
+GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
+APP_BUILDID = $(shell $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid)
+APP_ICON = mobile
+APP_SPLASH = splash
+
+DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) \
+ -DGRE_BUILDID=$(GRE_BUILDID) \
+ -DAPP_BUILDID=$(APP_BUILDID) \
+ -DAPP_NAME=$(MOZ_APP_NAME) \
+ -DAPP_VERSION=$(MOZ_APP_VERSION) \
+ -DMOZ_UPDATER=$(MOZ_UPDATER) \
+ $(NULL)
+
+ifdef MOZILLA_OFFICIAL
+DEFINES += -DMOZILLA_OFFICIAL
+endif
+
+SOURCE_STAMP := $(shell cd $(srcdir)/.. && hg identify 2>/dev/null | cut -f1 -d' ')
+ifdef SOURCE_STAMP
+DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
+endif
+
+# strip a trailing slash from the repo URL because it's not always present,
+# and we want to construct a working URL in buildconfig.html
+# make+shell+sed = awful
+_dollar=$$
+SOURCE_REPO := $(shell cd $(srcdir)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
+# extra sanity check for old versions of hg
+# that don't support showconfig
+ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
+DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
+endif
+
+ifdef WINCE
+DEFINES += -DWINCE=1
+endif
+
+ifeq ($(OS_ARCH),WINCE)
+REDIT_PATH = $(LIBXUL_DIST)/host/bin
+endif
+ifeq ($(OS_ARCH),WINNT)
+REDIT_PATH = $(LIBXUL_DIST)/bin
+endif
+
+APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
+APP_BINARY_FASTSTART = $(MOZ_APP_NAME)faststart$(BIN_SUFFIX)
+
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+
+APP_NAME = $(MOZ_APP_DISPLAYNAME)
+APP_VERSION = $(MOZ_APP_VERSION)
+
+ifdef MOZ_DEBUG
+APP_NAME := $(APP_NAME)Debug
+endif
+
+AB_CD = $(MOZ_UI_LOCALE)
+
+AB := $(firstword $(subst -, ,$(AB_CD)))
+
+clean clobber repackage::
+ rm -rf $(DIST)/$(APP_NAME).app
+
+ifdef LIBXUL_SDK
+APPFILES = Resources
+else
+APPFILES = MacOS
+endif
+
+libs repackage:: application.ini
+ mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
+ rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
+ mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
+ rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
+ sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" -e "s/%APP_BINARY%/$(APP_BINARY)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
+ sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
+ rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
+ $(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
+ifdef LIBXUL_SDK
+ cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
+ rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
+else
+ rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
+ rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
+endif
+ printf "APPLMOZB" > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
+
+else # MOZ_WIDGET_TOOLKIT != cocoa
+
+libs::
+ifdef LIBXUL_SDK
+ cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY)
+endif
+ifdef MOZ_FASTSTART
+ifdef _MSC_VER
+ifdef WINCE
+ cp $(LIBXUL_DIST)/bin/faststartstub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY_FASTSTART)
+endif
+endif
+endif
+ifndef SKIP_COPY_XULRUNNER
+ifdef LIBXUL_SDK
+ $(NSINSTALL) -D $(DIST)/bin/xulrunner
+ (cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
+endif
+endif # SKIP_COPY_XULRUNNER
+
+ $(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
+
+ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
+ cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
+ cp $(srcdir)/$(APP_SPLASH).bmp $(DIST)/bin/$(APP_SPLASH).bmp
+ $(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(srcdir)/$(APP_ICON).ico
+endif
+
+endif
diff --git a/mobile/app/android/drawable-hdpi/alertaddons.png b/mobile/app/android/drawable-hdpi/alertaddons.png
new file mode 100644
index 000000000000..06a33376ae61
Binary files /dev/null and b/mobile/app/android/drawable-hdpi/alertaddons.png differ
diff --git a/mobile/app/android/drawable-hdpi/alertdownloads.png b/mobile/app/android/drawable-hdpi/alertdownloads.png
new file mode 100644
index 000000000000..5b3daa545178
Binary files /dev/null and b/mobile/app/android/drawable-hdpi/alertdownloads.png differ
diff --git a/mobile/app/android/drawable/alertaddons.png b/mobile/app/android/drawable/alertaddons.png
new file mode 100644
index 000000000000..9d0a35c192cd
Binary files /dev/null and b/mobile/app/android/drawable/alertaddons.png differ
diff --git a/mobile/app/android/drawable/alertdownloads.png b/mobile/app/android/drawable/alertdownloads.png
new file mode 100644
index 000000000000..a604e27e7908
Binary files /dev/null and b/mobile/app/android/drawable/alertdownloads.png differ
diff --git a/mobile/app/application.ini b/mobile/app/application.ini
new file mode 100644
index 000000000000..4967f0a124e4
--- /dev/null
+++ b/mobile/app/application.ini
@@ -0,0 +1,26 @@
+#filter substitution
+[App]
+Vendor=Mozilla
+Name=Fennec
+Version=@APP_VERSION@
+BuildID=@APP_BUILDID@
+#ifdef MOZ_SOURCE_REPO
+SourceRepository=@MOZ_SOURCE_REPO@
+#endif
+#ifdef MOZ_SOURCE_STAMP
+SourceStamp=@MOZ_SOURCE_STAMP@
+#endif
+ID={a23983c0-fd0e-11dc-95ff-0800200c9a66}
+
+[Gecko]
+MinVersion=1.9.2b5pre
+MaxVersion=@GRE_MILESTONE@
+
+[XRE]
+EnableExtensionManager=1
+
+[Crash Reporter]
+#if MOZILLA_OFFICIAL
+Enabled=1
+#endif
+ServerURL=https://crash-reports.mozilla.com/submit
diff --git a/mobile/app/macbuild/.DS_Store b/mobile/app/macbuild/.DS_Store
new file mode 100644
index 000000000000..2766f49d5d03
Binary files /dev/null and b/mobile/app/macbuild/.DS_Store differ
diff --git a/mobile/app/macbuild/CVS/Entries b/mobile/app/macbuild/CVS/Entries
new file mode 100644
index 000000000000..17976e103322
--- /dev/null
+++ b/mobile/app/macbuild/CVS/Entries
@@ -0,0 +1,7 @@
+D/Contents////
+/background.png/1.1/Sun Dec 2 23:08:12 2007/-kb/
+/disk.icns/1.1/Sun Dec 2 23:08:12 2007/-kb/
+/document.icns/1.1/Sun Dec 2 23:08:12 2007/-kb/
+/dsstore/1.1/Sun Dec 2 23:08:12 2007/-kb/
+/firefox.icns/1.3/Sun Dec 2 23:08:12 2007/-kb/
+/license.r/1.4/Mon May 5 00:40:25 2008//
diff --git a/mobile/app/macbuild/CVS/Repository b/mobile/app/macbuild/CVS/Repository
new file mode 100644
index 000000000000..bc49d595ea7b
--- /dev/null
+++ b/mobile/app/macbuild/CVS/Repository
@@ -0,0 +1 @@
+mozilla/browser/app/macbuild
diff --git a/mobile/app/macbuild/CVS/Root b/mobile/app/macbuild/CVS/Root
new file mode 100644
index 000000000000..cdb6f4a0739a
--- /dev/null
+++ b/mobile/app/macbuild/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
diff --git a/mobile/app/macbuild/Contents/CVS/Entries b/mobile/app/macbuild/Contents/CVS/Entries
new file mode 100644
index 000000000000..2252d217a2c7
--- /dev/null
+++ b/mobile/app/macbuild/Contents/CVS/Entries
@@ -0,0 +1,2 @@
+D/Resources////
+/Info.plist.in/1.18/Tue Feb 19 05:11:34 2008//
diff --git a/mobile/app/macbuild/Contents/CVS/Repository b/mobile/app/macbuild/Contents/CVS/Repository
new file mode 100644
index 000000000000..412caa952bd0
--- /dev/null
+++ b/mobile/app/macbuild/Contents/CVS/Repository
@@ -0,0 +1 @@
+mozilla/browser/app/macbuild/Contents
diff --git a/mobile/app/macbuild/Contents/CVS/Root b/mobile/app/macbuild/Contents/CVS/Root
new file mode 100644
index 000000000000..cdb6f4a0739a
--- /dev/null
+++ b/mobile/app/macbuild/Contents/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
diff --git a/mobile/app/macbuild/Contents/Info.plist.in b/mobile/app/macbuild/Contents/Info.plist.in
new file mode 100644
index 000000000000..ff4091140cd6
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Info.plist.in
@@ -0,0 +1,138 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleDocumentTypes
+
+
+ CFBundleTypeExtensions
+
+ html
+ htm
+ shtml
+ xht
+ xhtml
+
+ CFBundleTypeIconFile
+ document.icns
+ CFBundleTypeName
+ HTML Document
+ CFBundleTypeOSTypes
+
+ HTML
+
+ CFBundleTypeRole
+ Viewer
+
+
+ CFBundleTypeExtensions
+
+ text
+ txt
+ js
+ log
+ css
+ xul
+ rdf
+
+ CFBundleTypeIconFile
+ document.icns
+ CFBundleTypeName
+ Text Document
+ CFBundleTypeOSTypes
+
+ TEXT
+ utxt
+
+ CFBundleTypeRole
+ Viewer
+
+
+ CFBundleTypeExtensions
+
+ jpeg
+ jpg
+ png
+ gif
+
+ CFBundleTypeIconFile
+ fileBookmark.icns
+ CFBundleTypeName
+ document.icns
+ CFBundleTypeOSTypes
+
+ GIFf
+ JPEG
+ PNGf
+
+ CFBundleTypeRole
+ Viewer
+
+
+ CFBundleExecutable
+ fennec
+ CFBundleGetInfoString
+ %APP_NAME% %APP_VERSION%
+ CFBundleIconFile
+ fennec
+ CFBundleIdentifier
+ org.mozilla.fennec
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ %APP_NAME%
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ %APP_VERSION%
+ CFBundleSignature
+ MOZB
+ CFBundleURLTypes
+
+
+ CFBundleURLIconFile
+ document.icns
+ CFBundleURLName
+ http URL
+ CFBundleURLSchemes
+
+ http
+
+
+
+ CFBundleURLIconFile
+ document.icns
+ CFBundleURLName
+ https URL
+ CFBundleURLSchemes
+
+ https
+
+
+
+ CFBundleURLName
+ ftp URL
+ CFBundleURLSchemes
+
+ ftp
+
+
+
+ CFBundleURLName
+ file URL
+ CFBundleURLSchemes
+
+ file
+
+
+
+ CFBundleVersion
+ %APP_VERSION%
+ NSAppleScriptEnabled
+
+ CGDisableCoalescedUpdates
+
+
+
diff --git a/mobile/app/macbuild/Contents/Resources/CVS/Entries b/mobile/app/macbuild/Contents/Resources/CVS/Entries
new file mode 100644
index 000000000000..e518e95d7d43
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/CVS/Entries
@@ -0,0 +1 @@
+D/English.lproj////
diff --git a/mobile/app/macbuild/Contents/Resources/CVS/Repository b/mobile/app/macbuild/Contents/Resources/CVS/Repository
new file mode 100644
index 000000000000..88a87a46f209
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/CVS/Repository
@@ -0,0 +1 @@
+mozilla/browser/app/macbuild/Contents/Resources
diff --git a/mobile/app/macbuild/Contents/Resources/CVS/Root b/mobile/app/macbuild/Contents/Resources/CVS/Root
new file mode 100644
index 000000000000..cdb6f4a0739a
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
diff --git a/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Entries b/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Entries
new file mode 100644
index 000000000000..e702a5d0dc78
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Entries
@@ -0,0 +1,2 @@
+/InfoPlist.strings.in/1.4/Wed Jan 2 19:06:47 2008//
+D
diff --git a/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Repository b/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Repository
new file mode 100644
index 000000000000..d3c5cc961c3f
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Repository
@@ -0,0 +1 @@
+mozilla/browser/app/macbuild/Contents/Resources/English.lproj
diff --git a/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Root b/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Root
new file mode 100644
index 000000000000..cdb6f4a0739a
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/English.lproj/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
diff --git a/mobile/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in b/mobile/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
new file mode 100644
index 000000000000..39e694876821
--- /dev/null
+++ b/mobile/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
@@ -0,0 +1 @@
+CFBundleName = "%APP_NAME%";
diff --git a/mobile/app/macbuild/background.png b/mobile/app/macbuild/background.png
new file mode 100644
index 000000000000..e52f31d05101
Binary files /dev/null and b/mobile/app/macbuild/background.png differ
diff --git a/mobile/app/macbuild/disk.icns b/mobile/app/macbuild/disk.icns
new file mode 100644
index 000000000000..e97e49058522
Binary files /dev/null and b/mobile/app/macbuild/disk.icns differ
diff --git a/mobile/app/macbuild/document.icns b/mobile/app/macbuild/document.icns
new file mode 100644
index 000000000000..f5af7a70fc77
Binary files /dev/null and b/mobile/app/macbuild/document.icns differ
diff --git a/mobile/app/macbuild/dsstore b/mobile/app/macbuild/dsstore
new file mode 100755
index 000000000000..00b8f9a30536
Binary files /dev/null and b/mobile/app/macbuild/dsstore differ
diff --git a/mobile/app/macbuild/fennec.icns b/mobile/app/macbuild/fennec.icns
new file mode 100644
index 000000000000..17263f5b2dd0
Binary files /dev/null and b/mobile/app/macbuild/fennec.icns differ
diff --git a/mobile/app/macbuild/license.r b/mobile/app/macbuild/license.r
new file mode 100644
index 000000000000..52f03518a953
--- /dev/null
+++ b/mobile/app/macbuild/license.r
@@ -0,0 +1,117 @@
+// See /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h for language IDs.
+data 'LPic' (5000) {
+ // Default language ID, 0 = English
+ $"0000"
+ // Number of entries in list
+ $"0001"
+
+ // Entry 1
+ // Language ID, 0 = English
+ $"0000"
+ // Resource ID, 0 = STR#/TEXT/styl 5000
+ $"0000"
+ // Multibyte language, 0 = no
+ $"0000"
+};
+
+resource 'STR#' (5000, "English") {
+ {
+ // Language (unused?) = English
+ "English",
+ // Accept (Agree)
+ "Accept",
+ // Decline (Disagree)
+ "Decline",
+ // Print, ellipsis is 0xC9
+ "PrintÉ",
+ // Save As, ellipsis is 0xC9
+ "Save AsÉ",
+ // Descriptive text, curly quotes are 0xD2 and 0xD3
+ "You are about to install\n"
+ "Minefield.\n"
+ "\n"
+ "Please read the license agreement. If you agree to its terms and accept, click ÒAcceptÓ to access the software. Otherwise, click ÒDeclineÓ to cancel."
+ };
+};
+
+// Beware of 1024(?) byte (character?) line length limitation. Split up long
+// lines.
+// If straight quotes are used ("), remember to escape them (\").
+// Newline is \n, to leave a blank line, use two of them.
+// 0xD2 and 0xD3 are curly double-quotes ("), 0xD4 and 0xD5 are curly
+// single quotes ('), 0xD5 is also the apostrophe.
+data 'TEXT' (5000, "English") {
+ "MINEFIELD END-USER SOFTWARE LICENSE AGREEMENT\n"
+ "Version 3.0, May 2008\n"
+ "\n"
+ "A SOURCE CODE VERSION OF CERTAIN MINEFIELD BROWSER FUNCTIONALITY THAT YOU MAY USE, MODIFY AND DISTRIBUTE IS AVAILABLE TO YOU FREE-OF-CHARGE FROM WWW.MOZILLA.ORG UNDER THE MOZILLA PUBLIC LICENSE and other open source software licenses.\n"
+ "\n"
+ "The accompanying executable code version of Minefield and related documentation (the ÒProductÓ) is made available to you under the terms of this MINEFIELD END-USER SOFTWARE LICENSE AGREEMENT (THE ÒAGREEMENTÓ). BY CLICKING THE ÒACCEPTÓ BUTTON, OR BY INSTALLING OR USING THE MINEFIELD BROWSER, YOU ARE CONSENTING TO BE BOUND BY THE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT CLICK THE ÒACCEPTÓ BUTTON, AND DO NOT INSTALL OR USE ANY PART OF THE MINEFIELD BROWSER.\n"
+ "\n"
+ "DURING THE MINEFIELD INSTALLATION PROCESS, AND AT LATER TIMES, YOU MAY BE GIVEN THE OPTION OF INSTALLING ADDITIONAL COMPONENTS FROM THIRD-PARTY SOFTWARE PROVIDERS. THE INSTALLATION AND USE OF THOSE THIRD-PARTY COMPONENTS MAY BE GOVERNED BY ADDITIONAL LICENSE AGREEMENTS.\n"
+ "\n"
+ "1. LICENSE GRANT. The Mozilla Corporation grants you a non-exclusive license to use the executable code version of the Product. This Agreement will also govern any software upgrades provided by Mozilla that replace and/or supplement the original Product, unless such upgrades are accompanied by a separate license, in which case the terms of that license will govern.\n"
+ "\n"
+ "2. TERMINATION. If you breach this Agreement your right to use the Product will terminate immediately and without notice, but all provisions of this Agreement except the License Grant (Paragraph 1) will survive termination and continue in effect. Upon termination, you must destroy all copies of the Product.\n"
+ "\n"
+ "3. PROPRIETARY RIGHTS. Portions of the Product are available in source code form under the terms of the Mozilla Public License and other open source licenses (collectively, ÒOpen Source LicensesÓ) at http://www.mozilla.org/MPL. Nothing in this Agreement will be construed to limit any rights granted under the Open Source Licenses. Subject to the foregoing, Mozilla, for itself and on behalf of its licensors, hereby reserves all intellectual property rights in the Product, except for the rights expressly granted in this Agreement. You may not remove or alter any trademark, logo, copyright or other proprietary notice in or on the Product. This license does not grant you any right to use the trademarks, service marks or logos of Mozilla or its licensors.\n"
+ "\n"
+ "4. PRIVACY POLICY. You agree to the Mozilla Firefox Privacy Policy, made available online at http://www.mozilla.com/legal/privacy/, as that policy may be changed from time to time. When Mozilla changes the policy in a material way a notice will be posted on the website at www.mozilla.com and when any change is made in the privacy policy, the updated policy will be posted at the above link. It is your responsibility to ensure that you understand the terms of the privacy policy, so you should periodically check the current version of the policy for changes.\n"
+ "\n"
+ "5. WEBSITE INFORMATION SERVICES. Mozilla and its contributors, licensors and partners work to provide the most accurate and up-to-date phishing and malware information. However, they cannot guarantee that this information is comprehensive and error-free: some risky sites may not be identified, and some safe sites may be identified in error.\n"
+ "\n"
+ "6. DISCLAIMER OF WARRANTY. THE PRODUCT IS PROVIDED ÒAS ISÓ WITH ALL FAULTS. TO THE EXTENT PERMITTED BY LAW, MOZILLA AND MOZILLAÕS DISTRIBUTORS, AND LICENSORS HEREBY DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES THAT THE PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE AND NON-INFRINGING. YOU BEAR THE ENTIRE RISK AS TO SELECTING THE PRODUCT FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT. THIS LIMITATION WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.\n"
+ "\n"
+ "7. LIMITATION OF LIABILITY. EXCEPT AS REQUIRED BY LAW, MOZILLA AND ITS DISTRIBUTORS, DIRECTORS, LICENSORS, CONTRIBUTORS AND AGENTS (COLLECTIVELY, THE ÒMOZILLA GROUPÓ) WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN ANY WAY RELATING TO THIS AGREEMENT OR THE USE OF OR INABILITY TO USE THE PRODUCT, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOST PROFITS, LOSS OF DATA, AND COMPUTER FAILURE OR MALFUNCTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH SUCH CLAIM IS BASED. THE MOZILLA GROUPÕS COLLECTIVE LIABILITY UNDER THIS AGREEMENT WILL NOT EXCEED THE GREATER OF $500 (FIVE HUNDRED DOLLARS) AND THE FEES PAID BY YOU UNDER THE LICENSE (IF ANY). SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.\n"
+ "\n"
+ "8. EXPORT CONTROLS. This license is subject to all applicable export restrictions. You must comply with all export and import laws and restrictions and regulations of any United States or foreign agency or authority relating to the Product and its use.\n"
+ "\n"
+ "9. U.S. GOVERNMENT END-USERS. This Product is a Òcommercial item,Ó as that term is defined in 48 C.F.R. 2.101, consisting of Òcommercial computer softwareÓ and Òcommercial computer software documentation,Ó as such terms are used in 48 C.F.R. 12.212 (Sept. 1995) and 48 C.F.R. 227.7202 (June 1995). Consistent with 48 C.F.R. 12.212, 48 C.F.R. 27.405(b)(2) (June 1998) and 48 C.F.R. 227.7202, all U.S. Government End Users acquire the Product with only those rights as set forth therein.\n"
+ "\n"
+ "10. MISCELLANEOUS. (a) This Agreement constitutes the entire agreement between Mozilla and you concerning the subject matter hereof, and it may only be modified by a written amendment signed by an authorized executive of Mozilla. (b) Except to the extent applicable law, if any, provides otherwise, this Agreement will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions. (c) This Agreement will not be governed by the United Nations Convention on Contracts for the International Sale of Goods. "
+ "(d) If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the partiesÕ original intent, and the remaining portions will remain in full force and effect. (e) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. (f) Except as required by law, the controlling language of this Agreement is English. "
+ "(g) You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms; the Mozilla Corporation may assign its rights under this Agreement without condition. (h) This Agreement will be binding upon and inure to the benefit of the parties, their successors and permitted assigns."
+};
+
+data 'styl' (5000, "English") {
+ // Number of styles following = 2
+ $"0002"
+
+ // Style 1. This is used to display the header lines in bold text.
+ // Start character = 0
+ $"0000 0000"
+ // Height = 16
+ $"0010"
+ // Ascent = 12
+ $"000C"
+ // Font family = 1024 (Lucida Grande)
+ $"0400"
+ // Style bitfield, 0x1=bold 0x2=italic 0x4=underline 0x8=outline
+ // 0x10=shadow 0x20=condensed 0x40=extended
+ $"01"
+ // Style, unused?
+ $"02"
+ // Size = 12 point
+ $"000C"
+ // Color, RGB
+ $"0000 0000 0000"
+
+ // Style 2. This is used to display the body.
+ // Start character = 68
+ $"0000 0044"
+ // Height = 16
+ $"0010"
+ // Ascent = 12
+ $"000C"
+ // Font family = 1024 (Lucida Grande)
+ $"0400"
+ // Style bitfield, 0x1=bold 0x2=italic 0x4=underline 0x8=outline
+ // 0x10=shadow 0x20=condensed 0x40=extended
+ $"00"
+ // Style, unused?
+ $"02"
+ // Size = 12 point
+ $"000C"
+ // Color, RGB
+ $"0000 0000 0000"
+};
diff --git a/mobile/app/mobile.ico b/mobile/app/mobile.ico
new file mode 100644
index 000000000000..38312abac428
Binary files /dev/null and b/mobile/app/mobile.ico differ
diff --git a/mobile/app/mobile.js b/mobile/app/mobile.js
new file mode 100644
index 000000000000..0776824e5514
--- /dev/null
+++ b/mobile/app/mobile.js
@@ -0,0 +1,596 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Matt Brubeck
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#filter substitution
+
+// For browser.xml binding
+//
+// cacheRatio* is a ratio that determines the amount of pixels to cache. The
+// ratio is multiplied by the viewport width or height to get the displayport's
+// width or height, respectively.
+//
+// (divide integer value by 1000 to get the ratio)
+//
+// For instance: cachePercentageWidth is 1500
+// viewport height is 500
+// => display port height will be 500 * 1.5 = 750
+//
+pref("toolkit.browser.cacheRatioWidth", 2000);
+pref("toolkit.browser.cacheRatioHeight", 3000);
+
+// How long before a content view (a handle to a remote scrollable object)
+// expires.
+pref("toolkit.browser.contentViewExpire", 3000);
+
+pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul");
+pref("general.useragent.compatMode.firefox", true);
+pref("browser.chromeURL", "chrome://browser/content/");
+
+pref("browser.tabs.warnOnClose", true);
+#ifdef MOZ_IPC
+pref("browser.tabs.remote", true);
+#else
+pref("browser.tabs.remote", false);
+#endif
+
+pref("toolkit.screen.lock", false);
+
+// From libpref/src/init/all.js, extended to allow a slightly wider zoom range.
+pref("zoom.minPercent", 20);
+pref("zoom.maxPercent", 400);
+pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4");
+
+// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
+pref("browser.viewport.scaleRatio", -1);
+
+/* use custom widget for html:select */
+pref("ui.use_native_popup_windows", true);
+
+/* allow scrollbars to float above chrome ui */
+pref("ui.scrollbarsCanOverlapContent", 1);
+
+/* use long press to display a context menu */
+pref("ui.click_hold_context_menus", true);
+
+/* cache prefs */
+pref("browser.cache.disk.enable", false);
+pref("browser.cache.disk.capacity", 0); // kilobytes
+pref("browser.cache.disk.smart_size.enabled", false);
+pref("browser.cache.disk.smart_size.first_run", false);
+
+pref("browser.cache.memory.enable", true);
+pref("browser.cache.memory.capacity", 1024); // kilobytes
+
+/* image cache prefs */
+pref("image.cache.size", 1048576); // bytes
+
+/* offline cache prefs */
+pref("browser.offline-apps.notify", true);
+pref("browser.cache.offline.enable", true);
+pref("browser.cache.offline.capacity", 5120); // kilobytes
+pref("offline-apps.quota.max", 2048); // kilobytes
+pref("offline-apps.quota.warn", 1024); // kilobytes
+
+/* protocol warning prefs */
+pref("network.protocol-handler.warn-external.tel", false);
+pref("network.protocol-handler.warn-external.mailto", false);
+pref("network.protocol-handler.warn-external.vnd.youtube", false);
+
+/* http prefs */
+pref("network.http.pipelining", true);
+pref("network.http.pipelining.ssl", true);
+pref("network.http.proxy.pipelining", true);
+pref("network.http.pipelining.maxrequests" , 6);
+pref("network.http.keep-alive.timeout", 600);
+pref("network.http.max-connections", 6);
+pref("network.http.max-connections-per-server", 4);
+pref("network.http.max-persistent-connections-per-server", 4);
+pref("network.http.max-persistent-connections-per-proxy", 4);
+#ifdef MOZ_PLATFORM_MAEMO
+pref("network.autodial-helper.enabled", true);
+#endif
+
+// See bug 545869 for details on why these are set the way they are
+pref("network.buffer.cache.count", 24);
+pref("network.buffer.cache.size", 16384);
+
+/* history max results display */
+pref("browser.display.history.maxresults", 100);
+
+/* How many times should have passed before the remote tabs list is refreshed */
+pref("browser.display.remotetabs.timeout", 10);
+
+/* session history */
+pref("browser.sessionhistory.max_total_viewers", 1);
+pref("browser.sessionhistory.max_entries", 50);
+pref("browser.sessionhistory.optimize_eviction", true);
+
+/* session store */
+pref("browser.sessionstore.resume_session_once", false);
+pref("browser.sessionstore.resume_from_crash", true);
+pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
+pref("browser.sessionstore.interval", 10000); // milliseconds
+pref("browser.sessionstore.max_tabs_undo", 5);
+
+/* these should help performance */
+pref("mozilla.widget.force-24bpp", true);
+pref("mozilla.widget.use-buffer-pixmap", true);
+pref("mozilla.widget.disable-native-theme", true);
+
+/* download manager (don't show the window or alert) */
+pref("browser.download.useDownloadDir", true);
+pref("browser.download.folderList", 1); // Default to ~/Downloads
+pref("browser.download.manager.showAlertOnComplete", false);
+pref("browser.download.manager.showAlertInterval", 2000);
+pref("browser.download.manager.retention", 2);
+pref("browser.download.manager.showWhenStarting", false);
+pref("browser.download.manager.closeWhenDone", true);
+pref("browser.download.manager.openDelay", 0);
+pref("browser.download.manager.focusWhenStarting", false);
+pref("browser.download.manager.flashCount", 2);
+pref("browser.download.manager.displayedHistoryDays", 7);
+
+/* download alerts (disabled above) */
+pref("alerts.slideIncrement", 1);
+pref("alerts.slideIncrementTime", 10);
+pref("alerts.totalOpenTime", 6000);
+pref("alerts.height", 50);
+
+/* password manager */
+pref("signon.rememberSignons", true);
+pref("signon.expireMasterPassword", false);
+pref("signon.SignonFileName", "signons.txt");
+
+/* form helper */
+pref("formhelper.enabled", true);
+pref("formhelper.autozoom", true);
+pref("formhelper.autozoom.caret", true);
+pref("formhelper.restore", false);
+
+/* find helper */
+pref("findhelper.autozoom", true);
+
+/* autocomplete */
+pref("browser.formfill.enable", true);
+
+/* microsummaries */
+pref("browser.microsummary.enabled", false);
+pref("browser.microsummary.updateGenerators", false);
+
+/* spellcheck */
+pref("layout.spellcheckDefault", 0);
+
+/* extension manager and xpinstall */
+pref("xpinstall.whitelist.add", "addons.mozilla.org");
+
+pref("extensions.autoupdate.enabled", true);
+pref("extensions.autoupdate.interval", 86400);
+pref("extensions.update.enabled", false);
+pref("extensions.update.interval", 86400);
+pref("extensions.dss.enabled", false);
+pref("extensions.dss.switchPending", false);
+pref("extensions.ignoreMTimeChanges", false);
+pref("extensions.logging.enabled", false);
+pref("extensions.hideInstallButton", true);
+pref("extensions.showMismatchUI", false);
+pref("extensions.hideUpdateButton", false);
+
+pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%");
+
+/* preferences for the Get Add-ons pane */
+pref("extensions.getAddons.cache.enabled", true);
+pref("extensions.getAddons.maxResults", 15);
+pref("extensions.getAddons.recommended.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/recommended/");
+pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/list/featured/all/%MAX_RESULTS%/%OS%/%VERSION%");
+pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/search?q=%TERMS%");
+pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%");
+pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/mobile/");
+pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/guid:%IDS%?src=mobile&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
+
+/* blocklist preferences */
+pref("extensions.blocklist.enabled", true);
+pref("extensions.blocklist.interval", 86400);
+pref("extensions.blocklist.url", "https://addons.mozilla.org/blocklist/3/%APP_ID%/%APP_VERSION%/%PRODUCT%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PING_COUNT%/%TOTAL_PING_COUNT%/%DAYS_SINCE_LAST_PING%/");
+pref("extensions.blocklist.detailsURL", "https://www.mozilla.com/%LOCALE%/blocklist/");
+
+/* block popups by default, and notify the user about blocked popups */
+pref("dom.disable_open_during_load", true);
+pref("privacy.popups.showBrowserMessage", true);
+
+pref("keyword.enabled", true);
+pref("keyword.URL", "http://www.google.com/m?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=");
+
+pref("accessibility.typeaheadfind", false);
+pref("accessibility.typeaheadfind.timeout", 5000);
+pref("accessibility.typeaheadfind.flashBar", 1);
+pref("accessibility.typeaheadfind.linksonly", false);
+pref("accessibility.typeaheadfind.casesensitive", 0);
+// zoom key(F7) conflicts with caret browsing on maemo
+pref("accessibility.browsewithcaret_shortcut.enabled", false);
+
+// Whether or not we show a dialog box informing the user that the update was
+// successfully applied.
+pref("app.update.showInstalledUI", false);
+
+// Whether the character encoding menu is under the main Firefox button. This
+// preference is a string so that localizers can alter it.
+pref("browser.menu.showCharacterEncoding", "chrome://browser/locale/browser.properties");
+pref("intl.charsetmenu.browser.static", "chrome://browser/locale/browser.properties");
+
+// pointer to the default engine name
+pref("browser.search.defaultenginename", "chrome://browser/locale/region.properties");
+// SSL error page behaviour
+pref("browser.ssl_override_behavior", 2);
+pref("browser.xul.error_pages.expert_bad_cert", false);
+
+// disable logging for the search service by default
+pref("browser.search.log", false);
+
+// ordering of search engines in the engine list.
+pref("browser.search.order.1", "chrome://browser/locale/region.properties");
+pref("browser.search.order.2", "chrome://browser/locale/region.properties");
+
+// disable updating
+pref("browser.search.update", false);
+pref("browser.search.update.log", false);
+pref("browser.search.updateinterval", 6);
+
+// enable search suggestions by default
+pref("browser.search.suggest.enabled", true);
+
+// Tell the search service to load search plugins from the locale JAR
+pref("browser.search.loadFromJars", true);
+pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/");
+
+// tell the search service that we don't really expose the "current engine"
+pref("browser.search.noCurrentEngine", true);
+
+// enable xul error pages
+pref("browser.xul.error_pages.enabled", true);
+
+// Specify emptyRestriction = 0 so that bookmarks appear in the list by default
+pref("browser.urlbar.default.behavior", 0);
+pref("browser.urlbar.default.behavior.emptyRestriction", 0);
+
+// Let the faviconservice know that we display favicons as 32x32px so that it
+// uses the right size when optimizing favicons
+pref("places.favicons.optimizeToDimension", 32);
+
+// various and sundry awesomebar prefs (should remove/re-evaluate
+// these once bug 447900 is fixed)
+pref("browser.urlbar.clickSelectsAll", true);
+pref("browser.urlbar.doubleClickSelectsAll", true);
+pref("browser.urlbar.autoFill", false);
+pref("browser.urlbar.matchOnlyTyped", false);
+pref("browser.urlbar.matchBehavior", 1);
+pref("browser.urlbar.filter.javascript", true);
+pref("browser.urlbar.maxRichResults", 24); // increased so we see more results when portrait
+pref("browser.urlbar.search.chunkSize", 1000);
+pref("browser.urlbar.search.timeout", 100);
+pref("browser.urlbar.restrict.history", "^");
+pref("browser.urlbar.restrict.bookmark", "*");
+pref("browser.urlbar.restrict.tag", "+");
+pref("browser.urlbar.match.title", "#");
+pref("browser.urlbar.match.url", "@");
+pref("browser.urlbar.autocomplete.search_threshold", 5);
+pref("browser.history.grouping", "day");
+pref("browser.history.showSessions", false);
+pref("browser.sessionhistory.max_entries", 50);
+pref("browser.history_expire_days", 180);
+pref("browser.history_expire_days_min", 90);
+pref("browser.history_expire_sites", 40000);
+pref("browser.places.migratePostDataAnnotations", true);
+pref("browser.places.updateRecentTagsUri", true);
+pref("places.frecency.numVisits", 10);
+pref("places.frecency.numCalcOnIdle", 50);
+pref("places.frecency.numCalcOnMigrate", 50);
+pref("places.frecency.updateIdleTime", 60000);
+pref("places.frecency.firstBucketCutoff", 4);
+pref("places.frecency.secondBucketCutoff", 14);
+pref("places.frecency.thirdBucketCutoff", 31);
+pref("places.frecency.fourthBucketCutoff", 90);
+pref("places.frecency.firstBucketWeight", 100);
+pref("places.frecency.secondBucketWeight", 70);
+pref("places.frecency.thirdBucketWeight", 50);
+pref("places.frecency.fourthBucketWeight", 30);
+pref("places.frecency.defaultBucketWeight", 10);
+pref("places.frecency.embedVisitBonus", 0);
+pref("places.frecency.linkVisitBonus", 100);
+pref("places.frecency.typedVisitBonus", 2000);
+pref("places.frecency.bookmarkVisitBonus", 150);
+pref("places.frecency.downloadVisitBonus", 0);
+pref("places.frecency.permRedirectVisitBonus", 0);
+pref("places.frecency.tempRedirectVisitBonus", 0);
+pref("places.frecency.defaultVisitBonus", 0);
+pref("places.frecency.unvisitedBookmarkBonus", 140);
+pref("places.frecency.unvisitedTypedBonus", 200);
+
+// disable color management
+pref("gfx.color_management.mode", 0);
+
+// don't allow JS to move and resize existing windows
+pref("dom.disable_window_move_resize", true);
+
+// prevent click image resizing for nsImageDocument
+pref("browser.enable_click_image_resizing", false);
+
+// open in tab preferences
+// 0=default window, 1=current window/tab, 2=new window, 3=new tab in most window
+pref("browser.link.open_external", 3);
+pref("browser.link.open_newwindow", 3);
+// 0=force all new windows to tabs, 1=don't force, 2=only force those with no features set
+pref("browser.link.open_newwindow.restriction", 0);
+
+// controls which bits of private data to clear. by default we clear them all.
+pref("privacy.item.cache", true);
+pref("privacy.item.cookies", true);
+pref("privacy.item.offlineApps", true);
+pref("privacy.item.history", true);
+pref("privacy.item.formdata", true);
+pref("privacy.item.downloads", true);
+pref("privacy.item.passwords", true);
+pref("privacy.item.sessions", true);
+pref("privacy.item.geolocation", true);
+pref("privacy.item.siteSettings", true);
+pref("privacy.item.syncAccount", true);
+
+#ifdef MOZ_PLATFORM_MAEMO
+pref("plugins.force.wmode", "opaque");
+#endif
+
+// URL to the Learn More link XXX this is the firefox one. Bug 495578 fixes this.
+pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
+
+// base url for the wifi geolocation network provider
+pref("geo.wifi.uri", "https://www.google.com/loc/json");
+
+// enable geo
+pref("geo.enabled", true);
+
+// content sink control -- controls responsiveness during page load
+// see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
+pref("content.sink.enable_perf_mode", 2); // 0 - switch, 1 - interactive, 2 - perf
+pref("content.sink.pending_event_mode", 0);
+pref("content.sink.perf_deflect_count", 1000000);
+pref("content.sink.perf_parse_time", 50000000);
+
+pref("javascript.options.mem.gc_frequency", 300);
+pref("javascript.options.mem.high_water_mark", 32);
+pref("javascript.options.methodjit.chrome", false);
+
+pref("dom.max_chrome_script_run_time", 0); // disable slow script dialog for chrome
+pref("dom.max_script_run_time", 20);
+
+// JS error console
+pref("devtools.errorconsole.enabled", false);
+
+// kinetic tweakables
+pref("browser.ui.kinetic.updateInterval", 30);
+pref("browser.ui.kinetic.decelerationRate", 20);
+pref("browser.ui.kinetic.speedSensitivity", 80);
+pref("browser.ui.kinetic.swipeLength", 160);
+
+// zooming
+pref("browser.ui.zoom.pageFitGranularity", 9); // don't zoom to fit by less than 1/9 (11%)
+pref("browser.ui.zoom.animationDuration", 200); // ms duration of double-tap zoom animation
+pref("browser.ui.zoom.reflow", false); // Change text wrapping on double-tap
+pref("browser.ui.zoom.reflow.fontSize", 720);
+
+// pinch gesture
+pref("browser.ui.pinch.maxGrowth", 150); // max pinch distance growth
+pref("browser.ui.pinch.maxShrink", 200); // max pinch distance shrinkage
+pref("browser.ui.pinch.scalingFactor", 500); // scaling factor for above pinch limits
+
+// Touch radius (area around the touch location to look for target elements),
+// in 1/240-inch pixels:
+pref("browser.ui.touch.left", 8);
+pref("browser.ui.touch.right", 8);
+pref("browser.ui.touch.top", 12);
+pref("browser.ui.touch.bottom", 4);
+pref("browser.ui.touch.weight.visited", 120); // percentage
+
+// plugins
+#if MOZ_PLATFORM_MAEMO == 6
+pref("plugin.disable", false);
+#else
+pref("plugin.disable", true);
+#endif
+pref("dom.ipc.plugins.enabled", true);
+
+// process priority
+// higher values give content process less CPU time
+#if MOZ_PLATFORM_MAEMO
+pref("dom.ipc.content.nice", 10);
+#else
+pref("dom.ipc.content.nice", 1);
+#endif
+
+// product URLs
+// The breakpad report server to link to in about:crashes
+pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/");
+pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/mobile/%VERSION%/releasenotes/");
+pref("app.sync.tutorialURL", "https://support.mozilla.com/kb/sync-firefox-between-desktop-and-mobile");
+pref("app.support.baseURL", "http://support.mozilla.com/mobile");
+pref("app.feedbackURL", "http://input.mozilla.com/feedback/");
+pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html");
+pref("app.creditsURL", "http://www.mozilla.org/credits/");
+#if MOZ_UPDATE_CHANNEL == beta
+pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/features/");
+pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/");
+#else
+pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/features/");
+pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
+#endif
+
+pref("app.promo.spark.baseURL", "http://spark.mozilla.org");
+#ifdef MOZ_OFFICIAL_BRANDING
+pref("app.promo.spark.endDate", "2011-05-01");
+#else
+pref("app.promo.spark.endDate", "2011-01-01");
+#endif
+
+// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
+pref("security.alternate_certificate_error_page", "certerror");
+
+pref("security.warn_viewing_mixed", false); // Warning is disabled. See Bug 616712.
+
+// Override some named colors to avoid inverse OS themes
+pref("ui.-moz-dialog", "#efebe7");
+pref("ui.-moz-dialogtext", "#101010");
+pref("ui.-moz-field", "#fff");
+pref("ui.-moz-fieldtext", "#1a1a1a");
+pref("ui.-moz-buttonhoverface", "#f3f0ed");
+pref("ui.-moz-buttonhovertext", "#101010");
+pref("ui.-moz-combobox", "#fff");
+pref("ui.-moz-comboboxtext", "#101010");
+pref("ui.buttonface", "#ece7e2");
+pref("ui.buttonhighlight", "#fff");
+pref("ui.buttonshadow", "#aea194");
+pref("ui.buttontext", "#101010");
+pref("ui.captiontext", "#101010");
+pref("ui.graytext", "#b1a598");
+pref("ui.highlight", "#fad184");
+pref("ui.highlighttext", "#1a1a1a");
+pref("ui.infobackground", "#f5f5b5");
+pref("ui.infotext", "#000");
+pref("ui.menu", "#f7f5f3");
+pref("ui.menutext", "#101010");
+pref("ui.threeddarkshadow", "#000");
+pref("ui.threedface", "#ece7e2");
+pref("ui.threedhighlight", "#fff");
+pref("ui.threedlightshadow", "#ece7e2");
+pref("ui.threedshadow", "#aea194");
+pref("ui.window", "#efebe7");
+pref("ui.windowtext", "#101010");
+pref("ui.windowframe", "#efebe7");
+
+#ifdef MOZ_OFFICIAL_BRANDING
+pref("browser.search.param.yahoo-fr", "moz35");
+pref("browser.search.param.yahoo-fr-cjkt", "moz35");
+pref("browser.search.param.yahoo-fr-ja", "mozff");
+#endif
+
+/* app update prefs */
+pref("app.update.timer", 60000); // milliseconds (1 min)
+
+#ifdef MOZ_UPDATER
+pref("app.update.enabled", true);
+pref("app.update.timerFirstInterval", 20000); // milliseconds
+pref("app.update.auto", false);
+pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
+pref("app.update.mode", 1);
+pref("app.update.silent", false);
+pref("app.update.url", "https://aus2.mozilla.org/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PLATFORM_VERSION%/update.xml");
+pref("app.update.nagTimer.restart", 86400);
+pref("app.update.promptWaitTime", 43200);
+pref("app.update.idletime", 60);
+pref("app.update.showInstalledUI", false);
+pref("app.update.incompatible.mode", 0);
+pref("app.update.download.backgroundInterval", 0);
+
+#ifdef MOZ_OFFICIAL_BRANDING
+pref("app.update.interval", 86400);
+pref("app.update.url.manual", "http://www.mozilla.com/%LOCALE%/m/");
+pref("app.update.url.details", "http://www.mozilla.com/%LOCALE%/mobile/releases/");
+#else
+pref("app.update.interval", 28800);
+pref("app.update.url.manual", "http://www.mozilla.com/%LOCALE%/mobile/");
+pref("app.update.url.details", "http://www.mozilla.com/%LOCALE%/mobile/");
+#endif
+#endif
+
+// replace newlines with spaces on paste into single-line text boxes
+pref("editor.singleLine.pasteNewlines", 2);
+
+#ifdef MOZ_PLATFORM_MAEMO
+// update fonts for better readability
+pref("font.default.x-baltic", "SwissA");
+pref("font.default.x-central-euro", "SwissA");
+pref("font.default.x-cyrillic", "SwissA");
+pref("font.default.x-unicode", "SwissA");
+pref("font.default.x-user-def", "SwissA");
+pref("font.default.x-western", "SwissA");
+#endif
+
+#ifdef MOZ_SERVICES_SYNC
+pref("browser.sync.enabled", true);
+
+// sync service
+pref("services.sync.client.type", "mobile");
+pref("services.sync.registerEngines", "Tab,Bookmarks,Form,History,Password,Prefs");
+pref("services.sync.autoconnectDelay", 5);
+
+// prefs to sync by default
+pref("services.sync.prefs.sync.browser.startup.homepage.title", true);
+pref("services.sync.prefs.sync.browser.startup.homepage", true);
+pref("services.sync.prefs.sync.browser.tabs.warnOnClose", true);
+pref("services.sync.prefs.sync.browser.ui.zoom.reflow", true);
+pref("services.sync.prefs.sync.devtools.errorconsole.enabled", true);
+pref("services.sync.prefs.sync.javascript.enabled", true);
+pref("services.sync.prefs.sync.lightweightThemes.isThemeSelected", true);
+pref("services.sync.prefs.sync.lightweightThemes.usedThemes", true);
+pref("services.sync.prefs.sync.network.cookie.cookieBehavior", true);
+pref("services.sync.prefs.sync.permissions.default.image", true);
+pref("services.sync.prefs.sync.signon.rememberSignons", true);
+#endif
+
+// threshold where a tap becomes a drag, in 1/240" reference pixels
+// The names of the preferences are to be in sync with nsEventStateManager.cpp
+pref("ui.dragThresholdX", 25);
+pref("ui.dragThresholdY", 25);
+
+#if MOZ_PLATFORM_MAEMO == 6
+pref("layers.acceleration.disabled", false);
+#else
+pref("layers.acceleration.disabled", true);
+#endif
+
+pref("notification.feature.enabled", true);
+
+// prevent tooltips from showing up
+pref("browser.chrome.toolbar_tips", false);
+pref("indexedDB.feature.enabled", false);
+
+// prevent video elements from preloading too much data
+pref("media.preload.default", 1); // default to preload none
+pref("media.preload.auto", 2); // preload metadata if preload=auto
+
+// optimize images memory usage
+pref("image.mem.decodeondraw", true);
+pref("content.image.allow_locking", false);
+pref("image.mem.min_discard_timeout_ms", 20000);
+
diff --git a/mobile/app/nsBrowserApp.cpp b/mobile/app/nsBrowserApp.cpp
new file mode 100644
index 000000000000..85c033a07cef
--- /dev/null
+++ b/mobile/app/nsBrowserApp.cpp
@@ -0,0 +1,160 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2002
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Brian Ryner
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsXULAppAPI.h"
+#ifdef XP_WIN
+#include
+#include
+#endif
+
+#include
+#include
+
+#include "plstr.h"
+#include "prprf.h"
+#include "prenv.h"
+
+#include "nsCOMPtr.h"
+#include "nsILocalFile.h"
+#include "nsStringGlue.h"
+
+#ifdef XP_WIN
+// we want to use the DLL blocklist if possible
+#define XRE_WANT_DLL_BLOCKLIST
+// we want a wmain entry point
+#include "nsWindowsWMain.cpp"
+#endif
+
+static void Output(const char *fmt, ... )
+{
+ va_list ap;
+ va_start(ap, fmt);
+
+#if defined(XP_WIN) && !MOZ_WINCONSOLE
+ PRUnichar msg[2048];
+ _vsnwprintf(msg, sizeof(msg)/sizeof(msg[0]), NS_ConvertUTF8toUTF16(fmt).get(), ap);
+ MessageBoxW(NULL, msg, L"XULRunner", MB_OK | MB_ICONERROR);
+#else
+ vfprintf(stderr, fmt, ap);
+#endif
+
+ va_end(ap);
+}
+
+/**
+ * Return true if |arg| matches the given argument name.
+ */
+static PRBool IsArg(const char* arg, const char* s)
+{
+ if (*arg == '-')
+ {
+ if (*++arg == '-')
+ ++arg;
+ return !PL_strcasecmp(arg, s);
+ }
+
+#if defined(XP_WIN) || defined(XP_OS2)
+ if (*arg == '/')
+ return !PL_strcasecmp(++arg, s);
+#endif
+
+ return PR_FALSE;
+}
+
+class ScopedLogging
+{
+public:
+ ScopedLogging() { NS_LogInit(); }
+ ~ScopedLogging() { NS_LogTerm(); }
+};
+
+int main(int argc, char* argv[])
+{
+ ScopedLogging log;
+
+ nsCOMPtr appini;
+ nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
+ if (NS_FAILED(rv)) {
+ Output("Couldn't calculate the application directory.");
+ return 255;
+ }
+ appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
+
+ // Allow firefox.exe to launch XULRunner apps via -app
+ // Note that -app must be the *first* argument.
+ char *appEnv = nsnull;
+ const char *appDataFile = PR_GetEnv("XUL_APP_FILE");
+ if (appDataFile && *appDataFile) {
+ rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
+ if (NS_FAILED(rv)) {
+ Output("Invalid path found: '%s'", appDataFile);
+ return 255;
+ }
+ }
+ else if (argc > 1 && IsArg(argv[1], "app")) {
+ if (argc == 2) {
+ Output("Incorrect number of arguments passed to -app");
+ return 255;
+ }
+
+ rv = XRE_GetFileFromPath(argv[2], getter_AddRefs(appini));
+ if (NS_FAILED(rv)) {
+ Output("application.ini path not recognized: '%s'", argv[2]);
+ return 255;
+ }
+
+ appEnv = PR_smprintf("XUL_APP_FILE=%s", argv[2]);
+ PR_SetEnv(appEnv);
+ argv[2] = argv[0];
+ argv += 2;
+ argc -= 2;
+ }
+
+ nsXREAppData *appData;
+ rv = XRE_CreateAppData(appini, &appData);
+ if (NS_FAILED(rv)) {
+ Output("Couldn't read application.ini");
+ return 255;
+ }
+
+ int result = XRE_main(argc, argv, appData);
+ XRE_FreeAppData(appData);
+ if (appEnv)
+ PR_smprintf_free(appEnv);
+ return result;
+}
diff --git a/mobile/app/profile/extensions/Makefile.in b/mobile/app/profile/extensions/Makefile.in
new file mode 100644
index 000000000000..d3ebb9707268
--- /dev/null
+++ b/mobile/app/profile/extensions/Makefile.in
@@ -0,0 +1,64 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2010
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/rules.mk
+
+ifeq (beta,$(MOZ_UPDATE_CHANNEL))
+EXTENSIONS = \
+ feedback@mobile.mozilla.org \
+ $(NULL)
+
+ABS_DIST = $(call core_abspath,$(DIST))
+
+define _PACKAGE_EXTENSIONS
+rm -f $(ABS_DIST)/bin/extensions/$(dir).xpi
+mkdir -p $(ABS_DIST)/bin/extensions
+cd $(srcdir)/$(dir)/; $(ZIP) -r9 $(ABS_DIST)/bin/extensions/$(dir).xpi *
+
+endef # do not remove the blank line!
+
+libs::
+ $(foreach dir,$(EXTENSIONS),$(_PACKAGE_EXTENSIONS))
+
+endif
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/chrome.manifest b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/chrome.manifest
new file mode 100644
index 000000000000..49bb5554d98f
--- /dev/null
+++ b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/chrome.manifest
@@ -0,0 +1,5 @@
+content feedback content/
+skin feedback classic/1.0 skin/
+locale feedback en-US locale/en-US/
+
+overlay chrome://browser/content/browser.xul chrome://feedback/content/overlay.xul
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/content/content.js b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/content/content.js
new file mode 100644
index 000000000000..e9ac8f6c1b17
--- /dev/null
+++ b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/content/content.js
@@ -0,0 +1,33 @@
+
+function populateFeedback(aMessage) {
+ let json = aMessage.json;
+
+ let referrer = json.referrer;
+ let URLElem = content.document.getElementById("id_url");
+ if (URLElem)
+ URLElem.value = referrer;
+
+ let URLElems = content.document.getElementsByClassName("url");
+ for (let index=0; index
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+var Feedback = {
+ _prefs: [],
+ _device: "",
+ _manufacturer: "",
+
+ init: function(aEvent) {
+ // Delay the widget initialization during startup.
+ window.addEventListener("UIReadyDelayed", function(aEvent) {
+ let appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
+ document.getElementById("feedback-about").setAttribute("desc", appInfo.version);
+
+ // A simple frame script to fill in the referrer page and device info
+ messageManager.loadFrameScript("chrome://feedback/content/content.js", true);
+
+ window.removeEventListener(aEvent.type, arguments.callee, false);
+ document.getElementById("feedback-container").hidden = false;
+
+ let feedbackPrefs = document.getElementById("feedback-tools").childNodes;
+ for (let i = 0; i < feedbackPrefs.length; i++) {
+ let pref = feedbackPrefs[i].getAttribute("pref");
+ if (!pref)
+ continue;
+
+ let value = Services.prefs.getPrefType(pref) == Ci.nsIPrefBranch.PREF_INVALID ? false : Services.prefs.getBoolPref(pref);
+ Feedback._prefs.push({ "name": pref, "value": value });
+ }
+
+ let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
+ Feedback._device = sysInfo.get("device");
+ Feedback._manufacturer = sysInfo.get("manufacturer");
+ }, false);
+ },
+
+ openFeedback: function(aName) {
+ let pref = "extensions.feedback.url." + aName;
+ let url = Services.prefs.getPrefType(pref) == Ci.nsIPrefBranch.PREF_INVALID ? "" : Services.prefs.getCharPref(pref);
+ if (!url)
+ return;
+
+ let currentURL = Browser.selectedBrowser.currentURI.spec;
+ let newTab = BrowserUI.newTab(url, Browser.selectedTab);
+
+ // Tell the feedback page to fill in the referrer URL
+ newTab.browser.messageManager.addMessageListener("DOMContentLoaded", function() {
+ newTab.browser.messageManager.removeMessageListener("DOMContentLoaded", arguments.callee, true);
+ newTab.browser.messageManager.sendAsyncMessage("Feedback:InitPage", { referrer: currentURL, device: Feedback._device, manufacturer: Feedback._manufacturer });
+ });
+ },
+
+ openReadme: function() {
+ let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
+ let url = formatter.formatURLPref("app.releaseNotesURL");
+ BrowserUI.newTab(url, Browser.selectedTab);
+ },
+
+ updateRestart: function updateRestart() {
+ let msg = document.getElementById("feedback-messages");
+ if (msg) {
+ let value = "restart-app";
+ let notification = msg.getNotificationWithValue(value);
+ if (notification) {
+ // Check if the prefs are back to the initial state dismiss the restart
+ // notification because if does not make sense anymore
+ for each (let pref in this._prefs) {
+ let value = Services.prefs.getPrefType(pref.name) == Ci.nsIPrefBranch.PREF_INVALID ? false : Services.prefs.getBoolPref(pref.name);
+ if (value != pref.value)
+ return;
+ }
+
+ notification.close();
+ return;
+ }
+
+ let restartCallback = function(aNotification, aDescription) {
+ // Notify all windows that an application quit has been requested
+ let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
+ Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
+
+ // If nothing aborted, quit the app
+ if (cancelQuit.data == false) {
+ let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
+ appStartup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
+ }
+ };
+
+ let strings = Strings.browser;
+
+ let buttons = [ {
+ label: strings.GetStringFromName("notificationRestart.button"),
+ accessKey: "",
+ callback: restartCallback
+ } ];
+
+ let message = strings.GetStringFromName("notificationRestart.normal");
+ msg.appendNotification(message, value, "", msg.PRIORITY_WARNING_LOW, buttons);
+ }
+ }
+};
+
+window.addEventListener("load", Feedback.init, false);
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/content/overlay.xul b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/content/overlay.xul
new file mode 100644
index 000000000000..1fc0a5e4c4bc
--- /dev/null
+++ b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/content/overlay.xul
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+%feedbackDTD;
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/defaults/preferences/preferences.js b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/defaults/preferences/preferences.js
new file mode 100644
index 000000000000..6830f90f499e
--- /dev/null
+++ b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/defaults/preferences/preferences.js
@@ -0,0 +1,2 @@
+pref("extensions.feedback.url.happy", "http://input.mozilla.com/happy");
+pref("extensions.feedback.url.sad", "http://input.mozilla.com/sad");
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/install.rdf b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/install.rdf
new file mode 100644
index 000000000000..f2ec185ba7b7
--- /dev/null
+++ b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/install.rdf
@@ -0,0 +1,26 @@
+
+
+
+
+ feedback@mobile.mozilla.org
+ 1.0.1
+ 2
+
+
+
+
+ {a23983c0-fd0e-11dc-95ff-0800200c9a66}
+ 2.0b1pre
+ 4.*
+
+
+
+
+ Feedback
+ Help make Firefox better by giving feedback.
+ Mozilla Corporation
+ chrome://feedback/skin/dino-32.png
+
+
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/beta-hdpi.png b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/beta-hdpi.png
new file mode 100644
index 000000000000..d62aed40c717
Binary files /dev/null and b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/beta-hdpi.png differ
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/dino-32.png b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/dino-32.png
new file mode 100644
index 000000000000..35b3a174a558
Binary files /dev/null and b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/dino-32.png differ
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/happy-32.png b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/happy-32.png
new file mode 100644
index 000000000000..49e38c58680a
Binary files /dev/null and b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/happy-32.png differ
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/overlay.css b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/overlay.css
new file mode 100644
index 000000000000..e913c1c33d9e
--- /dev/null
+++ b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/overlay.css
@@ -0,0 +1,11 @@
+#tool-feedback {
+ list-style-image: url("chrome://feedback/skin/beta-hdpi.png");
+}
+
+#feedback-feedback-happy {
+ list-style-image: url("chrome://feedback/skin/happy-32.png");
+}
+
+#feedback-feedback-sad {
+ list-style-image: url("chrome://feedback/skin/sad-32.png");
+}
diff --git a/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/sad-32.png b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/sad-32.png
new file mode 100644
index 000000000000..a59db1ffbf43
Binary files /dev/null and b/mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/sad-32.png differ
diff --git a/mobile/app/splash.bmp b/mobile/app/splash.bmp
new file mode 100644
index 000000000000..c616b6599c13
Binary files /dev/null and b/mobile/app/splash.bmp differ
diff --git a/mobile/branding/nightly/Makefile.in b/mobile/branding/nightly/Makefile.in
new file mode 100644
index 000000000000..bdf28e61f920
--- /dev/null
+++ b/mobile/branding/nightly/Makefile.in
@@ -0,0 +1,49 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Justin Dolske (original author)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DIRS = \
+ content \
+ locales \
+ $(NULL)
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/branding/nightly/android-resources.mn b/mobile/branding/nightly/android-resources.mn
new file mode 100644
index 000000000000..e97d67c9ace1
--- /dev/null
+++ b/mobile/branding/nightly/android-resources.mn
@@ -0,0 +1,3 @@
+mobile/app/android/drawable/alertaddons.png
+mobile/app/android/drawable/alertdownloads.png
+mobile/branding/nightly/content/splash.png
diff --git a/mobile/branding/nightly/configure.sh b/mobile/branding/nightly/configure.sh
new file mode 100644
index 000000000000..7ebd0d859278
--- /dev/null
+++ b/mobile/branding/nightly/configure.sh
@@ -0,0 +1,2 @@
+MOZ_APP_DISPLAYNAME=Fennec
+MOZ_UPDATER=1
diff --git a/mobile/branding/nightly/content/Makefile.in b/mobile/branding/nightly/content/Makefile.in
new file mode 100644
index 000000000000..973bfd053d8d
--- /dev/null
+++ b/mobile/branding/nightly/content/Makefile.in
@@ -0,0 +1,25 @@
+# Branding Makefile
+# - jars chrome artwork
+
+DEPTH = ../../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/rules.mk
+
+LINUX_BRANDING_FILES = \
+ fennec_26x26.png \
+ fennec_40x40.png \
+ fennec_48x48.png \
+ fennec_72x72.png \
+ fennec_scalable.png \
+ fennec_maemo_icon26.txt \
+ $(NULL)
+
+export::
+ $(NSINSTALL) -D $(DIST)/branding
+ cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
+ $(NSINSTALL) -D $(DIST)/install
diff --git a/mobile/branding/nightly/content/about.png b/mobile/branding/nightly/content/about.png
new file mode 100644
index 000000000000..3819f6337a17
Binary files /dev/null and b/mobile/branding/nightly/content/about.png differ
diff --git a/mobile/branding/nightly/content/favicon32.png b/mobile/branding/nightly/content/favicon32.png
new file mode 100644
index 000000000000..3f04acd50d30
Binary files /dev/null and b/mobile/branding/nightly/content/favicon32.png differ
diff --git a/mobile/branding/nightly/content/fennec_26x26.png b/mobile/branding/nightly/content/fennec_26x26.png
new file mode 100644
index 000000000000..5c97a5d4daff
Binary files /dev/null and b/mobile/branding/nightly/content/fennec_26x26.png differ
diff --git a/mobile/branding/nightly/content/fennec_40x40.png b/mobile/branding/nightly/content/fennec_40x40.png
new file mode 100644
index 000000000000..13532c21c134
Binary files /dev/null and b/mobile/branding/nightly/content/fennec_40x40.png differ
diff --git a/mobile/branding/nightly/content/fennec_48x48.png b/mobile/branding/nightly/content/fennec_48x48.png
new file mode 100644
index 000000000000..6e01e7aec57e
Binary files /dev/null and b/mobile/branding/nightly/content/fennec_48x48.png differ
diff --git a/mobile/branding/nightly/content/fennec_72x72.png b/mobile/branding/nightly/content/fennec_72x72.png
new file mode 100644
index 000000000000..c7874013f6af
Binary files /dev/null and b/mobile/branding/nightly/content/fennec_72x72.png differ
diff --git a/mobile/branding/nightly/content/fennec_maemo_icon26.txt b/mobile/branding/nightly/content/fennec_maemo_icon26.txt
new file mode 100644
index 000000000000..8428b289f456
--- /dev/null
+++ b/mobile/branding/nightly/content/fennec_maemo_icon26.txt
@@ -0,0 +1,74 @@
+ iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
+ d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADFxJREFUeNrsWWtwVOUZfs45
+ e89es5v7bQMh3DGBtpJWIRQvaEWg0FFbOyX9oR3bjtDRTjuditjpj05narWt
+ o84oYB11nCLRVqtUIYQKImiWS7gFyIaETbLJ3u97ds/p+3274WLFUsQZmeGb
+ fHPO7jn7ned53+e9fCeCqqq4moeIq3xcI3CNwDUCV/kQrtRCTauedCslJatV
+ c8lCu1HTbnXZYauxI+0LIBZKYiSSCguZjEc6M/S6zjvU2XvsGe8VIZAa/2iN
+ VqvxaGzXdV0m8Ha5vm6dzWltn99cjmkVZtiNWlgtGpTatQiGZURjOX7v0ZEo
+ Pug5Dp+nF8LQaKcukln7eYjkIvvdwuHdr4Us1hK7qcQEm8PaSd+/TrOTCIU/
+ 68czp95vT9yyeJ1ita65bpILK+ZUXnDdbtPCbtXwc/94FslUHqCiKaSTOH70
+ FDo3b0NmcBQaWVh/vG/To5cKmA7Ls5nsskQ82ZJMpCAc6H51uySJ7UpegaQR
+ 4apwodTlYOAZmfVExPsp4FsSbfM25OvqW2bWO7F0duV/CbPUqoWDSLDzsUAW
+ sQR5QVHI5QmINEcGfNj45KtQZRmSoPUYJPMi8kb4IsBX0+HBeCzREhwLgsBD
+ FEWIktSlMZoMHrOlpN1WaoOcIUsRq0HvkN3msK222iyr6cd/LBIJT4DP1jm3
+ i8jYlZAfM75ag6FomoAKF0SV1ipCyRbOh5MZhJmM8nmIiQSERAyCKKBxcjV8
+ /hD0dktLdeus7eT7C0gUga/LpDPuQe8ZxCIxkLEZcPImmEd3iAR406hvFEcO
+ HIVvcJgvXOeuhV6vQy6XZ+usodlDi7Uz2VQtadmQy6fsamAMZXIMoTMj8PnG
+ kM1nYLECcTKCoFWQQQ7BVBahdBaBeBb+SBqCToWxzIhAOIbhQT+XVDoYha2x
+ Go45DS2u66dsLwJvodlDpxsIk/vAvkNgls+TAfKkFH5U+HkXt9eH72wKMdkq
+ 5OI8gTZbzahtqGExcYEr3+o+7XlhQGn5+NnXYJ3WiOm3tUEZiSAlA7MXTIPe
+ pOMGYPMCj6gTU+XzePdBRA6fxMixAYz6xmFwWDDj+9+CxqjDTZp41w9XTm/J
+ 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
+ nEzLJzdlAAAAAElFTkSuQmCC
+
diff --git a/mobile/branding/nightly/content/fennec_scalable.png b/mobile/branding/nightly/content/fennec_scalable.png
new file mode 100644
index 000000000000..b940df9b1e90
Binary files /dev/null and b/mobile/branding/nightly/content/fennec_scalable.png differ
diff --git a/mobile/branding/nightly/content/jar.mn b/mobile/branding/nightly/content/jar.mn
new file mode 100644
index 000000000000..2efd6b8ed3c2
--- /dev/null
+++ b/mobile/branding/nightly/content/jar.mn
@@ -0,0 +1,7 @@
+chrome.jar:
+% content branding %content/branding/
+ content/branding/about.png (about.png)
+ content/branding/logoWordmark.png (logoWordmark.png)
+ content/branding/logo.png (logo.png)
+ content/branding/favicon32.png (favicon32.png)
+ content/branding/spark.png (spark.png)
diff --git a/mobile/branding/nightly/content/logo.png b/mobile/branding/nightly/content/logo.png
new file mode 100644
index 000000000000..91377a312090
Binary files /dev/null and b/mobile/branding/nightly/content/logo.png differ
diff --git a/mobile/branding/nightly/content/logoWordmark.png b/mobile/branding/nightly/content/logoWordmark.png
new file mode 100644
index 000000000000..a3017f59ecf0
Binary files /dev/null and b/mobile/branding/nightly/content/logoWordmark.png differ
diff --git a/mobile/branding/nightly/content/spark.png b/mobile/branding/nightly/content/spark.png
new file mode 100644
index 000000000000..32c8af51d275
Binary files /dev/null and b/mobile/branding/nightly/content/spark.png differ
diff --git a/mobile/branding/nightly/content/splash.png b/mobile/branding/nightly/content/splash.png
new file mode 100644
index 000000000000..25a0830eac70
Binary files /dev/null and b/mobile/branding/nightly/content/splash.png differ
diff --git a/mobile/branding/nightly/locales/Makefile.in b/mobile/branding/nightly/locales/Makefile.in
new file mode 100644
index 000000000000..fd37ba4097c7
--- /dev/null
+++ b/mobile/branding/nightly/locales/Makefile.in
@@ -0,0 +1,47 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Mozilla Browser code.
+#
+# The Initial Developer of the Original Code is
+# Benjamin Smedberg
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+relativesrcdir = mobile/branding/nightly/locales
+
+include $(DEPTH)/config/autoconf.mk
+
+DEFINES += -DAB_CD=$(AB_CD)
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/branding/nightly/locales/en-US/brand.dtd b/mobile/branding/nightly/locales/en-US/brand.dtd
new file mode 100644
index 000000000000..e8f34e6bc01a
--- /dev/null
+++ b/mobile/branding/nightly/locales/en-US/brand.dtd
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/mobile/branding/nightly/locales/en-US/brand.properties b/mobile/branding/nightly/locales/en-US/brand.properties
new file mode 100644
index 000000000000..073d7be59bf0
--- /dev/null
+++ b/mobile/branding/nightly/locales/en-US/brand.properties
@@ -0,0 +1,2 @@
+brandShortName=Fennec
+brandFullName=Mozilla Fennec
diff --git a/mobile/branding/nightly/locales/jar.mn b/mobile/branding/nightly/locales/jar.mn
new file mode 100644
index 000000000000..de3d979b7751
--- /dev/null
+++ b/mobile/branding/nightly/locales/jar.mn
@@ -0,0 +1,7 @@
+#filter substitution
+
+@AB_CD@.jar:
+% locale branding @AB_CD@ %locale/branding/
+# Nightly branding only exists in en-US
+ locale/branding/brand.dtd (en-US/brand.dtd)
+* locale/branding/brand.properties (en-US/brand.properties)
diff --git a/mobile/branding/official/Makefile.in b/mobile/branding/official/Makefile.in
new file mode 100644
index 000000000000..bdf28e61f920
--- /dev/null
+++ b/mobile/branding/official/Makefile.in
@@ -0,0 +1,49 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Justin Dolske (original author)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DIRS = \
+ content \
+ locales \
+ $(NULL)
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/branding/official/android-resources.mn b/mobile/branding/official/android-resources.mn
new file mode 100644
index 000000000000..e5e89fb2d2d0
--- /dev/null
+++ b/mobile/branding/official/android-resources.mn
@@ -0,0 +1,3 @@
+mobile/app/android/drawable/alertaddons.png
+mobile/app/android/drawable/alertdownloads.png
+mobile/branding/official/content/splash.png
diff --git a/mobile/branding/official/configure.sh b/mobile/branding/official/configure.sh
new file mode 100644
index 000000000000..5078894daebc
--- /dev/null
+++ b/mobile/branding/official/configure.sh
@@ -0,0 +1,3 @@
+MOZ_APP_DISPLAYNAME=Firefox
+ANDROID_PACKAGE_NAME=org.mozilla.firefox
+MOZ_UPDATER=
diff --git a/mobile/branding/official/content/Makefile.in b/mobile/branding/official/content/Makefile.in
new file mode 100644
index 000000000000..973bfd053d8d
--- /dev/null
+++ b/mobile/branding/official/content/Makefile.in
@@ -0,0 +1,25 @@
+# Branding Makefile
+# - jars chrome artwork
+
+DEPTH = ../../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/rules.mk
+
+LINUX_BRANDING_FILES = \
+ fennec_26x26.png \
+ fennec_40x40.png \
+ fennec_48x48.png \
+ fennec_72x72.png \
+ fennec_scalable.png \
+ fennec_maemo_icon26.txt \
+ $(NULL)
+
+export::
+ $(NSINSTALL) -D $(DIST)/branding
+ cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
+ $(NSINSTALL) -D $(DIST)/install
diff --git a/mobile/branding/official/content/about.png b/mobile/branding/official/content/about.png
new file mode 100644
index 000000000000..3cc1444f645b
Binary files /dev/null and b/mobile/branding/official/content/about.png differ
diff --git a/mobile/branding/official/content/favicon32.png b/mobile/branding/official/content/favicon32.png
new file mode 100644
index 000000000000..ac4a6968bf27
Binary files /dev/null and b/mobile/branding/official/content/favicon32.png differ
diff --git a/mobile/branding/official/content/fennec_26x26.png b/mobile/branding/official/content/fennec_26x26.png
new file mode 100644
index 000000000000..c5bf9c25c09d
Binary files /dev/null and b/mobile/branding/official/content/fennec_26x26.png differ
diff --git a/mobile/branding/official/content/fennec_40x40.png b/mobile/branding/official/content/fennec_40x40.png
new file mode 100644
index 000000000000..1bf715b96a29
Binary files /dev/null and b/mobile/branding/official/content/fennec_40x40.png differ
diff --git a/mobile/branding/official/content/fennec_48x48.png b/mobile/branding/official/content/fennec_48x48.png
new file mode 100644
index 000000000000..c8b62e0c1db7
Binary files /dev/null and b/mobile/branding/official/content/fennec_48x48.png differ
diff --git a/mobile/branding/official/content/fennec_72x72.png b/mobile/branding/official/content/fennec_72x72.png
new file mode 100644
index 000000000000..6156f2d8c1f1
Binary files /dev/null and b/mobile/branding/official/content/fennec_72x72.png differ
diff --git a/mobile/branding/official/content/fennec_maemo_icon26.txt b/mobile/branding/official/content/fennec_maemo_icon26.txt
new file mode 100644
index 000000000000..92142d070071
--- /dev/null
+++ b/mobile/branding/official/content/fennec_maemo_icon26.txt
@@ -0,0 +1,126 @@
+ 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
+
diff --git a/mobile/branding/official/content/fennec_scalable.png b/mobile/branding/official/content/fennec_scalable.png
new file mode 100644
index 000000000000..f5dbde761c7a
Binary files /dev/null and b/mobile/branding/official/content/fennec_scalable.png differ
diff --git a/mobile/branding/official/content/jar.mn b/mobile/branding/official/content/jar.mn
new file mode 100644
index 000000000000..2efd6b8ed3c2
--- /dev/null
+++ b/mobile/branding/official/content/jar.mn
@@ -0,0 +1,7 @@
+chrome.jar:
+% content branding %content/branding/
+ content/branding/about.png (about.png)
+ content/branding/logoWordmark.png (logoWordmark.png)
+ content/branding/logo.png (logo.png)
+ content/branding/favicon32.png (favicon32.png)
+ content/branding/spark.png (spark.png)
diff --git a/mobile/branding/official/content/logo.png b/mobile/branding/official/content/logo.png
new file mode 100644
index 000000000000..9d9d0c57e030
Binary files /dev/null and b/mobile/branding/official/content/logo.png differ
diff --git a/mobile/branding/official/content/logoWordmark.png b/mobile/branding/official/content/logoWordmark.png
new file mode 100644
index 000000000000..878363181ace
Binary files /dev/null and b/mobile/branding/official/content/logoWordmark.png differ
diff --git a/mobile/branding/official/content/spark.png b/mobile/branding/official/content/spark.png
new file mode 100644
index 000000000000..32c8af51d275
Binary files /dev/null and b/mobile/branding/official/content/spark.png differ
diff --git a/mobile/branding/official/content/splash.png b/mobile/branding/official/content/splash.png
new file mode 100644
index 000000000000..84ab581d20e5
Binary files /dev/null and b/mobile/branding/official/content/splash.png differ
diff --git a/mobile/branding/official/locales/Makefile.in b/mobile/branding/official/locales/Makefile.in
new file mode 100644
index 000000000000..6baeb6366347
--- /dev/null
+++ b/mobile/branding/official/locales/Makefile.in
@@ -0,0 +1,47 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Mozilla Browser code.
+#
+# The Initial Developer of the Original Code is
+# Benjamin Smedberg
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+relativesrcdir = mobile/branding/official/locales
+
+include $(DEPTH)/config/autoconf.mk
+
+DEFINES += -DAB_CD=$(AB_CD)
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/branding/official/locales/en-US/brand.dtd b/mobile/branding/official/locales/en-US/brand.dtd
new file mode 100644
index 000000000000..68cccf4008de
--- /dev/null
+++ b/mobile/branding/official/locales/en-US/brand.dtd
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/mobile/branding/official/locales/en-US/brand.properties b/mobile/branding/official/locales/en-US/brand.properties
new file mode 100644
index 000000000000..77beeaeee75c
--- /dev/null
+++ b/mobile/branding/official/locales/en-US/brand.properties
@@ -0,0 +1,2 @@
+brandShortName=Firefox
+brandFullName=Mozilla Firefox
diff --git a/mobile/branding/official/locales/jar.mn b/mobile/branding/official/locales/jar.mn
new file mode 100644
index 000000000000..b9ad682dc04f
--- /dev/null
+++ b/mobile/branding/official/locales/jar.mn
@@ -0,0 +1,7 @@
+#filter substitution
+
+@AB_CD@.jar:
+% locale branding @AB_CD@ %locale/branding/
+# Branding only exists in en-US
+ locale/branding/brand.dtd (en-US/brand.dtd)
+* locale/branding/brand.properties (en-US/brand.properties)
diff --git a/mobile/build.mk b/mobile/build.mk
new file mode 100644
index 000000000000..062d5b41626e
--- /dev/null
+++ b/mobile/build.mk
@@ -0,0 +1,90 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+ifndef LIBXUL_SDK
+# Needed for building our components as part of libxul
+APP_LIBXUL_DIRS += mobile/components/build
+
+include $(topsrcdir)/toolkit/toolkit-tiers.mk
+else
+ifdef ENABLE_TESTS
+tier_testharness_dirs += \
+ testing/mochitest \
+ $(NULL)
+endif
+endif
+
+TIERS += app
+
+ifdef MOZ_EXTENSIONS
+tier_app_dirs += extensions
+endif
+
+ifdef MOZ_SERVICES_SYNC
+tier_app_dirs += services
+endif
+
+tier_app_dirs += \
+ $(MOZ_BRANDING_DIRECTORY) \
+ mobile \
+ $(NULL)
+
+
+installer:
+ @$(MAKE) -C mobile/installer installer
+
+package:
+ rm -rf dist/fennec*
+ifeq ($(OS_ARCH),WINCE)
+ @$(MAKE) -C mobile/installer installer
+else
+ @$(MAKE) -C mobile/installer
+endif
+
+install::
+ @echo "Mobile can't be installed directly."
+ @exit 1
+
+deb: package
+ @$(MAKE) -C mobile/installer deb
+
+upload::
+ @$(MAKE) -C mobile/installer upload
+
+ifeq ($(OS_TARGET),Linux)
+deb: installer
+endif
diff --git a/mobile/chrome/Makefile.in b/mobile/chrome/Makefile.in
new file mode 100644
index 000000000000..37adece347be
--- /dev/null
+++ b/mobile/chrome/Makefile.in
@@ -0,0 +1,55 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+DEFINES += -DAB_CD=$(MOZ_UI_LOCALE) \
+ -DPACKAGE=browser \
+ -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
+ $(NULL)
+
+
+ifdef ENABLE_TESTS
+DIRS += tests
+endif
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/chrome/content/AlertsHelper.js b/mobile/chrome/content/AlertsHelper.js
new file mode 100644
index 000000000000..7dc15b91874a
--- /dev/null
+++ b/mobile/chrome/content/AlertsHelper.js
@@ -0,0 +1,95 @@
+var AlertsHelper = {
+ _timeoutID: -1,
+ _listener: null,
+ _cookie: "",
+ _clickable: false,
+ get container() {
+ delete this.container;
+ let container = document.getElementById("alerts-container");
+
+ // Move the popup on the other side if we are in RTL
+ let [leftSidebar, rightSidebar] = [Elements.tabs.getBoundingClientRect(), Elements.controls.getBoundingClientRect()];
+ if (leftSidebar.left > rightSidebar.left)
+ container.setAttribute("left", "0");
+ else
+ container.setAttribute("right", "0");
+
+ let self = this;
+ container.addEventListener("transitionend", function() {
+ self.alertTransitionOver();
+ }, true);
+
+ return this.container = container;
+ },
+
+ showAlertNotification: function ah_show(aImageURL, aTitle, aText, aTextClickable, aCookie, aListener) {
+ this._clickable = aTextClickable || false;
+ this._listener = aListener || null;
+ this._cookie = aCookie || "";
+
+ // Reset the container settings from the last time so layout can happen naturally
+ let container = this.container;
+ container.removeAttribute("width");
+ let alertText = document.getElementById("alerts-text");
+ alertText.style.whiteSpace = "";
+
+ document.getElementById("alerts-image").setAttribute("src", aImageURL);
+ document.getElementById("alerts-title").value = aTitle;
+ alertText.textContent = aText;
+
+ container.hidden = false;
+ let bcr = container.getBoundingClientRect();
+ if (bcr.width > window.innerWidth - 50) {
+ // If the window isn't wide enough, we need to re-layout
+ container.setAttribute("width", window.innerWidth - 50); // force a max width
+ alertText.style.whiteSpace = "pre-wrap"; // wrap text as needed
+ bcr = container.getBoundingClientRect(); // recalculate the bcr
+ }
+ container.setAttribute("width", bcr.width); // redundant but cheap
+ container.setAttribute("height", bcr.height);
+
+#ifdef ANDROID
+ let offset = (window.innerWidth - container.width) / 2;
+ if (offset < 0)
+ Cu.reportError("showAlertNotification called before the window is ready");
+ else if (container.hasAttribute("left"))
+ container.setAttribute("left", offset);
+ else
+ container.setAttribute("right", offset);
+#endif
+
+ container.classList.add("showing");
+
+ let timeout = Services.prefs.getIntPref("alerts.totalOpenTime");
+ let self = this;
+ if (this._timeoutID)
+ clearTimeout(this._timeoutID);
+ this._timeoutID = setTimeout(function() { self._timeoutAlert(); }, timeout);
+ },
+
+ _timeoutAlert: function ah__timeoutAlert() {
+ this._timeoutID = -1;
+
+ this.container.classList.remove("showing");
+ if (this._listener)
+ this._listener.observe(null, "alertfinished", this._cookie);
+ },
+
+ alertTransitionOver: function ah_alertTransitionOver() {
+ let container = this.container;
+ if (!container.classList.contains("showing")) {
+ container.height = 0;
+ container.hidden = true;
+ }
+ },
+
+ click: function ah_click(aEvent) {
+ if (this._clickable && this._listener)
+ this._listener.observe(null, "alertclickcallback", this._cookie);
+
+ if (this._timeoutID != -1) {
+ clearTimeout(this._timeoutID);
+ this._timeoutAlert();
+ }
+ }
+};
diff --git a/mobile/chrome/content/AnimatedZoom.js b/mobile/chrome/content/AnimatedZoom.js
new file mode 100644
index 000000000000..c9d29ca26ee0
--- /dev/null
+++ b/mobile/chrome/content/AnimatedZoom.js
@@ -0,0 +1,152 @@
+// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+/*
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Benjamin Stover
+ * Matt Brubeck
+ * Jaakko Kiviluoto
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * Responsible for zooming in to a given view rectangle
+ */
+const AnimatedZoom = {
+ startScale: null,
+
+ /** Starts an animated zoom to zoomRect. */
+ animateTo: function(aZoomRect) {
+ if (!aZoomRect)
+ return;
+
+ this.zoomTo = aZoomRect.clone();
+
+ if (this.animationDuration === undefined)
+ this.animationDuration = Services.prefs.getIntPref("browser.ui.zoom.animationDuration");
+
+ Browser.hideSidebars();
+ Browser.hideTitlebar();
+ Browser.forceChromeReflow();
+
+ this.start();
+
+ // Check if zooming animations were occuring before.
+ if (!this.zoomRect) {
+ this.updateTo(this.zoomFrom);
+
+ mozRequestAnimationFrame(this);
+
+ let event = document.createEvent("Events");
+ event.initEvent("AnimatedZoomBegin", true, true);
+ window.dispatchEvent(event);
+ }
+ },
+
+ start: function start() {
+ this.tab = Browser.selectedTab;
+ this.browser = this.tab.browser;
+ this.zoomFrom = this.zoomRect || this.getStartRect();
+ this.startScale = this.browser.scale;
+ this.beginTime = mozAnimationStartTime;
+ },
+
+ /** Get the visible rect, in device pixels relative to the content origin. */
+ getStartRect: function getStartRect() {
+ let browser = this.browser;
+ let bcr = browser.getBoundingClientRect();
+ let scroll = browser.getRootView().getPosition();
+ return new Rect(scroll.x, scroll.y, bcr.width, bcr.height);
+ },
+
+ /** Update the visible rect, in device pixels relative to the content origin. */
+ updateTo: function(nextRect) {
+ let zoomRatio = window.innerWidth / nextRect.width;
+ let scale = this.startScale * zoomRatio;
+ let scrollX = nextRect.left * zoomRatio;
+ let scrollY = nextRect.top * zoomRatio;
+
+ this.browser.fuzzyZoom(scale, scrollX, scrollY);
+
+ this.zoomRect = nextRect;
+ },
+
+ /** Stop animation, zoom to point, and clean up. */
+ finish: function() {
+ this.updateTo(this.zoomTo || this.zoomRect);
+
+ // Check whether the zoom limits have changed since the animation started.
+ let browser = this.browser;
+ let finalScale = this.tab.clampZoomLevel(browser.scale);
+ if (browser.scale != finalScale)
+ browser.scale = finalScale; // scale= calls finishFuzzyZoom.
+ else
+ browser.finishFuzzyZoom();
+
+ Browser.hideSidebars();
+ Browser.hideTitlebar();
+
+ this.beginTime = null;
+ this.zoomTo = null;
+ this.zoomFrom = null;
+ this.zoomRect = null;
+ this.startScale = null;
+
+ let event = document.createEvent("Events");
+ event.initEvent("AnimatedZoomEnd", true, true);
+ window.dispatchEvent(event);
+ },
+
+ isZooming: function isZooming() {
+ return this.beginTime != null;
+ },
+
+ onBeforePaint: function(aTimeStamp) {
+ try {
+ let tdiff = aTimeStamp - this.beginTime;
+ let counter = tdiff / this.animationDuration;
+ if (counter < 1) {
+ // update browser to interpolated rectangle
+ let rect = this.zoomFrom.blend(this.zoomTo, counter);
+ this.updateTo(rect);
+ mozRequestAnimationFrame(this);
+ } else {
+ // last cycle already rendered final scaled image, now clean up
+ this.finish();
+ }
+ } catch(e) {
+ this.finish();
+ throw e;
+ }
+ }
+};
diff --git a/mobile/chrome/content/AppMenu.js b/mobile/chrome/content/AppMenu.js
new file mode 100644
index 000000000000..6c69139ef0b3
--- /dev/null
+++ b/mobile/chrome/content/AppMenu.js
@@ -0,0 +1,35 @@
+var AppMenu = {
+ get panel() {
+ delete this.panel;
+ return this.panel = document.getElementById("appmenu");
+ },
+
+ show: function show() {
+ if (BrowserUI.activePanel || BrowserUI.isPanelVisible())
+ return;
+ this.panel.setAttribute("count", this.panel.childNodes.length);
+ this.panel.hidden = false;
+
+ addEventListener("keypress", this, true);
+
+ BrowserUI.lockToolbar();
+ BrowserUI.pushPopup(this, [this.panel, Elements.toolbarContainer]);
+ },
+
+ hide: function hide() {
+ this.panel.hidden = true;
+
+ removeEventListener("keypress", this, true);
+
+ BrowserUI.unlockToolbar();
+ BrowserUI.popPopup(this);
+ },
+
+ toggle: function toggle() {
+ this.panel.hidden ? this.show() : this.hide();
+ },
+
+ handleEvent: function handleEvent(aEvent) {
+ this.hide();
+ }
+};
diff --git a/mobile/chrome/content/AwesomePanel.js b/mobile/chrome/content/AwesomePanel.js
new file mode 100644
index 000000000000..e8ed8eb87402
--- /dev/null
+++ b/mobile/chrome/content/AwesomePanel.js
@@ -0,0 +1,44 @@
+var AwesomePanel = function(aElementId, aCommandId) {
+ let command = document.getElementById(aCommandId);
+
+ this.panel = document.getElementById(aElementId),
+
+ this.open = function aw_open() {
+ command.setAttribute("checked", "true");
+ this.panel.hidden = false;
+
+ if (this.panel.hasAttribute("onshow")) {
+ let func = new Function("panel", this.panel.getAttribute("onshow"));
+ func.call(this.panel);
+ }
+
+ if (this.panel.open)
+ this.panel.open();
+ },
+
+ this.close = function aw_close() {
+ if (this.panel.hasAttribute("onhide")) {
+ let func = new Function("panel", this.panel.getAttribute("onhide"));
+ func.call(this.panel);
+ }
+
+ if (this.panel.close)
+ this.panel.close();
+
+ this.panel.hidden = true;
+ command.removeAttribute("checked");
+ },
+
+ this.doCommand = function aw_doCommand() {
+ BrowserUI.doCommand(aCommandId);
+ },
+
+ this.openLink = function aw_openLink(aEvent) {
+ let item = aEvent.originalTarget;
+ let uri = item.getAttribute("url") || item.getAttribute("uri");
+ if (uri != "") {
+ Browser.selectedBrowser.userTypedValue = uri;
+ BrowserUI.goToURI(uri);
+ }
+ }
+};
diff --git a/mobile/chrome/content/BookmarkHelper.js b/mobile/chrome/content/BookmarkHelper.js
new file mode 100644
index 000000000000..6b96d8ef98ae
--- /dev/null
+++ b/mobile/chrome/content/BookmarkHelper.js
@@ -0,0 +1,76 @@
+var BookmarkHelper = {
+ _editor: null,
+
+ get box() {
+ delete this.box;
+ this.box = document.getElementById("bookmark-container");
+ return this.box;
+ },
+
+ edit: function BH_edit(aURI) {
+ if (!aURI)
+ aURI = getBrowser().currentURI;
+
+ let itemId = PlacesUtils.getMostRecentBookmarkForURI(aURI);
+ if (itemId == -1)
+ return;
+
+ // When opening the bookmark helper dialog be sure there is not others
+ // popup opened like the bookmakr popup
+ BookmarkPopup.hide();
+
+ let title = PlacesUtils.bookmarks.getItemTitle(itemId);
+ let tags = PlacesUtils.tagging.getTagsForURI(aURI, {});
+
+ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ this._editor = document.createElementNS(XULNS, "placeitem");
+ this._editor.setAttribute("id", "bookmark-item");
+ this._editor.setAttribute("flex", "1");
+ this._editor.setAttribute("type", "bookmark");
+ this._editor.setAttribute("ui", "manage");
+ this._editor.setAttribute("title", title);
+ this._editor.setAttribute("uri", aURI.spec);
+ this._editor.setAttribute("itemid", itemId);
+ this._editor.setAttribute("tags", tags.join(", "));
+ this._editor.setAttribute("onclose", "BookmarkHelper.close()");
+ document.getElementById("bookmark-form").appendChild(this._editor);
+
+ this.box.hidden = false;
+ BrowserUI.pushDialog(this);
+
+ function waitForWidget(self) {
+ try {
+ self._editor.startEditing();
+ } catch(e) {
+ setTimeout(waitForWidget, 0, self);
+ }
+ }
+ setTimeout(waitForWidget, 0, this);
+ },
+
+ save: function BH_save() {
+ this._editor.stopEditing(true);
+ },
+
+ close: function BH_close() {
+ BrowserUI.updateStar();
+
+ // Note: the _editor will have already saved the data, if needed, by the time
+ // this method is called, since this method is called via the "close" event.
+ this._editor.parentNode.removeChild(this._editor);
+ this._editor = null;
+
+ BrowserUI.popDialog();
+ this.box.hidden = true;
+ },
+
+ removeBookmarksForURI: function BH_removeBookmarksForURI(aURI) {
+ //XXX blargle xpconnect! might not matter, but a method on
+ // nsINavBookmarksService that takes an array of items to
+ // delete would be faster. better yet, a method that takes a URI!
+ let itemIds = PlacesUtils.getBookmarksForURI(aURI);
+ itemIds.forEach(PlacesUtils.bookmarks.removeItem);
+
+ BrowserUI.updateStar();
+ }
+};
diff --git a/mobile/chrome/content/BookmarkPopup.js b/mobile/chrome/content/BookmarkPopup.js
new file mode 100644
index 000000000000..7b5216a3c664
--- /dev/null
+++ b/mobile/chrome/content/BookmarkPopup.js
@@ -0,0 +1,38 @@
+var BookmarkPopup = {
+ get box() {
+ delete this.box;
+ this.box = document.getElementById("bookmark-popup");
+
+ let [tabsSidebar, controlsSidebar] = [Elements.tabs.getBoundingClientRect(), Elements.controls.getBoundingClientRect()];
+ this.box.setAttribute(tabsSidebar.left < controlsSidebar.left ? "right" : "left", controlsSidebar.width - this.box.offset);
+ this.box.top = BrowserUI.starButton.getBoundingClientRect().top - this.box.offset;
+
+ // Hide the popup if there is any new page loading
+ let self = this;
+ messageManager.addMessageListener("pagehide", function(aMessage) {
+ self.hide();
+ });
+
+ return this.box;
+ },
+
+ hide : function hide() {
+ this.box.hidden = true;
+ BrowserUI.popPopup(this);
+ },
+
+ show : function show() {
+ this.box.hidden = false;
+ this.box.anchorTo(BrowserUI.starButton);
+
+ // include starButton here, so that click-to-dismiss works as expected
+ BrowserUI.pushPopup(this, [this.box, BrowserUI.starButton]);
+ },
+
+ toggle : function toggle() {
+ if (this.box.hidden)
+ this.show();
+ else
+ this.hide();
+ }
+};
diff --git a/mobile/chrome/content/ContextCommands.js b/mobile/chrome/content/ContextCommands.js
new file mode 100644
index 000000000000..82666537c7c2
--- /dev/null
+++ b/mobile/chrome/content/ContextCommands.js
@@ -0,0 +1,107 @@
+// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+var ContextCommands = {
+ copy: function cc_copy() {
+ let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
+ clipboard.copyString(ContextHelper.popupState.string);
+
+ let target = ContextHelper.popupState.target;
+ if (target)
+ target.focus();
+ },
+
+#ifdef ANDROID
+ selectInput: function cc_selectInput() {
+ let imePicker = Cc["@mozilla.org/imepicker;1"].getService(Ci.nsIIMEPicker);
+ imePicker.show();
+ },
+#endif
+
+ paste: function cc_paste() {
+ let target = ContextHelper.popupState.target;
+ if (target.localName == "browser") {
+ let x = ContextHelper.popupState.x;
+ let y = ContextHelper.popupState.y;
+ let json = {x: x, y: y, command: "paste" };
+ messageManager.sendAsyncMessage("Browser:ContextCommand", json);
+ } else {
+ target.editor.paste(Ci.nsIClipboard.kGlobalClipboard);
+ target.focus();
+ }
+ },
+
+ selectAll: function cc_selectAll() {
+ let target = ContextHelper.popupState.target;
+ if (target.localName == "browser") {
+ let x = ContextHelper.popupState.x;
+ let y = ContextHelper.popupState.y;
+ let json = {x: x, y: y, command: "select-all" };
+ messageManager.sendAsyncMessage("Browser:ContextCommand", json);
+ } else {
+ target.editor.selectAll();
+ target.focus();
+ }
+ },
+
+ openInNewTab: function cc_openInNewTab() {
+ Browser.addTab(ContextHelper.popupState.linkURL, false, Browser.selectedTab);
+ },
+
+ saveLink: function cc_saveLink() {
+ let browser = ContextHelper.popupState.target;
+ ContentAreaUtils.saveURL(ContextHelper.popupState.linkURL, null, "SaveLinkTitle", false, true, browser.documentURI);
+ },
+
+ saveImage: function cc_saveImage() {
+ let popupState = ContextHelper.popupState;
+ let browser = popupState.target;
+
+ // Bug 638523
+ // Using directly SaveImageURL fails here since checking the cache for a
+ // remote page seems to not work (could it be nsICacheSession prohibition)?
+ ContentAreaUtils.internalSave(popupState.mediaURL, null, null,
+ popupState.contentDisposition,
+ popupState.contentType, false, "SaveImageTitle",
+ null, browser.documentURI, true, null);
+ },
+
+ shareLink: function cc_shareLink() {
+ let state = ContextHelper.popupState;
+ SharingUI.show(state.linkURL, state.linkTitle);
+ },
+
+ shareMedia: function cc_shareMedia() {
+ SharingUI.show(ContextHelper.popupState.mediaURL, null);
+ },
+
+ bookmarkLink: function cc_bookmarkLink() {
+ let state = ContextHelper.popupState;
+ let bookmarks = PlacesUtils.bookmarks;
+ try {
+ bookmarks.insertBookmark(BookmarkList.panel.mobileRoot,
+ Util.makeURI(state.linkURL),
+ bookmarks.DEFAULT_INDEX,
+ state.linkTitle || state.linkURL);
+ } catch (e) {
+ return;
+ }
+
+ let message = Strings.browser.GetStringFromName("alertLinkBookmarked");
+ let toaster = Cc["@mozilla.org/toaster-alerts-service;1"].getService(Ci.nsIAlertsService);
+ toaster.showAlertNotification(null, message, "", false, "", null);
+ },
+
+ sendCommand: function cc_playVideo(aCommand) {
+ let browser = ContextHelper.popupState.target;
+ browser.messageManager.sendAsyncMessage("Browser:ContextCommand", { command: aCommand });
+ },
+
+ editBookmark: function cc_editBookmark() {
+ let target = ContextHelper.popupState.target;
+ target.startEditing();
+ },
+
+ removeBookmark: function cc_removeBookmark() {
+ let target = ContextHelper.popupState.target;
+ target.remove();
+ }
+};
diff --git a/mobile/chrome/content/LoginManagerChild.js b/mobile/chrome/content/LoginManagerChild.js
new file mode 100644
index 000000000000..94797cf19e6a
--- /dev/null
+++ b/mobile/chrome/content/LoginManagerChild.js
@@ -0,0 +1,802 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Justin Dolske (original author)
+ * Ehsan Akhgari
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Components.utils.import("resource://gre/modules/Services.jsm");
+
+var loginManager = {
+
+ /* ---------- private members ---------- */
+
+
+ get _formFillService() {
+ return this._formFillService =
+ Cc["@mozilla.org/satchel/form-fill-controller;1"].
+ getService(Ci.nsIFormFillController);
+ },
+
+ // Private Browsing Service
+ // If the service is not available, null will be returned.
+ __privateBrowsingService : undefined,
+ get _privateBrowsingService() {
+ if (this.__privateBrowsingService == undefined) {
+ if ("@mozilla.org/privatebrowsing;1" in Cc)
+ this.__privateBrowsingService = Cc["@mozilla.org/privatebrowsing;1"].
+ getService(Ci.nsIPrivateBrowsingService);
+ else
+ this.__privateBrowsingService = null;
+ }
+ return this.__privateBrowsingService;
+ },
+
+
+ // Whether we are in private browsing mode
+ get _inPrivateBrowsing() {
+ var pbSvc = this._privateBrowsingService;
+ if (pbSvc)
+ return pbSvc.privateBrowsingEnabled;
+ else
+ return false;
+ },
+
+ _nsLoginInfo : null, // Constructor for nsILoginInfo implementation
+ _debug : false, // mirrors signon.debug
+ _remember : true, // mirrors signon.rememberSignons preference
+
+ init : function () {
+ // Cache references to current |this| in utility objects
+ this._domEventListener._pwmgr = this;
+ this._observer._pwmgr = this;
+
+ // Form submit observer checks forms for new logins and pw changes.
+ Services.obs.addObserver(this._observer, "earlyformsubmit", false);
+
+ // Add event listener to process page when DOM is complete.
+ addEventListener("pageshow", this._domEventListener, false);
+ addEventListener("unload", this._domEventListener, false);
+
+ // Get constructor for nsILoginInfo
+ this._nsLoginInfo = new Components.Constructor(
+ "@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo);
+
+ // Preferences. Add observer so we get notified of changes.
+ Services.prefs.addObserver("signon.", this._observer, false);
+
+ // Get current preference values.
+ this._debug = Services.prefs.getBoolPref("signon.debug");
+ this._remember = Services.prefs.getBoolPref("signon.rememberSignons");
+ },
+
+
+ /*
+ * log
+ *
+ * Internal function for logging debug messages to the Error Console window
+ */
+ log : function (message) {
+ if (!this._debug)
+ return;
+ dump("PasswordUtils: " + message + "\n");
+ Services.console.logStringMessage("PasswordUtils: " + message);
+ },
+
+
+ /* fillForm
+ *
+ * Fill the form with login information if we can find it.
+ */
+ fillForm: function (form) {
+ this._fillForm(form, true, true, false, null);
+ },
+
+
+ /*
+ * _fillform
+ *
+ * Fill the form with login information if we can find it.
+ * autofillForm denotes if we should fill the form in automatically
+ * ignoreAutocomplete denotes if we should ignore autocomplete=off attributes
+ * foundLogins is an array of nsILoginInfo
+ */
+ _fillForm : function (form, autofillForm, ignoreAutocomplete,
+ clobberPassword, foundLogins) {
+ // Heuristically determine what the user/pass fields are
+ // We do this before checking to see if logins are stored,
+ // so that the user isn't prompted for a master password
+ // without need.
+ var [usernameField, passwordField, ignored] =
+ this._getFormFields(form, false);
+
+ // Need a valid password field to do anything.
+ if (passwordField == null)
+ return false;
+
+ // If the fields are disabled or read-only, there's nothing to do.
+ if (passwordField.disabled || passwordField.readOnly ||
+ usernameField && (usernameField.disabled ||
+ usernameField.readOnly)) {
+ this.log("not filling form, login fields disabled");
+ return false;
+ }
+
+ // Discard logins which have username/password values that don't
+ // fit into the fields (as specified by the maxlength attribute).
+ // The user couldn't enter these values anyway, and it helps
+ // with sites that have an extra PIN to be entered (bug 391514)
+ var maxUsernameLen = Number.MAX_VALUE;
+ var maxPasswordLen = Number.MAX_VALUE;
+
+ // If attribute wasn't set, default is -1.
+ if (usernameField && usernameField.maxLength >= 0)
+ maxUsernameLen = usernameField.maxLength;
+ if (passwordField.maxLength >= 0)
+ maxPasswordLen = passwordField.maxLength;
+
+ var logins = foundLogins.filter(function (l) {
+ var fit = (l.username.length <= maxUsernameLen &&
+ l.password.length <= maxPasswordLen);
+ if (!fit)
+ this.log("Ignored " + l.username + " login: won't fit");
+
+ return fit;
+ }, this);
+
+
+ // Nothing to do if we have no matching logins available.
+ if (logins.length == 0)
+ return false;
+
+
+ // The reason we didn't end up filling the form, if any. We include
+ // this in the formInfo object we send with the passwordmgr-found-logins
+ // notification. See the _notifyFoundLogins docs for possible values.
+ var didntFillReason = null;
+
+ // Attach autocomplete stuff to the username field, if we have
+ // one. This is normally used to select from multiple accounts,
+ // but even with one account we should refill if the user edits.
+ if (usernameField)
+ this._attachToInput(usernameField);
+
+ // Don't clobber an existing password.
+ if (passwordField.value && !clobberPassword) {
+ didntFillReason = "existingPassword";
+ this._notifyFoundLogins(didntFillReason, usernameField,
+ passwordField, foundLogins, null);
+ return false;
+ }
+
+ // If the form has an autocomplete=off attribute in play, don't
+ // fill in the login automatically. We check this after attaching
+ // the autocomplete stuff to the username field, so the user can
+ // still manually select a login to be filled in.
+ var isFormDisabled = false;
+ if (!ignoreAutocomplete &&
+ (this._isAutocompleteDisabled(form) ||
+ this._isAutocompleteDisabled(usernameField) ||
+ this._isAutocompleteDisabled(passwordField))) {
+
+ isFormDisabled = true;
+ this.log("form not filled, has autocomplete=off");
+ }
+
+ // Variable such that we reduce code duplication and can be sure we
+ // should be firing notifications if and only if we can fill the form.
+ var selectedLogin = null;
+
+ if (usernameField && usernameField.value) {
+ // If username was specified in the form, only fill in the
+ // password if we find a matching login.
+ var username = usernameField.value.toLowerCase();
+
+ let matchingLogins = logins.filter(function(l)
+ l.username.toLowerCase() == username);
+ if (matchingLogins.length) {
+ selectedLogin = matchingLogins[0];
+ } else {
+ didntFillReason = "existingUsername";
+ this.log("Password not filled. None of the stored " +
+ "logins match the username already present.");
+ }
+ } else if (logins.length == 1) {
+ selectedLogin = logins[0];
+ } else {
+ // We have multiple logins. Handle a special case here, for sites
+ // which have a normal user+pass login *and* a password-only login
+ // (eg, a PIN). Prefer the login that matches the type of the form
+ // (user+pass or pass-only) when there's exactly one that matches.
+ let matchingLogins;
+ if (usernameField)
+ matchingLogins = logins.filter(function(l) l.username);
+ else
+ matchingLogins = logins.filter(function(l) !l.username);
+ if (matchingLogins.length == 1) {
+ selectedLogin = matchingLogins[0];
+ } else {
+ didntFillReason = "multipleLogins";
+ this.log("Multiple logins for form, so not filling any.");
+ }
+ }
+
+ var didFillForm = false;
+ if (selectedLogin && autofillForm && !isFormDisabled) {
+ // Fill the form
+ if (usernameField)
+ usernameField.value = selectedLogin.username;
+ passwordField.value = selectedLogin.password;
+ didFillForm = true;
+ } else if (selectedLogin && !autofillForm) {
+ // For when autofillForm is false, but we still have the information
+ // to fill a form, we notify observers.
+ didntFillReason = "noAutofillForms";
+ Services.obs.notifyObservers(form, "passwordmgr-found-form", didntFillReason);
+ this.log("autofillForms=false but form can be filled; notified observers");
+ } else if (selectedLogin && isFormDisabled) {
+ // For when autocomplete is off, but we still have the information
+ // to fill a form, we notify observers.
+ didntFillReason = "autocompleteOff";
+ Services.obs.notifyObservers(form, "passwordmgr-found-form", didntFillReason);
+ this.log("autocomplete=off but form can be filled; notified observers");
+ }
+
+ this._notifyFoundLogins(didntFillReason, usernameField, passwordField,
+ foundLogins, selectedLogin);
+
+ return didFillForm;
+ },
+
+
+ /*
+ * _getPasswordOrigin
+ *
+ * Get the parts of the URL we want for identification.
+ */
+ _getPasswordOrigin : function (uriString, allowJS) {
+ var realm = "";
+ try {
+ var uri = Services.io.newURI(uriString, null, null);
+
+ if (allowJS && uri.scheme == "javascript")
+ return "javascript:"
+
+ realm = uri.scheme + "://" + uri.host;
+
+ // If the URI explicitly specified a port, only include it when
+ // it's not the default. (We never want "http://foo.com:80")
+ var port = uri.port;
+ if (port != -1) {
+ var handler = Services.io.getProtocolHandler(uri.scheme);
+ if (port != handler.defaultPort)
+ realm += ":" + port;
+ }
+
+ } catch (e) {
+ // bug 159484 - disallow url types that don't support a hostPort.
+ // (although we handle "javascript:..." as a special case above.)
+ this.log("Couldn't parse origin for " + uriString);
+ realm = null;
+ }
+
+ return realm;
+ },
+
+
+ _getActionOrigin : function (form) {
+ var uriString = form.action;
+
+ // A blank or mission action submits to where it came from.
+ if (uriString == "")
+ uriString = form.baseURI; // ala bug 297761
+
+ return this._getPasswordOrigin(uriString, true);
+ },
+
+
+ /*
+ * _isAutoCompleteDisabled
+ *
+ * Returns true if the page requests autocomplete be disabled for the
+ * specified form input.
+ */
+ _isAutocompleteDisabled : function (element) {
+ if (element && element.hasAttribute("autocomplete") &&
+ element.getAttribute("autocomplete").toLowerCase() == "off")
+ return true;
+
+ return false;
+ },
+
+
+ /*
+ * _getFormFields
+ *
+ * Returns the username and password fields found in the form.
+ * Can handle complex forms by trying to figure out what the
+ * relevant fields are.
+ *
+ * Returns: [usernameField, newPasswordField, oldPasswordField]
+ *
+ * usernameField may be null.
+ * newPasswordField will always be non-null.
+ * oldPasswordField may be null. If null, newPasswordField is just
+ * "theLoginField". If not null, the form is apparently a
+ * change-password field, with oldPasswordField containing the password
+ * that is being changed.
+ */
+ _getFormFields : function (form, isSubmission) {
+ var usernameField = null;
+
+ // Locate the password field(s) in the form. Up to 3 supported.
+ // If there's no password field, there's nothing for us to do.
+ var pwFields = this._getPasswordFields(form, isSubmission);
+ if (!pwFields)
+ return [null, null, null];
+
+
+ // Locate the username field in the form by searching backwards
+ // from the first passwordfield, assume the first text field is the
+ // username. We might not find a username field if the user is
+ // already logged in to the site.
+ for (var i = pwFields[0].index - 1; i >= 0; i--) {
+ if (form.elements[i].type == "text") {
+ usernameField = form.elements[i];
+ break;
+ }
+ }
+
+ if (!usernameField)
+ this.log("(form -- no username field found)");
+
+
+ // If we're not submitting a form (it's a page load), there are no
+ // password field values for us to use for identifying fields. So,
+ // just assume the first password field is the one to be filled in.
+ if (!isSubmission || pwFields.length == 1)
+ return [usernameField, pwFields[0].element, null];
+
+
+ // Try to figure out WTF is in the form based on the password values.
+ var oldPasswordField, newPasswordField;
+ var pw1 = pwFields[0].element.value;
+ var pw2 = pwFields[1].element.value;
+ var pw3 = (pwFields[2] ? pwFields[2].element.value : null);
+
+ if (pwFields.length == 3) {
+ // Look for two identical passwords, that's the new password
+
+ if (pw1 == pw2 && pw2 == pw3) {
+ // All 3 passwords the same? Weird! Treat as if 1 pw field.
+ newPasswordField = pwFields[0].element;
+ oldPasswordField = null;
+ } else if (pw1 == pw2) {
+ newPasswordField = pwFields[0].element;
+ oldPasswordField = pwFields[2].element;
+ } else if (pw2 == pw3) {
+ oldPasswordField = pwFields[0].element;
+ newPasswordField = pwFields[2].element;
+ } else if (pw1 == pw3) {
+ // A bit odd, but could make sense with the right page layout.
+ newPasswordField = pwFields[0].element;
+ oldPasswordField = pwFields[1].element;
+ } else {
+ // We can't tell which of the 3 passwords should be saved.
+ this.log("(form ignored -- all 3 pw fields differ)");
+ return [null, null, null];
+ }
+ } else { // pwFields.length == 2
+ if (pw1 == pw2) {
+ // Treat as if 1 pw field
+ newPasswordField = pwFields[0].element;
+ oldPasswordField = null;
+ } else {
+ // Just assume that the 2nd password is the new password
+ oldPasswordField = pwFields[0].element;
+ newPasswordField = pwFields[1].element;
+ }
+ }
+
+ return [usernameField, newPasswordField, oldPasswordField];
+ },
+
+
+ /* ---------- Private methods ---------- */
+
+
+ /*
+ * _getPasswordFields
+ *
+ * Returns an array of password field elements for the specified form.
+ * If no pw fields are found, or if more than 3 are found, then null
+ * is returned.
+ *
+ * skipEmptyFields can be set to ignore password fields with no value.
+ */
+ _getPasswordFields : function (form, skipEmptyFields) {
+ // Locate the password fields in the form.
+ var pwFields = [];
+ for (var i = 0; i < form.elements.length; i++) {
+ var element = form.elements[i];
+ if (!(element instanceof Ci.nsIDOMHTMLInputElement) ||
+ element.type != "password")
+ continue;
+
+ if (skipEmptyFields && !element.value)
+ continue;
+
+ pwFields[pwFields.length] = {
+ index : i,
+ element : element
+ };
+ }
+
+ // If too few or too many fields, bail out.
+ if (pwFields.length == 0) {
+ this.log("(form ignored -- no password fields.)");
+ return null;
+ } else if (pwFields.length > 3) {
+ this.log("(form ignored -- too many password fields. [got " +
+ pwFields.length + "])");
+ return null;
+ }
+
+ return pwFields;
+ },
+
+
+ /**
+ * Notify observers about an attempt to fill a form that resulted in some
+ * saved logins being found for the form.
+ *
+ * This does not get called if the login manager attempts to fill a form
+ * but does not find any saved logins. It does, however, get called when
+ * the login manager does find saved logins whether or not it actually
+ * fills the form with one of them.
+ *
+ * @param didntFillReason {String}
+ * the reason the login manager didn't fill the form, if any;
+ * if the value of this parameter is null, then the form was filled;
+ * otherwise, this parameter will be one of these values:
+ * existingUsername: the username field already contains a username
+ * that doesn't match any stored usernames
+ * existingPassword: the password field already contains a password
+ * autocompleteOff: autocomplete has been disabled for the form
+ * or its username or password fields
+ * multipleLogins: we have multiple logins for the form
+ * noAutofillForms: the autofillForms pref is set to false
+ *
+ * @param usernameField {HTMLInputElement}
+ * the username field detected by the login manager, if any;
+ * otherwise null
+ *
+ * @param passwordField {HTMLInputElement}
+ * the password field detected by the login manager
+ *
+ * @param foundLogins {Array}
+ * an array of nsILoginInfos that can be used to fill the form
+ *
+ * @param selectedLogin {nsILoginInfo}
+ * the nsILoginInfo that was/would be used to fill the form, if any;
+ * otherwise null; whether or not it was actually used depends on
+ * the value of the didntFillReason parameter
+ */
+ _notifyFoundLogins : function (didntFillReason, usernameField,
+ passwordField, foundLogins, selectedLogin) {
+ // We need .setProperty(), which is a method on the original
+ // nsIWritablePropertyBag. Strangley enough, nsIWritablePropertyBag2
+ // doesn't inherit from that, so the additional QI is needed.
+ let formInfo = Cc["@mozilla.org/hash-property-bag;1"].
+ createInstance(Ci.nsIWritablePropertyBag2).
+ QueryInterface(Ci.nsIWritablePropertyBag);
+
+ formInfo.setPropertyAsACString("didntFillReason", didntFillReason);
+ formInfo.setPropertyAsInterface("usernameField", usernameField);
+ formInfo.setPropertyAsInterface("passwordField", passwordField);
+ formInfo.setProperty("foundLogins", foundLogins.concat());
+ formInfo.setPropertyAsInterface("selectedLogin", selectedLogin);
+
+ Services.obs.notifyObservers(formInfo, "passwordmgr-found-logins", null);
+ },
+
+ /*
+ * _attachToInput
+ *
+ * Hooks up autocomplete support to a username field, to allow
+ * a user editing the field to select an existing login and have
+ * the password field filled in.
+ */
+ _attachToInput : function (element) {
+ this.log("attaching autocomplete stuff");
+ element.addEventListener("blur",
+ this._domEventListener, false);
+ element.addEventListener("DOMAutoComplete",
+ this._domEventListener, false);
+ this._formFillService.markAsLoginManagerField(element);
+ },
+
+ /*
+ * _fillDocument
+ *
+ * Called when a page has loaded. For each form in the document,
+ * we ask the parent process to see if it can be filled with a stored login
+ * and fill them in with the results
+ */
+ _fillDocument : function (doc) {
+ var forms = doc.forms;
+ if (!forms || forms.length == 0)
+ return;
+
+ this.log("_fillDocument processing " + forms.length +
+ " forms on " + doc.documentURI);
+
+ var autofillForm = !this._inPrivateBrowsing &&
+ Services.prefs.getBoolPref("signon.autofillForms");
+
+ // actionOrigins is a list of each form's action origins for this
+ // document. The parent process needs this to find the passwords
+ // for each action origin.
+ var actionOrigins = [];
+
+ for (var i = 0; i < forms.length; i++) {
+ var form = forms[i];
+ let [, passwordField, ] = this._getFormFields(form, false);
+ if (passwordField) {
+ var actionOrigin = this._getActionOrigin(form);
+ actionOrigins.push(actionOrigin);
+ }
+ } // foreach form
+
+ if (!actionOrigins.length)
+ return;
+
+ var formOrigin = this._getPasswordOrigin(doc.documentURI);
+ var foundLogins = this._getPasswords(actionOrigins, formOrigin);
+
+ for (var i = 0; i < forms.length; i++) {
+ var form = forms[i];
+ var actionOrigin = this._getActionOrigin(form);
+ if (foundLogins[actionOrigin]) {
+ this.log("_fillDocument processing form[" + i + "]");
+ this._fillForm(form, autofillForm, false, false,
+ foundLogins[actionOrigin]);
+ }
+ } // foreach form
+ },
+
+ /*
+ * _getPasswords
+ *
+ * Retrieve passwords from parent process and prepare logins to be passed to
+ * _fillForm. Returns map from action origins to passwords.
+ */
+ _getPasswords: function(actionOrigins, formOrigin) {
+ // foundLogins will be a map from action origins to passwords.
+ var message = sendSyncMessage("PasswordMgr:GetPasswords", {
+ actionOrigins: actionOrigins,
+ formOrigin: formOrigin
+ })[0];
+
+ // XXX need to somehow respond to the UI being busy
+ // not needed for Fennec yet
+
+ var foundLogins = message.foundLogins;
+
+ // Each password will be a JSON-unserialized object, but they need to be
+ // nsILoginInfo's.
+ for (var key in foundLogins) {
+ var logins = foundLogins[key];
+ for (var i = 0; i < logins.length; i++) {
+ var obj = logins[i];
+ logins[i] = new this._nsLoginInfo();
+ logins[i].init(obj.hostname, obj.formSubmitURL, obj.httpRealm,
+ obj.username, obj.password,
+ obj.usernameField, obj.passwordField);
+ }
+ }
+
+ return foundLogins;
+ },
+
+ /*
+ * _onFormSubmit
+ *
+ * Called by the our observer when notified of a form submission.
+ * [Note that this happens before any DOM onsubmit handlers are invoked.]
+ * Looks for a password change in the submitted form, so we can update
+ * our stored password.
+ */
+ _onFormSubmit : function (form) {
+ if (this._inPrivateBrowsing) {
+ // We won't do anything in private browsing mode anyway,
+ // so there's no need to perform further checks.
+ this.log("(form submission ignored in private browsing mode)");
+ return;
+ }
+
+ var doc = form.ownerDocument;
+
+ // If password saving is disabled (globally or for host), bail out now.
+ if (!this._remember)
+ return;
+
+ var hostname = this._getPasswordOrigin(doc.documentURI);
+ var formSubmitURL = this._getActionOrigin(form);
+
+
+ // Get the appropriate fields from the form.
+ var [usernameField, newPasswordField, oldPasswordField] =
+ this._getFormFields(form, true);
+
+ // Need at least 1 valid password field to do anything.
+ if (newPasswordField == null)
+ return;
+
+ // Check for autocomplete=off attribute. We don't use it to prevent
+ // autofilling (for existing logins), but won't save logins when it's
+ // present.
+ // XXX spin out a bug that we don't update timeLastUsed in this case?
+ if (this._isAutocompleteDisabled(form) ||
+ this._isAutocompleteDisabled(usernameField) ||
+ this._isAutocompleteDisabled(newPasswordField) ||
+ this._isAutocompleteDisabled(oldPasswordField)) {
+ this.log("(form submission ignored -- autocomplete=off found)");
+ return;
+ }
+
+ sendSyncMessage("PasswordMgr:FormSubmitted", {
+ hostname: hostname,
+ formSubmitURL: formSubmitURL,
+ usernameField: usernameField ? usernameField.name : "",
+ usernameValue: usernameField ? usernameField.value : "",
+ passwordField: newPasswordField.name,
+ passwordValue: newPasswordField.value,
+ hasOldPasswordField: !!oldPasswordField
+ });
+ },
+
+ /* ---------- Utility objects ---------- */
+
+ /*
+ * _observer object
+ *
+ * Internal utility object, implements the nsIObserver interface.
+ * Used to receive notification for: form submission, preference changes.
+ */
+ _observer : {
+ _pwmgr : null,
+
+ QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
+ Ci.nsIFormSubmitObserver,
+ Ci.nsISupportsWeakReference]),
+
+
+ // nsFormSubmitObserver
+ notify : function (formElement, aWindow, actionURI) {
+ // Counterintuitively, form submit observers fire for content that
+ // may not be the content in this context.
+ if (aWindow.top != content)
+ return true;
+
+ this._pwmgr.log("observer notified for form submission.");
+
+ // We're invoked before the content's |onsubmit| handlers, so we
+ // can grab form data before it might be modified (see bug 257781).
+
+ try {
+ this._pwmgr._onFormSubmit(formElement);
+ } catch (e) {
+ this._pwmgr.log("Caught error in onFormSubmit: " + e);
+ }
+
+ return true; // Always return true, or form submit will be canceled.
+ },
+
+ observe : function (aSubject, aTopic, aData) {
+ this._pwmgr._debug = Services.prefs.getBoolPref("signon.debug");
+ this._pwmgr._remember = Services.prefs.getBoolPref("signon.rememberSignons");
+ }
+ },
+
+
+ /*
+ * _domEventListener object
+ *
+ * Internal utility object, implements nsIDOMEventListener
+ * Used to catch certain DOM events needed to properly implement form fill.
+ */
+ _domEventListener : {
+ _pwmgr : null,
+
+ QueryInterface : XPCOMUtils.generateQI([Ci.nsIDOMEventListener,
+ Ci.nsISupportsWeakReference]),
+
+
+ handleEvent : function (event) {
+ if (!event.isTrusted)
+ return;
+
+ this._pwmgr.log("domEventListener: got event " + event.type);
+
+ switch (event.type) {
+ case "DOMAutoComplete":
+ case "blur":
+ var acInputField = event.target;
+ var acForm = acInputField.form;
+
+ // If the username is blank, bail out now -- we don't want
+ // _fillForm() to try filling in a login without a username
+ // to filter on (bug 471906).
+ if (!acInputField.value)
+ return;
+
+ // Make sure the username field _fillForm will use is the
+ // same field as the autocomplete was activated on. If
+ // not, the DOM has been altered and we'll just give up.
+ var [usernameField, passwordField, ignored] =
+ this._pwmgr._getFormFields(acForm, false);
+ if (usernameField == acInputField && passwordField) {
+ var actionOrigin = this._pwmgr._getActionOrigin(acForm);
+ var formOrigin = this._pwmgr._getPasswordOrigin(acForm.ownerDocument.documentURI);
+ var foundLogins = this._pwmgr._getPasswords([actionOrigin], formOrigin);
+ this._pwmgr._fillForm(acForm, true, true, true, foundLogins[actionOrigin]);
+ } else {
+ this._pwmgr.log("Oops, form changed before AC invoked");
+ }
+ return;
+
+ case "pageshow":
+ // Only process when we need to
+ if (this._pwmgr._remember && event.target instanceof Ci.nsIDOMHTMLDocument)
+ this._pwmgr._fillDocument(event.target);
+ break;
+
+ case "unload":
+ Services.prefs.removeObserver("signon.", this._pwmgr._observer);
+ Services.obs.removeObserver(this._pwmgr._observer, "earlyformsubmit");
+ break;
+
+ default:
+ this._pwmgr.log("Oops! This event unexpected.");
+ return;
+ }
+ }
+ }
+};
+
+loginManager.init();
diff --git a/mobile/chrome/content/MenuListHelperUI.js b/mobile/chrome/content/MenuListHelperUI.js
new file mode 100644
index 000000000000..b8d033bde92b
--- /dev/null
+++ b/mobile/chrome/content/MenuListHelperUI.js
@@ -0,0 +1,95 @@
+var MenuListHelperUI = {
+ get _container() {
+ delete this._container;
+ return this._container = document.getElementById("menulist-container");
+ },
+
+ get _popup() {
+ delete this._popup;
+ return this._popup = document.getElementById("menulist-popup");
+ },
+
+ get _title() {
+ delete this._title;
+ return this._title = document.getElementById("menulist-title");
+ },
+
+ _firePopupEvent: function firePopupEvent(aEventName) {
+ let menupopup = this._currentList.menupopup;
+ if (menupopup.hasAttribute(aEventName)) {
+ let func = new Function("event", menupopup.getAttribute(aEventName));
+ func.call(this);
+ }
+ },
+
+ _currentList: null,
+ show: function mn_show(aMenulist) {
+ this._currentList = aMenulist;
+ this._container.setAttribute("for", aMenulist.id);
+ this._title.value = aMenulist.title || "";
+ this._firePopupEvent("onpopupshowing");
+
+ let container = this._container;
+ let listbox = this._popup.lastChild;
+ while (listbox.firstChild)
+ listbox.removeChild(listbox.firstChild);
+
+ let children = this._currentList.menupopup.children;
+ for (let i = 0; i < children.length; i++) {
+ let child = children[i];
+ let item = document.createElement("richlistitem");
+ if (child.disabled)
+ item.setAttribute("disabled", "true");
+ if (child.hidden)
+ item.setAttribute("hidden", "true");
+
+ // Add selected as a class name instead of an attribute to not being overidden
+ // by the richlistbox behavior (it sets the "current" and "selected" attribute
+ item.setAttribute("class", "option-command prompt-button" + (child.selected ? " selected" : ""));
+
+ let image = document.createElement("image");
+ image.setAttribute("src", child.image || "");
+ item.appendChild(image);
+
+ let label = document.createElement("label");
+ label.setAttribute("value", child.label);
+ item.appendChild(label);
+
+ listbox.appendChild(item);
+ }
+
+ window.addEventListener("resize", this, true);
+ container.hidden = false;
+ this.sizeToContent();
+ BrowserUI.pushPopup(this, [this._popup]);
+ },
+
+ hide: function mn_hide() {
+ this._currentList = null;
+ this._container.removeAttribute("for");
+ this._container.hidden = true;
+ window.removeEventListener("resize", this, true);
+ BrowserUI.popPopup(this);
+ },
+
+ selectByIndex: function mn_selectByIndex(aIndex) {
+ this._currentList.selectedIndex = aIndex;
+
+ // Dispatch a xul command event to the attached menulist
+ if (this._currentList.dispatchEvent) {
+ let evt = document.createEvent("XULCommandEvent");
+ evt.initCommandEvent("command", true, true, window, 0, false, false, false, false, null);
+ this._currentList.dispatchEvent(evt);
+ }
+
+ this.hide();
+ },
+
+ sizeToContent: function sizeToContent() {
+ this._popup.maxWidth = window.innerWidth * 0.75;
+ },
+
+ handleEvent: function handleEvent(aEvent) {
+ this.sizeToContent();
+ }
+};
diff --git a/mobile/chrome/content/OfflineApps.js b/mobile/chrome/content/OfflineApps.js
new file mode 100644
index 000000000000..39fc5a90ae99
--- /dev/null
+++ b/mobile/chrome/content/OfflineApps.js
@@ -0,0 +1,81 @@
+/*
+ * Provide supports for Offline Applications
+ */
+var OfflineApps = {
+ offlineAppRequested: function(aRequest, aTarget) {
+ if (!Services.prefs.getBoolPref("browser.offline-apps.notify"))
+ return;
+
+ let currentURI = Services.io.newURI(aRequest.location, aRequest.charset, null);
+
+ // don't bother showing UI if the user has already made a decision
+ if (Services.perms.testExactPermission(currentURI, "offline-app") != Ci.nsIPermissionManager.UNKNOWN_ACTION)
+ return;
+
+ try {
+ if (Services.prefs.getBoolPref("offline-apps.allow_by_default")) {
+ // all pages can use offline capabilities, no need to ask the user
+ return;
+ }
+ } catch(e) {
+ // this pref isn't set by default, ignore failures
+ }
+
+ let host = currentURI.asciiHost;
+ let notificationID = "offline-app-requested-" + host;
+ let notificationBox = Browser.getNotificationBox();
+
+ let notification = notificationBox.getNotificationWithValue(notificationID);
+ let strings = Strings.browser;
+ if (notification) {
+ notification.documents.push(aRequest);
+ } else {
+ let buttons = [{
+ label: strings.GetStringFromName("offlineApps.allow"),
+ accessKey: null,
+ callback: function() {
+ for (let i = 0; i < notification.documents.length; i++)
+ OfflineApps.allowSite(notification.documents[i], aTarget);
+ }
+ },{
+ label: strings.GetStringFromName("offlineApps.never"),
+ accessKey: null,
+ callback: function() {
+ for (let i = 0; i < notification.documents.length; i++)
+ OfflineApps.disallowSite(notification.documents[i]);
+ }
+ },{
+ label: strings.GetStringFromName("offlineApps.notNow"),
+ accessKey: null,
+ callback: function() { /* noop */ }
+ }];
+
+ const priority = notificationBox.PRIORITY_INFO_LOW;
+ let message = strings.formatStringFromName("offlineApps.available", [host], 1);
+ notification = notificationBox.appendNotification(message, notificationID, "", priority, buttons);
+ notification.documents = [aRequest];
+ }
+ },
+
+ allowSite: function(aRequest, aTarget) {
+ let currentURI = Services.io.newURI(aRequest.location, aRequest.charset, null);
+ Services.perms.add(currentURI, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);
+
+ // When a site is enabled while loading, manifest resources will start
+ // fetching immediately. This one time we need to do it ourselves.
+ // The update must be started on the content process.
+ aTarget.messageManager.sendAsyncMessage("Browser:MozApplicationCache:Fetch", aRequest);
+ },
+
+ disallowSite: function(aRequest) {
+ let currentURI = Services.io.newURI(aRequest.location, aRequest.charset, null);
+ Services.perms.add(currentURI, "offline-app", Ci.nsIPermissionManager.DENY_ACTION);
+ },
+
+ receiveMessage: function receiveMessage(aMessage) {
+ if (aMessage.name == "Browser:MozApplicationManifest") {
+ this.offlineAppRequested(aMessage.json, aMessage.target);
+ }
+ }
+};
+
diff --git a/mobile/chrome/content/SelectHelperUI.js b/mobile/chrome/content/SelectHelperUI.js
new file mode 100644
index 000000000000..063800fe9594
--- /dev/null
+++ b/mobile/chrome/content/SelectHelperUI.js
@@ -0,0 +1,264 @@
+/**
+ * SelectHelperUI: Provides an interface for making a choice in a list.
+ * Supports simultaneous selection of choices and group headers.
+ */
+var SelectHelperUI = {
+ _selectedIndexes: null,
+ _list: null,
+
+ get _container() {
+ delete this._container;
+ return this._container = document.getElementById("select-container");
+ },
+
+ get _listbox() {
+ delete this._listbox;
+ return this._listbox = document.getElementById("select-commands");
+ },
+
+ get _title() {
+ delete this._title;
+ return this._title = document.getElementById("select-title");
+ },
+
+ show: function selectHelperShow(aList, aTitle) {
+ if (this._list)
+ this.reset();
+
+ this._list = aList;
+
+ // The element label is used as a title to give more context
+ this._title.value = aTitle || "";
+ this._container.setAttribute("multiple", aList.multiple ? "true" : "false");
+
+ // Save already selected indexes to detect what has changed when a a new
+ // element is selected
+ this._selectedIndexes = this._getSelectedIndexes();
+ let firstSelected = null;
+
+ // Using a fragment prevent us to hang on huge list
+ let fragment = document.createDocumentFragment();
+ let choices = aList.choices;
+ for (let i = 0; i < choices.length; i++) {
+ let choice = choices[i];
+ let item = document.createElement("listitem");
+
+ item.setAttribute("class", "option-command listitem-iconic prompt-button");
+ item.setAttribute("image", "");
+ item.setAttribute("flex", "1");
+ item.setAttribute("crop", "center");
+ item.setAttribute("label", choice.text);
+
+ choice.selected ? item.classList.add("selected")
+ : item.classList.remove("selected");
+
+ choice.disabled ? item.setAttribute("disabled", "true")
+ : item.removeAttribute("disabled");
+ fragment.appendChild(item);
+
+ if (choice.group) {
+ item.classList.add("optgroup");
+ continue;
+ }
+
+ item.optionIndex = choice.optionIndex;
+ item.choiceIndex = i;
+
+ if (choice.inGroup)
+ item.classList.add("in-optgroup");
+
+ if (choice.selected) {
+ item.classList.add("selected");
+ firstSelected = firstSelected || item;
+ }
+ }
+ this._listbox.appendChild(fragment);
+ this._container.hidden = false;
+
+ BrowserUI.pushPopup(this, this._container);
+ this._scrollElementIntoView(firstSelected);
+ this._container.addEventListener("click", this, false);
+ window.addEventListener("resize", this, true);
+ this.sizeToContent();
+
+ let evt = document.createEvent("UIEvents");
+ evt.initUIEvent("SelectUI", true, false, window, true);
+ window.dispatchEvent(evt);
+ },
+
+ reset: function selectHelperReset() {
+ this._updateControl();
+ while (this._listbox.hasChildNodes())
+ this._listbox.removeChild(this._listbox.lastChild);
+ this._list = null;
+ this._title.value = "";
+ this._selectedIndexes = null;
+ BrowserUI.popPopup(this);
+ },
+
+ sizeToContent: function selectHelperSizeToContent() {
+ this._container.firstChild.maxHeight = window.innerHeight * 0.75;
+ },
+
+ hide: function selectHelperHide() {
+ if (!this._list)
+ return;
+
+ window.removeEventListener("resize", this, true);
+ this._container.removeEventListener("click", this, false);
+ this._container.hidden = true;
+ this.reset();
+
+ let evt = document.createEvent("UIEvents");
+ evt.initUIEvent("SelectUI", true, false, window, true);
+ window.dispatchEvent(evt);
+ },
+
+ unselectAll: function selectHelperUnselectAll() {
+ if (!this._list)
+ return;
+
+ let choices = this._list.choices;
+ this._forEachOption(function(aItem, aIndex) {
+ aItem.selected = false;
+ choices[aIndex].selected = false;
+ });
+ },
+
+ selectByIndex: function selectHelperSelectByIndex(aIndex) {
+ if (!this._list)
+ return;
+
+ let choices = this._list.choices;
+ let children = this._listbox.childNodes;
+ for (let i = 0; i < children.length; i++) {
+ let option = children[i];
+ if (option.optionIndex == aIndex) {
+ let choice = choices[i];
+ if (this._list.multiple) {
+ choice.selected = !choice.selected;
+ option.setAttribute("selected", choice.selected);
+ } else {
+ option.setAttribute("selected", "true");
+ choice.selected = true;
+ this._scrollElementIntoView(option);
+ }
+ break;
+ }
+ }
+ },
+
+ _getSelectedIndexes: function _selectHelperGetSelectedIndexes() {
+ let indexes = [];
+ if (!this._list)
+ return indexes;
+
+ let choices = this._list.choices;
+ let choiceLength = choices.length;
+ for (let i = 0; i < choiceLength; i++) {
+ let choice = choices[i];
+ if (choice.selected)
+ indexes.push(choice.optionIndex);
+ }
+ return indexes;
+ },
+
+ _scrollElementIntoView: function _selectHelperScrollElementIntoView(aElement) {
+ if (!aElement)
+ return;
+
+ let index = -1;
+ this._forEachOption(
+ function(aItem, aIndex) {
+ if (aItem.optionIndex == aElement.optionIndex)
+ index = aIndex;
+ }
+ );
+
+ if (index == -1)
+ return;
+
+ let scrollBoxObject = this._listbox.boxObject.QueryInterface(Ci.nsIScrollBoxObject);
+ let itemHeight = aElement.getBoundingClientRect().height;
+ let visibleItemsCount = this._listbox.boxObject.height / itemHeight;
+ if ((index + 1) > visibleItemsCount) {
+ let delta = Math.ceil(visibleItemsCount / 2);
+ scrollBoxObject.scrollTo(0, ((index + 1) - delta) * itemHeight);
+ } else {
+ scrollBoxObject.scrollTo(0, 0);
+ }
+ },
+
+ _forEachOption: function _selectHelperForEachOption(aCallback) {
+ let children = this._listbox.childNodes;
+ for (let i = 0; i < children.length; i++) {
+ let item = children[i];
+ if (!item.hasOwnProperty("optionIndex"))
+ continue;
+ aCallback(item, i);
+ }
+ },
+
+ _updateControl: function _selectHelperUpdateControl() {
+ let currentSelectedIndexes = this._getSelectedIndexes();
+
+ let isIdentical = (this._selectedIndexes && this._selectedIndexes.length == currentSelectedIndexes.length);
+ if (isIdentical) {
+ for (let i = 0; i < currentSelectedIndexes.length; i++) {
+ if (currentSelectedIndexes[i] != this._selectedIndexes[i]) {
+ isIdentical = false;
+ break;
+ }
+ }
+ }
+
+ if (isIdentical)
+ return;
+
+ Browser.selectedBrowser.messageManager.sendAsyncMessage("FormAssist:ChoiceChange", { });
+ },
+
+ handleEvent: function selectHelperHandleEvent(aEvent) {
+ switch (aEvent.type) {
+ case "click":
+ let item = aEvent.target;
+ if (item && item.hasOwnProperty("optionIndex")) {
+ if (this._list.multiple) {
+ item.classList.toggle("selected");
+ } else {
+ this.unselectAll();
+
+ // Select the new one and update the control
+ item.classList.add("selected");
+ }
+ this.onSelect(item.optionIndex, item.classList.contains("selected"), !this._list.multiple);
+ } else if (item == this._container) {
+ // The click is outside the listbox area, so we need to hide the list
+ // This is used instead of the popup mechanism otherwise the click
+ // will be dispatched while we want to inhibit it (I think)
+ this.hide();
+ }
+ break;
+ case "resize":
+ this.sizeToContent();
+ break;
+ }
+ },
+
+ onSelect: function selectHelperOnSelect(aIndex, aSelected, aClearAll) {
+ let json = {
+ index: aIndex,
+ selected: aSelected,
+ clearAll: aClearAll
+ };
+ Browser.selectedBrowser.messageManager.sendAsyncMessage("FormAssist:ChoiceSelect", json);
+
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-select-element
+ // The list will be closed as soon as the user click if it is not multiple,
+ // while list with multiple choices have a button to close it
+ if (!this._list.multiple) {
+ this._updateControl();
+ this.hide();
+ }
+ }
+};
diff --git a/mobile/chrome/content/SharingUI.js b/mobile/chrome/content/SharingUI.js
new file mode 100644
index 000000000000..3675f910167d
--- /dev/null
+++ b/mobile/chrome/content/SharingUI.js
@@ -0,0 +1,79 @@
+var SharingUI = {
+ _dialog: null,
+
+ show: function show(aURL, aTitle) {
+ try {
+ this.showSharingUI(aURL, aTitle);
+ } catch (ex) {
+ this.showFallback(aURL, aTitle);
+ }
+ },
+
+ showSharingUI: function showSharingUI(aURL, aTitle) {
+ let sharingSvc = Cc["@mozilla.org/uriloader/external-sharing-app-service;1"].getService(Ci.nsIExternalSharingAppService);
+ sharingSvc.shareWithDefault(aURL, "text/plain", aTitle);
+ },
+
+ showFallback: function showFallback(aURL, aTitle) {
+ this._dialog = importDialog(window, "chrome://browser/content/share.xul", null);
+ document.getElementById("share-title").value = aTitle || aURL;
+
+ BrowserUI.pushPopup(this, this._dialog);
+
+ let bbox = document.getElementById("share-buttons-box");
+ this._handlers.forEach(function(handler) {
+ let button = document.createElement("button");
+ button.className = "prompt-button";
+ button.setAttribute("label", handler.name);
+ button.addEventListener("command", function() {
+ SharingUI.hide();
+ handler.callback(aURL || "", aTitle || "");
+ }, false);
+ bbox.appendChild(button);
+ });
+
+ this._dialog.waitForClose();
+ BrowserUI.popPopup(this);
+ },
+
+ hide: function hide() {
+ this._dialog.close();
+ this._dialog = null;
+ },
+
+ _handlers: [
+ {
+ name: "Email",
+ callback: function callback(aURL, aTitle) {
+ let url = "mailto:?subject=" + encodeURIComponent(aTitle) +
+ "&body=" + encodeURIComponent(aURL);
+ let uri = Services.io.newURI(url, null, null);
+ let extProtocolSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"]
+ .getService(Ci.nsIExternalProtocolService);
+ extProtocolSvc.loadUrl(uri);
+ }
+ },
+ {
+ name: "Twitter",
+ callback: function callback(aURL, aTitle) {
+ let url = "http://twitter.com/home?status=" + encodeURIComponent((aTitle ? aTitle+": " : "")+aURL);
+ BrowserUI.newTab(url, Browser.selectedTab);
+ }
+ },
+ {
+ name: "Google Reader",
+ callback: function callback(aURL, aTitle) {
+ let url = "http://www.google.com/reader/link?url=" + encodeURIComponent(aURL) +
+ "&title=" + encodeURIComponent(aTitle);
+ BrowserUI.newTab(url, Browser.selectedTab);
+ }
+ },
+ {
+ name: "Facebook",
+ callback: function callback(aURL, aTitle) {
+ let url = "http://www.facebook.com/share.php?u=" + encodeURIComponent(aURL);
+ BrowserUI.newTab(url, Browser.selectedTab);
+ }
+ }
+ ]
+};
diff --git a/mobile/chrome/content/Util.js b/mobile/chrome/content/Util.js
new file mode 100644
index 000000000000..5d33f2209562
--- /dev/null
+++ b/mobile/chrome/content/Util.js
@@ -0,0 +1,241 @@
+// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
+/*
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Roy Frostig
+ * Ben Combee
+ * Matt Brubeck
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// -----------------------------------------------------------
+// General util/convenience tools
+//
+
+let Util = {
+ /** printf-like dump function */
+ dumpf: function dumpf(str) {
+ let args = arguments;
+ let i = 1;
+ dump(str.replace(/%s/g, function() {
+ if (i >= args.length) {
+ throw "dumps received too many placeholders and not enough arguments";
+ }
+ return args[i++].toString();
+ }));
+ },
+
+ /** Like dump, but each arg is handled and there's an automatic newline */
+ dumpLn: function dumpLn() {
+ for (let i = 0; i < arguments.length; i++)
+ dump(arguments[i] + " ");
+ dump("\n");
+ },
+
+ getWindowUtils: function getWindowUtils(aWindow) {
+ return aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
+ },
+
+ /** Executes aFunc after other events have been processed. */
+ executeSoon: function executeSoon(aFunc) {
+ Services.tm.mainThread.dispatch({
+ run: function() {
+ aFunc();
+ }
+ }, Ci.nsIThread.DISPATCH_NORMAL);
+ },
+
+ getHrefForElement: function getHrefForElement(target) {
+ // XXX: This is kind of a hack to work around a Gecko bug (see bug 266932)
+ // We're going to walk up the DOM looking for a parent link node.
+ // This shouldn't be necessary, but we're matching the existing behaviour for left click
+
+ let link = null;
+ while (target) {
+ if (target instanceof Ci.nsIDOMHTMLAnchorElement ||
+ target instanceof Ci.nsIDOMHTMLAreaElement ||
+ target instanceof Ci.nsIDOMHTMLLinkElement) {
+ if (target.hasAttribute("href"))
+ link = target;
+ }
+ target = target.parentNode;
+ }
+
+ if (link && link.hasAttribute("href"))
+ return link.href;
+ else
+ return null;
+ },
+
+ makeURI: function makeURI(aURL, aOriginCharset, aBaseURI) {
+ return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
+ },
+
+ makeURLAbsolute: function makeURLAbsolute(base, url) {
+ // Note: makeURI() will throw if url is not a valid URI
+ return this.makeURI(url, null, this.makeURI(base)).spec;
+ },
+
+ isLocalScheme: function isLocalScheme(aURL) {
+ return (aURL.indexOf("about:") == 0 && aURL != "about:blank" && aURL != "about:empty") || aURL.indexOf("chrome:") == 0;
+ },
+
+ isOpenableScheme: function isShareableScheme(aProtocol) {
+ let dontOpen = /^(mailto|javascript|news|snews)$/;
+ return (aProtocol && !dontOpen.test(aProtocol));
+ },
+
+ isShareableScheme: function isShareableScheme(aProtocol) {
+ let dontShare = /^(chrome|about|file|javascript|resource)$/;
+ return (aProtocol && !dontShare.test(aProtocol));
+ },
+
+ clamp: function(num, min, max) {
+ return Math.max(min, Math.min(max, num));
+ },
+
+ /** Don't display anything in the urlbar for these special URIs. */
+ isURLEmpty: function isURLEmpty(aURL) {
+ return (!aURL || aURL == "about:blank" || aURL == "about:empty" || aURL == "about:home");
+ },
+
+ /** Recursively find all documents, including root document. */
+ getAllDocuments: function getAllDocuments(doc, resultSoFar) {
+ resultSoFar = resultSoFar || [doc];
+ if (!doc.defaultView)
+ return resultSoFar;
+ let frames = doc.defaultView.frames;
+ if (!frames)
+ return resultSoFar;
+
+ let i;
+ let currentDoc;
+ for (i = 0; i < frames.length; i++) {
+ currentDoc = frames[i].document;
+ resultSoFar.push(currentDoc);
+ this.getAllDocuments(currentDoc, resultSoFar);
+ }
+
+ return resultSoFar;
+ },
+
+ // Put the Mozilla networking code into a state that will kick the auto-connection
+ // process.
+ forceOnline: function forceOnline() {
+ Services.io.offline = false;
+ },
+
+ isParentProcess: function isInParentProcess() {
+ let appInfo = Cc["@mozilla.org/xre/app-info;1"];
+ return (!appInfo || appInfo.getService(Ci.nsIXULRuntime).processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT);
+ },
+
+ isPortrait: function isPortrait() {
+#ifdef MOZ_PLATFORM_MAEMO
+ return (screen.width <= screen.height);
+#elifdef ANDROID
+ return (screen.width <= screen.height);
+#else
+ return (window.innerWidth <= window.innerHeight);
+#endif
+ }
+};
+
+
+/**
+ * Helper class to nsITimer that adds a little more pizazz. Callback can be an
+ * object with a notify method or a function.
+ */
+Util.Timeout = function(aCallback) {
+ this._callback = aCallback;
+ this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
+ this._type = null;
+};
+
+Util.Timeout.prototype = {
+ /** Timer callback. Don't call this manually. */
+ notify: function notify() {
+ if (this._type == this._timer.TYPE_ONE_SHOT)
+ this._type = null;
+
+ if (this._callback.notify)
+ this._callback.notify();
+ else
+ this._callback.apply(null);
+ },
+
+ /** Helper function for once and interval. */
+ _start: function _start(aDelay, aType, aCallback) {
+ if (aCallback)
+ this._callback = aCallback;
+ this.clear();
+ this._timer.initWithCallback(this, aDelay, aType);
+ this._type = aType;
+ return this;
+ },
+
+ /** Do the callback once. Cancels other timeouts on this object. */
+ once: function once(aDelay, aCallback) {
+ return this._start(aDelay, this._timer.TYPE_ONE_SHOT, aCallback);
+ },
+
+ /** Do the callback every aDelay msecs. Cancels other timeouts on this object. */
+ interval: function interval(aDelay, aCallback) {
+ return this._start(aDelay, this._timer.TYPE_REPEATING_SLACK, aCallback);
+ },
+
+ /** Clear any pending timeouts. */
+ clear: function clear() {
+ if (this.isPending()) {
+ this._timer.cancel();
+ this._type = null;
+ }
+ return this;
+ },
+
+ /** If there is a pending timeout, call it and cancel the timeout. */
+ flush: function flush() {
+ if (this.isPending()) {
+ this.notify();
+ this.clear();
+ }
+ return this;
+ },
+
+ /** Return true iff we are waiting for a callback. */
+ isPending: function isPending() {
+ return this._type !== null;
+ }
+};
+
diff --git a/mobile/chrome/content/about.xhtml b/mobile/chrome/content/about.xhtml
new file mode 100644
index 000000000000..63e97d2d8b42
--- /dev/null
+++ b/mobile/chrome/content/about.xhtml
@@ -0,0 +1,237 @@
+
+
+
+%brandDTD;
+
+%aboutDTD;
+
+%globalDTD;
+
+%fennecDTD;
+]>
+
+
+
+
+
+ &aboutPage.title;
+
+
+
+
+
+
+
+
diff --git a/mobile/chrome/content/aboutCertError.css b/mobile/chrome/content/aboutCertError.css
new file mode 100644
index 000000000000..edfcc0eee8c6
--- /dev/null
+++ b/mobile/chrome/content/aboutCertError.css
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * William Price
+ * Steven Garrity
+ * Henrik Skupin
+ * Johnathan Nightingale
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* Logical CSS rules belong here, but presentation & theming rules
+ should live in the CSS of the appropriate theme */
+
+#technicalContentText {
+ overflow: auto;
+ white-space: pre-wrap;
+}
+
+#technicalContent > h2, #expertContent > h2 {
+ cursor: pointer;
+ padding-left: 20px;
+ position: relative;
+ left: -20px;
+}
+
+div[collapsed] > p,
+div[collapsed] > div {
+ display: none;
+}
diff --git a/mobile/chrome/content/aboutCertError.xhtml b/mobile/chrome/content/aboutCertError.xhtml
new file mode 100644
index 000000000000..3d9a4b064e1a
--- /dev/null
+++ b/mobile/chrome/content/aboutCertError.xhtml
@@ -0,0 +1,280 @@
+
+
+
+ %htmlDTD;
+
+ %globalDTD;
+
+ %certerrorDTD;
+]>
+
+
+
+
+ &certerror.pagetitle;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/chrome/content/aboutRights.xhtml b/mobile/chrome/content/aboutRights.xhtml
new file mode 100644
index 000000000000..a4650d5dbfd9
--- /dev/null
+++ b/mobile/chrome/content/aboutRights.xhtml
@@ -0,0 +1,128 @@
+
+
+ %htmlDTD;
+
+ %brandDTD;
+
+ %aboutRightsDTD;
+]>
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Gervase Markham.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Justin Dolske
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+
+
+
+ &rights.pagetitle;
+
+
+
+
+
+
+# Point 2 discusses Mozilla trademarks, and isn't needed when the build is unbranded.
+# Point 3 discusses privacy policy, unbranded builds get a placeholder (for the vendor to replace)
+# Point 4 discusses web service terms, unbranded builds gets a placeholder (for the vendor to replace)
+
Web addresses are usually written like
+ http://www.example.com/
+
Make sure that you're using forward slashes (i.e.
+ /).
+
+">
+
+
+
+
+
+
+
Try again. &brandShortName; will attempt to open a connection and reload the page.
+
+">
+
+
+
+
Please contact the website owners to inform them of this problem.
+
+">
+
+
+
+
Please contact the website owners to inform them of this problem.
+
+">
+
+
+
+
+
+
+
+
+
+
You might need to install other software to open this address.
+
+">
+
+
+
+
Check the proxy settings to make sure that they are correct.
+
Contact your network administrator to make sure the proxy server is
+ working.
+
+">
+
+
+
+
Check the proxy settings to make sure that they are correct.
+
Check to make sure your computer has a working network connection.
+
If your computer or network is protected by a firewall or proxy, make sure
+ that &brandShortName; is permitted to access the Web.
+
+">
+
+
+
+
This problem can sometimes be caused by disabling or refusing to accept
+ cookies.
+
+">
+
+
+
+
Check to make sure your system has the Personal Security Manager
+ installed.
+
This might be due to a non-standard configuration on the server.
+
+">
+
+
+
+
The page you are trying to view can not be shown because the authenticity of the received data could not be verified.
+
Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.
+
+">
+
+
+
+
This could be a problem with the server's configuration, or it could be
+someone trying to impersonate the server.
+
If you have connected to this server successfully in the past, the error may
+be temporary, and you can try again later.
+
+">
+
+
+
The site could be temporarily unavailable or too busy. Try again in a few
+ moments.
+
If you are unable to load any pages, check your computer's network
+ connection.
+
If your computer or network is protected by a firewall or proxy, make sure
+ that &brandShortName; is permitted to access the Web.
+
+">
+
+
+Attack sites try to install programs that steal private information, use your computer to attack others, or damage your system.
+
Web site owners who believe their site has been reported as an attack site in error may request a review.
+">
+
+
+Entering any personal information on this page may result in identity theft or other fraud.
+
These types of web forgeries are used in scams known as phishing attacks, in which fraudulent web pages and emails are used to imitate sources you may trust.
+">
+
+
+&brandShortName; prevented this page from loading in this way because the page has a content security policy that disallows it.">
+
+
+
+
+
+
+
+You should not add an exception if you are using an internet connection that you do not trust completely or if you are not used to seeing a warning for this server.
+
+
+
+">
diff --git a/mobile/locales/en-US/chrome/overrides/passwordmgr.properties b/mobile/locales/en-US/chrome/overrides/passwordmgr.properties
new file mode 100644
index 000000000000..775ddd85911e
--- /dev/null
+++ b/mobile/locales/en-US/chrome/overrides/passwordmgr.properties
@@ -0,0 +1,72 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Password Manager.
+#
+# The Initial Developer of the Original Code is
+# Brian Ryner.
+# Portions created by the Initial Developer are Copyright (C) 2003
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Brian Ryner
+# Ehsan Akhgari
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+rememberValue = Use Password Manager to remember this value.
+rememberPassword = Use Password Manager to remember this password.
+savePasswordTitle = Confirm
+# 1st string is product name, 2nd is the username for the login, 3rd is the
+# login's hostname. Note that long usernames may be truncated.
+saveLoginText = Do you want %1$S to remember the password for "%2$S" on %3$S?
+# 1st string is product name, 2nd is the login's hostname
+saveLoginTextNoUsername = Do you want %1$S to remember this password on %2$S?
+notNowButtonText = &Not Now
+notifyBarNotNowButtonText = Not Now
+notifyBarNotNowButtonAccessKey =
+neverForSiteButtonText = Ne&ver for This Site
+notifyBarNeverForSiteButtonText = Never
+notifyBarNeverForSiteButtonAccessKey =
+rememberButtonText = &Remember
+notifyBarRememberButtonText = Remember
+notifyBarRememberButtonAccessKey =
+passwordChangeTitle = Confirm Password Change
+passwordChangeText = Would you like to change the stored password for %S?
+passwordChangeTextNoUser = Would you like to change the stored password for this login?
+notifyBarChangeButtonText = Change
+notifyBarChangeButtonAccessKey =
+notifyBarDontChangeButtonText = Don't Change
+notifyBarDontChangeButtonAccessKey =
+userSelectText = Please confirm which user you are changing the password for
+hidePasswords=Hide Passwords
+hidePasswordsAccessKey=P
+showPasswords=Show Passwords
+showPasswordsAccessKey=P
+noMasterPasswordPrompt=Are you sure you wish to show your passwords?
+removeAllPasswordsPrompt=Are you sure you wish to remove all passwords?
+removeAllPasswordsTitle=Remove all passwords
+loginsSpielAll=Passwords for the following sites are stored on your computer:
+loginsSpielFiltered=The following passwords match your search:
diff --git a/mobile/locales/en-US/chrome/preferences.dtd b/mobile/locales/en-US/chrome/preferences.dtd
new file mode 100644
index 000000000000..ebc37406dbb7
--- /dev/null
+++ b/mobile/locales/en-US/chrome/preferences.dtd
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/locales/en-US/chrome/prompt.dtd b/mobile/locales/en-US/chrome/prompt.dtd
new file mode 100644
index 000000000000..c1251f1c4989
--- /dev/null
+++ b/mobile/locales/en-US/chrome/prompt.dtd
@@ -0,0 +1,2 @@
+
+
diff --git a/mobile/locales/en-US/chrome/region.properties b/mobile/locales/en-US/chrome/region.properties
new file mode 100644
index 000000000000..2a7a85234bc3
--- /dev/null
+++ b/mobile/locales/en-US/chrome/region.properties
@@ -0,0 +1,32 @@
+# Default search engine
+browser.search.defaultenginename=Google
+
+# Search engine order (order displayed in the search bar dropdown)s
+browser.search.order.1=Google
+
+# This is the default set of web based feed handlers shown in the reader
+# selection UI
+browser.contentHandlers.types.0.title=My Yahoo
+browser.contentHandlers.types.0.uri=http://add.my.yahoo.com/rss?url=%s
+browser.contentHandlers.types.1.title=Google
+browser.contentHandlers.types.1.uri=http://fusion.google.com/add?feedurl=%s
+
+# Keyword URL (for location bar searches)
+keyword.URL=http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=
+
+# increment this number when anything gets changed in the list below. This will
+# cause Firefox to re-read these prefs and inject any new handlers into the
+# profile database. Note that "new" is defined as "has a different URL"; this
+# means that it's not possible to update the name of existing handler, so
+# don't make any spelling errors here.
+gecko.handlerService.defaultHandlersVersion=2
+
+# The default set of protocol handlers for webcal:
+gecko.handlerService.schemes.webcal.0.name=30 Boxes
+gecko.handlerService.schemes.webcal.0.uriTemplate=http://30boxes.com/external/widget?refer=ff&url=%s
+
+# The default set of protocol handlers for mailto:
+gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail
+gecko.handlerService.schemes.mailto.0.uriTemplate=http://compose.mail.yahoo.com/?To=%s
+gecko.handlerService.schemes.mailto.1.name=Gmail
+gecko.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s
diff --git a/mobile/locales/en-US/chrome/sync.dtd b/mobile/locales/en-US/chrome/sync.dtd
new file mode 100644
index 000000000000..4b59523f2887
--- /dev/null
+++ b/mobile/locales/en-US/chrome/sync.dtd
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/locales/en-US/chrome/sync.properties b/mobile/locales/en-US/chrome/sync.properties
new file mode 100644
index 000000000000..25b597e4bf44
--- /dev/null
+++ b/mobile/locales/en-US/chrome/sync.properties
@@ -0,0 +1,27 @@
+# Mobile Sync
+
+# %S is the date and time at which the last sync successfully completed
+lastSync.label=Last update: %S
+lastSyncInProgress.label=Last update: in progress…
+
+# %S is the username logged in
+account.label=Account: %S
+notconnected.label=Not connected
+connecting.label=Connecting…
+
+notificationDisconnect.label=Your Firefox Sync account has been removed
+notificationDisconnect.button=Undo
+
+# LOCALIZATION NOTE (sync.clientUpdate, sync.remoteUpdate):
+# #1 is the "application name"
+# #2 is the "version"
+sync.update.client=#1 #2 is not compatible with the latest version of Firefox Sync. Please update to the latest version.
+sync.update.remote=#1 #2 is not compatible with older versions of Firefox Sync. Please update Firefox on your other computer(s).
+sync.update.title=Firefox Sync
+sync.update.button=Learn More
+sync.update.close=Close
+sync.setup.error.title=Cannot Setup Sync
+sync.setup.error.network=No internet connection available
+sync.setup.error.nodata=%S could not connect to Sync. Would you like to try again?
+sync.setup.tryagain=Try again
+sync.setup.manual=Manual setup
diff --git a/mobile/locales/en-US/crashreporter/crashreporter-override.ini b/mobile/locales/en-US/crashreporter/crashreporter-override.ini
new file mode 100644
index 000000000000..2ee9649d5fd2
--- /dev/null
+++ b/mobile/locales/en-US/crashreporter/crashreporter-override.ini
@@ -0,0 +1,10 @@
+# This file is in the UTF-8 encoding
+[Strings]
+# LOCALIZATION NOTE (CrashReporterProductErrorText2): %s is replaced with another string containing detailed information.
+CrashReporterProductErrorText2=Firefox has crashed. Unfortunately the crash reporter is unable to submit a crash report.\n\nDetails: %s
+CrashReporterDescriptionText2=Firefox has crashed. Your tabs will be listed on the Firefox Start page when you restart.\n\nPlease help us fix the problem!
+# LOCALIZATION NOTE (CheckSendReport): The %s is replaced with the vendor name.
+CheckSendReport=Send %s a crash report
+CheckIncludeURL=Include the page address
+Quit2=Quit Firefox
+Restart=Restart Firefox
diff --git a/mobile/locales/en-US/defines.inc b/mobile/locales/en-US/defines.inc
new file mode 100644
index 000000000000..24f45813a28a
--- /dev/null
+++ b/mobile/locales/en-US/defines.inc
@@ -0,0 +1,9 @@
+#filter emptyLines
+
+#define MOZ_LANGPACK_CREATOR mozilla.org
+
+# If non-English locales wish to credit multiple contributors, uncomment this
+# variable definition and use the format specified.
+# #define MOZ_LANGPACK_CONTRIBUTORS Joe SolonSuzy Solon
+
+#unfilter emptyLines
diff --git a/mobile/locales/en-US/installer/setup.ini b/mobile/locales/en-US/installer/setup.ini
new file mode 100644
index 000000000000..1ed7de333fd8
--- /dev/null
+++ b/mobile/locales/en-US/installer/setup.ini
@@ -0,0 +1,17 @@
+; This file is in the UTF-8 encoding
+[Strings]
+AppShortName=%MOZ_APP_DISPLAYNAME%
+AppLongName=Mozilla %MOZ_APP_DISPLAYNAME%
+WindowCaption=Mozilla %MOZ_APP_DISPLAYNAME% Setup
+InstallTo=Install %MOZ_APP_DISPLAYNAME% to
+Install=Install
+Cancel=Cancel
+InstalledSuccessfully=Mozilla %MOZ_APP_DISPLAYNAME% has been installed successfully.
+ExtractionError=Archive extraction error:
+ThereWereErrors=There were errors during installation:
+CreatingUserProfile=Creating user profile. Please wait...
+UninstallCaption=Mozilla %MOZ_APP_DISPLAYNAME% Uninstall
+FilesWillBeRemoved=All files will be removed from
+AreYouSure=Are you sure?
+InstallationNotFound=Mozilla %MOZ_APP_DISPLAYNAME% installation not found.
+UninstalledSuccessfully=Mozilla %MOZ_APP_DISPLAYNAME% has been uninstalled successfully.
diff --git a/mobile/locales/en-US/mobile-l10n.js b/mobile/locales/en-US/mobile-l10n.js
new file mode 100644
index 000000000000..e9027aaeb93d
--- /dev/null
+++ b/mobile/locales/en-US/mobile-l10n.js
@@ -0,0 +1,39 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Firefox browser.
+#
+# The Initial Developer of the Original Code is
+# Benjamin Smedberg
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+#filter substitution
+
+pref("general.useragent.locale", "@AB_CD@");
diff --git a/mobile/locales/en-US/profile/bookmarks.inc b/mobile/locales/en-US/profile/bookmarks.inc
new file mode 100644
index 000000000000..ecbabbe49e1e
--- /dev/null
+++ b/mobile/locales/en-US/profile/bookmarks.inc
@@ -0,0 +1,34 @@
+#filter emptyLines
+
+# LOCALIZATION NOTE: The 'en-US' strings in the URLs will be replaced with
+# your locale code, and link to your translated pages as soon as they're
+# live.
+
+# LOCALIZATION NOTE: Some of these URLs are currently 404s, but should be coming
+# online shortly.
+
+# LOCALIZATION NOTE (bookmarks_title):
+# title for the folder that will contains the default bookmarks
+#define bookmarks_title Mobile
+
+# LOCALIZATION NOTE (bookmarks_welcome):
+# link title for about:firstrun
+#define bookmarks_welcome Firefox: Welcome
+
+# LOCALIZATION NOTE (bookmarks_aboutBrowser):
+# link title for about:fennec
+#define bookmarks_aboutBrowser Firefox: About your browser
+
+# LOCALIZATION NOTE (bookmarks_addons):
+# link title for https://addons.mozilla.org/en-US/mobile
+#define bookmarks_addons Firefox: Customize with add-ons
+
+# LOCALIZATION NOTE (bookmarks_support):
+# link title for https://support.mozilla.com/mobile
+#define bookmarks_support Firefox: Support
+
+# LOCALIZATION NOTE (bookmarks_aboutHome):
+# link title for about:home
+#define bookmarks_aboutHome Firefox Start
+
+#unfilter emptyLines
diff --git a/mobile/locales/en-US/searchplugins/amazondotcom.xml b/mobile/locales/en-US/searchplugins/amazondotcom.xml
new file mode 100644
index 000000000000..a58e4c46e1ee
--- /dev/null
+++ b/mobile/locales/en-US/searchplugins/amazondotcom.xml
@@ -0,0 +1,12 @@
+
+Amazon.com
+ISO-8859-1
+data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZJREFUeNrEV01IFGEYfndXNzq0QdalJOoUbQiBUuopD2k/GFSG/Vxyq0OHbCUjwn7AEooUzUNRkdkhS1o9JBVaUDctKqhoRQi0WjtlxG6XVtfpfb6Z2caZ2ZnZXZdeeJxvx+973+f9+775XJIkkUaWMcoYG5TxfMpvxlvGMGM8+RYEFOxn/JJyLzOMiwwv7LqUCNQwHjpxIxKJ0Gg4LABZUVhIfr+f1jLSlNuMwyCwEHoZS6xmvxoZoc6Oq+JpJoVMpOncWdpcWZkOiRIQ2MKDp1az+kIhOtV40pHG6zdvpEOixc1/VtqFvKX5gmOX0pkL2yDgsZpxt+sORaPROe8Q6ncf3tPAk8eG3Ks14lA8brsZYZ2yukBAwOfzCeMHA3WGNXrCVpLnJKeqRyhAfX5RfNmILQF4urG0VIzxBBkU5aQI9agIeU4JqNLZ0UH9ob6sDWZE4MDefSn7P1txO/FcbxypQG18nhinew/u5zYC3dyG+qLL1qjjCKDg9C21q2a3oe9zRsCsn2PR2JzfKEy9PB96Nj8E0IJm54IaGZwPZsWJOU4jY1kD2OlAQhsJjKu3bSe7yPUzifpgMPsuOBY8brtR1evmyFt0IL0IzH4fJtcCH7kK1hn2/hh71G1yKKEdz/DBBIOTkUkRemzVl1uvCGKzE4OMIaFbiv1LSX51L7mXl4kxvgeO8vMaJk0PHiHvjl4DCTWs2lMOX0L6cwD/Bxlp6hNNv2gUT9MjsLiB8koaMOxJRgCMgPijWsqvaCP3qqqUZ4JVzUASYyFyL/WTqyggPxWH4qGtBlJzagCGIYjEzJv2zHe38vOUt6mNPGv20OyPMMV7yuVwL5IjBlLmRej1UX7VLdmLt+2CMVKTiSDn0wO1NPPyBOtdLL+MyzWkTbGhC5AGsBdKkEtWAjglgjUwCq/FGjhV0ZosdOhXI5FyH0DoIIK9slB0CS8UCgr8AlpvpamwqHpttcO4WtSqA57ioKENE05IqIYSY46uD4Is0qmGG2s9RYeS7adI3Paz3K6lTMmzIdFmXp/d1Gb1YvLF7i4IzxMfu1ITYWOe1VWix7U5tlKpXkzwYycONqfVLcW+cU7lQ0jePf360DqRS4zT/+Ny+ofRxPBoL6fa6zmu5uvtbkwZyE/lev6a8VV9+VeAAQADg36zc4GRNAAAAABJRU5ErkJggg==
+
+
+
+
+
+
+http://www.amazon.com/
+
diff --git a/mobile/locales/en-US/searchplugins/google.xml b/mobile/locales/en-US/searchplugins/google.xml
new file mode 100644
index 000000000000..721939748da3
--- /dev/null
+++ b/mobile/locales/en-US/searchplugins/google.xml
@@ -0,0 +1,15 @@
+
+Google
+UTF-8
+data:image/png;base64,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
+
+
+
+
+
+
+
+
+
+http://www.google.com/m
+
diff --git a/mobile/locales/en-US/searchplugins/list.txt b/mobile/locales/en-US/searchplugins/list.txt
new file mode 100644
index 000000000000..f241bfebff64
--- /dev/null
+++ b/mobile/locales/en-US/searchplugins/list.txt
@@ -0,0 +1,4 @@
+amazondotcom
+google
+twitter
+wikipedia
diff --git a/mobile/locales/en-US/searchplugins/twitter.xml b/mobile/locales/en-US/searchplugins/twitter.xml
new file mode 100644
index 000000000000..eefd46b0f21c
--- /dev/null
+++ b/mobile/locales/en-US/searchplugins/twitter.xml
@@ -0,0 +1,9 @@
+
+ Twitter
+ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADTppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMi4yLWMwNjMgNTMuMzUyNjI0LCAyMDA4LzA3LzMwLTE4OjA1OjQxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6eG1wUmlnaHRzPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvcmlnaHRzLyIKICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgIHhtbG5zOklwdGM0eG1wQ29yZT0iaHR0cDovL2lwdGMub3JnL3N0ZC9JcHRjNHhtcENvcmUvMS4wL3htbG5zLyIKICAgeG1wUmlnaHRzOldlYlN0YXRlbWVudD0iIgogICBwaG90b3Nob3A6QXV0aG9yc1Bvc2l0aW9uPSIiPgogICA8ZGM6cmlnaHRzPgogICAgPHJkZjpBbHQ+CiAgICAgPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ii8+CiAgICA8L3JkZjpBbHQ+CiAgIDwvZGM6cmlnaHRzPgogICA8ZGM6Y3JlYXRvcj4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkvPgogICAgPC9yZGY6U2VxPgogICA8L2RjOmNyZWF0b3I+CiAgIDxkYzp0aXRsZT4KICAgIDxyZGY6QWx0PgogICAgIDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+dHdpdHRlci10LXNvbG88L3JkZjpsaT4KICAgIDwvcmRmOkFsdD4KICAgPC9kYzp0aXRsZT4KICAgPHhtcFJpZ2h0czpVc2FnZVRlcm1zPgogICAgPHJkZjpBbHQ+CiAgICAgPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ii8+CiAgICA8L3JkZjpBbHQ+CiAgIDwveG1wUmlnaHRzOlVzYWdlVGVybXM+CiAgIDxJcHRjNHhtcENvcmU6Q3JlYXRvckNvbnRhY3RJbmZvCiAgICBJcHRjNHhtcENvcmU6Q2lBZHJFeHRhZHI9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkckNpdHk9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkclJlZ2lvbj0iIgogICAgSXB0YzR4bXBDb3JlOkNpQWRyUGNvZGU9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkckN0cnk9IiIKICAgIElwdGM0eG1wQ29yZTpDaVRlbFdvcms9IiIKICAgIElwdGM0eG1wQ29yZTpDaUVtYWlsV29yaz0iIgogICAgSXB0YzR4bXBDb3JlOkNpVXJsV29yaz0iIi8+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz6sMuh4AAADGElEQVR42tRXT2jTYBT/0tR0Sek2RIvr/NMq66RTOj3sMD1UKuxg9SQep8gugruoh6nbaRfBo6CgF93NHqUgooIgKpYhLWKZ3aTVTZG6dd26Nm3WNn6vS/QjJjVtuooPHs3H95L36/v/KFEUkRoFnmXs+MeD2YmZIa7imGOh450p1ASi1ABg5QPeDrN/uIcN7LGZ+ttoipPvPmbKr6dm+VB0pfQcgwgbRgAASD7xdHngZiQ3yZcqOVGD4C6ULNwHWeX79bJSuf1aOHu1lnISBADF7+w0AsCsMIgHzC6bfEUQ0Y1IDr1fLVUvD7ab0Vi/FXUwFAKZ03stgRc/hJf4aqFRDygBOMHn8oFUDgTP49Nr6NagbUPYRoOsE8eMQ+XbizhGhHoBMGTAkcplSuTL6Guugrqtpur5iofzz62U3Uq58NL6AgaWwY/JWlljbsRsKf43AJ+DOeNT+f8jiEWFspj/nK1EIGswGNWsMaFNJLBmbyc9OHHYOu7bzpyE9G4pABLIxQPsJagtUoEz5oKJyJouOWXWQIZdns6+AS+2xAIQxJBJMkkZ5mypC8hMkjKMaXkM1KJNBwBx8M8AyEFIdlKpnRvLgvP7WOSy0TVl7KzpV7ECgqIEBQmqomEAoPzQNv2vgvJHyeIDaYZIGQZQDyWz5ci9GT6oNcD8n1kQ+lLULQstG3rBsKvtnFovULpAAH/JLdnF0dX2q6S36XU0+S6HArstuoIQvnfKaTkbTZfmMYgkGQdKAN++5ytxadBAx7oYlPjEqyoAEMDN7gXJD+lSVD74uxlkpamm9QJozfjHrRkD2DTxO7P8k6wgLsEZkI/u55rWC/QGYezxfDEoH452bUGjvVzrsgBbITqVKASlslmloV0MGuuzNuQOshdAgEOg60nDGA6W6yQIsMTdI+0bZZijG+oFMB9KQ6r2ZkQuKZh9M8ulV2ITCBYZWHrgu5qbkRaIh3P87dViZdGIcmmL+mOVo7S2Y8Wy6oWt6UIPO9S31ezdwZnc5P5QqwnJY7lWL9AFgADilmY6h3K00iDhb4vJTwEGANC+26MCs7qQAAAAAElFTkSuQmCC
+
+
+
+ UTF-8
+ http://search.twitter.com/
+
diff --git a/mobile/locales/en-US/searchplugins/wikipedia.xml b/mobile/locales/en-US/searchplugins/wikipedia.xml
new file mode 100644
index 000000000000..171c0f501aef
--- /dev/null
+++ b/mobile/locales/en-US/searchplugins/wikipedia.xml
@@ -0,0 +1,14 @@
+
+Wikipedia
+UTF-8
+data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAHqSURBVHjapJUxb9NQFIW/JAip2xNS1/J+goeqUqeajdGVmFgwI1OcmYEgITFG7EgJQ+b2HzgbElJF+QU2iBl7YAFRnQ5+fnFcB0J8Jp/r53vPu+f6vYEA4JBTTjhkN/zkio9kAAihpyr1v/ijN7ovEHqiffFeDHTAdx6wL46HnPX4HM6HHNEHR0NGvRKMhvRE7wT3ACYssBggpyThIRMCAFaEzHhOiQWumfGFBQGQY0kB9EKSCsVCyKpQxUMhdOEMj4Vi91wIGX2uyNJtwTDHAgbjOUBJ/T50ETDAzCn0CiRpLkSd2VW1rqZR6uOpzHoWl40EkmkIlTIhNJc0bUSlSNNtCaZCKGtpyDZimXB92uhBhTEAHzx/BuQ8Isb62Dti16c7PahrNnbovFhXLGQaau4oqDSULDx/BcCl55cEDTUdCqqagWcXbjpqWD8ZWxRUGq5ZOTYhAXLHV0DU/qCtQLJCkZuM0PHQGThvL152JJh5M61SP2CpMpmmgdsTFDJCiaaubq0haQ7Q3xLUZq4NqzS0DNzWxNq8ksgbFmGgwf95oFgijJuB6v9L3Fx2HSg3XeExZxv1xuSEXQt/o8fqg9cDHfB15zuxjRuOETrfu/5b9bhcf+mlRmLgr/cTgp1vqR9c8YlvALcDAPr5jIx+4LKcAAAAAElFTkSuQmCC
+
+
+
+
+
+
+
+
+http://en.wikipedia.org/wiki/Special:Search
+
diff --git a/mobile/locales/en-US/searchplugins/yahoo.xml b/mobile/locales/en-US/searchplugins/yahoo.xml
new file mode 100644
index 000000000000..ed3a4c3085c3
--- /dev/null
+++ b/mobile/locales/en-US/searchplugins/yahoo.xml
@@ -0,0 +1,13 @@
+
+Yahoo
+UTF-8
+data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA7xJREFUeNrs10tslFUUB/DfN9NCaUsir2JAQAQKBgQXiFEeC6JdKAQCoiERXKiJrmRhNMZH3LjQjaILIiqKCWp8BgL4IGpQWkASCY+qWHm0CFjKyz5oO9PO56LfDNNhpmXHwp7ky9w5c+49//ud//nfO0EYhq6nxVxnGwAwAOC6Ayh6IVjfX8wEzMBMlCDdt2fwM+rR1s8a03AIR3AAv+EYGov6mLQKq3FPP4s34AN8gt8LxAxBEaZHT9rq85XgiWh3H15DchiPl6JdfRQly7XLBebuyAXwBdaFwhtTQt1SmSclFOpXNVeiCVNy/Mk8sQfweTaAT7GsZxhkEnfp1qVbiFAQffZpZVEpKrJ8+absQU2aAw9hRUpK+YhSyzbOVzFjpNbGNsnWpGRnShjS3NBq85PVOiV6vY1AICZQrEhMAHFsxZwoJJEHwHdoKcJ9eDG9UKIlac+6WsMm3mDJW/My0V89+pOTv5zVrsOtd08wbu5o7Rc7BAFDRpQoLok7uOmoprpLYj3dfQfmYRdO5QGwTcTMx9LMDASSiS4Htx3XptPx7aetOfogqFw81jcb9goQL467ac4otz0wCbQ2tavffcb+9+tyebIiApBr9ehMC9G07F8CgVKDDVeu7thJG6u2g+lLJ1n+zAKdkqp31jq1r6lnG0/XeLniPeuXbHG+vkVcPHu5+QV4sjUjREjll8iYcqV27zhs5FPD3L/2LlWv3qnx4L9mrp5o1sop1s/d7EDNX8qUKjeop/q9bWgBAN9nA8grRgHiYsqV+fbNPW5eONr0JbdY9XWVjpaE1yo2aWg6a6gy8TT1rr3/f80+C+oK9VMgUCQmqcsPz+3P+Lc8vsuRpgalSsQKJ4fdeXx/RxzIAHgHfxR6CyG6hVKJ7oy//VynpJSUVF/J4bM8vkO9DiNswbBIz3tZKFQSG2TS+DEql4/L+CcvGisRT2qua3PheHME9So7nF1rjI5a88/soPgCi9OyOBuVvfUzZczM4R7+ssrY2aOc3n/OxRPNSkeWmHrveJdOtvin9mKhIsxGc9Z4MKpxIYugYfC8t3PPgmW9uiGIKR5SpP1yQjKS9Jj4Fc272lJYiJ1ZvjpMjsYfoxaz8G5uByzHGryeWS1M6bjcGdUrniFnDzuCfOr2CM5n+QZlJYdGvNLXjeiNaOVnsRfJtNbHxcQj3gdXkp/AhkhNF+UkF11ifkRr9L06l4SFbC32YWmk6eOyRCtAC2qiW9HW6A6Rz5qjs+Z2TM3tuGDgn9EAgP89gP8GAF3DLhLnfG5QAAAAAElFTkSuQmCC
+
+
+
+
+
+
+http://search.yahoo.com/
+
diff --git a/mobile/locales/en-US/updater/updater.ini b/mobile/locales/en-US/updater/updater.ini
new file mode 100644
index 000000000000..dfa025730656
--- /dev/null
+++ b/mobile/locales/en-US/updater/updater.ini
@@ -0,0 +1,4 @@
+; This file is in the UTF-8 encoding
+[Strings]
+TitleText=%MOZ_APP_DISPLAYNAME% Update
+InfoText=%MOZ_APP_DISPLAYNAME% is installing your updates and will start in a few moments…
diff --git a/mobile/locales/filter.py b/mobile/locales/filter.py
new file mode 100644
index 000000000000..5aef3f6839f0
--- /dev/null
+++ b/mobile/locales/filter.py
@@ -0,0 +1,69 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Axel Hecht
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+
+def test(mod, path, entity = None):
+ import re
+ # ignore anything but mobile, which is our local repo checkout name
+ if mod not in ("netwerk", "dom", "toolkit", "security/manager",
+ "services/sync", "embedding/android",
+ "mobile"):
+ return False
+
+ # Ignore Lorentz strings, at least temporarily
+ if mod == "toolkit" and path == "chrome/mozapps/plugins/plugins.dtd":
+ if entity.startswith('reloadPlugin.'): return False
+ if entity.startswith('report.'): return False
+
+ if mod != "mobile":
+ # we only have exceptions for mobile
+ return True
+ if not entity:
+ return not (re.match(r"searchplugins\/.+\.xml", path) or
+ re.match(r"mobile-l10n.js", path) or
+ re.match(r"defines.inc", path))
+ if path == "defines.inc":
+ return entity != "MOZ_LANGPACK_CONTRIBUTORS"
+
+ if path != "chrome/region.properties":
+ # only region.properties exceptions remain, compare all others
+ return True
+
+ return not (re.match(r"browser\.search\.order\.[1-9]", entity) or
+ re.match(r"browser\.contentHandlers\.types\.[0-5]", entity) or
+ re.match(r"gecko\.handlerService\.schemes\.", entity) or
+ re.match(r"gecko\.handlerService\.defaultHandlersVersion", entity))
diff --git a/mobile/locales/generic/install.rdf b/mobile/locales/generic/install.rdf
new file mode 100644
index 000000000000..3f7091d8d3bc
--- /dev/null
+++ b/mobile/locales/generic/install.rdf
@@ -0,0 +1,62 @@
+
+
+
+
+
+#ifdef MOZ_LANGPACK_CONTRIBUTORS
+ @MOZ_LANGPACK_CONTRIBUTORS@
+#endif
+
+
+
+ {a23983c0-fd0e-11dc-95ff-0800200c9a66}
+ @MOZ_APP_VERSION@
+ @MOZ_APP_VERSION@
+
+
+
+
diff --git a/mobile/locales/generic/profile/bookmarks.json.in b/mobile/locales/generic/profile/bookmarks.json.in
new file mode 100644
index 000000000000..4d90aaea4327
--- /dev/null
+++ b/mobile/locales/generic/profile/bookmarks.json.in
@@ -0,0 +1,23 @@
+#filter substitution
+{"type":"text/x-moz-place-container","root":"placesRoot","children":
+ [{"type":"text/x-moz-place-container","title":"@bookmarks_title@","annos":[{"name":"mobile/bookmarksRoot","expires":4,"type":1,"value":1}],
+ "children":
+ [
+ { "title":"@bookmarks_welcome@", "type":"text/x-moz-place", "uri":"about:firstrun",
+ "iconUri":"chrome://branding/content/favicon32.png"
+ },
+ {"index":1,"title":"@bookmarks_aboutBrowser@", "type":"text/x-moz-place", "uri":"about:firefox",
+ "iconUri":"chrome://branding/content/favicon32.png"
+ },
+ {"index":2,"title":"@bookmarks_addons@", "type":"text/x-moz-place", "uri":"https://addons.mozilla.org/@AB_CD@/mobile/",
+ "icon":"data:image/png;base64,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"
+ },
+ {"index":3,"title":"@bookmarks_support@", "type":"text/x-moz-place", "uri":"http://support.mozilla.com/@AB_CD@/mobile",
+ "icon":"data:image/png;base64,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"
+ },
+ {"index":4,"title":"@bookmarks_aboutHome@", "type":"text/x-moz-place", "uri":"about:home",
+ "iconUri":"chrome://branding/content/favicon32.png"
+ }
+ ]
+ }]
+}
diff --git a/mobile/locales/jar.mn b/mobile/locales/jar.mn
new file mode 100644
index 000000000000..16cfea4a5188
--- /dev/null
+++ b/mobile/locales/jar.mn
@@ -0,0 +1,29 @@
+#filter substitution
+
+@AB_CD@.jar:
+% locale browser @AB_CD@ %locale/@AB_CD@/browser/
+ locale/@AB_CD@/browser/about.dtd (%chrome/about.dtd)
+ locale/@AB_CD@/browser/aboutCertError.dtd (%chrome/aboutCertError.dtd)
+ locale/@AB_CD@/browser/aboutHome.dtd (%chrome/aboutHome.dtd)
+ locale/@AB_CD@/browser/browser.dtd (%chrome/browser.dtd)
+ locale/@AB_CD@/browser/browser.properties (%chrome/browser.properties)
+ locale/@AB_CD@/browser/config.dtd (%chrome/config.dtd)
+ locale/@AB_CD@/browser/firstrun.dtd (%chrome/firstrun.dtd)
+ locale/@AB_CD@/browser/region.properties (%chrome/region.properties)
+ locale/@AB_CD@/browser/preferences.dtd (%chrome/preferences.dtd)
+ locale/@AB_CD@/browser/checkbox.dtd (%chrome/checkbox.dtd)
+ locale/@AB_CD@/browser/notification.dtd (%chrome/notification.dtd)
+ locale/@AB_CD@/browser/sync.dtd (%chrome/sync.dtd)
+ locale/@AB_CD@/browser/sync.properties (%chrome/sync.properties)
+ locale/@AB_CD@/browser/prompt.dtd (%chrome/prompt.dtd)
+ locale/@AB_CD@/browser/feedback.dtd (%chrome/feedback.dtd)
+ locale/@AB_CD@/browser/bookmarks.json (bookmarks.json)
+ locale/@AB_CD@/browser/searchplugins/list.txt (%searchplugins/list.txt)
+
+# Fennec-specific overrides of generic strings
+* locale/@AB_CD@/browser/netError.dtd (%chrome/overrides/netError.dtd)
+% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
+* locale/@AB_CD@/browser/appstrings.properties (%chrome/overrides/appstrings.properties)
+% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
+* locale/@AB_CD@/browser/passwordmgr.properties (%chrome/overrides/passwordmgr.properties)
+% override chrome://passwordmgr/locale/passwordmgr.properties chrome://browser/locale/passwordmgr.properties
diff --git a/mobile/locales/l10n-central.ini b/mobile/locales/l10n-central.ini
new file mode 100644
index 000000000000..6718921bbda9
--- /dev/null
+++ b/mobile/locales/l10n-central.ini
@@ -0,0 +1,31 @@
+[general]
+depth = ../..
+source-depth = ..
+all = locales/all-locales
+
+[compare]
+dirs = mobile
+tld = mobile
+
+[includes]
+toolkit = toolkit/locales/l10n.ini
+services_sync = services/sync/locales/l10n.ini
+embedding_android = embedding/android/locales/l10n.ini
+
+[include_toolkit]
+type = hg
+mozilla = mozilla-central
+repo = http://hg.mozilla.org/
+l10n.ini = toolkit/locales/l10n.ini
+
+[include_services_sync]
+type = hg
+mozilla = mozilla-central
+repo = http://hg.mozilla.org/
+l10n.ini = services/sync/locales/l10n.ini
+
+[include_embedding_android]
+type = hg
+mozilla = mozilla-central
+repo = http://hg.mozilla.org/
+l10n.ini = embedding/android/locales/l10n.ini
diff --git a/mobile/locales/l10n-mozilla-1.9.2.ini b/mobile/locales/l10n-mozilla-1.9.2.ini
new file mode 100644
index 000000000000..4347f86068b5
--- /dev/null
+++ b/mobile/locales/l10n-mozilla-1.9.2.ini
@@ -0,0 +1,17 @@
+[general]
+depth = ../..
+source-depth = ..
+all = locales/all-locales
+
+[compare]
+dirs = mobile
+tld = mobile
+
+[includes]
+toolkit = toolkit/locales/l10n.ini
+
+[include_toolkit]
+type = hg
+mozilla = releases/mozilla-1.9.2
+repo = http://hg.mozilla.org/
+l10n.ini = toolkit/locales/l10n.ini
diff --git a/mobile/locales/l10n-mozilla-2.0.ini b/mobile/locales/l10n-mozilla-2.0.ini
new file mode 100644
index 000000000000..651c25c632d7
--- /dev/null
+++ b/mobile/locales/l10n-mozilla-2.0.ini
@@ -0,0 +1,31 @@
+[general]
+depth = ../..
+source-depth = ..
+all = locales/all-locales
+
+[compare]
+dirs = mobile
+tld = mobile
+
+[includes]
+toolkit = toolkit/locales/l10n.ini
+services_sync = services/sync/locales/l10n.ini
+embedding_android = embedding/android/locales/l10n.ini
+
+[include_toolkit]
+type = hg
+mozilla = releases/mozilla-2.0
+repo = http://hg.mozilla.org/
+l10n.ini = toolkit/locales/l10n.ini
+
+[include_services_sync]
+type = hg
+mozilla = releases/mozilla-2.0
+repo = http://hg.mozilla.org/
+l10n.ini = services/sync/locales/l10n.ini
+
+[include_embedding_android]
+type = hg
+mozilla = releases/mozilla-2.0
+repo = http://hg.mozilla.org/
+l10n.ini = embedding/android/locales/l10n.ini
diff --git a/mobile/locales/l10n.ini b/mobile/locales/l10n.ini
new file mode 100644
index 000000000000..6718921bbda9
--- /dev/null
+++ b/mobile/locales/l10n.ini
@@ -0,0 +1,31 @@
+[general]
+depth = ../..
+source-depth = ..
+all = locales/all-locales
+
+[compare]
+dirs = mobile
+tld = mobile
+
+[includes]
+toolkit = toolkit/locales/l10n.ini
+services_sync = services/sync/locales/l10n.ini
+embedding_android = embedding/android/locales/l10n.ini
+
+[include_toolkit]
+type = hg
+mozilla = mozilla-central
+repo = http://hg.mozilla.org/
+l10n.ini = toolkit/locales/l10n.ini
+
+[include_services_sync]
+type = hg
+mozilla = mozilla-central
+repo = http://hg.mozilla.org/
+l10n.ini = services/sync/locales/l10n.ini
+
+[include_embedding_android]
+type = hg
+mozilla = mozilla-central
+repo = http://hg.mozilla.org/
+l10n.ini = embedding/android/locales/l10n.ini
diff --git a/mobile/locales/maemo-locales b/mobile/locales/maemo-locales
new file mode 100644
index 000000000000..5609e3a7f81d
--- /dev/null
+++ b/mobile/locales/maemo-locales
@@ -0,0 +1,13 @@
+cs
+da
+de
+es-ES
+fi
+fr
+ja
+it
+nb-NO
+nl
+pl
+pt-PT
+ru
diff --git a/mobile/makefiles.sh b/mobile/makefiles.sh
new file mode 100644
index 000000000000..92eb63d75387
--- /dev/null
+++ b/mobile/makefiles.sh
@@ -0,0 +1,62 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+add_makefiles "
+netwerk/locales/Makefile
+dom/locales/Makefile
+toolkit/locales/Makefile
+security/manager/locales/Makefile
+mobile/app/Makefile
+mobile/app/profile/extensions/Makefile
+$MOZ_BRANDING_DIRECTORY/Makefile
+$MOZ_BRANDING_DIRECTORY/locales/Makefile
+mobile/chrome/Makefile
+mobile/chrome/tests/Makefile
+mobile/components/Makefile
+mobile/components/phone/Makefile
+mobile/modules/Makefile
+mobile/installer/Makefile
+mobile/locales/Makefile
+mobile/Makefile
+mobile/themes/Makefile
+mobile/themes/core/Makefile"
+
+if test -n "$MOZ_UPDATE_PACKAGING"; then
+ add_makefiles "
+ tools/update-packaging/Makefile
+ "
+fi
diff --git a/mobile/modules/Makefile.in b/mobile/modules/Makefile.in
new file mode 100644
index 000000000000..10ab53ff055a
--- /dev/null
+++ b/mobile/modules/Makefile.in
@@ -0,0 +1,54 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Mobile Browser.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2010
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+EXTRA_JS_MODULES = \
+ linuxTypes.jsm \
+ video.jsm \
+ $(NULL)
+
+EXTRA_PP_JS_MODULES = \
+ contacts.jsm \
+ $(NULL)
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/modules/contacts.jsm b/mobile/modules/contacts.jsm
new file mode 100644
index 000000000000..e3eec1061649
--- /dev/null
+++ b/mobile/modules/contacts.jsm
@@ -0,0 +1,159 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is Mozilla.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Finkle
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+let EXPORTED_SYMBOLS = ["Contacts"];
+
+const Cu = Components.utils;
+
+Cu.import("resource://gre/modules/ctypes.jsm");
+
+let Contacts = {
+ _providers: [],
+ _contacts: [],
+
+ _load: function _load() {
+ this._contacts = [];
+
+ this._providers.forEach(function(provider) {
+ this._contacts = this._contacts.concat(provider.getContacts());
+ }, this)
+ },
+
+ init: function init() {
+ // Not much to do for now
+ this._load();
+ },
+
+ refresh: function refresh() {
+ // Pretty simple for now
+ this._load();
+ },
+
+ addProvider: function(aProvider) {
+ this._providers.push(aProvider);
+ this.refresh();
+ },
+
+ find: function find(aMatch) {
+ let results = [];
+
+ if (!this._contacts.length)
+ return results;
+
+ for (let field in aMatch) {
+ // Simple string-only partial matching
+ let match = aMatch[field];
+ this._contacts.forEach(function(aContact) {
+ if (field in aContact && aContact[field].indexOf(match) != -1)
+ results.push(aContact);
+ });
+ }
+ return results;
+ }
+};
+
+#ifndef ANDROID
+#ifndef XP_MACOSX
+#ifdef XP_UNIX
+Cu.import("resource:///modules/linuxTypes.jsm");
+
+function EBookProvider() {
+ EBook.init();
+}
+
+EBookProvider.prototype = {
+ getContacts: function() {
+ if (!EBook.lib) {
+ Cu.reportError("EBook not loaded")
+ return [];
+ }
+
+ let gError = new GLib.GError.ptr;
+ let book = EBook.openSystem(gError.address());
+ if (!book) {
+ Cu.reportError("EBook.openSystem: " + gError.contents.message.readString())
+ return [];
+ }
+
+ if (!EBook.openBook(book, false, gError.address())) {
+ Cu.reportError("EBook.openBook: " + gError.contents.message.readString())
+ return [];
+ }
+
+ let query = EBook.queryAnyFieldContains("");
+ if (query) {
+ let gList = new GLib.GList.ptr();
+ if (!EBook.getContacts(book, query, gList.address(), gError.address())) {
+ Cu.reportError("EBook.getContacts: " + gError.contents.message.readString())
+ return [];
+ }
+
+ let contacts = [];
+ while (gList && !gList.isNull()) {
+ let fullName = EBook.getContactField(gList.contents.data, EBook.E_CONTACT_FULL_NAME);
+ if (!fullName.isNull()) {
+ let contact = {};
+ contact.fullName = fullName.readString();
+ contact.emails = [];
+ contact.phoneNumbers = [];
+
+ for (let emailIndex=EBook.E_CONTACT_EMAIL_FIRST; emailIndex<=EBook.E_CONTACT_EMAIL_LAST; emailIndex++) {
+ let email = EBook.getContactField(gList.contents.data, emailIndex);
+ if (!email.isNull())
+ contact.emails.push(email.readString());
+ }
+
+ for (let phoneIndex=EBook.E_CONTACT_PHONE_FIRST; phoneIndex<=EBook.E_CONTACT_PHONE_LAST; phoneIndex++) {
+ let phone = EBook.getContactField(gList.contents.data, phoneIndex);
+ if (!phone.isNull())
+ contact.phoneNumbers.push(phone.readString());
+ }
+
+ contacts.push(contact);
+ }
+ gList = ctypes.cast(gList.contents.next, GLib.GList.ptr);
+ }
+ return contacts;
+ }
+ return [];
+ }
+};
+
+Contacts.addProvider(new EBookProvider);
+# XP_UNIX
+#endif
+#endif
+#endif
diff --git a/mobile/modules/linuxTypes.jsm b/mobile/modules/linuxTypes.jsm
new file mode 100644
index 000000000000..288670adeeca
--- /dev/null
+++ b/mobile/modules/linuxTypes.jsm
@@ -0,0 +1,116 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is Mozilla.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Finkle
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+let EXPORTED_SYMBOLS = ["GLib", "EBook"];
+
+const Cu = Components.utils;
+
+Cu.import("resource://gre/modules/ctypes.jsm");
+
+let GLib = {
+ lib: null,
+
+ init: function glib_init() {
+ if (this.lib)
+ return;
+
+ this.lib = true; // TODO hook up the real glib
+
+ this.GError = new ctypes.StructType("GError", [
+ {"domain": ctypes.int32_t},
+ {"code": ctypes.int32_t},
+ {"message": ctypes.char.ptr}
+ ]);
+
+ this.GList = new ctypes.StructType("GList", [
+ {"data": ctypes.voidptr_t},
+ {"next": ctypes.voidptr_t},
+ {"prev": ctypes.voidptr_t}
+ ]);
+ }
+};
+
+let EBook = {
+ lib: null,
+
+ E_CONTACT_FULL_NAME: 4,
+ E_CONTACT_EMAIL_1: 8,
+ E_CONTACT_EMAIL_2: 9,
+ E_CONTACT_EMAIL_3: 10,
+ E_CONTACT_EMAIL_4: 11,
+ E_CONTACT_PHONE_BUSINESS: 17,
+ E_CONTACT_PHONE_BUSINESS_2: 18,
+ E_CONTACT_PHONE_HOME: 23,
+ E_CONTACT_PHONE_HOME_2: 24,
+ E_CONTACT_PHONE_MOBILE: 27,
+
+ E_CONTACT_EMAIL_FIRST: 8,
+ E_CONTACT_EMAIL_LAST: 11,
+ E_CONTACT_PHONE_FIRST: 16,
+ E_CONTACT_PHONE_LAST: 34,
+
+ init: function ebook_init() {
+ if (this.lib)
+ return;
+
+ GLib.init();
+
+ try {
+ // Shipping on N900
+ this.lib = ctypes.open("libebook-1.2.so.5");
+ } catch (e) {
+ try {
+ // Shipping on Ubuntu
+ this.lib = ctypes.open("libebook-1.2.so.9");
+ } catch (e) {
+ Cu.reportError("EBook: couldn't load libebook:\n" + e)
+ this.lib = null;
+ return;
+ }
+ }
+
+ this.EBook = new ctypes.StructType("EBook");
+ this.EQuery = new ctypes.StructType("EQuery");
+
+ this.openSystem = this.lib.declare("e_book_new_system_addressbook", ctypes.default_abi, EBook.EBook.ptr, GLib.GError.ptr.ptr);
+ this.openBook = this.lib.declare("e_book_open", ctypes.default_abi, ctypes.bool, EBook.EBook.ptr, ctypes.bool, GLib.GError.ptr.ptr);
+
+ this.queryAnyFieldContains = this.lib.declare("e_book_query_any_field_contains", ctypes.default_abi, EBook.EQuery.ptr, ctypes.char.ptr);
+
+ this.getContacts = this.lib.declare("e_book_get_contacts", ctypes.default_abi, ctypes.bool, EBook.EBook.ptr, EBook.EQuery.ptr, GLib.GList.ptr.ptr, GLib.GError.ptr.ptr);
+ this.getContactField = this.lib.declare("e_contact_get_const", ctypes.default_abi, ctypes.char.ptr, ctypes.voidptr_t, ctypes.uint32_t);
+ }
+};
diff --git a/mobile/modules/video.jsm b/mobile/modules/video.jsm
new file mode 100644
index 000000000000..df208be487f8
--- /dev/null
+++ b/mobile/modules/video.jsm
@@ -0,0 +1,5 @@
+var EXPORTED_SYMBOLS = ["Video"];
+
+var Video = {
+ fullScreenSourceElement: null
+};
diff --git a/mobile/themes/Makefile.in b/mobile/themes/Makefile.in
new file mode 100644
index 000000000000..c0bfc214c41a
--- /dev/null
+++ b/mobile/themes/Makefile.in
@@ -0,0 +1,52 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Mobile Browser.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+#
+# Theme Selection
+#
+
+# Add the core theme files
+DIRS = core
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/themes/core/Makefile.in b/mobile/themes/core/Makefile.in
new file mode 100644
index 000000000000..8cc28f3216e5
--- /dev/null
+++ b/mobile/themes/core/Makefile.in
@@ -0,0 +1,46 @@
+# ***** BEGIN LICENSE BLOCK *****
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Mobile Browser.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation .
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Finkle
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/rules.mk
diff --git a/mobile/themes/core/about.css b/mobile/themes/core/about.css
new file mode 100644
index 000000000000..8855a475ec89
--- /dev/null
+++ b/mobile/themes/core/about.css
@@ -0,0 +1,46 @@
+html {
+ background: #f0f0f0;
+ padding: 0 1em;
+ font-family: "Nokia Sans", Tahoma, sans-serif !important;
+ font-size: 100% !important;
+}
+
+body {
+ color: black;
+ position: relative;
+ min-width: 330px;
+ max-width: 50em;
+ margin: 1em auto;
+ border: 1px solid gray;
+ -moz-border-radius: 10px;
+ padding: 3em;
+ -moz-padding-start: 30px;
+ background: white;
+}
+
+.aboutPageWideContainer {
+ max-width: 80%;
+}
+
+#aboutLogoContainer {
+ border: 1px solid lightgray;
+ width: 300px;
+ margin-bottom: 2em;
+}
+
+img {
+ border: 0;
+}
+
+#version {
+ font-weight: bold;
+ color: #909090;
+ margin: -24px 0 9px 17px;
+}
+
+ul {
+ margin: 0;
+ -moz-margin-start: 1.5em;
+ padding: 0;
+ list-style: square;
+}
diff --git a/mobile/themes/core/aboutCertError.css b/mobile/themes/core/aboutCertError.css
new file mode 100644
index 000000000000..fde7e8bfda95
--- /dev/null
+++ b/mobile/themes/core/aboutCertError.css
@@ -0,0 +1,96 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * William Price
+ * Steven Garrity
+ * Henrik Skupin
+ * Johnathan Nightingale
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+html {
+ background: #f0f0f0;
+}
+
+body {
+ margin: 0;
+ padding: 0 1em;
+ color: black;
+ font-family: "Nokia Sans", Tahoma, sans-serif !important;
+ font-size: 100% !important;
+}
+
+h1 {
+ margin: 0 0 .6em 0;
+ border-bottom: 1px solid lightgray;
+ font-size: 160%;
+}
+
+h2 {
+ font-size: 130%;
+}
+
+#errorPageContainer {
+ position: relative;
+ min-width: 13em;
+ max-width: 52em;
+ margin: 1em auto;
+ border: 1px solid #FFBD09; /* pale yellow extracted from yellow passport icon */
+ -moz-border-radius: 10px;
+ padding: 3em;
+ -moz-padding-start: 30px;
+ background: url("chrome://global/skin/icons/sslWarning.png") left 0 no-repeat white;
+ -moz-background-origin: content;
+}
+
+body[dir="rtl"] #errorPageContainer {
+ background-position: right 0;
+}
+
+#errorTitle {
+ -moz-margin-start: 80px;
+}
+
+#errorLongContent {
+ -moz-margin-start: 80px;
+}
+
+#technicalContent > h2, #expertContent > h2 {
+ background : url("chrome://browser/skin/images/section-expanded-16.png") left 0 no-repeat;
+}
+
+#technicalContent[collapsed] > h2,
+#expertContent[collapsed] > h2 {
+ background-image: url("chrome://browser/skin/images/section-collapsed-16.png");
+}
diff --git a/mobile/themes/core/aboutHome.css b/mobile/themes/core/aboutHome.css
new file mode 100644
index 000000000000..27ade890fa9c
--- /dev/null
+++ b/mobile/themes/core/aboutHome.css
@@ -0,0 +1,297 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Finkle
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+html {
+ background: white;
+ font-family: "Nokia Sans", Tahoma, sans-serif !important;
+ font-size: 24px;
+ margin: 0px 20px;
+}
+
+#wrapper {
+ max-width: 600px;
+ margin: 0 auto;
+}
+
+#logo {
+ float: right;
+ margin-top: -24px;
+ margin-right: -34px;
+}
+
+#header {
+ font-weight: bold;
+ color: white;
+ background: transparent -moz-linear-gradient(top, rgba(57,89,117,1) 0%, rgba(30,66,98,1) 50%, rgba(24,54,82,1) 90%);
+ border-radius: 6px;
+ padding: 12px;
+ padding-bottom: 14px;
+ margin-bottom: 12px;
+ margin-top: 20px;
+ box-shadow: inset rgba(0, 0, 0, 0.2) 0 -3px 0px, rgba(0, 0, 0, 0.1) 0px 2px 0px;
+}
+
+#header-suffix {
+ color: rgb(112,136,156);
+}
+
+.section-box {
+ background-color: white;
+ padding: 0;
+ margin-bottom: 8px;
+ border-radius: 8px;
+ border: 1px solid rgba(0,0,0,0.3);
+ box-shadow:
+ inset rgba(255, 255, 255, 0.5) 0 1px 0px,
+ inset rgba(0, 0, 0, 0.1) 0 -3px 0px,
+ rgba(0, 0, 0, 0.1) 0px 2px 0px;
+ width: 100%;
+ overflow: hidden;
+}
+
+.section-box > h1 {
+ font-size: 18px;
+ font-weight: normal;
+ color: black;
+ background: transparent -moz-linear-gradient(top, rgba(235,235,235,0.2) 0%, rgba(235,235,235,1) 90%);
+ margin: 0;
+ padding: 4px 12px 8px 12px;
+ border-radius: 8px 8px 0 0;
+}
+
+.section-box > div {
+ border-bottom: 1px solid rgba(0,0,0,0.1);
+ padding: 8px;
+ padding-bottom: 12px;
+ position: relative;
+}
+
+.section-box > div:last-child {
+ border-bottom: 0;
+}
+
+/* Make room for the image */
+.section-box > div > div,
+.section-row > div > div {
+ -moz-margin-start: 48px;
+}
+
+.section-box .title {
+ color: black;
+}
+
+.section-box .openall {
+ font-size: 18px;
+ padding: 12px 8px;
+ color: black;
+}
+
+body[dir="ltr"] .section-box .openall {
+ text-align: right;
+}
+
+.section-box .version {
+ -moz-margin-start: 12px;
+ font-size: 18px;
+ color: gray;
+}
+
+.section-box .inner {
+ pointer-events: none;
+}
+
+.section-box .favicon {
+ border: none;
+ top: 8px;
+ width: 32px;
+ height: 32px;
+ position: absolute;
+ pointer-events: none;
+}
+
+body[dir="ltr"] .section-box .favicon {
+ left: 12px;
+}
+
+body[dir="ltr"] .section-box .favicon {
+ right: 12px;
+}
+
+body[dir="ltr"] #newAddons > div:not(.loading) {
+ background: url("images/arrowright-16.png") 99% center no-repeat;
+}
+
+body[dir="rtl"] #newAddons > div:not(.loading) {
+ background: url("images/arrowleft-16.png") 1% center no-repeat;
+}
+
+#remoteTabs[disabled=true] {
+ pointer-events: none;
+ color: #aaa;
+}
+
+#remoteTabs[disabled=true] > div > .favicon {
+ opacity: 0.5;
+}
+
+.section-row {
+ color: black;
+ background: transparent -moz-linear-gradient(top, rgba(235,235,235,0.2) 0%, rgba(235,235,235,1) 90%);
+ padding: 8px;
+ padding-bottom: 12px;
+ border-radius: 8px;
+ border: 1px solid rgba(0,0,0,0.3);
+ box-shadow:
+ inset rgba(255, 255, 255, 0.5) 0 1px 0px,
+ inset rgba(0, 0, 0, 0.1) 0 -3px 0px,
+ rgba(0, 0, 0, 0.1) 0px 2px 0px;
+ margin: 24px auto;
+}
+
+.section-row > div {
+ position: relative;
+ pointer-events: none;
+}
+
+.section-row .favicon {
+ border: none;
+ top: 0;
+ width: 32px;
+ height: 32px;
+ position: absolute;
+}
+
+body[dir="ltr"] {
+ left: 4px;
+}
+
+body[dir="rtl"] {
+ right: 4px;
+}
+
+.loading > img {
+ display: block;
+ margin: 0 auto;
+}
+
+.no-items {
+ text-align: center;
+ -moz-margin-start: 0 !important;
+}
+
+#footer-wrapper {
+ font-size: 18px;
+ margin-top: 24px;
+ text-align: center;
+}
+
+#feedback {
+ display: inline-block;
+ margin: 0;
+}
+
+#support {
+ display: inline-block;
+ margin: 0;
+}
+
+@media (max-width: 399px) {
+ #support {
+ margin-top: 8px;
+ }
+}
+
+@media (min-width: 400px) {
+ body[dir="ltr"] #feedback {
+ border-radius: 8px 0 0 8px;
+ }
+
+ body[dir="rtl"] #feedback {
+ border-radius: 0 8px 8px 0;
+ }
+
+ #support {
+ -moz-border-start: none;
+ }
+
+ body[dir="ltr"] #support {
+ border-radius: 0 8px 8px 0;
+ }
+
+ body[dir="rtl"] #support {
+ border-radius: 8px 0 0 8px;
+ }
+}
+
+#promo {
+ font-weight: bold;
+ color: rgb(254,210,13);
+ background-color: black;
+ border-radius: 6px;
+ padding: 10px;
+ margin-top: 24px;
+ box-shadow: inset rgba(0, 0, 0, 0.2) 0 -3px 0px, rgba(0, 0, 0, 0.1) 0px 2px 0px;
+ display: none;
+}
+
+#promo-label {
+ padding-left: 16px;
+}
+
+#promo-button {
+ padding: 8px;
+ margin: 0;
+ color: black;
+ font-size: 18px;
+ -moz-padding-end: 20px;
+}
+
+body[dir="ltr"] #promo-button {
+ float: right;
+ background: rgb(254,210,13) url("images/arrowright-16.png") 99% center no-repeat;
+}
+
+body[dir="rtl"] #promo-button {
+ float: left;
+ background: rgb(254,210,13) url("images/arrowleft-16.png") 1% center no-repeat;
+}
+
+@media (max-width: 399px) {
+ #promo-button {
+ display: none;
+ }
+}
diff --git a/mobile/themes/core/aboutPage.css b/mobile/themes/core/aboutPage.css
new file mode 100644
index 000000000000..aacc3c48292a
--- /dev/null
+++ b/mobile/themes/core/aboutPage.css
@@ -0,0 +1,105 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Gavin Sharp
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#aboutLogoContainer {
+ width: 300px;
+}
+
+#version {
+ font-weight: bold;
+ color: #909090;
+ margin: -24px 20px 0 118px;
+}
+
+#update {
+ float: right;
+ padding: 8px;
+ margin-top: -32px;
+}
+
+body[dir="rtl"] #update {
+ float: left;
+}
+
+#update-message-checking,
+#update-message-none,
+#update-message-found {
+ display: none;
+ float: right;
+ padding: 8px;
+ margin-top: -32px;
+}
+
+body[dir="rtl"] #update-message-checking,
+body[dir="rtl"] #update-message-none,
+body[dir="rtl"] #update-message-found {
+ float: left;
+}
+
+#aboutLinks {
+ background-color: white;
+ padding: 5px;
+ border: 2px solid #e6e5e3;
+ font-size: 24px;
+}
+
+#aboutLinks > li {
+ clear: both;
+ border-bottom: 2px solid #e6e5e3;
+ list-style: none;
+ -moz-padding-end: 16px;
+}
+
+#aboutLinks > li:last-child {
+ border-bottom: 0;
+}
+
+#aboutLinks > li > a {
+ padding: 16px;
+ display: block;
+ color: #3a3834;
+ background: url("images/arrowright-16.png") right center no-repeat;
+}
+
+body[dir="rtl"] #aboutLinks > li > a {
+ background: url("images/arrowleft-16.png") left center no-repeat;
+}
+
+#aboutDetails {
+ margin-top: 15px;
+ font-size: 18px;
+}
diff --git a/mobile/themes/core/browser.css b/mobile/themes/core/browser.css
new file mode 100644
index 000000000000..57722569df41
--- /dev/null
+++ b/mobile/themes/core/browser.css
@@ -0,0 +1,1472 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Finkle
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+%filter substitution
+%include defines.inc
+
+/* main toolbar (URL bar) -------------------------------------------------- */
+#toolbar-main {
+ -moz-appearance: none;
+ -moz-box-align: center;
+ padding: 0;
+ border: none;
+ background: #5e6166;
+}
+
+#toolbar-moveable-container[top="0"] {
+ position: fixed;
+ left: 0;
+ z-index: 1000;
+}
+
+/* main toolbar buttons */
+toolbarbutton.urlbar-button {
+ /* space out the buttons a bit horizontally */
+ -moz-margin-start: @margin_normal@; /* core spacing */
+}
+
+%ifndef ANDROID
+/* MAEMO (and desktop) only */
+#tool-app-switch {
+ margin-top: -@margin_normal@; /* force the button to go to the edge */
+ -moz-margin-start: 0; /* force the button to go to the edge */
+ min-width: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ min-height: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ visibility: collapse;
+ -moz-margin-end: @margin_normal@; /* core spacing */
+ list-style-image: url("chrome://browser/skin/images/task-switch-hdpi.png");
+ background-color: transparent !important;
+ border: none !important;
+}
+
+#tool-app-switch:hover:active {
+ background-color: #8db8d8 !important;
+ -moz-border-radius-bottomright: @border_radius_small@;
+}
+
+#toolbar-main[fullscreen="true"] #tool-app-switch:not(:-moz-system-metric(maemo-classic)) {
+ visibility: visible;
+}
+
+/* MAEMO (and desktop) only */
+#tool-app-close {
+ margin-top: -@margin_normal@; /* force the button to go to the edge */
+ -moz-margin-end: 0 !important; /* force the button to go to the edge */
+ min-width: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ min-height: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ visibility: collapse;
+ list-style-image: url("chrome://browser/skin/images/task-close-hdpi.png");
+ background-color: transparent !important;
+ border: none !important;
+}
+
+#tool-app-close:hover:active {
+ background-color: #8db8d8 !important;
+}
+
+#tool-app-close:hover:active:-moz-locale-dir(ltr) {
+ -moz-border-radius-bottomleft: @border_radius_small@;
+}
+
+#tool-app-close:hover:active:-moz-locale-dir(rtl) {
+ -moz-border-radius-bottomright: @border_radius_small@;
+}
+
+%if MOZ_PLATFORM_MAEMO != 6
+#toolbar-main[fullscreen="true"] #tool-app-close {
+ visibility: visible;
+}
+%endif
+
+#toolbar-main[dialog="true"] #tool-app-close {
+ visibility: visible;
+ list-style-image: url("chrome://browser/skin/images/task-back-hdpi.png");
+}
+
+#toolbar-main[dialog="true"] #tool-app-close:-moz-locale-dir(rtl) {
+ list-style-image: url("chrome://browser/skin/images/task-back-rtl-hdpi.png");
+}
+%endif
+
+/* URL bar ----------------------------------------------------------------- */
+#urlbar-container {
+ color: #000;
+ border-radius: @border_radius_normal@;
+ margin: @margin_normal@;
+ background: white url("chrome://browser/skin/images/button-bg.png") bottom left repeat-x;
+}
+
+#urlbar-container[mode="edit"] > #identity-box {
+ visibility: collapse;
+}
+
+/* URL bar cap buttons */
+.urlbar-cap-button {
+ margin: 0 !important;
+ padding: 0 !important;
+ border: 0 solid transparent;
+ min-width: @touch_button_large@ !important;
+ max-width: @touch_button_large@ !important;
+ -moz-box-flex: 1;
+ -moz-box-align: center;
+ -moz-box-pack: center;
+ background: white url("chrome://browser/skin/images/endcap-default-bg.png") bottom repeat-x;
+}
+
+.urlbar-cap-button[open="true"],
+.urlbar-cap-button:not([disabled="true"]):hover:active {
+ background: #a5aab2 url("chrome://browser/skin/images/endcap-active-bg.png") bottom center;
+}
+
+/* left cap button --------------------------------------------------------- */
+#identity-box {
+ border-right: @border_width_tiny@ solid rgba(118,121,126,0.5) !important;
+}
+
+#identity-box:-moz-locale-dir(ltr) {
+ -moz-border-radius-topleft: @border_radius_normal@;
+ -moz-border-radius-bottomleft: @border_radius_normal@;
+}
+
+#identity-box:-moz-locale-dir(rtl) {
+ -moz-border-radius-topright: @border_radius_normal@;
+ -moz-border-radius-bottomright: @border_radius_normal@;
+}
+
+#identity-box[open="true"],
+#identity-box:hover:active {
+ border-right: @border_width_tiny@ solid rgba(0, 0, 0, 0.2);
+}
+
+/* add special color */
+#identity-box[mode="verifiedIdentity"] {
+ background-color: #89d715;
+ background-image: url("chrome://browser/skin/images/endcap-ev-default-bg.png");
+}
+
+#identity-box[mode="verifiedIdentity"][open="true"],
+#identity-box[mode="verifiedIdentity"]:hover:active {
+ background-image: url("chrome://browser/skin/images/endcap-ev-active-bg.png");
+}
+
+#identity-box[mode="verifiedDomain"] {
+ background-color: #6579e3;
+ background-image: url("chrome://browser/skin/images/endcap-ssl-default-bg.png");
+}
+
+#identity-box[mode="verifiedDomain"][open="true"],
+#identity-box[mode="verifiedDomain"]:hover:active {
+ background-image: url("chrome://browser/skin/images/endcap-ssl-active-bg.png");
+}
+
+#urlbar-throbber[loading] {
+ list-style-image: url("chrome://browser/skin/images/throbber.png");
+}
+
+#urlbar-favicon {
+ width: 32px;
+ height: 32px;
+}
+
+#urlbar-favicon[src=""] {
+ list-style-image: url("chrome://browser/skin/images/favicon-default-32.png");
+}
+
+/* Main urlbar textbox */
+#urlbar-title {
+ padding: @padding_xxxnormal@ @padding_normal@;
+}
+
+#urlbar-title.placeholder {
+ color: gray;
+}
+
+#urlbar-edit,
+#urlbar-title {
+ margin: 0 !important;
+ border-left: @border_width_tiny@ solid white;
+ border-right: @border_width_tiny@ solid white;
+ min-height: @touch_normal@;
+}
+
+#urlbar-edit,
+#urlbar-title:hover:active {
+ background: #f9f9f9 url("chrome://browser/skin/images/textbox-bg.png") top left repeat-x;
+}
+
+#urlbar-edit {
+ -moz-appearance: none !important;
+ border-radius: 0;
+ border: 0 solid transparent;
+ border-right: @border_width_tiny@ solid rgba(0,0,0,0.5);
+ padding: 0 !important;
+}
+
+#urlbar-edit:-moz-locale-dir(ltr) {
+ -moz-border-radius-topleft: @border_radius_normal@;
+ -moz-border-radius-bottomleft: @border_radius_normal@;
+}
+
+#urlbar-edit:-moz-locale-dir(rtl) {
+ -moz-border-radius-topright: @border_radius_normal@;
+ -moz-border-radius-bottomright: @border_radius_normal@;
+}
+
+#urlbar-edit > hbox > .textbox-input-box {
+ margin: 0;
+}
+
+:invalid {
+ box-shadow: none;
+}
+
+#urlbar-edit > hbox > hbox > .textbox-input {
+ min-height: @urlbar_edit_height@;
+ text-indent: @urlbar_edit_indent@;
+}
+
+/* Right cap button --------------------------------------------------------- */
+#urlbar-icons {
+ border-left: @border_width_tiny@ solid rgba(118,121,126,0.5) !important;
+}
+
+#urlbar-icons:-moz-locale-dir(ltr) {
+ -moz-border-radius-topright: @border_radius_normal@;
+ -moz-border-radius-bottomright: @border_radius_normal@;
+}
+
+#urlbar-icons:-moz-locale-dir(rtl) {
+ -moz-border-radius-topleft: @border_radius_normal@;
+ -moz-border-radius-bottomleft: @border_radius_normal@;
+}
+
+#urlbar-icons[disabled="true"] {
+ pointer-events: none;
+}
+
+#urlbar-icons[disabled="true"] > toolbarbutton {
+ opacity: 0.5;
+}
+
+#urlbar-icons:not([disabled="true"]):hover:active {
+ border-left: @border_width_tiny@ solid rgba(0, 0, 0, 0.2);
+}
+
+#tool-reload {
+ list-style-image: url("chrome://browser/skin/images/reload-hdpi.png");
+}
+
+#tool-stop {
+ list-style-image: url("chrome://browser/skin/images/stop-hdpi.png");
+}
+
+#tool-search {
+ list-style-image: url("chrome://browser/skin/images/navigation-magnifier-30.png");
+}
+
+#urlbar-icons[mode="loading"] > #tool-search,
+#urlbar-icons[mode="loading"] > #tool-reload {
+ visibility: collapse;
+}
+
+#urlbar-icons[mode="view"] > #tool-search,
+#urlbar-icons[mode="view"] > #tool-stop {
+ visibility: collapse;
+}
+
+#urlbar-icons[mode="edit"] > #tool-reload,
+#urlbar-icons[mode="edit"] > #tool-stop {
+ visibility: collapse;
+}
+
+/* right toolbar (browser controls) ---------------------------------------- */
+#browser-controls {
+ -moz-box-align: start;
+ padding: 0;
+ -moz-border-start: @border_width_large@ solid #262629;
+ min-width: @sidebar_width_minimum@ !important;
+ background: #5e6166;
+}
+
+toolbarbutton.button-control {
+ padding: 0 !important;
+ min-width: @sidebar_width_minimum@ !important;
+ border-top: @border_width_tiny@ solid rgba(255,255,255,0.2) !important;
+ border-bottom: @border_width_tiny@ solid rgba(0,0,0,0.2) !important;
+ background-color: transparent !important;
+ -moz-box-align: center;
+ -moz-box-pack: center;
+ height: @sidebar_button_height@;
+}
+
+toolbarbutton.button-control:last-child {
+ border-bottom: 0 solid rgba(0,0,0,0.2) !important;
+}
+
+toolbarbutton.button-control[disabled="true"] {
+ opacity: 0.5;
+}
+
+toolbarbutton.button-control:not([disabled="true"]):hover:active {
+ background-image: url("chrome://browser/skin/images/sidebarbutton-active-hdpi.png");
+ border-top: none;
+}
+
+#tool-star {
+ list-style-image: url("chrome://browser/skin/images/bookmark-default-hdpi.png");
+}
+
+#tool-star[starred="true"] {
+ list-style-image: url("chrome://browser/skin/images/bookmark-starred-hdpi.png");
+}
+
+#tool-back,
+#tool-forward:-moz-locale-dir(rtl) {
+ list-style-image: url("chrome://browser/skin/images/back-default-hdpi.png");
+}
+
+#tool-back:-moz-locale-dir(rtl),
+#tool-forward {
+ list-style-image: url("chrome://browser/skin/images/forward-default-hdpi.png");
+}
+
+#tool-panel-open {
+ list-style-image: url("chrome://browser/skin/images/settings-default-hdpi.png");
+}
+
+%ifndef ANDROID
+/* MAEMO (and desktop) only */
+.panel-close {
+ min-width: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ max-width: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ min-height: @touch_button_xlarge@ !important; /* 72, not 64 to make up for the negative margin */
+ list-style-image: url("chrome://browser/skin/images/task-back-hdpi.png");
+ background: transparent !important;
+ border: none !important;
+}
+
+.panel-close:hover:active {
+ background-color: #8db8d8 !important;
+}
+
+.panel-close:hover:active:-moz-locale-dir(ltr) {
+ -moz-border-radius-bottomleft: @border_radius_small@;
+}
+
+.panel-close:-moz-locale-dir(rtl) {
+ list-style-image: url("chrome://browser/skin/images/task-back-rtl-hdpi.png");
+}
+
+.panel-close:hover:active:-moz-locale-dir(rtl) {
+ -moz-border-radius-bottomright: @border_radius_small@;
+}
+%endif
+
+/* awesomescreen buttons --------------------------------------------------- */
+toolbarbutton.choice-all {
+ list-style-image: url(chrome://browser/skin/images/allpages-48.png);
+}
+
+toolbarbutton.choice-bookmarks {
+ list-style-image: url(chrome://browser/skin/images/bookmarks-48.png);
+}
+
+toolbarbutton.choice-history {
+ list-style-image: url(chrome://browser/skin/images/history-48.png);
+}
+
+toolbarbutton.choice-remotetabs {
+ list-style-image: url(chrome://browser/skin/images/remotetabs-48.png);
+}
+
+/* browsers ---------------------------------------------------------------- */
+.input-overlay:-moz-focusring {
+ outline: 0 !important;
+}
+
+/*
+ * These rules prevent browser to steal the focus while touching the screen
+ * to allow panning/zooming of the browser view without closing the VKB
+ */
+#browsers > notificationbox {
+ -moz-user-focus: ignore;
+}
+
+/* browser tools panel UI ------------------------------------------------ */
+.panel-header {
+ margin: 0;
+ padding: @padding_small@ @padding_normal@ @padding_normal@ @padding_normal@;
+ font-weight: bold;
+ color: white !important;
+ background-color: rgb(101, 121, 227) !important;
+}
+
+#tool-addons {
+ list-style-image: url("chrome://browser/skin/images/addons-default-hdpi.png");
+}
+
+#tool-downloads {
+ list-style-image: url("chrome://browser/skin/images/downloads-default-hdpi.png");
+}
+
+#tool-preferences {
+ list-style-image: url("chrome://browser/skin/images/preferences-default-hdpi.png");
+}
+
+#tool-console {
+ list-style-image: url("chrome://browser/skin/images/console-default-hdpi.png");
+}
+
+/* preferences panel UI -----------------------------------------------------*/
+#menulist-container[for="prefs-homepage-options"] .options-command.selected {
+ pointer-events: none;
+}
+
+/* bug 597296 - The language.properties file is LTR and never translated */
+#prefs-languages .menulist-label {
+ direction: ltr !important;
+}
+
+/* addons panel UI ------------------------------------------------------- */
+#addons-repo {
+ -moz-box-orient: horizontal;
+ -moz-box-align: center;
+}
+
+@media (@orientation@: portrait) {
+ #addons-repo {
+ -moz-box-orient: vertical;
+ -moz-box-pack: center;
+ }
+}
+
+.addon-image,
+.searchplugin-image {
+ list-style-image: url("chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png");
+ width: 32px;
+ height: 32px;
+ -moz-margin-start: @margin_normal@;
+ -moz-margin-end: @margin_normal@;
+}
+
+.addon-rating[rating] {
+ width: 78px;
+ height: 18px;
+ list-style-image: url("chrome://browser/skin/images/ratings-18.png");
+}
+
+.addon-rating[rating="0"] {
+ -moz-image-region: rect(0px 78px 18px 0px);
+}
+
+.addon-rating[rating="1"] {
+ -moz-image-region: rect(18px 78px 36px 0px);
+}
+
+.addon-rating[rating="2"] {
+ -moz-image-region: rect(36px 78px 54px 0px);
+}
+
+.addon-rating[rating="3"] {
+ -moz-image-region: rect(54px 78px 72px 0px);
+}
+
+.addon-rating[rating="4"] {
+ -moz-image-region: rect(72px 78px 90px 0px);
+}
+
+.addon-rating[rating="5"] {
+ -moz-image-region: rect(90px 78px 108px 0px);
+}
+
+.addon-showmore-image,
+.addon-banner-image {
+ width: 32px;
+ height: 32px;
+ list-style-image: url("chrome://browser/skin/images/addons-32.png");
+ -moz-margin-start: @margin_normal@;
+ -moz-margin-end: @margin_normal@;
+}
+
+richlistitem[isDisabled="true"] .title {
+ color: gray;
+}
+
+richlistitem[isDisabled="true"] .normal {
+ color: lightgray;
+}
+
+richlistitem[isDisabled="true"] image {
+ opacity: 0.25;
+}
+
+richlistitem[typeName="banner"],
+richlistitem[typeName="showmore"] {
+ background-color: rgb(255,255,255);
+ background: url(chrome://browser/skin/images/browseaddons-bg.jpg) repeat-x center top;
+}
+
+/* downloads panel UI ---------------------------------------------------- */
+.download-retry-failed {
+ color: red !important;
+ display: none;
+}
+
+.download-retry-failed[state="2"] {
+ display: -moz-box;
+}
+
+/* special "no downloads" items */
+#dl-empty-message {
+ margin-top: -moz-calc(2 * @touch_row@); /* 2 times row height */
+ font-style: italic;
+ border-bottom: none;
+}
+
+#dl-empty-message:active {
+ background-color: white;
+}
+
+#dl-empty-message > label {
+ text-align: center;
+ color: grey;
+}
+
+/* console panel UI ------------------------------------------------------ */
+#console-filter-warnings,
+#console-filter-messages {
+ visibility: visible;
+}
+
+@media (max-width: 499px) {
+ #console-filter-warnings,
+ #console-filter-messages {
+ visibility: collapse;
+ }
+}
+
+.console-error-msg,
+.console-msg-text {
+ white-space: pre-wrap;
+}
+
+/* folders navigation row */
+.place-list-parents placelabel {
+ visibility: collapse;
+}
+
+.place-list-parents placelabel:last-child:not(:only-child) {
+ visibility: visible;
+}
+
+/* be consistent with the size of placeitem */
+placelabel {
+ -moz-box-align: center;
+ -moz-padding-end: @placelabel_padding@;
+ background-image: url(images/arrowup-16.png), url("images/row-header-bg.png");
+ background-repeat: no-repeat, repeat-x;
+ background-position: 98% 50%, top left;
+ background-size: auto auto, auto 100%;
+ color: #000;
+ min-height: @touch_row@; /* row size */
+}
+
+placelabel:-moz-locale-dir(rtl) {
+ background-position: 2% 50%, top left;
+}
+
+placelabel:hover:active {
+ background-image: url(images/arrowup-16.png);
+ background-color: #8db8d8;
+}
+
+/* folder bookmarks row */
+placeitem[type="folder"] {
+ -moz-box-pack: center;
+ -moz-padding-end: @placeitem_padding@;
+ background-image: url(images/arrowright-16.png);
+ background-repeat: no-repeat;
+ background-position: 98% 50%;
+}
+
+placeitem[type="folder"]:-moz-locale-dir(rtl) {
+ background-image: url(images/arrowleft-16.png);
+ background-position: 2% 50%;
+}
+
+placelist[ui="manage"] placeitem[type="folder"] {
+ background-image: none;
+}
+
+placeitem[type="folder"] > .bookmark-item-container > image,
+placeitem[type="folder"] > .bookmark-manage > image {
+ list-style-image: url(images/folder-32.png);
+ margin-top: 0;
+}
+
+placeitem[type="folder"] .bookmark-item-url {
+ display: none;
+}
+
+/* bookmark manage controls */
+placeitem > .bookmark-manage .bookmark-controls {
+ padding-top: @padding_normal@;
+}
+
+/* bookmark popup for star button */
+placeitem[ui="manage"] {
+ border-bottom: 0;
+}
+
+placeitem[ui="manage"] > .bookmark-manage > image {
+ visibility: collapse;
+}
+
+/* autocomplete-items */
+.autocomplete-items {
+ background-color: white;
+}
+
+autocompleteresult,
+placeitem {
+ -moz-user-focus: ignore;
+ color: black;
+ background-color: white;
+ padding: @padding_xsmall@ @padding_small@;
+ border-bottom: @border_width_tiny@ solid rgb(207,207,207);
+ min-height: @touch_row@; /* row size */
+}
+
+#popup_autocomplete autocompleteresult:hover:active,
+placelist placeitem:hover:active:not([selected="true"]),
+historylist autocompleteresult:hover:active:not([selected="true"]):not([class="history-item-title"]),
+remotetabslist autocompleteresult:hover:active:not([selected="true"]):not([class="remotetabs-item-title"]),
+.autocompleteresult-selected {
+ background-color: #8db8d8;
+}
+
+.autocomplete-item-container,
+.bookmark-item-container {
+ margin: 0;
+ padding: 0;
+}
+
+.autocomplete-item-label,
+.bookmark-item-label {
+ font-size: @font_normal@ !important;
+ font-weight: normal;
+ -moz-margin-end: @margin_normal@;
+}
+
+.autocomplete-item-container > image,
+.bookmark-item-container > image,
+placeitem > .bookmark-manage > image {
+ width: 32px;
+ height: 32px;
+ max-height: 32px;
+ /* margin-top = (1 - title's line-height) * title's font-size */
+ margin-top: @autocomplete_item_container_image_padding@;
+ margin-bottom: 0;
+ -moz-margin-end: @margin_xxxnormal@;
+ -moz-margin-start: @margin_normal@;
+}
+
+.autocomplete-item-container > image[src=""],
+placeitem[src=""] .bookmark-item-container > image {
+ list-style-image: url("chrome://browser/skin/images/favicon-default-32.png");
+}
+
+.autocomplete-item-container > vbox > label,
+.bookmark-item-container > vbox > label {
+ -moz-margin-start: @margin_xtiny@;
+}
+
+.autocomplete-item-container[favorite="true"],
+.autocomplete-item-container[remote="true"],
+.autocomplete-item-container[search="true"] {
+ background-repeat: no-repeat;
+ background-position: 100% @autocomplete_item_container_position@;
+ background-size: @autocomplete_item_container_size@ @autocomplete_item_container_size@;
+}
+
+.autocomplete-item-container[favorite="true"] {
+ background-image: url("chrome://browser/skin/images/autocomplete-bookmarked-hdpi.png");
+}
+
+.autocomplete-item-container[remote="true"] {
+ background-image: url("chrome://browser/skin/images/autocomplete-desktop-hdpi.png");
+}
+
+.autocomplete-item-container[search="true"] {
+ background-image: url("chrome://browser/skin/images/autocomplete-search-hdpi.png");
+}
+
+.autocomplete-item-container[favorite="true"][remote="true"] {
+ background-image: url("chrome://browser/skin/images/autocomplete-bookmarked-hdpi.png"),
+ url("chrome://browser/skin/images/autocomplete-desktop-hdpi.png");
+ background-position: 100% @autocomplete_item_container_position@,
+ 94% @autocomplete_item_container_position@;
+ -moz-padding-end: @autocomplete_item_container_padding@;
+}
+
+.autocomplete-item-container[favorite="true"]:-moz-locale-dir(rtl),
+.autocomplete-item-container[remote="true"]:-moz-locale-dir(rtl) {
+ background-position: left @autocomplete_item_container_position@;
+}
+
+.autocomplete-item-container[favorite="true"][remote="true"]:-moz-locale-dir(rtl) {
+ background-position: left @autocomplete_item_container_position@,
+ 6% @autocomplete_item_container_position@;
+}
+
+.autocomplete-item-subtitle,
+.bookmark-item-url {
+ color: blue;
+ font-size: @font_small@ !important;
+ -moz-margin-end: @autocomplete_item_subtitle_margin@;
+}
+
+.autocomplete-item-container[favorite="true"] .autocomplete-item-label,
+.autocomplete-item-container[remote="true"] .autocomplete-item-label,
+.autocomplete-item-container[search="true"] .autocomplete-item-label {
+ -moz-padding-end: @autocomplete_item_label_margin@;
+}
+
+.autocomplete-item-container[search="true"] .autocomplete-item-subtitle {
+ color: black;
+ font-size: smaller;
+}
+
+.autocomplete-item-tags,
+.bookmark-item-tags {
+ content: attr(tags);
+ font-size: @font_small@ !important;
+ font-weight: lighter;
+ margin: @margin_tiny@ 0 @margin_small@ 0;
+ -moz-margin-start: @margin_normal@;
+ -moz-padding-end: @autocomplete_item_tags_margin@;
+}
+
+.autocomplete-item-tags[value=""] {
+ visibility: hidden;
+}
+
+.autocomplete-item-badge {
+ opacity: 1;
+ -moz-transition: opacity 1s ease;
+ background-color: #c90707;
+ border: @border_width_tiny@ solid #951919;
+ -moz-border-radius: @border_radius_tiny@;
+ content: attr(badge);
+ font-size: @font_xtiny@ !important;
+ font-weight: bolder;
+ margin: @margin_small@ 0 0 0;
+ padding: @padding_small@ @padding_snormal@;
+ color: white;
+}
+
+autocompleteresult:not([badge]) .autocomplete-item-badge,
+.autocomplete-item-badge[value=""] {
+ opacity: 0;
+ -moz-transition: none;
+}
+
+/* special "no results", "awesome header row" and "title rows" items */
+autocompleteresult[class="history-item-title"],
+autocompleteresult[class="remotetabs-item-title"],
+.settings-title {
+ min-height: 0;
+ color: black;
+ font-size: smaller;
+ font-weight: bold;
+ background-color: transparent;
+ margin: 0;
+ padding: @autocompleteresult_padding@ @padding_xnormal@;
+ background-image: url(images/row-header-bg.png);
+ background-repeat: repeat-x;
+ background-size: auto 100%;
+}
+
+autocompleteresult[class="history-item-title"] .autocomplete-item-label,
+autocompleteresult[class="remotetabs-item-title"] .autocomplete-item-label {
+ font-size: @font_small@ !important;
+ font-weight: bold !important;
+}
+
+autocompleteresult[class="history-item-title"] .autocomplete-item-subtitle,
+autocompleteresult[class="history-item-title"] .autocomplete-item-tags,
+autocompleteresult[class="history-item-title"] .autocomplete-item-badge,
+autocompleteresult[class="remotetabs-item-title"] .autocomplete-item-subtitle,
+autocompleteresult[class="remotetabs-item-title"] .autocomplete-item-tags,
+autocompleteresult[class="remotetabs-item-title"] .autocomplete-item-badge {
+ margin: 0;
+ padding: 0;
+}
+
+autocompleteresult[class="history-item-title"] .bookmark-item-subtitle,
+autocompleteresult[class="history-item-title"] .autocomplete-item-tags,
+autocompleteresult[class="history-item-title"] .autocomplete-item-badge,
+autocompleteresult[class="remotetabs-item-title"] .bookmark-item-subtitle,
+autocompleteresult[class="remotetabs-item-title"] .autocomplete-item-tags,
+autocompleteresult[class="remotetabs-item-title"] .autocomplete-item-badge {
+ display: none;
+}
+
+autocompleteresult[class="history-item-title"] .bookmark-item-container,
+autocompleteresult[class="remotetabs-item-title"] .bookmark-item-container {
+ font-size: @font_normal@ !important;
+}
+
+autocompleteresult[class="history-item-title"] image,
+autocompleteresult[class="remotetabs-item-title"] image {
+ display: none;
+}
+
+autocompleteresult.noresults {
+ font-style: italic;
+ border-bottom: none;
+}
+
+autocompleteresult.noresults:hover:active {
+ background-color: white !important;
+}
+
+autocompleteresult.noresults > .autocomplete-item-container {
+ text-align: center;
+ color: grey;
+}
+
+/* Left sidebar (tabs) ---------------------------------------------------- */
+#tabs-container {
+ -moz-border-end: @border_width_large@ solid #262629;
+ background: #5e6166;
+}
+
+#tabs:-moz-locale-dir(rtl) {
+ -moz-box-align: start;
+}
+
+#tabs > scrollbox {
+ max-width: 350px;
+}
+
+#tabs .tabs-list {
+ display: block;
+ -moz-column-width: 121px;
+ -moz-column-gap: 0;
+ -moz-user-focus: ignore;
+ padding: 0;
+ background-color: transparent;
+ margin: 0;
+ -moz-padding-end: @padding_normal@; /* core spacing */
+ -moz-padding-start: @padding_small@; /* allow the thumbnails to get close to the edge */
+}
+
+#tabs-controls {
+ margin-top: @margin_normal@; /* core spacing */
+ -moz-box-pack: center;
+}
+
+documenttab {
+ -moz-margin-start: @margin_xnormal@;
+ margin-bottom: @documenttab_margin_bottom@;
+ width: 121px;
+ padding: @padding_normal@;
+ padding-bottom: @padding_xnormal@;
+ background: url("chrome://browser/skin/images/tab-inactive-hdpi.png") bottom repeat-x;
+ border-radius: @border_radius_small@;
+ background-clip: padding-box;
+ border: @border_width_tiny@ solid rgba(0,0,0,0.1);
+ border-bottom-width: @border_width_small@;
+ line-height: 0;
+}
+
+documenttab[selected="true"] {
+ border-bottom-color: rgba(0,0,0,0.2);
+ background: url("chrome://browser/skin/images/tab-active-hdpi.png") bottom repeat-x;
+}
+
+.documenttab-thumbnail {
+ background-color: white;
+ opacity: 0.5;
+
+ /* if there is no border, blank thumbnail are invisible */
+ border: 1px solid white;
+ margin: -1px;
+}
+
+documenttab:hover:active > stack > .documenttab-thumbnail,
+documenttab[selected="true"] > stack > .documenttab-thumbnail {
+ opacity: 1.0;
+}
+
+.documenttab-close-container {
+ position: relative;
+ left: -16px;
+ -moz-margin-end: 49px;
+}
+
+.documenttab-close {
+ width: 40px;
+ height: 40px;
+ list-style-image: url("chrome://browser/skin/images/close-inactive-tab-hdpi.png");
+}
+
+documenttab[selected="true"] > stack > hbox > .documenttab-close {
+ list-style-image: url("chrome://browser/skin/images/close-default-hdpi.png");
+}
+
+.documenttab-close-container:hover:active > .documenttab-close {
+ list-style-image: url("chrome://browser/skin/images/close-active-hdpi.png");
+}
+
+documenttab:only-child > stack > hbox > .documenttab-close {
+ display: none;
+}
+
+documenttab[reload="true"] {
+ background: url("chrome://browser/skin/images/tab-closed-hdpi.png") bottom repeat-x;
+}
+
+.documenttab-reload {
+ background: url("chrome://browser/skin/images/tab-reopen-hdpi.png");
+ display: none;
+}
+
+documenttab[reload="true"] > stack > .documenttab-close-container {
+ display: none;
+}
+
+documenttab[reload="true"] > stack > .documenttab-reload {
+ display: -moz-box;
+}
+
+#newtab-button {
+ -moz-box-flex: 1;
+ list-style-image: url("images/newtab-default-hdpi.png");
+ height: @sidebar_button_height@;
+}
+
+/* bookmark editor ------------------------------------------------------- */
+#bookmark-container {
+ -moz-box-align: center;
+ -moz-box-pack: center;
+ background-color: rgba(0,0,0,.6);
+ padding: 0;
+}
+
+#bookmark-dialog {
+ margin: @margin_xxxnormal@ !important;
+ border: @border_width_small@ solid white;
+ border-radius: @border_radius_normal@;
+ box-shadow: black 0 @shadow_width_small@ @shadow_width_small@;
+}
+
+#bookmark-form {
+ padding: @padding_xxxnormal@;
+}
+
+#bookmark-form-title {
+ font-size: @font_xnormal@;
+ padding-top: @padding_large@;
+ -moz-box-align: center;
+ -moz-box-pack: center;
+}
+
+#bookmark-form-line {
+ border-bottom: @border_width_small@ solid white;
+ margin: @margin_small@ 3em 0 3em;
+ height: @padding_normal@ !important;
+}
+
+#bookmark-form .bookmark-controls {
+ display: none;
+}
+
+#bookmark-form-buttons {
+ background-color: lightgray;
+}
+
+/* Identity popup -------------------------------------------------------- */
+#identity-popup-container {
+ padding: @padding_normal@; /* core spacing */
+ padding-bottom: @padding_xxxnormal@;
+}
+
+/* Popup Icons */
+#identity-popup-icon {
+ padding: 0;
+ list-style-image: url("chrome://browser/skin/images/identity-default-hdpi.png");
+}
+
+#identity-container[mode="verifiedIdentity"] > hbox > #identity-popup-icon {
+ list-style-image: url("chrome://browser/skin/images/identity-ev-hdpi.png");
+}
+
+#identity-container[mode="verifiedDomain"] > hbox > #identity-popup-icon {
+ list-style-image: url("chrome://browser/skin/images/identity-ssl-hdpi.png");
+}
+
+/* Popup Body Text */
+#identity-popup-content-box {
+ -moz-padding-start: @padding_normal@; /* core spacing */
+ font-size: @font_small@ !important;
+ white-space: pre-wrap;
+}
+
+/* let the text flow into a second row, if needed */
+#identity-popup-runBy-box {
+ display: block;
+}
+
+#identity-popup-content-box.unknownIdentity > hbox > #identity-popup-connectedToLabel,
+#identity-popup-content-box.unknownIdentity > hbox > #identity-popup-runByLabel,
+#identity-popup-content-box.unknownIdentity > hbox > #identity-popup-content-host,
+#identity-popup-content-box.unknownIdentity > hbox > #identity-popup-content-owner,
+#identity-popup-content-box.verifiedIdentity > hbox > #identity-popup-connectedToLabel2,
+#identity-popup-content-box.verifiedDomain > hbox > #identity-popup-connectedToLabel2 {
+ display: none;
+}
+
+#identity-popup-encryption-label,
+#identity-popup-content-verifier {
+ font-size: @font_tiny@ !important;
+}
+
+#identity-popup-content-host,
+#identity-popup-content-owner {
+ font-weight: bold;
+}
+
+#identity-popup-encryption-icon {
+ list-style-image: url("chrome://browser/skin/images/unlocked-hdpi.png");
+}
+
+#identity-container[mode="verifiedIdentity"] > hbox > vbox > #identity-popup-encryption-icon ,
+#identity-container[mode="verifiedDomain"] > hbox > vbox > #identity-popup-encryption-icon {
+ list-style-image: url("chrome://browser/skin/images/locked-hdpi.png");
+}
+
+/* Page Actions, Prompt, and Context Menu popups --------------------------- */
+.prompt-buttons,
+#context-commands,
+#pageactions-container {
+ background: transparent;
+ border-top: @border_width_tiny@ solid rgb(205,205,205);
+ padding: 0;
+ -moz-user-focus: ignore;
+ display: inline-block;
+}
+
+.prompt-button,
+.context-command,
+pageaction {
+ -moz-border-top-colors: white;
+ -moz-border-right-colors: rgb(175,175,175);
+ -moz-border-bottom-colors: rgb(175,175,175);
+ -moz-border-left-colors: white;
+ border-style: solid;
+ border-width: @border_width_tiny@ !important;
+ height: @touch_button_large@;
+ min-height: @touch_button_large@;
+ width: 100%;
+ min-width: @touch_action_minwidth@; /* keep the button from being too narrow */
+}
+
+/* Override richlistbox and richlistitem styles */
+#context-commands > scrollbox {
+ width: 100%;
+}
+
+.prompt-button,
+.context-command {
+ -moz-box-align: center;
+}
+
+.prompt-button[disabled="true"],
+.context-command[disabled="true"] {
+ pointer-events: none;
+ color: #aaa !important;
+}
+
+.prompt-button[selected="true"],
+.context-command[selected="true"] {
+ background: transparent;
+}
+
+/* Override button styles */
+.prompt-button {
+ margin: 0;
+ -moz-border-image: none !important;
+ border-radius: 0;
+ margin: 0;
+ background: transparent;
+}
+
+.prompt-button > .button-box {
+ padding: 0 @padding_small@ @padding_tiny@ @padding_xsmall@ !important;
+}
+
+.prompt-button > .button-box > .button-icon {
+ -moz-margin-end: @margin_normal@;
+}
+
+@media (min-width: 500px) {
+ .prompt-button,
+ pageaction {
+ width: 50%;
+ }
+
+ .prompt-button:last-child:nth-child(odd),
+ pageaction.odd-last-child {
+ width: 100%;
+ }
+}
+
+.prompt-button:not([disabled]):hover:active,
+.context-command:not([disabled]):hover:active,
+pageaction:not([disabled]):hover:active {
+ background: url("chrome://browser/skin/images/popup-selected-item-hdpi.png") repeat-x !important;
+ background-origin: border-box !important;
+ background-clip: border-box !important;
+ -moz-border-top-colors: transparent;
+ -moz-border-left-colors: transparent;
+}
+
+pageaction > hbox > .pageaction-image {
+ width: 32px;
+ height: 32px;
+ -moz-margin-end: @margin_normal@;
+}
+
+pageaction:not([image]) > hbox >.pageaction-image {
+ width: 0;
+}
+
+.prompt-button,
+.context-command,
+.pageaction-title {
+ font-size: @font_normal@ !important;
+ color: #414141 !important;
+}
+
+.pageaction-desc {
+ font-size: @font_tiny@ !important;
+ color: #414141;
+}
+
+.pageaction-desc[value=""] {
+ display: none;
+}
+
+#share-title,
+#context-hint {
+ font-size: @font_small@;
+ padding: @padding_small@;
+}
+
+#context-hint[value=""] {
+ visibility: collapse;
+}
+
+#search-engines-list > .prompt-button > .button-box > .button-text {
+ text-align: start;
+ -moz-box-flex: 1; /* Needed for the crop attribute to have an effect */
+}
+
+#search-engines-list > .prompt-button > .button-box > .button-icon {
+ width: 32px;
+ height: 32px;
+}
+
+/* Preferences window ---------------------------------------------------- */
+.setting {
+ padding-left: @padding_xnormal@;
+ border-bottom: @border_width_tiny@ solid #cacdd5;
+}
+
+/* XXX should be a richlistitem */
+.prefbox {
+ padding: @padding_xsmall@;
+ border-bottom: @border_width_tiny@ solid rgb(207,207,207);
+ min-height: @touch_row@; /* row size */
+ -moz-box-align: center;
+}
+
+.setting-group > .prefbox {
+ border-bottom: none;
+}
+
+.setting-subgroup > .prefbox {
+ border-bottom: none;
+ -moz-margin-start: @margin_xxxnormal@;
+}
+
+.setting-subgroup + :not(.setting-subgroup) > .prefbox {
+ border-top: @border_width_tiny@ solid rgb(207,207,207);
+}
+
+/* Put setting textboxes on a separate row in portrait */
+@media (@orientation@: portrait) {
+ .setting-integer,
+ .setting-string {
+ -moz-box-align: start;
+ -moz-box-orient: vertical;
+ }
+
+ .setting-integer > .setting-input > textbox,
+ .setting-string > .setting-input > textbox {
+ width: 499px; /* textboxes seem to need a width in order to flex */
+ -moz-box-flex: 1;
+ }
+}
+
+.options-box {
+ -moz-margin-start: 28px; /* sized based on the 32px addon image */
+}
+
+.options-box > setting:last-child > .prefbox {
+ border-bottom: 0;
+}
+
+/* XXX should be a richlistitem description.title */
+.preftitle {
+ font-size: @font_normal@ !important;
+}
+
+/* XXX should be a richlistitem description.normal */
+.prefdesc {
+ font-size: @font_small@ !important;
+ color: grey;
+}
+
+/* alerts popup ----------------------------------------------------------- */
+#alerts-container {
+ color: white;
+ background-color: #5e6166;
+ border: @border_width_small@ solid #767973;
+ border-radius: @border_radius_normal@;
+ box-shadow: black 0 @border_radius_tiny@ @border_radius_tiny@;
+ padding: @padding_normal@; /* core spacing on top/bottom */
+ margin-bottom: @margin_large@;
+ -moz-transition-property: opacity;
+ -moz-transition-duration: 0.5s;
+ opacity: 0;
+}
+
+#alerts-container.showing {
+ opacity: 1;
+}
+
+#alerts-title {
+ font-size: @font_small@ !important;
+}
+
+#alerts-text {
+ font-size: @font_xsmall@ !important;
+ white-space: pre;
+}
+
+%ifndef ANDROID
+#alerts-container {
+ -moz-margin-end: @margin_large@;
+}
+%endif
+
+/* helperapp (save-as) popup ----------------------------------------------- */
+#helperapp-target {
+ font-size: @font_small@ !important;
+}
+
+/* full-screen video ------------------------------------------------------- */
+.full-screen {
+ position: absolute;
+ z-index: 500;
+}
+
+/* Android menu ------------------------------------------------------------ */
+#appmenu {
+ background: rgba(255,255,255,0.95);
+ box-shadow: 0 @shadow_width_large@ @shadow_width_xlarge@ @shadow_width_large@ black;
+ border-style: solid;
+ border-color: #6d6d6d;
+ border-width: @border_width_large@ @border_width_large@ 0 @border_width_large@;
+}
+
+.appmenu-button {
+ -moz-box-flex: 1;
+ -moz-box-orient: vertical;
+ border-style: solid;
+ border-color: #d8d8d8 !important;
+ border-width: 0 @border_width_tiny@ @border_width_tiny@ 0;
+ height: @appmenu_button_height@;
+ width: 0;
+}
+
+.appmenu-button:hover:active {
+ background-image: url("chrome://browser/skin/images/appmenu-active-hdpi.png");
+ background-size: 100% 100%;
+}
+
+#appmenu > .appmenu-button .toolbarbutton-text {
+ display: block !important;
+ font-size: @font_snormal@ !important;
+}
+
+#appmenu > .appmenu-button .toolbarbutton-icon {
+ margin-top: @margin_normal@ !important;
+ margin-bottom: @margin_small@ !important;
+}
+
+@media (@orientation@: portrait) {
+ #appmenu:not([hidden])[count="4"],
+ #appmenu:not([hidden])[count="5"],
+ #appmenu:not([hidden])[count="6"] {
+ height: @appmenu_portrait_height@;
+ display: inline-block;
+ }
+
+ #appmenu[count="4"] > .appmenu-button,
+ #appmenu[count="5"] > .appmenu-button {
+ width: 50%;
+ }
+
+ #appmenu[count="5"] > .appmenu-button:nth-child(3),
+ #appmenu[count="5"] > .appmenu-button:nth-child(4),
+ #appmenu[count="5"] > .appmenu-button:nth-child(5),
+ #appmenu[count="6"] > .appmenu-button {
+ width: 33.33%;
+ }
+}
+
+/* Sync setup ------------------------------------------------------------- */
+#syncsetup-container {
+ background-color: rgba(0,0,0,.6);
+ padding: 0;
+}
+
+#syncsetup-dialog {
+ margin: @margin_xxxnormal@ !important;
+ border: @border_width_large@ solid white;
+ border-radius: @border_radius_normal@;
+ box-shadow: black 0 @shadow_width_small@ @shadow_width_small@;
+}
+
+.syncsetup-scrollbox {
+ padding: @padding_xxxnormal@;
+}
+
+.syncsetup-center {
+ text-align: center;
+}
+
+.syncsetup-title {
+ font-size: @font_xnormal@;
+ padding-top: @padding_large@;
+ -moz-box-align: center;
+ -moz-box-pack: center;
+}
+
+.syncsetup-line {
+ border-bottom: @border_width_small@ solid white;
+ margin: @margin_small@ 3em 0 3em;
+ height: @padding_normal@ !important;
+}
+
+.syncsetup-desc {
+ font-size: @font_snormal@;
+}
+
+.syncsetup-buttons {
+ background-color: lightgray;
+}
+
+.syncsetup-code {
+ color: #000;
+ background-color: #fff;
+ border-radius: @border_radius_normal@;
+ font-size: @font_xlarge@ !important;
+ padding: 0.2em 0.4em;
+ -moz-padding-end: 0.2em;
+ letter-spacing: 0.2em;
+ text-align: center;
+ min-width: 5.5em;
+}
+
+.syncsetup-link {
+ text-decoration: underline;
+}
+
+.syncsetup-label {
+ color: #fff;
+}
+
+.syncsetup-edit {
+ margin-bottom: @margin_xnormal@;
+}
+
+#syncsetup-customserver {
+ -moz-margin-start: @margin_xnormal@;
+}
+
+/* content scrollbars */
+.scroller {
+ opacity: 0;
+ background-color: rgba(0, 0, 0, 0.4) !important;
+ -moz-border-top-colors: none !important;
+ -moz-border-bottom-colors: none !important;
+ -moz-border-right-colors: none !important;
+ -moz-border-left-colors: none !important;
+ -moz-border-radius: @border_radius_tiny@;
+ border: @border_width_tiny@ solid rgba(255, 255, 255, 0.4) !important;
+}
+
+.scroller[panning="true"] {
+ opacity: 1;
+}
+
+.scroller[orient="vertical"] {
+ min-width: @scroller_thickness@;
+ width: @scroller_thickness@;
+ min-height: @scroller_minimum@;
+}
+
+.scroller[orient="horizontal"] {
+ min-height: @scroller_thickness@;
+ height: @scroller_thickness@;
+ min-width: @scroller_minimum@;
+}
diff --git a/mobile/themes/core/config.css b/mobile/themes/core/config.css
new file mode 100644
index 000000000000..e7cf2df0f603
--- /dev/null
+++ b/mobile/themes/core/config.css
@@ -0,0 +1,120 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+@media (max-width: 499px) {
+ #editor-container > hbox {
+ -moz-box-orient: vertical;
+ }
+}
+
+richlistitem {
+ -moz-box-align: center;
+}
+
+richlistitem .preftitle {
+ pointer-events: none;
+ min-width: 200px;
+ -moz-box-flex: 1;
+ margin-right: 8px;
+}
+
+/* XXX look + sync */
+richlistitem[default="false"] .preftitle {
+ font-weight: bold;
+}
+
+richlistitem .prefvalue {
+ min-width: 200px;
+ pointer-events: none;
+ -moz-box-flex: 4;
+ text-align: right;
+ color: grey;
+}
+
+/* Editor */
+#editor-row {
+ padding: 0;
+ background: #E9E9E9;
+}
+
+#editor {
+ border-bottom: 1px solid rgb(207,207,207);
+}
+
+#editor > hbox > #editor-name,
+#editor > hbox > #editor-cancel,
+#editor > hbox > #editor-done {
+ display: none;
+}
+
+#editor-container > #editor > hbox > #editor-name,
+#editor-container > #editor > hbox > #editor-cancel,
+#editor-container > #editor > hbox > #editor-done {
+ display: -moz-box;
+}
+
+#editor-container > #editor > hbox > #editor-reset {
+ display: none;
+}
+
+#editor-container > hbox > label {
+ pointer-events: none;
+}
+
+#editor + richlistitem {
+ display: none;
+}
+
+#editor[default="false"] .preftitle {
+ font-weight: bold;
+}
+
+#editor-setting .prefbox {
+ border-color: transparent !important;
+}
+
+#editor-setting[type="string"] .setting-input {
+ -moz-box-flex: 4;
+}
+
+#editor-setting[type="string"] .setting-input > textbox {
+ -moz-box-flex: 1;
+}
+
+#editor-buttons {
+ margin: 2px;
+}
+
diff --git a/mobile/themes/core/defines.inc b/mobile/themes/core/defines.inc
new file mode 100644
index 000000000000..7f07417856c5
--- /dev/null
+++ b/mobile/themes/core/defines.inc
@@ -0,0 +1,175 @@
+%filter substitution
+
+%ifdef ANDROID
+%define font_xlarge 5.08mozmm
+%define font_xnormal 2.75mozmm
+%define font_normal 2.54mozmm
+%define font_snormal 2.33mozmm
+%define font_small 1.91mozmm
+%define font_xsmall 1.69mozmm
+%define font_tiny 1.48mozmm
+%define font_xtiny 1.27mozmm
+
+%define touch_row 7.41mozmm
+%define touch_button_xlarge 7.62mozmm
+%define touch_button_large 6.77mozmm
+%define touch_button_small 5.93mozmm
+%define touch_action_minwidth 21.17mozmm
+%define touch_normal 6.77mozmm
+
+%define margin_large 2.54mozmm
+%define margin_xxxnormal 1.69mozmm
+%define margin_xnormal 1.06mozmm
+%define margin_normal 0.85mozmm
+%define margin_snormal 0.64mozmm
+%define margin_small 0.42mozmm
+%define margin_tiny 0.21mozmm
+%define margin_xtiny 0.11mozmm
+
+%define padding_xlarge 3.39mozmm
+%define padding_large 2.54mozmm
+%define padding_xxxnormal 1.69mozmm
+%define padding_xxnormal 1.27mozmm
+%define padding_xnormal 1.06mozmm
+%define padding_normal 0.85mozmm
+%define padding_snormal 0.64mozmm
+%define padding_small 0.42mozmm
+%define padding_xsmall 0.21mozmm
+%define padding_tiny 0.11mozmm
+
+%define border_width_xlarge 0.42mozmm
+%define border_width_large 0.32mozmm
+%define border_width_small 0.21mozmm
+%define border_width_tiny 0.11mozmm
+
+%define border_radius_normal 0.85mozmm
+%define border_radius_small 0.64mozmm
+%define border_radius_tiny 0.21mozmm
+
+%define shadow_width_xlarge 1.06mozmm
+%define shadow_width_large 0.64mozmm
+%define shadow_width_small 0.21mozmm
+
+%define textbox_height 5.08mozmm
+
+%define dropmarker_padding 0.53mozmm
+
+%define progressmeter_height 3.39mozmm
+
+%define urlbar_edit_height 6.35mozmm
+%define urlbar_edit_indent 0.85mozmm
+
+%define scroller_thickness 0.64mozmm
+%define scroller_minimum 1.27mozmm
+
+%define sidebar_width_minimum 8.47mozmm
+%define sidebar_button_height 7.41mozmm
+%define documenttab_margin_bottom 0.53mozmm
+
+%define placelabel_padding 8.47mozmm
+%define placeitem_padding 4.23mozmm
+
+%define autocomplete_item_container_image_padding 0.53mozmm
+%define autocomplete_item_container_position 0.21mozmm
+%define autocomplete_item_container_size 2.75mozmm
+%define autocomplete_item_container_padding 5.08mozmm
+
+%define autocomplete_item_subtitle_margin 2.75mozmm
+%define autocomplete_item_label_margin 3.18mozmm
+%define autocomplete_item_tags_margin 3.39mozmm
+
+%define autocompleteresult_padding 0.53mozmm
+
+%define appmenu_portrait_height 21.17mozmm
+%define appmenu_button_height 10.48mozmm
+%else
+%define font_xlarge 48px
+%define font_xnormal 26px
+%define font_normal 24px
+%define font_snormal 22px
+%define font_small 18px
+%define font_xsmall 16px
+%define font_tiny 14px
+%define font_xtiny 12px
+
+%define touch_row 70px
+%define touch_button_xlarge 72px
+%define touch_button_large 64px
+%define touch_button_small 56px
+%define touch_action_minwidth 200px
+%define touch_normal 64px
+
+%define margin_large 24px
+%define margin_xxxnormal 16px
+%define margin_xnormal 10px
+%define margin_normal 8px
+%define margin_snormal 6px
+%define margin_small 4px
+%define margin_tiny 2px
+%define margin_xtiny 1px
+
+%define padding_xlarge 32px
+%define padding_large 24px
+%define padding_xxxnormal 16px
+%define padding_xxnormal 12px
+%define padding_xnormal 10px
+%define padding_normal 8px
+%define padding_snormal 6px
+%define padding_small 4px
+%define padding_xsmall 2px
+%define padding_tiny 1px
+
+%define border_width_xlarge 4px
+%define border_width_large 3px
+%define border_width_small 2px
+%define border_width_tiny 1px
+
+%define border_radius_normal 8px
+%define border_radius_small 6px
+%define border_radius_tiny 2px
+
+%define shadow_width_xlarge 10px
+%define shadow_width_large 6px
+%define shadow_width_small 2px
+
+%define textbox_height 48px
+
+%define dropmarker_margin 5px
+
+%define progressmeter_height 32px
+
+%define urlbar_edit_height 60px
+%define urlbar_edit_indent 8px
+
+%define scroller_thickness 6px
+%define scroller_minimum 12px
+
+%define sidebar_width_minimum 80px
+%define sidebar_button_height 70px
+%define documenttab_margin_bottom 5px
+
+%define placelabel_padding 80px
+%define placeitem_padding 40px
+
+%define autocomplete_item_container_image_padding 5px
+%define autocomplete_item_container_position 2px
+%define autocomplete_item_container_size 26px
+%define autocomplete_item_container_padding 48px
+
+%define autocomplete_item_subtitle_margin 26px
+%define autocomplete_item_label_margin 30px
+%define autocomplete_item_tags_margin 32px
+
+%define autocompleteresult_padding 5px
+
+%define appmenu_portrait_height 200px
+%define appmenu_button_height 99px
+%endif
+
+%ifdef MOZ_PLATFORM_MAEMO
+%define orientation -moz-device-orientation
+%elifdef ANDROID
+%define orientation -moz-device-orientation
+%else
+%define orientation orientation
+%endif
diff --git a/mobile/themes/core/firstRun.css b/mobile/themes/core/firstRun.css
new file mode 100644
index 000000000000..c713e7448410
--- /dev/null
+++ b/mobile/themes/core/firstRun.css
@@ -0,0 +1,243 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Gavin Sharp
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+html {
+ font-family: "Nokia Sans", Tahoma, sans-serif !important;
+ background: #fff;
+}
+
+body {
+ font-size: 16px;
+ color: #444;
+ border-top: 4px solid #1e4262;
+ margin: 0;
+}
+
+h1 {
+ font-size: 19px;
+ margin: 0 0 10px;
+}
+
+a {
+ color: #0489b7;
+ text-decoration: none;
+}
+
+img {
+ border: none;
+}
+
+#wrapper {
+ width: 96%;
+ max-width: 600px;
+ margin: 0 auto;
+}
+
+#header {
+ text-align: right;
+ height: 30px;
+ padding: 0;
+ margin: 0 8px 20px;
+}
+
+#header a {
+ display: inline-block;
+ padding: 4px 6px 2px 6px;
+ background: #1e4262;
+ -moz-border-radius-bottomright: 4px;
+ -moz-border-radius-bottomleft: 4px;
+}
+
+#head, #content, #footer {
+ margin: 0 8px;
+ clear: both;
+}
+
+#head p {
+ font-size: xx-large;
+}
+
+#footer {
+ border-top: 2px solid #e7e7e7;
+ padding: 10px;
+ color: #999;
+ margin-top: 10px;
+}
+
+#footer ul {
+ margin: 0;
+ padding: 0;
+ float: left;
+}
+
+#footer .nav li {
+ list-style: none;
+ float: left;
+ margin: 0 1em 0 0;
+ padding-right: 1em;
+ border-right: 1px solid #e7e7e7;
+}
+
+#footer .nav li:last-child {
+ border: 0;
+}
+
+#footer #follow {
+ float: right;
+ padding-bottom: 10px
+}
+
+#footer #follow p {
+ display: inline;
+}
+
+#footer #follow ul {
+ display: inline;
+ float: none;
+}
+
+#footer #follow ul li {
+ display: inline;
+ list-style-type: none;
+ margin-left: 10px;
+}
+
+#footer #follow img {
+ vertical-align: top;
+}
+
+#firstrun #header {
+ margin-bottom: 0;
+}
+
+#firstrun #head h1 {
+ float: left;
+ margin: 0;
+}
+
+#firstrun #head p {
+ margin: 0 0 10px 245px;
+ padding-top: 18px;
+}
+
+#firstrun ul#recommended {
+ margin: 0;
+ padding: 0;
+}
+
+#firstrun ul#recommended li {
+ float: left;
+ width: 32%;
+ list-style-type: none;
+ margin-right: 2%;
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+#firstrun ul#recommended li:last-child {
+ margin-right: 0;
+}
+
+#firstrun ul#recommended li a {
+ display: block;
+ padding: 20px 0;
+ -moz-border-radius: 10px;
+ background: #d8ecf1;
+}
+
+#firstrun ul#recommended li a:active {
+ text-decoration: none;
+ background: #b5d7e0;
+ outline: none;
+}
+
+#firstrun ul#recommended li b {
+ display: block;
+ padding: 90px 10px 0 10px;
+ background-repeat: no-repeat;
+ background-image: url("chrome://browser/content/firstrun/features.png");
+}
+
+#firstrun ul#recommended li span {
+ display: block;
+ padding: 0 10px;
+ min-height: 150px;
+}
+
+@media (max-width: 499px) {
+ #firstrun ul#recommended li span {
+ min-height: 180px;
+ }
+}
+
+#firstrun ul#recommended li#sync b {
+ background-position: 50% 0;
+}
+
+#firstrun ul#recommended li#addons b {
+ background-position: 50% -150px;
+}
+
+#firstrun ul#recommended li#home b {
+ background-position: 50% -280px;
+}
+
+#firstrun #features {
+ clear: both;
+ text-align: center;
+}
+
+#firstrun #features a {
+ display: inline-block;
+ font-size: 16px;
+}
+
+#firstrun #features a span {
+ vertical-align: 35%;
+}
+
+#firstrun #features a #nav-arrow {
+ -moz-margin-start: 5px;
+}
+
+#firstrun[dir="rtl"] #features a #nav-arrow {
+ -moz-transform: scaleX(-1);
+}
+
+#firstrun #demo {
+ text-align: center;
+}
diff --git a/mobile/themes/core/forms.css b/mobile/themes/core/forms.css
new file mode 100644
index 000000000000..157ac8fa298f
--- /dev/null
+++ b/mobile/themes/core/forms.css
@@ -0,0 +1,254 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Finkle
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+%filter substitution
+%include defines.inc
+
+/* Content Navigator popup ------------------------------------------------- */
+#content-navigator {
+ display: none;
+ pointer-events: none;
+ padding: 0;
+ background-color: transparent !important;
+}
+
+#content-navigator[type="find"],
+#content-navigator[type="form"]:not([disabled="true"]) {
+ display: -moz-box;
+}
+
+#content-navigator > .previous-button,
+#content-navigator > .next-button {
+ border: @border_width_tiny@ solid rgba(0,0,0,0.2) !important;
+ border-bottom: @border_width_large@ solid #53565a !important;
+ background-color: #5e6166;
+ background-image: none !important;
+ box-shadow: black 0 @border_radius_tiny@ @border_radius_tiny@;
+ pointer-events: auto;
+ -moz-user-focus: ignore !important;
+}
+
+#content-navigator > .previous-button[disabled="true"] {
+ list-style-image: url("chrome://browser/skin/images/previous-disabled-hdpi.png");
+}
+
+#content-navigator > .next-button[disabled="true"] {
+ list-style-image: url("chrome://browser/skin/images/next-disabled-hdpi.png");
+}
+
+#content-navigator > .previous-button {
+ -moz-margin-end: 0;
+ -moz-border-end: @border_width_tiny@ solid rgba(0,0,0,0.2) !important;
+ list-style-image: url("chrome://browser/skin/images/previous-hdpi.png");
+}
+
+#content-navigator:-moz-locale-dir(ltr) > .previous-button {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+#content-navigator:-moz-locale-dir(rtl) > .previous-button {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+#content-navigator > .next-button {
+ -moz-margin-start: 0;
+ -moz-border-start: @border_width_tiny@ solid rgba(255,255,255,0.2) !important;
+ list-style-image: url("chrome://browser/skin/images/next-hdpi.png");
+}
+
+#content-navigator:-moz-locale-dir(ltr) > .next-button {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+#content-navigator:-moz-locale-dir(rtl) > .next-button {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+/* Find Helper ------------------------------------------------------------- */
+#content-navigator[type="find"] > .previous-button {
+ /* previous button overlap the textbox */
+ -moz-margin-start: -@margin_normal@;
+}
+
+#content-navigator:not([type="find"]) > #find-helper-textbox {
+ display: none;
+}
+
+#find-helper-textbox {
+ pointer-events: auto;
+ margin: @margin_normal@;
+ -moz-margin-end: 0;
+ padding: @padding_xnormal@;
+ border-radius: @border_radius_normal@;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border: @border_width_tiny@ solid rgba(0,0,0,0.2) !important;
+ width: 10em;
+}
+
+#find-helper-textbox[status="1"] { /* Ci.nsITypeAheadFind.FIND_NOTFOUND */
+ background: rgb(255,200,200);
+}
+
+#find-helper-textbox:hover:active {
+ background: #8db8d8;
+}
+
+/* Form Helper Autofill ---------------------------------------------------- */
+#form-helper-suggestions-container .panel-arrowcontent {
+ border-radius: @border_radius_normal@;
+ padding: 0; /* half core spacing & none (autorepeat arrows compensate) */
+ background-color: rgb(235,235,235);
+ background-image: url("chrome://browser/skin/images/button-bg.png");
+}
+
+#form-helper-suggestions {
+ margin: 0;
+ color: black;
+ max-width: 0;
+}
+
+#form-helper-suggestions > .autorepeatbutton-down,
+#form-helper-suggestions > .autorepeatbutton-up {
+ border: none;
+}
+
+#form-helper-suggestions > .autorepeatbutton-down {
+ list-style-image: url("chrome://browser/skin/images/arrowright-16.png");
+}
+
+#form-helper-suggestions > .autorepeatbutton-down:-moz-locale-dir(rtl) {
+ list-style-image: url("chrome://browser/skin/images/arrowleft-16.png");
+}
+
+#form-helper-suggestions > .autorepeatbutton-up {
+ list-style-image: url("chrome://browser/skin/images/arrowleft-16.png");
+}
+
+#form-helper-suggestions > .autorepeatbutton-up:-moz-locale-dir(rtl) {
+ list-style-image: url("chrome://browser/skin/images/arrowright-16.png");
+}
+
+/* force the autorepeat buttons to create a 'padding' when collapsed */
+#form-helper-suggestions > autorepeatbutton[collapsed="true"],
+#form-helper-suggestions > autorepeatbutton[disabled="true"] {
+ visibility: hidden;
+}
+
+#form-helper-suggestions .form-helper-suggestions-label {
+ padding: @padding_xxnormal@ @padding_normal@; /* 12px helps get row size for the labels */
+ margin: 0;
+ border-color: transparent rgb(215,215,215) transparent rgb(255,255,255);
+ border-style: solid;
+ border-width: @border_width_tiny@;
+}
+
+#form-helper-suggestions .form-helper-suggestions-label:first-child {
+ -moz-padding-start: -moz-initial; /* the arrowscrollbox creates enough left padding */
+ -moz-border-start: none;
+}
+
+#form-helper-suggestions .form-helper-suggestions-label:last-child {
+ -moz-border-end: none;
+}
+
+#form-helper-suggestions .form-helper-suggestions-label:hover:active {
+ background-color: #8db8d8;
+}
+
+/* Select popup ------------------------------------------------------------- */
+#select-container button {
+ display: none;
+ -moz-user-focus: ignore;
+ -moz-user-select: none;
+}
+
+#select-container[multiple="true"] button {
+ display: -moz-box;
+}
+
+#select-commands {
+ background: transparent;
+ border-top: @border_width_tiny@ solid rgb(205,205,205);
+ padding: 0;
+ -moz-user-focus: ignore;
+}
+
+/* listcell elements doesn't have flex="1" so we need to force it */
+#select-commands .option-command > listcell {
+ -moz-box-flex: 1 !important;
+}
+
+/* menulist popup ---------------------------------------------------------- */
+#menulist-commands {
+ display: -moz-box;
+}
+
+/* Common style for Select & Menulist -------------------------------------- */
+.options-title {
+ padding: @padding_xxnormal@ @padding_small@ @padding_small@ @padding_small@;
+ font-size: @font_small@;
+}
+
+.options-title[value=""] {
+ display: none;
+}
+
+.option-command image {
+ width: 30px;
+ height: 30px;
+ margin: @margin_tiny@;
+}
+
+.option-command.selected {
+ list-style-image: url("chrome://browser/skin/images/check-30.png");
+}
+
+.option-command.optgroup {
+ font-weight: bold;
+ font-style: italic;
+ pointer-events: none;
+}
+
+.option-command .in-optgroup {
+ -moz-padding-start: -moz-calc(30px + @padding_large@);
+}
+
diff --git a/mobile/themes/core/header.css b/mobile/themes/core/header.css
new file mode 100644
index 000000000000..3c221233a80e
--- /dev/null
+++ b/mobile/themes/core/header.css
@@ -0,0 +1,47 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Gavin Sharp
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+body {
+ font-family: helvetica,arial,clean,sans-serif;
+ color: #69645c;
+ background: white url("images/aboutBackground.jpg") top center repeat-x;
+}
+
+#wrapper {
+ max-width: 600px;
+ margin: 0 auto;
+}
diff --git a/mobile/themes/core/images/aboutBackground.jpg b/mobile/themes/core/images/aboutBackground.jpg
new file mode 100644
index 000000000000..5dba1c58eb5a
Binary files /dev/null and b/mobile/themes/core/images/aboutBackground.jpg differ
diff --git a/mobile/themes/core/images/addons-32.png b/mobile/themes/core/images/addons-32.png
new file mode 100644
index 000000000000..9679afd823c3
Binary files /dev/null and b/mobile/themes/core/images/addons-32.png differ
diff --git a/mobile/themes/core/images/addons-default-hdpi.png b/mobile/themes/core/images/addons-default-hdpi.png
new file mode 100644
index 000000000000..25f09906e011
Binary files /dev/null and b/mobile/themes/core/images/addons-default-hdpi.png differ
diff --git a/mobile/themes/core/images/alert-addons-30.png b/mobile/themes/core/images/alert-addons-30.png
new file mode 100644
index 000000000000..18744ad85224
Binary files /dev/null and b/mobile/themes/core/images/alert-addons-30.png differ
diff --git a/mobile/themes/core/images/alert-downloads-30.png b/mobile/themes/core/images/alert-downloads-30.png
new file mode 100644
index 000000000000..2546352d28f4
Binary files /dev/null and b/mobile/themes/core/images/alert-downloads-30.png differ
diff --git a/mobile/themes/core/images/allpages-48.png b/mobile/themes/core/images/allpages-48.png
new file mode 100644
index 000000000000..9a18988e1fb8
Binary files /dev/null and b/mobile/themes/core/images/allpages-48.png differ
diff --git a/mobile/themes/core/images/appmenu-active-hdpi.png b/mobile/themes/core/images/appmenu-active-hdpi.png
new file mode 100644
index 000000000000..b14d7ffd0748
Binary files /dev/null and b/mobile/themes/core/images/appmenu-active-hdpi.png differ
diff --git a/mobile/themes/core/images/appmenu-addons-hdpi.png b/mobile/themes/core/images/appmenu-addons-hdpi.png
new file mode 100644
index 000000000000..904ddbfd7dcd
Binary files /dev/null and b/mobile/themes/core/images/appmenu-addons-hdpi.png differ
diff --git a/mobile/themes/core/images/appmenu-downloads-hdpi.png b/mobile/themes/core/images/appmenu-downloads-hdpi.png
new file mode 100644
index 000000000000..9327b0f8197b
Binary files /dev/null and b/mobile/themes/core/images/appmenu-downloads-hdpi.png differ
diff --git a/mobile/themes/core/images/appmenu-preferences-hdpi.png b/mobile/themes/core/images/appmenu-preferences-hdpi.png
new file mode 100644
index 000000000000..190ac8b4edcd
Binary files /dev/null and b/mobile/themes/core/images/appmenu-preferences-hdpi.png differ
diff --git a/mobile/themes/core/images/appmenu-site-hdpi.png b/mobile/themes/core/images/appmenu-site-hdpi.png
new file mode 100644
index 000000000000..b01d29cbbca9
Binary files /dev/null and b/mobile/themes/core/images/appmenu-site-hdpi.png differ
diff --git a/mobile/themes/core/images/arrowbox-down.png b/mobile/themes/core/images/arrowbox-down.png
new file mode 100644
index 000000000000..12a56d5ffaed
Binary files /dev/null and b/mobile/themes/core/images/arrowbox-down.png differ
diff --git a/mobile/themes/core/images/arrowbox-horiz.png b/mobile/themes/core/images/arrowbox-horiz.png
new file mode 100644
index 000000000000..dfa44b968be5
Binary files /dev/null and b/mobile/themes/core/images/arrowbox-horiz.png differ
diff --git a/mobile/themes/core/images/arrowbox-up.png b/mobile/themes/core/images/arrowbox-up.png
new file mode 100644
index 000000000000..7fea5336297e
Binary files /dev/null and b/mobile/themes/core/images/arrowbox-up.png differ
diff --git a/mobile/themes/core/images/arrowdown-16.png b/mobile/themes/core/images/arrowdown-16.png
new file mode 100644
index 000000000000..c982426f2ade
Binary files /dev/null and b/mobile/themes/core/images/arrowdown-16.png differ
diff --git a/mobile/themes/core/images/arrowdowndark-16.png b/mobile/themes/core/images/arrowdowndark-16.png
new file mode 100644
index 000000000000..733d8a6b4ee8
Binary files /dev/null and b/mobile/themes/core/images/arrowdowndark-16.png differ
diff --git a/mobile/themes/core/images/arrowleft-16.png b/mobile/themes/core/images/arrowleft-16.png
new file mode 100644
index 000000000000..464a4a866cd9
Binary files /dev/null and b/mobile/themes/core/images/arrowleft-16.png differ
diff --git a/mobile/themes/core/images/arrowleftdark-16.png b/mobile/themes/core/images/arrowleftdark-16.png
new file mode 100644
index 000000000000..9cb7eeceea1d
Binary files /dev/null and b/mobile/themes/core/images/arrowleftdark-16.png differ
diff --git a/mobile/themes/core/images/arrowright-16.png b/mobile/themes/core/images/arrowright-16.png
new file mode 100644
index 000000000000..859e98ba64b6
Binary files /dev/null and b/mobile/themes/core/images/arrowright-16.png differ
diff --git a/mobile/themes/core/images/arrowrightdark-16.png b/mobile/themes/core/images/arrowrightdark-16.png
new file mode 100644
index 000000000000..dcb3c654eed7
Binary files /dev/null and b/mobile/themes/core/images/arrowrightdark-16.png differ
diff --git a/mobile/themes/core/images/arrowup-16.png b/mobile/themes/core/images/arrowup-16.png
new file mode 100644
index 000000000000..2a7e56485353
Binary files /dev/null and b/mobile/themes/core/images/arrowup-16.png differ
diff --git a/mobile/themes/core/images/arrowupdark-16.png b/mobile/themes/core/images/arrowupdark-16.png
new file mode 100644
index 000000000000..b7ec24409ce6
Binary files /dev/null and b/mobile/themes/core/images/arrowupdark-16.png differ
diff --git a/mobile/themes/core/images/autocomplete-bookmarked-hdpi.png b/mobile/themes/core/images/autocomplete-bookmarked-hdpi.png
new file mode 100644
index 000000000000..3a6ef24c4794
Binary files /dev/null and b/mobile/themes/core/images/autocomplete-bookmarked-hdpi.png differ
diff --git a/mobile/themes/core/images/autocomplete-desktop-hdpi.png b/mobile/themes/core/images/autocomplete-desktop-hdpi.png
new file mode 100644
index 000000000000..6699255814ab
Binary files /dev/null and b/mobile/themes/core/images/autocomplete-desktop-hdpi.png differ
diff --git a/mobile/themes/core/images/autocomplete-search-hdpi.png b/mobile/themes/core/images/autocomplete-search-hdpi.png
new file mode 100644
index 000000000000..58a5d25fdf60
Binary files /dev/null and b/mobile/themes/core/images/autocomplete-search-hdpi.png differ
diff --git a/mobile/themes/core/images/back-default-hdpi.png b/mobile/themes/core/images/back-default-hdpi.png
new file mode 100644
index 000000000000..8c2387cfcbec
Binary files /dev/null and b/mobile/themes/core/images/back-default-hdpi.png differ
diff --git a/mobile/themes/core/images/bookmark-default-hdpi.png b/mobile/themes/core/images/bookmark-default-hdpi.png
new file mode 100644
index 000000000000..afd9c89544d6
Binary files /dev/null and b/mobile/themes/core/images/bookmark-default-hdpi.png differ
diff --git a/mobile/themes/core/images/bookmark-starred-hdpi.png b/mobile/themes/core/images/bookmark-starred-hdpi.png
new file mode 100644
index 000000000000..ee1defd1185c
Binary files /dev/null and b/mobile/themes/core/images/bookmark-starred-hdpi.png differ
diff --git a/mobile/themes/core/images/bookmarks-48.png b/mobile/themes/core/images/bookmarks-48.png
new file mode 100644
index 000000000000..550122357b7e
Binary files /dev/null and b/mobile/themes/core/images/bookmarks-48.png differ
diff --git a/mobile/themes/core/images/browseaddons-bg.jpg b/mobile/themes/core/images/browseaddons-bg.jpg
new file mode 100644
index 000000000000..dcd9a92b3522
Binary files /dev/null and b/mobile/themes/core/images/browseaddons-bg.jpg differ
diff --git a/mobile/themes/core/images/button-bg.png b/mobile/themes/core/images/button-bg.png
new file mode 100644
index 000000000000..0dbc5329eaef
Binary files /dev/null and b/mobile/themes/core/images/button-bg.png differ
diff --git a/mobile/themes/core/images/check-30.png b/mobile/themes/core/images/check-30.png
new file mode 100644
index 000000000000..82cf8f415fa7
Binary files /dev/null and b/mobile/themes/core/images/check-30.png differ
diff --git a/mobile/themes/core/images/check-selected-30.png b/mobile/themes/core/images/check-selected-30.png
new file mode 100644
index 000000000000..a29f65655ef5
Binary files /dev/null and b/mobile/themes/core/images/check-selected-30.png differ
diff --git a/mobile/themes/core/images/check-unselected-30.png b/mobile/themes/core/images/check-unselected-30.png
new file mode 100644
index 000000000000..054c7373b405
Binary files /dev/null and b/mobile/themes/core/images/check-unselected-30.png differ
diff --git a/mobile/themes/core/images/close-active-hdpi.png b/mobile/themes/core/images/close-active-hdpi.png
new file mode 100644
index 000000000000..935b7555e4d8
Binary files /dev/null and b/mobile/themes/core/images/close-active-hdpi.png differ
diff --git a/mobile/themes/core/images/close-default-hdpi.png b/mobile/themes/core/images/close-default-hdpi.png
new file mode 100644
index 000000000000..3961ad1baaa1
Binary files /dev/null and b/mobile/themes/core/images/close-default-hdpi.png differ
diff --git a/mobile/themes/core/images/close-inactive-tab-hdpi.png b/mobile/themes/core/images/close-inactive-tab-hdpi.png
new file mode 100644
index 000000000000..105d7852eddc
Binary files /dev/null and b/mobile/themes/core/images/close-inactive-tab-hdpi.png differ
diff --git a/mobile/themes/core/images/console-default-hdpi.png b/mobile/themes/core/images/console-default-hdpi.png
new file mode 100644
index 000000000000..b0d26f4237f6
Binary files /dev/null and b/mobile/themes/core/images/console-default-hdpi.png differ
diff --git a/mobile/themes/core/images/downloads-default-hdpi.png b/mobile/themes/core/images/downloads-default-hdpi.png
new file mode 100644
index 000000000000..f9afa2cec9fb
Binary files /dev/null and b/mobile/themes/core/images/downloads-default-hdpi.png differ
diff --git a/mobile/themes/core/images/dropmarker-hdpi.png b/mobile/themes/core/images/dropmarker-hdpi.png
new file mode 100644
index 000000000000..960fbd6ab247
Binary files /dev/null and b/mobile/themes/core/images/dropmarker-hdpi.png differ
diff --git a/mobile/themes/core/images/endcap-active-bg.png b/mobile/themes/core/images/endcap-active-bg.png
new file mode 100644
index 000000000000..0e6454797144
Binary files /dev/null and b/mobile/themes/core/images/endcap-active-bg.png differ
diff --git a/mobile/themes/core/images/endcap-default-bg.png b/mobile/themes/core/images/endcap-default-bg.png
new file mode 100644
index 000000000000..05e66d735511
Binary files /dev/null and b/mobile/themes/core/images/endcap-default-bg.png differ
diff --git a/mobile/themes/core/images/endcap-ev-active-bg.png b/mobile/themes/core/images/endcap-ev-active-bg.png
new file mode 100644
index 000000000000..daf52a6846c7
Binary files /dev/null and b/mobile/themes/core/images/endcap-ev-active-bg.png differ
diff --git a/mobile/themes/core/images/endcap-ev-default-bg.png b/mobile/themes/core/images/endcap-ev-default-bg.png
new file mode 100644
index 000000000000..0ef93455d999
Binary files /dev/null and b/mobile/themes/core/images/endcap-ev-default-bg.png differ
diff --git a/mobile/themes/core/images/endcap-ssl-active-bg.png b/mobile/themes/core/images/endcap-ssl-active-bg.png
new file mode 100644
index 000000000000..e395ef620888
Binary files /dev/null and b/mobile/themes/core/images/endcap-ssl-active-bg.png differ
diff --git a/mobile/themes/core/images/endcap-ssl-default-bg.png b/mobile/themes/core/images/endcap-ssl-default-bg.png
new file mode 100644
index 000000000000..7d510880b48d
Binary files /dev/null and b/mobile/themes/core/images/endcap-ssl-default-bg.png differ
diff --git a/mobile/themes/core/images/favicon-default-32.png b/mobile/themes/core/images/favicon-default-32.png
new file mode 100644
index 000000000000..41e15740d9d2
Binary files /dev/null and b/mobile/themes/core/images/favicon-default-32.png differ
diff --git a/mobile/themes/core/images/folder-32.png b/mobile/themes/core/images/folder-32.png
new file mode 100644
index 000000000000..769c1249fc0a
Binary files /dev/null and b/mobile/themes/core/images/folder-32.png differ
diff --git a/mobile/themes/core/images/forward-default-hdpi.png b/mobile/themes/core/images/forward-default-hdpi.png
new file mode 100644
index 000000000000..4bcf5010976b
Binary files /dev/null and b/mobile/themes/core/images/forward-default-hdpi.png differ
diff --git a/mobile/themes/core/images/history-48.png b/mobile/themes/core/images/history-48.png
new file mode 100644
index 000000000000..965fca757052
Binary files /dev/null and b/mobile/themes/core/images/history-48.png differ
diff --git a/mobile/themes/core/images/identity-default-hdpi.png b/mobile/themes/core/images/identity-default-hdpi.png
new file mode 100644
index 000000000000..6f21d92adf41
Binary files /dev/null and b/mobile/themes/core/images/identity-default-hdpi.png differ
diff --git a/mobile/themes/core/images/identity-ev-hdpi.png b/mobile/themes/core/images/identity-ev-hdpi.png
new file mode 100644
index 000000000000..761b7d8a2599
Binary files /dev/null and b/mobile/themes/core/images/identity-ev-hdpi.png differ
diff --git a/mobile/themes/core/images/identity-ssl-hdpi.png b/mobile/themes/core/images/identity-ssl-hdpi.png
new file mode 100644
index 000000000000..64051751ba5c
Binary files /dev/null and b/mobile/themes/core/images/identity-ssl-hdpi.png differ
diff --git a/mobile/themes/core/images/locked-hdpi.png b/mobile/themes/core/images/locked-hdpi.png
new file mode 100644
index 000000000000..e50bc4f1dd28
Binary files /dev/null and b/mobile/themes/core/images/locked-hdpi.png differ
diff --git a/mobile/themes/core/images/mozilla-32.png b/mobile/themes/core/images/mozilla-32.png
new file mode 100644
index 000000000000..98d8789e274a
Binary files /dev/null and b/mobile/themes/core/images/mozilla-32.png differ
diff --git a/mobile/themes/core/images/mute-hdpi.png b/mobile/themes/core/images/mute-hdpi.png
new file mode 100644
index 000000000000..0bd1e60e6a3e
Binary files /dev/null and b/mobile/themes/core/images/mute-hdpi.png differ
diff --git a/mobile/themes/core/images/navigation-magnifier-30.png b/mobile/themes/core/images/navigation-magnifier-30.png
new file mode 100644
index 000000000000..48001657c465
Binary files /dev/null and b/mobile/themes/core/images/navigation-magnifier-30.png differ
diff --git a/mobile/themes/core/images/newtab-default-hdpi.png b/mobile/themes/core/images/newtab-default-hdpi.png
new file mode 100644
index 000000000000..aacf3b927b0d
Binary files /dev/null and b/mobile/themes/core/images/newtab-default-hdpi.png differ
diff --git a/mobile/themes/core/images/next-disabled-hdpi.png b/mobile/themes/core/images/next-disabled-hdpi.png
new file mode 100644
index 000000000000..81e68769e09f
Binary files /dev/null and b/mobile/themes/core/images/next-disabled-hdpi.png differ
diff --git a/mobile/themes/core/images/next-hdpi.png b/mobile/themes/core/images/next-hdpi.png
new file mode 100644
index 000000000000..c0115d491481
Binary files /dev/null and b/mobile/themes/core/images/next-hdpi.png differ
diff --git a/mobile/themes/core/images/panelrow-active-hdpi.png b/mobile/themes/core/images/panelrow-active-hdpi.png
new file mode 100644
index 000000000000..23676c11c477
Binary files /dev/null and b/mobile/themes/core/images/panelrow-active-hdpi.png differ
diff --git a/mobile/themes/core/images/panelrow-default-hdpi.png b/mobile/themes/core/images/panelrow-default-hdpi.png
new file mode 100644
index 000000000000..d8143e245c9a
Binary files /dev/null and b/mobile/themes/core/images/panelrow-default-hdpi.png differ
diff --git a/mobile/themes/core/images/panelrow-selected-hdpi.png b/mobile/themes/core/images/panelrow-selected-hdpi.png
new file mode 100644
index 000000000000..5e8dc6eb3a9f
Binary files /dev/null and b/mobile/themes/core/images/panelrow-selected-hdpi.png differ
diff --git a/mobile/themes/core/images/pause-hdpi.png b/mobile/themes/core/images/pause-hdpi.png
new file mode 100644
index 000000000000..e377d321ce03
Binary files /dev/null and b/mobile/themes/core/images/pause-hdpi.png differ
diff --git a/mobile/themes/core/images/play-hdpi.png b/mobile/themes/core/images/play-hdpi.png
new file mode 100644
index 000000000000..a8482eb4dd7e
Binary files /dev/null and b/mobile/themes/core/images/play-hdpi.png differ
diff --git a/mobile/themes/core/images/popup-bg-hdpi.png b/mobile/themes/core/images/popup-bg-hdpi.png
new file mode 100644
index 000000000000..df8e20c929f0
Binary files /dev/null and b/mobile/themes/core/images/popup-bg-hdpi.png differ
diff --git a/mobile/themes/core/images/popup-selected-item-hdpi.png b/mobile/themes/core/images/popup-selected-item-hdpi.png
new file mode 100644
index 000000000000..9cac088e9295
Binary files /dev/null and b/mobile/themes/core/images/popup-selected-item-hdpi.png differ
diff --git a/mobile/themes/core/images/preferences-default-hdpi.png b/mobile/themes/core/images/preferences-default-hdpi.png
new file mode 100644
index 000000000000..49d89c1df278
Binary files /dev/null and b/mobile/themes/core/images/preferences-default-hdpi.png differ
diff --git a/mobile/themes/core/images/previous-disabled-hdpi.png b/mobile/themes/core/images/previous-disabled-hdpi.png
new file mode 100644
index 000000000000..459f5ab7de4c
Binary files /dev/null and b/mobile/themes/core/images/previous-disabled-hdpi.png differ
diff --git a/mobile/themes/core/images/previous-hdpi.png b/mobile/themes/core/images/previous-hdpi.png
new file mode 100644
index 000000000000..530206d58a54
Binary files /dev/null and b/mobile/themes/core/images/previous-hdpi.png differ
diff --git a/mobile/themes/core/images/ratings-18.png b/mobile/themes/core/images/ratings-18.png
new file mode 100644
index 000000000000..b264e6d01681
Binary files /dev/null and b/mobile/themes/core/images/ratings-18.png differ
diff --git a/mobile/themes/core/images/reload-hdpi.png b/mobile/themes/core/images/reload-hdpi.png
new file mode 100644
index 000000000000..57842bdb914e
Binary files /dev/null and b/mobile/themes/core/images/reload-hdpi.png differ
diff --git a/mobile/themes/core/images/remotetabs-32.png b/mobile/themes/core/images/remotetabs-32.png
new file mode 100644
index 000000000000..80f59a022c34
Binary files /dev/null and b/mobile/themes/core/images/remotetabs-32.png differ
diff --git a/mobile/themes/core/images/remotetabs-48.png b/mobile/themes/core/images/remotetabs-48.png
new file mode 100644
index 000000000000..011d501a1b21
Binary files /dev/null and b/mobile/themes/core/images/remotetabs-48.png differ
diff --git a/mobile/themes/core/images/row-header-bg.png b/mobile/themes/core/images/row-header-bg.png
new file mode 100644
index 000000000000..aaefd0f3d988
Binary files /dev/null and b/mobile/themes/core/images/row-header-bg.png differ
diff --git a/mobile/themes/core/images/scrubber-hdpi.png b/mobile/themes/core/images/scrubber-hdpi.png
new file mode 100644
index 000000000000..49c60505f465
Binary files /dev/null and b/mobile/themes/core/images/scrubber-hdpi.png differ
diff --git a/mobile/themes/core/images/search-clear-30.png b/mobile/themes/core/images/search-clear-30.png
new file mode 100644
index 000000000000..8bab39a08d35
Binary files /dev/null and b/mobile/themes/core/images/search-clear-30.png differ
diff --git a/mobile/themes/core/images/search-glass-30.png b/mobile/themes/core/images/search-glass-30.png
new file mode 100644
index 000000000000..71bf1f255ee1
Binary files /dev/null and b/mobile/themes/core/images/search-glass-30.png differ
diff --git a/mobile/themes/core/images/section-collapsed-16.png b/mobile/themes/core/images/section-collapsed-16.png
new file mode 100644
index 000000000000..c9805f654c79
Binary files /dev/null and b/mobile/themes/core/images/section-collapsed-16.png differ
diff --git a/mobile/themes/core/images/section-expanded-16.png b/mobile/themes/core/images/section-expanded-16.png
new file mode 100644
index 000000000000..128cef90af66
Binary files /dev/null and b/mobile/themes/core/images/section-expanded-16.png differ
diff --git a/mobile/themes/core/images/settings-default-hdpi.png b/mobile/themes/core/images/settings-default-hdpi.png
new file mode 100644
index 000000000000..448743a46863
Binary files /dev/null and b/mobile/themes/core/images/settings-default-hdpi.png differ
diff --git a/mobile/themes/core/images/sidebarbutton-active-hdpi.png b/mobile/themes/core/images/sidebarbutton-active-hdpi.png
new file mode 100644
index 000000000000..30f1d2017bc6
Binary files /dev/null and b/mobile/themes/core/images/sidebarbutton-active-hdpi.png differ
diff --git a/mobile/themes/core/images/stop-hdpi.png b/mobile/themes/core/images/stop-hdpi.png
new file mode 100644
index 000000000000..2a2fcdfddddc
Binary files /dev/null and b/mobile/themes/core/images/stop-hdpi.png differ
diff --git a/mobile/themes/core/images/tab-active-hdpi.png b/mobile/themes/core/images/tab-active-hdpi.png
new file mode 100644
index 000000000000..98621cf091aa
Binary files /dev/null and b/mobile/themes/core/images/tab-active-hdpi.png differ
diff --git a/mobile/themes/core/images/tab-closed-hdpi.png b/mobile/themes/core/images/tab-closed-hdpi.png
new file mode 100644
index 000000000000..e8333ed82292
Binary files /dev/null and b/mobile/themes/core/images/tab-closed-hdpi.png differ
diff --git a/mobile/themes/core/images/tab-inactive-hdpi.png b/mobile/themes/core/images/tab-inactive-hdpi.png
new file mode 100644
index 000000000000..b2360da0b0e3
Binary files /dev/null and b/mobile/themes/core/images/tab-inactive-hdpi.png differ
diff --git a/mobile/themes/core/images/tab-reopen-hdpi.png b/mobile/themes/core/images/tab-reopen-hdpi.png
new file mode 100644
index 000000000000..9bcb461767c2
Binary files /dev/null and b/mobile/themes/core/images/tab-reopen-hdpi.png differ
diff --git a/mobile/themes/core/images/task-back-hdpi.png b/mobile/themes/core/images/task-back-hdpi.png
new file mode 100644
index 000000000000..17ec3017aeb1
Binary files /dev/null and b/mobile/themes/core/images/task-back-hdpi.png differ
diff --git a/mobile/themes/core/images/task-back-rtl-hdpi.png b/mobile/themes/core/images/task-back-rtl-hdpi.png
new file mode 100644
index 000000000000..492c7b5ac285
Binary files /dev/null and b/mobile/themes/core/images/task-back-rtl-hdpi.png differ
diff --git a/mobile/themes/core/images/task-close-hdpi.png b/mobile/themes/core/images/task-close-hdpi.png
new file mode 100644
index 000000000000..e053d1f14acd
Binary files /dev/null and b/mobile/themes/core/images/task-close-hdpi.png differ
diff --git a/mobile/themes/core/images/task-switch-hdpi.png b/mobile/themes/core/images/task-switch-hdpi.png
new file mode 100644
index 000000000000..3e9e1a75db1b
Binary files /dev/null and b/mobile/themes/core/images/task-switch-hdpi.png differ
diff --git a/mobile/themes/core/images/textbox-bg.png b/mobile/themes/core/images/textbox-bg.png
new file mode 100644
index 000000000000..40edca065d63
Binary files /dev/null and b/mobile/themes/core/images/textbox-bg.png differ
diff --git a/mobile/themes/core/images/throbber.png b/mobile/themes/core/images/throbber.png
new file mode 100644
index 000000000000..c601ec80ba7c
Binary files /dev/null and b/mobile/themes/core/images/throbber.png differ
diff --git a/mobile/themes/core/images/toggle-off.png b/mobile/themes/core/images/toggle-off.png
new file mode 100644
index 000000000000..a27900e1fe49
Binary files /dev/null and b/mobile/themes/core/images/toggle-off.png differ
diff --git a/mobile/themes/core/images/toggle-on.png b/mobile/themes/core/images/toggle-on.png
new file mode 100644
index 000000000000..a7dc009d5ea3
Binary files /dev/null and b/mobile/themes/core/images/toggle-on.png differ
diff --git a/mobile/themes/core/images/unlocked-hdpi.png b/mobile/themes/core/images/unlocked-hdpi.png
new file mode 100644
index 000000000000..359923dc6cc4
Binary files /dev/null and b/mobile/themes/core/images/unlocked-hdpi.png differ
diff --git a/mobile/themes/core/images/unmute-hdpi.png b/mobile/themes/core/images/unmute-hdpi.png
new file mode 100644
index 000000000000..4dbb94f98f0a
Binary files /dev/null and b/mobile/themes/core/images/unmute-hdpi.png differ
diff --git a/mobile/themes/core/jar.mn b/mobile/themes/core/jar.mn
new file mode 100644
index 000000000000..04c1c84ed687
--- /dev/null
+++ b/mobile/themes/core/jar.mn
@@ -0,0 +1,116 @@
+#filter substitution
+
+chrome.jar:
+% skin browser classic/1.0 %skin/
+ skin/aboutCertError.css (aboutCertError.css)
+ skin/aboutPage.css (aboutPage.css)
+ skin/about.css (about.css)
+ skin/aboutHome.css (aboutHome.css)
+* skin/browser.css (browser.css)
+ skin/config.css (config.css)
+ skin/firstRun.css (firstRun.css)
+* skin/forms.css (forms.css)
+ skin/header.css (header.css)
+* skin/notification.css (notification.css)
+* skin/platform.css (platform.css)
+ skin/touchcontrols.css (touchcontrols.css)
+% override chrome://global/skin/about.css chrome://browser/skin/about.css
+% override chrome://global/skin/media/videocontrols.css chrome://browser/skin/touchcontrols.css
+
+ skin/images/appmenu-addons-hdpi.png (images/appmenu-addons-hdpi.png)
+ skin/images/appmenu-active-hdpi.png (images/appmenu-active-hdpi.png)
+ skin/images/appmenu-downloads-hdpi.png (images/appmenu-downloads-hdpi.png)
+ skin/images/appmenu-preferences-hdpi.png (images/appmenu-preferences-hdpi.png)
+ skin/images/appmenu-site-hdpi.png (images/appmenu-site-hdpi.png)
+ skin/images/aboutBackground.jpg (images/aboutBackground.jpg)
+ skin/images/button-bg.png (images/button-bg.png)
+ skin/images/textbox-bg.png (images/textbox-bg.png)
+ skin/images/browseaddons-bg.jpg (images/browseaddons-bg.jpg)
+ skin/images/addons-32.png (images/addons-32.png)
+ skin/images/arrowleft-16.png (images/arrowleft-16.png)
+ skin/images/arrowright-16.png (images/arrowright-16.png)
+ skin/images/arrowup-16.png (images/arrowup-16.png)
+ skin/images/arrowdown-16.png (images/arrowdown-16.png)
+ skin/images/arrowleftdark-16.png (images/arrowleftdark-16.png)
+ skin/images/arrowrightdark-16.png (images/arrowrightdark-16.png)
+ skin/images/arrowupdark-16.png (images/arrowupdark-16.png)
+ skin/images/arrowdowndark-16.png (images/arrowdowndark-16.png)
+ skin/images/popup-bg-hdpi.png (images/popup-bg-hdpi.png)
+ skin/images/popup-selected-item-hdpi.png (images/popup-selected-item-hdpi.png)
+ skin/images/arrowbox-up.png (images/arrowbox-up.png)
+ skin/images/arrowbox-down.png (images/arrowbox-down.png)
+ skin/images/arrowbox-horiz.png (images/arrowbox-horiz.png)
+ skin/images/check-selected-30.png (images/check-selected-30.png)
+ skin/images/check-unselected-30.png (images/check-unselected-30.png)
+ skin/images/dropmarker-hdpi.png (images/dropmarker-hdpi.png)
+ skin/images/ratings-18.png (images/ratings-18.png)
+ skin/images/favicon-default-32.png (images/favicon-default-32.png)
+ skin/images/endcap-default-bg.png (images/endcap-default-bg.png)
+ skin/images/endcap-active-bg.png (images/endcap-active-bg.png)
+ skin/images/endcap-ev-default-bg.png (images/endcap-ev-default-bg.png)
+ skin/images/endcap-ev-active-bg.png (images/endcap-ev-active-bg.png)
+ skin/images/endcap-ssl-default-bg.png (images/endcap-ssl-default-bg.png)
+ skin/images/endcap-ssl-active-bg.png (images/endcap-ssl-active-bg.png)
+ skin/images/throbber.png (images/throbber.png)
+ skin/images/navigation-magnifier-30.png (images/navigation-magnifier-30.png)
+ skin/images/folder-32.png (images/folder-32.png)
+ skin/images/stop-hdpi.png (images/stop-hdpi.png)
+ skin/images/reload-hdpi.png (images/reload-hdpi.png)
+ skin/images/alert-addons-30.png (images/alert-addons-30.png)
+ skin/images/alert-downloads-30.png (images/alert-downloads-30.png)
+ skin/images/addons-default-hdpi.png (images/addons-default-hdpi.png)
+ skin/images/back-default-hdpi.png (images/back-default-hdpi.png)
+ skin/images/allpages-48.png (images/allpages-48.png)
+ skin/images/history-48.png (images/history-48.png)
+ skin/images/bookmark-default-hdpi.png (images/bookmark-default-hdpi.png)
+ skin/images/bookmarks-48.png (images/bookmarks-48.png)
+ skin/images/bookmark-starred-hdpi.png (images/bookmark-starred-hdpi.png)
+ skin/images/panelrow-active-hdpi.png (images/panelrow-active-hdpi.png)
+ skin/images/panelrow-default-hdpi.png (images/panelrow-default-hdpi.png)
+ skin/images/panelrow-selected-hdpi.png (images/panelrow-selected-hdpi.png)
+ skin/images/forward-default-hdpi.png (images/forward-default-hdpi.png)
+ skin/images/downloads-default-hdpi.png (images/downloads-default-hdpi.png)
+ skin/images/settings-default-hdpi.png (images/settings-default-hdpi.png)
+ skin/images/preferences-default-hdpi.png (images/preferences-default-hdpi.png)
+ skin/images/row-header-bg.png (images/row-header-bg.png)
+ skin/images/console-default-hdpi.png (images/console-default-hdpi.png)
+ skin/images/newtab-default-hdpi.png (images/newtab-default-hdpi.png)
+ skin/images/tab-active-hdpi.png (images/tab-active-hdpi.png)
+ skin/images/tab-inactive-hdpi.png (images/tab-inactive-hdpi.png)
+ skin/images/tab-closed-hdpi.png (images/tab-closed-hdpi.png)
+ skin/images/tab-reopen-hdpi.png (images/tab-reopen-hdpi.png)
+ skin/images/remotetabs-48.png (images/remotetabs-48.png)
+ skin/images/remotetabs-32.png (images/remotetabs-32.png)
+ skin/images/mozilla-32.png (images/mozilla-32.png)
+ skin/images/toggle-on.png (images/toggle-on.png)
+ skin/images/toggle-off.png (images/toggle-off.png)
+ skin/images/sidebarbutton-active-hdpi.png (images/sidebarbutton-active-hdpi.png)
+ skin/images/previous-hdpi.png (images/previous-hdpi.png)
+ skin/images/previous-disabled-hdpi.png (images/previous-disabled-hdpi.png)
+ skin/images/next-hdpi.png (images/next-hdpi.png)
+ skin/images/next-disabled-hdpi.png (images/next-disabled-hdpi.png)
+ skin/images/identity-default-hdpi.png (images/identity-default-hdpi.png)
+ skin/images/identity-ssl-hdpi.png (images/identity-ssl-hdpi.png)
+ skin/images/identity-ev-hdpi.png (images/identity-ev-hdpi.png)
+ skin/images/unlocked-hdpi.png (images/unlocked-hdpi.png)
+ skin/images/locked-hdpi.png (images/locked-hdpi.png)
+ skin/images/close-default-hdpi.png (images/close-default-hdpi.png)
+ skin/images/close-active-hdpi.png (images/close-active-hdpi.png)
+ skin/images/close-inactive-tab-hdpi.png (images/close-inactive-tab-hdpi.png)
+ skin/images/check-30.png (images/check-30.png)
+ skin/images/search-glass-30.png (images/search-glass-30.png)
+ skin/images/search-clear-30.png (images/search-clear-30.png)
+ skin/images/section-expanded-16.png (images/section-expanded-16.png)
+ skin/images/section-collapsed-16.png (images/section-collapsed-16.png)
+ skin/images/task-switch-hdpi.png (images/task-switch-hdpi.png)
+ skin/images/task-close-hdpi.png (images/task-close-hdpi.png)
+ skin/images/task-back-hdpi.png (images/task-back-hdpi.png)
+ skin/images/task-back-rtl-hdpi.png (images/task-back-rtl-hdpi.png)
+ skin/images/autocomplete-desktop-hdpi.png (images/autocomplete-desktop-hdpi.png)
+ skin/images/autocomplete-bookmarked-hdpi.png (images/autocomplete-bookmarked-hdpi.png)
+ skin/images/autocomplete-search-hdpi.png (images/autocomplete-search-hdpi.png)
+ skin/images/play-hdpi.png (images/play-hdpi.png)
+ skin/images/pause-hdpi.png (images/pause-hdpi.png)
+ skin/images/mute-hdpi.png (images/mute-hdpi.png)
+ skin/images/unmute-hdpi.png (images/unmute-hdpi.png)
+ skin/images/scrubber-hdpi.png (images/scrubber-hdpi.png)
diff --git a/mobile/themes/core/notification.css b/mobile/themes/core/notification.css
new file mode 100644
index 000000000000..81e35ab8eb52
--- /dev/null
+++ b/mobile/themes/core/notification.css
@@ -0,0 +1,32 @@
+%filter substitution
+%include defines.inc
+
+notification, notification[type="warning"] {
+ padding: 0;
+ color: #fff;
+ background: #5768c3;
+ border-top: @border_width_tiny@ solid #4756aa;
+ border-bottom: @border_width_tiny@ solid #4756aa;
+}
+
+notification .messageCloseButton {
+ list-style-image: url("chrome://browser/skin/images/close-default-hdpi.png");
+ -moz-image-region: -moz-initial;
+ -moz-box-align: start;
+}
+
+notification .messageCloseButton:-moz-focusring {
+ outline: 0 !important;
+}
+
+notification .messageCloseButton:hover:active {
+ list-style-image: url("chrome://browser/skin/images/close-active-hdpi.png");
+}
+
+notification .outset {
+ border-color: #4756aa !important;
+}
+
+notification .buttons {
+ padding: @padding_normal@;
+}
diff --git a/mobile/themes/core/platform.css b/mobile/themes/core/platform.css
new file mode 100644
index 000000000000..9e87b44588da
--- /dev/null
+++ b/mobile/themes/core/platform.css
@@ -0,0 +1,673 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Mobile Browser.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Finkle
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* global skin ------------------------------------------------------------- */
+@import url(chrome://global/skin/);
+
+%filter substitution
+%include defines.inc
+
+/* general stuff ------------------------------------------------------------ */
+:root {
+ font-family: "Nokia Sans", Tahoma, sans-serif !important;
+ font-size: @font_normal@ !important;
+}
+
+::-moz-selection {
+ background-color: #8db8d8;
+ color: black;
+}
+
+menu,
+menuitem {
+ padding: 0 !important;
+ margin: 0 !important;
+}
+
+description,
+label {
+ /* force mac to use the same margins as windows and linux */
+ -moz-margin-start: @margin_snormal@;
+ -moz-margin-end: @margin_snormal@;
+}
+
+/* Override any OS inverse themes */
+richlistbox,
+textbox {
+ color: black;
+ background-color: white;
+}
+
+/* textboxes --------------------------------------------------------------- */
+textbox:not([type="number"]) {
+ min-height: @textbox_height@;
+ border: @border_width_small@ solid #cacdd5;
+ -moz-border-radius: @border_radius_normal@;
+ -moz-border-top-colors: -moz-initial;
+ -moz-border-right-colors: -moz-initial;
+ -moz-border-bottom-colors: -moz-initial;
+ -moz-border-left-colors: -moz-initial;
+}
+
+textbox[isempty="true"] {
+ color: gray;
+}
+
+textbox.search-bar {
+ border: @border_width_small@ solid rgba(0,0,0,0.4);
+ background-color: #f9f9f9;
+ background: url("chrome://browser/skin/images/textbox-bg.png") top left repeat-x;
+ background-size: 100% 100%;
+}
+
+textbox[disabled="true"] {
+ background-color: lightgray;
+}
+
+/* sidebars spacer --------------------------------------------------------- */
+.sidebar-spacer {
+ background-color: #767973;
+}
+
+/* prompt dialogs ---------------------------------------------------------- */
+.context-block,
+.modal-block {
+ -moz-box-align: center;
+ -moz-box-pack: center;
+ background-color: rgba(0,0,0,.6);
+ padding: @touch_normal@;
+}
+
+dialog,
+.dialog-dark,
+.panel-arrowcontent {
+ background: url("chrome://browser/skin/images/popup-bg-hdpi.png") left bottom repeat-x;
+ background-color: white;
+ border-radius: @border_radius_normal@;
+ box-shadow: black 0 @border_radius_tiny@ @border_radius_tiny@, black 0 -@border_radius_tiny@ @border_radius_tiny@;
+ padding: @padding_normal@ 0; /* core spacing on top/bottom */
+}
+
+dialog > .prompt-header {
+ padding: @padding_normal@;
+ font-size: @font_small@ !important;
+}
+
+dialog > .prompt-header > .prompt-title {
+ font-size: @font_normal@ !important;
+}
+
+@media (max-width: 499px) {
+ .context-block,
+ .modal-block {
+ padding: @padding_xlarge@;
+ }
+
+ dialog > .prompt-header,
+ dialog > .prompt-header > .prompt-title {
+ font-size: @font_small@ !important;
+ }
+}
+
+dialog > .prompt-header > .prompt-message {
+ margin-top: @margin_normal@;
+ white-space: pre-wrap;
+}
+
+dialog > .prompt-header > .button-checkbox {
+ margin-left: @margin_large@;
+}
+
+/* buttons ----------------------------------------------------------------- */
+.button-text,
+.toolbarbutton-text {
+ font-weight: normal;
+ font-size: @font_normal@ !important;
+}
+
+button {
+ -moz-appearance: none;
+ min-width: @touch_button_small@ !important; /* button size */
+ min-height: @touch_button_small@ !important; /* button size */
+ color: #000;
+ border-radius: @border_radius_normal@;
+ margin: @margin_normal@;
+ padding: @padding_xnormal@;
+ background-image: url("chrome://browser/skin/images/button-bg.png");
+ background-size: auto 100%;
+ border: @border_width_tiny@ solid #cacdd5;
+}
+
+button[disabled="true"] {
+ color: #aaa !important;
+ border: @border_width_tiny@ solid #cacdd5 !important;
+}
+
+button:focus > .button-box {
+ border: @border_width_tiny@ solid transparent;
+}
+
+button:not([disabled]):hover:active,
+button:not([disabled])[checked="true"] {
+ background-image: url("chrome://browser/skin/images/toggle-off.png");
+}
+
+/* Override GTK2 system setting */
+.button-icon {
+ display: -moz-initial !important;
+}
+
+/* spinbuttons ------------------------------------------------------------- */
+spinbuttons {
+ border: none !important;
+}
+
+.numberbox-input-box {
+ border: @border_width_small@ solid #cacdd5;
+ border-right: 0 solid transparent;
+ border-radius: @border_radius_normal@ 0 0 @border_radius_normal@;
+ -moz-border-top-colors: -moz-initial;
+ -moz-border-bottom-colors: -moz-initial;
+ -moz-border-left-colors: -moz-initial;
+}
+
+.numberbox-input-box:-moz-locale-dir(rtl) {
+ border-radius: 0 @border_radius_normal@ @border_radius_normal@ 0;
+ border-right: @border_width_small@ solid #cacdd5;
+ border-left: 0 solid transparent;
+}
+
+.spinbuttons-box {
+ border: none !important;
+ -moz-box-orient: horizontal !important;
+ -moz-box-direction: reverse !important;
+}
+
+.spinbuttons-up .button-icon,
+.spinbuttons-down .button-icon {
+ display: block;
+}
+
+.spinbuttons-up,
+.spinbuttons-down {
+ -moz-appearance: none !important;
+ min-width: @touch_button_small@ !important; /* button size */
+ min-height: @touch_button_small@ !important; /* button size */
+ color: #000;
+ margin: @margin_normal@;
+ padding: @padding_xnormal@;
+ border-radius: 0;
+ background-image: url("chrome://browser/skin/images/button-bg.png");
+ background-size: auto 100%;
+ border: @border_width_tiny@ solid #cacdd5;
+ list-style-image: url("chrome://browser/skin/images/arrowdown-16.png");
+}
+
+.spinbuttons-up:hover:active:not([disabled=true]),
+.spinbuttons-down:hover:active:not([disabled=true]) {
+ background-image: url("chrome://browser/skin/images/toggle-on.png");
+}
+
+.spinbuttons-up {
+ border-radius: 0 @border_radius_normal@ @border_radius_normal@ 0;
+ list-style-image: url("chrome://browser/skin/images/arrowup-16.png");
+}
+
+.spinbuttons-up:-moz-locale-dir(rtl) {
+ border-radius: @border_radius_normal@ 0 0 @border_radius_normal@;
+}
+
+/* toolbar buttons --------------------------------------------------------- */
+toolbarbutton {
+ min-width: @touch_button_large@ !important; /* primary button size */
+ min-height: @touch_button_large@ !important; /* primary button size */
+ -moz-appearance: none !important;
+ margin: 0;
+ padding: @padding_xsmall@;
+}
+
+toolbarbutton:not(.show-text) .toolbarbutton-text {
+ display: none !important;
+}
+
+.toolbarbutton-icon[label]:not([label=""]),
+.toolbarbutton-icon[type="menu"] {
+ -moz-margin-end: @margin_tiny@;
+}
+
+toolbarbutton:not(.show-text) .toolbarbutton-icon,
+toolbarbutton:not([image]) .toolbarbutton-icon,
+toolbarbutton[image=''] .toolbarbutton-icon {
+ -moz-margin-end: 0;
+}
+
+toolbarbutton:hover,
+toolbarbutton:hover:active,
+toolbarbutton[open="true"] {
+ border-color: transparent;
+}
+
+/* checkbox buttons ----------------------------------------------------------- */
+.button-checkbox {
+ padding: 0 !important;
+ background: none !important;
+ border: none !important;
+ -moz-border-image: none !important;
+}
+
+.button-checkbox > .button-image-icon {
+ -moz-margin-end: @margin_normal@;
+ list-style-image: url("chrome://browser/skin/images/check-unselected-30.png");
+}
+
+.button-checkbox[checked="true"] > .button-image-icon {
+ list-style-image: url("chrome://browser/skin/images/check-selected-30.png");
+}
+
+.button-checkbox:hover:active > .button-box,
+.button-checkbox[checked="true"] > .button-box {
+ padding-top: @padding_tiny@;
+ padding-bottom: @padding_xsmall@;
+ -moz-padding-start: @margin_small@;
+ -moz-padding-end: @margin_small@;
+}
+
+/* radio buttons ----------------------------------------------------------- */
+radiogroup {
+ -moz-box-orient: horizontal;
+}
+
+.radio-label {
+ font-weight: normal;
+ font-size: @font_normal@ !important;
+}
+
+radio {
+ -moz-appearance: none;
+ min-width: @touch_button_small@ !important; /* button size */
+ min-height: @touch_button_small@ !important; /* button size */
+ color: #000;
+ padding: @padding_xnormal@;
+ margin: 0;
+ background-image: url("chrome://browser/skin/images/button-bg.png");
+ background-size: auto 100%;
+ border-top: @border_width_tiny@ solid #cacdd5;
+ border-bottom: @border_width_tiny@ solid #cacdd5;
+}
+
+radio .radio-icon, radio .radio-check {
+ display: none;
+}
+
+radio:not([disabled=true]):hover:active,
+radio[selected] {
+ color: white;
+ background-image: url("chrome://browser/skin/images/toggle-on.png");
+}
+
+radio:first-child {
+ border-left: @border_width_tiny@ solid #cacdd5;
+ border-radius: @border_radius_normal@ 0 0 @border_radius_normal@;
+}
+
+radio:first-child:-moz-locale-dir(rtl) {
+ border-left: none;
+ border-right: @border_width_tiny@ solid #cacdd5;
+ border-radius: 0 @border_radius_normal@ @border_radius_normal@ 0;
+}
+
+radio:last-child {
+ border-right: @border_width_tiny@ solid #cacdd5;
+ border-radius: 0 @border_radius_normal@ @border_radius_normal@ 0;
+}
+
+radio:last-child:-moz-locale-dir(rtl) {
+ border-right: none;
+ border-left: @border_width_tiny@ solid #cacdd5;
+ border-radius: @border_radius_normal@ 0 0 @border_radius_normal@;
+}
+
+radio[focused="true"] > .radio-label-box {
+ border: @border_width_tiny@ solid transparent;
+}
+
+/* checkbox radios --------------------------------------------------------- */
+checkbox {
+ margin: @margin_tiny@ @margin_small@ @margin_tiny@ @margin_small@; /* match platform style for buttons */
+}
+
+radio.checkbox-radio-on:not([selected]) {
+ border-right: @border_width_tiny@ solid #cacdd5;
+}
+
+radio.checkbox-radio-on:not([selected]):-moz-locale-dir(rtl) {
+ border-left: none;
+ border-left: @border_width_tiny@ solid #cacdd5;
+}
+
+radio.checkbox-radio-off[selected],
+radio.checkbox-radio-off:hover:active {
+ background-image: url("chrome://browser/skin/images/toggle-off.png");
+ color: black;
+ background-repeat: repeat-x;
+}
+
+radio.checkbox-radio-on:not([selected]) .radio-label-box,
+radio.checkbox-radio-off:not([selected]) .radio-label-box {
+ visibility: hidden;
+}
+
+/* richlistbox ------------------------------------------------------------- */
+richlistbox {
+ -moz-user-focus: ignore;
+ margin: 0;
+}
+
+richlistitem {
+ -moz-user-focus: ignore;
+ min-height: @touch_row@; /* row size */
+ padding: @padding_small@;
+ border-bottom: @border_width_tiny@ solid rgb(207,207,207);
+}
+
+richlistitem label.title,
+richlistitem description.title {
+ font-size: @font_normal@ !important;
+}
+
+richlistitem label.normal,
+richlistitem description.normal {
+ color: gray;
+ font-size: @font_small@ !important;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+richlistitem label.normal-black,
+richlistitem description.normal-black {
+ font-size: @font_small@ !important;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+richlistitem label.normal-bold,
+richlistitem description.normal-bold {
+ font-weight: bold;
+ font-size: @font_small@ !important;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+richlistitem[selected="true"] {
+ color: black;
+ background-color: white;
+}
+
+richlistitem:hover:active:not([selected="true"]):not([nohighlight="true"]) {
+ background-color: #8db8d8;
+}
+
+richlistitem.section-header,
+richlistitem[selected="true"].section-header {
+ font-weight: bold;
+ color: #000;
+ background-color: lightgray;
+}
+
+richlistitem .show-on-select {
+ visibility: collapse;
+}
+
+richlistitem[selected="true"] .show-on-select {
+ visibility: visible;
+}
+
+richlistitem .hide-on-select {
+ visibility: visible;
+}
+
+richlistitem[selected="true"] .hide-on-select {
+ visibility: collapse;
+}
+
+richlistitem[typeName="message"] {
+ border-bottom: 0;
+}
+
+/* colorpicker ------------------------------------------------------------- */
+colorpicker > panel {
+ background-color: #767973;
+}
+
+colorpicker > vbox {
+ background-color: #767973;
+}
+
+/* textbox ----------------------------------------------------------------- */
+.textbox-search-icon {
+ list-style-image: url("chrome://browser/skin/images/search-glass-30.png");
+ -moz-image-region: auto;
+}
+
+.textbox-search-clear {
+ list-style-image: url("chrome://browser/skin/images/search-clear-30.png");
+ -moz-image-region: auto;
+}
+
+/* menulist ---------------------------------------------------------------- */
+.menulist-label {
+ font-family: "Nokia Sans", Tahoma, sans-serif !important;
+ font-weight: normal;
+ font-size: @font_normal@ !important;
+ background-color: transparent !important;
+}
+
+menulist {
+ -moz-appearance: none !important;
+ -moz-user-focus: ignore;
+ min-width: @touch_button_small@ !important; /* button size */
+ min-height: @touch_button_small@ !important; /* button size */
+ color: #000 !important;
+ border-radius: @border_radius_normal@;
+ margin: @margin_normal@;
+ padding: @padding_small@ @padding_xnormal@;
+ background-image: url("chrome://browser/skin/images/button-bg.png");
+ background-size: auto 100%;
+ border: @border_width_tiny@ solid #cacdd5;
+}
+
+menulist[disabled="true"] {
+ color: #aaa !important;
+ border: @border_width_tiny@ solid #cacdd5 !important;
+}
+
+menulist:not([disabled="true"]):hover:active {
+ background-image: url("chrome://browser/skin/images/toggle-off.png");
+}
+
+menulist > dropmarker {
+ height: 32px;
+ width: 32px;
+ margin-left: @margin_snormal@;
+ background-color: transparent; /* for windows */
+ border: none; /* for windows */
+ -moz-box-align: center;
+ -moz-box-pack: center;
+ list-style-image: url("chrome://browser/skin/images/dropmarker-hdpi.png");
+ -moz-image-region: auto;
+ display: block;
+}
+
+menulist[disabled="true"] > dropmarker {
+ opacity: 0.5;
+}
+
+/* progressmeter ----------------------------------------------------------- */
+progressmeter {
+ background-color: #fff;
+ padding: @padding_small@;
+ height: @textbox_height@;
+ border: @border_width_large@ solid #aaa;
+ -moz-border-top-colors: -moz-initial;
+ -moz-border-right-colors: -moz-initial;
+ -moz-border-bottom-colors: -moz-initial;
+ -moz-border-left-colors: -moz-initial;
+ -moz-border-radius: @border_radius_normal@;
+}
+
+.progress-bar {
+ background-color: #8db8d8;
+}
+
+/* panels / arrowboxes------------------------------------------------------ */
+arrowbox {
+ -moz-appearance: none;
+ background: transparent !important;
+ border: none;
+}
+
+.arrowbox-dark .panel-arrowcontent,
+.panel-dark {
+ color: white;
+ background: rgb(94,97,102);
+}
+
+.arrowbox-dark .panel-arrowcontent {
+ border: @border_width_large@ solid white;
+ border-radius: @border_radius_normal@;
+ box-shadow: black 0 @shadow_width_small@ @shadow_width_small@;
+}
+
+.panel-arrow[side="top"] {
+ list-style-image: url("chrome://browser/skin/images/arrowbox-up.png");
+ margin-bottom: -@margin_normal@;
+}
+
+.panel-arrow[side="bottom"] {
+ list-style-image: url("chrome://browser/skin/images/arrowbox-down.png");
+ margin-top: -@margin_normal@;
+}
+
+.panel-arrow[side="left"] {
+ list-style-image: url("chrome://browser/skin/images/arrowbox-horiz.png");
+ margin-right: -@margin_normal@;
+ -moz-transform: scaleX(-1);
+}
+
+.panel-arrow[side="right"] {
+ list-style-image: url("chrome://browser/skin/images/arrowbox-horiz.png");
+ margin-left: -@margin_normal@;
+}
+
+/*.panel-row-header ------------------------------------------------------------ */
+.panel-row-header {
+ border-bottom: @border_width_xlarge@ solid rgb(101,121,227);
+ background-color: rgb(94,97,102);
+ padding: 0 !important;
+}
+
+.panel-row-button {
+ -moz-appearance: none;
+ background: rgb(94,97,102) url(images/panelrow-default-hdpi.png) no-repeat;
+ background-size: 100% 100%;
+ color: white;
+ border: 0 solid transparent !important;
+ -moz-border-start: @border_width_tiny@ solid rgba(255,255,255,0.2) !important;
+ -moz-border-end: @border_width_tiny@ solid rgba(0,0,0,0.2) !important;
+ padding-top: @padding_xsmall@ !important;
+ padding-bottom: @padding_xsmall@ !important;
+ -moz-padding-start: @padding_xsmall@ !important;
+ -moz-padding-end: @padding_xsmall@ !important;
+ -moz-box-flex: 1;
+ -moz-user-focus: ignore;
+ -moz-user-select: none;
+}
+
+.panel-row-button:hover:active {
+ background: rgb(94,97,102) url(images/panelrow-active-hdpi.png) no-repeat;
+ background-size: 100% 100%;
+}
+
+.panel-row-button:first-child {
+ -moz-border-start-width: 0 !important;
+}
+
+.panel-row-button:last-child {
+ -moz-border-end-width: 0 !important;
+}
+
+@media (@orientation@: portrait) {
+ .panel-row-button {
+ -moz-box-orient: vertical;
+ }
+
+ .panel-row-button .toolbarbutton-text {
+ font-size: @font_xsmall@ !important;
+ }
+}
+
+.panel-row-button .toolbarbutton-text {
+ text-align: left;
+ text-shadow: rgba(0,0,0,0.3) 0 @shadow_width_small@;
+}
+
+.panel-row-button .toolbarbutton-text:-moz-locale-dir(rtl) {
+ text-align: right;
+}
+
+.panel-row-button[disabled="true"] {
+ pointer-events: none;
+}
+
+.panel-row-button[disabled="true"] .toolbarbutton-icon {
+ opacity: 0.5;
+}
+
+.panel-row-button[disabled="true"] .toolbarbutton-text {
+ color: #aaa;
+}
+
+.panel-row-button[checked="true"] {
+ color: white !important;
+ background: rgb(94, 97, 102) url(images/panelrow-selected-hdpi.png) no-repeat !important;
+ background-size: 100% 100% !important;
+}
+
+.panel-row-button[checked="true"],
+.panel-row-button[disabled="true"] {
+ pointer-events: none;
+}
diff --git a/mobile/themes/core/touchcontrols.css b/mobile/themes/core/touchcontrols.css
new file mode 100644
index 000000000000..022476b4cc8a
--- /dev/null
+++ b/mobile/themes/core/touchcontrols.css
@@ -0,0 +1,169 @@
+@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
+
+/* video controls */
+.controlsOverlay {
+ -moz-box-pack: center;
+ -moz-box-align: end;
+ padding: 20px;
+ -moz-box-flex: 1;
+ -moz-box-orient: horizontal;
+}
+
+.controlBar {
+ -moz-box-flex: 1;
+ font-size: 16pt;
+ padding: 10px;
+ background-color: #34353a;
+ border-radius: 8px;
+ width: 100%;
+}
+
+.controlsSpacer {
+ display: none;
+ -moz-box-flex: 0;
+}
+
+.playButton,
+.muteButton {
+ -moz-appearance: none;
+ min-height: 42px;
+ min-width: 42px;
+ border: none !important;
+}
+
+.playButton {
+ -moz-transform: translateX(21px);
+ background: url("chrome://browser/skin/images/pause-hdpi.png") no-repeat center;
+}
+
+.playButton[paused="true"] {
+ background: url("chrome://browser/skin/images/play-hdpi.png") no-repeat center;
+}
+
+.muteButton {
+ background: url("chrome://browser/skin/images/mute-hdpi.png") no-repeat center;
+}
+
+.muteButton[muted="true"] {
+ background: url("chrome://browser/skin/images/unmute-hdpi.png") no-repeat center;
+}
+
+/* bars */
+.scrubberStack {
+ width: 100%;
+ min-height: 32px;
+ max-height: 32px;
+ padding: 0px 8px;
+ margin: 0px;
+}
+
+.bufferBar,
+.bufferBar .progress-bar,
+.progressBar,
+.progressBar .progress-bar,
+.scrubber,
+.scrubber .scale-slider,
+.scrubber .scale-thumb {
+ -moz-appearance: none;
+ border: none;
+ padding: 0px;
+ margin: 0px;
+ background-color: transparent;
+}
+
+.bufferBar {
+ border: 1px solid #5e6166;
+}
+
+.bufferBar,
+.progressBar {
+ margin: 9px 0px 11px 0px;
+ height: 8px
+}
+
+.bufferBar .progress-bar {
+ background-color: #5e6166;
+}
+
+.progressBar .progress-bar {
+ background-color: white;
+}
+
+.scrubber {
+ margin-left: -16px;
+ margin-right: -16px;
+}
+
+.scrubber .scale-thumb {
+ display: -moz-box;
+ background: url("chrome://browser/skin/images/scrubber-hdpi.png") no-repeat;
+ height: 32px;
+ width: 32px;
+}
+
+.durationBox {
+ -moz-box-orient: horizontal;
+ -moz-box-pack: start;
+ -moz-box-align: center;
+ color: white;
+ font-weight: bold;
+ padding: 0px 8px;
+ margin-top: -6px;
+}
+
+.positionLabel {
+ -moz-box-flex: 1;
+}
+
+.statusOverlay {
+ -moz-box-align: center;
+ -moz-box-pack: center;
+ background-color: rgb(50,50,50);
+}
+
+.statusIcon {
+ margin-bottom: 28px;
+ width: 36px;
+ height: 36px;
+}
+
+.statusIcon[type="throbber"] {
+ background: url(chrome://global/skin/media/throbber.png) no-repeat center;
+}
+
+.statusIcon[type="error"] {
+ background: url(chrome://global/skin/media/error.png) no-repeat center;
+}
+
+/* CSS Transitions */
+.controlBar:not([immediate]) {
+ -moz-transition-property: opacity;
+ -moz-transition-duration: 200ms;
+}
+
+.controlBar[fadeout] {
+ opacity: 0;
+}
+
+.statusOverlay:not([immediate]) {
+ -moz-transition-property: opacity;
+ -moz-transition-duration: 300ms;
+ -moz-transition-delay: 750ms;
+}
+
+.statusOverlay[fadeout] {
+ opacity: 0;
+}
+
+.volumeStack,
+.controlBar[firstshow="true"] .muteButton,
+.controlBar[firstshow="true"] .scrubberStack,
+.controlBar[firstshow="true"] .durationBox,
+.timeLabel {
+ display: none;
+}
+
+.controlBar[firstshow="true"] .playButton {
+ -moz-transform: none;
+}
+