Merge m-c to s-c.
|
@ -1542,31 +1542,19 @@ nsAccessible::State()
|
|||
|
||||
if (!(state & states::UNAVAILABLE)) {
|
||||
state |= states::ENABLED | states::SENSITIVE;
|
||||
|
||||
// If the object is a current item of container widget then mark it as
|
||||
// ACTIVE. This allows screen reader virtual buffer modes to know which
|
||||
// descendant is the current one that would get focus if the user navigates
|
||||
// to the container widget.
|
||||
nsAccessible* widget = ContainerWidget();
|
||||
if (widget && widget->CurrentItem() == this)
|
||||
state |= states::ACTIVE;
|
||||
}
|
||||
|
||||
if ((state & states::COLLAPSED) || (state & states::EXPANDED))
|
||||
state |= states::EXPANDABLE;
|
||||
|
||||
if (mRoleMapEntry) {
|
||||
// If an object has an ancestor with the activedescendant property
|
||||
// pointing at it, we mark it as ACTIVE even if it's not currently focused.
|
||||
// This allows screen reader virtual buffer modes to know which descendant
|
||||
// is the current one that would get focus if the user navigates to the container widget.
|
||||
nsAutoString id;
|
||||
if (nsCoreUtils::GetID(mContent, id)) {
|
||||
nsIContent *ancestorContent = mContent;
|
||||
nsAutoString activeID;
|
||||
while ((ancestorContent = ancestorContent->GetParent()) != nsnull) {
|
||||
if (ancestorContent->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant, activeID)) {
|
||||
if (id == activeID) {
|
||||
state |= states::ACTIVE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For some reasons DOM node may have not a frame. We tract such accessibles
|
||||
// as invisible.
|
||||
nsIFrame *frame = GetFrame();
|
||||
|
@ -2955,15 +2943,18 @@ nsAccessible::ContainerWidget() const
|
|||
nsIAtom* idAttribute = mContent->GetIDAttributeName();
|
||||
if (idAttribute) {
|
||||
if (mContent->HasAttr(kNameSpaceID_None, idAttribute)) {
|
||||
nsAccessible* parent = Parent();
|
||||
do {
|
||||
for (nsAccessible* parent = Parent(); parent; parent = parent->Parent()) {
|
||||
nsIContent* parentContent = parent->GetContent();
|
||||
if (parentContent &&
|
||||
parentContent->HasAttr(kNameSpaceID_None,
|
||||
nsGkAtoms::aria_activedescendant)) {
|
||||
return parent;
|
||||
}
|
||||
} while ((parent = parent->Parent()));
|
||||
|
||||
// Don't cross DOM document boundaries.
|
||||
if (parent->IsDocumentNode())
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nsnull;
|
||||
|
|
|
@ -303,16 +303,14 @@ nsTextEquivUtils::AppendFromValue(nsAccessible *aAccessible,
|
|||
|
||||
nsIContent *content = aAccessible->GetContent();
|
||||
|
||||
nsCOMPtr<nsIContent> parent = content->GetParent();
|
||||
PRInt32 indexOf = parent->IndexOf(content);
|
||||
|
||||
for (PRInt32 i = indexOf - 1; i >= 0; i--) {
|
||||
for (nsIContent* childContent = content->GetPreviousSibling(); childContent;
|
||||
childContent = childContent->GetPreviousSibling()) {
|
||||
// check for preceding text...
|
||||
if (!parent->GetChildAt(i)->TextIsOnlyWhitespace()) {
|
||||
PRUint32 childCount = parent->GetChildCount();
|
||||
for (PRUint32 j = indexOf + 1; j < childCount; j++) {
|
||||
if (!childContent->TextIsOnlyWhitespace()) {
|
||||
for (nsIContent* siblingContent = content->GetNextSibling(); siblingContent;
|
||||
siblingContent = siblingContent->GetNextSibling()) {
|
||||
// .. and subsequent text
|
||||
if (!parent->GetChildAt(j)->TextIsOnlyWhitespace()) {
|
||||
if (!siblingContent->TextIsOnlyWhitespace()) {
|
||||
nsresult rv = aAccessible->GetValue(text);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -332,10 +330,8 @@ nsresult
|
|||
nsTextEquivUtils::AppendFromDOMChildren(nsIContent *aContent,
|
||||
nsAString *aString)
|
||||
{
|
||||
PRUint32 childCount = aContent->GetChildCount();
|
||||
for (PRUint32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
nsCOMPtr<nsIContent> childContent = aContent->GetChildAt(childIdx);
|
||||
|
||||
for (nsIContent* childContent = aContent->GetFirstChild(); childContent;
|
||||
childContent = childContent->GetNextSibling()) {
|
||||
nsresult rv = AppendFromDOMNode(childContent, aString);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
|
|
@ -720,11 +720,11 @@ nsHTMLGroupboxAccessible::NativeRole()
|
|||
return nsIAccessibleRole::ROLE_GROUPING;
|
||||
}
|
||||
|
||||
nsIContent* nsHTMLGroupboxAccessible::GetLegend()
|
||||
nsIContent*
|
||||
nsHTMLGroupboxAccessible::GetLegend()
|
||||
{
|
||||
nsresult count = 0;
|
||||
nsIContent *legendContent = nsnull;
|
||||
while ((legendContent = mContent->GetChildAt(count++)) != nsnull) {
|
||||
for (nsIContent* legendContent = mContent->GetFirstChild(); legendContent;
|
||||
legendContent = legendContent->GetNextSibling()) {
|
||||
if (legendContent->NodeInfo()->Equals(nsGkAtoms::legend,
|
||||
mContent->GetNameSpaceID())) {
|
||||
// Either XHTML namespace or no namespace
|
||||
|
|
|
@ -171,9 +171,8 @@ void
|
|||
nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
PRUint32 numChildren = aParentContent->GetChildCount();
|
||||
for (PRUint32 count = 0; count < numChildren; count ++) {
|
||||
nsIContent *childContent = aParentContent->GetChildAt(count);
|
||||
for (nsIContent* childContent = aParentContent->GetFirstChild(); childContent;
|
||||
childContent = childContent->GetNextSibling()) {
|
||||
if (!childContent->IsHTML()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -230,7 +229,7 @@ nsHTMLSelectOptionAccessible::GetNameInternal(nsAString& aName)
|
|||
|
||||
// CASE #2 -- no label parameter, get the first child,
|
||||
// use it if it is a text node
|
||||
nsIContent *text = mContent->GetChildAt(0);
|
||||
nsIContent* text = mContent->GetFirstChild();
|
||||
if (!text)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -345,14 +344,12 @@ void
|
|||
nsHTMLSelectOptionAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
||||
PRInt32 *aSetSize)
|
||||
{
|
||||
nsIContent *parentContent = mContent->GetParent();
|
||||
|
||||
PRInt32 posInSet = 0, setSize = 0;
|
||||
bool isContentFound = false;
|
||||
|
||||
PRUint32 childCount = parentContent->GetChildCount();
|
||||
for (PRUint32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
nsIContent *childContent = parentContent->GetChildAt(childIdx);
|
||||
nsIContent* parentContent = mContent->GetParent();
|
||||
for (nsIContent* childContent = parentContent->GetFirstChild(); childContent;
|
||||
childContent = childContent->GetNextSibling()) {
|
||||
if (childContent->NodeInfo()->Equals(mContent->NodeInfo())) {
|
||||
if (!isContentFound) {
|
||||
if (childContent == mContent)
|
||||
|
@ -789,7 +786,7 @@ void nsHTMLComboboxListAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBo
|
|||
}
|
||||
|
||||
// Get the first option.
|
||||
nsIContent* content = mContent->GetChildAt(0);
|
||||
nsIContent* content = mContent->GetFirstChild();
|
||||
if (!content) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -406,28 +406,25 @@ nsHTMLTableHeaderCellAccessible::NativeRole()
|
|||
|
||||
// Assume it's columnheader if there are headers in siblings, oterwise
|
||||
// rowheader.
|
||||
nsIContent *parent = mContent->GetParent();
|
||||
if (!parent) {
|
||||
nsIContent* parentContent = mContent->GetParent();
|
||||
if (!parentContent) {
|
||||
NS_ERROR("Deattached content on alive accessible?");
|
||||
return nsIAccessibleRole::ROLE_NOTHING;
|
||||
}
|
||||
|
||||
PRInt32 indexInParent = parent->IndexOf(mContent);
|
||||
|
||||
for (PRInt32 idx = indexInParent - 1; idx >= 0; idx--) {
|
||||
nsIContent* sibling = parent->GetChildAt(idx);
|
||||
if (sibling && sibling->IsElement()) {
|
||||
if (nsCoreUtils::IsHTMLTableHeader(sibling))
|
||||
for (nsIContent* siblingContent = mContent->GetPreviousSibling(); siblingContent;
|
||||
siblingContent = siblingContent->GetPreviousSibling()) {
|
||||
if (siblingContent->IsElement()) {
|
||||
if (nsCoreUtils::IsHTMLTableHeader(siblingContent))
|
||||
return nsIAccessibleRole::ROLE_COLUMNHEADER;
|
||||
return nsIAccessibleRole::ROLE_ROWHEADER;
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32 childCount = parent->GetChildCount();
|
||||
for (PRInt32 idx = indexInParent + 1; idx < childCount; idx++) {
|
||||
nsIContent* sibling = parent->GetChildAt(idx);
|
||||
if (sibling && sibling->IsElement()) {
|
||||
if (nsCoreUtils::IsHTMLTableHeader(sibling))
|
||||
for (nsIContent* siblingContent = mContent->GetNextSibling(); siblingContent;
|
||||
siblingContent = siblingContent->GetNextSibling()) {
|
||||
if (siblingContent->IsElement()) {
|
||||
if (nsCoreUtils::IsHTMLTableHeader(siblingContent))
|
||||
return nsIAccessibleRole::ROLE_COLUMNHEADER;
|
||||
return nsIAccessibleRole::ROLE_ROWHEADER;
|
||||
}
|
||||
|
|
|
@ -391,9 +391,9 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
|
|||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
if (mChildren)
|
||||
if (mChildren || !mGeckoAccessible->AreChildrenCached())
|
||||
return mChildren;
|
||||
|
||||
|
||||
mChildren = [[NSMutableArray alloc] init];
|
||||
|
||||
// get the array of children.
|
||||
|
|
|
@ -83,8 +83,6 @@ class nsAccessibleWrap : public nsAccessible
|
|||
// to the user. it also has no native accessible object represented for it.
|
||||
bool IsIgnored();
|
||||
|
||||
PRInt32 GetUnignoredChildCount(bool aDeepCount);
|
||||
|
||||
bool HasPopup () {
|
||||
return (NativeState() & mozilla::a11y::states::HASPOPUP);
|
||||
}
|
||||
|
|
|
@ -210,42 +210,6 @@ nsAccessibleWrap::InvalidateChildren()
|
|||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsAccessibleWrap::GetUnignoredChildCount(bool aDeepCount)
|
||||
{
|
||||
// if we're flat, we have no children.
|
||||
if (nsAccUtils::MustPrune(this))
|
||||
return 0;
|
||||
|
||||
PRInt32 resultChildCount = 0;
|
||||
|
||||
PRInt32 childCount = GetChildCount();
|
||||
for (PRInt32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
nsAccessibleWrap *childAcc =
|
||||
static_cast<nsAccessibleWrap*>(GetChildAt(childIdx));
|
||||
|
||||
// if the current child is not ignored, count it.
|
||||
if (!childAcc->IsIgnored())
|
||||
++resultChildCount;
|
||||
|
||||
// if it's flat, we don't care to inspect its children.
|
||||
if (nsAccUtils::MustPrune(childAcc))
|
||||
continue;
|
||||
|
||||
if (aDeepCount) {
|
||||
// recursively count the unignored children of our children since it's a deep count.
|
||||
resultChildCount += childAcc->GetUnignoredChildCount(true);
|
||||
} else {
|
||||
// no deep counting, but if the child is ignored, we want to substitute it for its
|
||||
// children.
|
||||
if (childAcc->IsIgnored())
|
||||
resultChildCount += childAcc->GetUnignoredChildCount(false);
|
||||
}
|
||||
}
|
||||
|
||||
return resultChildCount;
|
||||
}
|
||||
|
||||
// if we for some reason have no native accessible, we should be skipped over (and traversed)
|
||||
// when fetching all unignored children, etc. when counting unignored children, we will not be counted.
|
||||
bool
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* ***** 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) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Alexander Surkov <surkov.alexander@gmail.com> (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 ***** */
|
||||
|
||||
#include "Compatibility.h"
|
||||
|
||||
#include "nsWinUtils.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
/**
|
||||
* Return true if module version is lesser than the given version.
|
||||
*/
|
||||
bool
|
||||
IsModuleVersionLessThan(HMODULE aModuleHandle, DWORD aMajor, DWORD aMinor)
|
||||
{
|
||||
PRUnichar fileName[MAX_PATH];
|
||||
::GetModuleFileNameW(aModuleHandle, fileName, MAX_PATH);
|
||||
|
||||
DWORD dummy = 0;
|
||||
DWORD length = ::GetFileVersionInfoSizeW(fileName, &dummy);
|
||||
|
||||
LPBYTE versionInfo = new BYTE[length];
|
||||
::GetFileVersionInfoW(fileName, 0, length, versionInfo);
|
||||
|
||||
UINT uLen;
|
||||
VS_FIXEDFILEINFO* fixedFileInfo = NULL;
|
||||
::VerQueryValueW(versionInfo, L"\\", (LPVOID*)&fixedFileInfo, &uLen);
|
||||
DWORD dwFileVersionMS = fixedFileInfo->dwFileVersionMS;
|
||||
DWORD dwFileVersionLS = fixedFileInfo->dwFileVersionLS;
|
||||
delete [] versionInfo;
|
||||
|
||||
DWORD dwLeftMost = HIWORD(dwFileVersionMS);
|
||||
DWORD dwSecondRight = HIWORD(dwFileVersionLS);
|
||||
return (dwLeftMost < aMajor ||
|
||||
(dwLeftMost == aMajor && dwSecondRight < aMinor));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Compatibility
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PRUint32 Compatibility::sMode = Compatibility::NoCompatibilityMode;
|
||||
|
||||
void
|
||||
Compatibility::Init()
|
||||
{
|
||||
HMODULE jawsHandle = ::GetModuleHandleW(L"jhook");
|
||||
if (jawsHandle) {
|
||||
sMode |= JAWSMode;
|
||||
// IA2 off mode for JAWS versions below 8.0.2173.
|
||||
if (IsModuleVersionLessThan(jawsHandle, 8, 2173))
|
||||
sMode |= IA2OffMode;
|
||||
}
|
||||
|
||||
if (::GetModuleHandleW(L"gwm32inc"))
|
||||
sMode |= WEMode;
|
||||
if (::GetModuleHandleW(L"dolwinhk"))
|
||||
sMode |= DolphinMode;
|
||||
|
||||
// Turn off new tab switching for Jaws and WE.
|
||||
if (sMode & JAWSMode || sMode & WEMode) {
|
||||
// Check to see if the pref for disallowing CtrlTab is already set. If so,
|
||||
// bail out (respect the user settings). If not, set it.
|
||||
if (!Preferences::HasUserValue("browser.ctrlTab.disallowForScreenReaders"))
|
||||
Preferences::SetBool("browser.ctrlTab.disallowForScreenReaders", true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* ***** 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) 2011
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Alexander Surkov <surkov.alexander@gmail.com> (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 ***** */
|
||||
|
||||
#ifndef COMPATIBILITY_MANAGER_H
|
||||
#define COMPATIBILITY_MANAGER_H
|
||||
|
||||
#include "prtypes.h"
|
||||
|
||||
class nsAccessNodeWrap;
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
/**
|
||||
* Used to get compatibility modes. Note, modes are computed at accessibility
|
||||
* start up time and aren't changed during lifetime.
|
||||
*/
|
||||
class Compatibility
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Return true if IAccessible2 disabled.
|
||||
*/
|
||||
static bool IsIA2Off() { return sMode & IA2OffMode; }
|
||||
|
||||
/**
|
||||
* Return true if JAWS mode is enabled.
|
||||
*/
|
||||
static bool IsJAWS() { return sMode & JAWSMode; }
|
||||
|
||||
/**
|
||||
* Return true if WE mode is enabled.
|
||||
*/
|
||||
static bool IsWE() { return sMode & WEMode; }
|
||||
|
||||
/**
|
||||
* Return true if Dolphin mode is enabled.
|
||||
*/
|
||||
static bool IsDolphin() { return sMode & DolphinMode; }
|
||||
|
||||
private:
|
||||
Compatibility();
|
||||
Compatibility(const Compatibility&);
|
||||
Compatibility& operator = (const Compatibility&);
|
||||
|
||||
/**
|
||||
* Initialize compatibility mode. Called by nsAccessNodeWrap during
|
||||
* accessibility initialization.
|
||||
*/
|
||||
static void Init();
|
||||
friend class nsAccessNodeWrap;
|
||||
|
||||
/**
|
||||
* List of compatibility modes.
|
||||
*/
|
||||
enum {
|
||||
NoCompatibilityMode = 0,
|
||||
JAWSMode = 1 << 0,
|
||||
WEMode = 1 << 1,
|
||||
DolphinMode = 1 << 2,
|
||||
IA2OffMode = 1 << 3
|
||||
};
|
||||
|
||||
private:
|
||||
static PRUint32 sMode;
|
||||
};
|
||||
|
||||
} // a11y namespace
|
||||
} // mozilla namespace
|
||||
|
||||
#endif
|
|
@ -74,6 +74,7 @@ CPPSRCS = \
|
|||
CAccessibleTable.cpp \
|
||||
CAccessibleTableCell.cpp \
|
||||
CAccessibleValue.cpp \
|
||||
Compatibility.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "AccessibleApplication.h"
|
||||
#include "ISimpleDOMNode_i.c"
|
||||
|
||||
#include "Compatibility.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsApplicationAccessibleWrap.h"
|
||||
#include "nsCoreUtils.h"
|
||||
|
@ -70,20 +71,8 @@ LPFNLRESULTFROMOBJECT nsAccessNodeWrap::gmLresultFromObject = NULL;
|
|||
LPFNNOTIFYWINEVENT nsAccessNodeWrap::gmNotifyWinEvent = nsnull;
|
||||
LPFNGETGUITHREADINFO nsAccessNodeWrap::gmGetGUIThreadInfo = nsnull;
|
||||
|
||||
// Used to determine whether an IAccessible2 compatible screen reader is loaded.
|
||||
bool nsAccessNodeWrap::gIsIA2Disabled = false;
|
||||
|
||||
AccTextChangeEvent* nsAccessNodeWrap::gTextEvent = nsnull;
|
||||
|
||||
// Pref to disallow CtrlTab preview functionality if JAWS or Window-Eyes are
|
||||
// running.
|
||||
#define CTRLTAB_DISALLOW_FOR_SCREEN_READERS_PREF "browser.ctrlTab.disallowForScreenReaders"
|
||||
|
||||
|
||||
/* For documentation of the accessibility architecture,
|
||||
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNodeWrap
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -613,7 +602,7 @@ void nsAccessNodeWrap::InitAccessibility()
|
|||
gmGetGUIThreadInfo = (LPFNGETGUITHREADINFO)GetProcAddress(gmUserLib,"GetGUIThreadInfo");
|
||||
}
|
||||
|
||||
DoATSpecificProcessing();
|
||||
Compatibility::Init();
|
||||
|
||||
nsWinUtils::MaybeStartWindowEmulation();
|
||||
|
||||
|
@ -671,73 +660,6 @@ GetHRESULT(nsresult aResult)
|
|||
}
|
||||
}
|
||||
|
||||
bool nsAccessNodeWrap::IsOnlyMsaaCompatibleJawsPresent()
|
||||
{
|
||||
HMODULE jhookhandle = ::GetModuleHandleW(kJAWSModuleHandle);
|
||||
if (!jhookhandle)
|
||||
return false; // No JAWS, or some other screen reader, use IA2
|
||||
|
||||
PRUnichar fileName[MAX_PATH];
|
||||
::GetModuleFileNameW(jhookhandle, fileName, MAX_PATH);
|
||||
|
||||
DWORD dummy;
|
||||
DWORD length = ::GetFileVersionInfoSizeW(fileName, &dummy);
|
||||
|
||||
LPBYTE versionInfo = new BYTE[length];
|
||||
::GetFileVersionInfoW(fileName, 0, length, versionInfo);
|
||||
|
||||
UINT uLen;
|
||||
VS_FIXEDFILEINFO *fixedFileInfo;
|
||||
::VerQueryValueW(versionInfo, L"\\", (LPVOID*)&fixedFileInfo, &uLen);
|
||||
DWORD dwFileVersionMS = fixedFileInfo->dwFileVersionMS;
|
||||
DWORD dwFileVersionLS = fixedFileInfo->dwFileVersionLS;
|
||||
delete [] versionInfo;
|
||||
|
||||
DWORD dwLeftMost = HIWORD(dwFileVersionMS);
|
||||
// DWORD dwSecondLeft = LOWORD(dwFileVersionMS);
|
||||
DWORD dwSecondRight = HIWORD(dwFileVersionLS);
|
||||
// DWORD dwRightMost = LOWORD(dwFileVersionLS);
|
||||
|
||||
return (dwLeftMost < 8
|
||||
|| (dwLeftMost == 8 && dwSecondRight < 2173));
|
||||
}
|
||||
|
||||
void nsAccessNodeWrap::TurnOffNewTabSwitchingForJawsAndWE()
|
||||
{
|
||||
HMODULE srHandle = ::GetModuleHandleW(kJAWSModuleHandle);
|
||||
if (!srHandle) {
|
||||
// No JAWS, try Window-Eyes
|
||||
srHandle = ::GetModuleHandleW(kWEModuleHandle);
|
||||
if (!srHandle) {
|
||||
// no screen reader we're interested in. Bail out.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if the pref for disallowing CtrlTab is already set.
|
||||
// If so, bail out.
|
||||
// If not, set it.
|
||||
if (Preferences::HasUserValue(CTRLTAB_DISALLOW_FOR_SCREEN_READERS_PREF)) {
|
||||
// This pref has been set before. There is no default for it.
|
||||
// Do nothing further, respect the setting that's there.
|
||||
// That way, if noone touches it, it'll stay on after toggled once.
|
||||
// If someone decided to turn it off, we respect that, too.
|
||||
return;
|
||||
}
|
||||
|
||||
// Value has never been set, set it.
|
||||
Preferences::SetBool(CTRLTAB_DISALLOW_FOR_SCREEN_READERS_PREF, true);
|
||||
}
|
||||
|
||||
void nsAccessNodeWrap::DoATSpecificProcessing()
|
||||
{
|
||||
if (IsOnlyMsaaCompatibleJawsPresent())
|
||||
// All versions below 8.0.2173 are not compatible
|
||||
gIsIA2Disabled = true;
|
||||
|
||||
TurnOffNewTabSwitchingForJawsAndWE();
|
||||
}
|
||||
|
||||
nsRefPtrHashtable<nsVoidPtrHashKey, nsDocAccessible> nsAccessNodeWrap::sHWNDCache;
|
||||
|
||||
LRESULT CALLBACK
|
||||
|
|
|
@ -159,12 +159,6 @@ public: // construction, destruction
|
|||
|
||||
static int FilterA11yExceptions(unsigned int aCode, EXCEPTION_POINTERS *aExceptionInfo);
|
||||
|
||||
static bool IsOnlyMsaaCompatibleJawsPresent();
|
||||
|
||||
static void TurnOffNewTabSwitchingForJawsAndWE();
|
||||
|
||||
static void DoATSpecificProcessing();
|
||||
|
||||
static STDMETHODIMP_(LRESULT) LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN pAcc);
|
||||
|
||||
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT Msg,
|
||||
|
@ -182,12 +176,6 @@ protected:
|
|||
*/
|
||||
ISimpleDOMNode *MakeAccessNode(nsINode *aNode);
|
||||
|
||||
/**
|
||||
* Used to determine whether an IAccessible2 compatible screen reader is
|
||||
* loaded. Currently used for JAWS versions older than 8.0.2173.
|
||||
*/
|
||||
static bool gIsIA2Disabled;
|
||||
|
||||
/**
|
||||
* It is used in nsHyperTextAccessibleWrap for IA2::newText/oldText
|
||||
* implementation.
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "nsAccessibleWrap.h"
|
||||
|
||||
#include "Compatibility.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsWinUtils.h"
|
||||
|
@ -129,7 +130,7 @@ __try {
|
|||
*ppv = static_cast<IEnumVARIANT*>(this);
|
||||
} else if (IID_IServiceProvider == iid)
|
||||
*ppv = static_cast<IServiceProvider*>(this);
|
||||
else if (IID_IAccessible2 == iid && !gIsIA2Disabled)
|
||||
else if (IID_IAccessible2 == iid && !Compatibility::IsIA2Off())
|
||||
*ppv = static_cast<IAccessible2*>(this);
|
||||
|
||||
if (NULL == *ppv) {
|
||||
|
@ -1592,11 +1593,13 @@ nsAccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
|
|||
NotifyWinEvent(winEvent, hWnd, OBJID_CLIENT, childID);
|
||||
|
||||
// JAWS announces collapsed combobox navigation based on focus events.
|
||||
if (eventType == nsIAccessibleEvent::EVENT_SELECTION &&
|
||||
accessible->Role() == nsIAccessibleRole::ROLE_COMBOBOX_OPTION &&
|
||||
nsWinUtils::IsWindowEmulationFor(kJAWSModuleHandle)) {
|
||||
NotifyWinEvent(EVENT_OBJECT_FOCUS, hWnd, OBJID_CLIENT, childID);
|
||||
if (Compatibility::IsJAWS()) {
|
||||
if (eventType == nsIAccessibleEvent::EVENT_SELECTION &&
|
||||
accessible->Role() == nsIAccessibleRole::ROLE_COMBOBOX_OPTION) {
|
||||
NotifyWinEvent(EVENT_OBJECT_FOCUS, hWnd, OBJID_CLIENT, childID);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
|
||||
#include "Compatibility.h"
|
||||
#include "nsDocAccessibleWrap.h"
|
||||
#include "ISimpleDOMDocument_i.c"
|
||||
#include "nsIAccessibilityService.h"
|
||||
|
@ -291,7 +292,7 @@ nsDocAccessibleWrap::DoInitialUpdate()
|
|||
|
||||
bool isActive = true;
|
||||
PRInt32 x = CW_USEDEFAULT, y = CW_USEDEFAULT, width = 0, height = 0;
|
||||
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle)) {
|
||||
if (Compatibility::IsDolphin()) {
|
||||
GetBounds(&x, &y, &width, &height);
|
||||
PRInt32 rootX = 0, rootY = 0, rootWidth = 0, rootHeight = 0;
|
||||
rootDocument->GetBounds(&rootX, &rootY, &rootWidth, &rootHeight);
|
||||
|
|
|
@ -38,11 +38,14 @@
|
|||
|
||||
#include "nsRootAccessibleWrap.h"
|
||||
|
||||
#include "Compatibility.h"
|
||||
#include "nsWinUtils.h"
|
||||
|
||||
#include "nsIDOMEventTarget.h"
|
||||
#include "nsEventListenerManager.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor/desctructor
|
||||
|
||||
|
@ -63,7 +66,7 @@ nsRootAccessibleWrap::~nsRootAccessibleWrap()
|
|||
void
|
||||
nsRootAccessibleWrap::DocumentActivated(nsDocAccessible* aDocument)
|
||||
{
|
||||
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle) &&
|
||||
if (Compatibility::IsDolphin() &&
|
||||
nsCoreUtils::IsTabDocument(aDocument->GetDocumentNode())) {
|
||||
PRUint32 count = mChildDocuments.Length();
|
||||
for (PRUint32 idx = 0; idx < count; idx++) {
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "nsWinUtils.h"
|
||||
|
||||
#include "Compatibility.h"
|
||||
#include "nsIWinAccessNode.h"
|
||||
#include "nsRootAccessible.h"
|
||||
|
||||
|
@ -48,6 +49,7 @@
|
|||
#include "nsIDocShellTreeItem.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
// Window property used by ipc related code in identifying accessible
|
||||
// tab windows.
|
||||
|
@ -111,11 +113,14 @@ nsWinUtils::MaybeStartWindowEmulation()
|
|||
{
|
||||
// Register window class that'll be used for document accessibles associated
|
||||
// with tabs.
|
||||
if (IsWindowEmulationFor(0)) {
|
||||
if (Compatibility::IsJAWS() || Compatibility::IsWE() ||
|
||||
Compatibility::IsDolphin() ||
|
||||
Preferences::GetBool("browser.tabs.remote")) {
|
||||
RegisterNativeWindow(kClassNameTabContent);
|
||||
nsAccessNodeWrap::sHWNDCache.Init(4);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -124,7 +129,7 @@ nsWinUtils::ShutdownWindowEmulation()
|
|||
{
|
||||
// Unregister window call that's used for document accessibles associated
|
||||
// with tabs.
|
||||
if (IsWindowEmulationFor(0))
|
||||
if (IsWindowEmulationStarted())
|
||||
::UnregisterClassW(kClassNameTabContent, GetModuleHandle(NULL));
|
||||
}
|
||||
|
||||
|
@ -184,16 +189,3 @@ nsWinUtils::HideNativeWindow(HWND aWnd)
|
|||
SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE |
|
||||
SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
bool
|
||||
nsWinUtils::IsWindowEmulationFor(LPCWSTR kModuleHandle)
|
||||
{
|
||||
// Window emulation is always enabled in multiprocess Firefox.
|
||||
if (Preferences::GetBool("browser.tabs.remote"))
|
||||
return kModuleHandle ? ::GetModuleHandleW(kModuleHandle) : true;
|
||||
|
||||
return kModuleHandle ? ::GetModuleHandleW(kModuleHandle) :
|
||||
::GetModuleHandleW(kJAWSModuleHandle) ||
|
||||
::GetModuleHandleW(kWEModuleHandle) ||
|
||||
::GetModuleHandleW(kDolphinModuleHandle);
|
||||
}
|
||||
|
|
|
@ -49,10 +49,6 @@
|
|||
const LPCWSTR kClassNameRoot = L"MozillaUIWindowClass";
|
||||
const LPCWSTR kClassNameTabContent = L"MozillaContentWindowClass";
|
||||
|
||||
const LPCWSTR kJAWSModuleHandle = L"jhook";
|
||||
const LPCWSTR kWEModuleHandle = L"gwm32inc";
|
||||
const LPCWSTR kDolphinModuleHandle = L"dolwinhk";
|
||||
|
||||
class nsWinUtils
|
||||
{
|
||||
public:
|
||||
|
@ -99,11 +95,6 @@ public:
|
|||
* Helper to hide window.
|
||||
*/
|
||||
static void HideNativeWindow(HWND aWnd);
|
||||
|
||||
/**
|
||||
* Return true if window emulation is enabled.
|
||||
*/
|
||||
static bool IsWindowEmulationFor(LPCWSTR kModuleHandle);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -256,24 +256,19 @@ nsXULListboxAccessible::GetColumnCount(PRInt32 *aColumnsCout)
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIContent* headContent = nsnull;
|
||||
|
||||
PRUint32 count = mContent->GetChildCount();
|
||||
for (PRUint32 index = 0; index < count; ++index) {
|
||||
nsIContent* childContent = mContent->GetChildAt(index);
|
||||
for (nsIContent* childContent = mContent->GetFirstChild(); childContent;
|
||||
childContent = childContent->GetNextSibling()) {
|
||||
if (childContent->NodeInfo()->Equals(nsGkAtoms::listcols,
|
||||
kNameSpaceID_XUL)) {
|
||||
headContent = childContent;
|
||||
}
|
||||
}
|
||||
|
||||
if (!headContent)
|
||||
return NS_OK;
|
||||
|
||||
PRUint32 columnCount = 0;
|
||||
|
||||
count = headContent->GetChildCount();
|
||||
for (PRUint32 index = 0; index < count; ++index) {
|
||||
nsIContent* childContent = headContent->GetChildAt(index);
|
||||
for (nsIContent* childContent = headContent->GetFirstChild(); childContent;
|
||||
childContent = childContent->GetNextSibling()) {
|
||||
if (childContent->NodeInfo()->Equals(nsGkAtoms::listcol,
|
||||
kNameSpaceID_XUL)) {
|
||||
columnCount++;
|
||||
|
@ -957,11 +952,11 @@ nsXULListitemAccessible::Description(nsString& aDesc)
|
|||
nsresult
|
||||
nsXULListitemAccessible::GetNameInternal(nsAString& aName)
|
||||
{
|
||||
nsIContent* child = mContent->GetChildAt(0);
|
||||
if (child) {
|
||||
if (child->NodeInfo()->Equals(nsGkAtoms::listcell,
|
||||
kNameSpaceID_XUL)) {
|
||||
child->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
|
||||
nsIContent* childContent = mContent->GetFirstChild();
|
||||
if (childContent) {
|
||||
if (childContent->NodeInfo()->Equals(nsGkAtoms::listcell,
|
||||
kNameSpaceID_XUL)) {
|
||||
childContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, aName);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,6 +97,10 @@
|
|||
// disabled, too. See bug 429285.
|
||||
testAriaDisabledTree("group");
|
||||
|
||||
// active state caused by aria-activedescendant
|
||||
testStates("as_item1", 0, EXT_STATE_ACTIVE);
|
||||
testStates("as_item2", 0, 0, 0, EXT_STATE_ACTIVE);
|
||||
|
||||
// universal ARIA properties inherited from file input control
|
||||
var fileTextField = getAccessible("fileinput").firstChild;
|
||||
testStates(fileTextField,
|
||||
|
@ -184,6 +188,11 @@
|
|||
title="File input control should be propogate states to descendants">
|
||||
Mozilla Bug 699017
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=689847"
|
||||
title="Expose active state on current item of selectable widgets">
|
||||
Mozilla Bug 689847
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
|
@ -229,6 +238,13 @@
|
|||
<div role="slider" tabindex="0">A slider</div>
|
||||
</div>
|
||||
|
||||
<!-- Test active state -->
|
||||
<div id="as_listbox" tabindex="0" role="listbox"
|
||||
aria-activedescendant="as_item1">
|
||||
<div role="option" id="as_item1">Item 1</div>
|
||||
<div role="option" id="as_item2">Item 2</div>
|
||||
</div>
|
||||
|
||||
<!-- universal ARIA properties should be inherited by text field of file input -->
|
||||
<input type="file" id="fileinput"
|
||||
aria-busy="true"
|
||||
|
|
|
@ -25,20 +25,24 @@
|
|||
testStates(comboboxList, 0, 0, STATE_FOCUSABLE, 0);
|
||||
|
||||
var opt1 = comboboxList.firstChild;
|
||||
testStates(opt1, STATE_SELECTABLE | STATE_SELECTED | STATE_FOCUSABLE, 0,
|
||||
STATE_FOCUSED, 0);
|
||||
testStates(opt1, STATE_SELECTABLE | STATE_SELECTED | STATE_FOCUSABLE,
|
||||
EXT_STATE_ACTIVE, STATE_FOCUSED, 0);
|
||||
|
||||
var opt2 = comboboxList.lastChild;
|
||||
testStates(opt2, STATE_SELECTABLE | STATE_FOCUSABLE, 0, STATE_SELECTED, 0,
|
||||
STATE_FOCUSED, 0);
|
||||
STATE_FOCUSED, EXT_STATE_ACTIVE);
|
||||
|
||||
// listbox
|
||||
var listbox = getAccessible("listbox");
|
||||
testStates(listbox, STATE_FOCUSABLE, 0,
|
||||
STATE_HASPOPUP | STATE_COLLAPSED | STATE_FOCUSED, 0);
|
||||
STATE_HASPOPUP | STATE_COLLAPSED | STATE_FOCUSED);
|
||||
|
||||
testStates(listbox.firstChild, STATE_SELECTABLE, 0,
|
||||
STATE_SELECTED | STATE_FOCUSED | STATE_FOCUSED, 0);
|
||||
testStates(listbox.firstChild, STATE_SELECTABLE, EXT_STATE_ACTIVE,
|
||||
STATE_SELECTED | STATE_FOCUSED | STATE_FOCUSED);
|
||||
|
||||
testStates(listbox.lastChild, STATE_SELECTABLE, 0,
|
||||
STATE_SELECTED | STATE_FOCUSED | STATE_FOCUSED,
|
||||
0, 0, EXT_STATE_ACTIVE);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
@ -60,6 +64,11 @@
|
|||
title="mochitest for selects and lists">
|
||||
Mozilla Bug 640716
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=689847"
|
||||
title="Expose active state on current item of selectable widgets">
|
||||
Mozilla Bug 689847
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
# ***** 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 <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2011
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Chris Jones <jones.chris.g@gmail.com>
|
||||
#
|
||||
# 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 app
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/testing/testsuite-targets.mk
|
|
@ -0,0 +1,168 @@
|
|||
# ***** 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 <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2011
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Chris Jones <jones.chris.g@gmail.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/b2g.js
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
|
||||
CPPSRCS = nsBrowserApp.cpp
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
|
||||
LOCAL_INCLUDES += -I$(DEPTH)/build
|
||||
|
||||
DEFINES += -DXPCOM_GLUE
|
||||
STL_FLAGS=
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
LIBS += \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,version)
|
||||
endif
|
||||
|
||||
ifdef _MSC_VER
|
||||
# Always enter a Windows program through wmain, whether or not we're
|
||||
# a console application.
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif #LIBXUL_SDK
|
||||
|
||||
# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
|
||||
NSDISTMODE = copy
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
APP_ICON = b2g
|
||||
|
||||
DEFINES += \
|
||||
-DAPP_NAME=$(MOZ_APP_NAME) \
|
||||
-DAPP_VERSION=$(MOZ_APP_VERSION) \
|
||||
-DMOZ_UPDATER=$(MOZ_UPDATER) \
|
||||
$(NULL)
|
||||
|
||||
# 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
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
REDIT_PATH = $(LIBXUL_DIST)/bin
|
||||
endif
|
||||
|
||||
APP_BINARY = $(MOZ_APP_NAME)$(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::
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
rsync -a --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 "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
||||
sed -e "s/%MOZ_APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/" -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
|
||||
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
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
|
||||
$(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(srcdir)/$(APP_ICON).ico
|
||||
endif
|
||||
|
||||
endif
|
После Ширина: | Высота: | Размер: 4.2 KiB |
|
@ -0,0 +1,395 @@
|
|||
/* ***** 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 <mbrubeck@mozilla.com>
|
||||
*
|
||||
* 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("toolkit.defaultChromeURI", "chrome://browser/content/shell.xul");
|
||||
pref("general.useragent.compatMode.firefox", true);
|
||||
pref("browser.chromeURL", "chrome://browser/content/");
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("browser.homescreenURL", "file:///system/home/homescreen.html");
|
||||
#else
|
||||
pref("browser.homescreenURL", "file:///data/local/homescreen.html,file:///system/home/homescreen.html");
|
||||
#endif
|
||||
|
||||
// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
|
||||
pref("browser.viewport.scaleRatio", -1);
|
||||
|
||||
/* allow scrollbars to float above chrome ui */
|
||||
pref("ui.scrollbarsCanOverlapContent", 1);
|
||||
|
||||
/* 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);
|
||||
|
||||
// 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);
|
||||
|
||||
/* session history */
|
||||
pref("browser.sessionhistory.max_total_viewers", 1);
|
||||
pref("browser.sessionhistory.max_entries", 50);
|
||||
|
||||
/* 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", 1);
|
||||
|
||||
/* these should help performance */
|
||||
pref("mozilla.widget.force-24bpp", true);
|
||||
pref("mozilla.widget.use-buffer-pixmap", true);
|
||||
pref("mozilla.widget.disable-native-theme", true);
|
||||
pref("layout.reflow.synthMouseMove", false);
|
||||
|
||||
/* 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);
|
||||
|
||||
/* download helper */
|
||||
pref("browser.helperApps.deleteTempFileOnExit", false);
|
||||
|
||||
/* password manager */
|
||||
pref("signon.rememberSignons", true);
|
||||
pref("signon.expireMasterPassword", false);
|
||||
pref("signon.SignonFileName", "signons.txt");
|
||||
|
||||
/* autocomplete */
|
||||
pref("browser.formfill.enable", true);
|
||||
|
||||
/* spellcheck */
|
||||
pref("layout.spellcheckDefault", 0);
|
||||
|
||||
/* 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);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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 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);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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);
|
||||
|
||||
// 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://maps.googleapis.com/maps/api/browserlocation/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.high_water_mark", 32);
|
||||
|
||||
// Maximum scripts runtime before showing an alert
|
||||
pref("dom.max_chrome_script_run_time", 0); // disable slow script dialog for chrome
|
||||
pref("dom.max_script_run_time", 20);
|
||||
|
||||
// plugins
|
||||
pref("plugin.disable", true);
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
|
||||
// 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%/b2g/%VERSION%/releasenotes/");
|
||||
pref("app.support.baseURL", "http://support.mozilla.com/b2g");
|
||||
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/");
|
||||
pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/b2g/features/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/b2g/faq/");
|
||||
|
||||
// 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");
|
||||
|
||||
// replace newlines with spaces on paste into single-line text boxes
|
||||
pref("editor.singleLine.pasteNewlines", 2);
|
||||
|
||||
// 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);
|
||||
|
||||
// Layers Acceleration
|
||||
pref("layers.acceleration.disabled", false);
|
||||
|
||||
// Web Notifications
|
||||
pref("notification.feature.enabled", true);
|
||||
|
||||
// IndexedDB
|
||||
pref("indexedDB.feature.enabled", true);
|
||||
pref("dom.indexedDB.warningQuota", 5);
|
||||
|
||||
// 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
|
||||
|
||||
// 0: don't show fullscreen keyboard
|
||||
// 1: always show fullscreen keyboard
|
||||
// -1: show fullscreen keyboard based on threshold pref
|
||||
pref("widget.ime.android.landscape_fullscreen", -1);
|
||||
pref("widget.ime.android.fullscreen_threshold", 250); // in hundreths of inches
|
||||
|
||||
// optimize images memory usage
|
||||
pref("image.mem.decodeondraw", true);
|
||||
pref("content.image.allow_locking", false);
|
||||
pref("image.mem.min_discard_timeout_ms", 10000);
|
||||
|
||||
// enable touch events interfaces
|
||||
pref("dom.w3c_touch_events.enabled", true);
|
||||
pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240"
|
||||
pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
|
||||
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
// Safe browsing does nothing unless this pref is set
|
||||
pref("browser.safebrowsing.enabled", true);
|
||||
|
||||
// Prevent loading of pages identified as malware
|
||||
pref("browser.safebrowsing.malware.enabled", true);
|
||||
|
||||
// Non-enhanced mode (local url lists) URL list to check for updates
|
||||
pref("browser.safebrowsing.provider.0.updateURL", "http://safebrowsing.clients.google.com/safebrowsing/downloads?client={moz:client}&appver={moz:version}&pver=2.2");
|
||||
|
||||
pref("browser.safebrowsing.dataProvider", 0);
|
||||
|
||||
// Does the provider name need to be localizable?
|
||||
pref("browser.safebrowsing.provider.0.name", "Google");
|
||||
pref("browser.safebrowsing.provider.0.keyURL", "https://sb-ssl.google.com/safebrowsing/newkey?client={moz:client}&appver={moz:version}&pver=2.2");
|
||||
pref("browser.safebrowsing.provider.0.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/report?");
|
||||
pref("browser.safebrowsing.provider.0.gethashURL", "http://safebrowsing.clients.google.com/safebrowsing/gethash?client={moz:client}&appver={moz:version}&pver=2.2");
|
||||
|
||||
// HTML report pages
|
||||
pref("browser.safebrowsing.provider.0.reportGenericURL", "http://{moz:locale}.phish-generic.mozilla.com/?hl={moz:locale}");
|
||||
pref("browser.safebrowsing.provider.0.reportErrorURL", "http://{moz:locale}.phish-error.mozilla.com/?hl={moz:locale}");
|
||||
pref("browser.safebrowsing.provider.0.reportPhishURL", "http://{moz:locale}.phish-report.mozilla.com/?hl={moz:locale}");
|
||||
pref("browser.safebrowsing.provider.0.reportMalwareURL", "http://{moz:locale}.malware-report.mozilla.com/?hl={moz:locale}");
|
||||
pref("browser.safebrowsing.provider.0.reportMalwareErrorURL", "http://{moz:locale}.malware-error.mozilla.com/?hl={moz:locale}");
|
||||
|
||||
// FAQ URLs
|
||||
pref("browser.safebrowsing.warning.infoURL", "http://www.mozilla.com/%LOCALE%/%APP%/phishing-protection/");
|
||||
pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/%APP%/geolocation/");
|
||||
|
||||
// Name of the about: page contributed by safebrowsing to handle display of error
|
||||
// pages on phishing/malware hits. (bug 399233)
|
||||
pref("urlclassifier.alternate_error_page", "blocked");
|
||||
|
||||
// The number of random entries to send with a gethash request.
|
||||
pref("urlclassifier.gethashnoise", 4);
|
||||
|
||||
// The list of tables that use the gethash request to confirm partial results.
|
||||
pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
|
||||
|
||||
// If an urlclassifier table has not been updated in this number of seconds,
|
||||
// a gethash request will be forced to check that the result is still in
|
||||
// the database.
|
||||
pref("urlclassifier.confirm-age", 2700);
|
||||
|
||||
// Maximum size of the sqlite3 cache during an update, in bytes
|
||||
pref("urlclassifier.updatecachemax", 4194304);
|
||||
|
||||
// URL for checking the reason for a malware warning.
|
||||
pref("browser.safebrowsing.malware.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
|
||||
#endif
|
||||
|
||||
// True if this is the first time we are showing about:firstrun
|
||||
pref("browser.firstrun.show.uidiscovery", true);
|
||||
pref("browser.firstrun.show.localepicker", true);
|
||||
|
||||
// initiated by a user
|
||||
pref("content.ime.strict_policy", true);
|
||||
|
||||
// True if you always want dump() to work
|
||||
//
|
||||
// On Android, you also need to do the following for the output
|
||||
// to show up in logcat:
|
||||
//
|
||||
// $ adb shell stop
|
||||
// $ adb shell setprop log.redirect-stdio true
|
||||
// $ adb shell start
|
||||
pref("browser.dom.window.dump.enabled", false);
|
||||
|
||||
|
||||
|
||||
// Temporarily relax file:// origin checks so that we can use <img>s
|
||||
// from other dirs as webgl textures and more. Remove me when we have
|
||||
// installable apps or wifi support.
|
||||
pref("security.fileuri.strict_origin_policy", false);
|
||||
|
||||
// Temporarily force-enable GL compositing. This is default-disabled
|
||||
// deep within the bowels of the widgetry system. Remove me when GL
|
||||
// compositing isn't default disabled in widget/src/android.
|
||||
pref("layers.acceleration.force-enabled", true);
|
||||
|
||||
// screen.enabled and screen.brightness properties.
|
||||
pref("dom.screenEnabledProperty.enabled", true);
|
||||
pref("dom.screenBrightnessProperty.enabled", true);
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>html</string>
|
||||
<string>htm</string>
|
||||
<string>shtml</string>
|
||||
<string>xht</string>
|
||||
<string>xhtml</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>HTML Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>HTML</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>text</string>
|
||||
<string>txt</string>
|
||||
<string>js</string>
|
||||
<string>log</string>
|
||||
<string>css</string>
|
||||
<string>xul</string>
|
||||
<string>rdf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Text Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>TEXT</string>
|
||||
<string>utxt</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>jpeg</string>
|
||||
<string>jpg</string>
|
||||
<string>png</string>
|
||||
<string>gif</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>GIFf</string>
|
||||
<string>JPEG</string>
|
||||
<string>PNGf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>%MOZ_APP_NAME%</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>%APP_NAME% %APP_VERSION%</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>%MOZ_APP_NAME%</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.b2g</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>%MOZ_APP_VERSION%</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>%APP_NAME%</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>%APP_VERSION%</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZB</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>http URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>http</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>https URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>ftp URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>ftp</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>file URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>file</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>%APP_VERSION%</string>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<true/>
|
||||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
CFBundleName = "%APP_NAME%";
|
|
@ -0,0 +1,292 @@
|
|||
/* -*- 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 <bryner@brianryner.com>
|
||||
*
|
||||
* 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 "application.ini.h"
|
||||
#include "nsXPCOMGlue.h"
|
||||
#if defined(XP_WIN)
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#elif defined(XP_UNIX)
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prprf.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsStringGlue.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
// we want a wmain entry point
|
||||
#include "nsWindowsWMain.cpp"
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
#include "BinaryPath.h"
|
||||
|
||||
#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
|
||||
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
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 bool IsArg(const char* arg, const char* s)
|
||||
{
|
||||
if (*arg == '-')
|
||||
{
|
||||
if (*++arg == '-')
|
||||
++arg;
|
||||
return !strcasecmp(arg, s);
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
if (*arg == '/')
|
||||
return !strcasecmp(++arg, s);
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper class which calls NS_LogInit/NS_LogTerm in its scope.
|
||||
*/
|
||||
class ScopedLogging
|
||||
{
|
||||
public:
|
||||
ScopedLogging() { NS_LogInit(); }
|
||||
~ScopedLogging() { NS_LogTerm(); }
|
||||
};
|
||||
|
||||
XRE_GetFileFromPathType XRE_GetFileFromPath;
|
||||
XRE_CreateAppDataType XRE_CreateAppData;
|
||||
XRE_FreeAppDataType XRE_FreeAppData;
|
||||
#ifdef XRE_HAS_DLL_BLOCKLIST
|
||||
XRE_SetupDllBlocklistType XRE_SetupDllBlocklist;
|
||||
#endif
|
||||
XRE_TelemetryAccumulateType XRE_TelemetryAccumulate;
|
||||
XRE_mainType XRE_main;
|
||||
|
||||
static const nsDynamicFunctionLoad kXULFuncs[] = {
|
||||
{ "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath },
|
||||
{ "XRE_CreateAppData", (NSFuncPtr*) &XRE_CreateAppData },
|
||||
{ "XRE_FreeAppData", (NSFuncPtr*) &XRE_FreeAppData },
|
||||
#ifdef XRE_HAS_DLL_BLOCKLIST
|
||||
{ "XRE_SetupDllBlocklist", (NSFuncPtr*) &XRE_SetupDllBlocklist },
|
||||
#endif
|
||||
{ "XRE_TelemetryAccumulate", (NSFuncPtr*) &XRE_TelemetryAccumulate },
|
||||
{ "XRE_main", (NSFuncPtr*) &XRE_main },
|
||||
{ nsnull, nsnull }
|
||||
};
|
||||
|
||||
static int do_main(const char *exePath, int argc, char* argv[])
|
||||
{
|
||||
nsCOMPtr<nsILocalFile> appini;
|
||||
nsresult rv;
|
||||
|
||||
// Allow firefox.exe to launch XULRunner apps via -app <application.ini>
|
||||
// Note that -app must be the *first* argument.
|
||||
const char *appDataFile = 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;
|
||||
}
|
||||
|
||||
char appEnv[MAXPATHLEN];
|
||||
snprintf(appEnv, MAXPATHLEN, "XUL_APP_FILE=%s", argv[2]);
|
||||
if (putenv(appEnv)) {
|
||||
Output("Couldn't set %s.\n", appEnv);
|
||||
return 255;
|
||||
}
|
||||
argv[2] = argv[0];
|
||||
argv += 2;
|
||||
argc -= 2;
|
||||
}
|
||||
|
||||
int result;
|
||||
if (appini) {
|
||||
nsXREAppData *appData;
|
||||
rv = XRE_CreateAppData(appini, &appData);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't read application.ini");
|
||||
return 255;
|
||||
}
|
||||
result = XRE_main(argc, argv, appData);
|
||||
XRE_FreeAppData(appData);
|
||||
} else {
|
||||
#ifdef XP_WIN
|
||||
// exePath comes from mozilla::BinaryPath::Get, which returns a UTF-8
|
||||
// encoded path, so it is safe to convert it
|
||||
rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), PR_FALSE,
|
||||
getter_AddRefs(appini));
|
||||
#else
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString(exePath), PR_FALSE,
|
||||
getter_AddRefs(appini));
|
||||
#endif
|
||||
if (NS_FAILED(rv)) {
|
||||
return 255;
|
||||
}
|
||||
result = XRE_main(argc, argv, &sAppData);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char exePath[MAXPATHLEN];
|
||||
|
||||
nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't calculate the application directory.\n");
|
||||
return 255;
|
||||
}
|
||||
|
||||
char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
|
||||
if (!lastSlash || (lastSlash - exePath > MAXPATHLEN - sizeof(XPCOM_DLL) - 1))
|
||||
return 255;
|
||||
|
||||
strcpy(++lastSlash, XPCOM_DLL);
|
||||
|
||||
int gotCounters;
|
||||
#if defined(XP_UNIX)
|
||||
struct rusage initialRUsage;
|
||||
gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
|
||||
#elif defined(XP_WIN)
|
||||
// GetProcessIoCounters().ReadOperationCount seems to have little to
|
||||
// do with actual read operations. It reports 0 or 1 at this stage
|
||||
// in the program. Luckily 1 coincides with when prefetch is
|
||||
// enabled. If Windows prefetch didn't happen we can do our own
|
||||
// faster dll preloading.
|
||||
IO_COUNTERS ioCounters;
|
||||
gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
|
||||
if (gotCounters && !ioCounters.ReadOperationCount)
|
||||
#endif
|
||||
{
|
||||
XPCOMGlueEnablePreload();
|
||||
}
|
||||
|
||||
|
||||
rv = XPCOMGlueStartup(exePath);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't load XPCOM.\n");
|
||||
return 255;
|
||||
}
|
||||
// Reset exePath so that it is the directory name and not the xpcom dll name
|
||||
*lastSlash = 0;
|
||||
|
||||
rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't load XRE functions.\n");
|
||||
return 255;
|
||||
}
|
||||
|
||||
#ifdef XRE_HAS_DLL_BLOCKLIST
|
||||
XRE_SetupDllBlocklist();
|
||||
#endif
|
||||
|
||||
if (gotCounters) {
|
||||
#if defined(XP_WIN)
|
||||
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,
|
||||
int(ioCounters.ReadOperationCount));
|
||||
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_TRANSFER,
|
||||
int(ioCounters.ReadTransferCount / 1024));
|
||||
IO_COUNTERS newIoCounters;
|
||||
if (GetProcessIoCounters(GetCurrentProcess(), &newIoCounters)) {
|
||||
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_OPS,
|
||||
int(newIoCounters.ReadOperationCount - ioCounters.ReadOperationCount));
|
||||
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_TRANSFER,
|
||||
int((newIoCounters.ReadTransferCount - ioCounters.ReadTransferCount) / 1024));
|
||||
}
|
||||
#elif defined(XP_UNIX)
|
||||
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_HARD_FAULTS,
|
||||
int(initialRUsage.ru_majflt));
|
||||
struct rusage newRUsage;
|
||||
if (!getrusage(RUSAGE_SELF, &newRUsage)) {
|
||||
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_HARD_FAULTS,
|
||||
int(newRUsage.ru_majflt - initialRUsage.ru_majflt));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int result;
|
||||
{
|
||||
ScopedLogging log;
|
||||
result = do_main(exePath, argc, argv);
|
||||
}
|
||||
|
||||
XPCOMGlueShutdown();
|
||||
return result;
|
||||
}
|
|
@ -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 <dolske@mozilla.com> (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
|
|
@ -0,0 +1 @@
|
|||
b2g/branding/official/content/splash.png
|
|
@ -0,0 +1,3 @@
|
|||
MOZ_APP_DISPLAYNAME=B2G
|
||||
ANDROID_PACKAGE_NAME=org.mozilla.b2g
|
||||
MOZ_UPDATER=
|
|
@ -0,0 +1,12 @@
|
|||
# Branding Makefile
|
||||
# - jars chrome artwork
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
После Ширина: | Высота: | Размер: 25 KiB |
После Ширина: | Высота: | Размер: 2.6 KiB |
После Ширина: | Высота: | Размер: 5.2 KiB |
После Ширина: | Высота: | Размер: 8.1 KiB |
|
@ -0,0 +1,6 @@
|
|||
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)
|
После Ширина: | Высота: | Размер: 19 KiB |
После Ширина: | Высота: | Размер: 14 KiB |
После Ширина: | Высота: | Размер: 19 KiB |
|
@ -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 <benjamin@smedbergs.us>
|
||||
# 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 = b2g/branding/official/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY brandShortName "B2G">
|
||||
<!ENTITY brandFullName "Mozilla B2G">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY logoTrademark "B2G and the B2G logos are trademarks of the Mozilla Foundation.">
|
|
@ -0,0 +1,2 @@
|
|||
brandShortName=B2G
|
||||
brandFullName=Mozilla B2G
|
|
@ -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)
|
|
@ -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 <dolske@mozilla.com> (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
|
|
@ -0,0 +1 @@
|
|||
b2g/branding/unofficial/content/splash.png
|
|
@ -0,0 +1,3 @@
|
|||
ANDROID_PACKAGE_NAME=org.mozilla.b2g_`echo $USER`
|
||||
MOZ_APP_DISPLAYNAME=B2G
|
||||
MOZ_UPDATER=
|
|
@ -0,0 +1,11 @@
|
|||
# Branding Makefile
|
||||
# - jars chrome artwork
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
После Ширина: | Высота: | Размер: 16 KiB |
После Ширина: | Высота: | Размер: 1.7 KiB |
После Ширина: | Высота: | Размер: 4.0 KiB |
После Ширина: | Высота: | Размер: 5.8 KiB |
|
@ -0,0 +1,6 @@
|
|||
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)
|
После Ширина: | Высота: | Размер: 19 KiB |
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 19 KiB |
|
@ -0,0 +1,48 @@
|
|||
# ***** 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 <benjamin@smedbergs.us>
|
||||
# Portions created by the Initial Developer are Copyright (C) 2011
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Matt Brubeck <mbrubeck@mozilla.com>
|
||||
#
|
||||
# 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 = b2g/branding/unofficial/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY brandShortName "B2G">
|
||||
<!ENTITY brandFullName "Mozilla B2G">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY logoTrademark "">
|
|
@ -0,0 +1,2 @@
|
|||
brandShortName=B2G
|
||||
brandFullName=Mozilla B2G
|
|
@ -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)
|
|
@ -0,0 +1,88 @@
|
|||
# ***** 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 <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.com>
|
||||
#
|
||||
# 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
|
||||
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) \
|
||||
b2g \
|
||||
$(NULL)
|
||||
|
||||
|
||||
installer:
|
||||
@$(MAKE) -C b2g/installer installer
|
||||
|
||||
package:
|
||||
@$(MAKE) -C b2g/installer
|
||||
|
||||
install::
|
||||
@echo "B2G can't be installed directly."
|
||||
@exit 1
|
||||
|
||||
upload::
|
||||
@$(MAKE) -C b2g/installer upload
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
# Implemented in testing/testsuite-targets.mk
|
||||
|
||||
mochitest-browser-chrome:
|
||||
$(RUN_MOCHITEST) --browser-chrome
|
||||
$(CHECK_TEST_ERROR)
|
||||
|
||||
mochitest:: mochitest-browser-chrome
|
||||
|
||||
.PHONY: mochitest-browser-chrome
|
||||
endif
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
# ***** 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 <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.com>
|
||||
#
|
||||
# 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)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,197 @@
|
|||
/* ***** 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 <mfinkle@mozilla.com>
|
||||
*
|
||||
* 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 ***** */
|
||||
|
||||
|
||||
/**
|
||||
* Command Updater
|
||||
*/
|
||||
let CommandUpdater = {
|
||||
/**
|
||||
* Gets a controller that can handle a particular command.
|
||||
* @param {string} command
|
||||
* A command to locate a controller for, preferring controllers that
|
||||
* show the command as enabled.
|
||||
* @return {object} In this order of precedence:
|
||||
* - the first controller supporting the specified command
|
||||
* associated with the focused element that advertises the
|
||||
* command as ENABLED.
|
||||
* - the first controller supporting the specified command
|
||||
* associated with the global window that advertises the
|
||||
* command as ENABLED.
|
||||
* - the first controller supporting the specified command
|
||||
* associated with the focused element.
|
||||
* - the first controller supporting the specified command
|
||||
* associated with the global window.
|
||||
*/
|
||||
_getControllerForCommand: function(command) {
|
||||
try {
|
||||
let commandDispatcher = top.document.commandDispatcher;
|
||||
let controller = commandDispatcher.getControllerForCommand(command);
|
||||
if (controller && controller.isCommandEnabled(command))
|
||||
return controller;
|
||||
}
|
||||
catch (e) { }
|
||||
|
||||
let controllerCount = window.controllers.getControllerCount();
|
||||
for (let i = 0; i < controllerCount; ++i) {
|
||||
let current = window.controllers.getControllerAt(i);
|
||||
try {
|
||||
if (current.supportsCommand(command) &&
|
||||
current.isCommandEnabled(command))
|
||||
return current;
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
return controller || window.controllers.getControllerForCommand(command);
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the state of a XUL <command> element for the specified command
|
||||
* depending on its state.
|
||||
* @param {string} command
|
||||
* The name of the command to update the XUL <command> element for.
|
||||
*/
|
||||
updateCommand: function(command) {
|
||||
let enabled = false;
|
||||
try {
|
||||
let controller = this._getControllerForCommand(command);
|
||||
if (controller) {
|
||||
enabled = controller.isCommandEnabled(command);
|
||||
}
|
||||
}
|
||||
catch (ex) { }
|
||||
|
||||
this.enableCommand(command, enabled);
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the state of a XUL <command> element for the specified command
|
||||
* depending on its state.
|
||||
* @param {string} command
|
||||
* The name of the command to update the XUL <command> element for.
|
||||
*/
|
||||
updateCommands: function(_commands) {
|
||||
let commands = _commands.split(',');
|
||||
for (let command in commands) {
|
||||
this.updateCommand(commands[command]);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Enables or disables a XUL <command> element.
|
||||
* @param {string} command
|
||||
* The name of the command to enable or disable.
|
||||
* @param {bool} enabled
|
||||
* true if the command should be enabled, false otherwise.
|
||||
*/
|
||||
enableCommand: function(command, enabled) {
|
||||
let element = document.getElementById(command);
|
||||
if (!element)
|
||||
return;
|
||||
|
||||
if (enabled)
|
||||
element.removeAttribute('disabled');
|
||||
else
|
||||
element.setAttribute('disabled', 'true');
|
||||
},
|
||||
|
||||
/**
|
||||
* Performs the action associated with a specified command using the most
|
||||
* relevant controller.
|
||||
* @param {string} command
|
||||
* The command to perform.
|
||||
*/
|
||||
doCommand: function(command) {
|
||||
let controller = this._getControllerForCommand(command);
|
||||
if (!controller)
|
||||
return;
|
||||
controller.doCommand(command);
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the label attribute for the specified command.
|
||||
* @param {string} command
|
||||
* The command to update.
|
||||
* @param {string} labelAttribute
|
||||
* The label value to use.
|
||||
*/
|
||||
setMenuValue: function(command, labelAttribute) {
|
||||
let commandNode = top.document.getElementById(command);
|
||||
if (commandNode) {
|
||||
let label = commandNode.getAttribute(labelAttribute);
|
||||
if (label)
|
||||
commandNode.setAttribute('label', label);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the accesskey attribute for the specified command.
|
||||
* @param {string} command
|
||||
* The command to update.
|
||||
* @param {string} valueAttribute
|
||||
* The value attribute to use.
|
||||
*/
|
||||
setAccessKey: function(command, valueAttribute) {
|
||||
let commandNode = top.document.getElementById(command);
|
||||
if (commandNode) {
|
||||
let value = commandNode.getAttribute(valueAttribute);
|
||||
if (value)
|
||||
commandNode.setAttribute('accesskey', value);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Inform all the controllers attached to a node that an event has occurred
|
||||
* (e.g. the tree controllers need to be informed of blur events so that they
|
||||
* can change some of the menu items back to their default values)
|
||||
* @param {node} node
|
||||
* The node receiving the event.
|
||||
* @param {event} event
|
||||
* The event.
|
||||
*/
|
||||
onEvent: function(node, event) {
|
||||
let numControllers = node.controllers.getControllerCount();
|
||||
let controller;
|
||||
|
||||
for (let i = 0; i < numControllers; i++) {
|
||||
controller = node.controllers.getControllerAt(i);
|
||||
if (controller)
|
||||
controller.onEvent(event);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,400 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"DTD/xhtml1-strict.dtd">
|
||||
%htmlDTD;
|
||||
<!ENTITY % netErrorDTD
|
||||
SYSTEM "chrome://global/locale/netError.dtd">
|
||||
%netErrorDTD;
|
||||
<!ENTITY % globalDTD
|
||||
SYSTEM "chrome://global/locale/global.dtd">
|
||||
%globalDTD;
|
||||
]>
|
||||
|
||||
<!-- ***** 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 netError.xhtml.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Netscape Communications Corporation.
|
||||
- Portions created by the Initial Developer are Copyright (C) 1998
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Wesley Johnston <wjohnston@mozilla.com>
|
||||
-
|
||||
- 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 LGPL or the GPL. 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 xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width; user-scalable=false;" />
|
||||
<title>&loadError.label;</title>
|
||||
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
|
||||
<!-- If the location of the favicon is changed here, the FAVICON_ERRORPAGE_URL symbol in
|
||||
toolkit/components/places/src/nsFaviconService.h should be updated. -->
|
||||
<link rel="icon" type="image/png" id="favicon" href="chrome://global/skin/icons/warning-16.png"/>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
// Error url MUST be formatted like this:
|
||||
// moz-neterror:page?e=error&u=url&d=desc
|
||||
//
|
||||
// or optionally, to specify an alternate CSS class to allow for
|
||||
// custom styling and favicon:
|
||||
//
|
||||
// moz-neterror:page?e=error&u=url&s=classname&d=desc
|
||||
|
||||
// Note that this file uses document.documentURI to get
|
||||
// the URL (with the format from above). This is because
|
||||
// document.location.href gets the current URI off the docshell,
|
||||
// which is the URL displayed in the location bar, i.e.
|
||||
// the URI that the user attempted to load.
|
||||
|
||||
function getErrorCode()
|
||||
{
|
||||
var url = document.documentURI;
|
||||
var error = url.search(/e\=/);
|
||||
var duffUrl = url.search(/\&u\=/);
|
||||
return decodeURIComponent(url.slice(error + 2, duffUrl));
|
||||
}
|
||||
|
||||
function getCSSClass()
|
||||
{
|
||||
var url = document.documentURI;
|
||||
var matches = url.match(/s\=([^&]+)\&/);
|
||||
// s is optional, if no match just return nothing
|
||||
if (!matches || matches.length < 2)
|
||||
return "";
|
||||
|
||||
// parenthetical match is the second entry
|
||||
return decodeURIComponent(matches[1]);
|
||||
}
|
||||
|
||||
function getDescription()
|
||||
{
|
||||
var url = document.documentURI;
|
||||
var desc = url.search(/d\=/);
|
||||
|
||||
// desc == -1 if not found; if so, return an empty string
|
||||
// instead of what would turn out to be portions of the URI
|
||||
if (desc == -1)
|
||||
return "";
|
||||
|
||||
return decodeURIComponent(url.slice(desc + 2));
|
||||
}
|
||||
|
||||
function retryThis(buttonEl)
|
||||
{
|
||||
// If this is the "Offline mode" page, go online!
|
||||
if (getErrorCode() == "netOffline") {
|
||||
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils)
|
||||
.goOnline();
|
||||
}
|
||||
|
||||
// Session history has the URL of the page that failed
|
||||
// to load, not the one of the error page. So, just call
|
||||
// reload(), which will also repost POST data correctly.
|
||||
try {
|
||||
location.reload();
|
||||
} catch (e) {
|
||||
// We probably tried to reload a URI that caused an exception to
|
||||
// occur; e.g. a nonexistent file.
|
||||
}
|
||||
|
||||
buttonEl.disabled = true;
|
||||
}
|
||||
|
||||
function initPage()
|
||||
{
|
||||
var err = getErrorCode();
|
||||
|
||||
// if it's an unknown error or there's no title or description
|
||||
// defined, get the generic message
|
||||
var errTitle = document.getElementById("et_" + err);
|
||||
var errDesc = document.getElementById("ed_" + err);
|
||||
if (!errTitle || !errDesc)
|
||||
{
|
||||
errTitle = document.getElementById("et_generic");
|
||||
errDesc = document.getElementById("ed_generic");
|
||||
}
|
||||
|
||||
var title = document.getElementsByClassName("errorTitleText")[0];
|
||||
if (title)
|
||||
{
|
||||
title.parentNode.replaceChild(errTitle, title);
|
||||
// change id to the replaced child's id so styling works
|
||||
errTitle.classList.add("errorTitleText");
|
||||
}
|
||||
|
||||
var sd = document.getElementById("errorShortDescText");
|
||||
if (sd)
|
||||
sd.textContent = getDescription();
|
||||
|
||||
var ld = document.getElementById("errorLongDesc");
|
||||
if (ld)
|
||||
{
|
||||
ld.parentNode.replaceChild(errDesc, ld);
|
||||
// change id to the replaced child's id so styling works
|
||||
errDesc.id = "errorLongDesc";
|
||||
}
|
||||
|
||||
// remove undisplayed errors to avoid bug 39098
|
||||
var errContainer = document.getElementById("errorContainer");
|
||||
errContainer.parentNode.removeChild(errContainer);
|
||||
|
||||
var className = getCSSClass();
|
||||
if (className && className != "expertBadCert") {
|
||||
// Associate a CSS class with the root of the page, if one was passed in,
|
||||
// to allow custom styling.
|
||||
// Not "expertBadCert" though, don't want to deal with the favicon
|
||||
document.documentElement.className = className;
|
||||
|
||||
// Also, if they specified a CSS class, they must supply their own
|
||||
// favicon. In order to trigger the browser to repaint though, we
|
||||
// need to remove/add the link element.
|
||||
var favicon = document.getElementById("favicon");
|
||||
var faviconParent = favicon.parentNode;
|
||||
faviconParent.removeChild(favicon);
|
||||
favicon.setAttribute("href", "chrome://global/skin/icons/" + className + "_favicon.png");
|
||||
faviconParent.appendChild(favicon);
|
||||
}
|
||||
if (className == "expertBadCert") {
|
||||
showSecuritySection();
|
||||
}
|
||||
|
||||
if (err == "remoteXUL") {
|
||||
// Remove the "Try again" button for remote XUL errors given that
|
||||
// it is useless.
|
||||
document.getElementById("errorTryAgain").style.display = "none";
|
||||
}
|
||||
|
||||
if (err == "cspFrameAncestorBlocked") {
|
||||
// Remove the "Try again" button for CSP frame ancestors violation, since it's
|
||||
// almost certainly useless. (Bug 553180)
|
||||
document.getElementById("errorTryAgain").style.display = "none";
|
||||
}
|
||||
|
||||
if (err == "nssBadCert") {
|
||||
// Remove the "Try again" button for security exceptions, since it's
|
||||
// almost certainly useless.
|
||||
document.getElementById("errorTryAgain").style.display = "none";
|
||||
document.getElementById("errorPage").setAttribute("class", "certerror");
|
||||
addDomainErrorLink();
|
||||
}
|
||||
else {
|
||||
// Remove the override block for non-certificate errors. CSS-hiding
|
||||
// isn't good enough here, because of bug 39098
|
||||
var secOverride = document.getElementById("securityOverrideDiv");
|
||||
secOverride.parentNode.removeChild(secOverride);
|
||||
}
|
||||
}
|
||||
|
||||
function showSecuritySection() {
|
||||
// Swap link out, content in
|
||||
document.getElementById('securityOverrideContent').style.display = '';
|
||||
document.getElementById('securityOverrideLink').style.display = 'none';
|
||||
}
|
||||
|
||||
/* In the case of SSL error pages about domain mismatch, see if
|
||||
we can hyperlink the user to the correct site. We don't want
|
||||
to do this generically since it allows MitM attacks to redirect
|
||||
users to a site under attacker control, but in certain cases
|
||||
it is safe (and helpful!) to do so. Bug 402210
|
||||
*/
|
||||
function addDomainErrorLink() {
|
||||
// Rather than textContent, we need to treat description as HTML
|
||||
var sd = document.getElementById("errorShortDescText");
|
||||
if (sd) {
|
||||
var desc = getDescription();
|
||||
|
||||
// sanitize description text - see bug 441169
|
||||
|
||||
// First, find the index of the <a> tag we care about, being careful not to
|
||||
// use an over-greedy regex
|
||||
var re = /<a id="cert_domain_link" title="([^"]+)">/;
|
||||
var result = re.exec(desc);
|
||||
if(!result)
|
||||
return;
|
||||
|
||||
// Remove sd's existing children
|
||||
sd.textContent = "";
|
||||
|
||||
// Everything up to the link should be text content
|
||||
sd.appendChild(document.createTextNode(desc.slice(0, result.index)));
|
||||
|
||||
// Now create the link itself
|
||||
var anchorEl = document.createElement("a");
|
||||
anchorEl.setAttribute("id", "cert_domain_link");
|
||||
anchorEl.setAttribute("title", result[1]);
|
||||
anchorEl.appendChild(document.createTextNode(result[1]));
|
||||
sd.appendChild(anchorEl);
|
||||
|
||||
// Finally, append text for anything after the closing </a>
|
||||
sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length)));
|
||||
}
|
||||
|
||||
var link = document.getElementById('cert_domain_link');
|
||||
if (!link)
|
||||
return;
|
||||
|
||||
var okHost = link.getAttribute("title");
|
||||
var thisHost = document.location.hostname;
|
||||
var proto = document.location.protocol;
|
||||
|
||||
// If okHost is a wildcard domain ("*.example.com") let's
|
||||
// use "www" instead. "*.example.com" isn't going to
|
||||
// get anyone anywhere useful. bug 432491
|
||||
okHost = okHost.replace(/^\*\./, "www.");
|
||||
|
||||
/* case #1:
|
||||
* example.com uses an invalid security certificate.
|
||||
*
|
||||
* The certificate is only valid for www.example.com
|
||||
*
|
||||
* Make sure to include the "." ahead of thisHost so that
|
||||
* a MitM attack on paypal.com doesn't hyperlink to "notpaypal.com"
|
||||
*
|
||||
* We'd normally just use a RegExp here except that we lack a
|
||||
* library function to escape them properly (bug 248062), and
|
||||
* domain names are famous for having '.' characters in them,
|
||||
* which would allow spurious and possibly hostile matches.
|
||||
*/
|
||||
if (endsWith(okHost, "." + thisHost))
|
||||
link.href = proto + okHost;
|
||||
|
||||
/* case #2:
|
||||
* browser.garage.maemo.org uses an invalid security certificate.
|
||||
*
|
||||
* The certificate is only valid for garage.maemo.org
|
||||
*/
|
||||
if (endsWith(thisHost, "." + okHost))
|
||||
link.href = proto + okHost;
|
||||
}
|
||||
|
||||
function endsWith(haystack, needle) {
|
||||
return haystack.slice(-needle.length) == needle;
|
||||
}
|
||||
|
||||
]]></script>
|
||||
</head>
|
||||
|
||||
<body id="errorPage" dir="&locale.dir;">
|
||||
|
||||
<!-- ERROR ITEM CONTAINER (removed during loading to avoid bug 39098) -->
|
||||
<div id="errorContainer">
|
||||
<div id="errorTitlesContainer">
|
||||
<h1 id="et_generic">&generic.title;</h1>
|
||||
<h1 id="et_dnsNotFound">&dnsNotFound.title;</h1>
|
||||
<h1 id="et_fileNotFound">&fileNotFound.title;</h1>
|
||||
<h1 id="et_malformedURI">&malformedURI.title;</h1>
|
||||
<h1 id="et_protocolNotFound">&protocolNotFound.title;</h1>
|
||||
<h1 id="et_connectionFailure">&connectionFailure.title;</h1>
|
||||
<h1 id="et_netTimeout">&netTimeout.title;</h1>
|
||||
<h1 id="et_redirectLoop">&redirectLoop.title;</h1>
|
||||
<h1 id="et_unknownSocketType">&unknownSocketType.title;</h1>
|
||||
<h1 id="et_netReset">&netReset.title;</h1>
|
||||
<h1 id="et_netOffline">&netOffline.title;</h1>
|
||||
<h1 id="et_netInterrupt">&netInterrupt.title;</h1>
|
||||
<h1 id="et_deniedPortAccess">&deniedPortAccess.title;</h1>
|
||||
<h1 id="et_proxyResolveFailure">&proxyResolveFailure.title;</h1>
|
||||
<h1 id="et_proxyConnectFailure">&proxyConnectFailure.title;</h1>
|
||||
<h1 id="et_contentEncodingError">&contentEncodingError.title;</h1>
|
||||
<h1 id="et_unsafeContentType">&unsafeContentType.title;</h1>
|
||||
<h1 id="et_nssFailure2">&nssFailure2.title;</h1>
|
||||
<h1 id="et_nssBadCert">&nssBadCert.title;</h1>
|
||||
<h1 id="et_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.title;</h1>
|
||||
<h1 id="et_remoteXUL">&remoteXUL.title;</h1>
|
||||
<h1 id="et_corruptedContentError">&corruptedContentError.title;</h1>
|
||||
</div>
|
||||
<div id="errorDescriptionsContainer">
|
||||
<div id="ed_generic">&generic.longDesc;</div>
|
||||
<div id="ed_dnsNotFound">&dnsNotFound.longDesc2;</div>
|
||||
<div id="ed_fileNotFound">&fileNotFound.longDesc;</div>
|
||||
<div id="ed_malformedURI">&malformedURI.longDesc;</div>
|
||||
<div id="ed_protocolNotFound">&protocolNotFound.longDesc;</div>
|
||||
<div id="ed_connectionFailure">&connectionFailure.longDesc;</div>
|
||||
<div id="ed_netTimeout">&netTimeout.longDesc;</div>
|
||||
<div id="ed_redirectLoop">&redirectLoop.longDesc;</div>
|
||||
<div id="ed_unknownSocketType">&unknownSocketType.longDesc;</div>
|
||||
<div id="ed_netReset">&netReset.longDesc;</div>
|
||||
<div id="ed_netOffline">&netOffline.longDesc2;</div>
|
||||
<div id="ed_netInterrupt">&netInterrupt.longDesc;</div>
|
||||
<div id="ed_deniedPortAccess">&deniedPortAccess.longDesc;</div>
|
||||
<div id="ed_proxyResolveFailure">&proxyResolveFailure.longDesc2;</div>
|
||||
<div id="ed_proxyConnectFailure">&proxyConnectFailure.longDesc;</div>
|
||||
<div id="ed_contentEncodingError">&contentEncodingError.longDesc;</div>
|
||||
<div id="ed_unsafeContentType">&unsafeContentType.longDesc;</div>
|
||||
<div id="ed_nssFailure2">&nssFailure2.longDesc;</div>
|
||||
<div id="ed_nssBadCert">&nssBadCert.longDesc2;</div>
|
||||
<div id="ed_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.longDesc;</div>
|
||||
<div id="ed_remoteXUL">&remoteXUL.longDesc;</div>
|
||||
<div id="ed_corruptedContentError">&corruptedContentError.longDesc;</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Error Title -->
|
||||
<div id="errorTitle">
|
||||
<h1 class="errorTitleText" />
|
||||
</div>
|
||||
|
||||
<!-- PAGE CONTAINER (for styling purposes only) -->
|
||||
<div id="errorPageContainer">
|
||||
|
||||
<!-- LONG CONTENT (the section most likely to require scrolling) -->
|
||||
<div id="errorLongContent">
|
||||
|
||||
<!-- Short Description -->
|
||||
<div id="errorShortDesc">
|
||||
<p id="errorShortDescText" />
|
||||
</div>
|
||||
|
||||
<!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
|
||||
<div id="errorLongDesc" />
|
||||
|
||||
<!-- Override section - For ssl errors only. Removed on init for other
|
||||
error types. -->
|
||||
<div id="securityOverrideDiv">
|
||||
<a id="securityOverrideLink" href="javascript:showSecuritySection();" >&securityOverride.linkText;</a>
|
||||
<div id="securityOverrideContent" style="display: none;">&securityOverride.warningContent;</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Retry Button -->
|
||||
<button id="errorTryAgain" onclick="retryThis(this);">&retry.label;</button>
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
- Note: It is important to run the script this way, instead of using
|
||||
- an onload handler. This is because error pages are loaded as
|
||||
- LOAD_BACKGROUND, which means that onload handlers will not be executed.
|
||||
-->
|
||||
<script type="application/javascript">initPage();</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,220 @@
|
|||
/* ***** 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 B2G.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* 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 ***** */
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
const CC = Components.Constructor;
|
||||
|
||||
Cu.import('resource://gre/modules/Services.jsm');
|
||||
|
||||
const LocalFile = CC('@mozilla.org/file/local;1',
|
||||
'nsILocalFile',
|
||||
'initWithPath');
|
||||
var shell = {
|
||||
get home() {
|
||||
delete this.home;
|
||||
return this.home = document.getElementById('homescreen');
|
||||
},
|
||||
|
||||
get homeSrc() {
|
||||
try {
|
||||
let homeSrc = Cc['@mozilla.org/process/environment;1']
|
||||
.getService(Ci.nsIEnvironment)
|
||||
.get('B2G_HOMESCREEN');
|
||||
if (homeSrc)
|
||||
return homeSrc;
|
||||
} catch (e) {}
|
||||
|
||||
let urls = Services.prefs.getCharPref('browser.homescreenURL').split(',');
|
||||
for (let i = 0; i < urls.length; i++) {
|
||||
let url = urls[i];
|
||||
if (url.substring(0, 7) != 'file://')
|
||||
return url;
|
||||
|
||||
let file = new LocalFile(url.substring(7, url.length));
|
||||
if (file.exists())
|
||||
return url;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
start: function shell_init() {
|
||||
window.controllers.appendController(this);
|
||||
window.addEventListener('keypress', this);
|
||||
this.home.addEventListener('load', this, true);
|
||||
|
||||
let ioService = Cc['@mozilla.org/network/io-service;1']
|
||||
.getService(Ci.nsIIOService2);
|
||||
ioService.offline = false;
|
||||
|
||||
let browser = this.home;
|
||||
browser.homePage = this.homeSrc;
|
||||
browser.goHome();
|
||||
},
|
||||
|
||||
stop: function shell_stop() {
|
||||
window.controllers.removeController(this);
|
||||
window.removeEventListener('keypress', this);
|
||||
},
|
||||
|
||||
supportsCommand: function shell_supportsCommand(cmd) {
|
||||
let isSupported = false;
|
||||
switch (cmd) {
|
||||
case 'cmd_close':
|
||||
isSupported = true;
|
||||
break;
|
||||
default:
|
||||
isSupported = false;
|
||||
break;
|
||||
}
|
||||
return isSupported;
|
||||
},
|
||||
|
||||
isCommandEnabled: function shell_isCommandEnabled(cmd) {
|
||||
return true;
|
||||
},
|
||||
|
||||
doCommand: function shell_doCommand(cmd) {
|
||||
switch (cmd) {
|
||||
case 'cmd_close':
|
||||
this.sendEvent(this.home.contentWindow, 'appclose');
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
handleEvent: function shell_handleEvent(evt) {
|
||||
switch (evt.type) {
|
||||
case 'keypress':
|
||||
switch (evt.keyCode) {
|
||||
case evt.DOM_VK_HOME:
|
||||
this.sendEvent(this.home.contentWindow, 'home');
|
||||
break;
|
||||
case evt.DOM_VK_SLEEP:
|
||||
screen.mozEnabled = !screen.mozEnabled;
|
||||
break;
|
||||
case evt.DOM_VK_ESCAPE:
|
||||
if (evt.getPreventDefault())
|
||||
return;
|
||||
this.doCommand('cmd_close');
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'load':
|
||||
this.home.removeEventListener('load', this, true);
|
||||
this.sendEvent(window, 'ContentStart');
|
||||
break;
|
||||
}
|
||||
},
|
||||
sendEvent: function shell_sendEvent(content, type, details) {
|
||||
let event = content.document.createEvent('CustomEvent');
|
||||
event.initCustomEvent(type, true, true, details ? details : {});
|
||||
content.dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
|
||||
(function VirtualKeyboardManager() {
|
||||
let activeElement = null;
|
||||
let isKeyboardOpened = false;
|
||||
|
||||
let constructor = {
|
||||
handleEvent: function vkm_handleEvent(evt) {
|
||||
let contentWindow = shell.home.contentWindow.wrappedJSObject;
|
||||
|
||||
switch (evt.type) {
|
||||
case 'ContentStart':
|
||||
contentWindow.navigator.mozKeyboard = new MozKeyboard();
|
||||
break;
|
||||
case 'keypress':
|
||||
if (evt.keyCode != evt.DOM_VK_ESCAPE || !isKeyboardOpened)
|
||||
return;
|
||||
|
||||
shell.sendEvent(contentWindow, 'hideime');
|
||||
isKeyboardOpened = false;
|
||||
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
break;
|
||||
case 'mousedown':
|
||||
if (evt.target != activeElement || isKeyboardOpened)
|
||||
return;
|
||||
|
||||
let type = activeElement.type;
|
||||
shell.sendEvent(contentWindow, 'showime', { type: type });
|
||||
isKeyboardOpened = true;
|
||||
break;
|
||||
}
|
||||
},
|
||||
observe: function vkm_observe(subject, topic, data) {
|
||||
let contentWindow = shell.home.contentWindow;
|
||||
|
||||
let shouldOpen = parseInt(data);
|
||||
if (shouldOpen && !isKeyboardOpened) {
|
||||
activeElement = Cc['@mozilla.org/focus-manager;1']
|
||||
.getService(Ci.nsIFocusManager)
|
||||
.focusedElement;
|
||||
if (!activeElement)
|
||||
return;
|
||||
|
||||
let type = activeElement.type;
|
||||
shell.sendEvent(contentWindow, 'showime', { type: type });
|
||||
} else if (!shouldOpen && isKeyboardOpened) {
|
||||
shell.sendEvent(contentWindow, 'hideime');
|
||||
}
|
||||
isKeyboardOpened = shouldOpen;
|
||||
}
|
||||
};
|
||||
|
||||
Services.obs.addObserver(constructor, "ime-enabled-state-changed", false);
|
||||
['ContentStart', 'keypress', 'mousedown'].forEach(function vkm_events(type) {
|
||||
window.addEventListener(type, constructor, true);
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
function MozKeyboard() {
|
||||
}
|
||||
|
||||
MozKeyboard.prototype = {
|
||||
sendKey: function mozKeyboardSendKey(keyCode) {
|
||||
var utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
['keydown', 'keypress', 'keyup'].forEach(function sendKeyEvents(type) {
|
||||
utils.sendKeyEvent(type, keyCode, keyCode, null);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- ***** 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) 2011
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Chris Jones <jones.chris.g@gmail.com>
|
||||
-
|
||||
- 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 LGPL or the GPL. 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 ***** -->
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="shell"
|
||||
width="480" height="800"
|
||||
#ifdef ANDROID
|
||||
sizemode="fullscreen"
|
||||
#endif
|
||||
style="background: black; overflow: hidden;"
|
||||
onload="shell.start();"
|
||||
onunload="shell.stop();">
|
||||
|
||||
<script type="application/javascript" src="chrome://browser/content/commandUtil.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/shell.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/touch.js"/>
|
||||
|
||||
<commandset id="mainCommandSet">
|
||||
<command id="cmd_close" oncommand="CommandUpdater.doCommand(this.id);"/>
|
||||
</commandset>
|
||||
|
||||
<browser id="homescreen" type="content-primary" flex="1" style="overflow: hidden;"/>
|
||||
</window>
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
/* ***** 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 B2G.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* the Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2011
|
||||
* 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 ***** */
|
||||
|
||||
(function touchEventHandler() {
|
||||
let debugging = false;
|
||||
function debug(str) {
|
||||
if (debugging)
|
||||
dump(str + '\n');
|
||||
};
|
||||
|
||||
let contextMenuTimeout = 0;
|
||||
|
||||
// This guard is used to not re-enter the events processing loop for
|
||||
// self dispatched events
|
||||
let ignoreEvents = false;
|
||||
|
||||
// During a 'touchstart' and the first 'touchmove' mouse events can be
|
||||
// prevented for the current touch sequence.
|
||||
let canPreventMouseEvents = false;
|
||||
|
||||
// Used to track the first mousemove and to cancel click dispatc if it's not
|
||||
// true.
|
||||
let isNewTouchAction = false;
|
||||
|
||||
// If this is set to true all mouse events will be cancelled by calling
|
||||
// both evt.preventDefault() and evt.stopPropagation().
|
||||
// This will not prevent a contextmenu event to be fired.
|
||||
// This can be turned on if canPreventMouseEvents is true and the consumer
|
||||
// application call evt.preventDefault();
|
||||
let preventMouseEvents = false;
|
||||
|
||||
let TouchEventHandler = {
|
||||
events: ['mousedown', 'mousemove', 'mouseup', 'click', 'unload'],
|
||||
start: function teh_start() {
|
||||
this.events.forEach((function(evt) {
|
||||
shell.home.addEventListener(evt, this, true);
|
||||
}).bind(this));
|
||||
},
|
||||
stop: function teh_stop() {
|
||||
this.events.forEach((function(evt) {
|
||||
shell.home.removeEventListener(evt, this, true);
|
||||
}).bind(this));
|
||||
},
|
||||
handleEvent: function teh_handleEvent(evt) {
|
||||
if (evt.button || ignoreEvents)
|
||||
return;
|
||||
|
||||
let eventTarget = this.target;
|
||||
let type = '';
|
||||
switch (evt.type) {
|
||||
case 'mousedown':
|
||||
debug('mousedown:');
|
||||
|
||||
this.target = evt.target;
|
||||
this.timestamp = evt.timeStamp;
|
||||
evt.target.setCapture(false);
|
||||
|
||||
preventMouseEvents = false;
|
||||
canPreventMouseEvents = true;
|
||||
isNewTouchAction = true;
|
||||
|
||||
contextMenuTimeout =
|
||||
this.sendContextMenu(evt.target, evt.pageX, evt.pageY, 2000);
|
||||
this.startX = evt.pageX;
|
||||
this.startY = evt.pageY;
|
||||
type = 'touchstart';
|
||||
break;
|
||||
|
||||
case 'mousemove':
|
||||
if (!eventTarget)
|
||||
return;
|
||||
|
||||
// On device a mousemove event if fired right after the mousedown
|
||||
// because of the size of the finger, so let's ignore what happens
|
||||
// below 5ms
|
||||
if (evt.timeStamp - this.timestamp < 30)
|
||||
break;
|
||||
|
||||
if (isNewTouchAction) {
|
||||
canPreventMouseEvents = true;
|
||||
isNewTouchAction = false;
|
||||
}
|
||||
|
||||
if (Math.abs(this.startX - evt.pageX) > 15 ||
|
||||
Math.abs(this.startY - evt.pageY) > 15)
|
||||
window.clearTimeout(contextMenuTimeout);
|
||||
type = 'touchmove';
|
||||
break;
|
||||
|
||||
case 'mouseup':
|
||||
if (!eventTarget)
|
||||
return;
|
||||
debug('mouseup:');
|
||||
|
||||
window.clearTimeout(contextMenuTimeout);
|
||||
eventTarget.ownerDocument.releaseCapture();
|
||||
this.target = null;
|
||||
type = 'touchend';
|
||||
break;
|
||||
|
||||
case 'unload':
|
||||
if (!eventTarget)
|
||||
return;
|
||||
|
||||
window.clearTimeout(contextMenuTimeout);
|
||||
eventTarget.ownerDocument.releaseCapture();
|
||||
this.target = null;
|
||||
TouchEventHandler.stop();
|
||||
return;
|
||||
|
||||
case 'click':
|
||||
if (!isNewTouchAction) {
|
||||
debug('click: cancel');
|
||||
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
} else {
|
||||
// Mouse events has been cancelled so dispatch a sequence
|
||||
// of events to where touchend has been fired
|
||||
if (preventMouseEvents) {
|
||||
let target = evt.target;
|
||||
ignoreEvents = true;
|
||||
try {
|
||||
this.fireMouseEvent('mousemove', evt);
|
||||
this.fireMouseEvent('mousedown', evt);
|
||||
this.fireMouseEvent('mouseup', evt);
|
||||
} catch (e) {
|
||||
alert(e);
|
||||
}
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
ignoreEvents = false;
|
||||
}
|
||||
|
||||
debug('click: fire');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
let target = eventTarget || this.target;
|
||||
if (target && type) {
|
||||
let touchEvent = this.sendTouchEvent(evt, target, type);
|
||||
if (touchEvent.getPreventDefault() && canPreventMouseEvents)
|
||||
preventMouseEvents = true;
|
||||
}
|
||||
|
||||
if (preventMouseEvents) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
|
||||
if (type != 'touchmove')
|
||||
debug('cancelled (fire ' + type + ')');
|
||||
}
|
||||
},
|
||||
fireMouseEvent: function teh_fireMouseEvent(type, evt) {
|
||||
debug(type + ': fire');
|
||||
|
||||
let content = evt.target.ownerDocument.defaultView;
|
||||
var utils = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
utils.sendMouseEvent(type, evt.pageX, evt.pageY, 0, 1, 0, true);
|
||||
},
|
||||
sendContextMenu: function teh_sendContextMenu(target, x, y, delay) {
|
||||
let doc = target.ownerDocument;
|
||||
let evt = doc.createEvent('MouseEvent');
|
||||
evt.initMouseEvent('contextmenu', true, true, doc.defaultView,
|
||||
0, x, y, x, y, false, false, false, false,
|
||||
0, null);
|
||||
|
||||
let timeout = window.setTimeout((function contextMenu() {
|
||||
debug('fire context-menu');
|
||||
|
||||
target.dispatchEvent(evt);
|
||||
if (!evt.getPreventDefault())
|
||||
return;
|
||||
|
||||
doc.releaseCapture();
|
||||
this.target = null;
|
||||
|
||||
isNewTouchAction = false;
|
||||
}).bind(this), delay);
|
||||
return timeout;
|
||||
},
|
||||
sendTouchEvent: function teh_sendTouchEvent(evt, target, name) {
|
||||
let touchEvent = document.createEvent('touchevent');
|
||||
let point = document.createTouch(window, target, 0,
|
||||
evt.pageX, evt.pageY,
|
||||
evt.screenX, evt.screenY,
|
||||
evt.clientX, evt.clientY,
|
||||
1, 1, 0, 0);
|
||||
let touches = document.createTouchList(point);
|
||||
let targetTouches = touches;
|
||||
let changedTouches = touches;
|
||||
touchEvent.initTouchEvent(name, true, true, window, 0,
|
||||
false, false, false, false,
|
||||
touches, targetTouches, changedTouches);
|
||||
target.dispatchEvent(touchEvent);
|
||||
return touchEvent;
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('ContentStart', function touchStart(evt) {
|
||||
window.removeEventListener('ContentStart', touchStart);
|
||||
TouchEventHandler.start();
|
||||
});
|
||||
})();
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#filter substitution
|
||||
|
||||
chrome.jar:
|
||||
% content branding %content/branding/
|
||||
% content browser %content/
|
||||
|
||||
* content/shell.xul (content/shell.xul)
|
||||
content/shell.js (content/shell.js)
|
||||
content/touch.js (content/touch.js)
|
||||
content/commandUtil.js (content/commandUtil.js)
|
||||
|
||||
% override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
|
||||
content/netError.xhtml (content/netError.xhtml)
|
|
@ -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
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.com>
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
MOZ_APP_BASENAME=B2G
|
||||
MOZ_APP_VENDOR=Mozilla
|
||||
|
||||
MOZ_APP_VERSION=11.0a1
|
||||
|
||||
MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial
|
||||
MOZ_OFFICIAL_BRANDING_DIRECTORY=b2g/branding/official
|
||||
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh
|
||||
|
||||
MOZ_SAFE_BROWSING=
|
||||
MOZ_SERVICES_SYNC=
|
||||
|
||||
MOZ_DISABLE_DOMCRYPTO=1
|
||||
MOZ_APP_STATIC_INI=1
|
||||
|
||||
if test "$OS_TARGET" = "Android"; then
|
||||
MOZ_CAPTURE=1
|
||||
MOZ_RAW=1
|
||||
fi
|
||||
|
||||
# use custom widget for html:select
|
||||
MOZ_USE_NATIVE_POPUP_WINDOWS=1
|
||||
|
||||
if test "$LIBXUL_SDK"; then
|
||||
MOZ_XULRUNNER=1
|
||||
else
|
||||
MOZ_XULRUNNER=
|
||||
MOZ_PLACES=1
|
||||
fi
|
||||
|
||||
MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61}
|
||||
MOZ_EXTENSION_MANAGER=1
|
|
@ -0,0 +1,126 @@
|
|||
# ***** 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 <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.com>
|
||||
# Ben Combee <bcombee@mozilla.com>
|
||||
#
|
||||
# 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
|
||||
|
||||
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
||||
|
||||
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
||||
|
||||
MOZ_NONLOCALIZED_PKG_LIST = \
|
||||
xpcom \
|
||||
browser \
|
||||
b2g \
|
||||
$(NULL)
|
||||
|
||||
MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
|
||||
|
||||
DEFINES += \
|
||||
-DAB_CD=$(AB_CD) \
|
||||
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
||||
-DPREF_DIR=$(PREF_DIR) \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
|
||||
JAREXT=.jar
|
||||
else
|
||||
JAREXT=
|
||||
endif
|
||||
DEFINES += -DJAREXT=$(JAREXT)
|
||||
|
||||
include $(topsrcdir)/ipc/app/defs.mk
|
||||
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
MOZ_PKG_MANIFEST = package-manifest
|
||||
endif
|
||||
|
||||
MOZ_POST_STAGING_CMD = find chrome -type f -name *.properties -exec sed -i '/^\#/d' {} \;
|
||||
|
||||
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
||||
|
||||
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
||||
BINPATH = $(_BINPATH)
|
||||
DEFINES += -DAPPNAME=$(_APPNAME)
|
||||
else
|
||||
# Every other platform just winds up in dist/bin
|
||||
BINPATH = bin
|
||||
endif
|
||||
DEFINES += -DBINPATH=$(BINPATH)
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
|
||||
|
||||
GARBAGE += $(MOZ_PKG_MANIFEST)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
PACKAGE_XULRUNNER =
|
||||
UNPACKAGE =
|
||||
else
|
||||
PACKAGE_XULRUNNER = package-xulrunner
|
||||
UNPACKAGE = $(LIBXUL_DIST)/xulrunner*$(PKG_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef LIBXUL_SDK
|
||||
MOZ_GRE_PKG_DIR=$(MOZ_PKG_DIR)/xulrunner
|
||||
else
|
||||
MOZ_GRE_PKG_DIR=$(MOZ_PKG_DIR)
|
||||
endif
|
||||
|
||||
package-xulrunner:
|
||||
ifdef LIBXUL_SDK
|
||||
ifndef SYSTEM_LIBXUL
|
||||
@echo "Packaging xulrunner..."
|
||||
@rm -rf $(LIBXUL_DIST)/xulrunner*
|
||||
@$(MAKE) -C $(LIBXUL_DIST)/.. package || echo "Perhaps you're trying to package a prebuilt SDK. See 'https://wiki.mozilla.org/B2G' for more information."
|
||||
@cd $(DIST)/$(MOZ_PKG_DIR); $(UNMAKE_PACKAGE)
|
||||
@echo "Removing unpackaged files... (the ones xulrunner/installer keeps)"
|
||||
@cd $(DIST)/$(MOZ_PKG_DIR)/xulrunner; rm -rf $(NO_PKG_FILES)
|
||||
else
|
||||
@echo "Using system xulrunner..."
|
||||
endif
|
||||
endif
|
||||
|
|
@ -0,0 +1,595 @@
|
|||
; Package file for the B2G build.
|
||||
;
|
||||
; File format:
|
||||
;
|
||||
; [] designates a toplevel component. Example: [xpcom]
|
||||
; - in front of a file specifies it to be removed from the destination
|
||||
; * wildcard support to recursively copy the entire directory
|
||||
; ; file comment
|
||||
;
|
||||
|
||||
#filter substitution
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
; Mac bundle stuff
|
||||
@APPNAME@/Contents/Info.plist
|
||||
@APPNAME@/Contents/PkgInfo
|
||||
@APPNAME@/Contents/Plug-Ins/
|
||||
@APPNAME@/Contents/Resources/
|
||||
#endif
|
||||
|
||||
[@AB_CD@]
|
||||
@BINPATH@/chrome/@AB_CD@@JAREXT@
|
||||
@BINPATH@/chrome/@AB_CD@.manifest
|
||||
@BINPATH@/@PREF_DIR@/b2g-l10n.js
|
||||
@BINPATH@/searchplugins/*
|
||||
@BINPATH@/defaults/profile/bookmarks.html
|
||||
@BINPATH@/defaults/profile/localstore.rdf
|
||||
@BINPATH@/defaults/profile/mimeTypes.rdf
|
||||
@BINPATH@/defaults/profile/chrome/*
|
||||
#ifdef MOZ_UPDATER
|
||||
@BINPATH@/update.locale
|
||||
@BINPATH@/updater.ini
|
||||
#endif
|
||||
@BINPATH@/dictionaries/*
|
||||
@BINPATH@/hyphenation/*
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/uninstall/helper.exe
|
||||
#endif
|
||||
|
||||
[xpcom]
|
||||
@BINPATH@/dependentlibs.list
|
||||
#ifndef MOZ_STATIC_JS
|
||||
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/XUL
|
||||
#else
|
||||
@BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
|
||||
#else
|
||||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
|
||||
#endif
|
||||
#ifdef XP_WIN32
|
||||
#ifndef MOZ_MEMORY
|
||||
#if _MSC_VER == 1400
|
||||
@BINPATH@/Microsoft.VC80.CRT.manifest
|
||||
@BINPATH@/msvcm80.dll
|
||||
@BINPATH@/msvcp80.dll
|
||||
@BINPATH@/msvcr80.dll
|
||||
#elif _MSC_VER == 1500
|
||||
@BINPATH@/Microsoft.VC90.CRT.manifest
|
||||
@BINPATH@/msvcm90.dll
|
||||
@BINPATH@/msvcp90.dll
|
||||
@BINPATH@/msvcr90.dll
|
||||
#elif _MSC_VER == 1600
|
||||
@BINPATH@/msvcp100.dll
|
||||
@BINPATH@/msvcr100.dll
|
||||
#endif
|
||||
#else
|
||||
@BINPATH@/mozcrt19.dll
|
||||
@BINPATH@/mozcpp19.dll
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
@BINPATH@/AndroidManifest.xml
|
||||
@BINPATH@/resources.arsc
|
||||
@BINPATH@/classes.dex
|
||||
@BINPATH@/@DLL_PREFIX@mozutils@DLL_SUFFIX@
|
||||
@BINPATH@/res/drawable
|
||||
@BINPATH@/res/drawable-hdpi
|
||||
@BINPATH@/res/layout
|
||||
#endif
|
||||
|
||||
[browser]
|
||||
; [Base Browser Files]
|
||||
#ifndef XP_UNIX
|
||||
@BINPATH@/@MOZ_APP_NAME@.exe
|
||||
#else
|
||||
@BINPATH@/@MOZ_APP_NAME@-bin
|
||||
@BINPATH@/@MOZ_APP_NAME@
|
||||
#endif
|
||||
@BINPATH@/application.ini
|
||||
@BINPATH@/platform.ini
|
||||
#ifndef XP_OS2
|
||||
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||
#else
|
||||
@BINPATH@/mozsqlt3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/blocklist.xml
|
||||
#ifdef XP_UNIX
|
||||
@BINPATH@/run-mozilla.sh
|
||||
#ifndef XP_MACOSX
|
||||
@BINPATH@/mozilla-xremote-client
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; [Components]
|
||||
@BINPATH@/components/components.manifest
|
||||
@BINPATH@/components/alerts.xpt
|
||||
#ifdef ACCESSIBILITY
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/AccessibleMarshal.dll
|
||||
@BINPATH@/components/accessibility-msaa.xpt
|
||||
#endif
|
||||
@BINPATH@/components/accessibility.xpt
|
||||
#endif
|
||||
@BINPATH@/components/appshell.xpt
|
||||
@BINPATH@/components/appstartup.xpt
|
||||
@BINPATH@/components/autocomplete.xpt
|
||||
@BINPATH@/components/autoconfig.xpt
|
||||
@BINPATH@/components/browsercompsbase.xpt
|
||||
@BINPATH@/components/browser-feeds.xpt
|
||||
@BINPATH@/components/caps.xpt
|
||||
@BINPATH@/components/chardet.xpt
|
||||
@BINPATH@/components/chrome.xpt
|
||||
@BINPATH@/components/commandhandler.xpt
|
||||
@BINPATH@/components/commandlines.xpt
|
||||
@BINPATH@/components/composer.xpt
|
||||
@BINPATH@/components/content_base.xpt
|
||||
@BINPATH@/components/content_events.xpt
|
||||
@BINPATH@/components/content_canvas.xpt
|
||||
@BINPATH@/components/content_htmldoc.xpt
|
||||
@BINPATH@/components/content_html.xpt
|
||||
@BINPATH@/components/content_xslt.xpt
|
||||
@BINPATH@/components/content_xtf.xpt
|
||||
@BINPATH@/components/cookie.xpt
|
||||
@BINPATH@/components/directory.xpt
|
||||
@BINPATH@/components/docshell.xpt
|
||||
@BINPATH@/components/dom.xpt
|
||||
@BINPATH@/components/dom_base.xpt
|
||||
#ifdef MOZ_B2G_RIL
|
||||
@BINPATH@/components/dom_telephony.xpt
|
||||
@BINPATH@/components/dom_system_b2g.xpt
|
||||
#endif
|
||||
@BINPATH@/components/dom_battery.xpt
|
||||
@BINPATH@/components/dom_canvas.xpt
|
||||
@BINPATH@/components/dom_core.xpt
|
||||
@BINPATH@/components/dom_css.xpt
|
||||
@BINPATH@/components/dom_events.xpt
|
||||
@BINPATH@/components/dom_geolocation.xpt
|
||||
@BINPATH@/components/dom_notification.xpt
|
||||
@BINPATH@/components/dom_html.xpt
|
||||
@BINPATH@/components/dom_indexeddb.xpt
|
||||
@BINPATH@/components/dom_offline.xpt
|
||||
@BINPATH@/components/dom_json.xpt
|
||||
@BINPATH@/components/dom_range.xpt
|
||||
@BINPATH@/components/dom_sidebar.xpt
|
||||
@BINPATH@/components/dom_storage.xpt
|
||||
@BINPATH@/components/dom_stylesheets.xpt
|
||||
@BINPATH@/components/dom_threads.xpt
|
||||
@BINPATH@/components/dom_traversal.xpt
|
||||
@BINPATH@/components/dom_views.xpt
|
||||
@BINPATH@/components/dom_xbl.xpt
|
||||
@BINPATH@/components/dom_xpath.xpt
|
||||
@BINPATH@/components/dom_xul.xpt
|
||||
@BINPATH@/components/dom_loadsave.xpt
|
||||
@BINPATH@/components/downloads.xpt
|
||||
@BINPATH@/components/editor.xpt
|
||||
@BINPATH@/components/embed_base.xpt
|
||||
@BINPATH@/components/extensions.xpt
|
||||
@BINPATH@/components/exthandler.xpt
|
||||
@BINPATH@/components/exthelper.xpt
|
||||
@BINPATH@/components/fastfind.xpt
|
||||
@BINPATH@/components/feeds.xpt
|
||||
#ifdef MOZ_GTK2
|
||||
@BINPATH@/components/filepicker.xpt
|
||||
#endif
|
||||
@BINPATH@/components/find.xpt
|
||||
@BINPATH@/components/fuel.xpt
|
||||
@BINPATH@/components/gfx.xpt
|
||||
@BINPATH@/components/htmlparser.xpt
|
||||
@BINPATH@/components/imglib2.xpt
|
||||
@BINPATH@/components/imgicon.xpt
|
||||
@BINPATH@/components/inspector.xpt
|
||||
@BINPATH@/components/intl.xpt
|
||||
@BINPATH@/components/jar.xpt
|
||||
@BINPATH@/components/jetpack.xpt
|
||||
@BINPATH@/components/jsdservice.xpt
|
||||
@BINPATH@/components/layout_base.xpt
|
||||
@BINPATH@/components/layout_forms.xpt
|
||||
#ifdef NS_PRINTING
|
||||
@BINPATH@/components/layout_printing.xpt
|
||||
#endif
|
||||
@BINPATH@/components/layout_xul_tree.xpt
|
||||
@BINPATH@/components/layout_xul.xpt
|
||||
@BINPATH@/components/locale.xpt
|
||||
@BINPATH@/components/lwbrk.xpt
|
||||
@BINPATH@/components/migration.xpt
|
||||
@BINPATH@/components/mimetype.xpt
|
||||
@BINPATH@/components/mozfind.xpt
|
||||
@BINPATH@/components/necko_about.xpt
|
||||
@BINPATH@/components/necko_cache.xpt
|
||||
@BINPATH@/components/necko_cookie.xpt
|
||||
@BINPATH@/components/necko_dns.xpt
|
||||
@BINPATH@/components/necko_file.xpt
|
||||
@BINPATH@/components/necko_ftp.xpt
|
||||
@BINPATH@/components/necko_http.xpt
|
||||
@BINPATH@/components/necko_res.xpt
|
||||
@BINPATH@/components/necko_socket.xpt
|
||||
@BINPATH@/components/necko_strconv.xpt
|
||||
@BINPATH@/components/necko_viewsource.xpt
|
||||
@BINPATH@/components/necko_wifi.xpt
|
||||
@BINPATH@/components/necko_wyciwyg.xpt
|
||||
@BINPATH@/components/necko.xpt
|
||||
@BINPATH@/components/loginmgr.xpt
|
||||
@BINPATH@/components/parentalcontrols.xpt
|
||||
@BINPATH@/components/places.xpt
|
||||
@BINPATH@/components/plugin.xpt
|
||||
@BINPATH@/components/pref.xpt
|
||||
@BINPATH@/components/prefetch.xpt
|
||||
@BINPATH@/components/profile.xpt
|
||||
@BINPATH@/components/proxyObject.xpt
|
||||
@BINPATH@/components/rdf.xpt
|
||||
@BINPATH@/components/satchel.xpt
|
||||
@BINPATH@/components/saxparser.xpt
|
||||
@BINPATH@/components/sessionstore.xpt
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
@BINPATH@/components/services-crypto.xpt
|
||||
#endif
|
||||
@BINPATH@/components/services-crypto-component.xpt
|
||||
@BINPATH@/components/shellservice.xpt
|
||||
@BINPATH@/components/shistory.xpt
|
||||
@BINPATH@/components/spellchecker.xpt
|
||||
@BINPATH@/components/storage.xpt
|
||||
@BINPATH@/components/telemetry.xpt
|
||||
@BINPATH@/components/toolkitprofile.xpt
|
||||
#ifdef MOZ_ENABLE_XREMOTE
|
||||
@BINPATH@/components/toolkitremote.xpt
|
||||
#endif
|
||||
@BINPATH@/components/txtsvc.xpt
|
||||
@BINPATH@/components/txmgr.xpt
|
||||
#ifdef MOZ_USE_NATIVE_UCONV
|
||||
@BINPATH@/components/ucnative.xpt
|
||||
#endif
|
||||
@BINPATH@/components/uconv.xpt
|
||||
@BINPATH@/components/unicharutil.xpt
|
||||
#ifdef MOZ_UPDATER
|
||||
@BINPATH@/components/update.xpt
|
||||
#endif
|
||||
@BINPATH@/components/uriloader.xpt
|
||||
@BINPATH@/components/urlformatter.xpt
|
||||
@BINPATH@/components/webBrowser_core.xpt
|
||||
@BINPATH@/components/webbrowserpersist.xpt
|
||||
@BINPATH@/components/webshell_idls.xpt
|
||||
@BINPATH@/components/widget.xpt
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/components/widget_cocoa.xpt
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
@BINPATH@/components/widget_android.xpt
|
||||
#endif
|
||||
@BINPATH@/components/windowds.xpt
|
||||
@BINPATH@/components/windowwatcher.xpt
|
||||
@BINPATH@/components/xpcom_base.xpt
|
||||
@BINPATH@/components/xpcom_system.xpt
|
||||
@BINPATH@/components/xpcom_components.xpt
|
||||
@BINPATH@/components/xpcom_ds.xpt
|
||||
@BINPATH@/components/xpcom_io.xpt
|
||||
@BINPATH@/components/xpcom_threads.xpt
|
||||
@BINPATH@/components/xpcom_xpti.xpt
|
||||
@BINPATH@/components/xpconnect.xpt
|
||||
@BINPATH@/components/xulapp.xpt
|
||||
@BINPATH@/components/xul.xpt
|
||||
@BINPATH@/components/xuldoc.xpt
|
||||
@BINPATH@/components/xultmpl.xpt
|
||||
@BINPATH@/components/zipwriter.xpt
|
||||
@BINPATH@/components/webapps.xpt
|
||||
|
||||
; JavaScript components
|
||||
@BINPATH@/components/ConsoleAPI.manifest
|
||||
@BINPATH@/components/ConsoleAPI.js
|
||||
@BINPATH@/components/FeedProcessor.manifest
|
||||
@BINPATH@/components/FeedProcessor.js
|
||||
@BINPATH@/components/BrowserFeeds.manifest
|
||||
@BINPATH@/components/FeedConverter.js
|
||||
@BINPATH@/components/FeedWriter.js
|
||||
@BINPATH@/components/fuelApplication.manifest
|
||||
@BINPATH@/components/fuelApplication.js
|
||||
@BINPATH@/components/WebContentConverter.js
|
||||
@BINPATH@/components/BrowserComponents.manifest
|
||||
@BINPATH@/components/nsBrowserContentHandler.js
|
||||
@BINPATH@/components/nsBrowserGlue.js
|
||||
@BINPATH@/components/nsSetDefaultBrowser.manifest
|
||||
@BINPATH@/components/nsSetDefaultBrowser.js
|
||||
@BINPATH@/components/BrowserPlaces.manifest
|
||||
@BINPATH@/components/nsPrivateBrowsingService.manifest
|
||||
@BINPATH@/components/nsPrivateBrowsingService.js
|
||||
@BINPATH@/components/toolkitsearch.manifest
|
||||
@BINPATH@/components/nsSearchService.js
|
||||
@BINPATH@/components/nsSearchSuggestions.js
|
||||
@BINPATH@/components/nsTryToClose.manifest
|
||||
@BINPATH@/components/nsTryToClose.js
|
||||
@BINPATH@/components/passwordmgr.manifest
|
||||
@BINPATH@/components/nsLoginInfo.js
|
||||
@BINPATH@/components/nsLoginManager.js
|
||||
@BINPATH@/components/nsLoginManagerPrompter.js
|
||||
@BINPATH@/components/storage-Legacy.js
|
||||
@BINPATH@/components/storage-mozStorage.js
|
||||
@BINPATH@/components/crypto-SDR.js
|
||||
@BINPATH@/components/jsconsole-clhandler.manifest
|
||||
@BINPATH@/components/jsconsole-clhandler.js
|
||||
#ifdef MOZ_GTK2
|
||||
@BINPATH@/components/nsFilePicker.manifest
|
||||
@BINPATH@/components/nsFilePicker.js
|
||||
#endif
|
||||
@BINPATH@/components/nsHelperAppDlg.manifest
|
||||
@BINPATH@/components/nsHelperAppDlg.js
|
||||
@BINPATH@/components/nsDownloadManagerUI.manifest
|
||||
@BINPATH@/components/nsDownloadManagerUI.js
|
||||
@BINPATH@/components/nsProxyAutoConfig.manifest
|
||||
@BINPATH@/components/nsProxyAutoConfig.js
|
||||
@BINPATH@/components/NetworkGeolocationProvider.manifest
|
||||
@BINPATH@/components/NetworkGeolocationProvider.js
|
||||
@BINPATH@/components/GPSDGeolocationProvider.manifest
|
||||
@BINPATH@/components/GPSDGeolocationProvider.js
|
||||
@BINPATH@/components/nsSidebar.manifest
|
||||
@BINPATH@/components/nsSidebar.js
|
||||
@BINPATH@/components/extensions.manifest
|
||||
@BINPATH@/components/addonManager.js
|
||||
@BINPATH@/components/amContentHandler.js
|
||||
@BINPATH@/components/amWebInstallListener.js
|
||||
@BINPATH@/components/nsBlocklistService.js
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
@BINPATH@/components/nsUpdateService.manifest
|
||||
@BINPATH@/components/nsUpdateService.js
|
||||
@BINPATH@/components/nsUpdateServiceStub.js
|
||||
#endif
|
||||
@BINPATH@/components/nsUpdateTimerManager.manifest
|
||||
@BINPATH@/components/nsUpdateTimerManager.js
|
||||
@BINPATH@/components/pluginGlue.manifest
|
||||
@BINPATH@/components/nsSessionStore.manifest
|
||||
@BINPATH@/components/nsSessionStartup.js
|
||||
@BINPATH@/components/nsSessionStore.js
|
||||
@BINPATH@/components/nsURLFormatter.manifest
|
||||
@BINPATH@/components/nsURLFormatter.js
|
||||
#ifndef XP_OS2
|
||||
@BINPATH@/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@
|
||||
#else
|
||||
@BINPATH@/components/brwsrcmp@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/components/txEXSLTRegExFunctions.manifest
|
||||
@BINPATH@/components/txEXSLTRegExFunctions.js
|
||||
@BINPATH@/components/toolkitplaces.manifest
|
||||
@BINPATH@/components/nsLivemarkService.js
|
||||
@BINPATH@/components/nsTaggingService.js
|
||||
@BINPATH@/components/nsPlacesDBFlush.js
|
||||
@BINPATH@/components/nsPlacesAutoComplete.manifest
|
||||
@BINPATH@/components/nsPlacesAutoComplete.js
|
||||
@BINPATH@/components/nsPlacesExpiration.js
|
||||
@BINPATH@/components/PlacesProtocolHandler.js
|
||||
@BINPATH@/components/PlacesCategoriesStarter.js
|
||||
@BINPATH@/components/nsDefaultCLH.manifest
|
||||
@BINPATH@/components/nsDefaultCLH.js
|
||||
@BINPATH@/components/nsContentPrefService.manifest
|
||||
@BINPATH@/components/nsContentPrefService.js
|
||||
@BINPATH@/components/nsContentDispatchChooser.manifest
|
||||
@BINPATH@/components/nsContentDispatchChooser.js
|
||||
@BINPATH@/components/nsHandlerService.manifest
|
||||
@BINPATH@/components/nsHandlerService.js
|
||||
@BINPATH@/components/nsWebHandlerApp.manifest
|
||||
@BINPATH@/components/nsWebHandlerApp.js
|
||||
@BINPATH@/components/nsBadCertHandler.manifest
|
||||
@BINPATH@/components/nsBadCertHandler.js
|
||||
@BINPATH@/components/satchel.manifest
|
||||
@BINPATH@/components/nsFormAutoComplete.js
|
||||
@BINPATH@/components/nsFormHistory.js
|
||||
@BINPATH@/components/nsInputListAutoComplete.js
|
||||
@BINPATH@/components/contentSecurityPolicy.manifest
|
||||
@BINPATH@/components/contentSecurityPolicy.js
|
||||
@BINPATH@/components/contentAreaDropListener.manifest
|
||||
@BINPATH@/components/contentAreaDropListener.js
|
||||
@BINPATH@/components/messageWakeupService.js
|
||||
@BINPATH@/components/messageWakeupService.manifest
|
||||
@BINPATH@/components/nsFilePicker.js
|
||||
@BINPATH@/components/nsFilePicker.manifest
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/components/libalerts_s.dylib
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
@BINPATH@/components/@DLL_PREFIX@dbusservice@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/components/nsINIProcessor.manifest
|
||||
@BINPATH@/components/nsINIProcessor.js
|
||||
@BINPATH@/components/nsPrompter.manifest
|
||||
@BINPATH@/components/nsPrompter.js
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
@BINPATH@/components/SyncComponents.manifest
|
||||
@BINPATH@/components/Weave.js
|
||||
@BINPATH@/components/WeaveCrypto.manifest
|
||||
@BINPATH@/components/WeaveCrypto.js
|
||||
#endif
|
||||
@BINPATH@/components/TelemetryPing.js
|
||||
@BINPATH@/components/TelemetryPing.manifest
|
||||
|
||||
; Modules
|
||||
@BINPATH@/modules/*
|
||||
|
||||
; Safe Browsing
|
||||
@BINPATH@/components/nsURLClassifier.manifest
|
||||
@BINPATH@/components/nsUrlClassifierHashCompleter.js
|
||||
@BINPATH@/components/nsUrlClassifierListManager.js
|
||||
@BINPATH@/components/nsUrlClassifierLib.js
|
||||
@BINPATH@/components/url-classifier.xpt
|
||||
|
||||
; GNOME hooks
|
||||
#ifdef MOZ_ENABLE_GNOME_COMPONENT
|
||||
@BINPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@
|
||||
#endif
|
||||
|
||||
; ANGLE on Win32
|
||||
#ifdef XP_WIN32
|
||||
#ifndef HAVE_64BIT_OS
|
||||
@BINPATH@/libEGL.dll
|
||||
@BINPATH@/libGLESv2.dll
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; [Browser Chrome Files]
|
||||
@BINPATH@/chrome/browser@JAREXT@
|
||||
@BINPATH@/chrome/browser.manifest
|
||||
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
|
||||
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
|
||||
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
|
||||
#if MOZ_UPDATE_CHANNEL == beta
|
||||
@BINPATH@/extensions/testpilot@labs.mozilla.com/*
|
||||
#endif
|
||||
@BINPATH@/chrome/toolkit@JAREXT@
|
||||
@BINPATH@/chrome/toolkit.manifest
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
@BINPATH@/chrome/icons/default/default16.png
|
||||
@BINPATH@/chrome/icons/default/default32.png
|
||||
@BINPATH@/chrome/icons/default/default48.png
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
; shell icons
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
@BINPATH@/icons/*.xpm
|
||||
@BINPATH@/icons/*.png
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; [Default Preferences]
|
||||
; All the pref files must be part of base to prevent migration bugs
|
||||
@BINPATH@/@PREF_DIR@/b2g.js
|
||||
@BINPATH@/@PREF_DIR@/channel-prefs.js
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
@BINPATH@/@PREF_DIR@/services-sync.js
|
||||
#endif
|
||||
@BINPATH@/greprefs.js
|
||||
@BINPATH@/defaults/autoconfig/platform.js
|
||||
@BINPATH@/defaults/autoconfig/prefcalls.js
|
||||
@BINPATH@/defaults/profile/prefs.js
|
||||
|
||||
; [Layout Engine Resources]
|
||||
; Style Sheets, Graphics and other Resources used by the layout engine.
|
||||
@BINPATH@/res/EditorOverride.css
|
||||
@BINPATH@/res/contenteditable.css
|
||||
@BINPATH@/res/designmode.css
|
||||
@BINPATH@/res/table-add-column-after-active.gif
|
||||
@BINPATH@/res/table-add-column-after-hover.gif
|
||||
@BINPATH@/res/table-add-column-after.gif
|
||||
@BINPATH@/res/table-add-column-before-active.gif
|
||||
@BINPATH@/res/table-add-column-before-hover.gif
|
||||
@BINPATH@/res/table-add-column-before.gif
|
||||
@BINPATH@/res/table-add-row-after-active.gif
|
||||
@BINPATH@/res/table-add-row-after-hover.gif
|
||||
@BINPATH@/res/table-add-row-after.gif
|
||||
@BINPATH@/res/table-add-row-before-active.gif
|
||||
@BINPATH@/res/table-add-row-before-hover.gif
|
||||
@BINPATH@/res/table-add-row-before.gif
|
||||
@BINPATH@/res/table-remove-column-active.gif
|
||||
@BINPATH@/res/table-remove-column-hover.gif
|
||||
@BINPATH@/res/table-remove-column.gif
|
||||
@BINPATH@/res/table-remove-row-active.gif
|
||||
@BINPATH@/res/table-remove-row-hover.gif
|
||||
@BINPATH@/res/table-remove-row.gif
|
||||
@BINPATH@/res/grabber.gif
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/res/cursors/*
|
||||
#endif
|
||||
@BINPATH@/res/fonts/*
|
||||
@BINPATH@/res/dtd/*
|
||||
@BINPATH@/res/html/*
|
||||
@BINPATH@/res/langGroups.properties
|
||||
@BINPATH@/res/language.properties
|
||||
@BINPATH@/res/entityTables/*
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/res/MainMenu.nib/
|
||||
#endif
|
||||
|
||||
; svg
|
||||
@BINPATH@/res/svg.css
|
||||
@BINPATH@/components/dom_svg.xpt
|
||||
#ifdef MOZ_SMIL
|
||||
@BINPATH@/components/dom_smil.xpt
|
||||
#endif
|
||||
|
||||
; [Personal Security Manager]
|
||||
;
|
||||
@BINPATH@/@DLL_PREFIX@nssckbi@DLL_SUFFIX@
|
||||
@BINPATH@/components/pipboot.xpt
|
||||
@BINPATH@/components/pipnss.xpt
|
||||
@BINPATH@/components/pippki.xpt
|
||||
@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
|
||||
#ifndef CROSS_COMPILE
|
||||
@BINPATH@/@DLL_PREFIX@freebl3.chk
|
||||
@BINPATH@/@DLL_PREFIX@softokn3.chk
|
||||
#endif
|
||||
#ifndef NSS_DISABLE_DBM
|
||||
@BINPATH@/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@
|
||||
#ifndef CROSS_COMPILE
|
||||
@BINPATH@/@DLL_PREFIX@nssdbm3.chk
|
||||
#endif
|
||||
#endif
|
||||
@BINPATH@/chrome/pippki@JAREXT@
|
||||
@BINPATH@/chrome/pippki.manifest
|
||||
|
||||
; for Solaris SPARC
|
||||
#ifdef SOLARIS
|
||||
bin/libfreebl_32fpu_3.chk
|
||||
bin/libfreebl_32fpu_3.so
|
||||
bin/libfreebl_32int_3.chk
|
||||
bin/libfreebl_32int_3.so
|
||||
bin/libfreebl_32int64_3.chk
|
||||
bin/libfreebl_32int64_3.so
|
||||
#endif
|
||||
|
||||
; [Updater]
|
||||
;
|
||||
#ifdef MOZ_UPDATER
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/updater.app/
|
||||
#else
|
||||
@BINPATH@/updater@BIN_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; [Crash Reporter]
|
||||
;
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/crashreporter.app/
|
||||
#else
|
||||
@BINPATH@/crashreporter@BIN_SUFFIX@
|
||||
@BINPATH@/crashreporter.crt
|
||||
@BINPATH@/crashreporter.ini
|
||||
#ifdef XP_UNIX
|
||||
@BINPATH@/Throbber-small.gif
|
||||
#endif
|
||||
#endif
|
||||
@BINPATH@/crashreporter-override.ini
|
||||
#endif
|
||||
|
||||
; [Extensions]
|
||||
;
|
||||
#ifdef MOZ_ENABLE_GNOMEVFS
|
||||
bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
|
||||
#endif
|
||||
|
||||
; [OS/2]
|
||||
#ifdef XP_OS2
|
||||
@BINPATH@/MozSounds.cmd
|
||||
#endif
|
||||
|
||||
[b2g]
|
||||
@BINPATH@/chrome/icons/
|
||||
@BINPATH@/chrome/chrome@JAREXT@
|
||||
@BINPATH@/chrome/chrome.manifest
|
|
@ -0,0 +1 @@
|
|||
README.txt
|
|
@ -0,0 +1,227 @@
|
|||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
# ***** 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 <bsmedberg@covad.net>
|
||||
# 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 = b2g/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifdef LOCALE_MERGEDIR
|
||||
vpath crashreporter%.ini $(LOCALE_MERGEDIR)/b2g/crashreporter
|
||||
endif
|
||||
vpath crashreporter%.ini $(LOCALE_SRCDIR)/crashreporter
|
||||
ifdef LOCALE_MERGEDIR
|
||||
vpath crashreporter%.ini @srcdir@/en-US/crashreporter
|
||||
endif
|
||||
|
||||
|
||||
SUBMAKEFILES += \
|
||||
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
|
||||
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
|
||||
$(NULL)
|
||||
|
||||
# This makefile uses variable overrides from the libs-% target to
|
||||
# build non-default locales to non-default dist/ locations. Be aware!
|
||||
|
||||
PWD := $(CURDIR)
|
||||
|
||||
# These are defaulted to be compatible with the files the wget-en-US target
|
||||
# pulls. You may override them if you provide your own files. You _must_
|
||||
# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
|
||||
# work in that case.
|
||||
ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
|
||||
WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
|
||||
RETRIEVE_WINDOWS_INSTALLER = 1
|
||||
|
||||
MOZ_LANGPACK_EID=langpack-$(AB_CD)@b2g.mozilla.org
|
||||
|
||||
PREF_JS_EXPORTS = $(call MERGE_FILE,b2g-l10n.js)
|
||||
|
||||
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
|
||||
MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
|
||||
MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
|
||||
MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
|
||||
endif
|
||||
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
|
||||
$(NSINSTALL) -D $(STAGEDIST)/uninstall; \
|
||||
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
|
||||
$(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \
|
||||
cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
include $(topsrcdir)/toolkit/locales/l10n.mk
|
||||
|
||||
$(STAGEDIST): $(DIST)/branding
|
||||
|
||||
$(DIST)/branding:
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
libs::
|
||||
@if test -f "$(LOCALE_SRCDIR)/existing-profile-defaults.js"; then \
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
|
||||
$(LOCALE_SRCDIR)/existing-profile-defaults.js > $(FINAL_TARGET)/defaults/existing-profile-defaults.js; \
|
||||
fi
|
||||
install::
|
||||
@if test -f "$(LOCALE_SRCDIR)/existing-profile-defaults.js"; then \
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
|
||||
$(LOCALE_SRCDIR)/existing-profile-defaults.js > $(DESTDIR)$(mozappdir)/defaults/existing-profile-defaults.js; \
|
||||
fi
|
||||
|
||||
NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
|
||||
|
||||
libs-%:
|
||||
$(NSINSTALL) -D $(DIST)/install
|
||||
@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
|
||||
@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
|
||||
@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
|
||||
@$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
|
||||
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1
|
||||
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
|
||||
|
||||
|
||||
repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
|
||||
repackage-win32-installer: $(call ESCAPE_SPACE,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
|
||||
@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
|
||||
$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
|
||||
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
|
||||
$(MAKE) repackage-zip \
|
||||
AB_CD=$(AB_CD) \
|
||||
MOZ_PKG_FORMAT=SFX7Z \
|
||||
ZIP_IN="$(WIN32_INSTALLER_IN)" \
|
||||
ZIP_OUT="$(WIN32_INSTALLER_OUT)" \
|
||||
SFX_HEADER="$(PWD)/../installer/windows/l10ngen/7zSD.sfx \
|
||||
$(topsrcdir)/b2g/installer/windows/app.tag"
|
||||
|
||||
ifeq (WINNT,$(OS_ARCH))
|
||||
repackage-win32-installer-%:
|
||||
@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN="$(WIN32_INSTALLER_IN)"
|
||||
else
|
||||
repackage-win32-installer-%: ;
|
||||
endif
|
||||
|
||||
|
||||
clobber-zip:
|
||||
$(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
|
||||
$(STAGEDIST)/chrome/$(AB_CD).manifest \
|
||||
$(STAGEDIST)/defaults/pref/b2g-l10n.js
|
||||
$(STAGEDIST)/dictionaries \
|
||||
$(STAGEDIST)/hyphenation \
|
||||
$(STAGEDIST)/defaults/profile \
|
||||
$(STAGEDIST)/chrome/$(AB_CD)
|
||||
|
||||
|
||||
langpack: langpack-$(AB_CD)
|
||||
|
||||
# This is a generic target that will make a langpack, repack ZIP (+tarball)
|
||||
# builds, and repack an installer if applicable. It is called from the
|
||||
# tinderbox scripts. Alter it with caution.
|
||||
|
||||
installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-%
|
||||
@echo "repackaging done"
|
||||
|
||||
ifdef MOZ_UPDATER
|
||||
libs:: $(call MERGE_FILE,updater/updater.ini)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
|
||||
sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \
|
||||
sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \
|
||||
$(FINAL_TARGET)/updater.ini
|
||||
else
|
||||
cat $< | \
|
||||
sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \
|
||||
sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \
|
||||
$(FINAL_TARGET)/updater.ini
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_CRASHREPORTER
|
||||
libs:: crashreporter-override.ini
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
|
||||
endif
|
||||
|
||||
# When we unpack b2g on MacOS X the platform.ini and application.ini are in slightly
|
||||
# different locations that on all other platforms
|
||||
ifeq (Darwin, $(OS_ARCH))
|
||||
ifdef LIBXUL_SDK
|
||||
GECKO_PLATFORM_INI_PATH="$(STAGEDIST)/../Frameworks/XUL.framework/Versions/$(MOZILLA_VERSION)/platform.ini"
|
||||
else
|
||||
GECKO_PLATFORM_INI_PATH="$(STAGEDIST)/platform.ini"
|
||||
endif
|
||||
B2G_APPLICATION_INI_PATH="$(STAGEDIST)/application.ini"
|
||||
else
|
||||
ifdef LIBXUL_SDK
|
||||
GECKO_PLATFORM_INI_PATH="$(STAGEDIST)/xulrunner/platform.ini"
|
||||
else
|
||||
GECKO_PLATFORM_INI_PATH="$(STAGEDIST)/platform.ini"
|
||||
endif
|
||||
B2G_APPLICATION_INI_PATH="$(STAGEDIST)/application.ini"
|
||||
endif
|
||||
|
||||
|
||||
ident:
|
||||
@printf "gecko_revision "
|
||||
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(GECKO_PLATFORM_INI_PATH) Build SourceStamp
|
||||
@printf "b2g_revision "
|
||||
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(B2G_APPLICATION_INI_PATH) App SourceStamp
|
||||
@printf "buildid "
|
||||
@$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(B2G_APPLICATION_INI_PATH) App BuildID
|
||||
|
||||
merge-%:
|
||||
ifdef LOCALE_MERGEDIR
|
||||
$(RM) -rf $(LOCALE_MERGEDIR)
|
||||
MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $*
|
||||
endif
|
||||
@echo
|
||||
|
||||
# test target, depends on make package
|
||||
# try to repack x-test, with just toolkit/defines.inc being there
|
||||
l10n-check::
|
||||
$(RM) -rf x-test
|
||||
$(NSINSTALL) -D x-test/toolkit
|
||||
echo "#define MOZ_LANG_TITLE Just testing" > x-test/toolkit/defines.inc
|
||||
$(MAKE) installers-x-test L10NBASEDIR="$(PWD)" LOCALE_MERGEDIR="$(PWD)/mergedir"
|
|
@ -0,0 +1,45 @@
|
|||
ar
|
||||
be
|
||||
ca
|
||||
cs
|
||||
da
|
||||
de
|
||||
el
|
||||
es-AR
|
||||
es-ES
|
||||
et
|
||||
eu
|
||||
fa
|
||||
fi
|
||||
fr
|
||||
fy-NL
|
||||
ga-IE
|
||||
gd
|
||||
gl
|
||||
he
|
||||
hu
|
||||
id
|
||||
it
|
||||
ja
|
||||
ja-JP-mac
|
||||
ko
|
||||
lt
|
||||
nb-NO
|
||||
nl
|
||||
nn-NO
|
||||
pa-IN
|
||||
pl
|
||||
pt-BR
|
||||
pt-PT
|
||||
ro
|
||||
ru
|
||||
sk
|
||||
sl
|
||||
sq
|
||||
sr
|
||||
th
|
||||
tr
|
||||
uk
|
||||
vi
|
||||
zh-CN
|
||||
zh-TW
|
|
@ -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 <bsmedberg@covad.net>
|
||||
# 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@");
|
|
@ -0,0 +1,18 @@
|
|||
<!ENTITY aboutPage.title "About &brandShortName;">
|
||||
<!ENTITY aboutPage.faq.label "FAQ">
|
||||
<!ENTITY aboutPage.support.label "Support">
|
||||
<!ENTITY aboutPage.privacyPolicy.label "Privacy Policy">
|
||||
<!ENTITY aboutPage.rights.label "Know Your Rights">
|
||||
<!ENTITY aboutPage.relNotes.label "Release Notes">
|
||||
<!ENTITY aboutPage.credits.label "Credits">
|
||||
<!ENTITY aboutPage.checkForUpdates.button "Check for Updates">
|
||||
<!ENTITY aboutPage.checkForUpdates.checking "Looking for updates…">
|
||||
<!ENTITY aboutPage.checkForUpdates.none "No updates available">
|
||||
<!ENTITY aboutPage.checkForUpdates.found "Update available">
|
||||
|
||||
|
||||
<!-- LOCALIZATION NOTE:
|
||||
These strings are concatenated in order. Unneeded strings may be left blank.
|
||||
-->
|
||||
<!ENTITY aboutPage.licenseLink "Licensing information">
|
||||
<!ENTITY aboutPage.licenseLinkSuffix ".">
|
|
@ -0,0 +1,34 @@
|
|||
<!ENTITY % brandDTD
|
||||
SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
|
||||
<!-- These strings are used by Firefox's custom about:certerror page,
|
||||
a replacement for the standard security certificate errors produced
|
||||
by NSS/PSM via netError.xhtml. -->
|
||||
|
||||
<!ENTITY certerror.pagetitle "Untrusted Connection">
|
||||
<!ENTITY certerror.longpagetitle "This Connection is Untrusted">
|
||||
|
||||
<!-- Localization note (certerror.introPara1) - The string "#1" will
|
||||
be replaced at runtime with the name of the server to which the user
|
||||
was trying to connect. -->
|
||||
<!ENTITY certerror.introPara1 "You have asked &brandShortName; to connect
|
||||
securely to <b>#1</b>, but we can't confirm that your connection is secure.">
|
||||
|
||||
<!ENTITY certerror.whatShouldIDo.heading "What Should I Do?">
|
||||
<!ENTITY certerror.whatShouldIDo.content "If you usually connect to
|
||||
this site without problems, this error could mean that someone is
|
||||
trying to impersonate the site, and you shouldn't continue.">
|
||||
<!ENTITY certerror.getMeOutOfHere.label "Get me out of here!">
|
||||
|
||||
<!ENTITY certerror.expert.heading "I Understand the Risks">
|
||||
<!ENTITY certerror.expert.content "If you understand what's going on, you
|
||||
can tell &brandShortName; to start trusting this site's identification.
|
||||
<b>Even if you trust the site, this error could mean that someone is
|
||||
tampering with your connection.</b>">
|
||||
<!ENTITY certerror.expert.contentPara2 "Don't add an exception unless
|
||||
you know there's a good reason why this site doesn't use trusted identification.">
|
||||
<!ENTITY certerror.addTemporaryException.label "Visit site">
|
||||
<!ENTITY certerror.addPermanentException.label "Add permanent exception">
|
||||
|
||||
<!ENTITY certerror.technical.heading "Technical Details">
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
<!--
|
||||
LOCALIZATION NOTE (geolocation.learnMore): Use the
|
||||
unicode ellipsis char, \u2026,
|
||||
or use "..." unless \u2026 doesn't suit traditions in your
|
||||
locale.
|
||||
-->
|
||||
<!ENTITY geolocation.learnMore "Learn More…">
|
|
@ -0,0 +1,68 @@
|
|||
# ***** 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) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of 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 *****
|
||||
|
||||
malformedURI=The URL is not valid and cannot be loaded.
|
||||
fileNotFound=Firefox can't find the file at %S.
|
||||
dnsNotFound=Firefox can't find the server at %S.
|
||||
protocolNotFound=Firefox doesn't know how to open this address, because the protocol (%S) isn't associated with any program.
|
||||
connectionFailure=Firefox can't establish a connection to the server at %S.
|
||||
netInterrupt=The connection to %S was interrupted while the page was loading.
|
||||
netTimeout=The server at %S is taking too long to respond.
|
||||
redirectLoop=Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
|
||||
## LOCALIZATION NOTE (confirmRepostPrompt): In this item, don't translate "%S"
|
||||
confirmRepostPrompt=To display this page, %S must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
|
||||
resendButton.label=Resend
|
||||
unknownSocketType=Firefox doesn't know how to communicate with the server.
|
||||
netReset=The connection to the server was reset while the page was loading.
|
||||
notCached=This document is no longer available.
|
||||
netOffline=Firefox is currently in offline mode and can't browse the Web.
|
||||
isprinting=The document cannot change while Printing or in Print Preview.
|
||||
deniedPortAccess=This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.
|
||||
proxyResolveFailure=Firefox is configured to use a proxy server that can't be found.
|
||||
proxyConnectFailure=Firefox is configured to use a proxy server that is refusing connections.
|
||||
contentEncodingError=The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
|
||||
unsafeContentType=The page you are trying to view cannot be shown because it is contained in a file type that may not be safe to open. Please contact the website owners to inform them of this problem.
|
||||
externalProtocolTitle=External Protocol Request
|
||||
externalProtocolPrompt=An external application must be launched to handle %1$S: links.\n\n\nRequested link:\n\n%2$S\n\nApplication: %3$S\n\n\nIf you were not expecting this request it may be an attempt to exploit a weakness in that other program. Cancel this request unless you are sure it is not malicious.\n
|
||||
#LOCALIZATION NOTE (externalProtocolUnknown): The following string is shown if the application name can't be determined
|
||||
externalProtocolUnknown=<Unknown>
|
||||
externalProtocolChkMsg=Remember my choice for all links of this type.
|
||||
externalProtocolLaunchBtn=Launch application
|
||||
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
|
||||
phishingBlocked=The website at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
|
||||
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
|
||||
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
|
||||
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
|
|
@ -0,0 +1,172 @@
|
|||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
|
||||
<!ENTITY loadError.label "Problem loading page">
|
||||
<!ENTITY retry.label "Try Again">
|
||||
|
||||
<!-- Specific error messages -->
|
||||
|
||||
<!ENTITY connectionFailure.title "Unable to connect">
|
||||
<!ENTITY connectionFailure.longDesc "&sharedLongDesc2;">
|
||||
|
||||
<!ENTITY deniedPortAccess.title "This address is restricted">
|
||||
<!ENTITY deniedPortAccess.longDesc "">
|
||||
|
||||
<!ENTITY dnsNotFound.title "Server not found">
|
||||
<!ENTITY dnsNotFound.longDesc2 "
|
||||
<ul>
|
||||
<li>Check the address for typing errors such as
|
||||
<strong>ww</strong>.example.com instead of
|
||||
<strong>www</strong>.example.com</li>
|
||||
<li>If you are unable to load any pages, check your device's data or Wi-Fi connection.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY fileNotFound.title "File not found">
|
||||
<!ENTITY fileNotFound.longDesc "
|
||||
<ul>
|
||||
<li>Check the file name for capitalization or other typing errors.</li>
|
||||
<li>Check to see if the file was moved, renamed or deleted.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
|
||||
<!ENTITY generic.title "Oops.">
|
||||
<!ENTITY generic.longDesc "
|
||||
<p>&brandShortName; can't load this page for some reason.</p>
|
||||
">
|
||||
|
||||
<!ENTITY malformedURI.title "The address isn't valid">
|
||||
<!ENTITY malformedURI.longDesc "
|
||||
<ul>
|
||||
<li>Web addresses are usually written like
|
||||
<strong>http://www.example.com/</strong></li>
|
||||
<li>Make sure that you're using forward slashes (i.e.
|
||||
<strong>/</strong>).</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY netInterrupt.title "The connection was interrupted">
|
||||
<!ENTITY netInterrupt.longDesc "&sharedLongDesc2;">
|
||||
|
||||
<!ENTITY notCached.title "Document Expired">
|
||||
<!ENTITY notCached.longDesc "<p>The requested document is not available in &brandShortName;'s cache.</p><ul><li>As a security precaution, &brandShortName; does not automatically re-request sensitive documents.</li><li>Click Try Again to re-request the document from the website.</li></ul>">
|
||||
|
||||
<!ENTITY netOffline.title "Offline mode">
|
||||
<!ENTITY netOffline.longDesc2 "
|
||||
<ul>
|
||||
<li>Try again. &brandShortName; will attempt to open a connection and reload the page.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY contentEncodingError.title "Content Encoding Error">
|
||||
<!ENTITY contentEncodingError.longDesc "
|
||||
<ul>
|
||||
<li>Please contact the website owners to inform them of this problem.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY unsafeContentType.title "Unsafe File Type">
|
||||
<!ENTITY unsafeContentType.longDesc "
|
||||
<ul>
|
||||
<li>Please contact the website owners to inform them of this problem.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY netReset.title "The connection was reset">
|
||||
<!ENTITY netReset.longDesc "&sharedLongDesc2;">
|
||||
|
||||
<!ENTITY netTimeout.title "The connection has timed out">
|
||||
<!ENTITY netTimeout.longDesc "&sharedLongDesc2;">
|
||||
|
||||
<!ENTITY protocolNotFound.title "The address wasn't understood">
|
||||
<!ENTITY protocolNotFound.longDesc "
|
||||
<ul>
|
||||
<li>You might need to install other software to open this address.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY proxyConnectFailure.title "The proxy server is refusing connections">
|
||||
<!ENTITY proxyConnectFailure.longDesc "
|
||||
<ul>
|
||||
<li>Check the proxy settings to make sure that they are correct.</li>
|
||||
<li>Contact your network administrator to make sure the proxy server is
|
||||
working.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY proxyResolveFailure.title "Unable to find the proxy server">
|
||||
<!ENTITY proxyResolveFailure.longDesc2 "
|
||||
<ul>
|
||||
<li>Check the proxy settings to make sure that they are correct.</li>
|
||||
<li>Check to make sure your device has a working data or Wi-Fi connection.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY redirectLoop.title "The page isn't redirecting properly">
|
||||
<!ENTITY redirectLoop.longDesc "
|
||||
<ul>
|
||||
<li>This problem can sometimes be caused by disabling or refusing to accept
|
||||
cookies.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY unknownSocketType.title "Unexpected response from server">
|
||||
<!ENTITY unknownSocketType.longDesc "
|
||||
<ul>
|
||||
<li>Check to make sure your system has the Personal Security Manager
|
||||
installed.</li>
|
||||
<li>This might be due to a non-standard configuration on the server.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY nssFailure2.title "Secure Connection Failed">
|
||||
<!ENTITY nssFailure2.longDesc "
|
||||
<ul>
|
||||
<li>The page you are trying to view can not be shown because the authenticity of the received data could not be verified.</li>
|
||||
<li>Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY nssBadCert.title "Secure Connection Failed">
|
||||
<!ENTITY nssBadCert.longDesc2 "
|
||||
<ul>
|
||||
<li>This could be a problem with the server's configuration, or it could be
|
||||
someone trying to impersonate the server.</li>
|
||||
<li>If you have connected to this server successfully in the past, the error may
|
||||
be temporary, and you can try again later.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY sharedLongDesc2 "
|
||||
<ul>
|
||||
<li>The site could be temporarily unavailable or too busy. Try again in a few moments.</li>
|
||||
<li>If you are unable to load any pages, check your mobile device's data or Wi-Fi connection.</li>
|
||||
</ul>
|
||||
">
|
||||
|
||||
<!ENTITY cspFrameAncestorBlocked.title "Blocked by Content Security Policy">
|
||||
<!ENTITY cspFrameAncestorBlocked.longDesc "<p>&brandShortName; prevented this page from loading in this way because the page has a content security policy that disallows it.</p>">
|
||||
|
||||
<!ENTITY corruptedContentError.title "Corrupted Content Error">
|
||||
<!ENTITY corruptedContentError.longDesc "<p>The page you are trying to view cannot be shown because an error in the data transmission was detected.</p><ul><li>Please contact the website owners to inform them of this problem.</li></ul>">
|
||||
|
||||
<!ENTITY securityOverride.linkText "Or you can add an exception…">
|
||||
<!ENTITY securityOverride.getMeOutOfHereButton "Get me out of here!">
|
||||
<!ENTITY securityOverride.exceptionButtonLabel "Add Exception…">
|
||||
|
||||
<!-- LOCALIZATION NOTE (securityOverride.warningContent) - Do not translate the
|
||||
contents of the <xul:button> tags. The only language content is the label= field,
|
||||
which uses strings already defined above. The button is included here (instead of
|
||||
netError.xhtml) because it exposes functionality specific to firefox. -->
|
||||
|
||||
<!ENTITY securityOverride.warningContent "
|
||||
<p>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.</p>
|
||||
|
||||
<button id='getMeOutOfHereButton'>&securityOverride.getMeOutOfHereButton;</button>
|
||||
<button id='exceptionDialogButton'>&securityOverride.exceptionButtonLabel;</button>
|
||||
">
|
||||
|
||||
<!ENTITY remoteXUL.title "Remote XUL">
|
||||
<!ENTITY remoteXUL.longDesc "<p><ul><li>Please contact the website owners to inform them of this problem.</li></ul></p>">
|
||||
|
|
@ -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 <bryner@brianryner.com>
|
||||
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||
#
|
||||
# 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:
|
|
@ -0,0 +1,25 @@
|
|||
<!ENTITY safeb.palm.warning.title "Suspected Web Forgery">
|
||||
|
||||
<!ENTITY safeb.palm.message.p1 "This page has been reported as a web forgery designed to trick users into sharing personal or financial information. Entering any personal information on this page may result in identity theft or other fraud.  ">
|
||||
<!ENTITY safeb.palm.message.p1.linkText "Read more »">
|
||||
<!ENTITY safeb.palm.p1.linkStatusText "Read more …">
|
||||
|
||||
<!ENTITY safeb.palm.message.p2.start "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. You can find out more about ">
|
||||
<!ENTITY safeb.palm.message.p2.linkText "how &brandShortName; protects you">
|
||||
<!ENTITY safeb.palm.message.p2.end " from phishing attacks.">
|
||||
|
||||
<!ENTITY safeb.palm.accept.label "Get me out of here!">
|
||||
<!ENTITY safeb.palm.accept.statustext "Navigate to my home page">
|
||||
<!ENTITY safeb.palm.decline.label "Ignore this warning">
|
||||
<!ENTITY safeb.palm.decline.statustext "Close warning" >
|
||||
<!ENTITY safeb.palm.notforgery.label2 "This isn't a web forgery…">
|
||||
<!ENTITY safeb.palm.reportPage.label "Why was this page blocked?">
|
||||
|
||||
<!ENTITY safeb.blocked.malwarePage.title "Reported Attack Page!">
|
||||
<!-- Localization note (safeb.blocked.malware.shortDesc) - Please don't translate the contents of the <span id="malware_sitename"/> tag. It will be replaced at runtime with a domain name (e.g. www.badsite.com) -->
|
||||
<!ENTITY safeb.blocked.malwarePage.shortDesc "This web page at <span id='malware_sitename'/> has been reported as an attack page and has been blocked based on your security preferences.">
|
||||
<!ENTITY safeb.blocked.malwarePage.longDesc "<p>Attack pages try to install programs that steal private information, use your computer to attack others, or damage your system.</p><p>Some attack pages intentionally distribute harmful software, but many are compromised without the knowledge or permission of their owners.</p>">
|
||||
|
||||
<!ENTITY safeb.blocked.phishingPage.title2 "Suspected Web Forgery!">
|
||||
<!ENTITY safeb.blocked.phishingPage.shortDesc2 "Entering any personal information on this page may result in identity theft or other fraud.">
|
||||
<!ENTITY safeb.blocked.phishingPage.longDesc2 "<p>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.</p>">
|
|
@ -0,0 +1,7 @@
|
|||
<!ENTITY webapps.title.placeholder "Enter a title">
|
||||
<!ENTITY webapps.permissions "Allow access:">
|
||||
<!ENTITY webapps.perm.geolocation "Location-aware browsing">
|
||||
<!ENTITY webapps.perm.offline "Offline data storage">
|
||||
<!ENTITY webapps.perm.notifications "Desktop notifications">
|
||||
<!ENTITY webapps.perm.requestedHint "(requested)">
|
||||
<!ENTITY webapps.add-homescreen "Add to home screen">
|
|
@ -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=B2G has crashed. Unfortunately the crash reporter is unable to submit a crash report.\n\nDetails: %s
|
||||
CrashReporterDescriptionText2=B2G has crashed. Your tabs will be listed on the B2G 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 B2G
|
||||
Restart=Restart B2G
|
|
@ -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 <em:contributor>Joe Solon</em:contributor> <em:contributor>Suzy Solon</em:contributor>
|
||||
|
||||
#unfilter emptyLines
|
|
@ -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.
|
|
@ -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…
|
|
@ -0,0 +1,68 @@
|
|||
# ***** 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 <l10n@mozilla.com>
|
||||
#
|
||||
# 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 b2g, which is our local repo checkout name
|
||||
if mod not in ("netwerk", "dom", "toolkit", "security/manager",
|
||||
"services/sync", "embedding/android",
|
||||
"b2g"):
|
||||
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 != "b2g":
|
||||
# we only have exceptions for b2g
|
||||
return True
|
||||
if not entity:
|
||||
return not (re.match(r"b2g-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))
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
# ***** 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 Firefox localization support scripts.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Benjamin Smedberg <bsmedberg@covad.net>
|
||||
# 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
|
||||
-->
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
<Description about="urn:mozilla:install-manifest"
|
||||
em:id="@MOZ_LANGPACK_EID@"
|
||||
em:name="@MOZ_LANG_TITLE@ Language Pack"
|
||||
em:version="@MOZ_APP_VERSION@"
|
||||
em:type="8"
|
||||
em:creator="@MOZ_LANGPACK_CREATOR@">
|
||||
#ifdef MOZ_LANGPACK_CONTRIBUTORS
|
||||
@MOZ_LANGPACK_CONTRIBUTORS@
|
||||
#endif
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{3c2e2abc-06d4-11e1-ac3b-374f68613e61}</em:id>
|
||||
<em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
|
||||
<em:maxVersion>@MOZ_APP_VERSION@</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
</Description>
|
||||
</RDF>
|
|
@ -0,0 +1,12 @@
|
|||
#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/notification.dtd (%chrome/notification.dtd)
|
||||
locale/@AB_CD@/browser/webapps.dtd (%chrome/webapps.dtd)
|
||||
locale/@AB_CD@/browser/phishing.dtd (%chrome/phishing.dtd)
|
||||
|
||||
* locale/@AB_CD@/browser/netError.dtd (%chrome/overrides/netError.dtd)
|
||||
% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
|
|
@ -0,0 +1,10 @@
|
|||
[general]
|
||||
depth = ../..
|
||||
all = b2g/locales/all-locales
|
||||
|
||||
[compare]
|
||||
dirs = b2g
|
||||
|
||||
[includes]
|
||||
toolkit = toolkit/locales/l10n.ini
|
||||
services_sync = services/sync/locales/l10n.ini
|
|
@ -0,0 +1,53 @@
|
|||
# ***** 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 <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2011
|
||||
# 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 *****
|
||||
|
||||
add_makefiles "
|
||||
netwerk/locales/Makefile
|
||||
dom/locales/Makefile
|
||||
toolkit/locales/Makefile
|
||||
security/manager/locales/Makefile
|
||||
b2g/app/Makefile
|
||||
$MOZ_BRANDING_DIRECTORY/Makefile
|
||||
b2g/chrome/Makefile
|
||||
b2g/installer/Makefile
|
||||
b2g/locales/Makefile
|
||||
b2g/Makefile"
|
||||
|
||||
if test -n "$MOZ_UPDATE_PACKAGING"; then
|
||||
add_makefiles "
|
||||
tools/update-packaging/Makefile
|
||||
"
|
||||
fi
|
|
@ -180,6 +180,9 @@ function setupSearchEngine()
|
|||
{
|
||||
gSearchEngine = JSON.parse(localStorage["search-engine"]);
|
||||
|
||||
if (!gSearchEngine)
|
||||
return;
|
||||
|
||||
// Look for extended information, like logo and links.
|
||||
let searchEngineInfo = SEARCH_ENGINES[gSearchEngine.name];
|
||||
if (searchEngineInfo) {
|
||||
|
|
|
@ -279,7 +279,11 @@
|
|||
if (gContextMenu.shouldDisplay)
|
||||
updateEditUIVisibility();
|
||||
return gContextMenu.shouldDisplay;"
|
||||
onpopuphiding="if (event.target == this) { gContextMenu = null; updateEditUIVisibility(); }">
|
||||
onpopuphiding="if (event.target != this)
|
||||
return;
|
||||
gContextMenu.hiding();
|
||||
gContextMenu = null;
|
||||
updateEditUIVisibility();">
|
||||
#include browser-context.inc
|
||||
</menupopup>
|
||||
|
||||
|
|
|
@ -97,6 +97,12 @@ nsContextMenu.prototype = {
|
|||
this.initItems();
|
||||
},
|
||||
|
||||
hiding: function CM_hiding() {
|
||||
InlineSpellCheckerUI.clearSuggestionsFromMenu();
|
||||
InlineSpellCheckerUI.clearDictionaryListFromMenu();
|
||||
InlineSpellCheckerUI.uninit();
|
||||
},
|
||||
|
||||
initItems: function CM_initItems() {
|
||||
this.initPageMenuSeparator();
|
||||
this.initOpenItems();
|
||||
|
@ -488,16 +494,6 @@ nsContextMenu.prototype = {
|
|||
this.onEditableArea = false;
|
||||
this.isDesignMode = false;
|
||||
|
||||
// Clear any old spellchecking items from the menu, this used to
|
||||
// be in the menu hiding code but wasn't getting called in all
|
||||
// situations. Here, we can ensure it gets cleaned up any time the
|
||||
// menu is shown. Note: must be before uninit because that clears the
|
||||
// internal vars
|
||||
InlineSpellCheckerUI.clearSuggestionsFromMenu();
|
||||
InlineSpellCheckerUI.clearDictionaryListFromMenu();
|
||||
|
||||
InlineSpellCheckerUI.uninit();
|
||||
|
||||
// Remember the node that was clicked.
|
||||
this.target = aNode;
|
||||
|
||||
|
|
|
@ -1963,6 +1963,8 @@
|
|||
else
|
||||
this.showTab(tab);
|
||||
}, this);
|
||||
|
||||
this.tabContainer.mTabstrip.ensureElementIsVisible(this.selectedTab, false);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
|
|
@ -87,8 +87,10 @@
|
|||
if (gContextMenu.shouldDisplay)
|
||||
document.popupNode = this.triggerNode;
|
||||
return gContextMenu.shouldDisplay;"
|
||||
onpopuphiding="if (event.target == this)
|
||||
gContextMenu = null;">
|
||||
onpopuphiding="if (event.target != this)
|
||||
return;
|
||||
gContextMenu.hiding();
|
||||
gContextMenu = null;">
|
||||
#include browser-context.inc
|
||||
</menupopup>
|
||||
</popupset>
|
||||
|
|
|
@ -123,11 +123,12 @@
|
|||
toggle('expertContent');
|
||||
}
|
||||
|
||||
// if this is a Strict-Transport-Security host and the cert
|
||||
// is bad, don't allow overrides (STS Spec section 7.3).
|
||||
if (getCSSClass() == "badStsCert") {
|
||||
// Disallow overrides if this is a Strict-Transport-Security
|
||||
// host and the cert is bad (STS Spec section 7.3) or if the
|
||||
// certerror is in a frame (bug 633691).
|
||||
if (getCSSClass() == "badStsCert" || window != top) {
|
||||
var ec = document.getElementById('expertContent');
|
||||
document.getElementById('errorLongContent').removeChild(ec);
|
||||
ec.parentNode.removeChild(ec);
|
||||
}
|
||||
|
||||
var tech = document.getElementById("technicalContentText");
|
||||
|
|
|
@ -178,6 +178,16 @@ function SessionStoreService() {
|
|||
this._prefBranch.addObserver("sessionstore.resume_from_crash", this, true);
|
||||
return this._prefBranch.getBoolPref("sessionstore.resume_from_crash");
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "_max_tabs_undo", function () {
|
||||
this._prefBranch.addObserver("sessionstore.max_tabs_undo", this, true);
|
||||
return this._prefBranch.getIntPref("sessionstore.max_tabs_undo");
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "_max_windows_undo", function () {
|
||||
this._prefBranch.addObserver("sessionstore.max_windows_undo", this, true);
|
||||
return this._prefBranch.getIntPref("sessionstore.max_windows_undo");
|
||||
});
|
||||
}
|
||||
|
||||
SessionStoreService.prototype = {
|
||||
|
@ -291,10 +301,6 @@ SessionStoreService.prototype = {
|
|||
|
||||
// Do pref migration before we store any values and start observing changes
|
||||
this._migratePrefs();
|
||||
|
||||
// observe prefs changes so we can modify stored data to match
|
||||
this._prefBranch.addObserver("sessionstore.max_tabs_undo", this, true);
|
||||
this._prefBranch.addObserver("sessionstore.max_windows_undo", this, true);
|
||||
|
||||
// this pref is only read at startup, so no need to observe it
|
||||
this._sessionhistory_max_entries =
|
||||
|
@ -642,11 +648,13 @@ SessionStoreService.prototype = {
|
|||
// if the user decreases the max number of closed tabs they want
|
||||
// preserved update our internal states to match that max
|
||||
case "sessionstore.max_tabs_undo":
|
||||
this._max_tabs_undo = this._prefBranch.getIntPref("sessionstore.max_tabs_undo");
|
||||
for (let ix in this._windows) {
|
||||
this._windows[ix]._closedTabs.splice(this._prefBranch.getIntPref("sessionstore.max_tabs_undo"), this._windows[ix]._closedTabs.length);
|
||||
this._windows[ix]._closedTabs.splice(this._max_tabs_undo, this._windows[ix]._closedTabs.length);
|
||||
}
|
||||
break;
|
||||
case "sessionstore.max_windows_undo":
|
||||
this._max_windows_undo = this._prefBranch.getIntPref("sessionstore.max_windows_undo");
|
||||
this._capClosedWindows();
|
||||
break;
|
||||
case "sessionstore.interval":
|
||||
|
@ -1094,10 +1102,9 @@ SessionStoreService.prototype = {
|
|||
var event = aWindow.document.createEvent("Events");
|
||||
event.initEvent("SSTabClosing", true, false);
|
||||
aTab.dispatchEvent(event);
|
||||
|
||||
var maxTabsUndo = this._prefBranch.getIntPref("sessionstore.max_tabs_undo");
|
||||
|
||||
// don't update our internal state if we don't have to
|
||||
if (maxTabsUndo == 0) {
|
||||
if (this._max_tabs_undo == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1118,8 +1125,8 @@ SessionStoreService.prototype = {
|
|||
pos: aTab._tPos
|
||||
});
|
||||
var length = this._windows[aWindow.__SSi]._closedTabs.length;
|
||||
if (length > maxTabsUndo)
|
||||
this._windows[aWindow.__SSi]._closedTabs.splice(maxTabsUndo, length - maxTabsUndo);
|
||||
if (length > this._max_tabs_undo)
|
||||
this._windows[aWindow.__SSi]._closedTabs.splice(this._max_tabs_undo, length - this._max_tabs_undo);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2518,7 +2525,7 @@ SessionStoreService.prototype = {
|
|||
// at startup we don't accidentally add them to a popup window
|
||||
do {
|
||||
total.unshift(lastClosedWindowsCopy.shift())
|
||||
} while (total[0].isPopup)
|
||||
} while (total[0].isPopup && lastClosedWindowsCopy.length > 0)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -4264,17 +4271,16 @@ SessionStoreService.prototype = {
|
|||
* resize such that we have at least one non-popup window.
|
||||
*/
|
||||
_capClosedWindows : function sss_capClosedWindows() {
|
||||
let maxWindowsUndo = this._prefBranch.getIntPref("sessionstore.max_windows_undo");
|
||||
if (this._closedWindows.length <= maxWindowsUndo)
|
||||
if (this._closedWindows.length <= this._max_windows_undo)
|
||||
return;
|
||||
let spliceTo = maxWindowsUndo;
|
||||
let spliceTo = this._max_windows_undo;
|
||||
#ifndef XP_MACOSX
|
||||
let normalWindowIndex = 0;
|
||||
// try to find a non-popup window in this._closedWindows
|
||||
while (normalWindowIndex < this._closedWindows.length &&
|
||||
!!this._closedWindows[normalWindowIndex].isPopup)
|
||||
normalWindowIndex++;
|
||||
if (normalWindowIndex >= maxWindowsUndo)
|
||||
if (normalWindowIndex >= this._max_windows_undo)
|
||||
spliceTo = normalWindowIndex + 1;
|
||||
#endif
|
||||
this._closedWindows.splice(spliceTo, this._closedWindows.length);
|
||||
|
@ -4525,7 +4531,8 @@ let gRestoreTabsProgressListener = {
|
|||
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||
// Ignore state changes on browsers that we've already restored and state
|
||||
// changes that aren't applicable.
|
||||
if (aBrowser.__SS_restoreState == TAB_STATE_RESTORING &&
|
||||
if (aBrowser.__SS_restoreState &&
|
||||
aBrowser.__SS_restoreState == TAB_STATE_RESTORING &&
|
||||
aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
|
||||
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK &&
|
||||
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
|
||||
|
|