Merge mozilla-central to mozilla-inbound

This commit is contained in:
Matt Brubeck 2011-09-14 17:26:46 -07:00
Родитель 573de6d9f0 7c4b08f775
Коммит 0c186fdde3
50 изменённых файлов: 273 добавлений и 116 удалений

Просмотреть файл

@ -138,7 +138,9 @@ function initRow(aPartId)
var checkbox = document.getElementById(aPartId + "Def");
var command = document.getElementById("cmd_" + aPartId + "Toggle");
var perm = permissionManager.testPermission(gPermURI, aPartId);
// Geolocation permission consumers use testExactPermission, not testPermission.
var perm = aPartId == "geo" ? permissionManager.testExactPermission(gPermURI, aPartId) :
permissionManager.testPermission(gPermURI, aPartId);
if (perm) {
checkbox.checked = false;
command.removeAttribute("disabled");

Просмотреть файл

@ -3676,13 +3676,10 @@
<body><![CDATA[
if (tab.parentNode != this)
return;
tab._fullyOpen = true;
this.adjustTabstrip();
if (tab._fullyOpen)
return;
tab._fullyOpen = true;
if (tab.getAttribute("selected") == "true") {
this._fillTrailingGap();
this._handleTabSelect();
@ -3724,10 +3721,14 @@
var tab = event.target;
if (tab.getAttribute("fadein") == "true")
this._handleNewTab(tab);
else if (tab.closing)
if (tab.getAttribute("fadein") == "true") {
if (tab._fullyOpen)
this.adjustTabstrip();
else
this._handleNewTab(tab);
} else if (tab.closing) {
this.tabbrowser._endRemoveTab(tab);
}
]]></handler>
<handler event="dblclick"><![CDATA[

Просмотреть файл

@ -122,6 +122,7 @@ function GroupItem(listOfEls, options) {
this.isDragging = false;
$container
.css({zIndex: -100})
.attr("data-id", this.id)
.appendTo("body");
// ___ Resizer
@ -1050,6 +1051,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
item.addSubscriber("close", this._onChildClose);
item.setParent(this);
$el.attr("data-group", this.id);
if (typeof item.setResizable == 'function')
item.setResizable(false, options.immediately);
@ -1135,6 +1137,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
this._activeTab = null;
}
$el[0].removeAttribute("data-group");
item.setParent(null);
item.removeClass("stacked");
item.isStacked = false;

Просмотреть файл

@ -296,7 +296,7 @@ can reach it easily. -->
<!ENTITY appMenuSafeMode.accesskey "R">
<!ENTITY openCmd.commandkey "l">
<!ENTITY urlbar.placeholder "Go to a Web Site">
<!ENTITY urlbar.placeholder "Go to a Website">
<!ENTITY urlbar.accesskey "d">
<!ENTITY urlbar.switchToTab.label "Switch to tab:">
@ -492,7 +492,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY pageStylePersistentOnly.label "Basic Page Style">
<!ENTITY pageStylePersistentOnly.accesskey "b">
<!ENTITY pageReportIcon.tooltip "Change pop-up blocking settings for this web site">
<!ENTITY pageReportIcon.tooltip "Change pop-up blocking settings for this website">
<!ENTITY allowPopups.accesskey "p">
<!-- On Windows we use the term "Options" to describe settings, but
@ -524,7 +524,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY editBookmark.cancel.label "Cancel">
<!ENTITY editBookmark.removeBookmark.accessKey "R">
<!ENTITY identity.unverifiedsite2 "This web site does not supply identity information.">
<!ENTITY identity.unverifiedsite2 "This website does not supply identity information.">
<!ENTITY identity.connectedTo "You are connected to">
<!-- Localization note (identity.runBy) : This string appears between a
domain name (above) and an organization name (below). E.g.

Просмотреть файл

@ -205,11 +205,11 @@ identity.identified.verifier=Verified by: %S
identity.identified.verified_by_you=You have added a security exception for this site.
identity.identified.state_and_country=%S, %S
identity.encrypted=Your connection to this web site is encrypted to prevent eavesdropping.
identity.unencrypted=Your connection to this web site is not encrypted.
identity.encrypted=Your connection to this website is encrypted to prevent eavesdropping.
identity.unencrypted=Your connection to this website is not encrypted.
identity.mixed_content=Your connection to this site is only partially encrypted, and does not prevent eavesdropping.
identity.unknown.tooltip=This web site does not supply identity information.
identity.unknown.tooltip=This website does not supply identity information.
identity.ownerUnknown2=(unknown)

Просмотреть файл

@ -111,17 +111,17 @@
<!ENTITY securityView.unknown "Unknown">
<!ENTITY securityView.identity.header "Web Site Identity">
<!ENTITY securityView.identity.header "Website Identity">
<!ENTITY securityView.identity.owner "Owner:">
<!ENTITY securityView.identity.domain "Web site:">
<!ENTITY securityView.identity.domain "Website:">
<!ENTITY securityView.identity.verifier "Verified by:">
<!ENTITY securityView.privacy.header "Privacy &amp; History">
<!ENTITY securityView.privacy.history "Have I visited this web site prior to today?">
<!ENTITY securityView.privacy.cookies "Is this web site storing information (cookies) on my computer?">
<!ENTITY securityView.privacy.history "Have I visited this website prior to today?">
<!ENTITY securityView.privacy.cookies "Is this website storing information (cookies) on my computer?">
<!ENTITY securityView.privacy.viewCookies "View Cookies">
<!ENTITY securityView.privacy.viewCookies.accessKey "k">
<!ENTITY securityView.privacy.passwords "Have I saved any passwords for this web site?">
<!ENTITY securityView.privacy.passwords "Have I saved any passwords for this website?">
<!ENTITY securityView.privacy.viewPasswords "View Saved Passwords">
<!ENTITY securityView.privacy.viewPasswords.accessKey "w">

Просмотреть файл

@ -70,13 +70,13 @@ generalStrictMode=Standards compliance mode
generalSize=%S KB (%S bytes)
generalMetaTag=Meta (1 tag)
generalMetaTags=Meta (%S tags)
generalSiteIdentity=This web site is owned by %S\nThis has been verified by %S
generalSiteIdentity=This website is owned by %S\nThis has been verified by %S
feedRss=RSS
feedAtom=Atom
feedXML=XML
securityNoOwner=This web site does not supply ownership information.
securityNoOwner=This website does not supply ownership information.
securityOneVisit=Yes, once
securityNVisits=Yes, %S times
@ -85,4 +85,4 @@ securityNVisits=Yes, %S times
# e.g. indexedDBUsage : "50.23 MB"
# %1$S = size (in bytes or megabytes, ...)
# %2$S = unit of measure (bytes, KB, MB, ...)
indexedDBUsage=This web site is using %1$S %2$S
indexedDBUsage=This website is using %1$S %2$S

Просмотреть файл

@ -1,5 +1,5 @@
# LOCALIZATION NOTE (visitCount): #1 is the number of history visits for a site
visitCount=#1 visit;#1 visits
passwordsCount=#1 password is stored for this web site.;#1 passwords are stored for this web site.
cookiesCount=#1 cookie is set for this web site.;#1 cookies are set for this web site.
passwordsCount=#1 password is stored for this website.;#1 passwords are stored for this website.
cookiesCount=#1 cookie is set for this website.;#1 cookies are set for this website.

Просмотреть файл

@ -8,7 +8,7 @@
<!ENTITY useCursorNavigation.accesskey "c">
<!ENTITY searchStartTyping.label "Search for text when I start typing">
<!ENTITY searchStartTyping.accesskey "x">
<!ENTITY blockAutoRefresh.label "Warn me when web sites try to redirect or reload the page">
<!ENTITY blockAutoRefresh.label "Warn me when websites try to redirect or reload the page">
<!ENTITY blockAutoRefresh.accesskey "b">
<!ENTITY browsing.label "Browsing">

Просмотреть файл

@ -7,7 +7,7 @@
<!ENTITY removepermission.accesskey "R">
<!ENTITY removeallpermissions.label "Remove All Sites">
<!ENTITY removeallpermissions.accesskey "e">
<!ENTITY address.label "Address of web site:">
<!ENTITY address.label "Address of website:">
<!ENTITY address.accesskey "d">
<!ENTITY block.label "Block">
<!ENTITY block.accesskey "B">

Просмотреть файл

@ -11,13 +11,13 @@ labelDefaultFont=Default (%S)
#### Permissions Manager
cookiepermissionstext=You can specify which web sites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
cookiepermissionstext=You can specify which websites are always or never allowed to use cookies. Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
cookiepermissionstitle=Exceptions - Cookies
addonspermissionstext=You can specify which web sites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
addonspermissionstext=You can specify which websites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
addons_permissions_title=Allowed Sites - Add-ons Installation
popuppermissionstext=You can specify which web sites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
popuppermissionstitle=Allowed Sites - Pop-ups
imagepermissionstext=You can specify which web sites are allowed to load images. Type the exact address of the site you want to manage and then click Block or Allow.
imagepermissionstext=You can specify which websites are allowed to load images. Type the exact address of the site you want to manage and then click Block or Allow.
imagepermissionstitle=Exceptions - Images
invalidURI=Please enter a valid hostname
invalidURITitle=Invalid Hostname Entered

Просмотреть файл

@ -1,6 +1,6 @@
<!ENTITY tracking.label "Tracking">
<!ENTITY doNotTrack.label "Tell web sites I do not want to be tracked">
<!ENTITY doNotTrack.label "Tell websites I do not want to be tracked">
<!ENTITY doNotTrack.accesskey "d">
<!ENTITY history.label "History">
@ -42,7 +42,7 @@
<!ENTITY historyHeader.custom.label "Use custom settings for history">
<!ENTITY historyHeader.post.label "">
<!ENTITY rememberDescription.label "&brandShortName; will remember your browsing, download, form and search history, and keep cookies from Web sites you visit.">
<!ENTITY rememberDescription.label "&brandShortName; will remember your browsing, download, form and search history, and keep cookies from websites you visit.">
<!-- LOCALIZATION NOTE (rememberActions.pre.label): include a trailing space as needed -->
<!-- LOCALIZATION NOTE (rememberActions.middle.label): include a starting and trailing space as needed -->

Просмотреть файл

@ -61,7 +61,7 @@ externalProtocolUnknown=<Unknown>
externalProtocolChkMsg=Remember my choice for all links of this type.
externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
phishingBlocked=The website at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.

Просмотреть файл

@ -126,7 +126,7 @@
<!ENTITY nssFailure2.longDesc "
<ul>
<li>The page you are trying to view can not be shown because the authenticity of the received data could not be verified.</li>
<li>Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
<li>Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
</ul>
">
@ -154,7 +154,7 @@ be temporary, and you can try again later.</li>
<!ENTITY malwareBlocked.title "Suspected Attack Site!">
<!ENTITY malwareBlocked.longDesc "
<p>Attack sites try to install programs that steal private information, use your computer to attack others, or damage your system.</p>
<p>Web site owners who believe their site has been reported as an attack site in error may <a href='http://www.stopbadware.org/home/reviewinfo' >request a review</a>.</p>
<p>Website owners who believe their site has been reported as an attack site in error may <a href='http://www.stopbadware.org/home/reviewinfo' >request a review</a>.</p>
">
<!ENTITY phishingBlocked.title "Suspected Web Forgery!">

Просмотреть файл

@ -687,7 +687,7 @@ menuitem.bookmark-item {
-moz-linear-gradient(rgba(251,252,253,.95), rgba(246,247,248,.47) 49%,
rgba(231,232,233,.45) 51%, rgba(225,226,229,.3));
background-clip: padding-box;
border-radius: 3.5px;
border-radius: 2.5px;
border: 1px solid;
border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38);
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
@ -1195,7 +1195,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
padding: 2px;
background-clip: padding-box;
border: 1px solid ThreeDShadow;
border-radius: 3.5px;
border-radius: 2.5px;
}
@media all and (-moz-windows-default-theme) {
@ -1282,13 +1282,13 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
}
#identity-box:-moz-locale-dir(ltr) {
border-top-left-radius: 2.5px;
border-bottom-left-radius: 2.5px;
border-top-left-radius: 1.5px;
border-bottom-left-radius: 1.5px;
}
#identity-box:-moz-locale-dir(rtl) {
border-top-right-radius: 2.5px;
border-bottom-right-radius: 2.5px;
border-top-right-radius: 1.5px;
border-bottom-right-radius: 1.5px;
}
#identity-box:hover {
@ -1500,13 +1500,13 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
}
#urlbar:-moz-locale-dir(ltr) > toolbarbutton {
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-top-right-radius: 1.5px;
border-bottom-right-radius: 1.5px;
}
#urlbar:-moz-locale-dir(rtl) > toolbarbutton {
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
border-top-left-radius: 1.5px;
border-bottom-left-radius: 1.5px;
}
#urlbar > toolbarbutton:not([disabled]):active:hover,

Просмотреть файл

@ -60,7 +60,7 @@ externalProtocolUnknown=<Unknown>
externalProtocolChkMsg=Remember my choice for all links of this type.
externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
phishingBlocked=The website at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default.

Просмотреть файл

@ -59,7 +59,7 @@
<!ENTITY unknownSocketType.longDesc "<p>The site responded to the network request in an unexpected way and the browser cannot continue.</p>">
<!ENTITY nssFailure2.title "Secure Connection Failed">
<!ENTITY nssFailure2.longDesc "<p>The page you are trying to view can not be shown because the authenticity of the received data could not be verified.</p><ul><li>Please contact the web site owners to inform them of this problem.</li></ul>">
<!ENTITY nssFailure2.longDesc "<p>The page you are trying to view can not be shown because the authenticity of the received data could not be verified.</p><ul><li>Please contact the website owners to inform them of this problem.</li></ul>">
<!ENTITY nssBadCert.title "Secure Connection Failed">
<!ENTITY nssBadCert.longDesc2 "<ul>
@ -71,7 +71,7 @@
<!ENTITY malwareBlocked.title "Suspected Attack Site!">
<!ENTITY malwareBlocked.longDesc "
<p>Attack sites try to install programs that steal private information, use your computer to attack others, or damage your system.</p>
<p>Web site owners who believe their site has been reported as an attack site in error may <a href='http://www.stopbadware.org/home/reviewinfo' >request a review</a>.</p>
<p>Website owners who believe their site has been reported as an attack site in error may <a href='http://www.stopbadware.org/home/reviewinfo' >request a review</a>.</p>
">
<!ENTITY phishingBlocked.title "Suspected Web Forgery!">

Просмотреть файл

@ -411,7 +411,9 @@ typedef enum {
NPNVprivateModeBool = 18,
NPNVsupportsAdvancedKeyHandling = 21
NPNVsupportsAdvancedKeyHandling = 21,
NPNVdocumentOrigin = 22
#if defined(XP_MACOSX)
/* Used for negotiating drawing models */

Просмотреть файл

@ -55,7 +55,7 @@
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(HPUX)
#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX)
/*
* AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
* but not bool for C.

Просмотреть файл

@ -70,11 +70,14 @@
#include "nsIDOMDocument.h"
#include "nsPIDOMWindow.h"
#include "nsIDocument.h"
#include "nsIContent.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptContext.h"
#include "nsIUnicodeNormalizer.h"
#include "nsDOMJSUtils.h"
#include "nsIPrincipal.h"
#include "nsWildCard.h"
#include "nsContentUtils.h"
#include "nsIXPConnect.h"
@ -2159,6 +2162,46 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
return NPERR_GENERIC_ERROR;
}
case NPNVdocumentOrigin: {
nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *)npp->ndata;
if (!inst) {
return NPERR_GENERIC_ERROR;
}
nsCOMPtr<nsIDOMElement> element;
inst->GetDOMElement(getter_AddRefs(element));
if (!element) {
return NPERR_GENERIC_ERROR;
}
nsCOMPtr<nsIContent> content(do_QueryInterface(element));
if (!content) {
return NPERR_GENERIC_ERROR;
}
nsIPrincipal* principal = content->NodePrincipal();
nsAutoString utf16Origin;
res = nsContentUtils::GetUTFOrigin(principal, utf16Origin);
if (NS_FAILED(res)) {
return NPERR_GENERIC_ERROR;
}
nsCOMPtr<nsIUnicodeNormalizer> normalizer = do_GetService(NS_UNICODE_NORMALIZER_CONTRACTID);
if (!normalizer) {
return NPERR_GENERIC_ERROR;
}
nsAutoString normalizedUTF16Origin;
res = normalizer->NormalizeUnicodeNFKC(utf16Origin, normalizedUTF16Origin);
if (NS_FAILED(res)) {
return NPERR_GENERIC_ERROR;
}
*(char**)result = ToNewUTF8String(normalizedUTF16Origin);
return *(char**)result ? NPERR_NO_ERROR : NPERR_GENERIC_ERROR;
}
#ifdef XP_MACOSX
case NPNVpluginDrawingModel: {
if (npp) {

Просмотреть файл

@ -171,6 +171,8 @@ parent:
returns (bool value, NPError result);
rpc NPN_GetValue_NPNVnetscapeWindow()
returns (NativeWindowHandle value, NPError result);
rpc NPN_GetValue_NPNVdocumentOrigin()
returns (nsCString value, NPError result);
rpc NPN_SetValue_NPPVpluginWindow(bool windowed)
returns (NPError result);

Просмотреть файл

@ -359,6 +359,18 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar,
return result;
}
case NPNVdocumentOrigin: {
nsCString v;
NPError result;
if (!CallNPN_GetValue_NPNVdocumentOrigin(&v, &result)) {
return NPERR_GENERIC_ERROR;
}
if (result == NPERR_NO_ERROR) {
*static_cast<char**>(aValue) = ToNewCString(v);
}
return result;
}
case NPNVWindowNPObject: // Intentional fall-through
case NPNVPluginElementNPObject: {
NPObject* object;

Просмотреть файл

@ -341,6 +341,18 @@ PluginInstanceParent::AnswerNPN_GetValue_NPNVprivateModeBool(bool* value,
return true;
}
bool
PluginInstanceParent::AnswerNPN_GetValue_NPNVdocumentOrigin(nsCString* value,
NPError* result)
{
void *v = nsnull;
*result = mNPNIface->getvalue(mNPP, NPNVdocumentOrigin, &v);
if (*result == NPERR_NO_ERROR && v) {
value->Adopt(static_cast<char*>(v));
}
return true;
}
bool
PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginWindow(
const bool& windowed, NPError* result)

Просмотреть файл

@ -130,6 +130,9 @@ public:
NPError* result);
virtual bool
AnswerNPN_GetValue_NPNVprivateModeBool(bool* value, NPError* result);
virtual bool
AnswerNPN_GetValue_NPNVdocumentOrigin(nsCString* value, NPError* result);
virtual bool
AnswerNPN_SetValue_NPPVpluginWindow(const bool& windowed, NPError* result);

Просмотреть файл

@ -213,6 +213,7 @@ NPNVariableToString(NPNVariable aVar)
VARSTR(NPNVSupportsWindowless);
VARSTR(NPNVprivateModeBool);
VARSTR(NPNVdocumentOrigin);
default: return "???";
}

Просмотреть файл

@ -102,6 +102,7 @@ _MOCHITEST_FILES = \
test_zero_opacity.html \
test_NPPVpluginWantsAllNetworkStreams.html \
test_npruntime_npnsetexception.html \
test_NPNVdocumentOrigin.html \
$(NULL)
# test_plugin_scroll_painting.html \ bug 596491

Просмотреть файл

@ -0,0 +1,34 @@
<html>
<head>
<title>Test NPNVdocumentOrigin</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body onload="runTest()">
<embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
<script class="testbody" type="application/javascript">
SimpleTest.waitForExplicitFinish();
function runTest() {
var p1 = document.getElementById("plugin1");
var realOrigin = "http://mochi.test:8888";
// Test with no modifications
is(p1.getNPNVdocumentOrigin(), realOrigin, "Checking for expected origin.");
// Mess with window.location.toString
window.location.toString = function() { return 'http://victim.rckc.at/'; }
is(p1.getNPNVdocumentOrigin(), realOrigin, "Checking for expected origin afer modifying window.location.toString.");
// Create a plugin in a new window with about:blank
var newWindow = window.open("about:blank");
newWindow.document.writeln('<embed id="plugin2" type="application/x-test" width="200" height="200"></embed>');
var p2 = newWindow.document.getElementById("plugin2");
is(p2.getNPNVdocumentOrigin(), realOrigin, "Checking for expected origin of plugin in new about:blank window.");
newWindow.close();
SimpleTest.finish();
}
</script>
</body>
</html>

Просмотреть файл

@ -37,6 +37,10 @@ Hands back an object which reflects properties as values, e.g.
.getReflector()['foo'] = 'foo'
.getReflector()[1] = 1
* .getNPNVdocumentOrigin()
Returns the origin string retrieved from the browser by a NPNVdocumentOrigin
variable request. Does not cache the value, gets it from the browser every time.
== NPN_ConvertPoint testing ==
* convertPointX(sourceSpace, sourceX, sourceY, destSpace)

Просмотреть файл

@ -167,6 +167,7 @@ static bool constructObject(NPObject* npobj, const NPVariant* args, uint32_t arg
static bool setSitesWithData(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool setSitesWithDataCapabilities(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool getLastKeyText(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool getNPNVdocumentOrigin(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static const NPUTF8* sPluginMethodIdentifierNames[] = {
"npnEvaluateTest",
@ -225,7 +226,8 @@ static const NPUTF8* sPluginMethodIdentifierNames[] = {
"constructObject",
"setSitesWithData",
"setSitesWithDataCapabilities",
"getLastKeyText"
"getLastKeyText",
"getNPNVdocumentOrigin"
};
static NPIdentifier sPluginMethodIdentifiers[ARRAY_LENGTH(sPluginMethodIdentifierNames)];
static const ScriptableFunction sPluginMethodFunctions[] = {
@ -285,7 +287,8 @@ static const ScriptableFunction sPluginMethodFunctions[] = {
constructObject,
setSitesWithData,
setSitesWithDataCapabilities,
getLastKeyText
getLastKeyText,
getNPNVdocumentOrigin
};
STATIC_ASSERT(ARRAY_LENGTH(sPluginMethodIdentifierNames) ==
@ -3474,3 +3477,22 @@ bool getLastKeyText(NPObject* npobj, const NPVariant* args, uint32_t argCount,
STRINGZ_TO_NPVARIANT(NPN_StrDup(id->lastKeyText.c_str()), *result);
return true;
}
bool getNPNVdocumentOrigin(NPObject* npobj, const NPVariant* args, uint32_t argCount,
NPVariant* result)
{
if (argCount != 0) {
return false;
}
NPP npp = static_cast<TestNPObject*>(npobj)->npp;
char *origin = NULL;
NPError err = NPN_GetValue(npp, NPNVdocumentOrigin, &origin);
if (err != NPERR_NO_ERROR) {
return false;
}
STRINGZ_TO_NPVARIANT(origin, *result);
return true;
}

Просмотреть файл

@ -64,6 +64,7 @@ let Elements = {};
["contentShowing", "bcast_contentShowing"],
["urlbarState", "bcast_urlbarState"],
["stack", "stack"],
["tabList", "tabs"],
["tabs", "tabs-container"],
["controls", "browser-controls"],
["panelUI", "panel-container"],
@ -387,7 +388,7 @@ var BrowserUI = {
sizeControls: function(windowW, windowH) {
// tabs
document.getElementById("tabs").resize();
Elements.tabList.resize();
AwesomeScreen.doResize(windowW, windowH);
// content navigator helper
@ -669,6 +670,7 @@ var BrowserUI = {
// new page is opened, so a call to Browser.hideSidebars() fill this
// requirement and fix the sidebars position.
Browser.hideSidebars();
Elements.tabList.removeClosedTab();
// Delay doing the fixup so the raw URI is passed to loadURIWithFlags
// and the proper third-party fixup can be done
@ -785,6 +787,7 @@ var BrowserUI = {
selectTab: function selectTab(aTab) {
AwesomeScreen.activePanel = null;
Browser.selectedTab = aTab;
Elements.tabList.removeClosedTab();
},
undoCloseTab: function undoCloseTab(aIndex) {
@ -911,18 +914,14 @@ var BrowserUI = {
this._tabSelect(aEvent);
break;
case "TabOpen":
case "TabRemove":
{
// Workaround to hide the tabstrip if it is partially visible
// See bug 524469 and bug 626660
let [tabsVisibility,,,] = Browser.computeSidebarVisibility();
if (tabsVisibility > 0.0 && tabsVisibility < 1.0)
Browser.hideSidebars();
Elements.tabList.removeClosedTab();
Browser.hidePartialTabSidebar();
break;
}
case "PanFinished":
let tabs = document.getElementById("tabs");
case "TabRemove":
Browser.hidePartialTabSidebar();
break;
case "PanFinished": {
let tabs = Elements.tabList;
let [tabsVisibility,,oldLeftWidth, oldRightWidth] = Browser.computeSidebarVisibility();
if (tabsVisibility == 0.0 && tabs.hasClosedTab) {
let { x: x1, y: y1 } = Browser.getScrollboxPosition(Browser.controlsScrollboxScroller);
@ -940,6 +939,7 @@ var BrowserUI = {
Browser.tryFloatToolbar(0, 0);
}
break;
}
case "SizeChanged":
this.sizeControls(ViewableAreaObserver.width, ViewableAreaObserver.height);
break;

Просмотреть файл

@ -554,6 +554,13 @@ var Browser = {
this.tryUnfloatToolbar();
},
/** Workaround to hide the tabstrip if it is partially visible (bug 524469 and bug 626660) */
hidePartialTabSidebar: function hidePartialSidebars() {
let [tabsVisibility,,,] = this.computeSidebarVisibility();
if (tabsVisibility > 0.0 && tabsVisibility < 1.0)
this.hideSidebars();
},
hideTitlebar: function hideTitlebar() {
let rect = Elements.browsers.getBoundingClientRect();
this.pageScrollboxScroller.scrollBy(0, Math.round(rect.top));
@ -2847,7 +2854,7 @@ Tab.prototype = {
},
create: function create(aURI, aParams) {
this._chromeTab = document.getElementById("tabs").addTab();
this._chromeTab = Elements.tabList.addTab();
let browser = this._createBrowser(aURI, null);
// Should we fully load the new browser, or wait until later
@ -2866,7 +2873,7 @@ Tab.prototype = {
},
destroy: function destroy() {
document.getElementById("tabs").removeTab(this._chromeTab);
Elements.tabList.removeTab(this._chromeTab);
this._chromeTab = null;
this._destroyBrowser();
},
@ -3092,7 +3099,7 @@ Tab.prototype = {
browser.setAttribute("type", "content-primary");
Elements.browsers.selectedPanel = notification;
browser.active = true;
document.getElementById("tabs").selectedTab = this._chromeTab;
Elements.tabList.selectedTab = this._chromeTab;
browser.focus();
} else {
browser.messageManager.sendAsyncMessage("Browser:Blur", { });

Просмотреть файл

@ -445,13 +445,11 @@ var NewTabPopup = {
let boxRect = this.box.getBoundingClientRect();
this.box.top = tabRect.top + (tabRect.height / 2) - (boxRect.height / 2);
let tabs = document.getElementById("tabs");
// We don't use anchorTo() here because the tab
// being anchored to might be overflowing the tabs
// scrollbox which confuses the dynamic arrow direction
// calculation (see bug 662520).
if (tabs.getBoundingClientRect().left < 0)
if (Elements.tabList.getBoundingClientRect().left < 0)
this.box.pointLeftAt(aTab);
else
this.box.pointRightAt(aTab);
@ -523,7 +521,7 @@ var FindHelperUI = {
Elements.browsers.addEventListener("PanFinished", this, false);
// Listen for events where form assistant should be closed
document.getElementById("tabs").addEventListener("TabSelect", this, true);
Elements.tabList.addEventListener("TabSelect", this, true);
Elements.browsers.addEventListener("URLChanged", this, true);
},
@ -675,7 +673,7 @@ var FormHelperUI = {
messageManager.addMessageListener("FormAssist:AutoComplete", this);
// Listen for events where form assistant should be closed or updated
let tabs = document.getElementById("tabs");
let tabs = Elements.tabList;
tabs.addEventListener("TabSelect", this, true);
tabs.addEventListener("TabClose", this, true);
Elements.browsers.addEventListener("URLChanged", this, true);

Просмотреть файл

@ -71,7 +71,7 @@
<!ENTITY bookmarkEdit.label "Edit">
<!ENTITY bookmarkShortcut.label "Add to Home Screen">
<!ENTITY identity.unverifiedsite2 "This web site does not supply identity information.">
<!ENTITY identity.unverifiedsite2 "This website does not supply identity information.">
<!ENTITY identity.connectedTo2 "Connected to">
<!-- Localization note (identity.runBy2)
The layout of the identity dialog prevents combining this into a single string with

Просмотреть файл

@ -135,7 +135,7 @@ identity.identified.state_and_country=%S, %S
identity.identified.title_with_country=%S (%S)
identity.encrypted2=Encrypted
identity.unencrypted2=Not encrypted
identity.unknown.tooltip=This web site does not supply identity information.
identity.unknown.tooltip=This website does not supply identity information.
identity.ownerUnknown2=(unknown)
# Geolocation UI

Просмотреть файл

@ -61,7 +61,7 @@ externalProtocolUnknown=<Unknown>
externalProtocolChkMsg=Remember my choice for all links of this type.
externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
phishingBlocked=The website at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.

Просмотреть файл

@ -121,7 +121,7 @@
<!ENTITY nssFailure2.longDesc "
<ul>
<li>The page you are trying to view can not be shown because the authenticity of the received data could not be verified.</li>
<li>Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
<li>Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.</li>
</ul>
">

Просмотреть файл

@ -39,8 +39,8 @@
Title=Security Warning
MixedContentMessage=You have requested an encrypted page that contains some unencrypted information. Information that you see or enter on this page could easily be read by a third party.
LeaveSecureMessage=You are about to leave an encrypted page. Information you send or receive from now on could easily be read by a third party.
EnterSecureMessage=You have requested an encrypted page. The web site has identified itself correctly, and information you see or enter on this page can't easily be read by a third party.
WeakSecureMessage=You have requested a page that uses low-grade encryption. The web site has identified itself correctly, but information you see or enter on this page could be read by a third party.
EnterSecureMessage=You have requested an encrypted page. The website has identified itself correctly, and information you see or enter on this page can't easily be read by a third party.
WeakSecureMessage=You have requested a page that uses low-grade encryption. The website has identified itself correctly, but information you see or enter on this page could be read by a third party.
PostToInsecureFromSecureMessage=Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
PostToInsecureFromInsecureMessage=The information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.##Are you sure you want to continue sending this information?##
MixedContentShowAgain=Alert me whenever I'm about to view an encrypted page that contains some unencrypted information.

Просмотреть файл

@ -72,9 +72,9 @@
<!ENTITY certmgr.editcert.title "Edit Security Certificate Settings">
<!ENTITY certmgr.editcacert.title "Edit CA certificate trust settings">
<!ENTITY certmgr.editsslcert.title "Edit web site certificate trust settings">
<!ENTITY certmgr.editsslcert.title "Edit website certificate trust settings">
<!ENTITY certmgr.editcert.edittrust "Edit trust settings:">
<!ENTITY certmgr.editcert.trustssl "This certificate can identify web sites.">
<!ENTITY certmgr.editcert.trustssl "This certificate can identify websites.">
<!ENTITY certmgr.editcert.trustemail "This certificate can identify mail users.">
<!ENTITY certmgr.editcert.trustobjsign "This certificate can identify software makers.">
<!ENTITY certmgr.editsslcert.edittrust "Edit certificate trust settings:">

Просмотреть файл

@ -70,7 +70,7 @@
<!-- Downloading a cert -->
<!ENTITY downloadCert.title "Downloading Certificate">
<!ENTITY downloadCert.message1 "You have been asked to trust a new Certificate Authority (CA).">
<!ENTITY downloadCert.trustSSL "Trust this CA to identify web sites.">
<!ENTITY downloadCert.trustSSL "Trust this CA to identify websites.">
<!ENTITY downloadCert.trustEmail "Trust this CA to identify email users.">
<!ENTITY downloadCert.trustObjSign "Trust this CA to identify software developers.">
<!ENTITY downloadCert.message3 "Before trusting this CA for any purpose, you should examine its certificate and its policy and procedures (if available).">

Просмотреть файл

@ -98,12 +98,12 @@ clientAuthMessage1=Organization: "%S"
clientAuthMessage2=Issued Under: "%S"
#Page Info
pageInfo_SiteNotVerified=Web Site Identity Not Verified
pageInfo_WebSiteVerified=Web Site Identity Verified
pageInfo_Identity_Verified=The web site %S supports authentication for the page you are viewing. The identity of this web site has been verified by %S, a certificate authority you trust for this purpose.
pageInfo_ViewCertificate=View the security certificate that verifies this web site's identity.
pageInfo_SiteNotVerified=Website Identity Not Verified
pageInfo_WebSiteVerified=Website Identity Verified
pageInfo_Identity_Verified=The website %S supports authentication for the page you are viewing. The identity of this website has been verified by %S, a certificate authority you trust for this purpose.
pageInfo_ViewCertificate=View the security certificate that verifies this website's identity.
pageInfo_NoEncryption=Connection Not Encrypted
pageInfo_Privacy_None1=The web site %S does not support encryption for the page you are viewing.
pageInfo_Privacy_None1=The website %S does not support encryption for the page you are viewing.
pageInfo_Privacy_None2=Information sent over the Internet without encryption can be seen by other people while it is in transit.
pageInfo_Privacy_None3=The page you are viewing is not encrypted.
# LOCALIZATION NOTE (pageInfo_StrongEncryptionWithBits): %1$S is the name of the encryption standard,
@ -114,7 +114,7 @@ pageInfo_Privacy_Strong2=Encryption makes it very difficult for unauthorized peo
# LOCALIZATION NOTE (pageInfo_WeakEncryptionWithBits): %1$S is the name of the encryption standard,
# %2$S is the key size of the cipher.
pageInfo_WeakEncryptionWithBits=Connection Encrypted: Low-grade Encryption (%1$S, %2$S bit keys)
pageInfo_Privacy_Weak1=The web site %S is using low-grade encryption for the page you are viewing.
pageInfo_Privacy_Weak1=The website %S is using low-grade encryption for the page you are viewing.
pageInfo_Privacy_Weak2=Low-grade encryption may allow some unauthorized people to view this information.
pageInfo_MixedContent=Connection Partially Encrypted
pageInfo_Privacy_Mixed1=Parts of the page you are viewing were not encrypted before being transmitted over the Internet.

Просмотреть файл

@ -265,21 +265,6 @@ LoginManagerPrompter.prototype = {
},
__brandBundle : null, // String bundle for L10N
get _brandBundle() {
if (!this.__brandBundle) {
var bunService = Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService);
this.__brandBundle = bunService.createBundle(
"chrome://branding/locale/brand.properties");
if (!this.__brandBundle)
throw "Branding string bundle not present!";
}
return this.__brandBundle;
},
__ellipsis : null,
get _ellipsis() {
if (!this.__ellipsis) {
@ -956,20 +941,19 @@ LoginManagerPrompter.prototype = {
(Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1) +
(Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2);
var brandShortName =
this._brandBundle.GetStringFromName("brandShortName");
var displayHost = this._getShortDisplayHost(aLogin.hostname);
var dialogText;
if (aLogin.username) {
var displayUser = this._sanitizeUsername(aLogin.username);
dialogText = this._getLocalizedString(
"saveLoginText",
[brandShortName, displayUser, displayHost]);
"rememberPasswordText",
[displayUser, displayHost]);
} else {
dialogText = this._getLocalizedString(
"saveLoginTextNoUsername",
[brandShortName, displayHost]);
"rememberPasswordTextNoUsername",
[displayHost]);
}
var dialogTitle = this._getLocalizedString(
"savePasswordTitle");
@ -1116,11 +1100,11 @@ LoginManagerPrompter.prototype = {
var dialogText;
if (aOldLogin.username)
dialogText = this._getLocalizedString(
"passwordChangeText",
"updatePasswordText",
[aOldLogin.username]);
else
dialogText = this._getLocalizedString(
"passwordChangeTextNoUser");
"updatePasswordTextNoUser");
var dialogTitle = this._getLocalizedString(
"passwordChangeTitle");

Просмотреть файл

@ -134,7 +134,8 @@ nsAppStartup::nsAppStartup() :
mRunning(PR_FALSE),
mShuttingDown(PR_FALSE),
mAttemptingQuit(PR_FALSE),
mRestart(PR_FALSE)
mRestart(PR_FALSE),
mInterrupted(PR_FALSE)
{ }
@ -452,6 +453,20 @@ nsAppStartup::GetShuttingDown(PRBool *aResult)
return NS_OK;
}
NS_IMETHODIMP
nsAppStartup::SetInterrupted(PRBool aInterrupted)
{
mInterrupted = aInterrupted;
return NS_OK;
}
NS_IMETHODIMP
nsAppStartup::GetInterrupted(PRBool *aInterrupted)
{
*aInterrupted = mInterrupted;
return NS_OK;
}
//
// nsAppStartup->nsIWindowCreator
//

Просмотреть файл

@ -84,6 +84,7 @@ private:
PRPackedBool mShuttingDown; // Quit method reentrancy check
PRPackedBool mAttemptingQuit; // Quit(eAttemptQuit) still trying
PRPackedBool mRestart; // Quit(eRestart)
PRPackedBool mInterrupted; // Was startup interrupted by an interactive prompt?
};
#endif // nsAppStartup_h__

Просмотреть файл

@ -41,7 +41,7 @@
interface nsICmdLineService;
[scriptable, uuid(68b4b481-e21b-478f-8d75-41b131e1c261)]
[scriptable, uuid(35fcdb69-3bb6-4484-b99a-32f49a84fabd)]
interface nsIAppStartup : nsISupports
{
/**
@ -135,6 +135,11 @@ interface nsIAppStartup : nsISupports
* Properties may not be available depending on platform or application
*/
void getStartupInfo();
/**
* True if startup was interrupted by an interactive prompt.
*/
attribute boolean interrupted;
};
%{C++

Просмотреть файл

@ -86,6 +86,7 @@ let initTable = [
["vc", "@mozilla.org/xpcom/version-comparator;1", "nsIVersionComparator"],
["wm", "@mozilla.org/appshell/window-mediator;1", "nsIWindowMediator"],
["ww", "@mozilla.org/embedcomp/window-watcher;1", "nsIWindowWatcher"],
["startup", "@mozilla.org/toolkit/app-startup;1", "nsIAppStartup"],
];
initTable.forEach(function ([name, contract, intf])

Просмотреть файл

@ -38,7 +38,7 @@
<!-- point 4 text for unbranded builds -->
<!ENTITY rights.intro-point4a-unbranded "If this product incorporates web services, any applicable service terms for the service(s) should be linked to the ">
<!ENTITY rights.intro-point4b-unbranded "Web Site Services">
<!ENTITY rights.intro-point4b-unbranded "Website Services">
<!ENTITY rights.intro-point4c-unbranded " section.">
<!ENTITY rights2.webservices-header "&brandFullName; Web-Based Information Services">
@ -70,7 +70,7 @@
<!ENTITY rights.locationawarebrowsing-term4 "Location-Aware Browsing is now disabled">
<!-- intro paragraph for unbranded builds -->
<!ENTITY rights.webservices-unbranded "An overview of the web site services the product incorporates, along with instructions on how to disable them, if applicable, should be included here.">
<!ENTITY rights.webservices-unbranded "An overview of the website services the product incorporates, along with instructions on how to disable them, if applicable, should be included here.">
<!-- point 1 text for unbranded builds -->
<!ENTITY rights.webservices-term1-unbranded "Any applicable service terms for this product should be listed here.">

Просмотреть файл

@ -4,7 +4,7 @@
<!ENTITY aboutSupport.pageSubtitle "
This page contains technical information that might be useful when you're
trying to solve a problem. If you are looking for answers to common questions
about &brandShortName;, check out our <a id='supportLink'>support web site</a>.
about &brandShortName;, check out our <a id='supportLink'>support website</a>.
">
<!ENTITY aboutSupport.extensionsTitle "Extensions">

Просмотреть файл

@ -21,7 +21,7 @@
<!ENTITY found.top.label "Select the add-ons you would like to install:">
<!ENTITY found.disabledXPinstall.label "These updates can't be installed because software installation is currently
disabled. You can change this setting below.">
<!ENTITY found.enableXPInstall.label "Allow web sites to install software">
<!ENTITY found.enableXPInstall.label "Allow websites to install software">
<!ENTITY found.enableXPInstall.accesskey "A">
<!ENTITY installing.wizard.title "Installing Compatible Add-ons">

Просмотреть файл

@ -1707,6 +1707,9 @@ var XPIProvider = {
* Shows the "Compatibility Updates" UI
*/
showUpgradeUI: function XPI_showUpgradeUI() {
// Flip a flag to indicate that we interrupted startup with an interactive prompt
Services.startup.interrupted = true;
if (!Prefs.getBoolPref(PREF_SHOWN_SELECTION_UI, false)) {
// This *must* be modal as it has to block startup.
var features = "chrome,centerscreen,dialog,titlebar,modal";

Просмотреть файл

@ -58,6 +58,7 @@ var WindowWatcher = {
arguments: null,
openWindow: function(parent, url, name, features, arguments) {
do_check_true(Services.startup.interrupted);
do_check_eq(url, URI_EXTENSION_UPDATE_DIALOG);
do_check_true(this.expected);
this.expected = false;