Merge from mozilla-central.

This commit is contained in:
David Anderson 2012-08-15 14:22:26 -07:00
commit 58e1815704
745 changed files with 13483 additions and 8382 deletions

View File

@ -20,9 +20,6 @@
return NS_OK; \
} else
#define NS_OK_DEFUNCT_OBJECT \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x22)
#define NS_ENSURE_A11Y_SUCCESS(res, ret) \
PR_BEGIN_MACRO \
nsresult __rv = res; /* Don't evaluate |res| more than once */ \

View File

@ -17,10 +17,6 @@
class Accessible;
class nsIAccessibleTraversalRule;
// raised when current pivot's position is needed but it is not in the tree.
#define NS_ERROR_NOT_IN_TREE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 0x26)
/**
* Class represents an accessible pivot.
*/

View File

@ -19,9 +19,6 @@
using namespace mozilla::a11y;
#define NS_OK_NO_NAME_CLAUSE_HANDLED \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x24)
////////////////////////////////////////////////////////////////////////////////
// nsTextEquivUtils. Public.

View File

@ -78,18 +78,6 @@ class nsIView;
typedef nsRefPtrHashtable<nsPtrHashKey<const void>, Accessible>
AccessibleHashtable;
// see Accessible::GetAttrValue
#define NS_OK_NO_ARIA_VALUE \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x21)
// see Accessible::GetNameInternal
#define NS_OK_EMPTY_NAME \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x23)
// see Accessible::GetNameInternal
#define NS_OK_NAME_FROM_TOOLTIP \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 0x25)
#define NS_ACCESSIBLE_IMPL_IID \
{ /* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */ \

View File

@ -33,7 +33,7 @@
#include "nsITableLayout.h"
#include "nsITableCellLayout.h"
#include "nsFrameSelection.h"
#include "nsLayoutErrors.h"
#include "nsError.h"
#include "nsArrayUtils.h"
#include "nsComponentManagerUtils.h"

View File

@ -142,6 +142,10 @@ pref("browser.xul.error_pages.enabled", true);
// disable color management
pref("gfx.color_management.mode", 0);
//prefer Azure/Cairo canvas
pref("gfx.canvas.azure.enabled", true);
pref("gfx.canvas.azure.backends", "cairo");
// don't allow JS to move and resize existing windows
pref("dom.disable_window_move_resize", true);
@ -315,6 +319,9 @@ pref("urlclassifier.alternate_error_page", "blocked");
// The number of random entries to send with a gethash request.
pref("urlclassifier.gethashnoise", 4);
// Randomize all UrlClassifier data with a per-client key.
pref("urlclassifier.randomizeclient", true);
// The list of tables that use the gethash request to confirm partial results.
pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
@ -323,9 +330,6 @@ pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
// the database.
pref("urlclassifier.confirm-age", 2700);
// Maximum size of the sqlite3 cache during an update, in bytes
pref("urlclassifier.updatecachemax", 4194304);
// URL for checking the reason for a malware warning.
pref("browser.safebrowsing.malware.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
#endif

View File

@ -76,12 +76,8 @@
function retryThis(buttonEl)
{
// If this is the "Offline mode" page, go online!
if (getErrorCode() == "netOffline") {
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils)
.goOnline();
}
// Note: The application may wish to handle switching off "offline mode"
// before this event handler runs, by using a capturing event handler.
// Session history has the URL of the page that failed
// to load, not the one of the error page. So, just call

View File

@ -1,4 +1,4 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# -*- Mode: JavaScript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
@ -728,6 +728,9 @@ pref("urlclassifier.alternate_error_page", "blocked");
// The number of random entries to send with a gethash request.
pref("urlclassifier.gethashnoise", 4);
// Randomize all UrlClassifier data with a per-client key.
pref("urlclassifier.randomizeclient", true);
// The list of tables that use the gethash request to confirm partial results.
pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
@ -735,12 +738,6 @@ pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
// a gethash request will be forced to check that the result is still in
// the database.
pref("urlclassifier.confirm-age", 2700);
// Maximum size of the sqlite3 cache during an update, in bytes
pref("urlclassifier.updatecachemax", 41943040);
// Maximum size of the sqlite3 cache for lookups, in bytes
pref("urlclassifier.lookupcachemax", 1048576);
#endif
pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html [
<!ENTITY % htmlDTD

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html [
<!ENTITY % htmlDTD

View File

@ -459,6 +459,11 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
display: none;
}
#notification-popup .text-link.custom-link {
-moz-binding: url("chrome://global/content/bindings/text.xml#text-label");
text-decoration: none;
}
#invalid-form-popup > description {
max-width: 280px;
}
@ -471,6 +476,10 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#addon-progress-notification");
}
#identity-request-notification {
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#identity-request-notification");
}
/* override hidden="true" for the status bar compatibility shim
in case it was persisted for the real status bar */
#status-bar {

View File

@ -564,6 +564,7 @@
onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
<box id="notification-popup-box" hidden="true" align="center">
<image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
<image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>

View File

@ -1,7 +1,7 @@
# -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/newtab/newTab.css" type="text/css"?>

View File

@ -1,8 +1,8 @@
# -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var browser;
var dialog = {};

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

View File

@ -1,7 +1,7 @@
# -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function initFeedTab()
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE bindings [
<!ENTITY % pageInfoDTD SYSTEM "chrome://browser/locale/pageInfo.dtd">

View File

@ -1,6 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const UNKNOWN = nsIPermissionManager.UNKNOWN_ACTION; // 0
const ALLOW = nsIPermissionManager.ALLOW_ACTION; // 1

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var security = {
// Display the server certificate (static)

View File

@ -1,7 +1,7 @@
# -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
let Cc = Components.classes;
let Ci = Components.interfaces;

View File

@ -1,9 +1,8 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE prefwindow [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<bindings id="tabBindings"
xmlns="http://www.mozilla.org/xbl"

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/aboutSyncTabs.css" type="text/css"?>

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/syncSetup.css" type="text/css"?>

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/syncSetup.css" type="text/css"?>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html [
<!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
@ -22,7 +22,7 @@
<style type="text/css">
#synckey { font-size: 150% }
footer { font-size: 70% }
# Bug 575675: Need to have an a:visited rule in a chrome document.
/* Bug 575675: Need to have an a:visited rule in a chrome document. */
a:visited { color: purple; }
</style>
</head>

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE bindings [
<!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html [
<!ENTITY % htmlDTD

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/syncQuota.css"?>

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/syncSetup.css" type="text/css"?>
@ -479,10 +479,10 @@
</vbox>
</deck>
</wizardpage>
# In terms of the wizard flow shown to the user, the 'syncOptionsConfirm'
# page above is not the last wizard page. To prevent the wizard binding from
# assuming that it is, we're inserting this dummy page here. This also means
# that the wizard needs to always be closed manually via wizardFinish().
<!-- In terms of the wizard flow shown to the user, the 'syncOptionsConfirm'
page above is not the last wizard page. To prevent the wizard binding from
assuming that it is, we're inserting this dummy page here. This also means
that the wizard needs to always be closed manually via wizardFinish(). -->
<wizardpage>
</wizardpage>
</wizard>

View File

@ -78,7 +78,7 @@ function runNextTest() {
onHidden.call(nextTest, this);
if (!onHiddenArray.length)
goNext();
});
}.bind(this));
}, onHiddenArray.length);
info("[Test #" + gTestIndex + "] added listeners; panel state: " + PopupNotifications.isPanelOpen);
}

View File

@ -1175,6 +1175,261 @@
</implementation>
</binding>
<binding id="identity-request-notification" extends="chrome://global/content/bindings/notification.xml#popup-notification">
<content align="start">
<xul:image class="popup-notification-icon"
xbl:inherits="popupid,src=icon"/>
<xul:vbox flex="1">
<xul:vbox anonid="identity-deck">
<xul:vbox flex="1" pack="center"> <!-- 1: add an email -->
<html:input type="email" anonid="email" required="required" size="30"/>
<xul:description anonid="newidentitydesc"/>
<xul:spacer flex="1"/>
<xul:label class="text-link custom-link small-margin" anonid="chooseemail" hidden="true"/>
</xul:vbox>
<xul:vbox flex="1" hidden="true"> <!-- 2: choose an email -->
<xul:description anonid="chooseidentitydesc"/>
<xul:radiogroup anonid="identities">
</xul:radiogroup>
<xul:label class="text-link custom-link" anonid="newemail"/>
</xul:vbox>
</xul:vbox>
<xul:hbox class="popup-notification-button-container"
pack="end" align="center">
<xul:label anonid="tos" class="text-link" hidden="true"/>
<xul:label anonid="privacypolicy" class="text-link" hidden="true"/>
<xul:spacer flex="1"/>
<xul:image anonid="throbber" src="chrome://browser/skin/tabbrowser/loading.png"
style="visibility:hidden" width="16" height="16"/>
<xul:button anonid="button"
type="menu-button"
class="popup-notification-menubutton"
xbl:inherits="oncommand=buttoncommand,label=buttonlabel,accesskey=buttonaccesskey">
<xul:menupopup anonid="menupopup"
xbl:inherits="oncommand=menucommand">
<children/>
<xul:menuitem class="menuitem-iconic popup-notification-closeitem"
label="&closeNotificationItem.label;"
xbl:inherits="oncommand=closeitemcommand"/>
</xul:menupopup>
</xul:button>
</xul:hbox>
</xul:vbox>
<xul:vbox pack="start">
<xul:toolbarbutton anonid="closebutton"
class="messageCloseButton popup-notification-closebutton tabbable"
xbl:inherits="oncommand=closebuttoncommand"
tooltiptext="&closeNotification.tooltip;"/>
</xul:vbox>
</content>
<implementation>
<constructor><![CDATA[
// this.notification.options.identity is used to pass identity-specific info to the binding
let origin = this.identity.origin
// Populate text
this.emailField.placeholder = gNavigatorBundle.
getString("identity.newIdentity.email.placeholder");
this.newIdentityDesc.textContent = gNavigatorBundle.getFormattedString(
"identity.newIdentity.description", [origin]);
this.chooseIdentityDesc.textContent = gNavigatorBundle.getFormattedString(
"identity.chooseIdentity.description", [origin]);
// Show optional terms of service and privacy policy links
this._populateLink(this.identity.termsOfService, "tos", "identity.termsOfService");
this._populateLink(this.identity.privacyPolicy, "privacypolicy", "identity.privacyPolicy");
// Populate the list of identities to choose from. The origin is used to provide
// better suggestions.
let identities = this.SignInToWebsiteUX.getIdentitiesForSite(origin);
this._populateIdentityList(identities);
if (typeof this.step == "undefined") {
// First opening of this notification
// Show the add email pane (0) if there are no existing identities otherwise show the list
this.step = "result" in identities && identities.result.length ? 1 : 0;
} else {
// Already opened so restore previous state
if (this.identity.typedEmail) {
this.emailField.value = this.identity.typedEmail;
}
if (this.identity.selected) {
// If the user already chose an identity then update the UI to reflect that
this.onIdentitySelected();
}
// Update the view for the step
this.step = this.step;
}
// Fire notification with the chosen identity when main button is clicked
this.button.addEventListener("command", this._onButtonCommand.bind(this), true);
// Do the same if enter is pressed in the email field
this.emailField.addEventListener("keypress", function emailFieldKeypress(aEvent) {
if (aEvent.keyCode != aEvent.DOM_VK_RETURN)
return;
this._onButtonCommand(aEvent);
}.bind(this));
this.addEmailLink.value = gNavigatorBundle.getString("identity.newIdentity.label");
this.addEmailLink.accessKey = gNavigatorBundle.getString("identity.newIdentity.accessKey");
this.addEmailLink.addEventListener("click", function addEmailClick(evt) {
this.step = 0;
}.bind(this));
this.chooseEmailLink.value = gNavigatorBundle.getString("identity.chooseIdentity.label");
this.chooseEmailLink.hidden = !("result" in identities && identities.result.length);
this.chooseEmailLink.addEventListener("click", function chooseEmailClick(evt) {
this.step = 1;
}.bind(this));
this.emailField.addEventListener("blur", function onEmailBlur() {
this.identity.typedEmail = this.emailField.value;
}.bind(this));
]]></constructor>
<field name="SignInToWebsiteUX" readonly="true">
let sitw = {};
Components.utils.import("resource:///modules/SignInToWebsite.jsm", sitw);
sitw.SignInToWebsiteUX;
</field>
<field name="newIdentityDesc" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "newidentitydesc");
</field>
<field name="chooseIdentityDesc" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "chooseidentitydesc");
</field>
<field name="identityList" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "identities");
</field>
<field name="emailField" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "email");
</field>
<field name="addEmailLink" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "newemail");
</field>
<field name="chooseEmailLink" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "chooseemail");
</field>
<field name="throbber" readonly="true">
document.getAnonymousElementByAttribute(this, "anonid", "throbber");
</field>
<field name="identity" readonly="true">
this.notification.options.identity;
</field>
<!-- persist the state on the identity object so we can re-create the
notification state upon re-opening -->
<property name="step">
<getter>
return this.identity.step;
</getter>
<setter><![CDATA[
let deck = document.getAnonymousElementByAttribute(this, "anonid", "identity-deck");
for (let i = 0; i < deck.children.length; i++) {
deck.children[i].hidden = (val != i);
}
this.identity.step = val;
switch (val) {
case 0:
this.emailField.focus();
break;
}]]>
</setter>
</property>
<method name="onIdentitySelected">
<body><![CDATA[
this.throbber.style.visibility = "visible";
this.button.disabled = true;
this.emailField.value = this.identity.selected
this.emailField.disabled = true;
this.identityList.disabled = true;
]]></body>
</method>
<method name="_populateLink">
<parameter name="aURL"/>
<parameter name="aLinkId"/>
<parameter name="aStringId"/>
<body><![CDATA[
if (aURL) {
// Show optional link to aURL
let link = document.getAnonymousElementByAttribute(this, "anonid", aLinkId);
link.value = gNavigatorBundle.getString(aStringId);
link.href = aURL;
link.hidden = false;
}
]]></body>
</method>
<method name="_populateIdentityList">
<parameter name="aIdentities"/>
<body><![CDATA[
let foundLastUsed = false;
let lastUsed = this.identity.selected || aIdentities.lastUsed;
for (let id in aIdentities.result) {
let label = aIdentities.result[id];
let opt = this.identityList.appendItem(label);
if (label == lastUsed) {
this.identityList.selectedItem = opt;
foundLastUsed = true;
}
}
if (!foundLastUsed) {
this.identityList.selectedIndex = -1;
}
]]></body>
</method>
<method name="_onButtonCommand">
<parameter name="aEvent"/>
<body><![CDATA[
if (aEvent.target != aEvent.currentTarget)
return;
let chosenId;
switch (this.step) {
case 0:
aEvent.stopPropagation();
if (!this.emailField.validity.valid) {
this.emailField.focus();
return;
}
chosenId = this.emailField.value;
break;
case 1:
aEvent.stopPropagation();
let selectedItem = this.identityList.selectedItem
chosenId = selectedItem ? selectedItem.label : null;
if (!chosenId)
return;
break;
default:
throw new Error("Unknown case");
return;
}
// Actually select the identity
this.SignInToWebsiteUX.selectIdentity(this.identity.rpId, chosenId);
this.identity.selected = chosenId;
this.onIdentitySelected();
]]></body>
</method>
</implementation>
</binding>
<binding id="splitmenu">
<content>
<xul:hbox anonid="menuitem" flex="1"

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const NS_ERROR_MODULE_NETWORK = 2152398848;
const NS_NET_STATUS_READ_FROM = NS_ERROR_MODULE_NETWORK + 8;

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
# -*- Mode: HTML -*-
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: HTML -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<overlay id="win6-browser-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

View File

@ -17,10 +17,10 @@ browser.jar:
% style chrome://global/content/customizeToolbar.xul chrome://browser/skin/
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
* content/browser/aboutDialog.js (content/aboutDialog.js)
* content/browser/aboutDialog.css (content/aboutDialog.css)
* content/browser/aboutRobots.xhtml (content/aboutRobots.xhtml)
* content/browser/abouthome/aboutHome.xhtml (content/abouthome/aboutHome.xhtml)
* content/browser/abouthome/aboutHome.js (content/abouthome/aboutHome.js)
content/browser/aboutDialog.css (content/aboutDialog.css)
content/browser/aboutRobots.xhtml (content/aboutRobots.xhtml)
content/browser/abouthome/aboutHome.xhtml (content/abouthome/aboutHome.xhtml)
content/browser/abouthome/aboutHome.js (content/abouthome/aboutHome.js)
* content/browser/abouthome/aboutHome.css (content/abouthome/aboutHome.css)
content/browser/abouthome/snippet1.png (content/abouthome/snippet1.png)
content/browser/abouthome/snippet2.png (content/abouthome/snippet2.png)
@ -41,51 +41,51 @@ browser.jar:
* content/browser/browser.js (content/browser.js)
* content/browser/browser.xul (content/browser.xul)
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
* content/browser/content.js (content/content.js)
* content/browser/newtab/newTab.xul (content/newtab/newTab.xul)
content/browser/content.js (content/content.js)
content/browser/newtab/newTab.xul (content/newtab/newTab.xul)
* content/browser/newtab/newTab.js (content/newtab/newTab.js)
content/browser/newtab/newTab.css (content/newtab/newTab.css)
* content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul)
* content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js)
* content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)
* content/browser/pageinfo/pageInfo.xml (content/pageinfo/pageInfo.xml)
* content/browser/pageinfo/feeds.js (content/pageinfo/feeds.js)
* content/browser/pageinfo/feeds.xml (content/pageinfo/feeds.xml)
* content/browser/pageinfo/permissions.js (content/pageinfo/permissions.js)
* content/browser/pageinfo/security.js (content/pageinfo/security.js)
content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)
content/browser/pageinfo/pageInfo.xml (content/pageinfo/pageInfo.xml)
content/browser/pageinfo/feeds.js (content/pageinfo/feeds.js)
content/browser/pageinfo/feeds.xml (content/pageinfo/feeds.xml)
content/browser/pageinfo/permissions.js (content/pageinfo/permissions.js)
content/browser/pageinfo/security.js (content/pageinfo/security.js)
#ifdef MOZ_SERVICES_SYNC
* content/browser/sync/aboutSyncTabs.xul (content/sync/aboutSyncTabs.xul)
content/browser/sync/aboutSyncTabs.xul (content/sync/aboutSyncTabs.xul)
content/browser/sync/aboutSyncTabs.js (content/sync/aboutSyncTabs.js)
content/browser/sync/aboutSyncTabs.css (content/sync/aboutSyncTabs.css)
* content/browser/sync/aboutSyncTabs-bindings.xml (content/sync/aboutSyncTabs-bindings.xml)
* content/browser/sync/setup.xul (content/sync/setup.xul)
content/browser/sync/aboutSyncTabs-bindings.xml (content/sync/aboutSyncTabs-bindings.xml)
content/browser/sync/setup.xul (content/sync/setup.xul)
content/browser/sync/addDevice.js (content/sync/addDevice.js)
* content/browser/sync/addDevice.xul (content/sync/addDevice.xul)
content/browser/sync/addDevice.xul (content/sync/addDevice.xul)
content/browser/sync/setup.js (content/sync/setup.js)
* content/browser/sync/genericChange.xul (content/sync/genericChange.xul)
content/browser/sync/genericChange.xul (content/sync/genericChange.xul)
content/browser/sync/genericChange.js (content/sync/genericChange.js)
* content/browser/sync/key.xhtml (content/sync/key.xhtml)
* content/browser/sync/notification.xml (content/sync/notification.xml)
* content/browser/sync/quota.xul (content/sync/quota.xul)
content/browser/sync/key.xhtml (content/sync/key.xhtml)
content/browser/sync/notification.xml (content/sync/notification.xml)
content/browser/sync/quota.xul (content/sync/quota.xul)
content/browser/sync/quota.js (content/sync/quota.js)
content/browser/sync/utils.js (content/sync/utils.js)
content/browser/sync/progress.js (content/sync/progress.js)
* content/browser/sync/progress.xhtml (content/sync/progress.xhtml)
content/browser/sync/progress.xhtml (content/sync/progress.xhtml)
#endif
* content/browser/openLocation.js (content/openLocation.js)
* content/browser/openLocation.xul (content/openLocation.xul)
* content/browser/safeMode.css (content/safeMode.css)
* content/browser/safeMode.js (content/safeMode.js)
* content/browser/safeMode.xul (content/safeMode.xul)
content/browser/openLocation.js (content/openLocation.js)
content/browser/openLocation.xul (content/openLocation.xul)
content/browser/safeMode.css (content/safeMode.css)
content/browser/safeMode.js (content/safeMode.js)
content/browser/safeMode.xul (content/safeMode.xul)
* content/browser/sanitize.js (content/sanitize.js)
* content/browser/sanitize.xul (content/sanitize.xul)
* content/browser/sanitizeDialog.js (content/sanitizeDialog.js)
content/browser/sanitizeDialog.css (content/sanitizeDialog.css)
* content/browser/tabbrowser.css (content/tabbrowser.css)
content/browser/tabbrowser.css (content/tabbrowser.css)
* content/browser/tabbrowser.xml (content/tabbrowser.xml)
* content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
* content/browser/utilityOverlay.js (content/utilityOverlay.js)
* content/browser/web-panels.js (content/web-panels.js)
content/browser/web-panels.js (content/web-panels.js)
* content/browser/web-panels.xul (content/web-panels.xul)
* content/browser/baseMenuOverlay.xul (content/baseMenuOverlay.xul)
* content/browser/nsContextMenu.js (content/nsContextMenu.js)
@ -99,7 +99,7 @@ browser.jar:
#endif
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
#ifdef XP_WIN
* content/browser/win6BrowserOverlay.xul (content/win6BrowserOverlay.xul)
content/browser/win6BrowserOverlay.xul (content/win6BrowserOverlay.xul)
#endif
content/browser/social-icon.png (content/social-icon.png)
# the following files are browser-specific overrides

View File

@ -1,9 +1,10 @@
<?xml version="1.0"?>
# -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# vim: set ts=2 et sw=2 tw=80:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- -->
<!-- vim: set ts=2 et sw=2 tw=80: -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE bindings SYSTEM "chrome://browser/locale/downloads/downloads.dtd">

View File

@ -1,9 +1,10 @@
<?xml version="1.0"?>
# -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# vim: set ts=2 et sw=2 tw=80:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- -->
<!-- vim: set ts=2 et sw=2 tw=80: -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>

View File

@ -3,9 +3,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
* content/browser/downloads/download.xml (content/download.xml)
content/browser/downloads/download.xml (content/download.xml)
content/browser/downloads/downloads.css (content/downloads.css)
content/browser/downloads/downloads.js (content/downloads.js)
* content/browser/downloads/downloadsOverlay.xul (content/downloadsOverlay.xul)
content/browser/downloads/indicator.js (content/indicator.js)
* content/browser/downloads/indicatorOverlay.xul (content/indicatorOverlay.xul)
content/browser/downloads/indicatorOverlay.xul (content/indicatorOverlay.xul)

View File

@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
* content/browser/feeds/subscribe.xhtml (content/subscribe.xhtml)
* content/browser/feeds/subscribe.js (content/subscribe.js)
* content/browser/feeds/subscribe.xml (content/subscribe.xml)
content/browser/feeds/subscribe.xhtml (content/subscribe.xhtml)
content/browser/feeds/subscribe.js (content/subscribe.js)
content/browser/feeds/subscribe.xml (content/subscribe.xml)
content/browser/feeds/subscribe.css (content/subscribe.css)

View File

@ -1,7 +1,7 @@
# -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/debug.js");

View File

@ -22,12 +22,12 @@ DEFINES += \
EXTRA_COMPONENTS = \
BrowserFeeds.manifest \
FeedConverter.js \
WebContentConverter.js \
$(NULL)
EXTRA_PP_COMPONENTS = \
FeedConverter.js \
FeedWriter.js \
WebContentConverter.js \
$(NULL)

View File

@ -1,7 +1,7 @@
# -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -4,4 +4,4 @@
browser.jar:
* content/browser/migration/migration.xul (content/migration.xul)
* content/browser/migration/migration.js (content/migration.js)
content/browser/migration/migration.js (content/migration.js)

View File

@ -15,18 +15,24 @@ LIBRARY_NAME = migration_s
FORCE_STATIC_LIB = 1
USE_STATIC_LIBS = 1
EXTRA_PP_COMPONENTS = \
EXTRA_COMPONENTS = \
ProfileMigrator.js \
ChromeProfileMigrator.js \
FirefoxProfileMigrator.js \
$(NULL)
EXTRA_PP_COMPONENTS = \
ChromeProfileMigrator.js \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
CPPSRCS += nsIEHistoryEnumerator.cpp
EXTRA_PP_COMPONENTS += IEProfileMigrator.js \
SafariProfileMigrator.js \
EXTRA_COMPONENTS += IEProfileMigrator.js \
$(NULL)
EXTRA_PP_COMPONENTS += SafariProfileMigrator.js \
$(NULL)
DEFINES += -DHAS_IE_MIGRATOR -DHAS_SAFARI_MIGRATOR
endif

View File

@ -12,6 +12,7 @@ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/SignInToWebsite.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
"resource://gre/modules/AddonManager.jsm");
@ -25,7 +26,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils",
"resource://gre/modules/BookmarkHTMLUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "webappsUI",
XPCOMUtils.defineLazyModuleGetter(this, "webappsUI",
"resource:///modules/webappsUI.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs",
@ -308,6 +309,7 @@ BrowserGlue.prototype = {
if (this._isPlacesShutdownObserver)
os.removeObserver(this, "places-shutdown");
webappsUI.uninit();
SignInToWebsiteUX.uninit();
},
_onAppDefaults: function BG__onAppDefaults() {
@ -337,6 +339,8 @@ BrowserGlue.prototype = {
PageThumbs.init();
SignInToWebsiteUX.init();
PdfJs.init();
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function init() {
document.getElementById("bookmarks-view").place =

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css"?>

View File

@ -1,6 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gHistoryTree;
var gSearchBox;

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>

View File

@ -1,6 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<bindings id="placesTreeBindings"
xmlns="http://www.mozilla.org/xbl"

View File

@ -5,28 +5,28 @@
browser.jar:
# Provide another URI for the bookmarkProperties dialog so we can persist the
# attributes separately
* content/browser/places/bookmarkProperties2.xul (content/bookmarkProperties.xul)
content/browser/places/bookmarkProperties2.xul (content/bookmarkProperties.xul)
* content/browser/places/places.xul (content/places.xul)
* content/browser/places/places.js (content/places.js)
content/browser/places/places.css (content/places.css)
content/browser/places/organizer.css (content/organizer.css)
* content/browser/places/bookmarkProperties.xul (content/bookmarkProperties.xul)
* content/browser/places/bookmarkProperties.js (content/bookmarkProperties.js)
* content/browser/places/placesOverlay.xul (content/placesOverlay.xul)
content/browser/places/bookmarkProperties.xul (content/bookmarkProperties.xul)
content/browser/places/bookmarkProperties.js (content/bookmarkProperties.js)
content/browser/places/placesOverlay.xul (content/placesOverlay.xul)
* content/browser/places/menu.xml (content/menu.xml)
* content/browser/places/tree.xml (content/tree.xml)
* content/browser/places/controller.js (content/controller.js)
* content/browser/places/treeView.js (content/treeView.js)
content/browser/places/tree.xml (content/tree.xml)
content/browser/places/controller.js (content/controller.js)
content/browser/places/treeView.js (content/treeView.js)
* content/browser/places/browserPlacesViews.js (content/browserPlacesViews.js)
# keep the Places version of the history sidebar at history/history-panel.xul
# to prevent having to worry about between versions of the browser
* content/browser/history/history-panel.xul (content/history-panel.xul)
* content/browser/places/history-panel.js (content/history-panel.js)
content/browser/places/history-panel.js (content/history-panel.js)
# ditto for the bookmarks sidebar
* content/browser/bookmarks/bookmarksPanel.xul (content/bookmarksPanel.xul)
* content/browser/bookmarks/bookmarksPanel.js (content/bookmarksPanel.js)
content/browser/bookmarks/bookmarksPanel.xul (content/bookmarksPanel.xul)
content/browser/bookmarks/bookmarksPanel.js (content/bookmarksPanel.js)
* content/browser/bookmarks/sidebarUtils.js (content/sidebarUtils.js)
* content/browser/places/moveBookmarks.xul (content/moveBookmarks.xul)
* content/browser/places/moveBookmarks.js (content/moveBookmarks.js)
* content/browser/places/editBookmarkOverlay.xul (content/editBookmarkOverlay.xul)
* content/browser/places/editBookmarkOverlay.js (content/editBookmarkOverlay.js)
content/browser/places/moveBookmarks.xul (content/moveBookmarks.xul)
content/browser/places/moveBookmarks.js (content/moveBookmarks.js)
content/browser/places/editBookmarkOverlay.xul (content/editBookmarkOverlay.xul)
content/browser/places/editBookmarkOverlay.js (content/editBookmarkOverlay.js)

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/advanced-scripts.dtd">

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>

View File

@ -1,11 +1,9 @@
<?xml version="1.0"?>
<!--
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<!-- -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gConnectionsDialog = {
beforeAccept: function ()

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gContentPane = {

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const nsICookie = Components.interfaces.nsICookie;
@ -572,54 +572,54 @@ var gCookiesWindow = {
},
deleteCookie: function () {
# // Selection Notes
# // - Selection always moves to *NEXT* adjacent item unless item
# // is last child at a given level in which case it moves to *PREVIOUS*
# // item
# //
# // Selection Cases (Somewhat Complicated)
# //
# // 1) Single cookie selected, host has single child
# // v cnn.com
# // //// cnn.com ///////////// goksdjf@ ////
# // > atwola.com
# //
# // Before SelectedIndex: 1 Before RowCount: 3
# // After SelectedIndex: 0 After RowCount: 1
# //
# // 2) Host selected, host open
# // v goats.com ////////////////////////////
# // goats.com sldkkfjl
# // goat.scom flksj133
# // > atwola.com
# //
# // Before SelectedIndex: 0 Before RowCount: 4
# // After SelectedIndex: 0 After RowCount: 1
# //
# // 3) Host selected, host closed
# // > goats.com ////////////////////////////
# // > atwola.com
# //
# // Before SelectedIndex: 0 Before RowCount: 2
# // After SelectedIndex: 0 After RowCount: 1
# //
# // 4) Single cookie selected, host has many children
# // v goats.com
# // goats.com sldkkfjl
# // //// goats.com /////////// flksjl33 ////
# // > atwola.com
# //
# // Before SelectedIndex: 2 Before RowCount: 4
# // After SelectedIndex: 1 After RowCount: 3
# //
# // 5) Single cookie selected, host has many children
# // v goats.com
# // //// goats.com /////////// flksjl33 ////
# // goats.com sldkkfjl
# // > atwola.com
# //
# // Before SelectedIndex: 1 Before RowCount: 4
# // After SelectedIndex: 1 After RowCount: 3
// Selection Notes
// - Selection always moves to *NEXT* adjacent item unless item
// is last child at a given level in which case it moves to *PREVIOUS*
// item
//
// Selection Cases (Somewhat Complicated)
//
// 1) Single cookie selected, host has single child
// v cnn.com
// //// cnn.com ///////////// goksdjf@ ////
// > atwola.com
//
// Before SelectedIndex: 1 Before RowCount: 3
// After SelectedIndex: 0 After RowCount: 1
//
// 2) Host selected, host open
// v goats.com ////////////////////////////
// goats.com sldkkfjl
// goat.scom flksj133
// > atwola.com
//
// Before SelectedIndex: 0 Before RowCount: 4
// After SelectedIndex: 0 After RowCount: 1
//
// 3) Host selected, host closed
// > goats.com ////////////////////////////
// > atwola.com
//
// Before SelectedIndex: 0 Before RowCount: 2
// After SelectedIndex: 0 After RowCount: 1
//
// 4) Single cookie selected, host has many children
// v goats.com
// goats.com sldkkfjl
// //// goats.com /////////// flksjl33 ////
// > atwola.com
//
// Before SelectedIndex: 2 Before RowCount: 4
// After SelectedIndex: 1 After RowCount: 3
//
// 5) Single cookie selected, host has many children
// v goats.com
// //// goats.com /////////// flksjl33 ////
// goats.com sldkkfjl
// > atwola.com
//
// Before SelectedIndex: 1 Before RowCount: 4
// After SelectedIndex: 1 After RowCount: 3
var seln = this._view.selection;
var tbo = this._tree.treeBoxObject;

View File

@ -1,9 +1,9 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
# browser.display.languageList LOCK ALL when LOCKED
// browser.display.languageList LOCK ALL when LOCKED
const kDefaultFontType = "font.default.%LANG%";
const kFontNameFmtSerif = "font.name.serif.%LANG%";

View File

@ -14,7 +14,7 @@ browser.jar:
content/browser/preferences/in-content/privacy.js
* content/browser/preferences/in-content/advanced.xul
* content/browser/preferences/in-content/advanced.js
* content/browser/preferences/in-content/applications.xul
content/browser/preferences/in-content/applications.xul
* content/browser/preferences/in-content/applications.js
content/browser/preferences/in-content/content.xul
content/browser/preferences/in-content/content.js

View File

@ -3,45 +3,45 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
* content/browser/preferences/aboutPermissions.xul
* content/browser/preferences/aboutPermissions.js
* content/browser/preferences/aboutPermissions.css
* content/browser/preferences/aboutPermissions.xml
content/browser/preferences/aboutPermissions.xul
content/browser/preferences/aboutPermissions.js
content/browser/preferences/aboutPermissions.css
content/browser/preferences/aboutPermissions.xml
* content/browser/preferences/advanced.xul
* content/browser/preferences/advanced.js
* content/browser/preferences/advanced-scripts.xul
* content/browser/preferences/applications.xul
content/browser/preferences/advanced-scripts.xul
content/browser/preferences/applications.xul
* content/browser/preferences/applications.js
* content/browser/preferences/applicationManager.xul
content/browser/preferences/applicationManager.xul
* content/browser/preferences/applicationManager.js
* content/browser/preferences/colors.xul
* content/browser/preferences/cookies.xul
* content/browser/preferences/cookies.js
* content/browser/preferences/content.xul
* content/browser/preferences/content.js
content/browser/preferences/cookies.js
content/browser/preferences/content.xul
content/browser/preferences/content.js
* content/browser/preferences/connection.xul
* content/browser/preferences/connection.js
content/browser/preferences/connection.js
* content/browser/preferences/fonts.xul
* content/browser/preferences/fonts.js
* content/browser/preferences/handlers.xml
* content/browser/preferences/handlers.css
content/browser/preferences/fonts.js
content/browser/preferences/handlers.xml
content/browser/preferences/handlers.css
* content/browser/preferences/languages.xul
* content/browser/preferences/languages.js
content/browser/preferences/languages.js
* content/browser/preferences/main.xul
* content/browser/preferences/main.js
content/browser/preferences/main.js
* content/browser/preferences/permissions.xul
* content/browser/preferences/permissions.js
content/browser/preferences/permissions.js
* content/browser/preferences/preferences.xul
* content/browser/preferences/privacy.xul
* content/browser/preferences/privacy.js
* content/browser/preferences/sanitize.xul
* content/browser/preferences/security.xul
* content/browser/preferences/security.js
* content/browser/preferences/selectBookmark.xul
* content/browser/preferences/selectBookmark.js
content/browser/preferences/privacy.xul
content/browser/preferences/privacy.js
content/browser/preferences/sanitize.xul
content/browser/preferences/security.xul
content/browser/preferences/security.js
content/browser/preferences/selectBookmark.xul
content/browser/preferences/selectBookmark.js
#ifdef MOZ_SERVICES_SYNC
* content/browser/preferences/sync.xul
* content/browser/preferences/sync.js
content/browser/preferences/sync.xul
content/browser/preferences/sync.js
#endif
* content/browser/preferences/tabs.xul
* content/browser/preferences/tabs.js

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gLanguagesDialog = {

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
const nsICookiePermission = Components.interfaces.nsICookiePermission;

View File

@ -1,9 +1,7 @@
/*
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>

View File

@ -1,7 +1,7 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var gSecurityPane = {
_pane: null,

View File

@ -1,9 +1,9 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">

View File

@ -1,7 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE overlay [
<!ENTITY % reportphishDTD SYSTEM "chrome://browser/locale/safebrowsing/report-phishing.dtd">
%reportphishDTD;

View File

@ -3,6 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
* content/browser/safebrowsing/report-phishing-overlay.xul (content/report-phishing-overlay.xul)
content/browser/safebrowsing/report-phishing-overlay.xul (content/report-phishing-overlay.xul)
content/browser/safebrowsing/blockedSite.xhtml (content/blockedSite.xhtml)
% overlay chrome://browser/content/browser.xul chrome://browser/content/safebrowsing/report-phishing-overlay.xul

View File

@ -1,6 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm");

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/engineManager.css"?>

View File

@ -5,5 +5,5 @@
browser.jar:
* content/browser/search/search.xml (content/search.xml)
content/browser/search/searchbarBindings.css (content/searchbarBindings.css)
* content/browser/search/engineManager.xul (content/engineManager.xul)
* content/browser/search/engineManager.js (content/engineManager.js)
content/browser/search/engineManager.xul (content/engineManager.xul)
content/browser/search/engineManager.js (content/engineManager.js)

View File

@ -12,12 +12,9 @@ include $(topsrcdir)/config/config.mk
EXTRA_COMPONENTS = \
nsSessionStore.manifest \
$(NULL)
EXTRA_PP_COMPONENTS = \
nsSessionStore.js \
nsSessionStartup.js \
$(NULL)
$(NULL)
JS_MODULES_PATH := $(FINAL_TARGET)/modules/sessionstore

View File

@ -1,35 +1,33 @@
/*
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
# * Session Storage and Restoration
# *
# * Overview
# * This service reads user's session file at startup, and makes a determination
# * as to whether the session should be restored. It will restore the session
# * under the circumstances described below. If the auto-start Private Browsing
# * mode is active, however, the session is never restored.
# *
# * Crash Detection
# * The session file stores a session.state property, that
# * indicates whether the browser is currently running. When the browser shuts
# * down, the field is changed to "stopped". At startup, this field is read, and
# * if its value is "running", then it's assumed that the browser had previously
# * crashed, or at the very least that something bad happened, and that we should
# * restore the session.
# *
# * Forced Restarts
# * In the event that a restart is required due to application update or extension
# * installation, set the browser.sessionstore.resume_session_once pref to true,
# * and the session will be restored the next time the browser starts.
# *
# * Always Resume
# * This service will always resume the session if the integer pref
# * browser.startup.page is set to 3.
*/
* Session Storage and Restoration
*
* Overview
* This service reads user's session file at startup, and makes a determination
* as to whether the session should be restored. It will restore the session
* under the circumstances described below. If the auto-start Private Browsing
* mode is active, however, the session is never restored.
*
* Crash Detection
* The session file stores a session.state property, that
* indicates whether the browser is currently running. When the browser shuts
* down, the field is changed to "stopped". At startup, this field is read, and
* if its value is "running", then it's assumed that the browser had previously
* crashed, or at the very least that something bad happened, and that we should
* restore the session.
*
* Forced Restarts
* In the event that a restart is required due to application update or extension
* installation, set the browser.sessionstore.resume_session_once pref to true,
* and the session will be restored the next time the browser starts.
*
* Always Resume
* This service will always resume the session if the integer pref
* browser.startup.page is set to 3.
*/
/* :::::::: Constants and Helpers ::::::::::::::: */

View File

@ -10,8 +10,10 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXTRA_COMPONENTS = nsSidebar.manifest
EXTRA_PP_COMPONENTS = nsSidebar.js
EXTRA_COMPONENTS = \
nsSidebar.manifest \
nsSidebar.js \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -1,7 +1,7 @@
# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -14,7 +14,7 @@ EXTRA_COMPONENTS = \
PageThumbsProtocol.js \
$(NULL)
EXTRA_PP_JS_MODULES = \
EXTRA_JS_MODULES = \
PageThumbs.jsm \
$(NULL)

View File

@ -35,7 +35,7 @@ MOCHITEST_BROWSER_TESTS = \
browser_dbg_propertyview-09.js \
browser_dbg_propertyview-10.js \
browser_dbg_propertyview-edit.js \
browser_dbg_reload-same-script.js \
$(warning browser_dbg_reload-same-script.js temporarily disabled due to oranges, see bug 780198 & bug 782179) \
browser_dbg_panesize.js \
browser_dbg_panesize-inner.js \
browser_dbg_stack-01.js \

View File

@ -401,6 +401,7 @@
@BINPATH@/components/nsPlacesExpiration.js
@BINPATH@/components/PlacesProtocolHandler.js
@BINPATH@/components/PlacesCategoriesStarter.js
@BINPATH@/components/ColorAnalyzer.js
@BINPATH@/components/PageThumbsProtocol.js
@BINPATH@/components/nsDefaultCLH.manifest
@BINPATH@/components/nsDefaultCLH.js

View File

@ -383,3 +383,21 @@ social.remove.accesskey=R
# LOCALIZATION NOTE (social.enabled.message): %1$S is the name of the social provider, %2$S is brandShortName (e.g. Firefox)
social.activated.message=%1$S integration with %2$S has been activated.
# Identity notifications popups
identity.termsOfService = Terms of Service
identity.privacyPolicy = Privacy Policy
identity.chooseIdentity.description = Sign in to %S
identity.chooseIdentity.label = Use an existing email
identity.newIdentity.label = Use a different email
identity.newIdentity.accessKey = e
identity.newIdentity.email.placeholder = Email
# LOCALIZATION NOTE (identity.newIdentity.description, identity.chooseIdentity.description): %S is the website origin (ie. https://www.mozilla.org) shown in popup notifications.
identity.newIdentity.description = Enter your email address to sign in to %S
identity.next.label = Next
identity.next.accessKey = n
# LOCALIZATION NOTE: shown in the popup notification when a user successfully logs into a website
# LOCALIZATION NOTE (identity.loggedIn.description): %S is the website origin (ie. https://www.mozilla.org)
identity.loggedIn.description = Signed in as: %S
identity.loggedIn.signOut.label = Sign Out
identity.loggedIn.signOut.accessKey = O

View File

@ -1,8 +1,6 @@
<!--
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY pageInfoWindow.width "600">
<!ENTITY pageInfoWindow.height "500">

View File

@ -1,8 +1,7 @@
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<!-- -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY settingsChangePreferences.label "Settings can be changed using the Applications tab in &brandShortName;'s Preferences.">
<!ENTITY settingsChangeOptions.label "Settings can be changed using the Applications tab in &brandShortName;'s Options.">

View File

@ -16,7 +16,7 @@
locale/browser/syncProgress.dtd (%chrome/browser/syncProgress.dtd)
locale/browser/aboutSyncTabs.dtd (%chrome/browser/aboutSyncTabs.dtd)
#endif
* locale/browser/browser.dtd (%chrome/browser/browser.dtd)
locale/browser/browser.dtd (%chrome/browser/browser.dtd)
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)
locale/browser/browser.properties (%chrome/browser/browser.properties)
locale/browser/devtools/debugger.dtd (%chrome/browser/devtools/debugger.dtd)
@ -41,10 +41,10 @@
locale/browser/newTab.properties (%chrome/browser/newTab.properties)
locale/browser/openLocation.dtd (%chrome/browser/openLocation.dtd)
locale/browser/openLocation.properties (%chrome/browser/openLocation.properties)
* locale/browser/pageInfo.dtd (%chrome/browser/pageInfo.dtd)
locale/browser/pageInfo.dtd (%chrome/browser/pageInfo.dtd)
locale/browser/pageInfo.properties (%chrome/browser/pageInfo.properties)
locale/browser/quitDialog.properties (%chrome/browser/quitDialog.properties)
* locale/browser/safeMode.dtd (%chrome/browser/safeMode.dtd)
locale/browser/safeMode.dtd (%chrome/browser/safeMode.dtd)
locale/browser/sanitize.dtd (%chrome/browser/sanitize.dtd)
locale/browser/search.properties (%chrome/browser/search.properties)
locale/browser/searchbar.dtd (%chrome/browser/searchbar.dtd)
@ -75,7 +75,7 @@
locale/browser/preferences/aboutPermissions.dtd (%chrome/browser/preferences/aboutPermissions.dtd)
locale/browser/preferences/aboutPermissions.properties (%chrome/browser/preferences/aboutPermissions.properties)
locale/browser/preferences/advanced.dtd (%chrome/browser/preferences/advanced.dtd)
* locale/browser/preferences/advanced-scripts.dtd (%chrome/browser/preferences/advanced-scripts.dtd)
locale/browser/preferences/advanced-scripts.dtd (%chrome/browser/preferences/advanced-scripts.dtd)
locale/browser/preferences/applicationManager.dtd (%chrome/browser/preferences/applicationManager.dtd)
locale/browser/preferences/applicationManager.properties (%chrome/browser/preferences/applicationManager.properties)
locale/browser/preferences/colors.dtd (%chrome/browser/preferences/colors.dtd)
@ -107,9 +107,9 @@
% locale browser-region @AB_CD@ %locale/browser-region/
locale/browser-region/region.properties (%chrome/browser-region/region.properties)
# the following files are browser-specific overrides
* locale/browser/netError.dtd (%chrome/overrides/netError.dtd)
* locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties)
* locale/browser/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd)
locale/browser/netError.dtd (%chrome/overrides/netError.dtd)
locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties)
locale/browser/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd)
% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
% override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd

View File

@ -19,12 +19,13 @@ EXTRA_JS_MODULES = \
NetworkPrioritizer.jsm \
NewTabUtils.jsm \
offlineAppCache.jsm \
SignInToWebsite.jsm \
TelemetryTimestamps.jsm \
Social.jsm \
webappsUI.jsm \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
EXTRA_JS_MODULES += \
WindowsPreviewPerTab.jsm \
WindowsJumpLists.jsm \

View File

@ -0,0 +1,235 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const EXPORTED_SYMBOLS = ["SignInToWebsiteUX"];
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "IdentityService",
"resource://gre/modules/identity/Identity.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Logger",
"resource://gre/modules/identity/LogUtils.jsm");
function log(...aMessageArgs) {
Logger.log.apply(Logger, ["SignInToWebsiteUX"].concat(aMessageArgs));
}
let SignInToWebsiteUX = {
init: function SignInToWebsiteUX_init() {
Services.obs.addObserver(this, "identity-request", false);
Services.obs.addObserver(this, "identity-auth", false);
Services.obs.addObserver(this, "identity-auth-complete", false);
Services.obs.addObserver(this, "identity-login-state-changed", false);
},
uninit: function SignInToWebsiteUX_uninit() {
Services.obs.removeObserver(this, "identity-request");
Services.obs.removeObserver(this, "identity-auth");
Services.obs.removeObserver(this, "identity-auth-complete");
Services.obs.removeObserver(this, "identity-login-state-changed");
},
observe: function SignInToWebsiteUX_observe(aSubject, aTopic, aData) {
log("observe: received", aTopic, "with", aData, "for", aSubject);
let options = null;
if (aSubject) {
options = aSubject.wrappedJSObject;
}
switch(aTopic) {
case "identity-request":
this.requestLogin(options);
break;
case "identity-auth":
this._openAuthenticationUI(aData, options);
break;
case "identity-auth-complete":
this._closeAuthenticationUI(aData);
break;
case "identity-login-state-changed":
let emailAddress = aData;
if (emailAddress) {
this._removeRequestUI(options);
this._showLoggedInUI(emailAddress, options);
} else {
this._removeLoggedInUI(options);
}
break;
default:
Logger.reportError("SignInToWebsiteUX", "Unknown observer notification:", aTopic);
break;
}
},
/**
* The website is requesting login so the user must choose an identity to use.
*/
requestLogin: function SignInToWebsiteUX_requestLogin(aOptions) {
let windowID = aOptions.rpId;
log("requestLogin", aOptions);
let [chromeWin, browserEl] = this._getUIForWindowID(windowID);
// message is not shown in the UI but is required
let message = aOptions.origin;
let mainAction = {
label: chromeWin.gNavigatorBundle.getString("identity.next.label"),
accessKey: chromeWin.gNavigatorBundle.getString("identity.next.accessKey"),
callback: function() {}, // required
};
let options = {
identity: {
origin: aOptions.origin,
},
};
let secondaryActions = [];
// add some extra properties to the notification to store some identity-related state
for (let opt in aOptions) {
options.identity[opt] = aOptions[opt];
}
log("requestLogin: rpId: ", options.identity.rpId);
chromeWin.PopupNotifications.show(browserEl, "identity-request", message,
"identity-notification-icon", mainAction,
[], options);
},
/**
* Get the list of possible identities to login to the given origin.
*/
getIdentitiesForSite: function SignInToWebsiteUX_getIdentitiesForSite(aOrigin) {
return IdentityService.RP.getIdentitiesForSite(aOrigin);
},
/**
* User chose a new or existing identity from the doorhanger after a request() call
*/
selectIdentity: function SignInToWebsiteUX_selectIdentity(aRpId, aIdentity) {
log("selectIdentity: rpId: ", aRpId, " identity: ", aIdentity);
IdentityService.selectIdentity(aRpId, aIdentity);
},
// Private
/**
* Return the chrome window and <browser> for the given outer window ID.
*/
_getUIForWindowID: function(aWindowID) {
let someWindow = Services.wm.getMostRecentWindow("navigator:browser");
if (!someWindow) {
Logger.reportError("SignInToWebsiteUX", "no window");
return [null, null];
}
let windowUtils = someWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let content = windowUtils.getOuterWindowWithId(aWindowID);
if (content) {
let browser = content.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell).chromeEventHandler;
let chromeWin = browser.ownerDocument.defaultView;
return [chromeWin, browser];
}
Logger.reportError("SignInToWebsiteUX", "no content");
return [null, null];
},
/**
* Open UI with a content frame displaying aAuthURI so that the user can authenticate with their
* IDP. Then tell Identity.jsm the identifier for the window so that it knows that the DOM API
* calls are for this authentication flow.
*/
_openAuthenticationUI: function _openAuthenticationUI(aAuthURI, aContext) {
// Open a tab/window with aAuthURI with an identifier (aID) attached so that the DOM APIs know this is an auth. window.
let chromeWin = Services.wm.getMostRecentWindow('navigator:browser');
let features = "chrome=false,width=640,height=480,centerscreen,location=yes,resizable=yes,scrollbars=yes,status=yes";
log("aAuthURI: ", aAuthURI);
let authWin = Services.ww.openWindow(chromeWin, "about:blank", "", features, null);
let windowID = authWin.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
log("authWin outer id: ", windowID);
let provId = aContext.provId;
// Tell the ID service about the id before loading the url
IdentityService.IDP.setAuthenticationFlow(windowID, provId);
authWin.location = aAuthURI;
},
_closeAuthenticationUI: function _closeAuthenticationUI(aAuthId) {
log("_closeAuthenticationUI:", aAuthId);
let [chromeWin, browserEl] = this._getUIForWindowID(aAuthId);
if (chromeWin)
chromeWin.close();
else
Logger.reportError("SignInToWebsite", "Could not close window with ID", aAuthId);
},
/**
* Show a doorhanger indicating the currently logged-in user.
*/
_showLoggedInUI: function _showLoggedInUI(aIdentity, aContext) {
let windowID = aContext.rpId;
log("_showLoggedInUI for ", windowID);
let [chromeWin, browserEl] = this._getUIForWindowID(windowID);
let message = chromeWin.gNavigatorBundle.getFormattedString("identity.loggedIn.description",
[aIdentity]);
let mainAction = {
label: chromeWin.gNavigatorBundle.getString("identity.loggedIn.signOut.label"),
accessKey: chromeWin.gNavigatorBundle.getString("identity.loggedIn.signOut.accessKey"),
callback: function() {
log("sign out callback fired");
IdentityService.RP.logout(windowID);
},
};
let secondaryActions = [];
let options = {
dismissed: true,
};
let loggedInNot = chromeWin.PopupNotifications.show(browserEl, "identity-logged-in", message,
"identity-notification-icon", mainAction,
secondaryActions, options);
loggedInNot.rpId = windowID;
},
/**
* Remove the doorhanger indicating the currently logged-in user.
*/
_removeLoggedInUI: function _removeLoggedInUI(aContext) {
let windowID = aContext.rpId;
log("_removeLoggedInUI for ", windowID);
if (!windowID)
throw "_removeLoggedInUI: Invalid RP ID";
let [chromeWin, browserEl] = this._getUIForWindowID(windowID);
let loggedInNot = chromeWin.PopupNotifications.getNotification("identity-logged-in", browserEl);
if (loggedInNot)
chromeWin.PopupNotifications.remove(loggedInNot);
},
/**
* Remove the doorhanger indicating the currently logged-in user.
*/
_removeRequestUI: function _removeRequestUI(aContext) {
let windowID = aContext.rpId;
log("_removeRequestUI for ", windowID);
let [chromeWin, browserEl] = this._getUIForWindowID(windowID);
let requestNot = chromeWin.PopupNotifications.getNotification("identity-request", browserEl);
if (requestNot)
chromeWin.PopupNotifications.remove(requestNot);
},
};

View File

@ -14,9 +14,10 @@ include $(topsrcdir)/config/rules.mk
_BROWSER_FILES = \
browser_NetworkPrioritizer.js \
browser_TelemetryTimestamps.js \
browser_SignInToWebsite.js \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
_BROWSER_FILES += \
browser_taskbar_preview.js \
$(NULL)

View File

@ -0,0 +1,549 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/**
* TO TEST:
* - test state saved on doorhanger dismissal
* - links to switch steps
* - TOS and PP link clicks
* - identityList is populated correctly
*/
Services.prefs.setBoolPref("toolkit.identity.debug", true);
XPCOMUtils.defineLazyModuleGetter(this, "IdentityService",
"resource://gre/modules/identity/Identity.jsm");
const TEST_ORIGIN = "https://example.com";
const TEST_EMAIL = "user@example.com";
let gTestIndex = 0;
let outerWinId = gBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
function NotificationBase(aNotId) {
this.id = aNotId;
}
NotificationBase.prototype = {
message: TEST_ORIGIN,
mainAction: {
label: "",
callback: function() {
this.mainActionClicked = true;
}.bind(this),
},
secondaryActions: [],
options: {
"identity": {
origin: TEST_ORIGIN,
rpId: outerWinId,
},
},
};
let tests = [
{
name: "test_request_required_typed",
run: function() {
setupRPFlow();
this.notifyOptions = {
rpId: outerWinId,
origin: TEST_ORIGIN,
};
this.notifyObj = new NotificationBase("identity-request");
Services.obs.notifyObservers({wrappedJSObject: this.notifyOptions},
"identity-request", null);
},
onShown: function(popup) {
checkPopup(popup, this.notifyObj);
let notification = popup.childNodes[0];
// Check identity popup state
let state = notification.identity;
ok(!state.typedEmail, "Nothing should be typed yet");
ok(!state.selected, "Identity should not be selected yet");
ok(!state.termsOfService, "No TOS specified");
ok(!state.privacyPolicy, "No PP specified");
is(state.step, 0, "Step should be persisted with default value");
is(state.rpId, outerWinId, "Check rpId");
is(state.origin, TEST_ORIGIN, "Check origin");
is(notification.step, 0, "Should be on the new email step");
is(notification.chooseEmailLink.hidden, true, "Identity list is empty so link to list view should be hidden");
is(notification.addEmailLink.parentElement.hidden, true, "We are already on the email input step so choose email pane should be hidden");
is(notification.emailField.value, "", "Email field should default to empty on a new notification");
let notifDoc = notification.ownerDocument;
ok(notifDoc.getAnonymousElementByAttribute(notification, "anonid", "tos").hidden,
"TOS link should be hidden");
ok(notifDoc.getAnonymousElementByAttribute(notification, "anonid", "privacypolicy").hidden,
"PP link should be hidden");
// Try to continue with a missing email address
triggerMainCommand(popup);
is(notification.throbber.style.visibility, "hidden", "is throbber visible");
ok(!notification.button.disabled, "Button should not be disabled");
is(window.gIdentitySelected, null, "Check no identity selected");
// Fill in an invalid email address and try again
notification.emailField.value = "foo";
triggerMainCommand(popup);
is(notification.throbber.style.visibility, "hidden", "is throbber visible");
ok(!notification.button.disabled, "Button should not be disabled");
is(window.gIdentitySelected, null, "Check no identity selected");
// Fill in an email address and try again
notification.emailField.value = TEST_EMAIL;
triggerMainCommand(popup);
is(window.gIdentitySelected.rpId, outerWinId, "Check identity selected rpId");
is(window.gIdentitySelected.identity, TEST_EMAIL, "Check identity selected email");
is(notification.identity.selected, TEST_EMAIL, "Check persisted email");
is(notification.throbber.style.visibility, "visible", "is throbber visible");
ok(notification.button.disabled, "Button should be disabled");
ok(notification.emailField.disabled, "Email field should be disabled");
ok(notification.identityList.disabled, "Identity list should be disabled");
PopupNotifications.getNotification("identity-request").remove();
},
onHidden: function(popup) { },
},
{
name: "test_request_optional",
run: function() {
this.notifyOptions = {
rpId: outerWinId,
origin: TEST_ORIGIN,
privacyPolicy: TEST_ORIGIN + "/pp.txt",
termsOfService: TEST_ORIGIN + "/tos.tzt",
};
this.notifyObj = new NotificationBase("identity-request");
Services.obs.notifyObservers({ wrappedJSObject: this.notifyOptions },
"identity-request", null);
},
onShown: function(popup) {
checkPopup(popup, this.notifyObj);
let notification = popup.childNodes[0];
// Check identity popup state
let state = notification.identity;
ok(!state.typedEmail, "Nothing should be typed yet");
ok(!state.selected, "Identity should not be selected yet");
is(state.termsOfService, this.notifyOptions.termsOfService, "Check TOS URL");
is(state.privacyPolicy, this.notifyOptions.privacyPolicy, "Check PP URL");
is(state.step, 0, "Step should be persisted with default value");
is(state.rpId, outerWinId, "Check rpId");
is(state.origin, TEST_ORIGIN, "Check origin");
is(notification.step, 0, "Should be on the new email step");
is(notification.chooseEmailLink.hidden, true, "Identity list is empty so link to list view should be hidden");
is(notification.addEmailLink.parentElement.hidden, true, "We are already on the email input step so choose email pane should be hidden");
is(notification.emailField.value, "", "Email field should default to empty on a new notification");
let notifDoc = notification.ownerDocument;
let tosLink = notifDoc.getAnonymousElementByAttribute(notification, "anonid", "tos");
ok(!tosLink.hidden, "TOS link should be visible");
is(tosLink.href, this.notifyOptions.termsOfService, "Check TOS link URL");
let ppLink = notifDoc.getAnonymousElementByAttribute(notification, "anonid", "privacypolicy");
ok(!ppLink.hidden, "PP link should be visible");
is(ppLink.href, this.notifyOptions.privacyPolicy, "Check PP link URL");
// Try to continue with a missing email address
triggerMainCommand(popup);
is(notification.throbber.style.visibility, "hidden", "is throbber visible");
ok(!notification.button.disabled, "Button should not be disabled");
is(window.gIdentitySelected, null, "Check no identity selected");
// Fill in an invalid email address and try again
notification.emailField.value = "foo";
triggerMainCommand(popup);
is(notification.throbber.style.visibility, "hidden", "is throbber visible");
ok(!notification.button.disabled, "Button should not be disabled");
is(window.gIdentitySelected, null, "Check no identity selected");
// Fill in an email address and try again
notification.emailField.value = TEST_EMAIL;
triggerMainCommand(popup);
is(window.gIdentitySelected.rpId, outerWinId, "Check identity selected rpId");
is(window.gIdentitySelected.identity, TEST_EMAIL, "Check identity selected email");
is(notification.identity.selected, TEST_EMAIL, "Check persisted email");
is(notification.throbber.style.visibility, "visible", "is throbber visible");
ok(notification.button.disabled, "Button should be disabled");
ok(notification.emailField.disabled, "Email field should be disabled");
ok(notification.identityList.disabled, "Identity list should be disabled");
PopupNotifications.getNotification("identity-request").remove();
},
onHidden: function(popup) {},
},
{
name: "test_login_state_changed",
run: function () {
this.notifyOptions = {
rpId: outerWinId,
};
this.notifyObj = new NotificationBase("identity-logged-in");
this.notifyObj.message = "Signed in as: user@example.com";
this.notifyObj.mainAction.label = "Sign Out";
this.notifyObj.mainAction.accessKey = "O";
Services.obs.notifyObservers({ wrappedJSObject: this.notifyOptions },
"identity-login-state-changed", TEST_EMAIL);
executeSoon(function() {
PopupNotifications.getNotification("identity-logged-in").anchorElement.click();
});
},
onShown: function(popup) {
checkPopup(popup, this.notifyObj);
// Fire the notification that the user is no longer logged-in to close the UI.
Services.obs.notifyObservers({ wrappedJSObject: this.notifyOptions },
"identity-login-state-changed", null);
},
onHidden: function(popup) {},
},
{
name: "test_login_state_changed_logout",
run: function () {
this.notifyOptions = {
rpId: outerWinId,
};
this.notifyObj = new NotificationBase("identity-logged-in");
this.notifyObj.message = "Signed in as: user@example.com";
this.notifyObj.mainAction.label = "Sign Out";
this.notifyObj.mainAction.accessKey = "O";
Services.obs.notifyObservers({ wrappedJSObject: this.notifyOptions },
"identity-login-state-changed", TEST_EMAIL);
executeSoon(function() {
PopupNotifications.getNotification("identity-logged-in").anchorElement.click();
});
},
onShown: function(popup) {
checkPopup(popup, this.notifyObj);
// This time trigger the Sign Out button and make sure the UI goes away.
triggerMainCommand(popup);
},
onHidden: function(popup) {},
},
];
function test_auth() {
let notifyOptions = {
provId: outerWinId,
origin: TEST_ORIGIN,
};
Services.obs.addObserver(function() {
// prepare to send auth-complete and close the window
let winCloseObs = new WindowObserver(function(closedWin) {
info("closed window");
finish();
}, "domwindowclosed");
Services.ww.registerNotification(winCloseObs);
Services.obs.notifyObservers(null, "identity-auth-complete", IdentityService.IDP.authenticationFlowSet.authId);
}, "test-identity-auth-window", false);
let winObs = new WindowObserver(function(authWin) {
ok(authWin, "Authentication window opened");
ok(authWin.contentWindow.location);
});
Services.ww.registerNotification(winObs);
Services.obs.notifyObservers({ wrappedJSObject: notifyOptions },
"identity-auth", TEST_ORIGIN + "/auth");
}
function test() {
waitForExplicitFinish();
registerCleanupFunction(cleanUp);
let sitw = {};
Components.utils.import("resource:///modules/SignInToWebsite.jsm", sitw);
ok(sitw.SignInToWebsiteUX, "SignInToWebsiteUX object exists");
// Replace implementation of ID Service functions for testing
window.selectIdentity = sitw.SignInToWebsiteUX.selectIdentity;
sitw.SignInToWebsiteUX.selectIdentity = function(aRpId, aIdentity) {
info("Identity selected: " + aIdentity);
window.gIdentitySelected = {rpId: aRpId, identity: aIdentity};
};
window.setAuthenticationFlow = IdentityService.IDP.setAuthenticationFlow;
IdentityService.IDP.setAuthenticationFlow = function(aAuthId, aProvId) {
info("setAuthenticationFlow: " + aAuthId + " : " + aProvId);
this.authenticationFlowSet = { authId: aAuthId, provId: aProvId };
Services.obs.notifyObservers(null, "test-identity-auth-window", aAuthId);
};
runNextTest();
}
// Cleanup between tests
function resetState() {
delete window.gIdentitySelected;
delete IdentityService.IDP.authenticationFlowSet;
IdentityService.reset();
}
// Cleanup after all tests
function cleanUp() {
info("cleanup");
resetState();
for (let topic in gActiveObservers)
Services.obs.removeObserver(gActiveObservers[topic], topic);
for (let eventName in gActiveListeners)
PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName], false);
delete IdentityService.RP._rpFlows[outerWinId];
// Put the JSM functions back to how they were
IdentityService.IDP.setAuthenticationFlow = window.setAuthenticationFlow;
delete window.setAuthenticationFlow;
let sitw = {};
Components.utils.import("resource:///modules/SignInToWebsite.jsm", sitw);
sitw.SignInToWebsiteUX.selectIdentity = window.selectIdentity;
delete window.selectIdentity;
Services.prefs.clearUserPref("toolkit.identity.debug");
}
let gActiveListeners = {};
let gActiveObservers = {};
let gShownState = {};
function runNextTest() {
let nextTest = tests[gTestIndex];
function goNext() {
resetState();
if (++gTestIndex == tests.length)
executeSoon(test_auth);
else
executeSoon(runNextTest);
}
function addObserver(topic) {
function observer() {
Services.obs.removeObserver(observer, "PopupNotifications-" + topic);
delete gActiveObservers["PopupNotifications-" + topic];
info("[Test #" + gTestIndex + "] observer for " + topic + " called");
nextTest[topic]();
goNext();
}
Services.obs.addObserver(observer, "PopupNotifications-" + topic, false);
gActiveObservers["PopupNotifications-" + topic] = observer;
}
if (nextTest.backgroundShow) {
addObserver("backgroundShow");
} else if (nextTest.updateNotShowing) {
addObserver("updateNotShowing");
} else {
doOnPopupEvent("popupshowing", function () {
info("[Test #" + gTestIndex + "] popup showing");
});
doOnPopupEvent("popupshown", function () {
gShownState[gTestIndex] = true;
info("[Test #" + gTestIndex + "] popup shown");
nextTest.onShown(this);
});
// We allow multiple onHidden functions to be defined in an array. They're
// called in the order they appear.
let onHiddenArray = nextTest.onHidden instanceof Array ?
nextTest.onHidden :
[nextTest.onHidden];
doOnPopupEvent("popuphidden", function () {
if (!gShownState[gTestIndex]) {
// TODO: needed?
info("Popup from test " + gTestIndex + " was hidden before its popupshown fired");
}
let onHidden = onHiddenArray.shift();
info("[Test #" + gTestIndex + "] popup hidden (" + onHiddenArray.length + " hides remaining)");
executeSoon(function () {
onHidden.call(nextTest, this);
if (!onHiddenArray.length)
goNext();
}.bind(this));
}, onHiddenArray.length);
info("[Test #" + gTestIndex + "] added listeners; panel state: " + PopupNotifications.isPanelOpen);
}
info("[Test #" + gTestIndex + "] running test");
nextTest.run();
}
function doOnPopupEvent(eventName, callback, numExpected) {
gActiveListeners[eventName] = function (event) {
if (event.target != PopupNotifications.panel)
return;
if (typeof(numExpected) === "number")
numExpected--;
if (!numExpected) {
PopupNotifications.panel.removeEventListener(eventName, gActiveListeners[eventName], false);
delete gActiveListeners[eventName];
}
callback.call(PopupNotifications.panel);
};
PopupNotifications.panel.addEventListener(eventName, gActiveListeners[eventName], false);
}
function checkPopup(popup, notificationObj) {
info("[Test #" + gTestIndex + "] checking popup");
let notifications = popup.childNodes;
is(notifications.length, 1, "only one notification displayed");
let notification = notifications[0];
let icon = document.getAnonymousElementByAttribute(notification, "class", "popup-notification-icon");
is(notification.getAttribute("label"), notificationObj.message, "message matches");
is(notification.id, notificationObj.id + "-notification", "id matches");
if (notificationObj.id != "identity-request" && notificationObj.mainAction) {
is(notification.getAttribute("buttonlabel"), notificationObj.mainAction.label, "main action label matches");
is(notification.getAttribute("buttonaccesskey"), notificationObj.mainAction.accessKey, "main action accesskey matches");
}
let actualSecondaryActions = notification.childNodes;
let secondaryActions = notificationObj.secondaryActions || [];
let actualSecondaryActionsCount = actualSecondaryActions.length;
if (secondaryActions.length) {
let lastChild = actualSecondaryActions.item(actualSecondaryActions.length - 1);
is(lastChild.tagName, "menuseparator", "menuseparator exists");
actualSecondaryActionsCount--;
}
is(actualSecondaryActionsCount, secondaryActions.length, actualSecondaryActions.length + " secondary actions");
secondaryActions.forEach(function (a, i) {
is(actualSecondaryActions[i].getAttribute("label"), a.label, "label for secondary action " + i + " matches");
is(actualSecondaryActions[i].getAttribute("accesskey"), a.accessKey, "accessKey for secondary action " + i + " matches");
});
}
function triggerMainCommand(popup) {
info("[Test #" + gTestIndex + "] triggering main command");
let notifications = popup.childNodes;
ok(notifications.length > 0, "at least one notification displayed");
let notification = notifications[0];
// 20, 10 so that the inner button is hit
EventUtils.synthesizeMouse(notification.button, 20, 10, {});
}
function triggerSecondaryCommand(popup, index) {
info("[Test #" + gTestIndex + "] triggering secondary command");
let notifications = popup.childNodes;
ok(notifications.length > 0, "at least one notification displayed");
let notification = notifications[0];
notification.button.focus();
popup.addEventListener("popupshown", function () {
popup.removeEventListener("popupshown", arguments.callee, false);
// Press down until the desired command is selected
for (let i = 0; i <= index; i++)
EventUtils.synthesizeKey("VK_DOWN", {});
// Activate
EventUtils.synthesizeKey("VK_ENTER", {});
}, false);
// One down event to open the popup
EventUtils.synthesizeKey("VK_DOWN", { altKey: (navigator.platform.indexOf("Mac") == -1) });
}
function dismissNotification(popup) {
info("[Test #" + gTestIndex + "] dismissing notification");
executeSoon(function () {
EventUtils.synthesizeKey("VK_ESCAPE", {});
});
}
function partial(fn) {
let args = Array.prototype.slice.call(arguments, 1);
return function() {
return fn.apply(this, args.concat(Array.prototype.slice.call(arguments)));
};
}
// create a mock "doc" object, which the Identity Service
// uses as a pointer back into the doc object
function mock_doc(aIdentity, aOrigin, aDoFunc) {
let mockedDoc = {};
mockedDoc.id = outerWinId;
mockedDoc.loggedInEmail = aIdentity;
mockedDoc.origin = aOrigin;
mockedDoc['do'] = aDoFunc;
mockedDoc.doReady = partial(aDoFunc, 'ready');
mockedDoc.doLogin = partial(aDoFunc, 'login');
mockedDoc.doLogout = partial(aDoFunc, 'logout');
mockedDoc.doError = partial(aDoFunc, 'error');
mockedDoc.doCancel = partial(aDoFunc, 'cancel');
mockedDoc.doCoffee = partial(aDoFunc, 'coffee');
return mockedDoc;
}
// takes a list of functions and returns a function that
// when called the first time, calls the first func,
// then the next time the second, etc.
function call_sequentially() {
let numCalls = 0;
let funcs = arguments;
return function() {
if (!funcs[numCalls]) {
let argString = Array.prototype.slice.call(arguments).join(",");
ok(false, "Too many calls: " + argString);
return;
}
funcs[numCalls].apply(funcs[numCalls], arguments);
numCalls += 1;
};
}
function setupRPFlow(aIdentity) {
IdentityService.RP.watch(mock_doc(aIdentity, TEST_ORIGIN, call_sequentially(
function(action, params) {
is(action, "ready", "1st callback");
is(params, null);
},
function(action, params) {
is(action, "logout", "2nd callback");
is(params, null);
},
function(action, params) {
is(action, "ready", "3rd callback");
is(params, null);
}
)));
}
function WindowObserver(aCallback, aObserveTopic = "domwindowopened") {
this.observe = function(aSubject, aTopic, aData) {
if (aTopic != aObserveTopic) {
return;
}
info(aObserveTopic);
Services.ww.unregisterNotification(this);
SimpleTest.executeSoon(function() {
let domWin = aSubject.QueryInterface(Ci.nsIDOMWindow);
aCallback(domWin);
});
};
}

View File

@ -113,7 +113,7 @@ let webappsUI = {
let app = WebappsInstaller.install(aData);
if (app) {
let localDir = null;
if (app.appcacheDefined && app.appProfile) {
if (app.appProfile) {
localDir = app.appProfile.localDir;
}

View File

@ -1240,6 +1240,10 @@ toolbar[iconsize="small"] #feed-button {
list-style-image: url(chrome://global/skin/icons/information-16.png);
}
#identity-notification-icon {
list-style-image: url(chrome://mozapps/skin/profile/profileicon.png);
}
#geo-notification-icon {
list-style-image: url(chrome://browser/skin/Geolocation-16.png);
}

View File

@ -70,7 +70,7 @@ browser.jar:
skin/classic/browser/places/unstarred48.png (places/unstarred48.png)
skin/classic/browser/places/places.css (places/places.css)
skin/classic/browser/places/organizer.css (places/organizer.css)
* skin/classic/browser/places/organizer.xml (places/organizer.xml)
skin/classic/browser/places/organizer.xml (places/organizer.xml)
skin/classic/browser/places/query.png (places/query.png)
skin/classic/browser/places/starPage.png (places/starPage.png)
skin/classic/browser/places/tag.png (places/tag.png)

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<bindings id="organizerBindings"
xmlns="http://www.mozilla.org/xbl"

View File

@ -2369,12 +2369,19 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
list-style-image: url(chrome://global/skin/icons/information-16.png);
}
#identity-notification-icon {
list-style-image: url(chrome://mozapps/skin/profile/profileicon.png);
}
#geo-notification-icon {
list-style-image: url(chrome://browser/skin/Geolocation-16.png);
}
.geolocation-text-link {
#notification-popup .text-link {
color: #fff;
}
.geolocation-text-link {
-moz-margin-start: 0; /* override default label margin to match description margin */
}

View File

@ -110,7 +110,7 @@ browser.jar:
#endif
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
skin/classic/browser/preferences/in-content/preferences.css (preferences/in-content/preferences.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css)
skin/classic/browser/social/social.png (social/social.png)

View File

@ -2375,6 +2375,10 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://global/skin/icons/information-16.png);
}
#identity-notification-icon {
list-style-image: url(chrome://mozapps/skin/profile/profileicon.png);
}
#geo-notification-icon {
list-style-image: url(chrome://browser/skin/Geolocation-16.png);
}

Some files were not shown because too many files have changed in this diff Show More