Merge cedar into mozilla-central
4
.hgtags
|
@ -57,3 +57,7 @@ dba2abb7db57078c5a4810884834d3056a5d56c2 last-mozilla-central
|
|||
138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R11_1_MU
|
||||
e56ecd8b3a68c158025207c5fd081d043e28f5ce GECKO_2_0_BASE
|
||||
e273946b74c8d631ed86bd74ba9afe0e67b12378 GECKO_2_1_BASE
|
||||
b70744835d94e54eec97b8fd186c96da5708a506 PRE_MOBILE_MERGE
|
||||
b70744835d94e54eec97b8fd186c96da5708a506 PRE_MOBILE_MERGE_20110406
|
||||
a71bd564ebf5bf4f93d13e84114f759c263130b0 MOBILE_MERGE_DONE
|
||||
a71bd564ebf5bf4f93d13e84114f759c263130b0 MOBILE_MERGE_DONE_20110406
|
||||
|
|
|
@ -63,3 +63,4 @@ 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 web site 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.
|
||||
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.
|
||||
|
|
|
@ -186,3 +186,6 @@ functionality specific to firefox. -->
|
|||
<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>">
|
||||
|
|
|
@ -1214,7 +1214,7 @@ MappedAttrParser::CreateStyleRule()
|
|||
return nsnull; // No mapped attributes were parsed
|
||||
}
|
||||
|
||||
nsRefPtr<css::StyleRule> rule = NS_NewCSSStyleRule(nsnull, mDecl);
|
||||
nsRefPtr<css::StyleRule> rule = new css::StyleRule(nsnull, mDecl);
|
||||
mDecl = nsnull; // We no longer own the declaration -- drop our pointer to it
|
||||
return rule.forget();
|
||||
}
|
||||
|
|
|
@ -3933,31 +3933,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
|
|||
case NS_ERROR_REMOTE_XUL:
|
||||
{
|
||||
error.AssignLiteral("remoteXUL");
|
||||
|
||||
/**
|
||||
* We want to set an hardcoded messageStr which uses the
|
||||
* brandShortName.
|
||||
*/
|
||||
nsCOMPtr<nsIStringBundleService> stringBundleService =
|
||||
mozilla::services::GetStringBundleService();
|
||||
if (!stringBundleService) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIStringBundle> brandBundle;
|
||||
rv = stringBundleService->CreateBundle(kBrandBundleURL,
|
||||
getter_AddRefs(brandBundle));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsXPIDLString brandName;
|
||||
rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(),
|
||||
getter_Copies(brandName));
|
||||
|
||||
// We could use something like nsTextFormatter::smprintf.
|
||||
messageStr.AssignLiteral("This page uses an unsupported technology "
|
||||
"that is no longer available by default in ");
|
||||
messageStr.Append(brandName);
|
||||
messageStr.AppendLiteral(".");
|
||||
break;
|
||||
}
|
||||
case NS_ERROR_UNSAFE_CONTENT_TYPE:
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
<h1 id="et_nssBadCert">&nssBadCert.title;</h1>
|
||||
<h1 id="et_malwareBlocked">&malwareBlocked.title;</h1>
|
||||
<h1 id="et_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.title;</h1>
|
||||
<h1 id="et_remoteXUL">Remote XUL</h1>
|
||||
<h1 id="et_remoteXUL">&remoteXUL.title;</h1>
|
||||
</div>
|
||||
<div id="errorDescriptionsContainer">
|
||||
<div id="ed_generic">&generic.longDesc;</div>
|
||||
|
@ -352,7 +352,7 @@
|
|||
<div id="ed_nssBadCert">&nssBadCert.longDesc2;</div>
|
||||
<div id="ed_malwareBlocked">&malwareBlocked.longDesc;</div>
|
||||
<div id="ed_cspFrameAncestorBlocked">&cspFrameAncestorBlocked.longDesc;</div>
|
||||
<div id="ed_remoteXUL"><ul><li>Please contact the website owners to inform them of this problem.</li></ul></div>
|
||||
<div id="ed_remoteXUL">&remoteXUL.longDesc;</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -62,3 +62,4 @@ 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 web site 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.
|
||||
remoteXUL=This page uses an unsupported technology that is no longer available by default.
|
||||
|
|
|
@ -89,3 +89,6 @@
|
|||
this inclusion needs to be intact for that approach to work correctly. -->
|
||||
<!ENTITY % netErrorAppDTD SYSTEM "chrome://global/locale/netErrorApp.dtd">
|
||||
%netErrorAppDTD;
|
||||
|
||||
<!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>">
|
||||
|
|
|
@ -40,47 +40,80 @@
|
|||
* rules, such as @media rules
|
||||
*/
|
||||
|
||||
#ifndef nsICSSGroupRule_h
|
||||
#define nsICSSGroupRule_h
|
||||
#ifndef mozilla_css_GroupRule_h__
|
||||
#define mozilla_css_GroupRule_h__
|
||||
|
||||
#include "nsICSSRule.h"
|
||||
#include "Rule.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
class nsPresContext;
|
||||
class nsMediaQueryResultCacheKey;
|
||||
|
||||
#define NS_ICSS_GROUP_RULE_IID \
|
||||
{ 0xf1e3d96b, 0xe381, 0x4533, \
|
||||
{ 0xa6, 0x5e, 0xa5, 0x31, 0xba, 0xca, 0x93, 0x62 } }
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
class GroupRuleRuleList;
|
||||
|
||||
class nsICSSGroupRule : public nsICSSRule {
|
||||
// inherits from Rule so it can be shared between
|
||||
// MediaRule and DocumentRule
|
||||
class GroupRule : public Rule
|
||||
{
|
||||
protected:
|
||||
GroupRule();
|
||||
GroupRule(const GroupRule& aCopy);
|
||||
virtual ~GroupRule();
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_GROUP_RULE_IID)
|
||||
|
||||
NS_IMETHOD AppendStyleRule(nsICSSRule* aRule) = 0;
|
||||
// implement part of nsIStyleRule and nsICSSRule
|
||||
DECL_STYLE_RULE_INHERIT_NO_DOMRULE
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet);
|
||||
|
||||
NS_IMETHOD StyleRuleCount(PRInt32& aCount) const = 0;
|
||||
NS_IMETHOD GetStyleRuleAt(PRInt32 aIndex, nsICSSRule*& aRule) const = 0;
|
||||
// to help implement nsIStyleRule
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
#endif
|
||||
|
||||
public:
|
||||
void AppendStyleRule(nsICSSRule* aRule);
|
||||
|
||||
PRInt32 StyleRuleCount() const { return mRules.Count(); }
|
||||
nsICSSRule* GetStyleRuleAt(PRInt32 aIndex) const;
|
||||
|
||||
typedef nsCOMArray<nsICSSRule>::nsCOMArrayEnumFunc RuleEnumFunc;
|
||||
NS_IMETHOD_(PRBool) EnumerateRulesForwards(RuleEnumFunc aFunc, void * aData) const = 0;
|
||||
PRBool EnumerateRulesForwards(RuleEnumFunc aFunc, void * aData) const;
|
||||
|
||||
/*
|
||||
* The next three methods should never be called unless you have first
|
||||
* called WillDirty() on the parent stylesheet. After they are
|
||||
* called, DidDirty() needs to be called on the sheet.
|
||||
*/
|
||||
NS_IMETHOD DeleteStyleRuleAt(PRUint32 aIndex) = 0;
|
||||
NS_IMETHOD InsertStyleRulesAt(PRUint32 aIndex,
|
||||
nsCOMArray<nsICSSRule>& aRules) = 0;
|
||||
NS_IMETHOD ReplaceStyleRule(nsICSSRule* aOld, nsICSSRule* aNew) = 0;
|
||||
nsresult DeleteStyleRuleAt(PRUint32 aIndex);
|
||||
nsresult InsertStyleRulesAt(PRUint32 aIndex,
|
||||
nsCOMArray<nsICSSRule>& aRules);
|
||||
nsresult ReplaceStyleRule(nsICSSRule *aOld, nsICSSRule *aNew);
|
||||
|
||||
NS_IMETHOD_(PRBool) UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey) = 0;
|
||||
|
||||
virtual PRBool UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey) = 0;
|
||||
|
||||
protected:
|
||||
// to help implement nsIDOMCSSRule
|
||||
nsresult AppendRulesToCssText(nsAString& aCssText);
|
||||
// to implement methods on nsIDOMCSSRule
|
||||
nsresult GetParentRule(nsIDOMCSSRule** aParentRule);
|
||||
|
||||
// to implement common methods on nsIDOMCSSMediaRule and
|
||||
// nsIDOMCSSMozDocumentRule
|
||||
nsIDOMCSSRuleList* GetCssRules();
|
||||
nsresult InsertRule(const nsAString & aRule, PRUint32 aIndex,
|
||||
PRUint32* _retval);
|
||||
nsresult DeleteRule(PRUint32 aIndex);
|
||||
|
||||
nsCOMArray<nsICSSRule> mRules;
|
||||
nsRefPtr<GroupRuleRuleList> mRuleCollection; // lazily constructed
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSGroupRule, NS_ICSS_GROUP_RULE_IID)
|
||||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* nsICSSGroupRule_h */
|
||||
#endif /* mozilla_css_GroupRule_h__ */
|
|
@ -40,8 +40,7 @@
|
|||
#ifndef mozilla_css_ImportRule_h__
|
||||
#define mozilla_css_ImportRule_h__
|
||||
|
||||
#include "nsICSSRule.h"
|
||||
#include "nsCSSRule.h"
|
||||
#include "Rule.h"
|
||||
#include "nsIDOMCSSImportRule.h"
|
||||
#include "nsCSSRules.h"
|
||||
|
||||
|
@ -51,21 +50,24 @@ class nsString;
|
|||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
class NS_FINAL_CLASS ImportRule : public nsCSSRule,
|
||||
public nsICSSRule,
|
||||
class NS_FINAL_CLASS ImportRule : public Rule,
|
||||
public nsIDOMCSSImportRule
|
||||
{
|
||||
public:
|
||||
ImportRule(nsMediaList* aMedia);
|
||||
ImportRule(nsMediaList* aMedia, const nsString& aURLSpec);
|
||||
private:
|
||||
// for |Clone|
|
||||
ImportRule(const ImportRule& aCopy);
|
||||
~ImportRule();
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
DECL_STYLE_RULE_INHERIT
|
||||
|
||||
#ifdef HAVE_CPP_AMBIGUITY_RESOLVING_USING
|
||||
using Rule::GetStyleSheet; // unhide since nsIDOMCSSImportRule has its own GetStyleSheet
|
||||
#endif
|
||||
|
||||
// nsIStyleRule methods
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
|
@ -75,12 +77,6 @@ public:
|
|||
virtual PRInt32 GetType() const;
|
||||
virtual already_AddRefed<nsICSSRule> Clone() const;
|
||||
|
||||
void SetURLSpec(const nsString& aURLSpec) { mURLSpec = aURLSpec; }
|
||||
void GetURLSpec(nsString& aURLSpec) const { aURLSpec = mURLSpec; }
|
||||
|
||||
nsresult SetMedia(const nsString& aMedia);
|
||||
void GetMedia(nsString& aMedia) const;
|
||||
|
||||
void SetSheet(nsCSSStyleSheet*);
|
||||
|
||||
// nsIDOMCSSRule interface
|
||||
|
@ -98,8 +94,4 @@ private:
|
|||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
||||
nsresult
|
||||
NS_NewCSSImportRule(mozilla::css::ImportRule** aInstancePtrResult,
|
||||
const nsString& aURLSpec, nsMediaList* aMedia);
|
||||
|
||||
#endif /* mozilla_css_ImportRule_h__ */
|
||||
|
|
|
@ -72,7 +72,6 @@ EXPORTS = \
|
|||
nsDOMCSSAttrDeclaration.h \
|
||||
nsDOMCSSDeclaration.h \
|
||||
nsICSSDeclaration.h \
|
||||
nsICSSGroupRule.h \
|
||||
nsICSSLoaderObserver.h \
|
||||
nsICSSPseudoComparator.h \
|
||||
nsICSSRule.h \
|
||||
|
@ -99,6 +98,7 @@ EXPORTS = \
|
|||
|
||||
EXPORTS_mozilla/css = \
|
||||
Declaration.h \
|
||||
GroupRule.h \
|
||||
ImportRule.h \
|
||||
Loader.h \
|
||||
NameSpaceRule.h \
|
||||
|
|
|
@ -40,8 +40,7 @@
|
|||
#ifndef mozilla_css_NameSpaceRule_h__
|
||||
#define mozilla_css_NameSpaceRule_h__
|
||||
|
||||
#include "nsICSSRule.h"
|
||||
#include "nsCSSRule.h"
|
||||
#include "Rule.h"
|
||||
#include "nsIDOMCSSRule.h"
|
||||
|
||||
class nsIAtom;
|
||||
|
@ -54,12 +53,11 @@ class nsIAtom;
|
|||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
class NS_FINAL_CLASS NameSpaceRule : public nsCSSRule,
|
||||
public nsICSSRule,
|
||||
class NS_FINAL_CLASS NameSpaceRule : public Rule,
|
||||
public nsIDOMCSSRule
|
||||
{
|
||||
public:
|
||||
NameSpaceRule();
|
||||
NameSpaceRule(nsIAtom* aPrefix, const nsString& aURLSpec);
|
||||
private:
|
||||
// for |Clone|
|
||||
NameSpaceRule(const NameSpaceRule& aCopy);
|
||||
|
@ -67,7 +65,7 @@ private:
|
|||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_CSS_NAMESPACE_RULE_IMPL_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
DECL_STYLE_RULE_INHERIT
|
||||
|
||||
|
@ -81,10 +79,8 @@ public:
|
|||
virtual already_AddRefed<nsICSSRule> Clone() const;
|
||||
|
||||
nsIAtom* GetPrefix() const { return mPrefix; }
|
||||
void SetPrefix(nsIAtom* aPrefix) { mPrefix = aPrefix; }
|
||||
|
||||
void GetURLSpec(nsString& aURLSpec) const { aURLSpec = mURLSpec; }
|
||||
void SetURLSpec(const nsString& aURLSpec) { mURLSpec = aURLSpec; }
|
||||
|
||||
// nsIDOMCSSRule interface
|
||||
NS_DECL_NSIDOMCSSRULE
|
||||
|
@ -99,8 +95,4 @@ private:
|
|||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(mozilla::css::NameSpaceRule, NS_CSS_NAMESPACE_RULE_IMPL_CID)
|
||||
|
||||
nsresult
|
||||
NS_NewCSSNameSpaceRule(mozilla::css::NameSpaceRule** aInstancePtrResult,
|
||||
nsIAtom* aPrefix, const nsString& aURLSpec);
|
||||
|
||||
#endif /* mozilla_css_NameSpaceRule_h__ */
|
||||
|
|
|
@ -37,57 +37,63 @@
|
|||
|
||||
/* base class for all rule types in a CSS style sheet */
|
||||
|
||||
#ifndef nsCSSRule_h___
|
||||
#define nsCSSRule_h___
|
||||
#ifndef mozilla_css_Rule_h___
|
||||
#define mozilla_css_Rule_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCSSStyleSheet.h"
|
||||
#include "nsICSSRule.h"
|
||||
|
||||
class nsICSSGroupRule;
|
||||
class nsIStyleSheet;
|
||||
class nsCSSStyleSheet;
|
||||
struct nsRuleData;
|
||||
template<class T> struct already_AddRefed;
|
||||
|
||||
class nsCSSRule {
|
||||
public:
|
||||
nsCSSRule(void)
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
class GroupRule;
|
||||
|
||||
#define DECL_STYLE_RULE_INHERIT_NO_DOMRULE \
|
||||
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
|
||||
|
||||
#define DECL_STYLE_RULE_INHERIT \
|
||||
DECL_STYLE_RULE_INHERIT_NO_DOMRULE \
|
||||
virtual nsIDOMCSSRule* GetDOMRuleWeak(nsresult* aResult);
|
||||
|
||||
class Rule : public nsICSSRule {
|
||||
protected:
|
||||
Rule()
|
||||
: mSheet(nsnull),
|
||||
mParentRule(nsnull)
|
||||
{
|
||||
}
|
||||
|
||||
nsCSSRule(const nsCSSRule& aCopy)
|
||||
Rule(const Rule& aCopy)
|
||||
: mSheet(aCopy.mSheet),
|
||||
mParentRule(aCopy.mParentRule)
|
||||
{
|
||||
}
|
||||
|
||||
already_AddRefed<nsIStyleSheet>
|
||||
GetStyleSheet() const
|
||||
{
|
||||
NS_IF_ADDREF(mSheet);
|
||||
return mSheet;
|
||||
}
|
||||
virtual ~Rule() {}
|
||||
|
||||
void
|
||||
SetStyleSheet(nsCSSStyleSheet* aSheet)
|
||||
{
|
||||
// We don't reference count this up reference. The style sheet
|
||||
// will tell us when it's going away or when we're detached from
|
||||
// it.
|
||||
mSheet = aSheet;
|
||||
}
|
||||
public:
|
||||
// for implementing nsISupports
|
||||
NS_IMETHOD_(nsrefcnt) AddRef();
|
||||
NS_IMETHOD_(nsrefcnt) Release();
|
||||
protected:
|
||||
nsAutoRefCnt mRefCnt;
|
||||
NS_DECL_OWNINGTHREAD
|
||||
public:
|
||||
|
||||
void
|
||||
SetParentRule(nsICSSGroupRule* aRule)
|
||||
{
|
||||
// We don't reference count this up reference. The group rule
|
||||
// will tell us when it's going away or when we're detached from
|
||||
// it.
|
||||
mParentRule = aRule;
|
||||
}
|
||||
virtual nsIStyleSheet* GetStyleSheet() const;
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet);
|
||||
|
||||
virtual void SetParentRule(GroupRule* aRule);
|
||||
|
||||
protected:
|
||||
nsCSSStyleSheet* mSheet;
|
||||
nsICSSGroupRule* mParentRule;
|
||||
nsCSSStyleSheet* mSheet;
|
||||
GroupRule* mParentRule;
|
||||
};
|
||||
|
||||
#endif /* nsCSSRule_h___ */
|
||||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* mozilla_css_Rule_h___ */
|
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include "mozilla/css/StyleRule.h"
|
||||
#include "nsICSSGroupRule.h"
|
||||
#include "mozilla/css/GroupRule.h"
|
||||
#include "mozilla/css/Declaration.h"
|
||||
#include "nsCSSStyleSheet.h"
|
||||
#include "mozilla/css/Loader.h"
|
||||
|
@ -1074,9 +1074,8 @@ DOMCSSDeclarationImpl::GetCSSParsingEnvironment(nsIURI** aSheetURI,
|
|||
*aSheetPrincipal = nsnull;
|
||||
*aCSSLoader = nsnull;
|
||||
|
||||
nsCOMPtr<nsIStyleSheet> sheet;
|
||||
if (mRule) {
|
||||
sheet = mRule->GetStyleSheet();
|
||||
nsIStyleSheet* sheet = mRule->GetStyleSheet();
|
||||
if (sheet) {
|
||||
NS_IF_ADDREF(*aSheetURI = sheet->GetSheetURI());
|
||||
NS_IF_ADDREF(*aBaseURI = sheet->GetBaseURI());
|
||||
|
@ -1225,7 +1224,7 @@ DOMCSSStyleRule::GetParentRule(nsIDOMCSSRule** aParentRule)
|
|||
*aParentRule = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
nsICSSGroupRule* rule = Rule()->GetParentRule();
|
||||
GroupRule* rule = Rule()->GetParentRule();
|
||||
if (!rule) {
|
||||
*aParentRule = nsnull;
|
||||
return NS_OK;
|
||||
|
@ -1279,7 +1278,7 @@ namespace css {
|
|||
|
||||
StyleRule::StyleRule(nsCSSSelectorList* aSelector,
|
||||
Declaration* aDeclaration)
|
||||
: nsCSSRule(),
|
||||
: Rule(),
|
||||
mSelector(aSelector),
|
||||
mDeclaration(aDeclaration),
|
||||
mImportantRule(nsnull),
|
||||
|
@ -1287,11 +1286,12 @@ StyleRule::StyleRule(nsCSSSelectorList* aSelector,
|
|||
mLineNumber(0),
|
||||
mWasMatched(PR_FALSE)
|
||||
{
|
||||
NS_PRECONDITION(aDeclaration, "must have a declaration");
|
||||
}
|
||||
|
||||
// for |Clone|
|
||||
StyleRule::StyleRule(const StyleRule& aCopy)
|
||||
: nsCSSRule(aCopy),
|
||||
: Rule(aCopy),
|
||||
mSelector(aCopy.mSelector ? aCopy.mSelector->Clone() : nsnull),
|
||||
mDeclaration(new Declaration(*aCopy.mDeclaration)),
|
||||
mImportantRule(nsnull),
|
||||
|
@ -1305,7 +1305,7 @@ StyleRule::StyleRule(const StyleRule& aCopy)
|
|||
// for |SetCSSDeclaration|
|
||||
StyleRule::StyleRule(StyleRule& aCopy,
|
||||
Declaration* aDeclaration)
|
||||
: nsCSSRule(aCopy),
|
||||
: Rule(aCopy),
|
||||
mSelector(aCopy.mSelector),
|
||||
mDeclaration(aDeclaration),
|
||||
mImportantRule(nsnull),
|
||||
|
@ -1354,8 +1354,8 @@ NS_INTERFACE_MAP_BEGIN(StyleRule)
|
|||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICSSRule)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF(StyleRule)
|
||||
NS_IMPL_RELEASE(StyleRule)
|
||||
NS_IMPL_ADDREF_INHERITED(StyleRule, Rule)
|
||||
NS_IMPL_RELEASE_INHERITED(StyleRule, Rule)
|
||||
|
||||
nsIStyleRule* StyleRule::GetImportantRule()
|
||||
{
|
||||
|
@ -1376,25 +1376,6 @@ StyleRule::RuleMatched()
|
|||
}
|
||||
}
|
||||
|
||||
/* virtual */ already_AddRefed<nsIStyleSheet>
|
||||
StyleRule::GetStyleSheet() const
|
||||
{
|
||||
// XXX What about inner, etc.
|
||||
return nsCSSRule::GetStyleSheet();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
StyleRule::SetStyleSheet(nsCSSStyleSheet* aSheet)
|
||||
{
|
||||
nsCSSRule::SetStyleSheet(aSheet);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
StyleRule::SetParentRule(nsICSSGroupRule* aRule)
|
||||
{
|
||||
nsCSSRule::SetParentRule(aRule);
|
||||
}
|
||||
|
||||
/* virtual */ PRInt32
|
||||
StyleRule::GetType() const
|
||||
{
|
||||
|
@ -1526,13 +1507,3 @@ StyleRule::SetSelectorText(const nsAString& aSelectorText)
|
|||
|
||||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
||||
already_AddRefed<css::StyleRule>
|
||||
NS_NewCSSStyleRule(nsCSSSelectorList* aSelector,
|
||||
css::Declaration* aDeclaration)
|
||||
{
|
||||
NS_PRECONDITION(aDeclaration, "must have a declaration");
|
||||
css::StyleRule *it = new css::StyleRule(aSelector, aDeclaration);
|
||||
NS_ADDREF(it);
|
||||
return it;
|
||||
}
|
||||
|
|
|
@ -46,8 +46,7 @@
|
|||
#define mozilla_css_StyleRule_h__
|
||||
|
||||
//#include <stdio.h>
|
||||
#include "nsICSSRule.h"
|
||||
#include "nsCSSRule.h"
|
||||
#include "Rule.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
|
@ -295,8 +294,8 @@ class Declaration;
|
|||
class ImportantRule;
|
||||
class DOMCSSStyleRule;
|
||||
|
||||
class NS_FINAL_CLASS StyleRule : public nsCSSRule,
|
||||
public nsICSSRule {
|
||||
class NS_FINAL_CLASS StyleRule : public Rule
|
||||
{
|
||||
public:
|
||||
StyleRule(nsCSSSelectorList* aSelector,
|
||||
Declaration *aDeclaration);
|
||||
|
@ -309,7 +308,7 @@ private:
|
|||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_CSS_STYLE_RULE_IMPL_CID)
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// null for style attribute
|
||||
nsCSSSelectorList* Selector() { return mSelector; }
|
||||
|
@ -343,16 +342,12 @@ public:
|
|||
void GetCssText(nsAString& aCssText);
|
||||
void SetCssText(const nsAString& aCssText);
|
||||
nsCSSStyleSheet* GetParentStyleSheet() { return mSheet; }
|
||||
nsICSSGroupRule* GetParentRule() { return mParentRule; }
|
||||
GroupRule* GetParentRule() { return mParentRule; }
|
||||
void GetSelectorText(nsAString& aSelectorText);
|
||||
void SetSelectorText(const nsAString& aSelectorText);
|
||||
|
||||
virtual PRInt32 GetType() const;
|
||||
|
||||
virtual already_AddRefed<nsIStyleSheet> GetStyleSheet() const;
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet);
|
||||
virtual void SetParentRule(nsICSSGroupRule* aRule);
|
||||
|
||||
virtual already_AddRefed<nsICSSRule> Clone() const;
|
||||
|
||||
nsIDOMCSSRule* GetDOMRuleWeak(nsresult* aResult);
|
||||
|
@ -386,8 +381,4 @@ private:
|
|||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(mozilla::css::StyleRule, NS_CSS_STYLE_RULE_IMPL_CID)
|
||||
|
||||
already_AddRefed<mozilla::css::StyleRule>
|
||||
NS_NewCSSStyleRule(nsCSSSelectorList* aSelector,
|
||||
mozilla::css::Declaration* aDeclaration);
|
||||
|
||||
#endif /* mozilla_css_StyleRule_h__ */
|
||||
|
|
|
@ -323,8 +323,8 @@ protected:
|
|||
PRBool SkipAtRule(PRBool aInsideBlock);
|
||||
PRBool SkipDeclaration(PRBool aCheckForBraces);
|
||||
|
||||
PRBool PushGroup(nsICSSGroupRule* aRule);
|
||||
void PopGroup(void);
|
||||
PRBool PushGroup(css::GroupRule* aRule);
|
||||
void PopGroup();
|
||||
|
||||
PRBool ParseRuleSet(RuleAppendFunc aAppendFunc, void* aProcessData,
|
||||
PRBool aInsideBraces = PR_FALSE);
|
||||
|
@ -341,7 +341,7 @@ protected:
|
|||
nsMediaList* aMedia,
|
||||
RuleAppendFunc aAppendFunc,
|
||||
void* aProcessData);
|
||||
PRBool ParseGroupRule(nsICSSGroupRule* aRule, RuleAppendFunc aAppendFunc,
|
||||
PRBool ParseGroupRule(css::GroupRule* aRule, RuleAppendFunc aAppendFunc,
|
||||
void* aProcessData);
|
||||
PRBool ParseMediaRule(RuleAppendFunc aAppendFunc, void* aProcessData);
|
||||
PRBool ParseMozDocumentRule(RuleAppendFunc aAppendFunc, void* aProcessData);
|
||||
|
@ -656,7 +656,7 @@ protected:
|
|||
#endif
|
||||
|
||||
// Stack of rule groups; used for @media and such.
|
||||
nsCOMArray<nsICSSGroupRule> mGroupStack;
|
||||
nsTArray<nsRefPtr<css::GroupRule> > mGroupStack;
|
||||
|
||||
// During the parsing of a property (which may be a shorthand), the data
|
||||
// are stored in |mTempData|. (It is needed to ensure that parser
|
||||
|
@ -987,7 +987,7 @@ CSSParserImpl::ParseStyleAttribute(const nsAString& aAttributeValue,
|
|||
css::Declaration* declaration = ParseDeclarationBlock(haveBraces);
|
||||
if (declaration) {
|
||||
// Create a style rule for the declaration
|
||||
*aResult = NS_NewCSSStyleRule(nsnull, declaration).get();
|
||||
NS_ADDREF(*aResult = new css::StyleRule(nsnull, declaration));
|
||||
} else {
|
||||
*aResult = nsnull;
|
||||
}
|
||||
|
@ -1557,12 +1557,8 @@ CSSParserImpl::ParseCharsetRule(RuleAppendFunc aAppendFunc,
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsICSSRule> rule;
|
||||
NS_NewCSSCharsetRule(getter_AddRefs(rule), charset);
|
||||
|
||||
if (rule) {
|
||||
(*aAppendFunc)(rule, aData);
|
||||
}
|
||||
nsCOMPtr<nsICSSRule> rule = new css::CharsetRule(charset);
|
||||
(*aAppendFunc)(rule, aData);
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
@ -1926,18 +1922,13 @@ CSSParserImpl::ProcessImport(const nsString& aURLSpec,
|
|||
RuleAppendFunc aAppendFunc,
|
||||
void* aData)
|
||||
{
|
||||
nsRefPtr<css::ImportRule> rule;
|
||||
nsresult rv = NS_NewCSSImportRule(getter_AddRefs(rule), aURLSpec, aMedia);
|
||||
if (NS_FAILED(rv)) { // out of memory
|
||||
mScanner.SetLowLevelError(rv);
|
||||
return;
|
||||
}
|
||||
nsRefPtr<css::ImportRule> rule = new css::ImportRule(aMedia, aURLSpec);
|
||||
(*aAppendFunc)(rule, aData);
|
||||
|
||||
// Diagnose bad URIs even if we don't have a child loader.
|
||||
nsCOMPtr<nsIURI> url;
|
||||
// Charset will be deduced from mBaseURI, which is more or less correct.
|
||||
rv = NS_NewURI(getter_AddRefs(url), aURLSpec, nsnull, mBaseURI);
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(url), aURLSpec, nsnull, mBaseURI);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
if (rv == NS_ERROR_MALFORMED_URI) {
|
||||
|
@ -1958,7 +1949,7 @@ CSSParserImpl::ProcessImport(const nsString& aURLSpec,
|
|||
|
||||
// Parse the {} part of an @media or @-moz-document rule.
|
||||
PRBool
|
||||
CSSParserImpl::ParseGroupRule(nsICSSGroupRule* aRule,
|
||||
CSSParserImpl::ParseGroupRule(css::GroupRule* aRule,
|
||||
RuleAppendFunc aAppendFunc,
|
||||
void* aData)
|
||||
{
|
||||
|
@ -2007,17 +1998,13 @@ PRBool
|
|||
CSSParserImpl::ParseMediaRule(RuleAppendFunc aAppendFunc, void* aData)
|
||||
{
|
||||
nsRefPtr<nsMediaList> media = new nsMediaList();
|
||||
if (!media) {
|
||||
mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY);
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
if (GatherMedia(media, PR_TRUE)) {
|
||||
// XXXbz this could use better error reporting throughout the method
|
||||
nsRefPtr<nsCSSMediaRule> rule(new nsCSSMediaRule());
|
||||
nsRefPtr<css::MediaRule> rule = new css::MediaRule();
|
||||
// Append first, so when we do SetMedia() the rule
|
||||
// knows what its stylesheet is.
|
||||
if (rule && ParseGroupRule(rule, aAppendFunc, aData)) {
|
||||
if (ParseGroupRule(rule, aAppendFunc, aData)) {
|
||||
rule->SetMedia(media);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
@ -2032,8 +2019,8 @@ CSSParserImpl::ParseMediaRule(RuleAppendFunc aAppendFunc, void* aData)
|
|||
PRBool
|
||||
CSSParserImpl::ParseMozDocumentRule(RuleAppendFunc aAppendFunc, void* aData)
|
||||
{
|
||||
nsCSSDocumentRule::URL *urls = nsnull;
|
||||
nsCSSDocumentRule::URL **next = &urls;
|
||||
css::DocumentRule::URL *urls = nsnull;
|
||||
css::DocumentRule::URL **next = &urls;
|
||||
do {
|
||||
if (!GetToken(PR_TRUE) ||
|
||||
!(eCSSToken_URL == mToken.mType ||
|
||||
|
@ -2044,21 +2031,16 @@ CSSParserImpl::ParseMozDocumentRule(RuleAppendFunc aAppendFunc, void* aData)
|
|||
delete urls;
|
||||
return PR_FALSE;
|
||||
}
|
||||
nsCSSDocumentRule::URL *cur = *next = new nsCSSDocumentRule::URL;
|
||||
if (!cur) {
|
||||
mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY);
|
||||
delete urls;
|
||||
return PR_FALSE;
|
||||
}
|
||||
css::DocumentRule::URL *cur = *next = new css::DocumentRule::URL;
|
||||
next = &cur->next;
|
||||
if (mToken.mType == eCSSToken_URL) {
|
||||
cur->func = nsCSSDocumentRule::eURL;
|
||||
cur->func = css::DocumentRule::eURL;
|
||||
CopyUTF16toUTF8(mToken.mIdent, cur->url);
|
||||
} else {
|
||||
if (mToken.mIdent.LowerCaseEqualsLiteral("url-prefix")) {
|
||||
cur->func = nsCSSDocumentRule::eURLPrefix;
|
||||
cur->func = css::DocumentRule::eURLPrefix;
|
||||
} else if (mToken.mIdent.LowerCaseEqualsLiteral("domain")) {
|
||||
cur->func = nsCSSDocumentRule::eDomain;
|
||||
cur->func = css::DocumentRule::eDomain;
|
||||
}
|
||||
|
||||
nsAutoString url;
|
||||
|
@ -2075,12 +2057,7 @@ CSSParserImpl::ParseMozDocumentRule(RuleAppendFunc aAppendFunc, void* aData)
|
|||
}
|
||||
} while (ExpectSymbol(',', PR_TRUE));
|
||||
|
||||
nsRefPtr<nsCSSDocumentRule> rule(new nsCSSDocumentRule());
|
||||
if (!rule) {
|
||||
mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY);
|
||||
delete urls;
|
||||
return PR_FALSE;
|
||||
}
|
||||
nsRefPtr<css::DocumentRule> rule = new css::DocumentRule();
|
||||
rule->SetURLs(urls);
|
||||
|
||||
return ParseGroupRule(rule, aAppendFunc, aData);
|
||||
|
@ -2124,22 +2101,19 @@ CSSParserImpl::ProcessNameSpace(const nsString& aPrefix,
|
|||
RuleAppendFunc aAppendFunc,
|
||||
void* aData)
|
||||
{
|
||||
nsRefPtr<css::NameSpaceRule> rule;
|
||||
nsCOMPtr<nsIAtom> prefix;
|
||||
|
||||
if (!aPrefix.IsEmpty()) {
|
||||
prefix = do_GetAtom(aPrefix);
|
||||
}
|
||||
|
||||
NS_NewCSSNameSpaceRule(getter_AddRefs(rule), prefix, aURLSpec);
|
||||
if (rule) {
|
||||
(*aAppendFunc)(rule, aData);
|
||||
nsRefPtr<css::NameSpaceRule> rule = new css::NameSpaceRule(prefix, aURLSpec);
|
||||
(*aAppendFunc)(rule, aData);
|
||||
|
||||
// If this was the first namespace rule encountered, it will trigger
|
||||
// creation of a namespace map.
|
||||
if (!mNameSpaceMap) {
|
||||
mNameSpaceMap = mSheet->GetNameSpaceMap();
|
||||
}
|
||||
// If this was the first namespace rule encountered, it will trigger
|
||||
// creation of a namespace map.
|
||||
if (!mNameSpaceMap) {
|
||||
mNameSpaceMap = mSheet->GetNameSpaceMap();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2386,27 +2360,27 @@ CSSParserImpl::SkipRuleSet(PRBool aInsideBraces)
|
|||
}
|
||||
|
||||
PRBool
|
||||
CSSParserImpl::PushGroup(nsICSSGroupRule* aRule)
|
||||
CSSParserImpl::PushGroup(css::GroupRule* aRule)
|
||||
{
|
||||
if (mGroupStack.AppendObject(aRule))
|
||||
if (mGroupStack.AppendElement(aRule))
|
||||
return PR_TRUE;
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
CSSParserImpl::PopGroup(void)
|
||||
CSSParserImpl::PopGroup()
|
||||
{
|
||||
PRInt32 count = mGroupStack.Count();
|
||||
PRUint32 count = mGroupStack.Length();
|
||||
if (0 < count) {
|
||||
mGroupStack.RemoveObjectAt(count - 1);
|
||||
mGroupStack.RemoveElementAt(count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CSSParserImpl::AppendRule(nsICSSRule* aRule)
|
||||
{
|
||||
PRInt32 count = mGroupStack.Count();
|
||||
PRUint32 count = mGroupStack.Length();
|
||||
if (0 < count) {
|
||||
mGroupStack[count - 1]->AppendStyleRule(aRule);
|
||||
}
|
||||
|
@ -2448,7 +2422,7 @@ CSSParserImpl::ParseRuleSet(RuleAppendFunc aAppendFunc, void* aData,
|
|||
|
||||
// Translate the selector list and declaration block into style data
|
||||
|
||||
nsRefPtr<css::StyleRule> rule = NS_NewCSSStyleRule(slist, declaration);
|
||||
nsRefPtr<css::StyleRule> rule = new css::StyleRule(slist, declaration);
|
||||
rule->SetLineNumber(linenum);
|
||||
(*aAppendFunc)(rule, aData);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
#include "nsICSSPseudoComparator.h"
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "mozilla/css/StyleRule.h"
|
||||
#include "nsICSSGroupRule.h"
|
||||
#include "mozilla/css/GroupRule.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
|
@ -2782,7 +2782,7 @@ CascadeRuleEnumFunc(nsICSSRule* aRule, void* aData)
|
|||
}
|
||||
else if (nsICSSRule::MEDIA_RULE == type ||
|
||||
nsICSSRule::DOCUMENT_RULE == type) {
|
||||
nsICSSGroupRule* groupRule = (nsICSSGroupRule*)aRule;
|
||||
css::GroupRule* groupRule = static_cast<css::GroupRule*>(aRule);
|
||||
if (groupRule->UseForPresentation(data->mPresContext, data->mCacheKey))
|
||||
if (!groupRule->EnumerateRulesForwards(CascadeRuleEnumFunc, aData))
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
#ifndef nsCSSRules_h_
|
||||
#define nsCSSRules_h_
|
||||
|
||||
#include "nsCSSRule.h"
|
||||
#include "nsICSSGroupRule.h"
|
||||
#include "Rule.h"
|
||||
#include "mozilla/css/GroupRule.h"
|
||||
#include "nsIDOMCSSMediaRule.h"
|
||||
#include "nsIDOMCSSMozDocumentRule.h"
|
||||
#include "nsIDOMCSSFontFaceRule.h"
|
||||
|
@ -52,82 +52,22 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsCSSProperty.h"
|
||||
#include "nsCSSValue.h"
|
||||
#include "nsIDOMCSSCharsetRule.h"
|
||||
|
||||
class CSSGroupRuleRuleListImpl;
|
||||
class nsMediaList;
|
||||
template<class T> struct already_AddRefed;
|
||||
|
||||
#define DECL_STYLE_RULE_INHERIT_NO_DOMRULE \
|
||||
virtual already_AddRefed<nsIStyleSheet> GetStyleSheet() const; \
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet); \
|
||||
virtual void SetParentRule(nsICSSGroupRule* aRule); \
|
||||
virtual void MapRuleInfoInto(nsRuleData* aRuleData);
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
#define DECL_STYLE_RULE_INHERIT \
|
||||
DECL_STYLE_RULE_INHERIT_NO_DOMRULE \
|
||||
nsIDOMCSSRule* GetDOMRuleWeak(nsresult* aResult);
|
||||
|
||||
// inherits from nsCSSRule and also implements methods on nsICSSGroupRule
|
||||
// so they can be shared between nsCSSMediaRule and nsCSSDocumentRule
|
||||
class nsCSSGroupRule : public nsCSSRule, public nsICSSGroupRule
|
||||
{
|
||||
protected:
|
||||
nsCSSGroupRule();
|
||||
nsCSSGroupRule(const nsCSSGroupRule& aCopy);
|
||||
virtual ~nsCSSGroupRule();
|
||||
|
||||
// Implement part of nsISupports.
|
||||
NS_IMETHOD_(nsrefcnt) AddRef();
|
||||
NS_IMETHOD_(nsrefcnt) Release();
|
||||
protected:
|
||||
nsAutoRefCnt mRefCnt;
|
||||
NS_DECL_OWNINGTHREAD
|
||||
public:
|
||||
|
||||
// implement part of nsIStyleRule and nsICSSRule
|
||||
DECL_STYLE_RULE_INHERIT_NO_DOMRULE
|
||||
|
||||
// to help implement nsIStyleRule
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
#endif
|
||||
|
||||
public:
|
||||
// implement nsICSSGroupRule
|
||||
NS_IMETHOD AppendStyleRule(nsICSSRule* aRule);
|
||||
NS_IMETHOD StyleRuleCount(PRInt32& aCount) const;
|
||||
NS_IMETHOD GetStyleRuleAt(PRInt32 aIndex, nsICSSRule*& aRule) const;
|
||||
NS_IMETHOD_(PRBool) EnumerateRulesForwards(RuleEnumFunc aFunc, void * aData) const;
|
||||
NS_IMETHOD DeleteStyleRuleAt(PRUint32 aIndex);
|
||||
NS_IMETHOD InsertStyleRulesAt(PRUint32 aIndex,
|
||||
nsCOMArray<nsICSSRule>& aRules);
|
||||
NS_IMETHOD ReplaceStyleRule(nsICSSRule *aOld, nsICSSRule *aNew);
|
||||
|
||||
protected:
|
||||
// to help implement nsIDOMCSSRule
|
||||
nsresult AppendRulesToCssText(nsAString& aCssText);
|
||||
// to implement methods on nsIDOMCSSRule
|
||||
nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet** aSheet);
|
||||
nsresult GetParentRule(nsIDOMCSSRule** aParentRule);
|
||||
|
||||
// to implement common methods on nsIDOMCSSMediaRule and
|
||||
// nsIDOMCSSMozDocumentRule
|
||||
nsresult GetCssRules(nsIDOMCSSRuleList* *aRuleList);
|
||||
nsresult InsertRule(const nsAString & aRule, PRUint32 aIndex,
|
||||
PRUint32* _retval);
|
||||
nsresult DeleteRule(PRUint32 aIndex);
|
||||
|
||||
nsCOMArray<nsICSSRule> mRules;
|
||||
CSSGroupRuleRuleListImpl* mRuleCollection;
|
||||
};
|
||||
|
||||
class NS_FINAL_CLASS nsCSSMediaRule : public nsCSSGroupRule,
|
||||
public nsIDOMCSSMediaRule
|
||||
class NS_FINAL_CLASS MediaRule : public GroupRule,
|
||||
public nsIDOMCSSMediaRule
|
||||
{
|
||||
public:
|
||||
nsCSSMediaRule();
|
||||
nsCSSMediaRule(const nsCSSMediaRule& aCopy);
|
||||
virtual ~nsCSSMediaRule();
|
||||
MediaRule();
|
||||
private:
|
||||
MediaRule(const MediaRule& aCopy);
|
||||
~MediaRule();
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -137,10 +77,10 @@ public:
|
|||
#endif
|
||||
|
||||
// nsICSSRule methods
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet); //override nsCSSGroupRule
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet); //override GroupRule
|
||||
virtual PRInt32 GetType() const;
|
||||
virtual already_AddRefed<nsICSSRule> Clone() const;
|
||||
nsIDOMCSSRule* GetDOMRuleWeak(nsresult *aResult)
|
||||
virtual nsIDOMCSSRule* GetDOMRuleWeak(nsresult *aResult)
|
||||
{
|
||||
*aResult = NS_OK;
|
||||
return this;
|
||||
|
@ -152,9 +92,9 @@ public:
|
|||
// nsIDOMCSSMediaRule interface
|
||||
NS_DECL_NSIDOMCSSMEDIARULE
|
||||
|
||||
// rest of nsICSSGroupRule interface
|
||||
NS_IMETHOD_(PRBool) UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey);
|
||||
// rest of GroupRule
|
||||
virtual PRBool UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey);
|
||||
|
||||
// @media rule methods
|
||||
nsresult SetMedia(nsMediaList* aMedia);
|
||||
|
@ -163,13 +103,15 @@ protected:
|
|||
nsRefPtr<nsMediaList> mMedia;
|
||||
};
|
||||
|
||||
class NS_FINAL_CLASS nsCSSDocumentRule : public nsCSSGroupRule,
|
||||
public nsIDOMCSSMozDocumentRule
|
||||
class NS_FINAL_CLASS DocumentRule : public GroupRule,
|
||||
public nsIDOMCSSMozDocumentRule
|
||||
{
|
||||
public:
|
||||
nsCSSDocumentRule(void);
|
||||
nsCSSDocumentRule(const nsCSSDocumentRule& aCopy);
|
||||
virtual ~nsCSSDocumentRule(void);
|
||||
DocumentRule();
|
||||
private:
|
||||
DocumentRule(const DocumentRule& aCopy);
|
||||
~DocumentRule();
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -181,7 +123,7 @@ public:
|
|||
// nsICSSRule methods
|
||||
virtual PRInt32 GetType() const;
|
||||
virtual already_AddRefed<nsICSSRule> Clone() const;
|
||||
nsIDOMCSSRule* GetDOMRuleWeak(nsresult *aResult)
|
||||
virtual nsIDOMCSSRule* GetDOMRuleWeak(nsresult *aResult)
|
||||
{
|
||||
*aResult = NS_OK;
|
||||
return this;
|
||||
|
@ -193,9 +135,9 @@ public:
|
|||
// nsIDOMCSSMozDocumentRule interface
|
||||
NS_DECL_NSIDOMCSSMOZDOCUMENTRULE
|
||||
|
||||
// rest of nsICSSGroupRule interface
|
||||
NS_IMETHOD_(PRBool) UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey);
|
||||
// rest of GroupRule
|
||||
virtual PRBool UseForPresentation(nsPresContext* aPresContext,
|
||||
nsMediaQueryResultCacheKey& aKey);
|
||||
|
||||
enum Function {
|
||||
eURL,
|
||||
|
@ -224,6 +166,9 @@ protected:
|
|||
nsAutoPtr<URL> mURLs; // linked list of |struct URL| above.
|
||||
};
|
||||
|
||||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
||||
// A nsCSSFontFaceStyleDecl is always embedded in a nsCSSFontFaceRule.
|
||||
class nsCSSFontFaceRule;
|
||||
class nsCSSFontFaceStyleDecl : public nsIDOMCSSStyleDeclaration
|
||||
|
@ -257,8 +202,7 @@ private:
|
|||
void* operator new(size_t size) CPP_THROW_NEW;
|
||||
};
|
||||
|
||||
class NS_FINAL_CLASS nsCSSFontFaceRule : public nsCSSRule,
|
||||
public nsICSSRule,
|
||||
class NS_FINAL_CLASS nsCSSFontFaceRule : public mozilla::css::Rule,
|
||||
public nsIDOMCSSFontFaceRule
|
||||
{
|
||||
public:
|
||||
|
@ -266,9 +210,9 @@ public:
|
|||
|
||||
nsCSSFontFaceRule(const nsCSSFontFaceRule& aCopy)
|
||||
// copy everything except our reference count
|
||||
: nsCSSRule(aCopy), mDecl(aCopy.mDecl) {}
|
||||
: mozilla::css::Rule(aCopy), mDecl(aCopy.mDecl) {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIStyleRule methods
|
||||
#ifdef DEBUG
|
||||
|
@ -316,4 +260,45 @@ nsCSSFontFaceStyleDecl::ContainingRule() const
|
|||
(reinterpret_cast<const char*>(this) - offsetof(nsCSSFontFaceRule, mDecl));
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
||||
class NS_FINAL_CLASS CharsetRule : public Rule,
|
||||
public nsIDOMCSSCharsetRule
|
||||
{
|
||||
public:
|
||||
CharsetRule(const nsAString& aEncoding);
|
||||
private:
|
||||
// For |Clone|
|
||||
CharsetRule(const CharsetRule& aCopy);
|
||||
~CharsetRule() {}
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
DECL_STYLE_RULE_INHERIT
|
||||
|
||||
// nsIStyleRule methods
|
||||
#ifdef DEBUG
|
||||
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
|
||||
#endif
|
||||
|
||||
// nsICSSRule methods
|
||||
virtual PRInt32 GetType() const;
|
||||
virtual already_AddRefed<nsICSSRule> Clone() const;
|
||||
|
||||
// nsIDOMCSSRule interface
|
||||
NS_DECL_NSIDOMCSSRULE
|
||||
|
||||
// nsIDOMCSSCharsetRule methods
|
||||
NS_IMETHOD GetEncoding(nsAString& aEncoding);
|
||||
NS_IMETHOD SetEncoding(const nsAString& aEncoding);
|
||||
|
||||
private:
|
||||
nsString mEncoding;
|
||||
};
|
||||
|
||||
} // namespace css
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* !defined(nsCSSRules_h_) */
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "nsIAtom.h"
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "mozilla/css/NameSpaceRule.h"
|
||||
#include "nsICSSGroupRule.h"
|
||||
#include "mozilla/css/GroupRule.h"
|
||||
#include "mozilla/css/ImportRule.h"
|
||||
#include "nsIMediaList.h"
|
||||
#include "nsIDocument.h"
|
||||
|
@ -1274,7 +1274,7 @@ nsCSSStyleSheet::FindOwningWindowID() const
|
|||
}
|
||||
|
||||
if (windowID == 0 && mOwnerRule) {
|
||||
nsCOMPtr<nsIStyleSheet> sheet = mOwnerRule->GetStyleSheet();
|
||||
nsCOMPtr<nsIStyleSheet> sheet = static_cast<css::Rule*>(mOwnerRule)->GetStyleSheet();
|
||||
if (sheet) {
|
||||
nsRefPtr<nsCSSStyleSheet> cssSheet = do_QueryObject(sheet);
|
||||
if (cssSheet) {
|
||||
|
@ -1934,18 +1934,16 @@ nsCSSStyleSheet::DeleteRule(PRUint32 aIndex)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsCSSStyleSheet::DeleteRuleFromGroup(nsICSSGroupRule* aGroup, PRUint32 aIndex)
|
||||
nsCSSStyleSheet::DeleteRuleFromGroup(css::GroupRule* aGroup, PRUint32 aIndex)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aGroup);
|
||||
NS_ASSERTION(mInner->mComplete, "No deleting from an incomplete sheet!");
|
||||
nsresult result;
|
||||
nsCOMPtr<nsICSSRule> rule;
|
||||
result = aGroup->GetStyleRuleAt(aIndex, *getter_AddRefs(rule));
|
||||
NS_ENSURE_SUCCESS(result, result);
|
||||
|
||||
nsCOMPtr<nsICSSRule> rule = aGroup->GetStyleRuleAt(aIndex);
|
||||
NS_ENSURE_TRUE(rule, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
// check that the rule actually belongs to this sheet!
|
||||
nsCOMPtr<nsIStyleSheet> ruleSheet = rule->GetStyleSheet();
|
||||
if (this != ruleSheet) {
|
||||
if (this != rule->GetStyleSheet()) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -1970,15 +1968,14 @@ nsCSSStyleSheet::DeleteRuleFromGroup(nsICSSGroupRule* aGroup, PRUint32 aIndex)
|
|||
|
||||
nsresult
|
||||
nsCSSStyleSheet::InsertRuleIntoGroup(const nsAString & aRule,
|
||||
nsICSSGroupRule* aGroup,
|
||||
css::GroupRule* aGroup,
|
||||
PRUint32 aIndex,
|
||||
PRUint32* _retval)
|
||||
{
|
||||
nsresult result;
|
||||
NS_ASSERTION(mInner->mComplete, "No inserting into an incomplete sheet!");
|
||||
// check that the group actually belongs to this sheet!
|
||||
nsCOMPtr<nsIStyleSheet> groupSheet = aGroup->GetStyleSheet();
|
||||
if (this != groupSheet) {
|
||||
if (this != aGroup->GetStyleSheet()) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -2043,17 +2040,12 @@ nsCSSStyleSheet::InsertRuleIntoGroup(const nsAString & aRule,
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsCSSStyleSheet::ReplaceRuleInGroup(nsICSSGroupRule* aGroup,
|
||||
nsCSSStyleSheet::ReplaceRuleInGroup(css::GroupRule* aGroup,
|
||||
nsICSSRule* aOld, nsICSSRule* aNew)
|
||||
{
|
||||
nsresult result;
|
||||
NS_PRECONDITION(mInner->mComplete, "No replacing in an incomplete sheet!");
|
||||
#ifdef DEBUG
|
||||
{
|
||||
nsCOMPtr<nsIStyleSheet> groupSheet = aGroup->GetStyleSheet();
|
||||
NS_ASSERTION(this == groupSheet, "group doesn't belong to this sheet");
|
||||
}
|
||||
#endif
|
||||
NS_ASSERTION(this == aGroup->GetStyleSheet(), "group doesn't belong to this sheet");
|
||||
result = WillDirty();
|
||||
NS_ENSURE_SUCCESS(result, result);
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@ class nsICSSRule;
|
|||
class nsXMLNameSpaceMap;
|
||||
class nsCSSRuleProcessor;
|
||||
class nsMediaList;
|
||||
class nsICSSGroupRule;
|
||||
class nsIPrincipal;
|
||||
class nsIURI;
|
||||
class nsMediaList;
|
||||
|
@ -67,6 +66,7 @@ template<class E, class A> class nsTArray;
|
|||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
class GroupRule;
|
||||
class ImportRule;
|
||||
}
|
||||
}
|
||||
|
@ -172,9 +172,9 @@ public:
|
|||
PRInt32 StyleRuleCount() const;
|
||||
nsresult GetStyleRuleAt(PRInt32 aIndex, nsICSSRule*& aRule) const;
|
||||
|
||||
nsresult DeleteRuleFromGroup(nsICSSGroupRule* aGroup, PRUint32 aIndex);
|
||||
nsresult InsertRuleIntoGroup(const nsAString& aRule, nsICSSGroupRule* aGroup, PRUint32 aIndex, PRUint32* _retval);
|
||||
nsresult ReplaceRuleInGroup(nsICSSGroupRule* aGroup, nsICSSRule* aOld, nsICSSRule* aNew);
|
||||
nsresult DeleteRuleFromGroup(mozilla::css::GroupRule* aGroup, PRUint32 aIndex);
|
||||
nsresult InsertRuleIntoGroup(const nsAString& aRule, mozilla::css::GroupRule* aGroup, PRUint32 aIndex, PRUint32* _retval);
|
||||
nsresult ReplaceRuleInGroup(mozilla::css::GroupRule* aGroup, nsICSSRule* aOld, nsICSSRule* aNew);
|
||||
|
||||
PRInt32 StyleSheetCount() const;
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ nsDOMCSSAttributeDeclaration::GetCSSDeclaration(PRBool aAllocate)
|
|||
// cannot fail
|
||||
css::Declaration *decl = new css::Declaration();
|
||||
decl->InitializeEmpty();
|
||||
nsRefPtr<css::StyleRule> newRule = NS_NewCSSStyleRule(nsnull, decl);
|
||||
nsRefPtr<css::StyleRule> newRule = new css::StyleRule(nsnull, decl);
|
||||
|
||||
// this *can* fail (inside SetAttrAndNotify, at least).
|
||||
nsresult rv;
|
||||
|
|
|
@ -44,15 +44,20 @@
|
|||
#include "nsIDOMCSSRule.h"
|
||||
|
||||
class nsCSSStyleSheet;
|
||||
class nsICSSGroupRule;
|
||||
class nsAString;
|
||||
template<class T> struct already_AddRefed;
|
||||
class nsIStyleSheet;
|
||||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
class GroupRule;
|
||||
}
|
||||
}
|
||||
|
||||
// IID for the nsICSSRule interface
|
||||
#define NS_ICSS_RULE_IID \
|
||||
{ 0x1f560b20, 0xa829, 0x4b99, \
|
||||
{ 0x87, 0xbd, 0x8c, 0x87, 0x95, 0x2b, 0x3b, 0xb6 } }
|
||||
#define NS_ICSS_RULE_IID \
|
||||
{ 0x471d733e, 0xc138, 0x4a50, \
|
||||
{ 0x9e, 0x1a, 0xd1, 0x3c, 0xbb, 0x65, 0xb5, 0x26 } }
|
||||
|
||||
|
||||
// inheriting from nsIStyleRule is only for style rules, not other rule types
|
||||
|
@ -78,9 +83,9 @@ public:
|
|||
|
||||
virtual PRInt32 GetType() const = 0;
|
||||
|
||||
virtual already_AddRefed<nsIStyleSheet> GetStyleSheet() const = 0;
|
||||
virtual nsIStyleSheet* GetStyleSheet() const = 0;
|
||||
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet) = 0;
|
||||
virtual void SetParentRule(nsICSSGroupRule* aRule) = 0;
|
||||
virtual void SetParentRule(mozilla::css::GroupRule* aRule) = 0;
|
||||
|
||||
/**
|
||||
* Clones |this|. Never returns NULL.
|
||||
|
@ -100,10 +105,4 @@ public:
|
|||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSRule, NS_ICSS_RULE_IID)
|
||||
|
||||
/* Define global NS_New* functions for rules that don't need their own
|
||||
interfaces here */
|
||||
nsresult
|
||||
NS_NewCSSCharsetRule(nsICSSRule** aInstancePtrResult,
|
||||
const nsAString& aEncoding);
|
||||
|
||||
#endif /* nsICSSRule_h */
|
||||
|
|
|
@ -1818,7 +1818,8 @@ BuildStyleRule(nsCSSProperty aProperty,
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
return NS_NewCSSStyleRule(nsnull, declaration.forget());
|
||||
nsRefPtr<css::StyleRule> rule = new css::StyleRule(nsnull, declaration.forget());
|
||||
return rule.forget();
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# .hgignore - List of filenames hg should ignore
|
||||
|
||||
# Filenames that should be ignored wherever they appear
|
||||
~$
|
||||
\.pyc$
|
||||
\.swp$
|
||||
(^|/)TAGS$
|
||||
\.DS_Store$
|
|
@ -0,0 +1,8 @@
|
|||
14bbac84b71cbb9d603ed571538c9c41b023d94e FENNEC_M4
|
||||
7dbca6d7d5cf0a052c658b6ba3e89068b0772734 FENNEC_M7
|
||||
eb17df1df284c8aa882ae626d6f8b298adc55c6b FENNEC_M8
|
||||
b394a7122c1018dd3d49d9049bcbbcb5b9ab17e2 FENNEC_A1
|
||||
5f1388238359c2019572316cf75c3a404d2d4e70 FENNEC_A2
|
||||
84195fc5e34609b49862f95799e21b6f790ec9cc FENNEC_M11
|
||||
9aa835472fed9cb58c809c2f3182e46bf5ce25bd FENNEC_B1
|
||||
6da60192232841d4d6a090a577585c70d790dac8 FENNEC_B5
|
|
@ -0,0 +1,62 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <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>
|
||||
# Joel Maher <jmaher@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
|
||||
|
||||
DIRS = chrome locales components modules themes app
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
PARALLEL_DIRS += $(DEPTH)/xulrunner/tools/redit
|
||||
endif
|
||||
|
||||
ifdef WINCE
|
||||
DIRS += installer/wince
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/testing/testsuite-targets.mk
|
||||
|
||||
package-mobile-tests:
|
||||
$(MAKE) stage-mochitest DIST_BIN=$(DEPTH)/$(DIST)/bin/xulrunner
|
||||
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
||||
@(cd $(PKG_STAGE) && tar $(TAR_CREATE_FLAGS) - *) | bzip2 -f > $(DIST)/$(PKG_PATH)$(TEST_PACKAGE)
|
|
@ -0,0 +1,219 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <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
|
||||
|
||||
DIRS = profile/extensions
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/mobile.js
|
||||
DIST_FILES = application.ini
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
|
||||
CPPSRCS = nsBrowserApp.cpp
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
ifeq (Linux_1, $(OS_ARCH)_$(GNU_LD))
|
||||
OS_LDFLAGS += -Wl,-rpath='$$ORIGIN'
|
||||
NSDISTMODE = copy
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_LIBXUL
|
||||
APP_XPCOM_LIBS = $(XPCOM_GLUE_LDOPTS)
|
||||
else
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
APP_XPCOM_LIBS = $(XPCOM_LIBS)
|
||||
endif
|
||||
|
||||
LIBS += $(APP_XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
LIBS += $(DIST)/bin/XUL
|
||||
else
|
||||
EXTRA_DSO_LIBS += xul
|
||||
LIBS += $(EXTRA_DSO_LIBS)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,version)
|
||||
endif
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
ifdef _MSC_VER
|
||||
# Always enter a Windows program through wmain, whether or not we're
|
||||
# a console application.
|
||||
ifdef WINCE
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
||||
else
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif
|
||||
endif #LIBXUL_SDK
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
|
||||
GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
|
||||
APP_BUILDID = $(shell $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid)
|
||||
APP_ICON = mobile
|
||||
APP_SPLASH = splash
|
||||
|
||||
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) \
|
||||
-DGRE_BUILDID=$(GRE_BUILDID) \
|
||||
-DAPP_BUILDID=$(APP_BUILDID) \
|
||||
-DAPP_NAME=$(MOZ_APP_NAME) \
|
||||
-DAPP_VERSION=$(MOZ_APP_VERSION) \
|
||||
-DMOZ_UPDATER=$(MOZ_UPDATER) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZILLA_OFFICIAL
|
||||
DEFINES += -DMOZILLA_OFFICIAL
|
||||
endif
|
||||
|
||||
SOURCE_STAMP := $(shell cd $(srcdir)/.. && hg identify 2>/dev/null | cut -f1 -d' ')
|
||||
ifdef SOURCE_STAMP
|
||||
DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
|
||||
endif
|
||||
|
||||
# strip a trailing slash from the repo URL because it's not always present,
|
||||
# and we want to construct a working URL in buildconfig.html
|
||||
# make+shell+sed = awful
|
||||
_dollar=$$
|
||||
SOURCE_REPO := $(shell cd $(srcdir)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
|
||||
# extra sanity check for old versions of hg
|
||||
# that don't support showconfig
|
||||
ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
|
||||
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
|
||||
endif
|
||||
|
||||
ifdef WINCE
|
||||
DEFINES += -DWINCE=1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
REDIT_PATH = $(LIBXUL_DIST)/host/bin
|
||||
endif
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
REDIT_PATH = $(LIBXUL_DIST)/bin
|
||||
endif
|
||||
|
||||
APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
APP_BINARY_FASTSTART = $(MOZ_APP_NAME)faststart$(BIN_SUFFIX)
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
||||
APP_NAME = $(MOZ_APP_DISPLAYNAME)
|
||||
APP_VERSION = $(MOZ_APP_VERSION)
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
APP_NAME := $(APP_NAME)Debug
|
||||
endif
|
||||
|
||||
AB_CD = $(MOZ_UI_LOCALE)
|
||||
|
||||
AB := $(firstword $(subst -, ,$(AB_CD)))
|
||||
|
||||
clean clobber repackage::
|
||||
rm -rf $(DIST)/$(APP_NAME).app
|
||||
|
||||
ifdef LIBXUL_SDK
|
||||
APPFILES = Resources
|
||||
else
|
||||
APPFILES = MacOS
|
||||
endif
|
||||
|
||||
libs repackage:: application.ini
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
|
||||
mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
||||
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
||||
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" -e "s/%APP_BINARY%/$(APP_BINARY)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
|
||||
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
|
||||
rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
|
||||
$(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
|
||||
ifdef LIBXUL_SDK
|
||||
cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
|
||||
rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
|
||||
else
|
||||
rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
|
||||
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
endif
|
||||
printf "APPLMOZB" > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
|
||||
|
||||
else # MOZ_WIDGET_TOOLKIT != cocoa
|
||||
|
||||
libs::
|
||||
ifdef LIBXUL_SDK
|
||||
cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY)
|
||||
endif
|
||||
ifdef MOZ_FASTSTART
|
||||
ifdef _MSC_VER
|
||||
ifdef WINCE
|
||||
cp $(LIBXUL_DIST)/bin/faststartstub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY_FASTSTART)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifndef SKIP_COPY_XULRUNNER
|
||||
ifdef LIBXUL_SDK
|
||||
$(NSINSTALL) -D $(DIST)/bin/xulrunner
|
||||
(cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
|
||||
endif
|
||||
endif # SKIP_COPY_XULRUNNER
|
||||
|
||||
$(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
|
||||
|
||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
||||
cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
|
||||
cp $(srcdir)/$(APP_SPLASH).bmp $(DIST)/bin/$(APP_SPLASH).bmp
|
||||
$(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(srcdir)/$(APP_ICON).ico
|
||||
endif
|
||||
|
||||
endif
|
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,26 @@
|
|||
#filter substitution
|
||||
[App]
|
||||
Vendor=Mozilla
|
||||
Name=Fennec
|
||||
Version=@APP_VERSION@
|
||||
BuildID=@APP_BUILDID@
|
||||
#ifdef MOZ_SOURCE_REPO
|
||||
SourceRepository=@MOZ_SOURCE_REPO@
|
||||
#endif
|
||||
#ifdef MOZ_SOURCE_STAMP
|
||||
SourceStamp=@MOZ_SOURCE_STAMP@
|
||||
#endif
|
||||
ID={a23983c0-fd0e-11dc-95ff-0800200c9a66}
|
||||
|
||||
[Gecko]
|
||||
MinVersion=1.9.2b5pre
|
||||
MaxVersion=@GRE_MILESTONE@
|
||||
|
||||
[XRE]
|
||||
EnableExtensionManager=1
|
||||
|
||||
[Crash Reporter]
|
||||
#if MOZILLA_OFFICIAL
|
||||
Enabled=1
|
||||
#endif
|
||||
ServerURL=https://crash-reports.mozilla.com/submit
|
|
@ -0,0 +1,7 @@
|
|||
D/Contents////
|
||||
/background.png/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/disk.icns/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/document.icns/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/dsstore/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/firefox.icns/1.3/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/license.r/1.4/Mon May 5 00:40:25 2008//
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1,2 @@
|
|||
D/Resources////
|
||||
/Info.plist.in/1.18/Tue Feb 19 05:11:34 2008//
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild/Contents
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -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>fennec</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>%APP_NAME% %APP_VERSION%</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>fennec</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.fennec</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</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 @@
|
|||
D/English.lproj////
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild/Contents/Resources
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1,2 @@
|
|||
/InfoPlist.strings.in/1.4/Wed Jan 2 19:06:47 2008//
|
||||
D
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild/Contents/Resources/English.lproj
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1 @@
|
|||
CFBundleName = "%APP_NAME%";
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,117 @@
|
|||
// See /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h for language IDs.
|
||||
data 'LPic' (5000) {
|
||||
// Default language ID, 0 = English
|
||||
$"0000"
|
||||
// Number of entries in list
|
||||
$"0001"
|
||||
|
||||
// Entry 1
|
||||
// Language ID, 0 = English
|
||||
$"0000"
|
||||
// Resource ID, 0 = STR#/TEXT/styl 5000
|
||||
$"0000"
|
||||
// Multibyte language, 0 = no
|
||||
$"0000"
|
||||
};
|
||||
|
||||
resource 'STR#' (5000, "English") {
|
||||
{
|
||||
// Language (unused?) = English
|
||||
"English",
|
||||
// Accept (Agree)
|
||||
"Accept",
|
||||
// Decline (Disagree)
|
||||
"Decline",
|
||||
// Print, ellipsis is 0xC9
|
||||
"PrintÉ",
|
||||
// Save As, ellipsis is 0xC9
|
||||
"Save AsÉ",
|
||||
// Descriptive text, curly quotes are 0xD2 and 0xD3
|
||||
"You are about to install\n"
|
||||
"Minefield.\n"
|
||||
"\n"
|
||||
"Please read the license agreement. If you agree to its terms and accept, click ÒAcceptÓ to access the software. Otherwise, click ÒDeclineÓ to cancel."
|
||||
};
|
||||
};
|
||||
|
||||
// Beware of 1024(?) byte (character?) line length limitation. Split up long
|
||||
// lines.
|
||||
// If straight quotes are used ("), remember to escape them (\").
|
||||
// Newline is \n, to leave a blank line, use two of them.
|
||||
// 0xD2 and 0xD3 are curly double-quotes ("), 0xD4 and 0xD5 are curly
|
||||
// single quotes ('), 0xD5 is also the apostrophe.
|
||||
data 'TEXT' (5000, "English") {
|
||||
"MINEFIELD END-USER SOFTWARE LICENSE AGREEMENT\n"
|
||||
"Version 3.0, May 2008\n"
|
||||
"\n"
|
||||
"A SOURCE CODE VERSION OF CERTAIN MINEFIELD BROWSER FUNCTIONALITY THAT YOU MAY USE, MODIFY AND DISTRIBUTE IS AVAILABLE TO YOU FREE-OF-CHARGE FROM WWW.MOZILLA.ORG UNDER THE MOZILLA PUBLIC LICENSE and other open source software licenses.\n"
|
||||
"\n"
|
||||
"The accompanying executable code version of Minefield and related documentation (the ÒProductÓ) is made available to you under the terms of this MINEFIELD END-USER SOFTWARE LICENSE AGREEMENT (THE ÒAGREEMENTÓ). BY CLICKING THE ÒACCEPTÓ BUTTON, OR BY INSTALLING OR USING THE MINEFIELD BROWSER, YOU ARE CONSENTING TO BE BOUND BY THE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT CLICK THE ÒACCEPTÓ BUTTON, AND DO NOT INSTALL OR USE ANY PART OF THE MINEFIELD BROWSER.\n"
|
||||
"\n"
|
||||
"DURING THE MINEFIELD INSTALLATION PROCESS, AND AT LATER TIMES, YOU MAY BE GIVEN THE OPTION OF INSTALLING ADDITIONAL COMPONENTS FROM THIRD-PARTY SOFTWARE PROVIDERS. THE INSTALLATION AND USE OF THOSE THIRD-PARTY COMPONENTS MAY BE GOVERNED BY ADDITIONAL LICENSE AGREEMENTS.\n"
|
||||
"\n"
|
||||
"1. LICENSE GRANT. The Mozilla Corporation grants you a non-exclusive license to use the executable code version of the Product. This Agreement will also govern any software upgrades provided by Mozilla that replace and/or supplement the original Product, unless such upgrades are accompanied by a separate license, in which case the terms of that license will govern.\n"
|
||||
"\n"
|
||||
"2. TERMINATION. If you breach this Agreement your right to use the Product will terminate immediately and without notice, but all provisions of this Agreement except the License Grant (Paragraph 1) will survive termination and continue in effect. Upon termination, you must destroy all copies of the Product.\n"
|
||||
"\n"
|
||||
"3. PROPRIETARY RIGHTS. Portions of the Product are available in source code form under the terms of the Mozilla Public License and other open source licenses (collectively, ÒOpen Source LicensesÓ) at http://www.mozilla.org/MPL. Nothing in this Agreement will be construed to limit any rights granted under the Open Source Licenses. Subject to the foregoing, Mozilla, for itself and on behalf of its licensors, hereby reserves all intellectual property rights in the Product, except for the rights expressly granted in this Agreement. You may not remove or alter any trademark, logo, copyright or other proprietary notice in or on the Product. This license does not grant you any right to use the trademarks, service marks or logos of Mozilla or its licensors.\n"
|
||||
"\n"
|
||||
"4. PRIVACY POLICY. You agree to the Mozilla Firefox Privacy Policy, made available online at http://www.mozilla.com/legal/privacy/, as that policy may be changed from time to time. When Mozilla changes the policy in a material way a notice will be posted on the website at www.mozilla.com and when any change is made in the privacy policy, the updated policy will be posted at the above link. It is your responsibility to ensure that you understand the terms of the privacy policy, so you should periodically check the current version of the policy for changes.\n"
|
||||
"\n"
|
||||
"5. WEBSITE INFORMATION SERVICES. Mozilla and its contributors, licensors and partners work to provide the most accurate and up-to-date phishing and malware information. However, they cannot guarantee that this information is comprehensive and error-free: some risky sites may not be identified, and some safe sites may be identified in error.\n"
|
||||
"\n"
|
||||
"6. DISCLAIMER OF WARRANTY. THE PRODUCT IS PROVIDED ÒAS ISÓ WITH ALL FAULTS. TO THE EXTENT PERMITTED BY LAW, MOZILLA AND MOZILLAÕS DISTRIBUTORS, AND LICENSORS HEREBY DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES THAT THE PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE AND NON-INFRINGING. YOU BEAR THE ENTIRE RISK AS TO SELECTING THE PRODUCT FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT. THIS LIMITATION WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.\n"
|
||||
"\n"
|
||||
"7. LIMITATION OF LIABILITY. EXCEPT AS REQUIRED BY LAW, MOZILLA AND ITS DISTRIBUTORS, DIRECTORS, LICENSORS, CONTRIBUTORS AND AGENTS (COLLECTIVELY, THE ÒMOZILLA GROUPÓ) WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN ANY WAY RELATING TO THIS AGREEMENT OR THE USE OF OR INABILITY TO USE THE PRODUCT, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOST PROFITS, LOSS OF DATA, AND COMPUTER FAILURE OR MALFUNCTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH SUCH CLAIM IS BASED. THE MOZILLA GROUPÕS COLLECTIVE LIABILITY UNDER THIS AGREEMENT WILL NOT EXCEED THE GREATER OF $500 (FIVE HUNDRED DOLLARS) AND THE FEES PAID BY YOU UNDER THE LICENSE (IF ANY). SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.\n"
|
||||
"\n"
|
||||
"8. EXPORT CONTROLS. This license is subject to all applicable export restrictions. You must comply with all export and import laws and restrictions and regulations of any United States or foreign agency or authority relating to the Product and its use.\n"
|
||||
"\n"
|
||||
"9. U.S. GOVERNMENT END-USERS. This Product is a Òcommercial item,Ó as that term is defined in 48 C.F.R. 2.101, consisting of Òcommercial computer softwareÓ and Òcommercial computer software documentation,Ó as such terms are used in 48 C.F.R. 12.212 (Sept. 1995) and 48 C.F.R. 227.7202 (June 1995). Consistent with 48 C.F.R. 12.212, 48 C.F.R. 27.405(b)(2) (June 1998) and 48 C.F.R. 227.7202, all U.S. Government End Users acquire the Product with only those rights as set forth therein.\n"
|
||||
"\n"
|
||||
"10. MISCELLANEOUS. (a) This Agreement constitutes the entire agreement between Mozilla and you concerning the subject matter hereof, and it may only be modified by a written amendment signed by an authorized executive of Mozilla. (b) Except to the extent applicable law, if any, provides otherwise, this Agreement will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions. (c) This Agreement will not be governed by the United Nations Convention on Contracts for the International Sale of Goods. "
|
||||
"(d) If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the partiesÕ original intent, and the remaining portions will remain in full force and effect. (e) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. (f) Except as required by law, the controlling language of this Agreement is English. "
|
||||
"(g) You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms; the Mozilla Corporation may assign its rights under this Agreement without condition. (h) This Agreement will be binding upon and inure to the benefit of the parties, their successors and permitted assigns."
|
||||
};
|
||||
|
||||
data 'styl' (5000, "English") {
|
||||
// Number of styles following = 2
|
||||
$"0002"
|
||||
|
||||
// Style 1. This is used to display the header lines in bold text.
|
||||
// Start character = 0
|
||||
$"0000 0000"
|
||||
// Height = 16
|
||||
$"0010"
|
||||
// Ascent = 12
|
||||
$"000C"
|
||||
// Font family = 1024 (Lucida Grande)
|
||||
$"0400"
|
||||
// Style bitfield, 0x1=bold 0x2=italic 0x4=underline 0x8=outline
|
||||
// 0x10=shadow 0x20=condensed 0x40=extended
|
||||
$"01"
|
||||
// Style, unused?
|
||||
$"02"
|
||||
// Size = 12 point
|
||||
$"000C"
|
||||
// Color, RGB
|
||||
$"0000 0000 0000"
|
||||
|
||||
// Style 2. This is used to display the body.
|
||||
// Start character = 68
|
||||
$"0000 0044"
|
||||
// Height = 16
|
||||
$"0010"
|
||||
// Ascent = 12
|
||||
$"000C"
|
||||
// Font family = 1024 (Lucida Grande)
|
||||
$"0400"
|
||||
// Style bitfield, 0x1=bold 0x2=italic 0x4=underline 0x8=outline
|
||||
// 0x10=shadow 0x20=condensed 0x40=extended
|
||||
$"00"
|
||||
// Style, unused?
|
||||
$"02"
|
||||
// Size = 12 point
|
||||
$"000C"
|
||||
// Color, RGB
|
||||
$"0000 0000 0000"
|
||||
};
|
После Ширина: | Высота: | Размер: 4.2 KiB |
|
@ -0,0 +1,596 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Mobile Browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Brubeck <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
|
||||
|
||||
// For browser.xml binding
|
||||
//
|
||||
// cacheRatio* is a ratio that determines the amount of pixels to cache. The
|
||||
// ratio is multiplied by the viewport width or height to get the displayport's
|
||||
// width or height, respectively.
|
||||
//
|
||||
// (divide integer value by 1000 to get the ratio)
|
||||
//
|
||||
// For instance: cachePercentageWidth is 1500
|
||||
// viewport height is 500
|
||||
// => display port height will be 500 * 1.5 = 750
|
||||
//
|
||||
pref("toolkit.browser.cacheRatioWidth", 2000);
|
||||
pref("toolkit.browser.cacheRatioHeight", 3000);
|
||||
|
||||
// How long before a content view (a handle to a remote scrollable object)
|
||||
// expires.
|
||||
pref("toolkit.browser.contentViewExpire", 3000);
|
||||
|
||||
pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul");
|
||||
pref("general.useragent.compatMode.firefox", true);
|
||||
pref("browser.chromeURL", "chrome://browser/content/");
|
||||
|
||||
pref("browser.tabs.warnOnClose", true);
|
||||
#ifdef MOZ_IPC
|
||||
pref("browser.tabs.remote", true);
|
||||
#else
|
||||
pref("browser.tabs.remote", false);
|
||||
#endif
|
||||
|
||||
pref("toolkit.screen.lock", false);
|
||||
|
||||
// From libpref/src/init/all.js, extended to allow a slightly wider zoom range.
|
||||
pref("zoom.minPercent", 20);
|
||||
pref("zoom.maxPercent", 400);
|
||||
pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4");
|
||||
|
||||
// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
|
||||
pref("browser.viewport.scaleRatio", -1);
|
||||
|
||||
/* use custom widget for html:select */
|
||||
pref("ui.use_native_popup_windows", true);
|
||||
|
||||
/* allow scrollbars to float above chrome ui */
|
||||
pref("ui.scrollbarsCanOverlapContent", 1);
|
||||
|
||||
/* use long press to display a context menu */
|
||||
pref("ui.click_hold_context_menus", true);
|
||||
|
||||
/* cache prefs */
|
||||
pref("browser.cache.disk.enable", false);
|
||||
pref("browser.cache.disk.capacity", 0); // kilobytes
|
||||
pref("browser.cache.disk.smart_size.enabled", false);
|
||||
pref("browser.cache.disk.smart_size.first_run", false);
|
||||
|
||||
pref("browser.cache.memory.enable", true);
|
||||
pref("browser.cache.memory.capacity", 1024); // kilobytes
|
||||
|
||||
/* image cache prefs */
|
||||
pref("image.cache.size", 1048576); // bytes
|
||||
|
||||
/* offline cache prefs */
|
||||
pref("browser.offline-apps.notify", true);
|
||||
pref("browser.cache.offline.enable", true);
|
||||
pref("browser.cache.offline.capacity", 5120); // kilobytes
|
||||
pref("offline-apps.quota.max", 2048); // kilobytes
|
||||
pref("offline-apps.quota.warn", 1024); // kilobytes
|
||||
|
||||
/* protocol warning prefs */
|
||||
pref("network.protocol-handler.warn-external.tel", false);
|
||||
pref("network.protocol-handler.warn-external.mailto", false);
|
||||
pref("network.protocol-handler.warn-external.vnd.youtube", false);
|
||||
|
||||
/* http prefs */
|
||||
pref("network.http.pipelining", true);
|
||||
pref("network.http.pipelining.ssl", true);
|
||||
pref("network.http.proxy.pipelining", true);
|
||||
pref("network.http.pipelining.maxrequests" , 6);
|
||||
pref("network.http.keep-alive.timeout", 600);
|
||||
pref("network.http.max-connections", 6);
|
||||
pref("network.http.max-connections-per-server", 4);
|
||||
pref("network.http.max-persistent-connections-per-server", 4);
|
||||
pref("network.http.max-persistent-connections-per-proxy", 4);
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
pref("network.autodial-helper.enabled", true);
|
||||
#endif
|
||||
|
||||
// See bug 545869 for details on why these are set the way they are
|
||||
pref("network.buffer.cache.count", 24);
|
||||
pref("network.buffer.cache.size", 16384);
|
||||
|
||||
/* history max results display */
|
||||
pref("browser.display.history.maxresults", 100);
|
||||
|
||||
/* How many times should have passed before the remote tabs list is refreshed */
|
||||
pref("browser.display.remotetabs.timeout", 10);
|
||||
|
||||
/* session history */
|
||||
pref("browser.sessionhistory.max_total_viewers", 1);
|
||||
pref("browser.sessionhistory.max_entries", 50);
|
||||
pref("browser.sessionhistory.optimize_eviction", true);
|
||||
|
||||
/* session store */
|
||||
pref("browser.sessionstore.resume_session_once", false);
|
||||
pref("browser.sessionstore.resume_from_crash", true);
|
||||
pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
|
||||
pref("browser.sessionstore.interval", 10000); // milliseconds
|
||||
pref("browser.sessionstore.max_tabs_undo", 5);
|
||||
|
||||
/* these should help performance */
|
||||
pref("mozilla.widget.force-24bpp", true);
|
||||
pref("mozilla.widget.use-buffer-pixmap", true);
|
||||
pref("mozilla.widget.disable-native-theme", true);
|
||||
|
||||
/* download manager (don't show the window or alert) */
|
||||
pref("browser.download.useDownloadDir", true);
|
||||
pref("browser.download.folderList", 1); // Default to ~/Downloads
|
||||
pref("browser.download.manager.showAlertOnComplete", false);
|
||||
pref("browser.download.manager.showAlertInterval", 2000);
|
||||
pref("browser.download.manager.retention", 2);
|
||||
pref("browser.download.manager.showWhenStarting", false);
|
||||
pref("browser.download.manager.closeWhenDone", true);
|
||||
pref("browser.download.manager.openDelay", 0);
|
||||
pref("browser.download.manager.focusWhenStarting", false);
|
||||
pref("browser.download.manager.flashCount", 2);
|
||||
pref("browser.download.manager.displayedHistoryDays", 7);
|
||||
|
||||
/* download alerts (disabled above) */
|
||||
pref("alerts.slideIncrement", 1);
|
||||
pref("alerts.slideIncrementTime", 10);
|
||||
pref("alerts.totalOpenTime", 6000);
|
||||
pref("alerts.height", 50);
|
||||
|
||||
/* password manager */
|
||||
pref("signon.rememberSignons", true);
|
||||
pref("signon.expireMasterPassword", false);
|
||||
pref("signon.SignonFileName", "signons.txt");
|
||||
|
||||
/* form helper */
|
||||
pref("formhelper.enabled", true);
|
||||
pref("formhelper.autozoom", true);
|
||||
pref("formhelper.autozoom.caret", true);
|
||||
pref("formhelper.restore", false);
|
||||
|
||||
/* find helper */
|
||||
pref("findhelper.autozoom", true);
|
||||
|
||||
/* autocomplete */
|
||||
pref("browser.formfill.enable", true);
|
||||
|
||||
/* microsummaries */
|
||||
pref("browser.microsummary.enabled", false);
|
||||
pref("browser.microsummary.updateGenerators", false);
|
||||
|
||||
/* spellcheck */
|
||||
pref("layout.spellcheckDefault", 0);
|
||||
|
||||
/* extension manager and xpinstall */
|
||||
pref("xpinstall.whitelist.add", "addons.mozilla.org");
|
||||
|
||||
pref("extensions.autoupdate.enabled", true);
|
||||
pref("extensions.autoupdate.interval", 86400);
|
||||
pref("extensions.update.enabled", false);
|
||||
pref("extensions.update.interval", 86400);
|
||||
pref("extensions.dss.enabled", false);
|
||||
pref("extensions.dss.switchPending", false);
|
||||
pref("extensions.ignoreMTimeChanges", false);
|
||||
pref("extensions.logging.enabled", false);
|
||||
pref("extensions.hideInstallButton", true);
|
||||
pref("extensions.showMismatchUI", false);
|
||||
pref("extensions.hideUpdateButton", false);
|
||||
|
||||
pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%");
|
||||
|
||||
/* preferences for the Get Add-ons pane */
|
||||
pref("extensions.getAddons.cache.enabled", true);
|
||||
pref("extensions.getAddons.maxResults", 15);
|
||||
pref("extensions.getAddons.recommended.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/recommended/");
|
||||
pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/list/featured/all/%MAX_RESULTS%/%OS%/%VERSION%");
|
||||
pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/search?q=%TERMS%");
|
||||
pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%");
|
||||
pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/mobile/");
|
||||
pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/guid:%IDS%?src=mobile&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
|
||||
|
||||
/* blocklist preferences */
|
||||
pref("extensions.blocklist.enabled", true);
|
||||
pref("extensions.blocklist.interval", 86400);
|
||||
pref("extensions.blocklist.url", "https://addons.mozilla.org/blocklist/3/%APP_ID%/%APP_VERSION%/%PRODUCT%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PING_COUNT%/%TOTAL_PING_COUNT%/%DAYS_SINCE_LAST_PING%/");
|
||||
pref("extensions.blocklist.detailsURL", "https://www.mozilla.com/%LOCALE%/blocklist/");
|
||||
|
||||
/* block popups by default, and notify the user about blocked popups */
|
||||
pref("dom.disable_open_during_load", true);
|
||||
pref("privacy.popups.showBrowserMessage", true);
|
||||
|
||||
pref("keyword.enabled", true);
|
||||
pref("keyword.URL", "http://www.google.com/m?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=");
|
||||
|
||||
pref("accessibility.typeaheadfind", false);
|
||||
pref("accessibility.typeaheadfind.timeout", 5000);
|
||||
pref("accessibility.typeaheadfind.flashBar", 1);
|
||||
pref("accessibility.typeaheadfind.linksonly", false);
|
||||
pref("accessibility.typeaheadfind.casesensitive", 0);
|
||||
// zoom key(F7) conflicts with caret browsing on maemo
|
||||
pref("accessibility.browsewithcaret_shortcut.enabled", false);
|
||||
|
||||
// Whether or not we show a dialog box informing the user that the update was
|
||||
// successfully applied.
|
||||
pref("app.update.showInstalledUI", false);
|
||||
|
||||
// Whether the character encoding menu is under the main Firefox button. This
|
||||
// preference is a string so that localizers can alter it.
|
||||
pref("browser.menu.showCharacterEncoding", "chrome://browser/locale/browser.properties");
|
||||
pref("intl.charsetmenu.browser.static", "chrome://browser/locale/browser.properties");
|
||||
|
||||
// pointer to the default engine name
|
||||
pref("browser.search.defaultenginename", "chrome://browser/locale/region.properties");
|
||||
// SSL error page behaviour
|
||||
pref("browser.ssl_override_behavior", 2);
|
||||
pref("browser.xul.error_pages.expert_bad_cert", false);
|
||||
|
||||
// disable logging for the search service by default
|
||||
pref("browser.search.log", false);
|
||||
|
||||
// ordering of search engines in the engine list.
|
||||
pref("browser.search.order.1", "chrome://browser/locale/region.properties");
|
||||
pref("browser.search.order.2", "chrome://browser/locale/region.properties");
|
||||
|
||||
// disable updating
|
||||
pref("browser.search.update", false);
|
||||
pref("browser.search.update.log", false);
|
||||
pref("browser.search.updateinterval", 6);
|
||||
|
||||
// enable search suggestions by default
|
||||
pref("browser.search.suggest.enabled", true);
|
||||
|
||||
// Tell the search service to load search plugins from the locale JAR
|
||||
pref("browser.search.loadFromJars", true);
|
||||
pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/");
|
||||
|
||||
// tell the search service that we don't really expose the "current engine"
|
||||
pref("browser.search.noCurrentEngine", true);
|
||||
|
||||
// enable xul error pages
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
|
||||
// Specify emptyRestriction = 0 so that bookmarks appear in the list by default
|
||||
pref("browser.urlbar.default.behavior", 0);
|
||||
pref("browser.urlbar.default.behavior.emptyRestriction", 0);
|
||||
|
||||
// Let the faviconservice know that we display favicons as 32x32px so that it
|
||||
// uses the right size when optimizing favicons
|
||||
pref("places.favicons.optimizeToDimension", 32);
|
||||
|
||||
// various and sundry awesomebar prefs (should remove/re-evaluate
|
||||
// these once bug 447900 is fixed)
|
||||
pref("browser.urlbar.clickSelectsAll", true);
|
||||
pref("browser.urlbar.doubleClickSelectsAll", true);
|
||||
pref("browser.urlbar.autoFill", false);
|
||||
pref("browser.urlbar.matchOnlyTyped", false);
|
||||
pref("browser.urlbar.matchBehavior", 1);
|
||||
pref("browser.urlbar.filter.javascript", true);
|
||||
pref("browser.urlbar.maxRichResults", 24); // increased so we see more results when portrait
|
||||
pref("browser.urlbar.search.chunkSize", 1000);
|
||||
pref("browser.urlbar.search.timeout", 100);
|
||||
pref("browser.urlbar.restrict.history", "^");
|
||||
pref("browser.urlbar.restrict.bookmark", "*");
|
||||
pref("browser.urlbar.restrict.tag", "+");
|
||||
pref("browser.urlbar.match.title", "#");
|
||||
pref("browser.urlbar.match.url", "@");
|
||||
pref("browser.urlbar.autocomplete.search_threshold", 5);
|
||||
pref("browser.history.grouping", "day");
|
||||
pref("browser.history.showSessions", false);
|
||||
pref("browser.sessionhistory.max_entries", 50);
|
||||
pref("browser.history_expire_days", 180);
|
||||
pref("browser.history_expire_days_min", 90);
|
||||
pref("browser.history_expire_sites", 40000);
|
||||
pref("browser.places.migratePostDataAnnotations", true);
|
||||
pref("browser.places.updateRecentTagsUri", true);
|
||||
pref("places.frecency.numVisits", 10);
|
||||
pref("places.frecency.numCalcOnIdle", 50);
|
||||
pref("places.frecency.numCalcOnMigrate", 50);
|
||||
pref("places.frecency.updateIdleTime", 60000);
|
||||
pref("places.frecency.firstBucketCutoff", 4);
|
||||
pref("places.frecency.secondBucketCutoff", 14);
|
||||
pref("places.frecency.thirdBucketCutoff", 31);
|
||||
pref("places.frecency.fourthBucketCutoff", 90);
|
||||
pref("places.frecency.firstBucketWeight", 100);
|
||||
pref("places.frecency.secondBucketWeight", 70);
|
||||
pref("places.frecency.thirdBucketWeight", 50);
|
||||
pref("places.frecency.fourthBucketWeight", 30);
|
||||
pref("places.frecency.defaultBucketWeight", 10);
|
||||
pref("places.frecency.embedVisitBonus", 0);
|
||||
pref("places.frecency.linkVisitBonus", 100);
|
||||
pref("places.frecency.typedVisitBonus", 2000);
|
||||
pref("places.frecency.bookmarkVisitBonus", 150);
|
||||
pref("places.frecency.downloadVisitBonus", 0);
|
||||
pref("places.frecency.permRedirectVisitBonus", 0);
|
||||
pref("places.frecency.tempRedirectVisitBonus", 0);
|
||||
pref("places.frecency.defaultVisitBonus", 0);
|
||||
pref("places.frecency.unvisitedBookmarkBonus", 140);
|
||||
pref("places.frecency.unvisitedTypedBonus", 200);
|
||||
|
||||
// disable color management
|
||||
pref("gfx.color_management.mode", 0);
|
||||
|
||||
// don't allow JS to move and resize existing windows
|
||||
pref("dom.disable_window_move_resize", true);
|
||||
|
||||
// prevent click image resizing for nsImageDocument
|
||||
pref("browser.enable_click_image_resizing", false);
|
||||
|
||||
// open in tab preferences
|
||||
// 0=default window, 1=current window/tab, 2=new window, 3=new tab in most window
|
||||
pref("browser.link.open_external", 3);
|
||||
pref("browser.link.open_newwindow", 3);
|
||||
// 0=force all new windows to tabs, 1=don't force, 2=only force those with no features set
|
||||
pref("browser.link.open_newwindow.restriction", 0);
|
||||
|
||||
// controls which bits of private data to clear. by default we clear them all.
|
||||
pref("privacy.item.cache", true);
|
||||
pref("privacy.item.cookies", true);
|
||||
pref("privacy.item.offlineApps", true);
|
||||
pref("privacy.item.history", true);
|
||||
pref("privacy.item.formdata", true);
|
||||
pref("privacy.item.downloads", true);
|
||||
pref("privacy.item.passwords", true);
|
||||
pref("privacy.item.sessions", true);
|
||||
pref("privacy.item.geolocation", true);
|
||||
pref("privacy.item.siteSettings", true);
|
||||
pref("privacy.item.syncAccount", true);
|
||||
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
pref("plugins.force.wmode", "opaque");
|
||||
#endif
|
||||
|
||||
// URL to the Learn More link XXX this is the firefox one. Bug 495578 fixes this.
|
||||
pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
|
||||
|
||||
// base url for the wifi geolocation network provider
|
||||
pref("geo.wifi.uri", "https://www.google.com/loc/json");
|
||||
|
||||
// enable geo
|
||||
pref("geo.enabled", true);
|
||||
|
||||
// content sink control -- controls responsiveness during page load
|
||||
// see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
|
||||
pref("content.sink.enable_perf_mode", 2); // 0 - switch, 1 - interactive, 2 - perf
|
||||
pref("content.sink.pending_event_mode", 0);
|
||||
pref("content.sink.perf_deflect_count", 1000000);
|
||||
pref("content.sink.perf_parse_time", 50000000);
|
||||
|
||||
pref("javascript.options.mem.gc_frequency", 300);
|
||||
pref("javascript.options.mem.high_water_mark", 32);
|
||||
pref("javascript.options.methodjit.chrome", false);
|
||||
|
||||
pref("dom.max_chrome_script_run_time", 0); // disable slow script dialog for chrome
|
||||
pref("dom.max_script_run_time", 20);
|
||||
|
||||
// JS error console
|
||||
pref("devtools.errorconsole.enabled", false);
|
||||
|
||||
// kinetic tweakables
|
||||
pref("browser.ui.kinetic.updateInterval", 30);
|
||||
pref("browser.ui.kinetic.decelerationRate", 20);
|
||||
pref("browser.ui.kinetic.speedSensitivity", 80);
|
||||
pref("browser.ui.kinetic.swipeLength", 160);
|
||||
|
||||
// zooming
|
||||
pref("browser.ui.zoom.pageFitGranularity", 9); // don't zoom to fit by less than 1/9 (11%)
|
||||
pref("browser.ui.zoom.animationDuration", 200); // ms duration of double-tap zoom animation
|
||||
pref("browser.ui.zoom.reflow", false); // Change text wrapping on double-tap
|
||||
pref("browser.ui.zoom.reflow.fontSize", 720);
|
||||
|
||||
// pinch gesture
|
||||
pref("browser.ui.pinch.maxGrowth", 150); // max pinch distance growth
|
||||
pref("browser.ui.pinch.maxShrink", 200); // max pinch distance shrinkage
|
||||
pref("browser.ui.pinch.scalingFactor", 500); // scaling factor for above pinch limits
|
||||
|
||||
// Touch radius (area around the touch location to look for target elements),
|
||||
// in 1/240-inch pixels:
|
||||
pref("browser.ui.touch.left", 8);
|
||||
pref("browser.ui.touch.right", 8);
|
||||
pref("browser.ui.touch.top", 12);
|
||||
pref("browser.ui.touch.bottom", 4);
|
||||
pref("browser.ui.touch.weight.visited", 120); // percentage
|
||||
|
||||
// plugins
|
||||
#if MOZ_PLATFORM_MAEMO == 6
|
||||
pref("plugin.disable", false);
|
||||
#else
|
||||
pref("plugin.disable", true);
|
||||
#endif
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
|
||||
// process priority
|
||||
// higher values give content process less CPU time
|
||||
#if MOZ_PLATFORM_MAEMO
|
||||
pref("dom.ipc.content.nice", 10);
|
||||
#else
|
||||
pref("dom.ipc.content.nice", 1);
|
||||
#endif
|
||||
|
||||
// product URLs
|
||||
// The breakpad report server to link to in about:crashes
|
||||
pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/");
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/mobile/%VERSION%/releasenotes/");
|
||||
pref("app.sync.tutorialURL", "https://support.mozilla.com/kb/sync-firefox-between-desktop-and-mobile");
|
||||
pref("app.support.baseURL", "http://support.mozilla.com/mobile");
|
||||
pref("app.feedbackURL", "http://input.mozilla.com/feedback/");
|
||||
pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html");
|
||||
pref("app.creditsURL", "http://www.mozilla.org/credits/");
|
||||
#if MOZ_UPDATE_CHANNEL == beta
|
||||
pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/features/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/");
|
||||
#else
|
||||
pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/features/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
|
||||
#endif
|
||||
|
||||
pref("app.promo.spark.baseURL", "http://spark.mozilla.org");
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("app.promo.spark.endDate", "2011-05-01");
|
||||
#else
|
||||
pref("app.promo.spark.endDate", "2011-01-01");
|
||||
#endif
|
||||
|
||||
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
|
||||
pref("security.alternate_certificate_error_page", "certerror");
|
||||
|
||||
pref("security.warn_viewing_mixed", false); // Warning is disabled. See Bug 616712.
|
||||
|
||||
// Override some named colors to avoid inverse OS themes
|
||||
pref("ui.-moz-dialog", "#efebe7");
|
||||
pref("ui.-moz-dialogtext", "#101010");
|
||||
pref("ui.-moz-field", "#fff");
|
||||
pref("ui.-moz-fieldtext", "#1a1a1a");
|
||||
pref("ui.-moz-buttonhoverface", "#f3f0ed");
|
||||
pref("ui.-moz-buttonhovertext", "#101010");
|
||||
pref("ui.-moz-combobox", "#fff");
|
||||
pref("ui.-moz-comboboxtext", "#101010");
|
||||
pref("ui.buttonface", "#ece7e2");
|
||||
pref("ui.buttonhighlight", "#fff");
|
||||
pref("ui.buttonshadow", "#aea194");
|
||||
pref("ui.buttontext", "#101010");
|
||||
pref("ui.captiontext", "#101010");
|
||||
pref("ui.graytext", "#b1a598");
|
||||
pref("ui.highlight", "#fad184");
|
||||
pref("ui.highlighttext", "#1a1a1a");
|
||||
pref("ui.infobackground", "#f5f5b5");
|
||||
pref("ui.infotext", "#000");
|
||||
pref("ui.menu", "#f7f5f3");
|
||||
pref("ui.menutext", "#101010");
|
||||
pref("ui.threeddarkshadow", "#000");
|
||||
pref("ui.threedface", "#ece7e2");
|
||||
pref("ui.threedhighlight", "#fff");
|
||||
pref("ui.threedlightshadow", "#ece7e2");
|
||||
pref("ui.threedshadow", "#aea194");
|
||||
pref("ui.window", "#efebe7");
|
||||
pref("ui.windowtext", "#101010");
|
||||
pref("ui.windowframe", "#efebe7");
|
||||
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("browser.search.param.yahoo-fr", "moz35");
|
||||
pref("browser.search.param.yahoo-fr-cjkt", "moz35");
|
||||
pref("browser.search.param.yahoo-fr-ja", "mozff");
|
||||
#endif
|
||||
|
||||
/* app update prefs */
|
||||
pref("app.update.timer", 60000); // milliseconds (1 min)
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
pref("app.update.enabled", true);
|
||||
pref("app.update.timerFirstInterval", 20000); // milliseconds
|
||||
pref("app.update.auto", false);
|
||||
pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
|
||||
pref("app.update.mode", 1);
|
||||
pref("app.update.silent", false);
|
||||
pref("app.update.url", "https://aus2.mozilla.org/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PLATFORM_VERSION%/update.xml");
|
||||
pref("app.update.nagTimer.restart", 86400);
|
||||
pref("app.update.promptWaitTime", 43200);
|
||||
pref("app.update.idletime", 60);
|
||||
pref("app.update.showInstalledUI", false);
|
||||
pref("app.update.incompatible.mode", 0);
|
||||
pref("app.update.download.backgroundInterval", 0);
|
||||
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("app.update.interval", 86400);
|
||||
pref("app.update.url.manual", "http://www.mozilla.com/%LOCALE%/m/");
|
||||
pref("app.update.url.details", "http://www.mozilla.com/%LOCALE%/mobile/releases/");
|
||||
#else
|
||||
pref("app.update.interval", 28800);
|
||||
pref("app.update.url.manual", "http://www.mozilla.com/%LOCALE%/mobile/");
|
||||
pref("app.update.url.details", "http://www.mozilla.com/%LOCALE%/mobile/");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// replace newlines with spaces on paste into single-line text boxes
|
||||
pref("editor.singleLine.pasteNewlines", 2);
|
||||
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
// update fonts for better readability
|
||||
pref("font.default.x-baltic", "SwissA");
|
||||
pref("font.default.x-central-euro", "SwissA");
|
||||
pref("font.default.x-cyrillic", "SwissA");
|
||||
pref("font.default.x-unicode", "SwissA");
|
||||
pref("font.default.x-user-def", "SwissA");
|
||||
pref("font.default.x-western", "SwissA");
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
pref("browser.sync.enabled", true);
|
||||
|
||||
// sync service
|
||||
pref("services.sync.client.type", "mobile");
|
||||
pref("services.sync.registerEngines", "Tab,Bookmarks,Form,History,Password,Prefs");
|
||||
pref("services.sync.autoconnectDelay", 5);
|
||||
|
||||
// prefs to sync by default
|
||||
pref("services.sync.prefs.sync.browser.startup.homepage.title", true);
|
||||
pref("services.sync.prefs.sync.browser.startup.homepage", true);
|
||||
pref("services.sync.prefs.sync.browser.tabs.warnOnClose", true);
|
||||
pref("services.sync.prefs.sync.browser.ui.zoom.reflow", true);
|
||||
pref("services.sync.prefs.sync.devtools.errorconsole.enabled", true);
|
||||
pref("services.sync.prefs.sync.javascript.enabled", true);
|
||||
pref("services.sync.prefs.sync.lightweightThemes.isThemeSelected", true);
|
||||
pref("services.sync.prefs.sync.lightweightThemes.usedThemes", true);
|
||||
pref("services.sync.prefs.sync.network.cookie.cookieBehavior", true);
|
||||
pref("services.sync.prefs.sync.permissions.default.image", true);
|
||||
pref("services.sync.prefs.sync.signon.rememberSignons", true);
|
||||
#endif
|
||||
|
||||
// threshold where a tap becomes a drag, in 1/240" reference pixels
|
||||
// The names of the preferences are to be in sync with nsEventStateManager.cpp
|
||||
pref("ui.dragThresholdX", 25);
|
||||
pref("ui.dragThresholdY", 25);
|
||||
|
||||
#if MOZ_PLATFORM_MAEMO == 6
|
||||
pref("layers.acceleration.disabled", false);
|
||||
#else
|
||||
pref("layers.acceleration.disabled", true);
|
||||
#endif
|
||||
|
||||
pref("notification.feature.enabled", true);
|
||||
|
||||
// prevent tooltips from showing up
|
||||
pref("browser.chrome.toolbar_tips", false);
|
||||
pref("indexedDB.feature.enabled", false);
|
||||
|
||||
// prevent video elements from preloading too much data
|
||||
pref("media.preload.default", 1); // default to preload none
|
||||
pref("media.preload.auto", 2); // preload metadata if preload=auto
|
||||
|
||||
// optimize images memory usage
|
||||
pref("image.mem.decodeondraw", true);
|
||||
pref("content.image.allow_locking", false);
|
||||
pref("image.mem.min_discard_timeout_ms", 20000);
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <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 "nsXULAppAPI.h"
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prprf.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsStringGlue.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
// we want to use the DLL blocklist if possible
|
||||
#define XRE_WANT_DLL_BLOCKLIST
|
||||
// we want a wmain entry point
|
||||
#include "nsWindowsWMain.cpp"
|
||||
#endif
|
||||
|
||||
static void Output(const char *fmt, ... )
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
#if defined(XP_WIN) && !MOZ_WINCONSOLE
|
||||
PRUnichar msg[2048];
|
||||
_vsnwprintf(msg, sizeof(msg)/sizeof(msg[0]), NS_ConvertUTF8toUTF16(fmt).get(), ap);
|
||||
MessageBoxW(NULL, msg, L"XULRunner", MB_OK | MB_ICONERROR);
|
||||
#else
|
||||
vfprintf(stderr, fmt, ap);
|
||||
#endif
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if |arg| matches the given argument name.
|
||||
*/
|
||||
static PRBool IsArg(const char* arg, const char* s)
|
||||
{
|
||||
if (*arg == '-')
|
||||
{
|
||||
if (*++arg == '-')
|
||||
++arg;
|
||||
return !PL_strcasecmp(arg, s);
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
if (*arg == '/')
|
||||
return !PL_strcasecmp(++arg, s);
|
||||
#endif
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
class ScopedLogging
|
||||
{
|
||||
public:
|
||||
ScopedLogging() { NS_LogInit(); }
|
||||
~ScopedLogging() { NS_LogTerm(); }
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
ScopedLogging log;
|
||||
|
||||
nsCOMPtr<nsILocalFile> appini;
|
||||
nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't calculate the application directory.");
|
||||
return 255;
|
||||
}
|
||||
appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
|
||||
|
||||
// Allow firefox.exe to launch XULRunner apps via -app <application.ini>
|
||||
// Note that -app must be the *first* argument.
|
||||
char *appEnv = nsnull;
|
||||
const char *appDataFile = PR_GetEnv("XUL_APP_FILE");
|
||||
if (appDataFile && *appDataFile) {
|
||||
rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Invalid path found: '%s'", appDataFile);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
else if (argc > 1 && IsArg(argv[1], "app")) {
|
||||
if (argc == 2) {
|
||||
Output("Incorrect number of arguments passed to -app");
|
||||
return 255;
|
||||
}
|
||||
|
||||
rv = XRE_GetFileFromPath(argv[2], getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("application.ini path not recognized: '%s'", argv[2]);
|
||||
return 255;
|
||||
}
|
||||
|
||||
appEnv = PR_smprintf("XUL_APP_FILE=%s", argv[2]);
|
||||
PR_SetEnv(appEnv);
|
||||
argv[2] = argv[0];
|
||||
argv += 2;
|
||||
argc -= 2;
|
||||
}
|
||||
|
||||
nsXREAppData *appData;
|
||||
rv = XRE_CreateAppData(appini, &appData);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't read application.ini");
|
||||
return 255;
|
||||
}
|
||||
|
||||
int result = XRE_main(argc, argv, appData);
|
||||
XRE_FreeAppData(appData);
|
||||
if (appEnv)
|
||||
PR_smprintf_free(appEnv);
|
||||
return result;
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2010
|
||||
# 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
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq (beta,$(MOZ_UPDATE_CHANNEL))
|
||||
EXTENSIONS = \
|
||||
feedback@mobile.mozilla.org \
|
||||
$(NULL)
|
||||
|
||||
ABS_DIST = $(call core_abspath,$(DIST))
|
||||
|
||||
define _PACKAGE_EXTENSIONS
|
||||
rm -f $(ABS_DIST)/bin/extensions/$(dir).xpi
|
||||
mkdir -p $(ABS_DIST)/bin/extensions
|
||||
cd $(srcdir)/$(dir)/; $(ZIP) -r9 $(ABS_DIST)/bin/extensions/$(dir).xpi *
|
||||
|
||||
endef # do not remove the blank line!
|
||||
|
||||
libs::
|
||||
$(foreach dir,$(EXTENSIONS),$(_PACKAGE_EXTENSIONS))
|
||||
|
||||
endif
|
|
@ -0,0 +1,5 @@
|
|||
content feedback content/
|
||||
skin feedback classic/1.0 skin/
|
||||
locale feedback en-US locale/en-US/
|
||||
|
||||
overlay chrome://browser/content/browser.xul chrome://feedback/content/overlay.xul
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
function populateFeedback(aMessage) {
|
||||
let json = aMessage.json;
|
||||
|
||||
let referrer = json.referrer;
|
||||
let URLElem = content.document.getElementById("id_url");
|
||||
if (URLElem)
|
||||
URLElem.value = referrer;
|
||||
|
||||
let URLElems = content.document.getElementsByClassName("url");
|
||||
for (let index=0; index<URLElems.length; index++)
|
||||
URLElems[index].value = referrer;
|
||||
|
||||
let device = json.device || "";
|
||||
let deviceElem = content.document.getElementById("id_device");
|
||||
if (deviceElem)
|
||||
deviceElem.value = device;
|
||||
|
||||
let deviceElems = content.document.getElementsByClassName("device");
|
||||
for (let index=0; index<deviceElems.length; index++)
|
||||
deviceElems[index].value = device;
|
||||
|
||||
let manufacturer = json.manufacturer || "";
|
||||
let manufacturerElem = content.document.getElementById("id_manufacturer");
|
||||
if (manufacturerElem)
|
||||
manufacturerElem.value = manufacturer;
|
||||
|
||||
let manufacturerElems = content.document.getElementsByClassName("manufacturer");
|
||||
for (let index=0; index<manufacturerElems.length; index++)
|
||||
manufacturerElems[index].value = manufacturer;
|
||||
}
|
||||
|
||||
addMessageListener("Feedback:InitPage", populateFeedback);
|
|
@ -0,0 +1,137 @@
|
|||
/* ***** 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 Feedback.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mark Finkle <mark.finkle@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 ***** */
|
||||
|
||||
var Feedback = {
|
||||
_prefs: [],
|
||||
_device: "",
|
||||
_manufacturer: "",
|
||||
|
||||
init: function(aEvent) {
|
||||
// Delay the widget initialization during startup.
|
||||
window.addEventListener("UIReadyDelayed", function(aEvent) {
|
||||
let appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
|
||||
document.getElementById("feedback-about").setAttribute("desc", appInfo.version);
|
||||
|
||||
// A simple frame script to fill in the referrer page and device info
|
||||
messageManager.loadFrameScript("chrome://feedback/content/content.js", true);
|
||||
|
||||
window.removeEventListener(aEvent.type, arguments.callee, false);
|
||||
document.getElementById("feedback-container").hidden = false;
|
||||
|
||||
let feedbackPrefs = document.getElementById("feedback-tools").childNodes;
|
||||
for (let i = 0; i < feedbackPrefs.length; i++) {
|
||||
let pref = feedbackPrefs[i].getAttribute("pref");
|
||||
if (!pref)
|
||||
continue;
|
||||
|
||||
let value = Services.prefs.getPrefType(pref) == Ci.nsIPrefBranch.PREF_INVALID ? false : Services.prefs.getBoolPref(pref);
|
||||
Feedback._prefs.push({ "name": pref, "value": value });
|
||||
}
|
||||
|
||||
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
|
||||
Feedback._device = sysInfo.get("device");
|
||||
Feedback._manufacturer = sysInfo.get("manufacturer");
|
||||
}, false);
|
||||
},
|
||||
|
||||
openFeedback: function(aName) {
|
||||
let pref = "extensions.feedback.url." + aName;
|
||||
let url = Services.prefs.getPrefType(pref) == Ci.nsIPrefBranch.PREF_INVALID ? "" : Services.prefs.getCharPref(pref);
|
||||
if (!url)
|
||||
return;
|
||||
|
||||
let currentURL = Browser.selectedBrowser.currentURI.spec;
|
||||
let newTab = BrowserUI.newTab(url, Browser.selectedTab);
|
||||
|
||||
// Tell the feedback page to fill in the referrer URL
|
||||
newTab.browser.messageManager.addMessageListener("DOMContentLoaded", function() {
|
||||
newTab.browser.messageManager.removeMessageListener("DOMContentLoaded", arguments.callee, true);
|
||||
newTab.browser.messageManager.sendAsyncMessage("Feedback:InitPage", { referrer: currentURL, device: Feedback._device, manufacturer: Feedback._manufacturer });
|
||||
});
|
||||
},
|
||||
|
||||
openReadme: function() {
|
||||
let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
|
||||
let url = formatter.formatURLPref("app.releaseNotesURL");
|
||||
BrowserUI.newTab(url, Browser.selectedTab);
|
||||
},
|
||||
|
||||
updateRestart: function updateRestart() {
|
||||
let msg = document.getElementById("feedback-messages");
|
||||
if (msg) {
|
||||
let value = "restart-app";
|
||||
let notification = msg.getNotificationWithValue(value);
|
||||
if (notification) {
|
||||
// Check if the prefs are back to the initial state dismiss the restart
|
||||
// notification because if does not make sense anymore
|
||||
for each (let pref in this._prefs) {
|
||||
let value = Services.prefs.getPrefType(pref.name) == Ci.nsIPrefBranch.PREF_INVALID ? false : Services.prefs.getBoolPref(pref.name);
|
||||
if (value != pref.value)
|
||||
return;
|
||||
}
|
||||
|
||||
notification.close();
|
||||
return;
|
||||
}
|
||||
|
||||
let restartCallback = function(aNotification, aDescription) {
|
||||
// Notify all windows that an application quit has been requested
|
||||
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
|
||||
Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
|
||||
|
||||
// If nothing aborted, quit the app
|
||||
if (cancelQuit.data == false) {
|
||||
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
|
||||
appStartup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
|
||||
}
|
||||
};
|
||||
|
||||
let strings = Strings.browser;
|
||||
|
||||
let buttons = [ {
|
||||
label: strings.GetStringFromName("notificationRestart.button"),
|
||||
accessKey: "",
|
||||
callback: restartCallback
|
||||
} ];
|
||||
|
||||
let message = strings.GetStringFromName("notificationRestart.normal");
|
||||
msg.appendNotification(message, value, "", msg.PRIORITY_WARNING_LOW, buttons);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("load", Feedback.init, false);
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- ***** 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 Feedback.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Mozilla Corporation.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2010
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Mark Finkle <mark.finkle@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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://feedback/skin/overlay.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % feedbackDTD SYSTEM "chrome://browser/locale/feedback.dtd">
|
||||
%feedbackDTD;
|
||||
]>
|
||||
|
||||
<overlay id="feedback-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript" src="chrome://feedback/content/overlay.js"/>
|
||||
|
||||
<box id="panel-controls">
|
||||
<toolbarbutton id="tool-feedback" class="panel-row-button" autocheck="true" type="radio" group="1" linkedpanel="feedback-container" insertafter="tool-addons"/>
|
||||
</box>
|
||||
|
||||
<deck id="panel-items">
|
||||
<vbox id="feedback-container" flex="1" hidden="true">
|
||||
<notificationbox id="feedback-messages" flex="1">
|
||||
<richlistbox id="feedback-list" flex="1" onselect="this.ensureSelectedElementIsVisible()">
|
||||
<label id="feedback-list-header" class="panel-header" value="&feedbackHeader2.label;"/>
|
||||
<settings id="feedback-communicate" label="&feedback.communicate.title;">
|
||||
<setting title="&feedback.feedback.title;" type="control">
|
||||
<button id="feedback-feedback-happy" oncommand="Feedback.openFeedback('happy');"/>
|
||||
<button id="feedback-feedback-sad" oncommand="Feedback.openFeedback('sad');"/>
|
||||
</setting>
|
||||
</settings>
|
||||
<settings id="feedback-information" label="&feedback.information.title;">
|
||||
<setting id="feedback-about" title="&feedback.about.title;" type="control">
|
||||
<button id="feedback-about-button" label="&feedback.about.button;" oncommand="Feedback.openReadme();"/>
|
||||
</setting>
|
||||
</settings>
|
||||
<settings id="feedback-tools" label="&feedback.tools.title;">
|
||||
<setting pref="extensions.checkCompatibility.4.0b" title="&feedback.forceCompat.title;" type="bool" inverted="true" oninputchanged="Feedback.updateRestart();"/>
|
||||
<setting pref="devtools.errorconsole.enabled" title="&feedback.errorConsole.title;" type="bool"/>
|
||||
</settings>
|
||||
</richlistbox>
|
||||
</notificationbox>
|
||||
</vbox>
|
||||
</deck>
|
||||
</overlay>
|
|
@ -0,0 +1,2 @@
|
|||
pref("extensions.feedback.url.happy", "http://input.mozilla.com/happy");
|
||||
pref("extensions.feedback.url.sad", "http://input.mozilla.com/sad");
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<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>feedback@mobile.mozilla.org</em:id>
|
||||
<em:version>1.0.1</em:version>
|
||||
<em:type>2</em:type>
|
||||
|
||||
<!-- Target Application this extension can install into,
|
||||
with minimum and maximum supported versions. -->
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{a23983c0-fd0e-11dc-95ff-0800200c9a66}</em:id>
|
||||
<em:minVersion>2.0b1pre</em:minVersion>
|
||||
<em:maxVersion>4.*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Feedback</em:name>
|
||||
<em:description>Help make Firefox better by giving feedback.</em:description>
|
||||
<em:creator>Mozilla Corporation</em:creator>
|
||||
<em:iconURL>chrome://feedback/skin/dino-32.png</em:iconURL>
|
||||
</Description>
|
||||
</RDF>
|
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/beta-hdpi.png
Normal file
После Ширина: | Высота: | Размер: 2.6 KiB |
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/dino-32.png
Normal file
После Ширина: | Высота: | Размер: 1.5 KiB |
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/happy-32.png
Normal file
После Ширина: | Высота: | Размер: 2.4 KiB |
|
@ -0,0 +1,11 @@
|
|||
#tool-feedback {
|
||||
list-style-image: url("chrome://feedback/skin/beta-hdpi.png");
|
||||
}
|
||||
|
||||
#feedback-feedback-happy {
|
||||
list-style-image: url("chrome://feedback/skin/happy-32.png");
|
||||
}
|
||||
|
||||
#feedback-feedback-sad {
|
||||
list-style-image: url("chrome://feedback/skin/sad-32.png");
|
||||
}
|
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/sad-32.png
Normal file
После Ширина: | Высота: | Размер: 2.3 KiB |
После Ширина: | Высота: | Размер: 79 KiB |
|
@ -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,3 @@
|
|||
mobile/app/android/drawable/alertaddons.png
|
||||
mobile/app/android/drawable/alertdownloads.png
|
||||
mobile/branding/nightly/content/splash.png
|
|
@ -0,0 +1,2 @@
|
|||
MOZ_APP_DISPLAYNAME=Fennec
|
||||
MOZ_UPDATER=1
|
|
@ -0,0 +1,25 @@
|
|||
# Branding Makefile
|
||||
# - jars chrome artwork
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LINUX_BRANDING_FILES = \
|
||||
fennec_26x26.png \
|
||||
fennec_40x40.png \
|
||||
fennec_48x48.png \
|
||||
fennec_72x72.png \
|
||||
fennec_scalable.png \
|
||||
fennec_maemo_icon26.txt \
|
||||
$(NULL)
|
||||
|
||||
export::
|
||||
$(NSINSTALL) -D $(DIST)/branding
|
||||
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
|
||||
$(NSINSTALL) -D $(DIST)/install
|
После Ширина: | Высота: | Размер: 16 KiB |
После Ширина: | Высота: | Размер: 1.7 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 2.9 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 7.1 KiB |
|
@ -0,0 +1,74 @@
|
|||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
|
||||
d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADFxJREFUeNrsWWtwVOUZfs45
|
||||
e89es5v7bQMh3DGBtpJWIRQvaEWg0FFbOyX9oR3bjtDRTjuditjpj05narWt
|
||||
o84oYB11nCLRVqtUIYQKImiWS7gFyIaETbLJ3u97ds/p+3274WLFUsQZmeGb
|
||||
fHPO7jn7ned53+e9fCeCqqq4moeIq3xcI3CNwDUCV/kQrtRCTauedCslJatV
|
||||
c8lCu1HTbnXZYauxI+0LIBZKYiSSCguZjEc6M/S6zjvU2XvsGe8VIZAa/2iN
|
||||
VqvxaGzXdV0m8Ha5vm6dzWltn99cjmkVZtiNWlgtGpTatQiGZURjOX7v0ZEo
|
||||
Pug5Dp+nF8LQaKcukln7eYjkIvvdwuHdr4Us1hK7qcQEm8PaSd+/TrOTCIU/
|
||||
68czp95vT9yyeJ1ita65bpILK+ZUXnDdbtPCbtXwc/94FslUHqCiKaSTOH70
|
||||
FDo3b0NmcBQaWVh/vG/To5cKmA7Ls5nsskQ82ZJMpCAc6H51uySJ7UpegaQR
|
||||
4apwodTlYOAZmfVExPsp4FsSbfM25OvqW2bWO7F0duV/CbPUqoWDSLDzsUAW
|
||||
sQR5QVHI5QmINEcGfNj45KtQZRmSoPUYJPMi8kb4IsBX0+HBeCzREhwLgsBD
|
||||
FEWIktSlMZoMHrOlpN1WaoOcIUsRq0HvkN3msK222iyr6cd/LBIJT4DP1jm3
|
||||
i8jYlZAfM75ag6FomoAKF0SV1ipCyRbOh5MZhJmM8nmIiQSERAyCKKBxcjV8
|
||||
/hD0dktLdeus7eT7C0gUga/LpDPuQe8ZxCIxkLEZcPImmEd3iAR406hvFEcO
|
||||
HIVvcJgvXOeuhV6vQy6XZ+usodlDi7Uz2VQtadmQy6fsamAMZXIMoTMj8PnG
|
||||
kM1nYLECcTKCoFWQQQ7BVBahdBaBeBb+SBqCToWxzIhAOIbhQT+XVDoYha2x
|
||||
Go45DS2u66dsLwJvodlDpxsIk/vAvkNgls+TAfKkFH5U+HkXt9eH72wKMdkq
|
||||
5OI8gTZbzahtqGExcYEr3+o+7XlhQGn5+NnXYJ3WiOm3tUEZiSAlA7MXTIPe
|
||||
pOMGYPMCj6gTU+XzePdBRA6fxMixAYz6xmFwWDDj+9+CxqjDTZp41w9XTm/J
|
||||
yTn7kUPHERwPcatLTDKixGUukQdESQzPW3yvg0eZLMuddHG1wpkpCAXCGCfG
|
||||
1bWVmDJ9MuSszDV3+4L6lpKTcfwhuBiW+gqIOtK4RQen2YQMWSSbykCgh4GR
|
||||
4AQEzuNsx6uoUGlWzpuCOK2fOXYazhmNcDQ3QGsx4t5ZFtw2ta6dwGPv7h4k
|
||||
i1rnQy3YALnCCa3JYhScgCiITxD41Qw8c5FSPA70D3EiM2Y1I53OwO60Y+Fk
|
||||
M7C0Cc/sC5GlRWhcNgh6LcKJNLMKJ8C+v8ALYMDZQeEEVDKUY/5MTHFXQUfk
|
||||
8wT4vlYrFrhNiJK8PtrjAemea52BtlN88qClNdmRGTQcim66oJDtevP5Hld5
|
||||
aYuJFnSVORGLxZEiUIHxIA/scspO2WwWTdMmcRd2nYziqV1+iFoNJJqiVuIP
|
||||
FCVa8iyBcwqCUvDE4ff2QKIPjW1zoeZyBD6PB64vw8JJZg7s/a49XOPVNZWo
|
||||
qClHqdMB5pExfwABMiYLZFrHs2DZfa1nPcAGMX6CIn0D9wBZykkkyiucmN06
|
||||
g18PBcMUSCH09hzBjOumoX2yFSeGo/j7wbFz4DXSWesLZ2UEeHuOIUYPd9aU
|
||||
ITLgRS6ZhBwLo6Z1NpbOdJ0Fv49kM2mKG/WNtfx3zHgf79mPcQLPvMusz7MQ
|
||||
KeZTW4mtr/ypn+TjVs6Tkt6gRzPFwcSi46MBRCJRTG5u5J9//rIHB4eiEDRM
|
||||
PlIRvFgAz/8E+A6fQKD/NMknz1Opmpcp4I24fXk7Hu+Yz9dhub2EvM9GJBTF
|
||||
Ic9hCuAwByxMBHGBhPeWu37aOIFZOp/Ad+5YPECHuxXSqUIPU/IqqOrhzGkf
|
||||
zWE4qL8xECF2PUsWMxGI2XU2vLm7D6lkCvlMBvkszXQaueKUaSq5LMIDRCBL
|
||||
5zRVusdi1OCFR1ZCzxIBDV3xGA5G4Bsa4QmkoakeVIt4So9QbBSt3fHi5reP
|
||||
XrSZe33D77eTyNqZzmsaqlFVUwFXuZNbiMnIRgvGogmyUgTuyfUwlhjRfXAI
|
||||
v3hux1nrs+Cd8MBEFKTo/pHeXtK8zL2w+dmf4evzmnlcCMI5GIoqIC1LvHIH
|
||||
/GMY9p5CMhri1qfRtazj4UXn49V8kgAB7TAY9T0y5eG+Iydx9FAf5V4JZUSi
|
||||
uq6K0qcFBqOBNJvFqT4vps6aggWzanHL7Cr8Y9excyn0EwQysSiy8QivAw/d
|
||||
fyfa5k4Ba1/S5CHWh6VzRiSyOqSyInRSGmaTCkO5DjqUo78viXQqHU6lMh2X
|
||||
1E6/8pffLBcFYQvRhr2igfRqRonNiWQsBK2koqbKClHJUJCFQK0IVe4aHi+P
|
||||
PrsVU+rLMLWhCs3ualjoGhs9fT4MDY/hva07YDUb8NjD3+MByaTirKyFoq9G
|
||||
lncaOejFFDKySnbIIzA6gtCwl7JhFOFAZMVdP/515yXvB17+82OrKZ1tYHrX
|
||||
6o0wWUthLydJ1TfBbHNQA5ZHzH8Kgyd60UQBzaq3qhQD31xBUtLx1VXKaCyQ
|
||||
c3KSYiRGX+S41EJB6muMVbBXToLM0inNNHWqw94TCPrPkGwCSJPHCvlf7Ljn
|
||||
J49s/DSc0sUIbH5ru+fOm26wU9mZL0gaWJ2VpHcr9UcyZ603WWAprUZZbROi
|
||||
oSB0GoXn6xyv5iztSzx4WXVPxceQToQIpMxlw4xirZoDc2kVJhJGkpq8oN/H
|
||||
a0g2TV5IsRlnilt774Prn74YTumz+u/OrTvfWXrzjQO5bGZ5ZHyEgPr591Zn
|
||||
BcWFltcLjVYPq8OBVGSYg2cNoJyhTCPoCHCGYiVFlgzzFkUpTlaNzWXUotC9
|
||||
GcpyskyTMti47zR8pw4jHgkgHhpjAunoeOi3T38WRul/bSLe+NdOj5zTRqbN
|
||||
mrWkup6qsEYDrU5fmESCVdl0yEvpMsHBs2YwR1qW0yztiWT9EK+sBfBkbVXl
|
||||
xBWV2gTJyL/nWibLcw/Rx2ROQjCj++MDD/3qd1dkT1xdcaM7nenrX0j9y5JF
|
||||
bWhongmT2QpnRTVMUpy0HS5Io1j8WGpUi50nI3h+YyeKhV6JpUWjww3B4EIs
|
||||
HMTpvkMYPHUcb76zA90f9kKn1TYO+we9V2xTX2Kq2JJXs8uN1LjdfEMrftSx
|
||||
HDX11Ryckit0sSq3dMHCBQIoEii+AhEKbYZYJMDbYr0VR3r78NeXOvHuzo+Q
|
||||
IklpNeLGWDzYcSm4pEve/UPcQw9es3JpO1bcsQAGIkJ5mUArvEtkWYRvNBiZ
|
||||
847KWfkUtM/IFdthJGJJkliEUqsejlIr9nqOIZ5IwmTQrUimEuErSiCvZMPl
|
||||
rjKhdbq73UobjxCVfNYdhkNxJBJZrn8N9UMF8IWN0UTg5ouZRy2es9+MjATR
|
||||
f7IfoyNjGBn2UwvCLC/hSN/p9aHIWOcX9l7IaHBsLykxtn/71jbMnzuV+qMK
|
||||
6llm4YP3d6LnyHGsWtJG/ZKuGAfnPYie1ENV/b3ufbhn1QqqHVNxaG93YafX
|
||||
tQ879vRSRsp0xeKBRV/omzmqlisSyZTnpTe6MXBmDAIVptpJzSirKMfenl48
|
||||
9+q7iMYSlBpzxSnz4+HjXrz29h6MUGvsqqiC2WKBiVqSrf/ej7e7Pew+T4XL
|
||||
uuILf7WYpUae9L6Iik9ngjbtIpWsvJzG3Ou/gVu/+TXSdQQfHzhWKGoEnh0F
|
||||
Ct5/vruLWgsJq1bcijlfaaO2JEg9kBHD/iBJK9dZVmpedMLbH/5/8Vz2q8Vt
|
||||
f3tqDbXUD1Kj57bYXZjdtoTiIoh4eIy2npXw7HyDKmqa31vbNBPlddOon/Gh
|
||||
sq4JmXgAvXu38WD2B8Jho1bTuvK+X17WGzrN5RIwW0o2UsD+gGldkRPY370Z
|
||||
NmcVgW2hSl2FsupJ8B47wO+tmzwTrqp6pMJDGDq6GwmqtCW0l2CjRqvxUAds
|
||||
v1wcl01Ao9W4yfprJz7TlrBdTkeWUePXwj5bHC7KTDkezAw8J01NYDw45DGY
|
||||
DF1k/Qhd81Jr7qZNC3tl6PlSvO4mUMtphkaH+tUXn1inbnn+cZWNdDLRP9C7
|
||||
s/1L//8Bqswshy9iKZTVBkOJhYqZ7PGf3NnaMPPGri89gSIJz8hg/3pWxBLx
|
||||
GHZt27q2fvaSMK62cffd391Cc80X+h+aa//ovkbgGoFrBK4R+DzjPwIMAJH8
|
||||
nEzLJzdlAAAAAElFTkSuQmCC
|
||||
|
После Ширина: | Высота: | Размер: 5.8 KiB |
|
@ -0,0 +1,7 @@
|
|||
chrome.jar:
|
||||
% content branding %content/branding/
|
||||
content/branding/about.png (about.png)
|
||||
content/branding/logoWordmark.png (logoWordmark.png)
|
||||
content/branding/logo.png (logo.png)
|
||||
content/branding/favicon32.png (favicon32.png)
|
||||
content/branding/spark.png (spark.png)
|
После Ширина: | Высота: | Размер: 19 KiB |
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 3.2 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 = mobile/branding/nightly/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY brandShortName "Fennec">
|
||||
<!ENTITY brandFullName "Mozilla Fennec">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY logoTrademark "">
|
|
@ -0,0 +1,2 @@
|
|||
brandShortName=Fennec
|
||||
brandFullName=Mozilla Fennec
|
|
@ -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,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,3 @@
|
|||
mobile/app/android/drawable/alertaddons.png
|
||||
mobile/app/android/drawable/alertdownloads.png
|
||||
mobile/branding/official/content/splash.png
|
|
@ -0,0 +1,3 @@
|
|||
MOZ_APP_DISPLAYNAME=Firefox
|
||||
ANDROID_PACKAGE_NAME=org.mozilla.firefox
|
||||
MOZ_UPDATER=
|
|
@ -0,0 +1,25 @@
|
|||
# Branding Makefile
|
||||
# - jars chrome artwork
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LINUX_BRANDING_FILES = \
|
||||
fennec_26x26.png \
|
||||
fennec_40x40.png \
|
||||
fennec_48x48.png \
|
||||
fennec_72x72.png \
|
||||
fennec_scalable.png \
|
||||
fennec_maemo_icon26.txt \
|
||||
$(NULL)
|
||||
|
||||
export::
|
||||
$(NSINSTALL) -D $(DIST)/branding
|
||||
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
|
||||
$(NSINSTALL) -D $(DIST)/install
|
После Ширина: | Высота: | Размер: 25 KiB |
После Ширина: | Высота: | Размер: 2.6 KiB |
После Ширина: | Высота: | Размер: 1.9 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |