Merge from cvs-trunk-mirror. This fixes bug 393364, a C++ compatibility bug. js/src now builds ok.

--HG--
rename : js/src/jsatom.c => js/src/jsatom.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsxdrapi.c => js/src/jsxdrapi.cpp
This commit is contained in:
jorendorff@mozilla.com 2007-08-23 21:03:00 -04:00
Родитель 51dfc15b43 edd95c1706
Коммит c5ecba2633
362 изменённых файлов: 13348 добавлений и 4224 удалений

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

@ -134,6 +134,10 @@ endif # WINNT
ifeq ($(OS_ARCH),WINNT) ifeq ($(OS_ARCH),WINNT)
# we want to copy PDB files on Windows # we want to copy PDB files on Windows
MAKE_SYM_STORE_ARGS := -c MAKE_SYM_STORE_ARGS := -c
ifeq (,$(CYGWIN_WRAPPER))
# this doesn't work with Cygwin Python
MAKE_SYM_STORE_ARGS += --vcs-info
endif
DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe
# PDB files don't get moved to dist, so we need to scan the whole objdir # PDB files don't get moved to dist, so we need to scan the whole objdir
MAKE_SYM_STORE_PATH := . MAKE_SYM_STORE_PATH := .

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

@ -56,7 +56,7 @@ interface nsIDOMDOMStringList;
* *
* @status UNDER_REVIEW * @status UNDER_REVIEW
*/ */
[scriptable, uuid(2d8c1b1b-7a3f-4962-8a88-81ca019c11e9)] [scriptable, uuid(56c34b1a-d390-44f4-89c3-6935c0e4e3fa)]
interface nsIAccessibleRetrieval : nsISupports interface nsIAccessibleRetrieval : nsISupports
{ {
/** /**
@ -141,21 +141,30 @@ interface nsIAccessibleRetrieval : nsISupports
* an accessible does not already exist for this DOM node. * an accessible does not already exist for this DOM node.
*/ */
nsIAccessible getCachedAccessible(in nsIDOMNode aNode, in nsIWeakReference aShell); nsIAccessible getCachedAccessible(in nsIDOMNode aNode, in nsIWeakReference aShell);
/** /**
* Returns accessible role as a string. * Returns accessible role as a string.
* *
* @param aRole - the accessible role constants. * @param aRole - the accessible role constants.
*/ */
AString getStringRole(in unsigned long aRole); AString getStringRole(in unsigned long aRole);
/** /**
* Returns list which contains accessible states as a strings. * Returns list which contains accessible states as a strings.
* *
* @param aStates - accessible states. * @param aStates - accessible states.
* @param aExtraStates - accessible extra states. * @param aExtraStates - accessible extra states.
*/ */
nsIDOMDOMStringList getStringStates(in unsigned long aStates, in unsigned long aExtraStates); nsIDOMDOMStringList getStringStates(in unsigned long aStates,
in unsigned long aExtraStates);
/**
* Get the type of accessible event as a string.
*
* @param aEventType - the accessible event type constant
* @return - accessible event type presented as human readable string
*/
AString getStringEventType(in unsigned long aEventType);
}; };

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

@ -50,6 +50,7 @@ REQUIRES = content \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
intl \ intl \
layout \ layout \
locale \ locale \

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

@ -54,6 +54,7 @@ REQUIRES = appshell \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
intl \ intl \
layout \ layout \
locale \ locale \

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

@ -1040,6 +1040,20 @@ nsAccessibilityService::GetStringStates(PRUint32 aStates, PRUint32 aExtraStates,
return NS_OK; return NS_OK;
} }
// nsIAccessibleRetrieval::getStringEventType()
NS_IMETHODIMP
nsAccessibilityService::GetStringEventType(PRUint32 aEventType,
nsAString& aString)
{
if ( aEventType >= NS_ARRAY_LENGTH(kEventTypeNames)) {
aString.AssignLiteral("unknown");
return NS_OK;
}
CopyUTF8toUTF16(kEventTypeNames[aEventType], aString);
return NS_OK;
}
/** /**
* GetAccessibleFor - get an nsIAccessible from a DOM node * GetAccessibleFor - get an nsIAccessible from a DOM node
*/ */

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

@ -52,6 +52,79 @@ class nsIDocShell;
class nsIPresShell; class nsIPresShell;
class nsIContent; class nsIContent;
class nsAccessibilityService : public nsIAccessibilityService,
public nsIObserver,
public nsIWebProgressListener,
public nsSupportsWeakReference
{
public:
nsAccessibilityService();
virtual ~nsAccessibilityService();
NS_DECL_ISUPPORTS
NS_DECL_NSIACCESSIBLERETRIEVAL
NS_DECL_NSIACCESSIBILITYSERVICE
NS_DECL_NSIOBSERVER
NS_DECL_NSIWEBPROGRESSLISTENER
/**
* Return presentation shell for the given node.
*
* @param aNode - the given DOM node.
*/
static nsresult GetShellFromNode(nsIDOMNode *aNode,
nsIWeakReference **weakShell);
/**
* Return accessibility service (static instance of this class).
*/
static nsresult GetAccessibilityService(nsIAccessibilityService** aResult);
private:
/**
* Return presentation shell, DOM node for the given frame.
*
* @param aFrame - the given frame
* @param aRealFrame [out] - the given frame casted to nsIFrame
* @param aShell [out] - presentation shell for DOM node associated with the
* given frame
* @param aContent [out] - DOM node associated with the given frame
*/
nsresult GetInfo(nsISupports *aFrame, nsIFrame **aRealFrame,
nsIWeakReference **aShell,
nsIDOMNode **aContent);
/**
* Initialize an accessible and cache it. The method should be called for
* every created accessible.
*
* @param aAccessibleIn - accessible to initialize.
*/
nsresult InitAccessible(nsIAccessible *aAccessibleIn, nsIAccessible **aAccessibleOut);
/**
* Return accessible object for elements implementing nsIAccessibleProvider
* interface.
*
* @param aNode - DOM node that accessible is returned for.
*/
nsresult GetAccessibleByType(nsIDOMNode *aNode, nsIAccessible **aAccessible);
/**
* Return accessible object if parent is a deck frame.
*
* @param aNode - DOMNode that accessible is returned for.
*/
nsresult GetAccessibleForDeckChildren(nsIDOMNode *aNode,
nsIAccessible **aAccessible);
static nsAccessibilityService *gAccessibilityService;
};
/**
* Map nsIAccessibleRole constants to strings. Used by
* nsIAccessibleRetrieval::getStringRole() method.
*/
static const char kRoleNames[][20] = { static const char kRoleNames[][20] = {
"nothing", //ROLE_NOTHING "nothing", //ROLE_NOTHING
"titlebar", //ROLE_TITLEBAR "titlebar", //ROLE_TITLEBAR
@ -172,42 +245,102 @@ static const char kRoleNames[][20] = {
"image map" //ROLE_IMAGE_MAP "image map" //ROLE_IMAGE_MAP
}; };
class nsAccessibilityService : public nsIAccessibilityService, /**
public nsIObserver, * Map nsIAccessibleEvents constants to strings. Used by
public nsIWebProgressListener, * nsIAccessibleRetrieval::getStringEventType() method.
public nsSupportsWeakReference */
{ static const char kEventTypeNames[][40] = {
public: "unknown", //
nsAccessibilityService(); "DOM node create", // EVENT_DOM_CREATE
virtual ~nsAccessibilityService(); "DOM node destroy", // EVENT_DOM_DESTROY
"DOM node significant change", // EVENT_DOM_SIGNIFICANT_CHANGE
NS_DECL_ISUPPORTS "async show", // EVENT_ASYNCH_SHOW
NS_DECL_NSIACCESSIBLERETRIEVAL "async hide", // EVENT_ASYNCH_HIDE
NS_DECL_NSIACCESSIBILITYSERVICE "async significant change", // EVENT_ASYNCH_SIGNIFICANT_CHANGE
NS_DECL_NSIOBSERVER "active decendent change", // EVENT_ACTIVE_DECENDENT_CHANGED
NS_DECL_NSIWEBPROGRESSLISTENER "focus", // EVENT_FOCUS
"state change", // EVENT_STATE_CHANGE
static nsresult GetShellFromNode(nsIDOMNode *aNode, nsIWeakReference **weakShell); "location change", // EVENT_LOCATION_CHANGE
static nsresult GetAccessibilityService(nsIAccessibilityService** aResult); "name changed", // EVENT_NAME_CHANGE
"description change", // EVENT_DESCRIPTION_CHANGE
private: "value change", // EVENT_VALUE_CHANGE
nsresult GetInfo(nsISupports* aFrame, nsIFrame** aRealFrame, nsIWeakReference** aShell, nsIDOMNode** aContent); "help change", // EVENT_HELP_CHANGE
void GetOwnerFor(nsIPresShell *aPresShell, nsIPresShell **aOwnerShell, nsIContent **aOwnerContent); "default action change", // EVENT_DEFACTION_CHANGE
nsIContent* FindContentForDocShell(nsIPresShell* aPresShell, nsIContent* aContent, nsIDocShell* aDocShell); "action change", // EVENT_ACTION_CHANGE
static nsAccessibilityService *gAccessibilityService; "accelerator change", // EVENT_ACCELERATOR_CHANGE
nsresult InitAccessible(nsIAccessible *aAccessibleIn, nsIAccessible **aAccessibleOut); "selection", // EVENT_SELECTION
"selection add", // EVENT_SELECTION_ADD
/** "selection remove", // EVENT_SELECTION_REMOVE
* Return accessible object for elements implementing nsIAccessibleProvider "selection within", // EVENT_SELECTION_WITHIN
* interface. "alert", // EVENT_ALERT
*/ "foreground", // EVENT_FOREGROUND
nsresult GetAccessibleByType(nsIDOMNode *aNode, nsIAccessible **aAccessible); "menu start", // EVENT_MENU_START
PRBool HasListener(nsIContent *aContent, nsAString& aEventType); "menu end", // EVENT_MENU_END
"menupopup start", // EVENT_MENUPOPUP_START
/** "menupopup end", // EVENT_MENUPOPUP_END
* Return accessible object if parent is a deck frame "capture start", // EVENT_CAPTURE_START
*/ "capture end", // EVENT_CAPTURE_END
nsresult GetAccessibleForDeckChildren(nsIDOMNode *aNode, nsIAccessible **aAccessible); "movesize start", // EVENT_MOVESIZE_START
"movesize end", // EVENT_MOVESIZE_END
"contexthelp start", // EVENT_CONTEXTHELP_START
"contexthelp end", // EVENT_CONTEXTHELP_END
"dragdrop start", // EVENT_DRAGDROP_START
"dragdrop end", // EVENT_DRAGDROP_END
"dialog start", // EVENT_DIALOG_START
"dialog end", // EVENT_DIALOG_END
"scrolling start", // EVENT_SCROLLING_START
"scrolling end", // EVENT_SCROLLING_END
"minimize start", // EVENT_MINIMIZE_START
"minimize end", // EVENT_MINIMIZE_END
"document load start", // EVENT_DOCUMENT_LOAD_START
"document load complete", // EVENT_DOCUMENT_LOAD_COMPLETE
"document reload", // EVENT_DOCUMENT_RELOAD
"document load stopped", // EVENT_DOCUMENT_LOAD_STOPPED
"document attributes changed", // EVENT_DOCUMENT_ATTRIBUTES_CHANGED
"document content changed", // EVENT_DOCUMENT_CONTENT_CHANGED
"property changed", // EVENT_PROPERTY_CHANGED
"selection changed", // EVENT_SELECTION_CHANGED
"text attribute changed", // EVENT_TEXT_ATTRIBUTE_CHANGED
"text caret moved", // EVENT_TEXT_CARET_MOVED
"text changed", // EVENT_TEXT_CHANGED
"text inserted", // EVENT_TEXT_INSERTED
"text removed", // EVENT_TEXT_REMOVED
"text updated", // EVENT_TEXT_UPDATED
"text selection changed", // EVENT_TEXT_SELECTION_CHANGED
"visible data changed", // EVENT_VISIBLE_DATA_CHANGED
"text column changed", // EVENT_TEXT_COLUMN_CHANGED
"section changed", // EVENT_SECTION_CHANGED
"table caption changed", // EVENT_TABLE_CAPTION_CHANGED
"table model changed", // EVENT_TABLE_MODEL_CHANGED
"table summary changed", // EVENT_TABLE_SUMMARY_CHANGED
"table row description changed", // EVENT_TABLE_ROW_DESCRIPTION_CHANGED
"table row header changed", // EVENT_TABLE_ROW_HEADER_CHANGED
"table row insert", // EVENT_TABLE_ROW_INSERT
"table row delete", // EVENT_TABLE_ROW_DELETE
"table row reorder", // EVENT_TABLE_ROW_REORDER
"table column description changed", // EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
"table column header changed", // EVENT_TABLE_COLUMN_HEADER_CHANGED
"table column insert", // EVENT_TABLE_COLUMN_INSERT
"table column delete", // EVENT_TABLE_COLUMN_DELETE
"table column reorder", // EVENT_TABLE_COLUMN_REORDER
"window activate", // EVENT_WINDOW_ACTIVATE
"window create", // EVENT_WINDOW_CREATE
"window deactivate", // EVENT_WINDOW_DEACTIVATE
"window destroy", // EVENT_WINDOW_DESTROY
"window maximize", // EVENT_WINDOW_MAXIMIZE
"window minimize", // EVENT_WINDOW_MINIMIZE
"window resize", // EVENT_WINDOW_RESIZE
"window restore", // EVENT_WINDOW_RESTORE
"hyperlink end index changed", // EVENT_HYPERLINK_END_INDEX_CHANGED
"hyperlink number of anchors changed", // EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED
"hyperlink selected link changed", // EVENT_HYPERLINK_SELECTED_LINK_CHANGED
"hypertext link activated", // EVENT_HYPERTEXT_LINK_ACTIVATED
"hypertext link selected", // EVENT_HYPERTEXT_LINK_SELECTED
"hyperlink start index changed", // EVENT_HYPERLINK_START_INDEX_CHANGED
"hypertext changed", // EVENT_HYPERTEXT_CHANGED
"hypertext links count changed", // EVENT_HYPERTEXT_NLINKS_CHANGED
"object attribute changed", // EVENT_OBJECT_ATTRIBUTE_CHANGED
"internal load" // EVENT_INTERNAL_LOAD
}; };
#endif /* __nsIAccessibilityService_h__ */ #endif /* __nsIAccessibilityService_h__ */

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

@ -51,6 +51,7 @@ REQUIRES = content \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
intl \ intl \
locale \ locale \
string \ string \

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

@ -50,6 +50,7 @@ REQUIRES = content \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
htmlparser \ htmlparser \
intl \ intl \
layout \ layout \

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

@ -50,6 +50,7 @@ REQUIRES = content \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
htmlparser \ htmlparser \
intl \ intl \
layout \ layout \

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

@ -52,6 +52,7 @@ REQUIRES = content \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
intl \ intl \
layout \ layout \
locale \ locale \

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

@ -52,6 +52,7 @@ REQUIRES = content \
dom \ dom \
editor \ editor \
gfx \ gfx \
thebes \
intl \ intl \
layout \ layout \
locale \ locale \

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

@ -657,23 +657,21 @@ void nsXULMenupopupAccessible::GenerateMenu(nsIDOMNode *aNode)
} }
} }
NS_IMETHODIMP nsXULMenupopupAccessible::GetName(nsAString& _retval) NS_IMETHODIMP
nsXULMenupopupAccessible::GetName(nsAString& aName)
{ {
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode)); aName.Truncate();
NS_ASSERTION(element, "No element for popup node!");
while (element) { if (!mDOMNode)
element->GetAttribute(NS_LITERAL_STRING("label"), _retval); return NS_ERROR_FAILURE;
if (!_retval.IsEmpty())
return NS_OK; nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<nsIDOMNode> parentNode, node(do_QueryInterface(element)); while (content && aName.IsEmpty()) {
if (!node) content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::label, aName);
return NS_ERROR_FAILURE; content = content->GetParent();
node->GetParentNode(getter_AddRefs(parentNode));
element = do_QueryInterface(parentNode);
} }
return NS_ERROR_FAILURE; return NS_OK;
} }
NS_IMETHODIMP nsXULMenupopupAccessible::GetRole(PRUint32 *aRole) NS_IMETHODIMP nsXULMenupopupAccessible::GetRole(PRUint32 *aRole)

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

@ -721,20 +721,36 @@ nsXULTreeitemAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribu
rv = view->GetLevel(mRow, &level); rv = view->GetLevel(mRow, &level);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
PRInt32 lvl = -1; PRInt32 topCount = 1;
PRInt32 startIndex = mRow; for (PRInt32 index = mRow - 1; index >= 0; index--) {
for (;startIndex - 1 > 0 && PRInt32 lvl = -1;
NS_SUCCEEDED(view->GetLevel(startIndex - 1, &lvl)) && lvl != level; if (NS_SUCCEEDED(view->GetLevel(index, &lvl))) {
startIndex--); if (lvl < level)
break;
lvl = -1; if (lvl == level)
PRInt32 endIndex = mRow; topCount++;
for (;endIndex - 1 > 0 && }
NS_SUCCEEDED(view->GetLevel(endIndex - 1, &lvl)) && lvl != level; }
endIndex--);
PRInt32 setSize = endIndex - startIndex + 1; PRInt32 rowCount = 0;
PRInt32 posInSet = mRow - startIndex + 1; rv = view->GetRowCount(&rowCount);
NS_ENSURE_SUCCESS(rv, rv);
PRInt32 bottomCount = 0;
for (PRInt32 index = mRow + 1; index < rowCount; index++) {
PRInt32 lvl = -1;
if (NS_SUCCEEDED(view->GetLevel(index, &lvl))) {
if (lvl < level)
break;
if (lvl == level)
bottomCount++;
}
}
PRInt32 setSize = topCount + bottomCount;
PRInt32 posInSet = topCount;
// set the group attributes // set the group attributes
nsAccUtils::SetAccGroupAttrs(aAttributes, level + 1, posInSet, setSize); nsAccUtils::SetAccGroupAttrs(aAttributes, level + 1, posInSet, setSize);

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

@ -305,9 +305,10 @@ pref("javascript.options.showInConsole", false);
pref("dom.disable_window_open_feature.status", true); pref("dom.disable_window_open_feature.status", true);
// This is the pref to control the location bar, change this to true to // This is the pref to control the location bar, change this to true to
// force this instead of or in addition to the status bar - this makes // force this instead of or in addition to the status bar - this makes
// the origin of popup windows more obvious to avoid spoofing but we // the origin of popup windows more obvious to avoid spoofing. We would
// cannot do it by default because it affects UE for web applications. // rather not do it by default because it affects UE for web applications, but
pref("dom.disable_window_open_feature.location", false); // without it there isn't a really good way to prevent chrome spoofing, see bug 337344
pref("dom.disable_window_open_feature.location", true);
pref("dom.disable_window_status_change", true); pref("dom.disable_window_status_change", true);
// allow JS to move and resize existing windows // allow JS to move and resize existing windows
pref("dom.disable_window_move_resize", false); pref("dom.disable_window_move_resize", false);

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

@ -58,10 +58,7 @@ var PlacesCommandHook = {
if (aEvent.originalTarget != this.panel) if (aEvent.originalTarget != this.panel)
return; return;
// This only happens for auto-hide. When the panel is closed from within gEditItemOverlay.uninitPanel(true);
// itself, doneCallback removes the listener and only then hides the popup
gAddBookmarksPanel.saveItem();
gAddBookmarksPanel.uninitPanel();
}, },
_overlayLoaded: false, _overlayLoaded: false,
@ -96,23 +93,15 @@ var PlacesCommandHook = {
this._overlayLoading = true; this._overlayLoading = true;
document.loadOverlay("chrome://browser/content/places/editBookmarkOverlay.xul", document.loadOverlay("chrome://browser/content/places/editBookmarkOverlay.xul",
loadObserver); loadObserver);
this.panel.addEventListener("popuphiding", this, false);
}, },
_doShowEditBookmarkPanel: _doShowEditBookmarkPanel:
function PCH__doShowEditBookmarkPanel(aItemId, aAnchorElement, aPosition) { function PCH__doShowEditBookmarkPanel(aItemId, aAnchorElement, aPosition) {
var panel = this.panel; this.panel.openPopup(aAnchorElement, aPosition, -1, -1);
panel.openPopup(aAnchorElement, aPosition, -1, -1);
gAddBookmarksPanel.initPanel(aItemId, PlacesUtils.tm, this.doneCallback, gEditItemOverlay.initPanel(aItemId,
{ hiddenRows: "description" }); { hiddenRows: ["description", "location"] });
panel.addEventListener("popuphiding", this, false);
},
doneCallback: function PCH_doneCallback(aSavedChanges) {
var panel = PlacesCommandHook.panel;
panel.removeEventListener("popuphiding", PlacesCommandHook, false);
gAddBookmarksPanel.uninitPanel();
panel.hidePopup();
}, },
/** /**
@ -289,6 +278,19 @@ var PlacesCommandHook = {
organizer.focus(); organizer.focus();
} }
},
doneButtonOnCommand: function PCH_doneButtonOnCommand() {
this.panel.hidePopup();
},
deleteButtonOnCommand: function PCH_deleteButtonCommand() {
PlacesUtils.bookmarks.removeItem(gEditItemOverlay.itemId);
// remove all tags for the associated url
PlacesUtils.tagging.untagURI(gEditItemOverlay._uri, null);
this.panel.hidePopup();
} }
}; };

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

@ -28,3 +28,42 @@ menuitem.spell-suggestion {
window[sizemode="maximized"] #content .notification-inner { window[sizemode="maximized"] #content .notification-inner {
border-right: 0px !important; border-right: 0px !important;
} }
tabbrowser {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser");
}
.tabbrowser-tabs {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
}
.tabbrowser-arrowscrollbox {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox");
}
.tabs-alltabs-popup {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
}
.tabbrowser-tabs > .tabbrowser-tab {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab");
}
.tabbrowser-tabs > .tabbrowser-tab > .tab-close-button,
.tabbrowser-tabs .tabs-closebutton-box > .tabs-closebutton {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-close-tab-button");
}
.tab-close-button {
display: none;
}
.tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) > .tabbrowser-tab[selected="true"] > .tab-close-button {
display: -moz-box;
}
.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {
display: -moz-box;
}

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

@ -99,6 +99,7 @@ var gProgressCollapseTimer = null;
var gPrefService = null; var gPrefService = null;
var appCore = null; var appCore = null;
var gBrowser = null; var gBrowser = null;
var gNavToolbox = null;
var gSidebarCommand = ""; var gSidebarCommand = "";
// Global variable that holds the nsContextMenu instance. // Global variable that holds the nsContextMenu instance.
@ -1029,8 +1030,7 @@ function delayedStartup()
SetPageProxyState("invalid"); SetPageProxyState("invalid");
var toolbox = document.getElementById("navigator-toolbox"); getNavToolbox().customizeDone = BrowserToolboxCustomizeDone;
toolbox.customizeDone = BrowserToolboxCustomizeDone;
// Set up Sanitize Item // Set up Sanitize Item
gSanitizeListener = new SanitizeListener(); gSanitizeListener = new SanitizeListener();
@ -1114,6 +1114,25 @@ function delayedStartup()
Components.utils.reportError("Failed to init content pref service:\n" + ex); Components.utils.reportError("Failed to init content pref service:\n" + ex);
} }
#ifdef XP_WIN
// For Vista, flip the default download folder pref once from Desktop to Downloads
// on new profiles.
try {
var sysInfo = Cc["@mozilla.org/system-info;1"].
getService(Ci.nsIPropertyBag2);
if (parseFloat(sysInfo.getProperty("version")) >= 6 &&
!gPrefService.getPrefType("browser.download.dir") &&
gPrefService.getIntPref("browser.download.folderList") == 0) {
var dnldMgr = Cc["@mozilla.org/download-manager;1"]
.getService(Ci.nsIDownloadManager);
gPrefService.setCharPref("browser.download.dir",
dnldMgr.defaultDownloadsDirectory.path);
gPrefService.setIntPref("browser.download.folderList", 1);
}
} catch (ex) {
}
#endif
// initialize the session-restore service (in case it's not already running) // initialize the session-restore service (in case it's not already running)
if (document.documentElement.getAttribute("windowtype") == "navigator:browser") { if (document.documentElement.getAttribute("windowtype") == "navigator:browser") {
try { try {
@ -2260,13 +2279,13 @@ function toggleAffectedChrome(aHide)
// (*) menubar // (*) menubar
// (*) navigation bar // (*) navigation bar
// (*) bookmarks toolbar // (*) bookmarks toolbar
// (*) tabstrip
// (*) browser messages // (*) browser messages
// (*) sidebar // (*) sidebar
// (*) find bar // (*) find bar
// (*) statusbar // (*) statusbar
var navToolbox = document.getElementById("navigator-toolbox"); getNavToolbox().hidden = aHide;
navToolbox.hidden = aHide;
if (aHide) if (aHide)
{ {
gChromeState = {}; gChromeState = {};
@ -2274,6 +2293,9 @@ function toggleAffectedChrome(aHide)
gChromeState.sidebarOpen = !sidebar.hidden; gChromeState.sidebarOpen = !sidebar.hidden;
gSidebarCommand = sidebar.getAttribute("sidebarcommand"); gSidebarCommand = sidebar.getAttribute("sidebarcommand");
gChromeState.hadTabStrip = gBrowser.getStripVisibility();
gBrowser.setStripVisibilityTo(false);
var notificationBox = gBrowser.getNotificationBox(); var notificationBox = gBrowser.getNotificationBox();
gChromeState.notificationsOpen = !notificationBox.notificationsHidden; gChromeState.notificationsOpen = !notificationBox.notificationsHidden;
notificationBox.notificationsHidden = aHide; notificationBox.notificationsHidden = aHide;
@ -2286,6 +2308,10 @@ function toggleAffectedChrome(aHide)
gFindBar.close(); gFindBar.close();
} }
else { else {
if (gChromeState.hadTabStrip) {
gBrowser.setStripVisibilityTo(true);
}
if (gChromeState.notificationsOpen) { if (gChromeState.notificationsOpen) {
gBrowser.getNotificationBox().notificationsHidden = aHide; gBrowser.getNotificationBox().notificationsHidden = aHide;
} }
@ -2314,6 +2340,11 @@ function onExitPrintPreview()
toggleAffectedChrome(false); toggleAffectedChrome(false);
} }
function getPPBrowser()
{
return getBrowser();
}
function getMarkupDocumentViewer() function getMarkupDocumentViewer()
{ {
return gBrowser.markupDocumentViewer; return gBrowser.markupDocumentViewer;
@ -3030,7 +3061,7 @@ function BrowserCustomizeToolbar()
window.openDialog("chrome://global/content/customizeToolbar.xul", window.openDialog("chrome://global/content/customizeToolbar.xul",
"CustomizeToolbar", "CustomizeToolbar",
"chrome,all,dependent", "chrome,all,dependent",
document.getElementById("navigator-toolbox")); getNavToolbox());
#endif #endif
} }
@ -3154,7 +3185,7 @@ var FullScreen =
} }
} }
var toolbox = document.getElementById("navigator-toolbox"); var toolbox = getNavToolbox();
if (aShow) if (aShow)
toolbox.removeAttribute("inFullscreen"); toolbox.removeAttribute("inFullscreen");
else else
@ -3853,7 +3884,7 @@ function onViewToolbarsPopupShowing(aEvent)
var firstMenuItem = popup.firstChild; var firstMenuItem = popup.firstChild;
var toolbox = document.getElementById("navigator-toolbox"); var toolbox = getNavToolbox();
for (i = 0; i < toolbox.childNodes.length; ++i) { for (i = 0; i < toolbox.childNodes.length; ++i) {
var toolbar = toolbox.childNodes[i]; var toolbar = toolbox.childNodes[i];
var toolbarName = toolbar.getAttribute("toolbarname"); var toolbarName = toolbar.getAttribute("toolbarname");
@ -3875,7 +3906,7 @@ function onViewToolbarsPopupShowing(aEvent)
function onViewToolbarCommand(aEvent) function onViewToolbarCommand(aEvent)
{ {
var toolbox = document.getElementById("navigator-toolbox"); var toolbox = getNavToolbox();
var index = aEvent.originalTarget.getAttribute("toolbarindex"); var index = aEvent.originalTarget.getAttribute("toolbarindex");
var toolbar = toolbox.childNodes[index]; var toolbar = toolbox.childNodes[index];
@ -4367,7 +4398,6 @@ var contentAreaDNDObserver = {
}; };
// For extensions
function getBrowser() function getBrowser()
{ {
if (!gBrowser) if (!gBrowser)
@ -4375,6 +4405,13 @@ function getBrowser()
return gBrowser; return gBrowser;
} }
function getNavToolbox()
{
if (!gNavToolbox)
gNavToolbox = document.getElementById("navigator-toolbox");
return gNavToolbox;
}
function MultiplexHandler(event) function MultiplexHandler(event)
{ try { { try {
var node = event.target; var node = event.target;

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

@ -75,7 +75,7 @@
# so that they can be shared by macBrowserOverlay.xul. # so that they can be shared by macBrowserOverlay.xul.
#include global-scripts.inc #include global-scripts.inc
<script type="application/x-javascript" src="chrome://browser/content/nsContextMenu.js"/> <script type="application/x-javascript" src="chrome://browser/content/nsContextMenu.js"/>
#ifdef MOZ_SAFE_BROWSING #ifdef MOZ_SAFE_BROWSING
<script type="application/x-javascript" src="chrome://browser/content/safebrowsing/sb-loader.js"/> <script type="application/x-javascript" src="chrome://browser/content/safebrowsing/sb-loader.js"/>
#endif #endif
@ -100,8 +100,16 @@
<panel type="autocomplete" chromedir="&locale.dir;" id="PopupAutoComplete" noautofocus="true"/> <panel type="autocomplete" chromedir="&locale.dir;" id="PopupAutoComplete" noautofocus="true"/>
<panel id="editBookmarkPanel"> <panel id="editBookmarkPanel" orient="vertical">
<vbox id="editBookmarkPanelContent" flex="1"/> <vbox id="editBookmarkPanelContent" flex="1"/>
<hbox flex="1">
<spacer flex="1"/>
<button label="&editBookmark.delete.label;"
oncommand="PlacesCommandHook.deleteButtonOnCommand();"/>
<button label="&editBookmark.done.label;"
default="true"
oncommand="PlacesCommandHook.doneButtonOnCommand();"/>
</hbox>
</panel> </panel>
<popup id="toolbar-context-menu" <popup id="toolbar-context-menu"

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

@ -319,10 +319,7 @@ function realmHasPasswords(location) {
var realm = makeURI(location).prePath; var realm = makeURI(location).prePath;
var passwordManager = Components.classes["@mozilla.org/login-manager;1"] var passwordManager = Components.classes["@mozilla.org/login-manager;1"]
.getService(Components.interfaces.nsILoginManager); .getService(Components.interfaces.nsILoginManager);
var passwords = passwordManager.getAllLogins({}); return passwordManager.countLogins(realm, "", "");
// XXX untested
return passwords.some(function (login) { return (login.hostname == realm); });
} }
/** /**

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -37,6 +37,7 @@ browser.jar:
* content/browser/safeMode.js (content/safeMode.js) * content/browser/safeMode.js (content/safeMode.js)
* content/browser/safeMode.xul (content/safeMode.xul) * content/browser/safeMode.xul (content/safeMode.xul)
* content/browser/sanitize.js (content/sanitize.js) * content/browser/sanitize.js (content/sanitize.js)
* content/browser/tabbrowser.xml (content/tabbrowser.xml)
* content/browser/sanitize.xul (content/sanitize.xul) * content/browser/sanitize.xul (content/sanitize.xul)
* content/browser/urlbarBindings.xml (content/urlbarBindings.xml) * content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
* content/browser/utilityOverlay.js (content/utilityOverlay.js) * content/browser/utilityOverlay.js (content/utilityOverlay.js)

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

@ -314,7 +314,7 @@ nsOperaProfileMigrator::GetSourceHomePageURL(nsACString& aResult)
static static
nsOperaProfileMigrator::PrefTransform gTransforms[] = { nsOperaProfileMigrator::PrefTransform gTransforms[] = {
{ "User Prefs", "Download Directory", _OPM(STRING), "browser.download.defaultFolder", _OPM(SetFile), PR_FALSE, -1 }, { "User Prefs", "Download Directory", _OPM(STRING), "browser.download.dir", _OPM(SetFile), PR_FALSE, -1 },
{ nsnull, "Enable Cookies", _OPM(INT), "network.cookie.cookieBehavior", _OPM(SetCookieBehavior), PR_FALSE, -1 }, { nsnull, "Enable Cookies", _OPM(INT), "network.cookie.cookieBehavior", _OPM(SetCookieBehavior), PR_FALSE, -1 },
{ nsnull, "Accept Cookies Session Only", _OPM(BOOL), "network.cookie.enableForCurrentSessionOnly", _OPM(SetBool), PR_FALSE, -1 }, { nsnull, "Accept Cookies Session Only", _OPM(BOOL), "network.cookie.enableForCurrentSessionOnly", _OPM(SetBool), PR_FALSE, -1 },
{ nsnull, "Allow script to resize window", _OPM(BOOL), "dom.disable_window_move_resize", _OPM(SetBool), PR_FALSE, -1 }, { nsnull, "Allow script to resize window", _OPM(BOOL), "dom.disable_window_move_resize", _OPM(SetBool), PR_FALSE, -1 },

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

@ -516,7 +516,7 @@ nsSafariProfileMigrator::SetDownloadFolder(void* aTransform, nsIPrefBranch* aBra
PRBool equals; PRBool equals;
downloadFolder->Equals(desktopFolder, &equals); downloadFolder->Equals(desktopFolder, &equals);
aBranch->SetIntPref("browser.download.folderList", equals ? 0 : 2); aBranch->SetIntPref("browser.download.folderList", equals ? 0 : 2);
aBranch->SetComplexValue("browser.download.defaultFolder", aBranch->SetComplexValue("browser.download.dir",
NS_GET_IID(nsILocalFile), downloadFolder); NS_GET_IID(nsILocalFile), downloadFolder);
return NS_OK; return NS_OK;

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

@ -221,12 +221,12 @@ function getMostRecentBrowserWindow() {
var win = wm.getMostRecentWindow("navigator:browser", true); var win = wm.getMostRecentWindow("navigator:browser", true);
// if we're lucky, this isn't a popup, and we can just return this // if we're lucky, this isn't a popup, and we can just return this
if (win && !win.toolbar.visible) { if (win && win.document.documentElement.getAttribute("chromehidden")) {
var windowList = wm.getEnumerator("navigator:browser", true); var windowList = wm.getEnumerator("navigator:browser", true);
// this is oldest to newest, so this gets a bit ugly // this is oldest to newest, so this gets a bit ugly
while (windowList.hasMoreElements()) { while (windowList.hasMoreElements()) {
var nextWin = windowList.getNext(); var nextWin = windowList.getNext();
if (nextWin.toolbar.visible) if (!nextWin.document.documentElement.getAttribute("chromehidden"))
win = nextWin; win = nextWin;
} }
} }
@ -236,7 +236,7 @@ function getMostRecentBrowserWindow() {
return null; return null;
var win = windowList.getNext(); var win = windowList.getNext();
while (!win.toolbar.visible) { while (win.document.documentElement.getAttribute("chromehidden")) {
if (!windowList.hasMoreElements()) if (!windowList.hasMoreElements())
return null; return null;

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

@ -36,9 +36,10 @@
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
const LAST_USED_ANNO = "bookmarkPropertiesDialog/lastUsed"; const LAST_USED_ANNO = "bookmarkPropertiesDialog/lastUsed";
const STATIC_TITLE_ANNO = "bookmarks/staticTitle";
const MAX_FOLDER_ITEM_IN_MENU_LIST = 5; const MAX_FOLDER_ITEM_IN_MENU_LIST = 5;
var gAddBookmarksPanel = { var gEditItemOverlay = {
/** /**
* The Microsummary Service for displaying microsummaries. * The Microsummary Service for displaying microsummaries.
*/ */
@ -55,20 +56,17 @@ var gAddBookmarksPanel = {
_itemType: -1, _itemType: -1,
_microsummaries: null, _microsummaries: null,
_doneCallback: null, _doneCallback: null,
_currentTags: [],
_hiddenRows: [], _hiddenRows: [],
_observersAdded: false,
get itemId() {
return this._itemId;
},
/** /**
* Determines the initial data for the item edited or added by this dialog * Determines the initial data for the item edited or added by this dialog
*/ */
_determineInfo: function ABP__determineInfo(aInfo) { _determineInfo: function EIO__determineInfo(aInfo) {
const bms = PlacesUtils.bookmarks;
this._itemType = bms.getItemType(this._itemId);
if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK)
this._currentTags = PlacesUtils.tagging.getTagsForURI(this._uri);
else
this._currentTags.splice(0);
// hidden rows // hidden rows
if (aInfo && aInfo.hiddenRows) if (aInfo && aInfo.hiddenRows)
this._hiddenRows = aInfo.hiddenRows; this._hiddenRows = aInfo.hiddenRows;
@ -76,42 +74,56 @@ var gAddBookmarksPanel = {
this._hiddenRows.splice(0); this._hiddenRows.splice(0);
}, },
_showHideRows: function EBP__showHideRows() { _showHideRows: function EIO__showHideRows() {
var isBookmark = this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK;
this._element("nameRow").hidden = this._hiddenRows.indexOf("name") != -1; this._element("nameRow").hidden = this._hiddenRows.indexOf("name") != -1;
this._element("folderRow").hidden = this._element("folderRow").hidden =
this._hiddenRows.indexOf("folderPicker") != -1; this._hiddenRows.indexOf("folderPicker") != -1;
this._element("tagsRow").hidden = this._hiddenRows.indexOf("tags") != -1 || this._element("tagsRow").hidden =
this._itemType != Ci.nsINavBookmarksService.TYPE_BOOKMARK; this._hiddenRows.indexOf("tags") != -1 || !isBookmark;
this._element("descriptionRow").hidden = this._element("descriptionRow").hidden =
this._hiddenRows.indexOf("description") != -1; this._hiddenRows.indexOf("description") != -1;
this._element("locationRow").hidden =
this._hiddenRows.indexOf("location") != -1 || !isBookmark;
}, },
/** /**
* Initialize the panel * Initialize the panel
*/ */
initPanel: function ABP_initPanel(aItemId, aTm, aDoneCallback, aInfo) { initPanel: function EIO_initPanel(aItemId, aInfo) {
this._folderMenuList = this._element("folderMenuList"); this._folderMenuList = this._element("folderMenuList");
this._folderTree = this._element("folderTree"); this._folderTree = this._element("folderTree");
this._tm = aTm;
this._itemId = aItemId; this._itemId = aItemId;
this._uri = PlacesUtils.bookmarks.getBookmarkURI(this._itemId); this._itemType = PlacesUtils.bookmarks.getItemType(this._itemId);
this._doneCallback = aDoneCallback;
this._determineInfo(aInfo); this._determineInfo(aInfo);
if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
this._uri = PlacesUtils.bookmarks.getBookmarkURI(this._itemId);
// tags field
this._element("tagsField").value =
PlacesUtils.tagging.getTagsForURI(this._uri).join(", ");
this._element("locationField").value = this._uri.spec;
}
// folder picker // folder picker
this._initFolderMenuList(); this._initFolderMenuList();
// name picker // name picker
this._initNamePicker(); this._initNamePicker();
// tags field
this._element("tagsField").value = this._currentTags.join(", ");
// description field // description field
this._element("descriptionField").value = this._element("descriptionField").value =
PlacesUtils.getItemDescription(this._itemId); PlacesUtils.getItemDescription(this._itemId);
this._showHideRows(); this._showHideRows();
// observe changes
if (!this._observersAdded) {
PlacesUtils.bookmarks.addObserver(this, false);
window.addEventListener("unload", this, false);
this._observersAdded = true;
}
}, },
/** /**
@ -123,7 +135,7 @@ var gAddBookmarksPanel = {
* @return the new menu item. * @return the new menu item.
*/ */
_appendFolderItemToMenupopup: _appendFolderItemToMenupopup:
function BPP__appendFolderItemToMenuList(aMenupopup, aFolderId) { function EIO__appendFolderItemToMenuList(aMenupopup, aFolderId) {
// First make sure the folders-separator is visible // First make sure the folders-separator is visible
this._element("foldersSeparator").hidden = false; this._element("foldersSeparator").hidden = false;
@ -136,7 +148,7 @@ var gAddBookmarksPanel = {
return folderMenuItem; return folderMenuItem;
}, },
_initFolderMenuList: function BPP__initFolderMenuList() { _initFolderMenuList: function EIO__initFolderMenuList() {
// clean up first // clean up first
var menupopup = this._folderMenuList.menupopup; var menupopup = this._folderMenuList.menupopup;
while (menupopup.childNodes.length > 4) while (menupopup.childNodes.length > 4)
@ -184,21 +196,22 @@ var gAddBookmarksPanel = {
this._element("foldersSeparator").hidden = (menupopup.childNodes.length <= 4); this._element("foldersSeparator").hidden = (menupopup.childNodes.length <= 4);
}, },
QueryInterface: function BPP_QueryInterface(aIID) { QueryInterface: function EIO_QueryInterface(aIID) {
if (aIID.equals(Ci.nsIMicrosummaryObserver) || if (aIID.equals(Ci.nsIMicrosummaryObserver) ||
aIID.equals(Ci.nsIDOMEventListener) || aIID.equals(Ci.nsIDOMEventListener) ||
aIID.equals(Ci.nsINavBookmarkObserver) ||
aIID.eqauls(Ci.nsISupports)) aIID.eqauls(Ci.nsISupports))
return this; return this;
throw Cr.NS_ERROR_NO_INTERFACE; throw Cr.NS_ERROR_NO_INTERFACE;
}, },
_element: function BPP__element(aID) { _element: function EIO__element(aID) {
return document.getElementById("editBMPanel_" + aID); return document.getElementById("editBMPanel_" + aID);
}, },
_createMicrosummaryMenuItem: _createMicrosummaryMenuItem:
function BPP__createMicrosummaryMenuItem(aMicrosummary) { function EIO__createMicrosummaryMenuItem(aMicrosummary) {
var menuItem = document.createElement("menuitem"); var menuItem = document.createElement("menuitem");
// Store a reference to the microsummary in the menu item, so we know // Store a reference to the microsummary in the menu item, so we know
@ -226,22 +239,34 @@ var gAddBookmarksPanel = {
return menuItem; return menuItem;
}, },
_initNamePicker: function ABP_initNamePicker() { _getItemStaticTitle: function EIO__getItemStaticTitle() {
const annos = PlacesUtils.annotations;
if (annos.itemHasAnnotation(this._itemId, STATIC_TITLE_ANNO))
return annos.getItemAnnotation(this._itemId, STATIC_TITLE_ANNO);
return PlacesUtils.bookmarks.getItemTitle(this._itemId);
},
_initNamePicker: function EIO_initNamePicker() {
var userEnteredNameField = this._element("userEnteredName"); var userEnteredNameField = this._element("userEnteredName");
var namePicker = this._element("namePicker"); var namePicker = this._element("namePicker");
var droppable = false; var droppable = false;
userEnteredNameField.label = userEnteredNameField.label = this._getItemStaticTitle();
PlacesUtils.bookmarks.getItemTitle(this._itemId);
// clean up old entries // clean up old entries
var menupopup = namePicker.menupopup; var menupopup = namePicker.menupopup;
while (menupopup.childNodes.length > 2) while (menupopup.childNodes.length > 2)
menupopup.removeChild(menupopup.lastChild); menupopup.removeChild(menupopup.lastChild);
if (this._microsummaries) {
this._microsummaries.removeObserver(this);
this._microsummaries = null;
}
var itemToSelect = userEnteredNameField; var itemToSelect = userEnteredNameField;
try { try {
this._microsummaries = this._mss.getMicrosummaries(this._uri, -1); if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK)
this._microsummaries = this._mss.getMicrosummaries(this._uri, -1);
} }
catch(ex) { catch(ex) {
// getMicrosummaries will throw an exception in at least two cases: // getMicrosummaries will throw an exception in at least two cases:
@ -262,6 +287,9 @@ var gAddBookmarksPanel = {
var microsummary = enumerator.getNext() var microsummary = enumerator.getNext()
.QueryInterface(Ci.nsIMicrosummary); .QueryInterface(Ci.nsIMicrosummary);
var menuItem = this._createMicrosummaryMenuItem(microsummary); var menuItem = this._createMicrosummaryMenuItem(microsummary);
if (this._mss.isMicrosummary(this._itemId, microsummary))
itemToSelect = menuItem;
menupopup.appendChild(menuItem); menupopup.appendChild(menuItem);
} }
} }
@ -278,7 +306,7 @@ var gAddBookmarksPanel = {
}, },
// nsIMicrosummaryObserver // nsIMicrosummaryObserver
onContentLoaded: function ABP_onContentLoaded(aMicrosummary) { onContentLoaded: function EIO_onContentLoaded(aMicrosummary) {
var namePicker = this._element("namePicker"); var namePicker = this._element("namePicker");
var childNodes = namePicker.menupopup.childNodes; var childNodes = namePicker.menupopup.childNodes;
@ -302,7 +330,7 @@ var gAddBookmarksPanel = {
} }
}, },
onElementAppended: function BPP_onElementAppended(aMicrosummary) { onElementAppended: function EIO_onElementAppended(aMicrosummary) {
var namePicker = this._element("namePicker"); var namePicker = this._element("namePicker");
namePicker.menupopup namePicker.menupopup
.appendChild(this._createMicrosummaryMenuItem(aMicrosummary)); .appendChild(this._createMicrosummaryMenuItem(aMicrosummary));
@ -311,52 +339,46 @@ var gAddBookmarksPanel = {
namePicker.setAttribute("droppable", "true"); namePicker.setAttribute("droppable", "true");
}, },
uninitPanel: function ABP_uninitPanel() { uninitPanel: function EIO_uninitPanel(aHideCollapsibleElements) {
if (this._microsummaries) if (aHideCollapsibleElements) {
// hide the folder tree if it was previously visible
if (!this._folderTree.collapsed)
this.toggleFolderTreeVisibility();
// hide the tag selector if it was previously visible
var tagsSelector = this._element("tagsSelector");
if (!tagsSelector.collapsed)
tagsSelector.collapsed = true;
}
if (this._observersAdded) {
PlacesUtils.bookmarks.removeObserver(this);
this._observersAdded = false;
}
if (this._microsummaries) {
this._microsummaries.removeObserver(this); this._microsummaries.removeObserver(this);
this._microsummaries = null;
// hide the folder tree if it was previously visible }
if (!this._folderTree.collapsed) this._itemId = -1;
this.toggleFolderTreeVisibility();
// hide the tag selector if it was previously visible
var tagsSelector = this._element("tagsSelector");
if (!tagsSelector.collapsed)
tagsSelector.collapsed = true;
}, },
saveItem: function ABP_saveItem() { onTagsFieldBlur: function EIO_onTagsFieldBlur() {
var container = this._getFolderIdFromMenuList(); this._updateTags();
const bms = PlacesUtils.bookmarks; },
const ptm = PlacesUtils.ptm;
var txns = [];
// container _updateTags: function EIO__updateTags() {
if (bms.getFolderIdForItem(this._itemId) != container) var currentTags = PlacesUtils.tagging.getTagsForURI(this._uri);
txns.push(ptm.moveItem(this._itemId, container, -1));
// title
var newTitle = this._element("userEnteredName").label;
if (bms.getItemTitle(this._itemId) != newTitle)
txns.push(ptm.editItemTitle(this._itemId, newTitle));
// description
var newDescription = this._element("descriptionField").value;
if (newDescription != PlacesUtils.getItemDescription(this._itemId))
txns.push(ptm.editItemDescription(this._itemId, newDescription));
// Tags, NOT YET UNDOABLE
var tags = this._getTagsArrayFromTagField(); var tags = this._getTagsArrayFromTagField();
if (tags.length > 0 || this._currentTags.length > 0) { if (tags.length > 0 || currentTags.length > 0) {
var tagsToRemove = []; var tagsToRemove = [];
var tagsToAdd = []; var tagsToAdd = [];
var t; var t;
for each (t in this._currentTags) { for each (t in currentTags) {
if (tags.indexOf(t) == -1) if (tags.indexOf(t) == -1)
tagsToRemove.push(t); tagsToRemove.push(t);
} }
for each (t in tags) { for each (t in tags) {
if (this._currentTags.indexOf(t) == -1) if (currentTags.indexOf(t) == -1)
tagsToAdd.push(t); tagsToAdd.push(t);
} }
@ -365,23 +387,75 @@ var gAddBookmarksPanel = {
if (tagsToRemove.length > 0) if (tagsToRemove.length > 0)
PlacesUtils.tagging.untagURI(this._uri, tagsToRemove); PlacesUtils.tagging.untagURI(this._uri, tagsToRemove);
} }
},
if (txns.length > 0) { onNamePickerInput: function EIO_onNamePickerInput() {
// Mark the containing folder as recently-used if it isn't the var title = this._element("namePicker").value;
// "All Bookmarks" root this._element("userEnteredName").label = title;
if (container != PlacesUtils.placesRootId) },
this._markFolderAsRecentlyUsed(container);
onNamePickerChange: function EIO_onNamePickerChange() {
var namePicker = this._element("namePicker")
var txns = [];
const ptm = PlacesUtils.ptm;
// Here we update either the item title or its cached static title
var newTitle = this._element("userEnteredName").label;
if (this._getItemStaticTitle() != newTitle) {
if (PlacesUtils.microsummaries.hasMicrosummary(this._itemId)) {
// Note: this implicitly also takes care of the microsummary->static
// title case, the removeMicorosummary method in the service will set
// the item-title to the value of this annotation.
//
// XXXmano: use a transaction
PlacesUtils.setAnnotationsForItem(this._itemId,
[{name: STATIC_TITLE_ANNO,
value: newTitle}]);
}
else
txns.push(ptm.editItemTitle(this._itemId, newTitle));
} }
if (txns.length > 0) var newMicrosummary = namePicker.selectedItem.microsummary;
ptm.commitTransaction(ptm.aggregateTransactions("Edit Item", txns));
// Only add a microsummary update to the transaction if the microsummary
// has actually changed, i.e. the user selected no microsummary, but the
// bookmark previously had one, or the user selected a microsummary which
// is not the one the bookmark previously had
if ((newMicrosummary == null && this._mss.hasMicrosummary(this._itemId)) ||
(newMicrosummary != null &&
!this._mss.isMicrosummary(this._itemId, newMicrosummary))) {
txns.push(ptm.editBookmarkMicrosummary(this._itemId, newMicrosummary));
}
var aggregate = ptm.aggregateTransactions("Edit Item Title", txns);
ptm.commitTransaction(aggregate);
}, },
onNamePickerInput: function ABP_onNamePickerInput() { onDescriptionFieldBlur: function EIO_onDescriptionFieldInput() {
this._element("userEnteredName").label = this._element("namePicker").value; var description = this._element("descriptionField").value;
if (description != PlacesUtils.getItemDescription(this._itemId)) {
var txn = PlacesUtils.ptm
.editItemDescription(this._itemId, description);
PlacesUtils.ptm.commitTransaction(txn);
}
}, },
toggleFolderTreeVisibility: function ABP_toggleFolderTreeVisibility() { onLocationFieldBlur: function EIO_onLocationFieldBlur() {
// XXXmano: uri fixup
var uri;
try {
uri = IO.newURI(this._element("locationField").value);
}
catch(ex) { return; }
if (!this._uri.equals(uri)) {
var txn = PlacesUtils.ptm.editBookmarkURI(this._itemId, uri);
PlacesUtils.ptm.commitTransaction(txn);
}
},
toggleFolderTreeVisibility: function EIO_toggleFolderTreeVisibility() {
var expander = this._element("foldersExpander"); var expander = this._element("foldersExpander");
if (!this._folderTree.collapsed) { if (!this._folderTree.collapsed) {
expander.className = "expander-down"; expander.className = "expander-down";
@ -402,7 +476,7 @@ var gAddBookmarksPanel = {
}, },
_getFolderIdFromMenuList: _getFolderIdFromMenuList:
function BPP__getFolderIdFromMenuList() { function EIO__getFolderIdFromMenuList() {
var selectedItem = this._folderMenuList.selectedItem var selectedItem = this._folderMenuList.selectedItem
switch (selectedItem.id) { switch (selectedItem.id) {
case "editBMPanel_placesRootItem": case "editBMPanel_placesRootItem":
@ -431,7 +505,7 @@ var gAddBookmarksPanel = {
* true. * true.
*/ */
_getFolderMenuItem: _getFolderMenuItem:
function BPP__getFolderMenuItem(aFolderId, aCheckStaticFolderItems) { function EIO__getFolderMenuItem(aFolderId, aCheckStaticFolderItems) {
var menupopup = this._folderMenuList.menupopup; var menupopup = this._folderMenuList.menupopup;
// 0: All Bookmarks, 1: Bookmarks root, 2: toolbar folder, 3: separator // 0: All Bookmarks, 1: Bookmarks root, 2: toolbar folder, 3: separator
@ -444,9 +518,9 @@ var gAddBookmarksPanel = {
if (aFolderId == PlacesUtils.placesRootId) if (aFolderId == PlacesUtils.placesRootId)
return this._element("placesRootItem"); return this._element("placesRootItem");
if (aFolderId == PlacesUtils.bookmarksRootId) if (aFolderId == PlacesUtils.bookmarksRootId)
return this._element("bmRootItem") return this._element("bmRootItem");
if (aFolderId == PlacesUtils.toolbarFolderId) if (aFolderId == PlacesUtils.toolbarFolderId)
return this._element("toolbarFolderItem") return this._element("toolbarFolderItem");
} }
// 3 special folders + separator + folder-items-count limit // 3 special folders + separator + folder-items-count limit
@ -456,14 +530,29 @@ var gAddBookmarksPanel = {
return this._appendFolderItemToMenupopup(menupopup, aFolderId); return this._appendFolderItemToMenupopup(menupopup, aFolderId);
}, },
onMenuListFolderSelect: function BPP_onMenuListFolderSelect(aEvent) { onFolderMenuListCommand: function EIO_onFolderMenuListCommand(aEvent) {
if (this._folderTree.hidden) var container = this._getFolderIdFromMenuList();
return;
this._folderTree.selectFolders([this._getFolderIdFromMenuList()]); // Move the item
if (PlacesUtils.bookmarks.getFolderIdForItem(this._itemId) != container) {
var txn = PlacesUtils.ptm.moveItem(this._itemId, container, -1);
PlacesUtils.ptm.commitTransaction(txn);
// Mark the containing folder as recently-used if it isn't the
// "All Bookmarks" root
if (container != PlacesUtils.placesRootId)
this._markFolderAsRecentlyUsed(container);
}
// Update folder-tree selection
if (isElementVisible(this._folderTree)) {
var selectedNode = this._folderTree.selectedNode;
if (selectedNode.itemId != container)
this._folderTree.selectFolders([container]);
}
}, },
onFolderTreeSelect: function BPP_onFolderTreeSelect() { onFolderTreeSelect: function EIO_onFolderTreeSelect() {
var selectedNode = this._folderTree.selectedNode; var selectedNode = this._folderTree.selectedNode;
if (!selectedNode) if (!selectedNode)
return; return;
@ -473,17 +562,18 @@ var gAddBookmarksPanel = {
// already selected // already selected
var oldSelectedItem = this._folderMenuList.selectedItem; var oldSelectedItem = this._folderMenuList.selectedItem;
if ((oldSelectedItem.id == "editBMPanel_toolbarFolderItem" && if ((oldSelectedItem.id == "editBMPanel_toolbarFolderItem" &&
folderId == PlacesUtils.bookmarks.toolbarFolder) || folderId == PlacesUtils.toolbarFolderId) ||
(oldSelectedItem.id == "editBMPanel_bmRootItem" && (oldSelectedItem.id == "editBMPanel_bmRootItem" &&
folderId == PlacesUtils.bookmarks.bookmarksRoot)) folderId == PlacesUtils.bookmarksRootId))
return; return;
var folderItem = this._getFolderMenuItem(folderId, false); var folderItem = this._getFolderMenuItem(folderId, false);
this._folderMenuList.selectedItem = folderItem; this._folderMenuList.selectedItem = folderItem;
folderItem.doCommand();
}, },
_markFolderAsRecentlyUsed: _markFolderAsRecentlyUsed:
function ABP__markFolderAsRecentlyUsed(aFolderId) { function EIO__markFolderAsRecentlyUsed(aFolderId) {
// We'll figure out when/if to expire the annotation if it turns out // We'll figure out when/if to expire the annotation if it turns out
// we keep this recently-used-folders implementation // we keep this recently-used-folders implementation
PlacesUtils.annotations PlacesUtils.annotations
@ -492,47 +582,34 @@ var gAddBookmarksPanel = {
Ci.nsIAnnotationService.EXPIRE_NEVER); Ci.nsIAnnotationService.EXPIRE_NEVER);
}, },
accept: function ABP_accept() { _rebuildTagsSelectorList: function EIO__rebuildTagsSelectorList() {
this.saveItem(); var tagsSelector = this._element("tagsSelector");
if (typeof(this._doneCallback) == "function")
this._doneCallback(); while (tagsSelector.hasChildNodes())
tagsSelector.removeChild(tagsSelector.lastChild);
var tagsInField = this._getTagsArrayFromTagField();
var allTags = PlacesUtils.tagging.allTags;
for each (var tag in allTags) {
var elt = document.createElement("listitem");
elt.setAttribute("type", "checkbox");
elt.setAttribute("label", tag);
if (tagsInField.indexOf(tag) != -1)
elt.setAttribute("checked", "true");
tagsSelector.appendChild(elt);
}
}, },
deleteAndClose: function ABP_deleteAndClose() { toggleTagsSelector: function EIO_toggleTagsSelector() {
// remove the item
if (this._itemId != -1)
PlacesUtils.bookmarks.removeItem(this._itemId);
// remove all tags for the associated url
PlacesUtils.tagging.untagURI(this._uri, null);
if (typeof(this._doneCallback) == "function")
this._doneCallback();
},
toggleTagsSelector: function ABP_toggleTagsSelector() {
var tagsSelector = this._element("tagsSelector"); var tagsSelector = this._element("tagsSelector");
var expander = this._element("tagsSelectorExpander"); var expander = this._element("tagsSelectorExpander");
if (tagsSelector.collapsed) { if (!isElementVisible(tagsSelector)) {
expander.className = "expander-down"; expander.className = "expander-down";
expander.setAttribute("tooltiptext", expander.setAttribute("tooltiptext",
expander.getAttribute("tooltiptextdown")); expander.getAttribute("tooltiptextdown"));
// rebuild the tag list this._rebuildTagsSelectorList();
while (tagsSelector.hasChildNodes())
tagsSelector.removeChild(tagsSelector.lastChild);
var tagsInField = this._getTagsArrayFromTagField();
var allTags = PlacesUtils.tagging.allTags;
for each (var tag in allTags) {
var elt = document.createElement("listitem");
elt.setAttribute("type", "checkbox");
elt.setAttribute("label", tag);
if (tagsInField.indexOf(tag) != -1)
elt.setAttribute("checked", "true");
tagsSelector.appendChild(elt);
}
// This is a no-op if we've added the listener. // This is a no-op if we've added the listener.
tagsSelector.addEventListener("CheckboxStateChange", this, false); tagsSelector.addEventListener("CheckboxStateChange", this, false);
@ -546,7 +623,7 @@ var gAddBookmarksPanel = {
tagsSelector.collapsed = !tagsSelector.collapsed; tagsSelector.collapsed = !tagsSelector.collapsed;
}, },
_getTagsArrayFromTagField: function() { _getTagsArrayFromTagField: function EIO__getTagsArrayFromTagField() {
// we don't require the leading space (after each comma) // we don't require the leading space (after each comma)
var tags = this._element("tagsField").value.split(","); var tags = this._element("tagsField").value.split(",");
for (var i=0; i < tags.length; i++) { for (var i=0; i < tags.length; i++) {
@ -563,8 +640,9 @@ var gAddBookmarksPanel = {
}, },
// nsIDOMEventListener // nsIDOMEventListener
handleEvent: function ABP_nsIDOMEventListener(aEvent) { handleEvent: function EIO_nsIDOMEventListener(aEvent) {
if (aEvent.type == "CheckboxStateChange") { switch (aEvent.type) {
case "CheckboxStateChange":
// Update the tags field when items are checked/unchecked in the listbox // Update the tags field when items are checked/unchecked in the listbox
var tags = this._getTagsArrayFromTagField(); var tags = this._getTagsArrayFromTagField();
@ -576,6 +654,68 @@ var gAddBookmarksPanel = {
tags.splice(indexOfItem, 1); tags.splice(indexOfItem, 1);
} }
this._element("tagsField").value = tags.join(", "); this._element("tagsField").value = tags.join(", ");
this._updateTags();
break;
case "unload":
this.uninitPanel(false);
break;
} }
} },
// nsINavBookmarkObserver
onItemChanged: function EIO_onItemChanged(aItemId, aProperty,
aIsAnnotationProperty, aValue) {
if (this._itemId != aItemId)
return;
switch (aProperty) {
case "title":
if (PlacesUtils.annotations.itemHasAnnotation(this._itemId,
STATIC_TITLE_ANNO))
return; // onContentLoaded updates microsummary-items
var userEnteredNameField = this._element("userEnteredName");
if (userEnteredNameField.value != aValue) {
userEnteredNameField.value = aValue;
var namePicker = this._element("namePicker");
if (namePicker.selectedItem == userEnteredNameField)
namePicker.label = aValue;
}
break;
case "uri":
var locationField = this._element("locationField");
if (locationField.value != aValue) {
locationField.value = aValue;
this._uri = IO.newURI(aValue);
this._initNamePicker(); // for microsummaries
this._element("tagsField").value =
PlacesUtils.tagging.getTagsForURI(this._uri).join(", ");
this._rebuildTagsSelectorList();
}
break;
case DESCRIPTION_ANNO:
this._element("descriptionField").value =
PlacesUtils.annotations.getItemDescription(this._itemId);
break;
}
},
onItemMoved: function EIO_onItemMoved(aItemId, aOldParent, aOldIndex,
aNewParent, aNewIndex) {
if (aItemId != this._itemId ||
aNewParent == this._getFolderIdFromMenuList())
return;
var folderItem = this._getFolderMenuItem(aNewParent, false);
// just setting selectItem _does not_ trigger oncommand, so we don't
// recurse
this._folderMenuList.selectedItem = folderItem;
},
onBeginUpdateBatch: function() { },
onEndUpdateBatch: function() { },
onItemAdded: function() { },
onItemRemoved: function() { },
onItemVisited: function() { },
}; };

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

@ -62,7 +62,9 @@
flex="1" flex="1"
editable="true" editable="true"
droppable="false" droppable="false"
oninput="gAddBookmarksPanel.onNamePickerInput();"> oninput="gEditItemOverlay.onNamePickerInput();"
onblur="gEditItemOverlay.onNamePickerChange();"
oncommand="gEditItemOverlay.onNamePickerChange();">
<menupopup> <menupopup>
<menuitem id="editBMPanel_userEnteredName"/> <menuitem id="editBMPanel_userEnteredName"/>
<menuitem disabled="true"> <menuitem disabled="true">
@ -72,12 +74,18 @@
</menupopup> </menupopup>
</menulist> </menulist>
</row> </row>
<row align="center" id="editBMPanel_locationRow">
<label value="&editBookmarkOverlay.location.label;"
contorl="editBMPanel_locationField"/>
<textbox id="editBMPanel_locationField"
onblur="gEditItemOverlay.onLocationFieldBlur();"/>
</row>
<row align="center" id="editBMPanel_folderRow"> <row align="center" id="editBMPanel_folderRow">
<label value="&editBookmarkOverlay.folder.label;" <label value="&editBookmarkOverlay.folder.label;"
control="editBMPanel_folderMenuList"/> control="editBMPanel_folderMenuList"/>
<menulist id="editBMPanel_folderMenuList" <menulist id="editBMPanel_folderMenuList"
class="folder-icon" class="folder-icon"
oncommand="gAddBookmarksPanel.onMenuListFolderSelect();"> oncommand="gEditItemOverlay.onFolderMenuListCommand();">
<menupopup> <menupopup>
<!-- Static item for special folders --> <!-- Static item for special folders -->
<menuitem id="editBMPanel_placesRootItem" <menuitem id="editBMPanel_placesRootItem"
@ -97,14 +105,14 @@
tooltiptext="&editBookmarkOverlay.foldersExpanderDown.tooltip;" tooltiptext="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
tooltiptextdown="&editBookmarkOverlay.foldersExpanderDown.tooltip;" tooltiptextdown="&editBookmarkOverlay.foldersExpanderDown.tooltip;"
tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;" tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
oncommand="gAddBookmarksPanel.toggleFolderTreeVisibility();"/> oncommand="gEditItemOverlay.toggleFolderTreeVisibility();"/>
</row> </row>
<tree id="editBMPanel_folderTree" <tree id="editBMPanel_folderTree"
class="placesTree" class="placesTree"
type="places" type="places"
height="150" height="150"
collapsed="true" collapsed="true"
onselect="gAddBookmarksPanel.onFolderTreeSelect();" onselect="gEditItemOverlay.onFolderTreeSelect();"
showRoot="true" showRoot="true"
place="place:folder=2&amp;group=3&amp;excludeItems=1&amp;excludeQueries=1&amp;excludeReadOnlyFolders=1" place="place:folder=2&amp;group=3&amp;excludeItems=1&amp;excludeQueries=1&amp;excludeReadOnlyFolders=1"
hidecolumnpicker="true"> hidecolumnpicker="true">
@ -116,13 +124,14 @@
<row align="center" id="editBMPanel_tagsRow"> <row align="center" id="editBMPanel_tagsRow">
<label value="&editBookmarkOverlay.tags.label;" <label value="&editBookmarkOverlay.tags.label;"
control="tagsField"/> control="tagsField"/>
<textbox id="editBMPanel_tagsField"/> <textbox id="editBMPanel_tagsField"
onblur="gEditItemOverlay.onTagsFieldBlur();"/>
<button id="editBMPanel_tagsSelectorExpander" <button id="editBMPanel_tagsSelectorExpander"
class="expander-down" class="expander-down"
tooltiptext="&editBookmarkOverlay.tagsExpanderDown.tooltip;" tooltiptext="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
tooltiptextdown="&editBookmarkOverlay.tagsExpanderDown.tooltip;" tooltiptextdown="&editBookmarkOverlay.tagsExpanderDown.tooltip;"
tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;" tooltiptextup="&editBookmarkOverlay.expanderUp.tooltip;"
oncommand="gAddBookmarksPanel.toggleTagsSelector();"/> oncommand="gEditItemOverlay.toggleTagsSelector();"/>
</row> </row>
<!-- XXX: Temporary workaround --> <!-- XXX: Temporary workaround -->
@ -133,18 +142,10 @@
<row id="editBMPanel_descriptionRow" align="center"> <row id="editBMPanel_descriptionRow" align="center">
<label value="&editBookmarkOverlay.description.label;" <label value="&editBookmarkOverlay.description.label;"
control="editBMPanel_descriptionField"/> control="editBMPanel_descriptionField"/>
<textbox id="editBMPanel_descriptionField"/> <textbox id="editBMPanel_descriptionField"
onblur="gEditItemOverlay.onDescriptionFieldBlur();"/>
</row> </row>
</rows> </rows>
</grid> </grid>
<hbox>
<spacer flex="1"/>
<button label="&editBookmarkOverlay.delete.label;"
oncommand="gAddBookmarksPanel.deleteAndClose();"/>
<button label="&editBookmarkOverlay.ok.label;"
default="true"
oncommand="gAddBookmarksPanel.accept();"/>
</hbox>
</vbox> </vbox>
</overlay> </overlay>

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

@ -126,10 +126,6 @@ function searchHistory(aInput)
} }
else { else {
switch (gHistoryGrouping) { switch (gHistoryGrouping) {
case "site":
resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
break;
case "visited": case "visited":
resultType = NHQO.RESULTS_AS_URI; resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_VISITCOUNT_DESCENDING; sortingMode = NHQO.SORT_BY_VISITCOUNT_DESCENDING;
@ -138,10 +134,11 @@ function searchHistory(aInput)
resultType = NHQO.RESULTS_AS_URI; resultType = NHQO.RESULTS_AS_URI;
sortingMode = NHQO.SORT_BY_DATE_DESCENDING; sortingMode = NHQO.SORT_BY_DATE_DESCENDING;
break; break;
case "dayandsite": case "dayandsite": // fall through
resultType = NHQO.RESULTS_AS_VISIT;
groups.push(NHQO.GROUP_BY_DAY); groups.push(NHQO.GROUP_BY_DAY);
case "site":
groups.push(NHQO.GROUP_BY_HOST); groups.push(NHQO.GROUP_BY_HOST);
resultType = NHQO.RESULTS_AS_VISIT;
sortingMode = NHQO.SORT_BY_TITLE_ASCENDING; sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
break; break;
default: default:

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

@ -325,6 +325,24 @@ var PlacesOrganizer = {
statusText = selectedNode.uri; statusText = selectedNode.uri;
} }
document.getElementById("status").label = statusText; document.getElementById("status").label = statusText;
},
onContentTreeSelect: function PO_onContentTreeSelect() {
var contentTree = document.getElementById("placeContent");
var deck = document.getElementById("infoDeck");
this.updateStatusBarForView(contentTree);
if (contentTree.hasSingleSelection) {
var selectedNode = contentTree.selectedNode;
if (selectedNode.itemId != -1 &&
!PlacesUtils.nodeIsSeparator(selectedNode)) {
gEditItemOverlay.initPanel(selectedNode.itemId,
{ hiddenRows: ["folderPicker"] });
deck.selectedIndex = 1;
return;
}
}
gEditItemOverlay.uninitPanel();
deck.selectedIndex = 0;
} }
}; };

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

@ -381,6 +381,9 @@
<treecol label="&col.title.label;" id="title" flex="5" primary="true" <treecol label="&col.title.label;" id="title" flex="5" primary="true"
persist="width hidden ordinal sortActive sortDirection"/> persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/> <splitter class="tree-splitter"/>
<treecol label="&col.tags.label;" id="tags" flex="2"
persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol label="&col.url.label;" id="url" flex="5" <treecol label="&col.url.label;" id="url" flex="5"
persist="width hidden ordinal sortActive sortDirection"/> persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/> <splitter class="tree-splitter"/>

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

@ -425,6 +425,7 @@ PlacesTreeView.prototype = {
COLUMN_TYPE_DESCRIPTION: 6, COLUMN_TYPE_DESCRIPTION: 6,
COLUMN_TYPE_DATEADDED: 7, COLUMN_TYPE_DATEADDED: 7,
COLUMN_TYPE_LASTMODIFIED: 8, COLUMN_TYPE_LASTMODIFIED: 8,
COLUMN_TYPE_TAGS: 9,
_getColumnType: function PTV__getColumnType(aColumn) { _getColumnType: function PTV__getColumnType(aColumn) {
var columnType = aColumn.id || aColumn.element.getAttribute("anonid"); var columnType = aColumn.id || aColumn.element.getAttribute("anonid");
@ -445,6 +446,8 @@ PlacesTreeView.prototype = {
return this.COLUMN_TYPE_DATEADDED; return this.COLUMN_TYPE_DATEADDED;
case "lastModified": case "lastModified":
return this.COLUMN_TYPE_LASTMODIFIED; return this.COLUMN_TYPE_LASTMODIFIED;
case "tags":
return this.COLUMN_TYPE_TAGS;
} }
return this.COLUMN_TYPE_UNKNOWN; return this.COLUMN_TYPE_UNKNOWN;
}, },
@ -1020,6 +1023,14 @@ PlacesTreeView.prototype = {
if (PlacesUtils.nodeIsSeparator(node)) if (PlacesUtils.nodeIsSeparator(node))
return ""; return "";
return node.title || PlacesUtils.getString("noTitle"); return node.title || PlacesUtils.getString("noTitle");
case this.COLUMN_TYPE_TAGS:
if (PlacesUtils.nodeIsURI(node)) {
var tagsvc = PlacesUtils.tagging;
var uri = PlacesUtils._uri(node.uri);
var tags = tagsvc.getTagsForURI(uri, {});
return tags.join(", ");
}
return "";
case this.COLUMN_TYPE_URI: case this.COLUMN_TYPE_URI:
if (PlacesUtils.nodeIsURI(node)) if (PlacesUtils.nodeIsURI(node))
return node.uri; return node.uri;
@ -1105,6 +1116,10 @@ PlacesTreeView.prototype = {
if (!this._result) if (!this._result)
throw Cr.NS_ERROR_UNEXPECTED; throw Cr.NS_ERROR_UNEXPECTED;
// Currently cannot sort by tags
if (aColumn.id == "tags")
return;
this._enumerateObservers("onCycleHeader", [aColumn]); this._enumerateObservers("onCycleHeader", [aColumn]);
// Sometimes you want a tri-state sorting, and sometimes you don't. This // Sometimes you want a tri-state sorting, and sometimes you don't. This

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

@ -46,6 +46,8 @@ var Ci = Components.interfaces;
var Cc = Components.classes; var Cc = Components.classes;
var Cr = Components.results; var Cr = Components.results;
Components.utils.import("resource://gre/modules/JSON.jsm");
const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar"; const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
const DESCRIPTION_ANNO = "bookmarkProperties/description"; const DESCRIPTION_ANNO = "bookmarkProperties/description";
const POST_DATA_ANNO = "URIProperties/POSTData"; const POST_DATA_ANNO = "URIProperties/POSTData";
@ -543,7 +545,7 @@ var PlacesUtils = {
} }
return node; return node;
} }
return this.toJSONString(gatherDataPlace(convertNode(aNode))); return JSON.toString(gatherDataPlace(convertNode(aNode)));
case this.TYPE_X_MOZ_URL: case this.TYPE_X_MOZ_URL:
function gatherDataUrl(bNode) { function gatherDataUrl(bNode) {
@ -756,7 +758,7 @@ var PlacesUtils = {
case this.TYPE_X_MOZ_PLACE: case this.TYPE_X_MOZ_PLACE:
case this.TYPE_X_MOZ_PLACE_SEPARATOR: case this.TYPE_X_MOZ_PLACE_SEPARATOR:
case this.TYPE_X_MOZ_PLACE_CONTAINER: case this.TYPE_X_MOZ_PLACE_CONTAINER:
nodes = this.parseJSON("[" + blob + "]"); nodes = JSON.fromString("[" + blob + "]");
break; break;
case this.TYPE_X_MOZ_URL: case this.TYPE_X_MOZ_URL:
var parts = blob.split("\n"); var parts = blob.split("\n");
@ -1447,10 +1449,7 @@ var PlacesUtils = {
}, },
get toolbarFolderId() { get toolbarFolderId() {
if (!("_toolbarFolderId" in this)) return this.bookmarks.toolbarFolder;
this._toolbarFolderId = this.bookmarks.toolbarFolder;
return this._toolbarFolderId;
}, },
get tagRootId() { get tagRootId() {
@ -1516,113 +1515,6 @@ var PlacesUtils = {
} }
} }
return -1; return -1;
},
/**
* Converts a JavaScript object into a JSON string
* (see http://www.json.org/ for the full grammar).
*
* The inverse operation consists of eval("(" + JSON_string + ")");
* and should be provably safe.
*
* @param aJSObject is the object to be converted
* @return the object's JSON representation
*/
toJSONString: function PU_toJSONString(aJSObject) {
// these characters have a special escape notation
const charMap = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f",
"\r": "\\r", '"': '\\"', "\\": "\\\\" };
// we use a single string builder for efficiency reasons
var parts = [];
// this recursive function walks through all objects and appends their
// JSON representation to the string builder
function jsonIfy(aObj) {
if (typeof aObj == "boolean") {
parts.push(aObj ? "true" : "false");
}
else if (typeof aObj == "number" && isFinite(aObj)) {
// there is no representation for infinite numbers or for NaN!
parts.push(aObj.toString());
}
else if (typeof aObj == "string") {
aObj = aObj.replace(/[\\"\x00-\x1F\u0080-\uFFFF]/g, function($0) {
// use the special escape notation if one exists, otherwise
// produce a general unicode escape sequence
return charMap[$0] ||
"\\u" + ("0000" + $0.charCodeAt(0).toString(16)).slice(-4);
});
parts.push('"' + aObj + '"');
}
else if (aObj == null) {
parts.push("null");
}
else if (aObj instanceof Array) {
parts.push("[");
for (var i = 0; i < aObj.length; i++) {
jsonIfy(aObj[i]);
parts.push(",");
}
if (parts[parts.length - 1] == ",")
parts.pop(); // drop the trailing colon
parts.push("]");
}
else if (typeof aObj == "object") {
parts.push("{");
for (var key in aObj) {
jsonIfy(key.toString());
parts.push(":");
jsonIfy(aObj[key]);
parts.push(",");
}
if (parts[parts.length - 1] == ",")
parts.pop(); // drop the trailing colon
parts.push("}");
}
else {
throw new Error("No JSON representation for this object!");
}
} // end of jsonIfy definition
jsonIfy(aJSObject);
var newJSONString = parts.join(" ");
// sanity check - so that API consumers can just eval this string
if (/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
newJSONString.replace(/"(\\.|[^"\\])*"/g, "")
))
throw new Error("JSON conversion failed unexpectedly!");
return newJSONString;
},
/**
* Converts a JSON string into a JavaScript object
* (see http://www.json.org/ for the full grammar).
*
* @param jsonText is the object to be converted
* @return a JS Object
*/
parseJSON: function parseJSON(jsonText) {
var m = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
};
var EVAL_SANDBOX = new Components.utils.Sandbox("about:blank");
if (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(jsonText.
replace(/\\./g, '@').
replace(/"[^"\\\n\r]*"/g, ''))) {
var j = Components.utils.evalInSandbox(jsonText, EVAL_SANDBOX);
return j;
}
else
throw new SyntaxError('parseJSON');
} }
}; };

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

@ -171,26 +171,35 @@ var gMainPane = {
/* /*
* Preferences: * Preferences:
* *
* browser.download.showWhenStarting * browser.download.showWhenStarting - bool
* true if the Download Manager should be opened when a download is started, * True if the Download Manager should be opened when a download is
* false if it shouldn't be opened * started, false if it shouldn't be opened.
* browser.download.closeWhenDone * browser.download.closeWhenDone - bool
* true if the Download Manager should be closed when all downloads * True if the Download Manager should be closed when all downloads
* complete, false if it shouldn't be closed * complete, false if it should be left open.
* browser.download.useDownloadDir * browser.download.useDownloadDir - bool
* true if downloads are saved to a default location with no UI shown, false * True if downloads are saved with no save-as UI shown, false if
* if the user should always be asked where to save files * the user should always be asked where to save a file.
* browser.download.dir * browser.download.dir - str path
* the last directory to which a download was saved * A local path the user may have selected for downloaded files to be
* saved. Migration of other browser settings may also set this path.
* This path is enabled when folderList is equals 2.
* browser.download.lastDir - str path
* May contain the last folder path accessed when the user browsed
* via the file save-as dialog. (see contentAreaUtils.js)
* browser.download.folderList - int
* Indicates the location users wish to save downloaded files too.
* It is also used to display special file labels when the default
* download location is either the Desktop or the Downloads folder.
* Values:
* 0 - The desktop is the default download location.
* 1 - The system's downloads folder is the default download location.
* 2 - The default download location is elsewhere as specified in
* browser.download.dir.
* browser.download.downloadDir * browser.download.downloadDir
* the current default download location * depreciated.
* browser.download.folderList * browser.download.defaultFolder
* 0 if the desktop is the default download location, * depreciated.
* 1 if the downloads folder is the default download location,
* 2 if the default download location is elsewhere;
* used to display special UI when the default location is the Desktop or
* the Downloads folder in Download Manager UI and in the file field in
* preferences
*/ */
/** /**
@ -232,7 +241,7 @@ var gMainPane = {
// don't override the preference's value in UI // don't override the preference's value in UI
return undefined; return undefined;
}, },
/** /**
* Displays a file picker in which the user can choose the location where * Displays a file picker in which the user can choose the location where
* downloads are automatically saved, updating preferences and UI in * downloads are automatically saved, updating preferences and UI in
@ -241,58 +250,139 @@ var gMainPane = {
chooseFolder: function () chooseFolder: function ()
{ {
const nsIFilePicker = Components.interfaces.nsIFilePicker; const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsILocalFile = Components.interfaces.nsILocalFile;
var fp = Components.classes["@mozilla.org/filepicker;1"] var fp = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker); .createInstance(nsIFilePicker);
var bundlePreferences = document.getElementById("bundlePreferences"); var bundlePreferences = document.getElementById("bundlePreferences");
var title = bundlePreferences.getString("chooseDownloadFolderTitle"); var title = bundlePreferences.getString("chooseDownloadFolderTitle");
fp.init(window, title, nsIFilePicker.modeGetFolder); fp.init(window, title, nsIFilePicker.modeGetFolder);
const nsILocalFile = Components.interfaces.nsILocalFile;
var customDirPref = document.getElementById("browser.download.dir");
if (customDirPref.value)
fp.displayDirectory = customDirPref.value;
fp.appendFilters(nsIFilePicker.filterAll); fp.appendFilters(nsIFilePicker.filterAll);
var folderListPref = document.getElementById("browser.download.folderList");
var currentDirPref = this._indexToFolder(folderListPref.value); // file
var defDownloads = this._indexToFolder(1); // file
// First try to open what's currently configured
if (currentDirPref && currentDirPref.exists()) {
fp.displayDirectory = currentDirPref;
} // Try the system's download dir
else if (defDownloads && defDownloads.exists()) {
fp.displayDirectory = defDownloads;
} // Fall back to Desktop
else {
fp.displayDirectory = this._indexToFolder(0);
}
if (fp.show() == nsIFilePicker.returnOK) { if (fp.show() == nsIFilePicker.returnOK) {
var file = fp.file.QueryInterface(nsILocalFile); var file = fp.file.QueryInterface(nsILocalFile);
var currentDirPref = document.getElementById("browser.download.downloadDir"); var currentDirPref = document.getElementById("browser.download.dir");
customDirPref.value = currentDirPref.value = file; currentDirPref.value = file;
var folderListPref = document.getElementById("browser.download.folderList"); var folderListPref = document.getElementById("browser.download.folderList");
folderListPref.value = this._folderToIndex(file); folderListPref.value = this._folderToIndex(file);
// Note, the real prefs will not be updated yet, so dnld manager's
// userDownloadsDirectory may not return the right folder after
// this code executes. displayDownloadDirPref will be called on
// the assignment above to update the UI.
} }
}, },
/** /**
* Initializes the download folder widget based on the folder as stored in * Initializes the download folder display settings based on the user's
* preferences. * preferences.
*/ */
readDownloadDirPref: function () displayDownloadDirPref: function ()
{ {
var folderListPref = document.getElementById("browser.download.folderList"); var folderListPref = document.getElementById("browser.download.folderList");
var bundlePreferences = document.getElementById("bundlePreferences"); var bundlePreferences = document.getElementById("bundlePreferences");
var downloadFolder = document.getElementById("downloadFolder"); var downloadFolder = document.getElementById("downloadFolder");
var currentDirPref = document.getElementById("browser.download.dir");
var customDirPref = document.getElementById("browser.download.dir"); // The user's download folder is based on the preferences listed above.
var customIndex = customDirPref.value ? this._folderToIndex(customDirPref.value) : 0; // However, if the system does not support a download folder, the
if (folderListPref.value == 0 || customIndex == 0) // actual path returned will be the system's desktop or home folder.
downloadFolder.label = bundlePreferences.getString("desktopFolderName"); // If this is the case, skip off displaying the Download label and
else if (folderListPref.value == 1 || customIndex == 1) // display Desktop, even though folderList might be 1.
downloadFolder.label = bundlePreferences.getString("myDownloadsFolderName"); var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
else .getService(Components.interfaces.nsIProperties);
downloadFolder.label = this._getDisplayNameOfFile(customDirPref.value); var desk = fileLocator.get("Desk", Components.interfaces.nsILocalFile);
var dnldMgr = Components.classes["@mozilla.org/download-manager;1"]
.getService(Components.interfaces.nsIDownloadManager);
var supportDownloadLabel = !dnldMgr.defaultDownloadsDirectory.equals(desk);
// Used in defining the correct path to the folder icon.
var ios = Components.classes["@mozilla.org/network/io-service;1"] var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService); .getService(Components.interfaces.nsIIOService);
var fph = ios.getProtocolHandler("file") var fph = ios.getProtocolHandler("file")
.QueryInterface(Components.interfaces.nsIFileProtocolHandler); .QueryInterface(Components.interfaces.nsIFileProtocolHandler);
var currentDirPref = document.getElementById("browser.download.downloadDir"); var iconUrlSpec;
var downloadDir = currentDirPref.value || this._indexToFolder(folderListPref.value);
var urlspec = fph.getURLSpecFromFile(downloadDir); // Display a 'pretty' label or the path in the UI.
downloadFolder.image = "moz-icon://" + urlspec + "?size=16"; if (folderListPref.value == 2) {
// Custom path selected and is configured
downloadFolder.label = this._getDisplayNameOfFile(currentDirPref.value);
iconUrlSpec = fph.getURLSpecFromFile(currentDirPref.value);
} else if (folderListPref.value == 1 && supportDownloadLabel) {
// 'Downloads'
// In 1.5, this pointed to a folder we created called 'My Downloads'
// and was available as an option in the 1.5 drop down. On XP this
// was in My Documents, on OSX it was in User Docs. In 2.0, we did
// away with the drop down option, although the special label was
// still supported for the folder if it existed. Because it was
// not exposed it was rarely used.
// With 3.0, a new desktop folder - 'Downloads' was introduced for
// platforms and versions that don't support a default system downloads
// folder. See nsDownloadManager for details.
downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1));
} else {
// 'Desktop'
downloadFolder.label = bundlePreferences.getString("desktopFolderName");
iconUrlSpec = fph.getURLSpecFromFile(desk);
}
downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
// don't override the preference's value in UI // don't override the preference's value in UI
return undefined; return undefined;
}, },
/**
* Returns the textual path of a folder in readable form.
*/
_getDisplayNameOfFile: function (aFolder)
{
// TODO: would like to add support for 'Downloads on Macintosh HD'
// for OS X users.
return aFolder ? aFolder.path : "";
},
/**
* Returns the Downloads folder. If aFolder is "Desktop", then the Downloads
* folder returned is the desktop folder; otherwise, it is a folder whose name
* indicates that it is a download folder and whose path is as determined by
* the XPCOM directory service via the download manager's attribute
* defaultDownloadsDirectory.
*
* @throws if aFolder is not "Desktop" or "Downloads"
*/
_getDownloadsFolder: function (aFolder)
{
switch(aFolder)
{
case "Desktop":
var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
return fileLoc.get("Desk", Components.interfaces.nsILocalFile);
break;
case "Downloads":
var dnldMgr = Components.classes["@mozilla.org/download-manager;1"]
.getService(Components.interfaces.nsIDownloadManager);
return dnldMgr.defaultDownloadsDirectory;
break;
}
throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
},
/** /**
* Determines the type of the given folder. * Determines the type of the given folder.
* *
@ -312,64 +402,6 @@ var gMainPane = {
return 2; return 2;
}, },
/**
* Returns the Downloads folder. If aFolder is "Desktop", then the Downloads
* folder returned is the desktop folder; otherwise, it is a folder whose name
* indicates that it is a download folder and whose path is as determined by
* the XPCOM directory service from aFolder.
*
* @throws if aFolder is not "Desktop" or "Downloads"
*/
_getDownloadsFolder: function (aFolder)
{
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
var dir = fileLocator.get(this._getSpecialFolderKey(aFolder),
Components.interfaces.nsILocalFile);
if (aFolder != "Desktop")
dir.append("My Downloads"); // XXX l12y!
return dir;
},
/**
* Gets the platform-specific key to be fed to the directory service for the
* given special folder.
*
* @param aFolder
* either of the strings "Desktop" or "Downloads"
* @returns the platform-specific key for the location, which may be used with
* the XPCOM directory service
*/
_getSpecialFolderKey: function (aFolderType)
{
if (aFolderType == "Desktop")
return "Desk";
if (aFolderType == "Downloads")
#ifdef XP_WIN
return "Pers";
#else
#ifdef XP_MACOSX
return "UsrDocs";
#else
return "Home";
#endif
#endif
throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
},
/**
* Returns the textual path of a folder in readable form.
*/
_getDisplayNameOfFile: function (aFolder)
{
// TODO: would like to add support for 'Downloads on Macintosh HD'
// for OS X users.
return aFolder ? aFolder.path : "";
},
/** /**
* Converts an integer into the corresponding folder. * Converts an integer into the corresponding folder.
* *
@ -377,7 +409,7 @@ var gMainPane = {
* an integer * an integer
* @returns the Desktop folder if aIndex == 0, * @returns the Desktop folder if aIndex == 0,
* the Downloads folder if aIndex == 1, * the Downloads folder if aIndex == 1,
* the folder stored in browser.download.dir otherwise * the folder stored in browser.download.dir
*/ */
_indexToFolder: function (aIndex) _indexToFolder: function (aIndex)
{ {
@ -387,19 +419,31 @@ var gMainPane = {
case 1: case 1:
return this._getDownloadsFolder("Downloads"); return this._getDownloadsFolder("Downloads");
} }
var currentDirPref = document.getElementById("browser.download.dir");
var customDirPref = document.getElementById("browser.download.dir"); return currentDirPref.value;
return customDirPref.value;
}, },
/** /**
* Returns the value for the browser.download.folderList preference determined * Returns the value for the browser.download.folderList preference.
* from the current value of browser.download.downloadDir.
*/ */
writeFolderList: function () getFolderListPref: function ()
{ {
var currentDirPref = document.getElementById("browser.download.downloadDir"); var folderListPref = document.getElementById("browser.download.folderList");
return this._folderToIndex(currentDirPref.value); switch(folderListPref.value) {
case 0: // Desktop
case 1: // Downloads
return folderListPref.value;
break;
case 2: // Custom
var currentDirPref = document.getElementById("browser.download.dir");
if (currentDirPref.value) {
// Resolve to a known location if possible. We are writing out
// to prefs on this call, so now would be a good time to do it.
return this._folderToIndex(currentDirPref.value);
}
return 0;
break;
}
} }
#ifdef HAVE_SHELL_SERVICE #ifdef HAVE_SHELL_SERVICE

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

@ -91,7 +91,6 @@
name="browser.download.dir" name="browser.download.dir"
type="file" type="file"
onchange="gMainPane.readDownloadDirPref();"/> onchange="gMainPane.readDownloadDirPref();"/>
<preference id="browser.download.downloadDir" name="browser.download.downloadDir" type="file"/>
<preference id="browser.download.folderList" name="browser.download.folderList" type="int"/> <preference id="browser.download.folderList" name="browser.download.folderList" type="int"/>
<!-- SYSTEM DEFAULTS --> <!-- SYSTEM DEFAULTS -->
@ -177,8 +176,8 @@
<filefield id="downloadFolder" flex="1" <filefield id="downloadFolder" flex="1"
preference="browser.download.folderList" preference="browser.download.folderList"
preference-editable="true" preference-editable="true"
onsyncfrompreference="return gMainPane.readDownloadDirPref();" onsyncfrompreference="return gMainPane.displayDownloadDirPref();"
onsynctopreference="return gMainPane.writeFolderList()"/> onsynctopreference="return gMainPane.getFolderListPref()"/>
<button id="chooseFolder" oncommand="gMainPane.chooseFolder();" <button id="chooseFolder" oncommand="gMainPane.chooseFolder();"
#ifdef XP_MACOSX #ifdef XP_MACOSX
accesskey="&chooseFolderMac.accesskey;" accesskey="&chooseFolderMac.accesskey;"
@ -188,7 +187,7 @@
label="&chooseFolderWin.label;" label="&chooseFolderWin.label;"
#endif #endif
preference="browser.download.folderList" preference="browser.download.folderList"
onsynctopreference="return gMainPane.writeFolderList();"/> onsynctopreference="return gMainPane.getFolderListPref();"/>
</hbox> </hbox>
<radio id="alwaysAsk" value="false" <radio id="alwaysAsk" value="false"
label="&alwaysAsk.label;" label="&alwaysAsk.label;"

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

@ -361,8 +361,8 @@ var gSecurityPane = {
{ {
var noMP = !this._masterPasswordSet(); var noMP = !this._masterPasswordSet();
//var button = document.getElementById("changeMasterPassword"); var button = document.getElementById("changeMasterPassword");
//button.disabled = noMP; button.disabled = noMP;
var checkbox = document.getElementById("useMasterPassword"); var checkbox = document.getElementById("useMasterPassword");
checkbox.checked = !noMP; checkbox.checked = !noMP;

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

@ -143,11 +143,11 @@
preference="pref.privacy.disable_button.view_passwords_exceptions"/> preference="pref.privacy.disable_button.view_passwords_exceptions"/>
</hbox> </hbox>
<hbox id="masterPasswordBox"> <hbox id="masterPasswordBox">
<checkbox id="useMasterPassword" flex="1" disabled="true" <checkbox id="useMasterPassword" flex="1"
oncommand="gSecurityPane.updateMasterPasswordButton();" oncommand="gSecurityPane.updateMasterPasswordButton();"
label="&useMasterPassword.label;" label="&useMasterPassword.label;"
accesskey="&useMasterPassword.accesskey;"/> accesskey="&useMasterPassword.accesskey;"/>
<button id="changeMasterPassword" disabled="true" <button id="changeMasterPassword"
label="&changeMasterPassword.label;" label="&changeMasterPassword.label;"
accesskey="&changeMasterPassword.accesskey;" accesskey="&changeMasterPassword.accesskey;"
oncommand="gSecurityPane.changeMasterPassword();"/> oncommand="gSecurityPane.changeMasterPassword();"/>

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

@ -55,6 +55,7 @@ const HTTP_BAD_GATEWAY = 502;
const HTTP_SERVICE_UNAVAILABLE = 503; const HTTP_SERVICE_UNAVAILABLE = 503;
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/JSON.jsm");
/** /**
* SuggestAutoCompleteResult contains the results returned by the Suggest * SuggestAutoCompleteResult contains the results returned by the Suggest
@ -522,21 +523,7 @@ SuggestAutoComplete.prototype = {
this._clearServerErrors(); this._clearServerErrors();
// This is a modified version of Crockford's JSON sanitizer, obtained var serverResults = JSON.fromString(responseText);
// from http://www.json.org/js.html.
// This should use built-in functions once bug 340987 is fixed.
const JSON_STRING = /^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/;
var sandbox = new Cu.Sandbox(this._suggestURI.prePath);
function parseJSON(aString) {
try {
if (JSON_STRING.test(aString))
return Cu.evalInSandbox("(" + aString + ")", sandbox);
} catch (e) {}
return [];
};
var serverResults = parseJSON(responseText);
var searchString = serverResults[0] || ""; var searchString = serverResults[0] || "";
var results = serverResults[1] || []; var results = serverResults[1] || [];

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

@ -52,6 +52,7 @@
const Cc = Components.classes; const Cc = Components.classes;
const Ci = Components.interfaces; const Ci = Components.interfaces;
const Cr = Components.results; const Cr = Components.results;
const Cu = Components.utils;
const CID = Components.ID("{5280606b-2510-4fe0-97ef-9b5a22eafe6b}"); const CID = Components.ID("{5280606b-2510-4fe0-97ef-9b5a22eafe6b}");
const CONTRACT_ID = "@mozilla.org/browser/sessionstore;1"; const CONTRACT_ID = "@mozilla.org/browser/sessionstore;1";
@ -100,7 +101,10 @@ const CAPABILITIES = [
]; ];
// sandbox to evaluate JavaScript code from non-trustable sources // sandbox to evaluate JavaScript code from non-trustable sources
var EVAL_SANDBOX = new Components.utils.Sandbox("about:blank"); var EVAL_SANDBOX = new Cu.Sandbox("about:blank");
// module for JSON conversion (needed for the nsISessionStore API)
Cu.import("resource://gre/modules/JSON.jsm");
function debug(aMsg) { function debug(aMsg) {
aMsg = ("SessionStore: " + aMsg).replace(/\S{80}/g, "$&\n"); aMsg = ("SessionStore: " + aMsg).replace(/\S{80}/g, "$&\n");
@ -1618,7 +1622,7 @@ SessionStoreService.prototype = {
try { try {
cookieManager.add(cookie.host, cookie.path || "", cookie.name || "", cookie.value, !!cookie.secure, !!cookie.httponly, true, "expiry" in cookie ? cookie.expiry : MAX_EXPIRY); cookieManager.add(cookie.host, cookie.path || "", cookie.name || "", cookie.value, !!cookie.secure, !!cookie.httponly, true, "expiry" in cookie ? cookie.expiry : MAX_EXPIRY);
} }
catch (ex) { Components.utils.reportError(ex); } // don't let a single cookie stop recovering catch (ex) { Cu.reportError(ex); } // don't let a single cookie stop recovering
} }
}, },
@ -1909,12 +1913,12 @@ SessionStoreService.prototype = {
* safe eval'ing * safe eval'ing
*/ */
_safeEval: function sss_safeEval(aStr) { _safeEval: function sss_safeEval(aStr) {
return Components.utils.evalInSandbox(aStr, EVAL_SANDBOX); return Cu.evalInSandbox(aStr, EVAL_SANDBOX);
}, },
/** /**
* Converts a JavaScript object into a JSON string * Converts a JavaScript object into a JSON string
* (see http://www.json.org/ for the full grammar). * (see http://www.json.org/ for more information).
* *
* The inverse operation consists of eval("(" + JSON_string + ")"); * The inverse operation consists of eval("(" + JSON_string + ")");
* and should be provably safe. * and should be provably safe.
@ -1923,73 +1927,13 @@ SessionStoreService.prototype = {
* @return the object's JSON representation * @return the object's JSON representation
*/ */
_toJSONString: function sss_toJSONString(aJSObject) { _toJSONString: function sss_toJSONString(aJSObject) {
// these characters have a special escape notation var str = JSON.toString(aJSObject, ["_tab", "_hosts"] /* keys to drop */);
const charMap = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f",
"\r": "\\r", '"': '\\"', "\\": "\\\\" };
// we use a single string builder for efficiency reasons
var parts = [];
// this recursive function walks through all objects and appends their
// JSON representation to the string builder
function jsonIfy(aObj) {
if (typeof aObj == "boolean") {
parts.push(aObj ? "true" : "false");
}
else if (typeof aObj == "number" && isFinite(aObj)) {
// there is no representation for infinite numbers or for NaN!
parts.push(aObj.toString());
}
else if (typeof aObj == "string") {
aObj = aObj.replace(/[\\"\x00-\x1F\u0080-\uFFFF]/g, function($0) {
// use the special escape notation if one exists, otherwise
// produce a general unicode escape sequence
return charMap[$0] ||
"\\u" + ("0000" + $0.charCodeAt(0).toString(16)).slice(-4);
});
parts.push('"' + aObj + '"')
}
else if (aObj == null) {
parts.push("null");
}
else if (aObj instanceof Array || aObj instanceof EVAL_SANDBOX.Array) {
parts.push("[");
for (var i = 0; i < aObj.length; i++) {
jsonIfy(aObj[i]);
parts.push(",");
}
if (parts[parts.length - 1] == ",")
parts.pop(); // drop the trailing colon
parts.push("]");
}
else if (typeof aObj == "object") {
parts.push("{");
for (var key in aObj) {
if (key == "_tab")
continue; // XXXzeniko we might even want to drop all private members
jsonIfy(key.toString());
parts.push(":");
jsonIfy(aObj[key]);
parts.push(",");
}
if (parts[parts.length - 1] == ",")
parts.pop(); // drop the trailing colon
parts.push("}");
}
else {
throw new Error("No JSON representation for this object!");
}
}
jsonIfy(aJSObject);
var newJSONString = parts.join(" ");
// sanity check - so that API consumers can just eval this string // sanity check - so that API consumers can just eval this string
if (/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test( if (!JSON.isMostlyHarmless(str))
newJSONString.replace(/"(\\.|[^"\\])*"/g, "")
))
throw new Error("JSON conversion failed unexpectedly!"); throw new Error("JSON conversion failed unexpectedly!");
return newJSONString; return str;
}, },
/* ........ Storage API .............. */ /* ........ Storage API .............. */

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

@ -67,7 +67,7 @@ Console.prototype = {
var wWatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] var wWatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Ci.nsIWindowWatcher); .getService(Ci.nsIWindowWatcher);
wWatch.openWindow(null, "chrome://global/content/console.xul", "_blank", wWatch.openWindow(null, "chrome://global/content/console.xul", "_blank",
"chrome,dialog=no,all", cmdLine); "chrome,dialog=no,all", null);
} else { } else {
// console was already open // console was already open
console.focus(); console.focus();

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

@ -1,3 +1,6 @@
const Ci = Components.interfaces;
const Cc = Components.classes;
function test() { function test() {
ok(Application, "Check global access to Application"); ok(Application, "Check global access to Application");
@ -5,4 +8,19 @@ function test() {
ok(Application.id, "Check to see if an ID exists for the Application"); ok(Application.id, "Check to see if an ID exists for the Application");
ok(Application.name, "Check to see if a name exists for the Application"); ok(Application.name, "Check to see if a name exists for the Application");
ok(Application.version, "Check to see if a version exists for the Application"); ok(Application.version, "Check to see if a version exists for the Application");
var wMediator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
var console = wMediator.getMostRecentWindow("global:console");
if (!console) {
Application.console.open();
setTimeout(checkConsole, 500);
}
}
function checkConsole() {
var wMediator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
var console = wMediator.getMostRecentWindow("global:console");
ok(console, "Check to see if the console window opened");
if (console)
console.close();
} }

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

@ -80,10 +80,7 @@ Var fhUninstallLog
!insertmacro WordReplace !insertmacro WordReplace
!insertmacro GetSize !insertmacro GetSize
!insertmacro GetParameters !insertmacro GetParameters
!insertmacro GetParent
!insertmacro GetOptions !insertmacro GetOptions
!insertmacro GetRoot
!insertmacro DriveSpace
; NSIS provided macros that we have overridden ; NSIS provided macros that we have overridden
!include overrides.nsh !include overrides.nsh
@ -99,18 +96,18 @@ Var fhUninstallLog
VIAddVersionKey "FileDescription" "${BrandShortName} Installer" VIAddVersionKey "FileDescription" "${BrandShortName} Installer"
!insertmacro GetLongPath !insertmacro AddHandlerValues
!insertmacro RegCleanMain
!insertmacro RegCleanUninstall
!insertmacro CloseApp
!insertmacro WriteRegStr2
!insertmacro WriteRegDWORD2
!insertmacro CreateRegKey
!insertmacro CanWriteToInstallDir !insertmacro CanWriteToInstallDir
!insertmacro CheckDiskSpace !insertmacro CheckDiskSpace
!insertmacro CleanVirtualStore !insertmacro CleanVirtualStore
!insertmacro AddHandlerValues !insertmacro CloseApp
!insertmacro CreateRegKey
!insertmacro GetLongPath
!insertmacro GetSingleInstallPath !insertmacro GetSingleInstallPath
!insertmacro RegCleanMain
!insertmacro RegCleanUninstall
!insertmacro WriteRegStr2
!insertmacro WriteRegDWORD2
!include shared.nsh !include shared.nsh

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

@ -62,13 +62,9 @@ Var TmpVal
!include WordFunc.nsh !include WordFunc.nsh
!include MUI.nsh !include MUI.nsh
!insertmacro FileJoin
!insertmacro GetOptions !insertmacro GetOptions
!insertmacro GetParameters !insertmacro GetParameters
!insertmacro LineFind
!insertmacro StrFilter !insertmacro StrFilter
!insertmacro TextCompare
!insertmacro TrimNewLines
!insertmacro WordFind !insertmacro WordFind
!insertmacro WordReplace !insertmacro WordReplace

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

@ -268,6 +268,7 @@ langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$* langpack-%: XPI_NAME=locale-$*
langpack-%: langpack-%:
@echo "Making langpack $(LANGPACK_FILE)" @echo "Making langpack $(LANGPACK_FILE)"
$(NSINSTALL) -D $(DIST)/install
@$(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD) @$(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD)
@$(MAKE) libs-$(AB_CD) USE_EXTENSION_MANIFEST=1 @$(MAKE) libs-$(AB_CD) USE_EXTENSION_MANIFEST=1
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf

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

@ -348,3 +348,5 @@
<!ENTITY spellAddDictionaries.label "Add dictionaries..."> <!ENTITY spellAddDictionaries.label "Add dictionaries...">
<!ENTITY spellAddDictionaries.accesskey "A"> <!ENTITY spellAddDictionaries.accesskey "A">
<!ENTITY editBookmark.done.label "Done">
<!ENTITY editBookmark.delete.label "Delete">

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

@ -1,4 +1,5 @@
<!ENTITY editBookmarkOverlay.name.label "Name:"> <!ENTITY editBookmarkOverlay.name.label "Name:">
<!ENTITY editBookmarkOverlay.location.label "Location:">
<!ENTITY editBookmarkOverlay.liveTitlesSeparator.label "Live Titles"> <!ENTITY editBookmarkOverlay.liveTitlesSeparator.label "Live Titles">
<!ENTITY editBookmarkOverlay.folder.label "Folder:"> <!ENTITY editBookmarkOverlay.folder.label "Folder:">
<!ENTITY editBookmarkOverlay.allBookmarksFolderItem.label "All Bookmarks"> <!ENTITY editBookmarkOverlay.allBookmarksFolderItem.label "All Bookmarks">
@ -9,5 +10,3 @@
<!ENTITY editBookmarkOverlay.tags.label "Tags"> <!ENTITY editBookmarkOverlay.tags.label "Tags">
<!ENTITY editBookmarkOverlay.description.label "Description:"> <!ENTITY editBookmarkOverlay.description.label "Description:">
<!ENTITY editBookmarkOverlay.tagsExpanderDown.tooltip "Show all tags"> <!ENTITY editBookmarkOverlay.tagsExpanderDown.tooltip "Show all tags">
<!ENTITY editBookmarkOverlay.ok.label "OK">
<!ENTITY editBookmarkOverlay.delete.label "Delete">

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

@ -197,6 +197,8 @@
<!ENTITY col.title.label <!ENTITY col.title.label
"Name"> "Name">
<!ENTITY col.tags.label
"Tags">
<!ENTITY col.url.label <!ENTITY col.url.label
"Location"> "Location">
<!ENTITY col.lastvisit.label <!ENTITY col.lastvisit.label

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

@ -40,7 +40,7 @@ languageCodeFormat=%1$S [%2$S]
#### Downloads #### Downloads
desktopFolderName=Desktop desktopFolderName=Desktop
myDownloadsFolderName=My Downloads downloadsFolderName=Downloads
chooseDownloadFolderTitle=Choose Download Folder: chooseDownloadFolderTitle=Choose Download Folder:
#### Download Actions #### Download Actions

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

@ -0,0 +1,12 @@
<!ENTITY untitledTab "(Untitled)">
<!ENTITY newTab.label "New Tab">
<!ENTITY newTab.accesskey "N">
<!ENTITY closeTab.label "Close Tab">
<!ENTITY closeTab.accesskey "c">
<!ENTITY closeOtherTabs.accesskey "o">
<!ENTITY closeOtherTabs.label "Close Other Tabs">
<!ENTITY reloadAllTabs.label "Reload All Tabs">
<!ENTITY reloadAllTabs.accesskey "A">
<!ENTITY reloadTab.label "Reload Tab">
<!ENTITY reloadTab.accesskey "r">
<!ENTITY listAllTabs.label "List all tabs">

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

@ -0,0 +1,10 @@
tabs.loading=Loading...
tabs.untitled=(Untitled)
tabs.closeTab=Close Tab
tabs.close=Close
tabs.closeWarningTitle=Confirm close
tabs.closeWarningOneTab=You are about to close %S tab. Are you sure you want to continue?
tabs.closeWarningMultipleTabs=You are about to close %S tabs. Are you sure you want to continue?
tabs.closeButtonOne=Close tab
tabs.closeButtonMultiple=Close tabs
tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs

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

@ -25,6 +25,8 @@
locale/browser/setDesktopBackground.dtd (%chrome/browser/setDesktopBackground.dtd) locale/browser/setDesktopBackground.dtd (%chrome/browser/setDesktopBackground.dtd)
locale/browser/shellservice.properties (%chrome/browser/shellservice.properties) locale/browser/shellservice.properties (%chrome/browser/shellservice.properties)
locale/browser/sessionstore.properties (%chrome/browser/sessionstore.properties) locale/browser/sessionstore.properties (%chrome/browser/sessionstore.properties)
locale/browser/tabbrowser.dtd (%chrome/browser/tabbrowser.dtd)
locale/browser/tabbrowser.properties (%chrome/browser/tabbrowser.properties)
locale/browser/places/places.dtd (%chrome/browser/places/places.dtd) locale/browser/places/places.dtd (%chrome/browser/places/places.dtd)
locale/browser/places/places.properties (%chrome/browser/places/places.properties) locale/browser/places/places.properties (%chrome/browser/places/places.properties)
locale/browser/places/editBookmarkOverlay.dtd (%chrome/browser/places/editBookmarkOverlay.dtd) locale/browser/places/editBookmarkOverlay.dtd (%chrome/browser/places/editBookmarkOverlay.dtd)

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

@ -972,6 +972,11 @@ statusbarpanel#statusbar-display {
height: 16px; height: 16px;
} }
.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteValue) {
width: 16px;
height: 16px;
}
.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) { .autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
color: #555566; color: #555566;
} }
@ -1189,11 +1194,398 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
list-style-image: none; list-style-image: none;
} }
/* ::::: tabbrowser ::::: */
.tabs-left { .tabs-left {
display: none !important; display: none !important;
} }
/* ::::: close button ::::: */ .tabbrowser-tab:not([selected="true"]):hover {
background: url("chrome://browser/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") repeat-x;
}
.tabbrowser-tab:hover > .tab-image-middle > .tab-icon > .tab-extra-status {
background: none;
}
.tab-icon-image {
width: 16px;
height: 16px;
list-style-image: url("chrome://global/skin/icons/small-globe-sunken.png");
}
.tab-icon {
padding-top: 1px;
margin: 2px 0px 1px 0px;
}
.tab-text {
font: icon;
padding-top: 1px;
margin-top: 2px !important;
}
.tabbrowser-tab[busy] > .tab-icon-image,
.tabbrowser-tab[busy] > .tab-image-middle > .tab-icon > .tab-icon-image {
list-style-image: url("chrome://global/skin/icons/loading_16_grey.gif") !important;
}
.tabbrowser-tab {
-moz-binding: url("chrome://browser/skin/tabbrowser/tabbrowserBindings.xml#tabbrowser-tab") !important;
-moz-appearance: none;
color: #383838;
-moz-box-pack: center;
margin: 2px 0px 3px 0px;
padding: 0px;
border: none !important;
height: 22px !important;
min-width: 1px !important;
text-align: center;
}
.tabbrowser-tab[selected="true"] {
-moz-user-focus: normal;
}
.tabbrowser-tab > .tab-image-middle > .tab-text {
border: 1.4pt solid transparent;
}
.tabbrowser-tab:focus > .tab-image-middle > .tab-text {
border: 1.4pt solid -moz-mac-focusring;
}
.tabbrowser-tab[selected="true"], .tabbrowser-tab:hover {
color: #000000;
}
.tabbrowser-tab[first-tab="true"] > .tab-image-left {
margin-left: 3px !important;
}
.tab-image-left, .tab-image-right {
width: 8px;
margin: 0px;
padding: 0px;
}
.tabbrowser-tab > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-right.png") no-repeat;
}
.tabbrowser-tab:not([selected="true"]) > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-right-bkgnd.png") no-repeat;
margin-bottom: 1px;
}
.tabbrowser-tab:hover:not([selected="true"]) > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-right-hover.png") no-repeat;
}
.tabbrowser-tab > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-left.png") no-repeat;
}
.tabbrowser-tab:not([selected="true"]) > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-left-bkgnd.png") no-repeat;
margin-bottom: 1px;
}
.tabbrowser-tab:hover:not([selected="true"]) > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-left-hover.png") no-repeat;
}
.tabbrowser-tab > .tab-image-middle {
background: url("chrome://browser/skin/tabbrowser/tab-middle.png") repeat-x;
-moz-box-flex: 0 !important;
}
.tabbrowser-tab:not([selected="true"]) > .tab-image-middle {
background: url("chrome://browser/skin/tabbrowser/tab-middle-bkgnd.png");
margin-bottom: 1px;
}
.tabbrowser-tab:hover:not([selected="true"]) > .tab-image-middle {
background: url("chrome://browser/skin/tabbrowser/tab-middle-hover.png");
}
.tabbrowser-tab:not([selected="true"]) > .tab-image-middle > .tab-icon > .tab-icon-image {
list-style-image: url("chrome://global/skin/icons/small-globe-sunken-grey.png");
}
.tabs-closebutton {
padding: 0px 4px 2px 0px;
margin: 0px;
list-style-image: url("chrome://global/skin/icons/closetab.png") !important;
border: none !important;
}
.tabs-closebutton:hover {
list-style-image: url("chrome://global/skin/icons/closetab-hover.png") !important;
border: none !important;
}
.tabs-closebutton:hover:active {
list-style-image: url("chrome://global/skin/icons/closetab-active.png") !important;
border: none !important;
}
.tabbrowser-strip {
-moz-box-orient: vertical !important;
-moz-appearance: dialog;
}
.tabbrowser-tabs {
-moz-binding: url("chrome://browser/skin/tabbrowser/tabbrowserBindings.xml#tabbrowser-tabs");
border: none;
padding: 0;
margin: 0;
-moz-box-pack: center;
-moz-box-align: center;
background: url("chrome://browser/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") repeat-x;
}
.tab-image-right, .tab-image-left {
height: 18px !important;
}
.tabs-bottom {
border: none;
height: 4px !important;
background: url("chrome://browser/skin/tabbrowser/tabs-bottom-bg.png") repeat !important;
margin: 0px !important;
}
tabbrowser > tabbox > tabpanels {
-moz-appearance: none !important;
}
.tab-drop-indicator-bar {
visibility: hidden;
height: 9px;
margin-top: -9px;
position: relative;
}
.tab-drop-indicator {
height: 9px;
width: 9px;
margin-bottom: -5px;
position: relative;
background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
}
.tab-drop-indicator-bar[dragging="true"] {
visibility: visible;
}
/**
* In-tab close button
*/
.tab-close-button > .toolbarbutton-icon {
-moz-margin-end: 0px !important;
margin-top: 2px;
}
.tab-close-button {
list-style-image: url("chrome://global/skin/icons/closetab.png");
-moz-appearance: none;
border: none !important;
padding: 0px;
background: inherit;
cursor: default;
}
.tab-close-button:hover,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover {
list-style-image: url("chrome://global/skin/icons/closetab-hover.png");
}
.tab-close-button:hover:active,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover:active {
list-style-image: url("chrome://global/skin/icons/closetab-active.png");
}
.tabbrowser-tab > .tab-close-button {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle.png");
background-repeat: repeat-x;
-moz-margin-start: -5px;
-moz-margin-end: -1px;
-moz-padding-end: 0px;
}
.tabbrowser-tab[selected="true"] > .tab-close-button {
/* Make this button focusable so clicking on it will not focus the tab while
it's getting closed */
-moz-user-focus: normal;
}
.tabbrowser-tab:not([selected="true"]) > .tab-close-button {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle-bkgnd.png");
margin-bottom: 1px;
}
.tabbrowser-tab:not([selected="true"]):hover > .tab-close-button {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle-hover.png");
}
/**
* Tab Scrollbox Arrow Buttons
*/
.tabbrowser-arrowscrollbox > .scrollbutton-up {
width: 18px;
height: 18px;
margin: 2px 0px 3px 0px;
padding-left: 0;
padding-right: 0;
border: none;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd.png");
background-repeat: no-repeat;
-moz-image-region: rect(0, 11px, 14px, 0);
opacity: 0.65;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"] {
-moz-image-region: rect(0, 33px, 14px, 22px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover {
-moz-image-region: rect(0, 22px, 14px, 11px);
opacity: 1.0;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover:active {
-moz-image-region: rect(0, 44px, 14px, 33px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon {
margin-top: 4px;
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down-box {
margin: 2px 0px 3px 0px;
width: 18px;
height: 18px;
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd.png") !important;
background-repeat: no-repeat;
opacity: 0.65;
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down-box-animate {
margin: 2px 0px 3px 0px;
width: 18px;
height: 18px;
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-animate.png") !important;
background-repeat: no-repeat;
opacity: 0.0;
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down {
margin: 2px 0px 3px 0px;
width: 18px;
height: 18px;
padding-left: 0;
padding-right: 0;
border: none;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png") !important;
-moz-image-region: rect(0, 11px, 14px, 0);
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down[disabled="true"] {
-moz-image-region: rect(0, 33px, 14px, 22px);
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down:not([disabled="true"]):hover {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd.png") !important;
background-repeat: no-repeat;
-moz-image-region: rect(0, 22px, 14px, 11px);
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down:not([disabled="true"]):hover:active {
-moz-image-region: rect(0, 44px, 14px, 33px);
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down > .toolbarbutton-icon {
margin-top: 4px;
-moz-margin-start: 1px;
}
/**
* All Tabs Button
*/
.tabs-alltabs-box {
margin: 2px 0px 3px 0px;
width: 16px;
height: 18px;
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-bkgnd.png");
background-repeat: no-repeat;
opacity: 0.65;
}
.tabbrowser-tabs[overflow="true"] .tabs-alltabs-box {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-bkgnd.png");
}
.tabs-alltabs-button {
margin: 2px 0px 3px 0px;
width: 16px;
height: 18px;
padding-left: 0;
padding-right: 0;
border: none;
}
.tabs-alltabs-button > .toolbarbutton-menu-dropmarker {
margin-right: 2px;
margin-top: 4px;
}
.tabs-alltabs-button > .toolbarbutton-text {
display: none;
}
.tabs-alltabs-button > .toolbarbutton-icon {
-moz-margin-end: 2px;
}
.tabs-alltabs-button:hover {
margin: 2px 0px 3px 0px;
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-bkgnd.png");
background-repeat: no-repeat;
opacity: 1.0;
}
.tabbrowser-tabs[overflow="true"] .tabs-alltabs-button:hover {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-bkgnd.png");
}
.tabs-alltabs-box-animate {
margin: 2px 0px 3px 0px;
width: 16px;
height: 18px;
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-bkgnd-animate.png");
background-repeat: no-repeat;
opacity: 0.0;
}
/**
* All Tabs Menupopup
*/
.alltabs-item > .menu-iconic-left > .menu-iconic-icon {
list-style-image: url("chrome://global/skin/icons/small-globe-sunken.png");
}
.alltabs-item[selected="true"] {
font-weight: bold;
}
.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon {
list-style-image: url("chrome://global/skin/icons/loading_16_grey.gif") !important;
}
.tabs-closebutton { .tabs-closebutton {
padding-right: 4px; padding-right: 4px;

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

@ -62,5 +62,27 @@ classic.jar:
#endif #endif
skin/classic/browser/preferences/Options.png (preferences/Options.png) skin/classic/browser/preferences/Options.png (preferences/Options.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css) skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd.png (tabbrowser/alltabs-box-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-bkgnd.png (tabbrowser/alltabs-box-overflow-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-start.png (tabbrowser/tab-arrow-start.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd.png (tabbrowser/tab-arrow-start-bkgnd.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd-animate.png (tabbrowser/tab-arrow-start-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-end.png (tabbrowser/tab-arrow-end.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd.png (tabbrowser/tab-arrow-end-bkgnd.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd-animate.png (tabbrowser/tab-arrow-end-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tabbrowserBindings.xml (tabbrowser/tabbrowserBindings.xml)
skin/classic/browser/tabbrowser/tabbrowser-tabs-bkgnd.png (tabbrowser/tabbrowser-tabs-bkgnd.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
skin/classic/browser/tabbrowser/tab-left.png (tabbrowser/tab-left.png)
skin/classic/browser/tabbrowser/tab-left-bkgnd.png (tabbrowser/tab-left-bkgnd.png)
skin/classic/browser/tabbrowser/tab-left-hover.png (tabbrowser/tab-left-hover.png)
skin/classic/browser/tabbrowser/tab-middle.png (tabbrowser/tab-middle.png)
skin/classic/browser/tabbrowser/tab-middle-bkgnd.png (tabbrowser/tab-middle-bkgnd.png)
skin/classic/browser/tabbrowser/tab-middle-hover.png (tabbrowser/tab-middle-hover.png)
skin/classic/browser/tabbrowser/tab-right.png (tabbrowser/tab-right.png)
skin/classic/browser/tabbrowser/tab-right-bkgnd.png (tabbrowser/tab-right-bkgnd.png)
skin/classic/browser/tabbrowser/tab-right-hover.png (tabbrowser/tab-right-hover.png)
skin/classic/browser/tabbrowser/tabs-bottom-bg.png (tabbrowser/tabs-bottom-bg.png)
icon.png icon.png
preview.png preview.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/alltabs-box-bkgnd.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 447 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 600 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 302 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 654 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 429 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-arrow-end.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 404 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 693 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-arrow-start-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 421 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-arrow-start.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 472 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-left-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 327 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-left-hover.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 342 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-left.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 417 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-middle-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 192 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-middle-hover.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 185 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-middle.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 175 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-right-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 333 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-right-hover.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 343 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tab-right.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 420 B

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tabDragIndicator.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 347 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 193 B

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

@ -0,0 +1,69 @@
<?xml version="1.0"?>
<!DOCTYPE bindings [
<!ENTITY % tabBrowserDTD SYSTEM "chrome://browser/locale/tabbrowser.dtd" >
%tabBrowserDTD;
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>
<bindings id="globalBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="tabbrowser-tab" extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tab">
<content chromedir="&locale.dir;"
closetabtext="&closeTab.label;">
<xul:hbox class="tab-image-left" xbl:inherits="selected"/>
<xul:hbox flex="1" class="tab-image-middle" align="center" xbl:inherits="selected">
<xul:stack class="tab-icon">
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>
<xul:image class="tab-extra-status"/>
</xul:stack>
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text"/>
</xul:hbox>
<xul:toolbarbutton anonid="close-button" class="tab-close-button" tabindex="-1"/>
<xul:hbox class="tab-image-right" xbl:inherits="selected"/>
</content>
</binding>
<binding id="tabbrowser-tabs"
extends="chrome://browser/content/tabbrowser.xml#tabbrowser-tabs">
<content>
<xul:stack flex="1" class="tabs-stack">
<xul:vbox>
<xul:spacer flex="1"/>
<xul:hbox class="tabs-bottom" align="center"/>
</xul:vbox>
<xul:vbox>
<xul:hbox>
<xul:stack>
<xul:spacer class="tabs-left"/>
</xul:stack>
<xul:arrowscrollbox anonid="arrowscrollbox" orient="horizontal" flex="1" style="min-width: 1px;" class="tabbrowser-arrowscrollbox">
<children/>
</xul:arrowscrollbox>
<xul:stack align="center" pack="end">
<xul:hbox flex="1" class="tabs-alltabs-box"
anonid="alltabs-box"/>
<xul:hbox flex="1" class="tabs-alltabs-box-animate"
anonid="alltabs-box-animate"/>
<xul:toolbarbutton class="tabs-alltabs-button"
type="menu"
anonid="alltabs-button"
tooltipstring="&listAllTabs.label;">
<xul:menupopup class="tabs-alltabs-popup"
anonid="alltabs-popup" position="after_end"/>
</xul:toolbarbutton>
</xul:stack>
<xul:hbox class="tabs-closebutton-box" align="center" pack="end" anonid="tabstrip-closebutton">
<xul:toolbarbutton class="close-button tabs-closebutton"/>
</xul:hbox>
</xul:hbox>
<xul:spacer class="tabs-bottom-spacer"/>
</xul:vbox>
</xul:stack>
</content>
</binding>
</bindings>

Двоичные данные
browser/themes/pinstripe/browser/tabbrowser/tabs-bottom-bg.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 129 B

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

@ -965,6 +965,11 @@ statusbarpanel#statusbar-display {
height: 16px; height: 16px;
} }
.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteValue) {
width: 16px;
height: 16px;
}
.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) { .autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
color: #555566; color: #555566;
} }
@ -1223,6 +1228,481 @@ toolbar[mode="text"] #navigator-throbber[busy="true"] {
opacity: 0.5; opacity: 0.5;
} }
/**
* Tabbrowser Tabs
*/
.tabbrowser-tabs {
-moz-binding: url("chrome://browser/skin/tabbrowser/tabbrowserBindings.xml#tabbrowser-tabs") !important;
padding-top: 0px;
background: -moz-dialog url("chrome://browser/skin/tabbrowser/tabbrowser-tabs-bkgnd.png") !important;
-moz-padding-start: 0px;
}
.tabbrowser-tabs[overflow="true"] {
-moz-padding-start: 0px;
}
/**
* Tab
*/
.tabbrowser-tab {
-moz-appearance: none !important;
-moz-binding: url("chrome://browser/skin/tabbrowser/tabbrowserBindings.xml#tabbrowser-tab") !important;
background: transparent !important;
margin: 0px 0px 1px !important;
padding: 0px !important;
border: none !important;
height: 22px !important;
}
.tabbrowser-tab > .tab-image-middle {
padding-top: 1px;
-moz-padding-start: 1px;
}
.tabbrowser-tab[busy] > .tab-image-middle > .tab-icon > .tab-icon-image {
list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif") !important;
opacity: 0.6;
}
.tabbrowser-tab[selected="true"] {
font-weight: bold;
}
.tabbrowser-tab[selected="true"] > .tab-image-middle > .tab-text {
opacity: 1.0 !important;
}
.tabbrowser-tab > .tab-image-left {
width: 8px;
height: 24px;
background: url("chrome://browser/skin/tabbrowser/tab-left.png") no-repeat;
background-color: -moz-dialog;
-moz-border-radius-topleft: 4px;
}
.tabbrowser-tab[chromedir="rtl"] > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-right.png") no-repeat;
background-color: -moz-dialog;
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 4px;
}
.tabbrowser-tab:not([selected="true"]):not(:hover) > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-left-bkgnd.png") no-repeat;
background-color: -moz-dialog;
}
.tabbrowser-tab[chromedir="rtl"]:not([selected="true"]):not(:hover) > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-right-bkgnd.png") no-repeat;
background-color: -moz-dialog;
}
.tabbrowser-tab > .tab-image-middle {
height: 24px;
background: url("chrome://browser/skin/tabbrowser/tab-middle.png") repeat-x;
background-color: -moz-dialog;
}
.tabbrowser-tab:not([selected="true"]):not(:hover) > .tab-image-middle {
background: url("chrome://browser/skin/tabbrowser/tab-middle-bkgnd.png") repeat-x;
background-color: -moz-dialog;
}
.tabbrowser-tab > .tab-image-right {
width: 8px;
height: 24px;
background: url("chrome://browser/skin/tabbrowser/tab-right.png") no-repeat;
background-color: -moz-dialog;
-moz-border-radius-topright: 4px;
}
.tabbrowser-tab[chromedir="rtl"] > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-left.png") no-repeat;
background-color: -moz-dialog;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 0px;
}
.tabbrowser-tab:not([selected="true"]):not(:hover) > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-right-bkgnd.png") no-repeat;
background-color: -moz-dialog;
}
.tabbrowser-tab[chromedir="rtl"]:not([selected="true"]):not(:hover) > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-left-bkgnd.png") no-repeat;
background-color: -moz-dialog;
}
.tabbrowser-tab:not([selected="true"]) > .tab-image-left,
.tabbrowser-tab:not([selected="true"]) > .tab-image-middle,
.tabbrowser-tab:not([selected="true"]) > .tab-image-right {
height: 23px;
margin-bottom: 1px;
}
.tab-icon-image {
margin-top: 1px;
-moz-margin-end: 3px;
width: 16px;
height: 16px;
list-style-image: url("chrome://global/skin/icons/folder-item.png");
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
.tabs-bottom {
height: 4px !important;
margin: 0px !important;
background: -moz-dialog url("chrome://browser/skin/tabbrowser/tabstrip-bottom.png") repeat !important;
border-top: 1px solid threedshadow;
border-bottom: 1px solid threedshadow;
}
tabpanels {
-moz-appearance: none;
}
.tabs-left,
.tabs-right {
width: 3px;
border-bottom-width: 0px;
}
/* tabbrowser-tab focus ring */
.tabbrowser-tab > .tab-image-middle > .tab-text {
border: 1px dotted transparent;
}
.tabbrowser-tab:focus > .tab-image-middle > .tab-text {
border: 1px dotted -moz-DialogText;
}
/**
* Tab Drag and Drop
*/
.tab-drop-indicator-bar {
visibility: hidden;
height: 9px;
margin-top: -9px;
position: relative;
}
.tab-drop-indicator {
height: 9px;
width: 9px;
margin-bottom: -5px;
position: relative;
background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
}
.tab-drop-indicator-bar[dragging="true"] {
visibility: visible;
}
/**
* In-tab close button
*/
.tab-close-button > .toolbarbutton-icon {
-moz-margin-end: 0px !important;
margin-top: 1px;
}
.tab-close-button {
-moz-appearance: none;
-moz-image-region: rect(0px, 64px, 16px, 48px);
height: 24px;
border: none !important;
padding: 0px;
cursor: default;
list-style-image: url("chrome://global/skin/icons/close.png");
}
.tabbrowser-tab:not([selected="true"]) > .tab-close-button {
height: 23px;
margin-bottom: 1px;
}
.tabbrowser-tab:not([selected="true"]) > .tab-close-button > .toolbarbutton-icon {
margin-top: 2px;
}
.tab-close-button:hover,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover {
-moz-image-region: rect(0px, 32px, 16px, 16px);
opacity: 1.0;
}
.tab-close-button:hover:active,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover:active {
-moz-image-region: rect(0px, 48px, 16px, 32px);
opacity: 1.0;
}
.tabbrowser-tab > .tab-close-button {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle-bkgnd.png");
background-color: -moz-dialog;
}
.tabbrowser-tab:hover > .tab-close-button {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle.png");
}
.tabbrowser-tab[selected="true"] > .tab-close-button {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle.png");
-moz-image-region: rect(0px, 16px, 16px, 0px);
/* Make this button focusable so clicking on it will not focus the tab while
it's getting closed */
-moz-user-focus: normal;
}
.tab-close-button:focus {
outline: none !important;
}
/**
* Tab Scrollbox Arrow Buttons
*/
.tabbrowser-tabs[overflow="true"] .tabs-left {
display: none;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up {
-moz-appearance: none !important;
border: none !important;
margin-top: 2px;
margin-bottom: 4px !important;
padding: 0px;
width: 18px;
height: 23px;
-moz-margin-start: 0px;
-moz-margin-end: 0px;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
-moz-image-region: rect(0, 11px, 14px, 0);
background-repeat: no-repeat;
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-enabled.png");
background-color: -moz-dialog;
-moz-border-radius-topright: 4px;
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > .scrollbutton-up {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-enabled.png");
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 0px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"] {
-moz-image-region: rect(0, 33px, 14px, 22px);
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-disabled.png");
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > .scrollbutton-up[disabled="true"] {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-disabled.png");
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-hover.png");
-moz-image-region: rect(0, 22px, 14px, 11px);
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > .scrollbutton-up:not([disabled="true"]):hover {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-hover.png");
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover:active {
-moz-image-region: rect(0, 44px, 14px, 33px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon {
margin: 6px 0px 0px 0px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-down-stack {
margin-top: 2px;
margin-bottom: 4px;
height: 23px;
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down-box {
-moz-appearance: none !important;
border: none !important;
width: 18px;
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-enabled.png");
background-repeat: no-repeat;
background-color: -moz-dialog;
-moz-border-radius-topleft: 4px;
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > stack > .scrollbutton-down-box {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-enabled.png");
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 4px;
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down-box[disabled="true"] {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-disabled.png");
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > stack > .scrollbutton-down-box[disabled="true"] {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-disabled.png");
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down-box-animate {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-animate.png");
background-repeat: no-repeat;
opacity: 0.0;
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > stack > .scrollbutton-down-box-animate {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-animate.png");
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down {
-moz-appearance: none !important;
border: none !important;
width: 18px;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
-moz-image-region: rect(0, 11px, 14px, 0);
margin: 0px;
padding: 0px;
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > stack > .scrollbutton-down {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down[disabled="true"] {
-moz-image-region: rect(0, 33px, 14px, 22px);
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down:not([disabled="true"]):hover {
-moz-image-region: rect(0, 22px, 14px, 11px);
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-hover.png");
background-repeat: no-repeat;
background-position: top left;
}
.tabbrowser-arrowscrollbox[chromedir="rtl"] > stack > .scrollbutton-down:not([disabled="true"]):hover {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-hover.png");
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down:not([disabled="true"]):hover:active {
-moz-image-region: rect(0, 44px, 14px, 33px);
}
.tabbrowser-arrowscrollbox > stack > .scrollbutton-down > .toolbarbutton-icon {
margin: 6px 0px 0px 1px;
}
/**
* All Tabs Button
*/
.tabs-alltabs-box {
margin-top: 2px;
margin-bottom: 4px;
width: 18px !important;
height: 23px !important;
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-enabled.png");
background-repeat: no-repeat;
background-color: -moz-dialog;
-moz-border-radius-topleft: 4px;
}
stack[chromedir="rtl"] > hbox > .tabs-alltabs-box {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-enabled.png");
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 4px;
}
.tabbrowser-tabs[overflow="true"] .tabs-alltabs-box {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-end-bkgnd.png");
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 0px;
}
.tabbrowser-tabs[overflow="true"] stack[chromedir="rtl"] > hbox > .tabs-alltabs-box {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-start-bkgnd.png");
}
.tabs-alltabs-button {
-moz-appearance: none !important;
border: 0px !important;
margin-top: 2px;
margin-bottom: 4px;
width: 18px !important;
height: 23px !important;
border: 0px !important;
-moz-padding-start: 4px !important;
-moz-padding-end: 4px !important;
padding: 0px;
}
.tabs-alltabs-button > .toolbarbutton-text {
display: none;
}
.tabs-alltabs-button > .toolbarbutton-icon {
-moz-margin-end: 2px;
}
.tabs-alltabs-button > .toolbarbutton-menu-dropmarker {
margin-top: 3px !important;
}
.tabs-alltabs-button:hover {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd-hover.png");
background-repeat: no-repeat;
}
stack[chromedir="rtl"] > hbox > .tabs-alltabs-button:hover {
background-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd-hover.png");
}
.tabbrowser-tabs[overflow="true"] .tabs-alltabs-button:hover {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-end-bkgnd-hover.png");
}
.tabbrowser-tabs[overflow="true"] stack[chromedir="rtl"] > hbox > .tabs-alltabs-button:hover {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-start-bkgnd-hover.png");
}
.tabs-alltabs-box-animate {
margin-top: 2px;
margin-bottom: 4px;
width: 18px !important;
height: 23px !important;
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png");
background-repeat: no-repeat;
opacity: 0.0;
}
stack[chromedir="rtl"] > hbox > .tabs-alltabs-box-animate {
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png");
}
/**
* All Tabs Menupopup
*/
.alltabs-item > .menu-iconic-left > .menu-iconic-icon {
list-style-image: url("chrome://global/skin/icons/folder-item.png");
-moz-image-region: rect(0px, 16px, 16px, 0px);
}
.alltabs-item[selected="true"] {
font-weight: bold;
}
.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon {
list-style-image: url("chrome://global/skin/throbber/Throbber-small.gif");
opacity: 0.6;
}
.tabs-closebutton > .toolbarbutton-icon { .tabs-closebutton > .toolbarbutton-icon {
-moz-margin-end: 0px !important; -moz-margin-end: 0px !important;
-moz-padding-end: 2px !important; -moz-padding-end: 2px !important;

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

@ -65,5 +65,31 @@ classic.jar:
#endif #endif
skin/classic/browser/preferences/Options.png (preferences/Options.png) skin/classic/browser/preferences/Options.png (preferences/Options.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css) skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
skin/classic/browser/tabbrowser/alltabs-box-overflow-end-bkgnd.png (tabbrowser/alltabs-box-overflow-end-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-end-bkgnd-hover.png (tabbrowser/alltabs-box-overflow-end-bkgnd-hover.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-start-bkgnd.png (tabbrowser/alltabs-box-overflow-start-bkgnd.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png)
skin/classic/browser/tabbrowser/alltabs-box-overflow-start-bkgnd-hover.png (tabbrowser/alltabs-box-overflow-start-bkgnd-hover.png)
skin/classic/browser/tabbrowser/tab-arrow-end.png (tabbrowser/tab-arrow-end.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd-animate.png (tabbrowser/tab-arrow-end-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd-disabled.png (tabbrowser/tab-arrow-end-bkgnd-disabled.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd-enabled.png (tabbrowser/tab-arrow-end-bkgnd-enabled.png)
skin/classic/browser/tabbrowser/tab-arrow-end-bkgnd-hover.png (tabbrowser/tab-arrow-end-bkgnd-hover.png)
skin/classic/browser/tabbrowser/tab-arrow-start.png (tabbrowser/tab-arrow-start.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd-animate.png (tabbrowser/tab-arrow-start-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd-disabled.png (tabbrowser/tab-arrow-start-bkgnd-disabled.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd-enabled.png (tabbrowser/tab-arrow-start-bkgnd-enabled.png)
skin/classic/browser/tabbrowser/tab-arrow-start-bkgnd-hover.png (tabbrowser/tab-arrow-start-bkgnd-hover.png)
skin/classic/browser/tabbrowser/tabbrowserBindings.xml (tabbrowser/tabbrowserBindings.xml)
skin/classic/browser/tabbrowser/tabbrowser-tabs-bkgnd.png (tabbrowser/tabbrowser-tabs-bkgnd.png)
skin/classic/browser/tabbrowser/tabDragIndicator.png (tabbrowser/tabDragIndicator.png)
skin/classic/browser/tabbrowser/tab-left.png (tabbrowser/tab-left.png)
skin/classic/browser/tabbrowser/tab-left-bkgnd.png (tabbrowser/tab-left-bkgnd.png)
skin/classic/browser/tabbrowser/tab-middle.png (tabbrowser/tab-middle.png)
skin/classic/browser/tabbrowser/tab-middle-bkgnd.png (tabbrowser/tab-middle-bkgnd.png)
skin/classic/browser/tabbrowser/tab-right.png (tabbrowser/tab-right.png)
skin/classic/browser/tabbrowser/tab-right-bkgnd.png (tabbrowser/tab-right-bkgnd.png)
skin/classic/browser/tabbrowser/tabstrip-bottom.png (tabbrowser/tabstrip-bottom.png)
icon.png icon.png
preview.png preview.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 429 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 469 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 319 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 478 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 475 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 319 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 445 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 411 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 355 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 503 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-arrow-end.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 255 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 518 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 408 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 361 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 512 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-arrow-start.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 277 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-left-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 378 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-left.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 614 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-middle-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 217 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-middle.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 212 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-right-bkgnd.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 390 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tab-right.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 606 B

Двоичные данные
browser/themes/winstripe/browser/tabbrowser/tabDragIndicator.png Executable file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 515 B

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше