Merge from cvs-trunk-mirror to mozilla-central

--HG--
rename : js/src/js.c => js/src/js.cpp
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarena.c => js/src/jsarena.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsemit.c => js/src/jsemit.cpp
rename : js/src/jsgc.c => js/src/jsgc.cpp
rename : js/src/jshash.c => js/src/jshash.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jslock.c => js/src/jslock.cpp
rename : js/src/jsnum.c => js/src/jsnum.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsscan.c => js/src/jsscan.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsscript.c => js/src/jsscript.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/jsutil.c => js/src/jsutil.cpp
rename : js/src/jsxml.c => js/src/jsxml.cpp
This commit is contained in:
benjamin@smedbergs.us 2008-01-17 16:40:00 -05:00
Родитель c4a67b48bf 0543e869d4
Коммит 66879412cd
816 изменённых файлов: 99031 добавлений и 24775 удалений

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

@ -143,21 +143,6 @@ nsLinkableAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
}
}
// XXX What if we're in a contenteditable container?
// We may need to go up the parent chain unless a better API is found
nsCOMPtr<nsIAccessible> docAccessible =
do_QueryInterface(nsCOMPtr<nsIAccessibleDocument>(GetDocAccessible()));
if (docAccessible) {
PRUint32 docState = 0, docExtraState = 0;
rv = docAccessible->GetFinalState(&docState, &docExtraState);
if (NS_SUCCEEDED(rv) &&
(docExtraState & nsIAccessibleStates::EXT_STATE_EDITABLE)) {
// Links not focusable in editor
*aState &= ~(nsIAccessibleStates::STATE_FOCUSED |
nsIAccessibleStates::STATE_FOCUSABLE);
}
}
return NS_OK;
}

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

@ -1506,7 +1506,8 @@ NS_IMETHODIMP nsDocAccessible::FlushPendingEvents()
if (eventType == nsIAccessibleEvent::EVENT_DOM_CREATE ||
eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
nsCOMPtr<nsIAccessible> containerAccessible;
if (accessible) {
if (accessible && eventType == nsIAccessibleEvent::EVENT_ASYNCH_SHOW) {
// For asynch show, delayed invalidatation of parent's children
accessible->GetParent(getter_AddRefs(containerAccessible));
nsCOMPtr<nsPIAccessible> privateContainerAccessible =
do_QueryInterface(containerAccessible);
@ -1853,6 +1854,15 @@ NS_IMETHODIMP nsDocAccessible::InvalidateCacheSubtree(nsIContent *aChild,
// and there is always one of those.
if (aChild && !isHiding) {
if (!isAsynch) {
// DOM already updated with new objects -- invalidate parent's children now
// For asynch we must wait until layout updates before we invalidate the children
nsCOMPtr<nsPIAccessible> privateContainerAccessible =
do_QueryInterface(containerAccessible);
if (privateContainerAccessible) {
privateContainerAccessible->InvalidateChildren();
}
}
// Fire EVENT_SHOW, EVENT_MENUPOPUP_START for newly visible content.
// Fire after a short timer, because we want to make sure the view has been
// updated to make this accessible content visible. If we don't wait,

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

@ -51,8 +51,12 @@
#include "nsIContent.h"
#include "nsGUIEvent.h"
#include "nsXULFormControlAccessible.h"
#include "nsILookAndFeel.h"
#include "nsWidgetsCID.h"
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
/** ------------------------------------------------------ */
/** Impl. of nsXULSelectableAccessible */
/** ------------------------------------------------------ */
@ -322,7 +326,9 @@ nsXULMenuitemAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
}
// Combo box listitem
if (Role(this) == nsIAccessibleRole::ROLE_COMBOBOX_OPTION) {
PRBool isComboboxOption =
(Role(this) == nsIAccessibleRole::ROLE_COMBOBOX_OPTION);
if (isComboboxOption) {
// Is selected?
PRBool isSelected = PR_FALSE;
nsCOMPtr<nsIDOMXULSelectControlItemElement>
@ -338,12 +344,6 @@ nsXULMenuitemAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
isCollapsed = PR_TRUE;
}
// Is disabled?
if (0 == (*aState & nsIAccessibleStates::STATE_UNAVAILABLE)) {
*aState |= (nsIAccessibleStates::STATE_FOCUSABLE |
nsIAccessibleStates::STATE_SELECTABLE);
}
if (isSelected) {
*aState |= nsIAccessibleStates::STATE_SELECTED;
@ -369,6 +369,23 @@ nsXULMenuitemAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
} // isSelected
} // ROLE_COMBOBOX_OPTION
// Set focusable and selectable for items that are available
// and whose metric setting does allow disabled items to be focused.
if (*aState & nsIAccessibleStates::STATE_UNAVAILABLE) {
// Honour the LookAndFeel metric.
nsCOMPtr<nsILookAndFeel> lookNFeel(do_GetService(kLookAndFeelCID));
PRInt32 skipDisabledMenuItems = 0;
lookNFeel->GetMetric(nsILookAndFeel::eMetric_SkipNavigatingDisabledMenuItem,
skipDisabledMenuItems);
// We don't want the focusable and selectable states for combobox items,
// so exclude them here as well.
if (skipDisabledMenuItems || isComboboxOption) {
return NS_OK;
}
}
*aState|= (nsIAccessibleStates::STATE_FOCUSABLE |
nsIAccessibleStates::STATE_SELECTABLE);
return NS_OK;
}

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

@ -112,16 +112,15 @@ pref("app.update.url", "https://aus2.mozilla.org/update/3/%PRODUCT%/%VERSION%/%B
// Interval: Time between checks for a new version (in seconds)
// default=1 day
pref("app.update.interval", 86400);
// Interval: Time before prompting the user to download a new version that
// is available (in seconds) default=1 day
pref("app.update.nagTimer.download", 86400);
// Interval: Time before prompting the user to restart to install the latest
// download (in seconds) default=30 minutes
pref("app.update.nagTimer.restart", 1800);
// Interval: Time before prompting the user again to restart to install the
// latest download (in seconds) default=1 day
pref("app.update.nagTimer.restart", 86400);
// Interval: When all registered timers should be checked (in milliseconds)
// default=10 minutes
pref("app.update.timer", 600000);
// Show the Update Checking UI when the user was idle for x seconds
// Give the user x seconds to react before showing the big UI. default=12 hrs
pref("app.update.promptWaitTime", 43200);
// Show the Update Checking/Ready UI when the user was idle for x seconds
pref("app.update.idletime", 60);
// Whether or not we show a dialog box informing the user that the update was
@ -535,7 +534,7 @@ pref("browser.safebrowsing.remoteLookups", false);
pref("browser.safebrowsing.malware.enabled", true);
// Non-enhanced mode (local url lists) URL list to check for updates
pref("browser.safebrowsing.provider.0.updateURL", "http://sb.google.com/safebrowsing/downloads?client={moz:client}&appver={moz:version}&pver=2.0");
pref("browser.safebrowsing.provider.0.updateURL", "http://sb.google.com/safebrowsing/downloads?client={moz:client}&appver={moz:version}&pver=2.1");
pref("browser.safebrowsing.dataProvider", 0);
@ -583,6 +582,8 @@ pref("browser.sessionstore.postdata", 0);
pref("browser.sessionstore.privacy_level", 1);
// how many tabs can be reopened (per window)
pref("browser.sessionstore.max_tabs_undo", 10);
// maximum number of pages of back-history per tab to save
pref("browser.sessionstore.max_tab_back_history", 10);
// allow META refresh by default
pref("accessibility.blockautorefresh", false);

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

@ -49,7 +49,8 @@ function init(aEvent)
var distroId = prefs.getCharPref("distribution.id");
if (distroId) {
var distroVersion = prefs.getCharPref("distribution.version");
var distroAbout = prefs.getComplexValue("distribution.about", Ci.nsISupportsString);
var distroAbout = prefs.getComplexValue("distribution.about",
Component.interfaces.nsISupportsString);
var distroField = document.getElementById("distribution");
distroField.value = distroAbout;

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

@ -112,21 +112,16 @@
</menu>
<keyset id="baseMenuKeyset">
<key id="key_openHelp"
oncommand="openHelp('firefox-help', 'chrome://browser/locale/help/help.rdf');"
# VK_HELP doesn't work on other platforms yet
#ifdef XP_MACOSX
keycode="&openHelpMac.commandkey;"/>
<!-- On mac, we support both the help key and Cmd+?
...Map Cmd+Shift+/, show Cmd+
<!-- On mac, we map Cmd+Shift+/, but show Cmd+?
(that's for en-US, it might be different for other keyboard layouts) -->
<key id="key_openHelpMac"
oncommand="openHelp('firefox-help', 'chrome://browser/locale/help/help.rdf');"
key="&openHelpMac2.commandkey;"
modifiers="&openHelpMac2.modifiers;"/>
key="&openHelpMac.commandkey;"
modifiers="&openHelpMac.modifiers;"/>
<key id="key_openHelpMacFrontend"
key="&openHelpMac2.frontendCommandkey;"
modifiers="&openHelpMac2.frontendModifiers;"/>
key="&openHelpMac.frontendCommandkey;"
modifiers="&openHelpMac.frontendModifiers;"/>
<!-- These are used to build the Application menu under Cocoa widgets -->
<key id="key_preferencesCmdMac"
key="&preferencesCmdMac.commandkey;"
@ -138,7 +133,9 @@
key="&hideOtherAppsCmdMac.commandkey;"
modifiers="&hideOtherAppsCmdMac.modifiers;"/>
#else
keycode="&openHelp.commandkey;"/>
<key id="key_openHelp"
oncommand="openHelp('firefox-help', 'chrome://browser/locale/help/help.rdf');"
keycode="&openHelp.commandkey;"/>
#endif
</keyset>

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

@ -356,16 +356,19 @@
</menuitem>
<menuitem label="&historyHomeCmd.label;"
command="Browser:Home"
oncommand="BrowserGoHome(event);"
onclick="checkForMiddleClick(this, event);"
key="goHome"/>
<menuitem label="&showAllHistoryCmd.label;"
#ifndef XP_MACOSX
key="showAllHistoryKb"
#endif
command="Browser:ShowAllHistory"/>
<menuseparator id="startHistorySeparator" builder="start"/>
<menuseparator id="endHistorySeparator" builder="end"/>
<menu id="historyUndoMenu" label="&historyUndoMenu.label;" disabled="true">
<menupopup id="historyUndoPopup" onpopupshowing="HistoryMenu.populateUndoSubmenu();"/>
</menu>
<menuseparator id="endUndoSeparator"/>
<menuitem label="&showAllHistoryCmd.label;"
command="Browser:ShowAllHistory"/>
</menupopup>
</menu>
@ -383,7 +386,7 @@
oncommand="BookmarksEventHandler.onCommand(event);"
onclick="BookmarksEventHandler.onClick(event);"
onpopupshowing="BookmarksEventHandler.onPopupShowing(event);">
<menuitem label="&addCurPageAsCmd.label;"
<menuitem label="&bookmarkThisPageCmd.label;"
command="Browser:AddBookmarkAs" key="addBookmarkAsKb"/>
<menuitem id="subscribeToPageMenuitem"
label="&subscribeToPageMenuitem.label;"

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

@ -597,11 +597,9 @@ var BookmarksMenuDropHandler = {
*/
onDrop: function BMDH_onDrop(event, data, session) {
var view = document.getElementById("bookmarksMenuPopup");
// The insertion point for a menupopup view should be -1 during a drag
// & drop operation.
NS_ASSERT(view.insertionPoint.index == -1, "Insertion point for an menupopup view during a drag must be -1!");
PlacesControllerDragHelper.onDrop(null, view, view.insertionPoint, 1);
// Put the item at the end of bookmark menu
var ip = new InsertionPoint(PlacesUtils.bookmarksMenuFolderId, -1);
PlacesControllerDragHelper.onDrop(null, view, ip);
view._rebuild();
}
};

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

@ -244,6 +244,7 @@
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
<key keycode="VK_F5" command="Browser:Reload"/>
#ifndef XP_MACOSX
<key id="showAllHistoryKb" key="&showAllHistoryCmd.commandkey;" command="Browser:ShowAllHistory" modifiers="accel,shift"/>
<key keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/>
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
#endif
@ -259,10 +260,10 @@
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findPrevious" modifiers="shift"/>
<key id="addBookmarkAsKb" key="&addCurPageAsCmd.commandkey;" command="Browser:AddBookmarkAs" modifiers="accel"/>
<key id="addBookmarkAsKb" key="&bookmarkThisPageCmd.commandkey;" command="Browser:AddBookmarkAs" modifiers="accel"/>
# Accel+Shift+A-F are reserved on GTK2
#ifndef MOZ_WIDGET_GTK2
<key id="bookmarkAllTabsKb" key="&addCurPageAsCmd.commandkey;" command="Browser:BookmarkAllTabs" modifiers="accel,shift"/>
<key id="bookmarkAllTabsKb" key="&bookmarkThisPageCmd.commandkey;" command="Browser:BookmarkAllTabs" modifiers="accel,shift"/>
<key id="manBookmarkKb" key="&bookmarksSidebarCmd.commandkey;" command="Browser:ShowAllBookmarks" modifiers="accel,shift"/>
#endif
<key id="viewBookmarksSidebarKb" key="&bookmarksSidebarCmd.commandkey;" command="viewBookmarksSidebar" modifiers="accel"/>

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

@ -2,6 +2,14 @@ searchbar {
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar");
}
tabbrowser {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser");
}
toolbar[printpreview="true"] {
-moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar");
}
/* ::::: location bar ::::: */
#urlbar {
-moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
@ -15,11 +23,6 @@ searchbar {
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup");
}
/* ::::: print preview toolbar ::::: */
toolbar[printpreview="true"] {
-moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar");
}
menuitem.spell-suggestion {
font-weight: bold;
}
@ -37,48 +40,18 @@ window[sizemode="maximized"] #content .notification-inner {
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");
}
%ifdef XP_MACOSX
.tabbrowser-arrowscrollbox {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox");
}
%endif
.tabs-alltabs-popup {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
}
.tabbrowser-tab {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab");
}
.tabbrowser-tab > .tab-close-button,
.tabbrowser-tabs .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;
}
/* Hide extension toolbars that neglected to set the proper class */
window[chromehidden~="location"][chromehidden~="toolbar"] toolbar:not(.chromeclass-menubar),
window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-menubar)
{
window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-menubar) {
display: none;
}
#navigator-toolbox ,
#status-bar ,
#mainPopupSet {
min-width: 1px;
}
#FindToolbar {
overflow-x: hidden;
}

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

@ -42,6 +42,7 @@
# Simon Bünzli <zeniko@gmail.com>
# Johnathan Nightingale <johnath@mozilla.com>
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
# Dão Gottwald <dao@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -1323,7 +1324,7 @@ function gotoHistoryIndex(aEvent)
// Normal click. Go there in the current tab and update session history.
try {
getWebNavigation().gotoIndex(index);
getBrowser().gotoIndex(index);
}
catch(ex) {
return false;
@ -1348,7 +1349,7 @@ function BrowserForward(aEvent, aIgnoreAlt)
if (where == "current") {
try {
getWebNavigation().goForward();
getBrowser().goForward();
}
catch(ex) {
}
@ -1368,7 +1369,7 @@ function BrowserBack(aEvent, aIgnoreAlt)
if (where == "current") {
try {
getWebNavigation().goBack();
getBrowser().goBack();
}
catch(ex) {
}
@ -1445,9 +1446,10 @@ function BrowserHome()
loadOneOrMoreURIs(homePage);
}
function BrowserHomeClick(aEvent)
function BrowserGoHome(aEvent)
{
if (aEvent.button == 2) // right-click: do nothing
if (aEvent && "button" in aEvent &&
aEvent.button == 2) // right-click: do nothing
return;
var homePage = gHomeButton.getHomePage();
@ -1610,7 +1612,7 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup)
if (allowThirdPartyFixup) {
flags = nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
}
getWebNavigation().loadURI(uri, flags, referrer, postData, null);
getBrowser().loadURIWithFlags(uri, flags, referrer, null, postData);
} catch (e) {
}
}
@ -1876,29 +1878,61 @@ function checkForDirectoryListing()
}
}
// If "ESC" is pressed in the url bar, we replace the urlbar's value with the url of the page
// and highlight it, unless it is about:blank, where we reset it to "".
function handleURLBarRevert()
{
var url = getWebNavigation().currentURI.spec;
var throbberElement = document.getElementById("navigator-throbber");
function URLBarSetURI(aURI) {
var value = getBrowser().userTypedValue;
var state = "invalid";
if (!value) {
if (aURI) {
// If the url has "wyciwyg://" as the protocol, strip it off.
// Nobody wants to see it on the urlbar for dynamically generated
// pages.
if (!gURIFixup)
gURIFixup = Cc["@mozilla.org/docshell/urifixup;1"]
.getService(Ci.nsIURIFixup);
try {
aURI = gURIFixup.createExposableURI(aURI);
} catch (ex) {}
} else {
aURI = getWebNavigation().currentURI;
}
value = aURI.spec;
if (value == "about:blank") {
// Replace "about:blank" with an empty string
// only if there's no opener (bug 370555).
if (!content.opener)
value = "";
} else {
// try to decode as UTF-8
try {
value = decodeURI(value).replace(/%/g, "%25");
} catch(e) {}
state = "valid";
}
}
gURLBar.value = value;
SetPageProxyState(state);
}
// If "ESC" is pressed in the url bar, we replace the urlbar's value with the url of the page
// and highlight it, unless it is empty.
function handleURLBarRevert() {
var throbberElement = document.getElementById("navigator-throbber");
var isScrolling = gURLBar.popupOpen;
gBrowser.userTypedValue = null;
// don't revert to last valid url unless page is NOT loading
// and user is NOT key-scrolling through autocomplete list
if ((!throbberElement || !throbberElement.hasAttribute("busy")) && !isScrolling) {
if (url != "about:blank" || content.opener) {
gURLBar.value = url;
URLBarSetURI();
if (gURLBar.value)
gURLBar.select();
SetPageProxyState("valid");
} else { //if about:blank, urlbar becomes ""
gURLBar.value = "";
}
}
gBrowser.userTypedValue = null;
// tell widget to revert to last typed text only if the user
// was scrolling when they hit escape
return !isScrolling;
@ -2015,7 +2049,7 @@ function UpdateUrlbarSearchSplitterState()
splitter.id = "urlbar-search-splitter";
splitter.setAttribute("resizebefore", "flex");
splitter.setAttribute("resizeafter", "flex");
splitter.className = "toolbar-splitter chromeclass-toolbar-additional";
splitter.className = "chromeclass-toolbar-additional";
}
urlbar.parentNode.insertBefore(splitter, ibefore);
} else if (splitter)
@ -3032,10 +3066,8 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
UpdateUrlbarSearchSplitterState();
// Update the urlbar
var url = getWebNavigation().currentURI.spec;
if (gURLBar) {
gURLBar.value = url == "about:blank" ? "" : url;
SetPageProxyState("valid");
URLBarSetURI();
XULBrowserWindow.asyncUpdateUI();
PlacesStarButton.updateState();
}
@ -3465,8 +3497,8 @@ nsBrowserStatusHandler.prototype =
if (aWebProgress.DOMWindow == content) {
if ((location == "about:blank" && !content.opener) ||
location == "") { //second condition is for new tabs, otherwise
location = ""; //reload function is enabled until tab is refreshed
location == "") { // Second condition is for new tabs, otherwise
// reload function is enabled until tab is refreshed.
this.reloadCommand.setAttribute("disabled", "true");
this.reloadSkipCacheCommand.setAttribute("disabled", "true");
} else {
@ -3474,40 +3506,11 @@ nsBrowserStatusHandler.prototype =
this.reloadSkipCacheCommand.removeAttribute("disabled");
}
// The document loaded correctly, clear the value if we should
if (browser.userTypedClear > 0 && aRequest)
browser.userTypedValue = null;
if (!gBrowser.mTabbedMode && aWebProgress.isLoadingDocument)
gBrowser.setIcon(gBrowser.mCurrentTab, null);
//XXXBlake don't we have to reinit this.urlBar, etc.
// when the toolbar changes?
if (gURLBar) {
var userTypedValue = browser.userTypedValue;
if (!userTypedValue) {
// If the url has "wyciwyg://" as the protocol, strip it off.
// Nobody wants to see it on the urlbar for dynamically generated
// pages.
if (!gURIFixup)
gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
.getService(Components.interfaces.nsIURIFixup);
if (location && gURIFixup) {
try {
location = gURIFixup.createExposableURI(aLocationURI).spec;
} catch (ex) {}
}
gURLBar.value = location;
SetPageProxyState("valid");
// Setting the urlBar value in some cases causes userTypedValue to
// become set because of oninput, so reset it to its old value.
browser.userTypedValue = userTypedValue;
} else {
gURLBar.value = userTypedValue;
SetPageProxyState("invalid");
}
URLBarSetURI(aLocationURI);
// Update starring UI
PlacesStarButton.updateState();
@ -3718,13 +3721,6 @@ nsBrowserStatusHandler.prototype =
startDocumentLoad : function(aRequest)
{
// It's okay to clear what the user typed when we start
// loading a document. If the user types, this counter gets
// set to zero, if the document load ends without an
// onLocationChange, this counter gets decremented
// (so we keep it while switching tabs after failed loads)
getBrowser().userTypedClear++;
// clear out feed data
gBrowser.mCurrentBrowser.feeds = null;
@ -3743,11 +3739,6 @@ nsBrowserStatusHandler.prototype =
endDocumentLoad : function(aRequest, aStatus)
{
// The document is done loading, we no longer want the
// value cleared.
if (getBrowser().userTypedClear > 0)
getBrowser().userTypedClear--;
const nsIChannel = Components.interfaces.nsIChannel;
var urlStr = aRequest.QueryInterface(nsIChannel).originalURI.spec;
@ -3812,11 +3803,16 @@ nsBrowserAccess.prototype =
newWindow = openDialog(getBrowserURL(), "_blank", "all,dialog=no", url);
break;
case Ci.nsIBrowserDOMWindow.OPEN_NEWTAB :
var win = this._getMostRecentBrowserWindow();
if (!win) {
// we couldn't find a suitable window, a new one needs to be opened.
return null;
}
var loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground");
var newTab = gBrowser.loadOneTab("about:blank", null, null, null, loadInBackground, false);
newWindow = gBrowser.getBrowserForTab(newTab).docShell
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
var newTab = win.gBrowser.loadOneTab("about:blank", null, null, null, loadInBackground, false);
newWindow = win.gBrowser.getBrowserForTab(newTab).docShell
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
try {
if (aURI) {
if (aOpener) {
@ -3855,8 +3851,8 @@ nsBrowserAccess.prototype =
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
if (aURI) {
getWebNavigation().loadURI(aURI.spec, loadflags, null,
null, null);
gBrowser.loadURIWithFlags(aURI.spec, loadflags, null,
null, null);
}
}
if(!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
@ -3867,6 +3863,55 @@ nsBrowserAccess.prototype =
return newWindow;
},
#ifdef XP_UNIX
#ifndef XP_MACOSX
#define BROKEN_WM_Z_ORDER
#endif
#endif
#ifdef XP_OS2
#define BROKEN_WM_Z_ORDER
#endif
// this returns the most recent non-popup browser window
_getMostRecentBrowserWindow : function ()
{
if (!window.document.documentElement.getAttribute("chromehidden"))
return window;
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
#ifdef BROKEN_WM_Z_ORDER
var win = wm.getMostRecentWindow("navigator:browser", true);
// if we're lucky, this isn't a popup, and we can just return this
if (win && win.document.documentElement.getAttribute("chromehidden")) {
win = null;
var windowList = wm.getEnumerator("navigator:browser", true);
// this is oldest to newest, so this gets a bit ugly
while (windowList.hasMoreElements()) {
var nextWin = windowList.getNext();
if (!nextWin.document.documentElement.getAttribute("chromehidden"))
win = nextWin;
}
}
#else
var windowList = wm.getZOrderDOMWindowEnumerator("navigator:browser", true);
if (!windowList.hasMoreElements())
return null;
var win = windowList.getNext();
while (win.document.documentElement.getAttribute("chromehidden")) {
if (!windowList.hasMoreElements())
return null;
win = windowList.getNext();
}
#endif
return win;
},
isTabContentWindow : function(aWindow)
{
var browsers = gBrowser.browsers;

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

@ -247,7 +247,7 @@
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
onclick="BrowserHomeClick(event);"/>
onclick="BrowserGoHome(event);"/>
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
title="&locationItem.title;" class="chromeclass-location">

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

@ -138,10 +138,16 @@ var security = {
var win = wm.getMostRecentWindow("Browser:Cookies");
var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"].
getService(Components.interfaces.nsIEffectiveTLDService);
var eTLD = "";
if (this._getSecurityInfo().hostName)
eTLD = eTLDService.getBaseDomainFromHost(this._getSecurityInfo().hostName);
var eTLD;
var uri = gDocument.documentURIObject;
try {
eTLD = eTLDService.getBaseDomain(uri);
}
catch (e) {
// getBaseDomain will fail if the host is an IP address or is empty
eTLD = uri.asciiHost;
}
if (win) {
win.gCookiesWindow.setFilter(eTLD);
@ -233,10 +239,11 @@ function securityOnLoad() {
var yesStr = pageInfoBundle.getString("yes");
var noStr = pageInfoBundle.getString("no");
var uri = gDocument.documentURIObject;
setText("security-privacy-cookies-value",
hostHasCookies(info.hostName) ? yesStr : noStr);
hostHasCookies(uri) ? yesStr : noStr);
setText("security-privacy-passwords-value",
realmHasPasswords(info.fullLocation) ? yesStr : noStr);
realmHasPasswords(uri) ? yesStr : noStr);
var visitCount = previousVisitCount(info.hostName);
if(visitCount > 1) {
@ -313,30 +320,23 @@ function viewCertHelper(parent, cert)
}
/**
* Return true iff we have cookies for hostName
* Return true iff we have cookies for uri
*/
function hostHasCookies(hostName) {
if (!hostName)
return false;
function hostHasCookies(uri) {
var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager2);
return cookieManager.countCookiesFromHost(hostName) > 0;
return cookieManager.countCookiesFromHost(uri.asciiHost) > 0;
}
/**
* Return true iff realm (proto://host:port) (extracted from location) has
* Return true iff realm (proto://host:port) (extracted from uri) has
* saved passwords
*/
function realmHasPasswords(location) {
if (!location)
return false;
var realm = makeURI(location).prePath;
function realmHasPasswords(uri) {
var passwordManager = Components.classes["@mozilla.org/login-manager;1"]
.getService(Components.interfaces.nsILoginManager);
return passwordManager.countLogins(realm, "", "");
return passwordManager.countLogins(uri.prePath, "", "") > 0;
}
/**

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

@ -0,0 +1,33 @@
.tabbrowser-tabs {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
}
.tabbrowser-tab {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tab");
}
%ifdef XP_MACOSX
.tabbrowser-arrowscrollbox {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox");
}
%endif
.tabs-alltabs-popup {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-alltabs-popup");
}
.tab-close-button, .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;
}

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

@ -59,7 +59,7 @@
<binding id="tabbrowser">
<resources>
<stylesheet src="chrome://browser/skin/browser.css"/>
<stylesheet src="chrome://browser/content/tabbrowser.css"/>
</resources>
<content>
@ -344,8 +344,11 @@
// set to zero, if the document load ends without an
// onLocationChange, this counter gets decremented
// (so we keep it while switching tabs after failed loads)
// We need to add 2 because loadURIWithFlags may have
// cancelled a pending load which would have cleared
// its anchor scroll detection temporary increment.
if (aWebProgress.DOMWindow == this.mBrowser.contentWindow)
this.mBrowser.userTypedClear++;
this.mBrowser.userTypedClear += 2;
if (!this.mBlank) {
this.mTab.setAttribute("busy", "true");
@ -361,7 +364,9 @@
if (aWebProgress.DOMWindow == this.mBrowser.contentWindow) {
// The document is done loading, we no longer want the
// value cleared.
if (this.mBrowser.userTypedClear > 0)
if (this.mBrowser.userTypedClear > 1)
this.mBrowser.userTypedClear -= 2;
else if (this.mBrowser.userTypedClear > 0)
this.mBrowser.userTypedClear--;
if (!this.mBrowser.mIconURL)
@ -411,7 +416,7 @@
onLocationChange : function(aWebProgress, aRequest, aLocation)
{
// The document loaded correctly, clear the value if we should
if (this.mBrowser.userTypedClear > 0 && aRequest)
if (this.mBrowser.userTypedClear > 0)
this.mBrowser.userTypedValue = null;
if (aWebProgress.DOMWindow == this.mBrowser.contentWindow &&

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

@ -43,8 +43,6 @@
<binding id="urlbar" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
<implementation implements="nsIObserver, nsIDOMEventListener">
<constructor><![CDATA[
this._ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
this._prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.getBranch("browser.urlbar.")
@ -66,41 +64,12 @@
<destructor><![CDATA[
this._prefs.removeObserver("", this);
this._prefs = null;
this._ioService = null;
this.inputField.controllers.removeController(this._copyCutController);
this.inputField.removeEventListener("mousedown", this, false);
this.inputField.removeEventListener("mousemove", this, false);
this.inputField.removeEventListener("mouseout", this, false);
]]></destructor>
<property name="value"
onget="return this.inputField.value;">
<setter><![CDATA[
this.mIgnoreInput = true;
if (val != "") {
var uri;
try {
uri = this._ioService.newURI(val, null, null);
} catch(e) {}
if (uri) {
val = uri.spec;
try {
// try to decode as UTF-8
val = decodeURI(val);
} catch(e) {}
}
}
this.inputField.value = val;
this.mIgnoreInput = false;
var event = document.createEvent("Events");
event.initEvent("ValueChange", true, true);
this.inputField.dispatchEvent(event);
return val;
]]></setter>
</property>
<method name="_initURLTooltip">
<body><![CDATA[
if (this.focused || this.value == "")
@ -187,8 +156,10 @@
if (start == 0 && end == urlbar.textLength) {
// if the entire value is selected and it's a valid URI, encode it
val = urlbar.value;
var ioService = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
try {
val = urlbar._ioService.newURI(val, null, null).spec;
val = ioService.newURI(val, null, null).spec;
} catch(e) {}
if (aCommand == "cmd_cut")
urlbar.value = "";
@ -199,9 +170,9 @@
urlbar.selectionStart = urlbar.selectionEnd = start;
}
}
Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper)
.copyString(val);
Cc["@mozilla.org/widget/clipboardhelper;1"]
.getService(Ci.nsIClipboardHelper)
.copyString(val);
},
supportsCommand: function(aCommand) {
switch (aCommand) {

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

@ -422,7 +422,7 @@ function checkForUpdates()
// UI instead and let the user know they have to restart the browser for
// the changes to be applied.
if (um.activeUpdate && um.activeUpdate.state == "pending")
prompter.showUpdateDownloaded(um.activeUpdate, false);
prompter.showUpdateDownloaded(um.activeUpdate);
else
prompter.checkForUpdates();
}

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

@ -37,8 +37,9 @@ browser.jar:
* content/browser/safeMode.js (content/safeMode.js)
* content/browser/safeMode.xul (content/safeMode.xul)
* content/browser/sanitize.js (content/sanitize.js)
* content/browser/tabbrowser.xml (content/tabbrowser.xml)
* content/browser/sanitize.xul (content/sanitize.xul)
* content/browser/tabbrowser.css (content/tabbrowser.css)
* content/browser/tabbrowser.xml (content/tabbrowser.xml)
* content/browser/urlbarBindings.xml (content/urlbarBindings.xml)
* content/browser/utilityOverlay.js (content/utilityOverlay.js)
* content/browser/web-panels.js (content/web-panels.js)

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

@ -42,7 +42,7 @@ interface nsIRequest;
interface nsIFeedResult;
/**
* nsIFeedResultService provides a globally-accessible object for retreiving
* nsIFeedResultService provides a globally-accessible object for retrieving
* the results of feed processing.
*/
[scriptable, uuid(f3262589-48b2-4019-9947-90e5269bbfb9)]

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

@ -1767,6 +1767,8 @@ MicrosummaryResource.prototype = {
// Interfaces this component implements.
interfaces: [Ci.nsIAuthPromptProvider,
Ci.nsIAuthPrompt,
Ci.nsIBadCertListener2,
Ci.nsISSLErrorListener,
Ci.nsIPrompt,
Ci.nsIProgressEventSink,
Ci.nsIInterfaceRequestor,
@ -1797,6 +1799,19 @@ MicrosummaryResource.prototype = {
return this.QueryInterface(iid);
},
// nsIBadCertListener2
// Suppress any certificate errors
notifyCertProblem: function MSR_certProblem(socketInfo, status, targetSite) {
return true;
},
// nsISSLErrorListener
// Suppress any ssl errors
notifySSLError: function MSR_SSLError(socketInfo, error, targetSite) {
return true;
},
// Suppress UI and abort loads for files secured by authentication.
// Auth requests appear to succeed when we cancel them (since the server

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

@ -266,7 +266,8 @@ ImportBookmarksHTML(nsIFile* aBookmarksFile,
NS_ENSURE_SUCCESS(rv, rv);
PRInt64 folder;
rv = bms->CreateFolder(root, importedBookmarksTitle, -1, &folder);
rv = bms->CreateFolder(root, NS_ConvertUTF16toUTF8(importedBookmarksTitle),
-1, &folder);
NS_ENSURE_SUCCESS(rv, rv);
// Import the bookmarks into the folder.

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

@ -1280,7 +1280,8 @@ nsIEProfileMigrator::CopyFavorites(PRBool aReplace) {
bundle->FormatStringFromName(NS_LITERAL_STRING("importedBookmarksFolder").get(),
sourceNameStrings, 1, getter_Copies(importedIEFavsTitle));
bms->CreateFolder(root, importedIEFavsTitle, -1, &folder);
bms->CreateFolder(root, NS_ConvertUTF16toUTF8(importedIEFavsTitle), -1,
&folder);
}
else {
// Initialize the default bookmarks
@ -1371,7 +1372,8 @@ nsIEProfileMigrator::CopySmartKeywords(PRInt64 aParentFolder)
nsString importedIESearchUrlsTitle;
bundle->FormatStringFromName(NS_LITERAL_STRING("importedSearchURLsFolder").get(),
sourceNameStrings, 1, getter_Copies(importedIESearchUrlsTitle));
bms->CreateFolder(aParentFolder, importedIESearchUrlsTitle, -1, &keywordsFolder);
bms->CreateFolder(aParentFolder, NS_ConvertUTF16toUTF8(importedIESearchUrlsTitle),
-1, &keywordsFolder);
}
nsCOMPtr<nsIWindowsRegKey> childKey;
@ -1389,7 +1391,8 @@ nsIEProfileMigrator::CopySmartKeywords(PRInt64 aParentFolder)
}
PRInt64 id;
bms->InsertBookmark(keywordsFolder, uri,
nsINavBookmarksService::DEFAULT_INDEX, keyName,
nsINavBookmarksService::DEFAULT_INDEX,
NS_ConvertUTF16toUTF8(keyName),
&id);
}
childKey->Close();
@ -1501,7 +1504,7 @@ nsIEProfileMigrator::ParseFavoritesFolder(nsIFile* aDirectory,
PRInt64 id;
rv = aBookmarksService->InsertBookmark(aParentFolder, bookmarkURI,
nsINavBookmarksService::DEFAULT_INDEX,
bookmarkName, &id);
NS_ConvertUTF16toUTF8(bookmarkName), &id);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv)) continue;
}
@ -1512,7 +1515,7 @@ nsIEProfileMigrator::ParseFavoritesFolder(nsIFile* aDirectory,
}
else {
rv = aBookmarksService->CreateFolder(aParentFolder,
bookmarkName,
NS_ConvertUTF16toUTF8(bookmarkName),
nsINavBookmarksService::DEFAULT_INDEX,
&folder);
if (NS_FAILED(rv)) continue;
@ -1544,7 +1547,7 @@ nsIEProfileMigrator::ParseFavoritesFolder(nsIFile* aDirectory,
PRInt64 id;
rv = aBookmarksService->InsertBookmark(aParentFolder, resolvedURI,
nsINavBookmarksService::DEFAULT_INDEX,
name, &id);
NS_ConvertUTF16toUTF8(name), &id);
if (NS_FAILED(rv)) continue;
}
}

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

@ -1075,7 +1075,7 @@ nsOperaProfileMigrator::CopyBookmarks(PRBool aReplace)
sourceNameStrings, 1,
getter_Copies(importedOperaHotlistTitle));
bms->CreateFolder(parentFolder, importedOperaHotlistTitle,
bms->CreateFolder(parentFolder, NS_ConvertUTF16toUTF8(importedOperaHotlistTitle),
nsINavBookmarksService::DEFAULT_INDEX, &parentFolder);
}
else {
@ -1140,7 +1140,7 @@ nsOperaProfileMigrator::CopySmartKeywords(nsINavBookmarksService* aBMS,
getter_Copies(importedSearchUrlsTitle));
PRInt64 keywordsFolder;
rv = aBMS->CreateFolder(aParentFolder, importedSearchUrlsTitle,
rv = aBMS->CreateFolder(aParentFolder, NS_ConvertUTF16toUTF8(importedSearchUrlsTitle),
nsINavBookmarksService::DEFAULT_INDEX, &keywordsFolder);
NS_ENSURE_SUCCESS(rv, rv);
@ -1170,22 +1170,21 @@ nsOperaProfileMigrator::CopySmartKeywords(nsINavBookmarksService* aBMS,
if (url.IsEmpty() || keyword.IsEmpty() || name.IsEmpty())
continue;
NS_ConvertUTF8toUTF16 nameStr(name);
PRUint32 length = nameStr.Length();
PRUint32 length = name.Length();
PRInt32 index = 0;
do {
index = nameStr.FindChar('&', index);
index = name.FindChar('&', index);
if (index >= length - 2)
break;
// Assume "&&" is an escaped ampersand in the search query title.
if (nameStr.CharAt(index + 1) == '&') {
nameStr.Cut(index, 1);
if (name.CharAt(index + 1) == '&') {
name.Cut(index, 1);
index += 2;
continue;
}
nameStr.Cut(index, 1);
name.Cut(index, 1);
}
while (index < length);
@ -1206,7 +1205,7 @@ nsOperaProfileMigrator::CopySmartKeywords(nsINavBookmarksService* aBMS,
PRInt64 newId;
rv = aBMS->InsertBookmark(keywordsFolder, uri,
nsINavBookmarksService::DEFAULT_INDEX,
nameStr, &newId);
name, &newId);
NS_ENSURE_SUCCESS(rv, rv);
// TODO -- set bookmark keyword to keyword and description to keywordDesc.
}
@ -1277,8 +1276,8 @@ nsOperaProfileMigrator::ParseBookmarksFolder(nsILineInputStream* aStream,
PRBool moreData = PR_FALSE;
nsAutoString buffer;
EntryType entryType = EntryType_BOOKMARK;
nsAutoString name, keyword, description;
nsCAutoString url;
nsAutoString keyword, description;
nsCAutoString url, name;
PRBool onToolbar = PR_FALSE;
do {
nsCAutoString cBuffer;
@ -1302,7 +1301,7 @@ nsOperaProfileMigrator::ParseBookmarksFolder(nsILineInputStream* aStream,
// folder, or CopyBookmarks (which means we're done parsing all bookmarks).
goto done;
case LineType_NAME:
name = data;
name.Assign(NS_ConvertUTF16toUTF8(data));
break;
case LineType_URL:
url.Assign(NS_ConvertUTF16toUTF8(data));

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

@ -926,8 +926,8 @@ nsSafariProfileMigrator::CopyBookmarks(PRBool aReplace)
sourceNameStrings, 1,
getter_Copies(importedSafariBookmarksTitle));
bms->CreateFolder(root, importedSafariBookmarksTitle, nsINavBookmarksService::DEFAULT_INDEX,
&folder);
bms->CreateFolder(root, NS_ConvertUTF16toUTF8(importedSafariBookmarksTitle),
nsINavBookmarksService::DEFAULT_INDEX, &folder);
}
else {
nsCOMPtr<nsIFile> profile;
@ -1006,8 +1006,8 @@ nsSafariProfileMigrator::ParseBookmarksFolder(CFArrayRef aChildren,
if (::CFDictionaryContainsKey(entry, CFSTR("Children")) &&
type.EqualsLiteral("WebBookmarkTypeList")) {
nsAutoString title;
if (!GetDictionaryStringValue(entry, CFSTR("Title"), title))
nsCAutoString title;
if (!GetDictionaryCStringValue(entry, CFSTR("Title"), title, kCFStringEncodingUTF8))
continue;
CFArrayRef children = (CFArrayRef)::CFDictionaryGetValue(entry,
@ -1048,9 +1048,9 @@ nsSafariProfileMigrator::ParseBookmarksFolder(CFArrayRef aChildren,
// Encountered a Bookmark, so add it to the current folder...
CFDictionaryRef URIDictionary = (CFDictionaryRef)
::CFDictionaryGetValue(entry, CFSTR("URIDictionary"));
nsAutoString title, url;
if (GetDictionaryStringValue(URIDictionary, CFSTR("title"), title) &&
GetDictionaryStringValue(entry, CFSTR("URLString"), url)) {
nsCAutoString title, url;
if (GetDictionaryCStringValue(URIDictionary, CFSTR("title"), title, kCFStringEncodingUTF8) &&
GetDictionaryCStringValue(entry, CFSTR("URLString"), url, kCFStringEncodingUTF8)) {
nsCOMPtr<nsIURI> uri;
PRInt64 id;
rv |= NS_NewURI(getter_AddRefs(uri), url);

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

@ -938,7 +938,6 @@ PlacesController.prototype = {
*/
remove: function PC_remove(aTxnName) {
NS_ASSERT(aTxnName !== undefined, "Must supply Transaction Name");
this._view.saveSelection(this._view.SAVE_SELECTION_REMOVE);
var root = this._view.getResult().root;
@ -955,8 +954,6 @@ PlacesController.prototype = {
}
else
NS_ASSERT(false, "unexpected root");
this._view.restoreSelection();
},
/**

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

@ -348,6 +348,7 @@ var gEditItemOverlay = {
var menuItem = this._createMicrosummaryMenuItem(microsummary);
if (PlacesUtils.microsummaries
.isMicrosummary(this._itemId, microsummary))
itemToSelect = menuItem;
menupopup.appendChild(menuItem);
}

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

@ -60,6 +60,7 @@
<rows>
<row align="center" id="editBMPanel_nameRow">
<label value="&editBookmarkOverlay.name.label;"
accesskey="&editBookmarkOverlay.name.accesskey;"
control="editBMPanel_namePicker"
observes="paneElementsBroadcaster"/>
<menulist id="editBMPanel_namePicker"
@ -82,6 +83,7 @@
<row align="center" id="editBMPanel_locationRow">
<label value="&editBookmarkOverlay.location.label;"
accesskey="&editBookmarkOverlay.location.accesskey;"
control="editBMPanel_locationField"
observes="paneElementsBroadcaster"/>
<textbox id="editBMPanel_locationField"
@ -91,6 +93,7 @@
<row align="center" id="editBMPanel_feedLocationRow">
<label value="&editBookmarkOverlay.feedLocation.label;"
accesskey="&editBookmarkOverlay.feedLocation.accesskey;"
control="editBMPanel_feedLocationField"
observes="paneElementsBroadcaster"/>
<textbox id="editBMPanel_feedLocationField"
@ -100,6 +103,7 @@
<row align="center" id="editBMPanel_siteLocationRow">
<label value="&editBookmarkOverlay.siteLocation.label;"
accesskey="&editBookmarkOverlay.siteLocation.accesskey;"
control="editBMPanel_siteLocationField"
observes="paneElementsBroadcaster"/>
<textbox id="editBMPanel_siteLocationField"
@ -151,6 +155,7 @@
<row align="center" id="editBMPanel_tagsRow">
<label value="&editBookmarkOverlay.tags.label;"
accesskey="&editBookmarkOverlay.tags.accesskey;"
control="editBMPanel_tagsField"
observes="paneElementsBroadcaster"/>
<textbox id="editBMPanel_tagsField"
@ -171,6 +176,7 @@
<row id="editBMPanel_keywordRow">
<label value="&editBookmarkOverlay.keyword.label;"
accesskey="&editBookmarkOverlay.keyword.accesskey;"
control="editBMPanel_keywordField"
observes="paneElementsBroadcaster"/>
<textbox id="editBMPanel_keywordField"
@ -180,6 +186,7 @@
<row id="editBMPanel_descriptionRow">
<label value="&editBookmarkOverlay.description.label;"
accesskey="&editBookmarkOverlay.description.accesskey;"
control="editBMPanel_descriptionField"
observes="paneElementsBroadcaster"/>
<textbox id="editBMPanel_descriptionField"
@ -189,6 +196,7 @@
</row>
<checkbox id="editBMPanel_loadInSidebarCheckbox"
label="&editBookmarkOverlay.loadInSidebar.label;"
accesskey="&editBookmarkOverlay.loadInSidebar.accesskey;"
oncommand="gEditItemOverlay.onLoadInSidebarCheckboxCommand();"
observes="paneElementsBroadcaster"/>
</rows>

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

@ -292,7 +292,7 @@
function PMV_itemMoved(aItem, aOldParent, aOldIndex, aNewParent,
aNewIndex) {
// This cannot actually happen yet (see IDL)
if (aNewParent != aOldParent);
if (aNewParent != aOldParent)
return;
var popup = this._getPopupForContainer(aNewParent);

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

@ -614,10 +614,12 @@ var PlacesOrganizer = {
if (infoScrollbox.getAttribute("minimal") == "true") {
infoScrollbox.removeAttribute("minimal");
scrollboxExpander.label = scrollboxExpander.getAttribute("lesslabel");
scrollboxExpander.accessKey = scrollboxExpander.getAttribute("lessaccesskey");
}
else {
infoScrollbox.setAttribute("minimal", "true");
scrollboxExpander.label = scrollboxExpander.getAttribute("morelabel");
scrollboxExpander.accessKey = scrollboxExpander.getAttribute("moreaccesskey");
}
},

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

@ -452,8 +452,11 @@
<hbox>
<button type="image" id="infoScrollboxExpander"
lesslabel="&detailsPane.less.label;"
lessaccesskey="&detailsPane.less.accesskey;"
morelabel="&detailsPane.more.label;"
moreaccesskey="&detailsPane.more.accesskey;"
label="&detailsPane.more.label;"
accesskey="&detailsPane.more.accesskey;"
oncommand="PlacesOrganizer.toggleAdditionalInfoFields();"
observes="paneElementsBroadcaster"/>
<spacer flex="1"/>

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

@ -500,7 +500,7 @@
function TV_V_itemMoved(aItem, aOldParent, aOldIndex, aNewParent,
aNewIndex) {
// This cannot actually happen yet (see IDL)
if (aNewParent != aOldParent);
if (aNewParent != aOldParent)
return;
if (aNewParent == this._self.getResultNode()) {

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

@ -436,7 +436,7 @@
return null;
var min = { }, max = { };
selection.getRangeAt(0, min, max);
return this.getResultView().nodeForTreeIndex(min.value);
]]></getter>
</property>
@ -829,7 +829,6 @@
<field name="_nextSelection">[]</field>
<field name="SAVE_SELECTION_RELOAD">0</field>
<field name="SAVE_SELECTION_INSERT">1</field>
<field name="SAVE_SELECTION_REMOVE">2</field>
<method name="saveSelection">
<parameter name="mode"/>
<body><![CDATA[
@ -838,18 +837,6 @@
var s = this.view.selection;
var rc = s.getRangeCount();
switch (mode) {
case this.SAVE_SELECTION_REMOVE:
var min = { }, max = { };
s.getRangeAt(rc - 1, min, max);
var rowCount = this.view.rowCount;
var index = -1;
if (max.value == (rowCount - 1) ||
this.view.getLevel(max.value + 1) != this.view.getLevel(max.value))
index = max.value - s.count;
else
index = max.value - s.count + 1;
this._nextSelection = [{ min: index, max: index }];
break;
case this.SAVE_SELECTION_INSERT:
var min = { }, max = { };
s.getRangeAt(rc - 1, min, max);

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

@ -306,7 +306,7 @@ PlacesTreeView.prototype = {
replaceCount-=1;
// Persist selection state
var nodesToSelect = [];
var previouslySelectedNodes = [];
var selection = this.selection;
var rc = selection.getRangeCount();
for (var rangeIndex = 0; rangeIndex < rc; rangeIndex++) {
@ -317,7 +317,8 @@ PlacesTreeView.prototype = {
continue;
for (var nodeIndex = min.value; nodeIndex <= lastIndex; nodeIndex++)
nodesToSelect.push(this._visibleElements[nodeIndex]);
previouslySelectedNodes.push({ node: this._visibleElements[nodeIndex],
oldIndex: nodeIndex });
}
// Mark the removes as invisible
@ -345,7 +346,7 @@ PlacesTreeView.prototype = {
}
// now update the number of elements
if (nodesToSelect.length > 0)
if (previouslySelectedNodes.length > 0)
selection.selectEventsSuppressed = true;
this._tree.beginUpdateBatch();
@ -373,14 +374,14 @@ PlacesTreeView.prototype = {
this._tree.endUpdateBatch();
// restore selection
if (nodesToSelect.length > 0) {
for each (var node in nodesToSelect) {
var index = node.viewIndex;
if (previouslySelectedNodes.length > 0) {
for each (var nodeInfo in previouslySelectedNodes) {
var index = nodeInfo.node.viewIndex;
// if the same node was used (happens on sorting-changes),
// just use viewIndex
if (index == -1) { // otherwise, try to find an equal node
var itemId = node.itemId;
var itemId = nodeInfo.node.itemId;
if (itemId != 1) { // bookmark-nodes in queries case
for (i=0; i < newElements.length && index == -1; i++) {
if (newElements[i].itemId == itemId)
@ -388,7 +389,7 @@ PlacesTreeView.prototype = {
}
}
else { // history nodes
var uri = node.uri;
var uri = nodeInfo.node.uri;
if (uri) {
for (i=0; i < newElements.length && index == -1; i++) {
if (newElements[i].uri == uri)
@ -400,6 +401,16 @@ PlacesTreeView.prototype = {
if (index != -1)
selection.rangedSelect(index, index, true);
}
// if only one node was previously selected and there's no selection now,
// select the node at its old-viewIndex, if any
if (previouslySelectedNodes.length == 1 &&
selection.getRangeCount() == 0 &&
this._visibleElements.length > previouslySelectedNodes[0].oldIndex) {
selection.rangedSelect(previouslySelectedNodes[0].oldIndex,
previouslySelectedNodes[0].oldIndex, true);
}
selection.selectEventsSuppressed = false;
}
},
@ -667,6 +678,17 @@ PlacesTreeView.prototype = {
if (oldViewIndex < 0)
return; // item was already invisible, nothing to do
// if the item was exclusively selected, the node next to it will be
// selected
var selectNext = false;
var selection = this.selection;
if (selection.getRangeCount() == 1) {
var min = { }, max = { };
selection.getRangeAt(0, min, max);
if (min.value == max.value)
selectNext = true;
}
// this may have been a container, in which case it has a lot of rows
var count = this._countVisibleRowsForItem(aItem);
@ -710,6 +732,10 @@ PlacesTreeView.prototype = {
// redraw parent because twisty may have changed
if (!aParent.hasChildren)
this.itemChanged(aParent);
// restore selection
if (selectNext && this._visibleElements.length > oldViewIndex)
selection.rangedSelect(oldViewIndex, oldViewIndex, true);
},
/**

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

@ -1604,25 +1604,35 @@ var PlacesUtils = {
}
}
else {
let result, oldViewer;
let result, oldViewer, wasOpen;
try {
let wasOpen = aNode.containerOpen;
result = aNode.parentResult;
oldViewer = result.viewer;
if (!wasOpen) {
result = aNode.parentResult;
oldViewer = result.viewer;
result.viewer = null;
aNode.containerOpen = true;
}
for (let i = 0; i < aNode.childCount; ++i) {
// Include visible url nodes only
let child = aNode.getChild(i);
if (this.nodeIsURI(child))
urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)});
if (this.nodeIsURI(child)) {
// If the node contents is visible, add the uri only if its node is
// visible. Otherwise follow viewer's collapseDuplicates property,
// default to true
if ((wasOpen && oldViewer && child.viewIndex != -1) ||
(oldViewer && !oldViewer.collapseDuplicates) ||
urls.indexOf(child.uri) == -1) {
urls.push({ uri: child.uri,
isBookmark: this.nodeIsBookmark(child) });
}
}
}
if (!wasOpen)
aNode.containerOpen = false;
}
finally {
if (oldViewer)
if (!wasOpen)
result.viewer = oldViewer;
}
}

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

@ -918,7 +918,7 @@ BookmarkContentSink::HandleLinkBegin(const nsIParserNode& node)
rv = mBookmarksService->InsertBookmark(frame.mContainerID,
frame.mPreviousLink,
mBookmarksService->DEFAULT_INDEX,
EmptyString(),
EmptyCString(),
&frame.mPreviousId);
NS_ASSERTION(NS_SUCCEEDED(rv), "InsertBookmark failed");
@ -1026,7 +1026,7 @@ BookmarkContentSink::HandleLinkEnd()
NS_ASSERTION(NS_SUCCEEDED(rv), "SetSiteURI failed!");
rv = mLivemarkService->SetFeedURI(frame.mPreviousId, frame.mPreviousFeed);
NS_ASSERTION(NS_SUCCEEDED(rv), "SetFeedURI failed!");
rv = mBookmarksService->SetItemTitle(frame.mPreviousId, frame.mPreviousText);
rv = mBookmarksService->SetItemTitle(frame.mPreviousId, NS_ConvertUTF16toUTF8(frame.mPreviousText));
NS_ASSERTION(NS_SUCCEEDED(rv), "SetItemTitle failed!");
}
}
@ -1069,11 +1069,11 @@ BookmarkContentSink::HandleLinkEnd()
nsIAnnotationService::EXPIRE_NEVER);
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not store user's bookmark title!");
mBookmarksService->SetItemTitle(frame.mPreviousId, frame.mPreviousMicrosummaryText);
mBookmarksService->SetItemTitle(frame.mPreviousId, NS_ConvertUTF16toUTF8(frame.mPreviousMicrosummaryText));
mMicrosummaryService->SetMicrosummary(frame.mPreviousId, frame.mPreviousMicrosummary);
}
else
mBookmarksService->SetItemTitle(frame.mPreviousId, frame.mPreviousText);
mBookmarksService->SetItemTitle(frame.mPreviousId, NS_ConvertUTF16toUTF8(frame.mPreviousText));
}
// Set last-modified-date for bookmarks and livemarks here so that the
@ -1119,7 +1119,7 @@ BookmarkContentSink::HandleSeparator(const nsIParserNode& aNode)
name.Trim(kWhitespace);
if (!name.IsEmpty())
mBookmarksService->SetItemTitle(frame.mPreviousId, name);
mBookmarksService->SetItemTitle(frame.mPreviousId, NS_ConvertUTF16toUTF8(name));
// Note: we do not need to import ADD_DATE or LAST_MODIFIED for separators
// because pre-Places bookmarks does not support them.
@ -1150,7 +1150,7 @@ BookmarkContentSink::NewFrame()
case BookmarkImportFrame::Container_Normal:
// append a new folder
rv = mBookmarksService->CreateFolder(CurFrame().mContainerID,
containerName,
NS_ConvertUTF16toUTF8(containerName),
mBookmarksService->DEFAULT_INDEX,
&ourID);
NS_ENSURE_SUCCESS(rv, rv);
@ -1202,7 +1202,7 @@ BookmarkContentSink::NewFrame()
if (updateFolder) {
// move the menu folder to the current position
mBookmarksService->MoveItem(ourID, CurFrame().mContainerID, -1);
mBookmarksService->SetItemTitle(ourID, containerName);
mBookmarksService->SetItemTitle(ourID, NS_ConvertUTF16toUTF8(containerName));
#ifdef DEBUG_IMPORT
printf(" [reparenting]");
#endif
@ -2065,13 +2065,13 @@ nsPlacesImportExportService::WriteSeparator(nsINavHistoryResultNode* aItem,
// Note: we can't write the separator ID or anything else other than NAME
// because it makes Firefox 2.x crash/hang - see bug #381129
nsAutoString title;
nsCAutoString title;
rv = mBookmarksService->GetItemTitle(itemId, title);
if (NS_SUCCEEDED(rv) && !title.IsEmpty()) {
rv = aOutput->Write(kNameAttribute, strlen(kNameAttribute), &dummy);
NS_ENSURE_SUCCESS(rv, rv);
char* escapedTitle = nsEscapeHTML(NS_ConvertUTF16toUTF8(title).get());
char* escapedTitle = nsEscapeHTML(title.get());
if (escapedTitle) {
PRUint32 dummy;
rv = aOutput->Write(escapedTitle, strlen(escapedTitle), &dummy);

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

@ -806,7 +806,13 @@ placesSortFolderByNameTransactions.prototype = {
var newOrder = [];
var preSep = []; // temporary array for sorting each group of items
var sortingMethod =
function (a, b) { return a.title.localeCompare(b.title); };
function (a, b) {
if (PlacesUtils.nodeIsContainer(a) && !PlacesUtils.nodeIsContainer(b))
return -1;
if (!PlacesUtils.nodeIsContainer(a) && PlacesUtils.nodeIsContainer(b))
return 1;
return a.title.localeCompare(b.title);
};
for (var i = 0; i < count; ++i) {
var item = contents.getChild(i);

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

@ -43,6 +43,10 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef MOZ_MOCHITEST
DIRS += tests
endif
include $(topsrcdir)/config/rules.mk
DEFINES += \

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

@ -1248,6 +1248,7 @@ var gApplicationsPane = {
else
label = this._prefsBundle.getString("alwaysAsk");
askMenuItem.setAttribute("label", label);
askMenuItem.setAttribute("tooltiptext", label);
askMenuItem.setAttribute("image", ICON_URL_ASK);
menuPopup.appendChild(askMenuItem);
}
@ -1259,6 +1260,7 @@ var gApplicationsPane = {
let label = this._prefsBundle.getFormattedString("liveBookmarksInApp",
[this._brandShortName]);
internalMenuItem.setAttribute("label", label);
internalMenuItem.setAttribute("tooltiptext", label);
internalMenuItem.setAttribute("image", ICON_URL_LIVEMARK);
menuPopup.appendChild(internalMenuItem);
@ -1273,6 +1275,7 @@ var gApplicationsPane = {
var defaultMenuItem = document.createElementNS(kXULNS, "menuitem");
defaultMenuItem.setAttribute("action", Ci.nsIHandlerInfo.useSystemDefault);
defaultMenuItem.setAttribute("label", handlerInfo.defaultDescription);
defaultMenuItem.setAttribute("tooltiptext", handlerInfo.defaultDescription);
defaultMenuItem.setAttribute("image", this._getIconURLForSystemDefault(handlerInfo));
menuPopup.appendChild(defaultMenuItem);
@ -1289,10 +1292,13 @@ var gApplicationsPane = {
let menuItem = document.createElementNS(kXULNS, "menuitem");
menuItem.setAttribute("action", Ci.nsIHandlerInfo.useHelperApp);
let label;
if (possibleApp instanceof Ci.nsILocalHandlerApp)
menuItem.setAttribute("label", getDisplayNameForFile(possibleApp.executable));
label = getDisplayNameForFile(possibleApp.executable);
else
menuItem.setAttribute("label", possibleApp.name);
label = possibleApp.name;
menuItem.setAttribute("label", label);
menuItem.setAttribute("tooltiptext", label);
menuItem.setAttribute("image", this._getIconURLForHandlerApp(possibleApp));
// Attach the handler app object to the menu item so we can use it
@ -1311,15 +1317,25 @@ var gApplicationsPane = {
[handlerInfo.plugin.name,
this._brandShortName]);
pluginMenuItem.setAttribute("label", label);
pluginMenuItem.setAttribute("tooltiptext", label);
pluginMenuItem.setAttribute("image", ICON_URL_PLUGIN);
menuPopup.appendChild(pluginMenuItem);
}
// Create a menu item for selecting a local application.
#ifdef XP_WIN
// On Windows, selecting an application to open another application
// would be meaningless so we special case executables.
var executableType = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService)
.getTypeFromExtension("exe");
if (handlerInfo.type != executableType)
#endif
{
let menuItem = document.createElementNS(kXULNS, "menuitem");
menuItem.setAttribute("oncommand", "gApplicationsPane.chooseApp(event)");
menuItem.setAttribute("label", this._prefsBundle.getString("chooseApp"));
let label = this._prefsBundle.getString("chooseApp");
menuItem.setAttribute("label", label);
menuItem.setAttribute("tooltiptext", label);
menuPopup.appendChild(menuItem);
}
@ -1331,7 +1347,9 @@ var gApplicationsPane = {
handlerInfo.type != TYPE_MAYBE_FEED) {
var saveMenuItem = document.createElementNS(kXULNS, "menuitem");
saveMenuItem.setAttribute("action", Ci.nsIHandlerInfo.saveToDisk);
saveMenuItem.setAttribute("label", this._prefsBundle.getString("saveFile"));
let label = this._prefsBundle.getString("saveFile");
saveMenuItem.setAttribute("label", label);
saveMenuItem.setAttribute("tooltiptext", label);
saveMenuItem.setAttribute("image", ICON_URL_SAVE);
menuPopup.appendChild(saveMenuItem);
}

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

@ -61,12 +61,12 @@
<binding id="handler" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
<xul:hbox flex="1" align="center" xbl:inherits="tooltiptext=typeDescription">
<xul:image src="moz-icon://goat?size=16" class="typeIcon"
xbl:inherits="src=typeIcon" height="16" width="16"/>
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
</xul:hbox>
<xul:hbox flex="1" align="center">
<xul:hbox flex="1" align="center" xbl:inherits="tooltiptext=actionDescription">
<xul:image xbl:inherits="src=actionIcon" height="16" width="16" class="actionIcon"/>
<xul:label flex="1" crop="end" xbl:inherits="value=actionDescription"/>
</xul:hbox>
@ -77,13 +77,14 @@
<binding id="handler-selected" extends="chrome://browser/content/preferences/handlers.xml#handler-base">
<content>
<xul:hbox flex="1" equalsize="always">
<xul:hbox flex="1" align="center">
<xul:hbox flex="1" align="center" xbl:inherits="tooltiptext=typeDescription">
<xul:image src="moz-icon://goat?size=16" class="typeIcon"
xbl:inherits="src=typeIcon" height="16" width="16"/>
<xul:label flex="1" crop="end" xbl:inherits="value=typeDescription"/>
</xul:hbox>
<xul:hbox flex="1">
<xul:menulist class="actionsMenu" flex="1" crop="end" selectedIndex="1"
xbl:inherits="tooltiptext=actionDescription"
oncommand="gApplicationsPane.onSelectAction(event.originalTarget)">
<xul:menupopup/>
</xul:menulist>

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

@ -183,7 +183,7 @@
preference="privacy.sanitize.promptOnSanitize"
label="&askBeforeClear.label;"
accesskey="&askBeforeClear.accesskey;"/>
<button id="clearDataNow"
<button id="clearDataNow" icon="clear"
label1="&clearDataNow.label;"
label2="&clearDataNow.label2;"
accesskey="&clearDataNow.accesskey;"

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

@ -0,0 +1,50 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2007
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ryan Flint <rflint@dslr.net> (Original Author)
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = browser/components/preferences/tests
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
_BROWSER_FILES = browser_bug410900.js \
$(NULL)
libs:: $(_BROWSER_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)

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

@ -0,0 +1,43 @@
function test() {
waitForExplicitFinish();
// setup a phony hander to ensure the app pane will be populated.
var handler = Cc["@mozilla.org/uriloader/web-handler-app;1"].
createInstance(Ci.nsIWebHandlerApp);
handler.name = "App pane alive test";
handler.uriTemplate = "http://test.mozilla.org/%s";
var extps = Cc["@mozilla.org/uriloader/external-protocol-service;1"].
getService(Ci.nsIExternalProtocolService);
var info = extps.getProtocolHandlerInfo("apppanetest");
info.possibleApplicationHandlers.appendElement(handler, false);
var hserv = Cc["@mozilla.org/uriloader/handler-service;1"].
getService(Ci.nsIHandlerService);
hserv.store(info);
openDialog("chrome://browser/content/preferences/preferences.xul", "Preferences",
"chrome,titlebar,toolbar,centerscreen,dialog=no", "paneApplications");
setTimeout(runTest, 1000);
}
function runTest() {
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator);
var win = wm.getMostRecentWindow("Browser:Preferences");
ok(win, "Pref window opened");
if (win) {
var sel = win.document.documentElement.getAttribute("lastSelected");
ok(sel == "paneApplications", "Specified pane was opened");
var rbox = win.document.getElementById("handlersView");
ok(rbox, "handlersView is present");
var items = rbox && rbox.getElementsByTagName("richlistitem");
ok(items && items.length > 0, "App handler list populated");
win.close();
}
finish();
}

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

@ -75,8 +75,26 @@ function PROT_MalwareWarden() {
var dbService_ = Cc["@mozilla.org/url-classifier/dbservice;1"]
.getService(Ci.nsIUrlClassifierDBService);
dbService_.update(testUpdate);
dbService_.finish(function(result) {}, function(error) {});
var listener = {
QueryInterface: function(iid)
{
if (iid.equals(Ci.nsISupports) ||
iid.equals(Ci.nsIUrlClassifierUpdateObserver))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
},
updateUrlRequested: function(url) { },
streamCompleted: function() { },
updateError: function(errorCode) { },
updateSuccess: function(requestedTimeout) { }
};
dbService_.beginUpdate(listener);
dbService_.beginStream();
dbService_.updateStream(testUpdate);
dbService_.finishStream();
dbService_.finishUpdate();
G_Debug(this, "malwareWarden initialized");
}

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

@ -293,6 +293,8 @@ loadListener.prototype = {
aIID.equals(Ci.nsIStreamListener) ||
aIID.equals(Ci.nsIChannelEventSink) ||
aIID.equals(Ci.nsIInterfaceRequestor) ||
aIID.equals(Ci.nsIBadCertListener2) ||
aIID.equals(Ci.nsISSLErrorListener) ||
// See FIXME comment below
aIID.equals(Ci.nsIHttpEventSink) ||
aIID.equals(Ci.nsIProgressEventSink) ||
@ -348,6 +350,16 @@ loadListener.prototype = {
return this.QueryInterface(aIID);
},
// nsIBadCertListener2
notifyCertProblem: function SRCH_certProblem(socketInfo, status, targetSite) {
return true;
},
// nsISSLErrorListener
notifySSLError: function SRCH_SSLError(socketInfo, error, targetSite) {
return true;
},
// FIXME: bug 253127
// nsIHttpEventSink
onRedirect: function (aChannel, aNewChannel) {},

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

@ -647,6 +647,7 @@ SuggestAutoComplete.prototype = {
this._suggestURI = submission.uri;
var method = (submission.postData ? "POST" : "GET");
this._request.open(method, this._suggestURI.spec, true);
this._request.channel.notificationCallbacks = new SearchSuggestLoadListener();
var self = this;
function onReadyStateChange() {
@ -711,6 +712,30 @@ SuggestAutoComplete.prototype = {
Ci.nsIAutoCompleteObserver])
};
function SearchSuggestLoadListener() {
}
SearchSuggestLoadListener.prototype = {
// nsIBadCertListener2
notifyCertProblem: function SSLL_certProblem(socketInfo, status, targetSite) {
return true;
},
// nsISSLErrorListener
notifySSLError: function SSLL_SSLError(socketInfo, error, targetSite) {
return true;
},
// nsIInterfaceRequestor
getInterface: function SSLL_getInterface(iid) {
return this.QueryInterface(iid);
},
// nsISupports
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBadCertListener2,
Ci.nsISSLErrorListener,
Ci.nsIInterfaceRequestor])
};
/**
* SearchSuggestAutoComplete is a service implementation that handles suggest
* results specific to web searches.

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

@ -19,7 +19,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dietrich Ayala <autonome@gmail.com>
* Dietrich Ayala <dietrich@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -57,6 +57,7 @@ const Cu = Components.utils;
const STATE_STOPPED = 0;
const STATE_RUNNING = 1;
const STATE_QUITTING = -1;
const STATE_DISABLED = -2;
const STATE_STOPPED_STR = "stopped";
const STATE_RUNNING_STR = "running";
@ -65,6 +66,8 @@ const PRIVACY_NONE = 0;
const PRIVACY_ENCRYPTED = 1;
const PRIVACY_FULL = 2;
const NOTIFY_WINDOWS_RESTORED = "sessionstore-windows-restored";
// global notifications observed
const OBSERVING = [
"domwindowopened", "domwindowclosed",
@ -132,6 +135,9 @@ SessionStoreService.prototype = {
// when crash recovery is disabled, session data is not written to disk
_resume_from_crash: true,
// During the initial restore tracks the number of windows yet to be restored
_restoreCount: 0,
// time in milliseconds (Date.now()) when the session was last written to file
_lastSaveTime: 0,
@ -153,6 +159,9 @@ SessionStoreService.prototype = {
* Initialize the component
*/
init: function sss_init(aWindow) {
if (this._loadState == STATE_DISABLED)
return;
if (!aWindow || this._loadState == STATE_RUNNING) {
// make sure that all browser windows which try to initialize
// SessionStore are really tracked by it
@ -165,13 +174,18 @@ SessionStoreService.prototype = {
getService(Ci.nsIPrefService).getBranch("browser.");
this._prefBranch.QueryInterface(Ci.nsIPrefBranch2);
// if the service is disabled, do not init
if (!this._prefBranch.getBoolPref("sessionstore.enabled"))
return;
var observerService = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
// if the service is disabled, do not init
if (!this._prefBranch.getBoolPref("sessionstore.enabled")) {
// Notify observers that the sessionstore has done everything it is going to.
observerService.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
// Mark as disabled so we don't even try to initialise again.
this._loadState = STATE_DISABLED;
return;
}
OBSERVING.forEach(function(aTopic) {
observerService.addObserver(this, aTopic, true);
}, this);
@ -420,9 +434,16 @@ SessionStoreService.prototype = {
if (this._initialState) {
// make sure that the restored tabs are first in the window
this._initialState._firstTabs = true;
this._restoreCount = this._initialState.windows ? this._initialState.windows.length : 0;
this.restoreWindow(aWindow, this._initialState, this._isCmdLineEmpty(aWindow));
delete this._initialState;
}
else {
// Nothing to restore, notify observers things are complete.
var observerService = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
observerService.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
}
}
var tabbrowser = aWindow.getBrowser();
@ -828,10 +849,15 @@ SessionStoreService.prototype = {
tabData.index = history.index + 1;
}
else if (history && history.count > 0) {
for (var j = 0; j < history.count; j++)
// Cap the number of back history entries saved. (-1 = no cap)
var cap = this._prefBranch.getIntPref("sessionstore.max_tab_back_history");
var startIndex = -1 < cap && cap < history.index ? history.index - cap : 0;
for (var j = startIndex; j < history.count; j++)
tabData.entries.push(this._serializeHistoryEntry(history.getEntryAtIndex(j, false)));
tabData.index = history.index + 1;
tabData.index = history.index - startIndex + 1;
browser.parentNode.__SS_data = tabData;
}
else {
@ -1291,6 +1317,16 @@ SessionStoreService.prototype = {
* bool this isn't the restoration of the first window
*/
restoreWindow: function sss_restoreWindow(aWindow, aState, aOverwriteTabs, aFollowUp) {
if (this._restoreCount) {
this._restoreCount--;
if (this._restoreCount == 0) {
// This was the last window restored at startup, notify observers.
var observerService = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
observerService.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
}
}
if (!aFollowUp) {
this.windowToFocus = aWindow;
}

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

@ -91,6 +91,7 @@ bin/components/dom_css.xpt
bin/components/dom_events.xpt
bin/components/dom_html.xpt
bin/components/dom_offline.xpt
bin/components/dom_json.xpt
bin/components/dom_range.xpt
bin/components/dom_sidebar.xpt
bin/components/dom_storage.xpt
@ -241,6 +242,7 @@ bin/components/nsContentDispatchChooser.js
bin/components/nsHandlerService.js
bin/components/nsScriptableIO.js
bin/components/nsWebHandlerApp.js
bin/components/libdbusservice.so
; Modules
bin/modules/*

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

@ -99,6 +99,7 @@ bin\components\dom_css.xpt
bin\components\dom_events.xpt
bin\components\dom_html.xpt
bin\components\dom_offline.xpt
bin\components\dom_json.xpt
bin\components\dom_range.xpt
bin\components\dom_sidebar.xpt
bin\components\dom_storage.xpt

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

@ -18,14 +18,13 @@
<!ENTITY helpForIEUsers.label "For Internet Explorer Users">
<!ENTITY helpForIEUsers.accesskey "I">
<!ENTITY openHelp.commandkey "VK_F1">
<!ENTITY openHelpMac.commandkey "VK_HELP">
<!-- LOCALIZATION NOTE openHelpMac2.commandkey and openHelpMac2.modifiers
<!-- LOCALIZATION NOTE openHelpMac.commandkey and openHelpMac.modifiers
are all the necessary keys to hit OS X's open-help
keyboard (visible) shortcut (that's Cmd+? for most locales) -->
<!ENTITY openHelpMac2.commandkey "/">
<!ENTITY openHelpMac2.modifiers "accel,shift">
<!ENTITY openHelpMac2.frontendCommandkey "?">
<!ENTITY openHelpMac2.frontendModifiers "accel">
<!ENTITY openHelpMac.commandkey "/">
<!ENTITY openHelpMac.modifiers "accel,shift">
<!ENTITY openHelpMac.frontendCommandkey "?">
<!ENTITY openHelpMac.frontendModifiers "accel">
<!ENTITY helpReleaseNotes.label "Release Notes">
<!ENTITY helpReleaseNotes.accesskey "N">

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

@ -55,8 +55,8 @@
<!ENTITY bookmarksMenu.label "Bookmarks">
<!ENTITY bookmarksMenu.accesskey "B">
<!ENTITY addCurPageAsCmd.label "Bookmark This Page">
<!ENTITY addCurPageAsCmd.commandkey "d">
<!ENTITY bookmarkThisPageCmd.label "Bookmark This Page">
<!ENTITY bookmarkThisPageCmd.commandkey "d">
<!ENTITY subscribeToPageMenupopup.label "Subscribe to This Page">
<!ENTITY subscribeToPageMenuitem.label "Subscribe to This Page…">
<!ENTITY addCurPagesCmd.label "Bookmark All Tabs…">
@ -173,6 +173,7 @@
<!ENTITY historyHomeCmd.label "Home">
<!ENTITY showAllHistoryCmd.label "Show All History…">
<!ENTITY showAllHistoryCmd.commandkey "H">
<!ENTITY openCmd.commandkey "l">
<!ENTITY urlbar.accesskey "d">

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

@ -1,13 +1,21 @@
<!ENTITY editBookmarkOverlay.name.label "Name:">
<!ENTITY editBookmarkOverlay.name.accesskey "N">
<!ENTITY editBookmarkOverlay.location.label "Location:">
<!ENTITY editBookmarkOverlay.location.accesskey "L">
<!ENTITY editBookmarkOverlay.feedLocation.label "Feed Location:">
<!ENTITY editBookmarkOverlay.feedLocation.accesskey "F">
<!ENTITY editBookmarkOverlay.siteLocation.label "Site Location:">
<!ENTITY editBookmarkOverlay.siteLocation.accesskey "S">
<!ENTITY editBookmarkOverlay.liveTitlesSeparator.label "Live Titles">
<!ENTITY editBookmarkOverlay.folder.label "Folder:">
<!ENTITY editBookmarkOverlay.foldersExpanderDown.tooltip "Show all the bookmarks folders">
<!ENTITY editBookmarkOverlay.expanderUp.tooltip "Hide">
<!ENTITY editBookmarkOverlay.tags.label "Tags:">
<!ENTITY editBookmarkOverlay.tags.accesskey "T">
<!ENTITY editBookmarkOverlay.description.label "Description:">
<!ENTITY editBookmarkOverlay.description.accesskey "D">
<!ENTITY editBookmarkOverlay.keyword.label "Keyword:">
<!ENTITY editBookmarkOverlay.keyword.accesskey "K">
<!ENTITY editBookmarkOverlay.tagsExpanderDown.tooltip "Show all tags">
<!ENTITY editBookmarkOverlay.loadInSidebar.label "Load this bookmark in the sidebar">
<!ENTITY editBookmarkOverlay.loadInSidebar.accesskey "h">

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

@ -204,6 +204,8 @@
<!ENTITY forwardButton.tooltip "Go forward">
<!ENTITY detailsPane.more.label "More">
<!ENTITY detailsPane.more.accesskey "e">
<!ENTITY detailsPane.less.label "Less">
<!ENTITY detailsPane.less.accesskey "e">
<!ENTITY detailsPane.noPreviewAvailable.label "Preview">
<!ENTITY detailsPane.selectAnItemText.description "Select an item to view and edit its properties">

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

@ -357,7 +357,7 @@
<rdf:Description about="#menu-bookmarks">
<nc:subheadings>
<rdf:Seq>
<rdf:li> <rdf:Description ID="menu-bookmarks-add-to-bookmarks" nc:name="Bookmark This Page" nc:link="menu_reference.xhtml#add_to_bookmarks"/> </rdf:li>
<rdf:li> <rdf:Description ID="menu-bookmarks-add-to-bookmarks" nc:name="Bookmark This Page" nc:link="menu_reference.xhtml#add_to_bookmarks"/> </rdf:li>
<rdf:li> <rdf:Description ID="menu-bookmarks-subscribe" nc:name="Subscribe to This Page…" nc:link="menu_reference.xhtml#subscribe"/> </rdf:li>
<rdf:li> <rdf:Description ID="menu-bookmarks-bookmark-all-tabs" nc:name="Bookmark All Tabs…" nc:link="menu_reference.xhtml#bookmark_all_tabs"/> </rdf:li>
<rdf:li> <rdf:Description ID="menu-bookmarks-organize-bookmarks" nc:name="Organize Bookmarks…" nc:link="menu_reference.xhtml#organize_bookmarks"/> </rdf:li>

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

@ -300,7 +300,7 @@ Contributors:
<p>This menu contains all your stored bookmarks.</p>
<h3 id="add_to_bookmarks">Bookmark This Page</h3>
<h3 id="add_to_bookmarks">Bookmark This Page</h3>
<p>Adds the current page to your bookmarks. A dialog will be displayed,
allowing you to choose a title for the bookmark and specify where you
want it to be stored.</p>

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

@ -52,7 +52,7 @@ isprinting=The document cannot change while Printing or in Print Preview.
deniedPortAccess=This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.
proxyResolveFailure=Firefox is configured to use a proxy server that can't be found.
proxyConnectFailure=Firefox is configured to use a proxy server that is refusing connections.
contentEncodingError=The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Please contact the website owners to inform them of this problem.
contentEncodingError=The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
unsafeContentType=The page you are trying to view cannot be shown because it is contained in a file type that may not be safe to open. Please contact the website owners to inform them of this problem.
externalProtocolTitle=External Protocol Request
externalProtocolPrompt=An external application must be launched to handle %1$S: links.\n\n\nRequested link:\n\n%2$S\n\nApplication: %3$S\n\n\nIf you were not expecting this request it may be an attempt to exploit a weakness in that other program. Cancel this request unless you are sure it is not malicious.\n

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

@ -85,9 +85,12 @@
locale/browser/help/tabbed_browsing.xhtml (%chrome/help/tabbed_browsing.xhtml)
locale/browser/help/glossary.xhtml (%chrome/help/glossary.xhtml)
# the following files are browser-specific overrides
* locale/@AB_CD@/global/netError.dtd (%chrome/overrides/netError.dtd)
* locale/@AB_CD@/global/appstrings.properties (%chrome/overrides/appstrings.properties)
* locale/@AB_CD@/mozapps/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd)
* locale/browser/netError.dtd (%chrome/overrides/netError.dtd)
* locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties)
* locale/browser/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd)
% override chrome://global/locale/netErrorApp.dtd chrome://browser/locale/netError.dtd
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
% override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
#ifdef MOZ_USE_GENERIC_BRANDING
% locale branding @AB_CD@ %locale/branding/
locale/branding/brand.dtd (%chrome/branding/brand.dtd)

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

@ -114,6 +114,15 @@ toolbarbutton.bookmark-item[open="true"] {
display: none;
}
/* Hide icons for the container ("folder") items and use a dropmarker instead */
.bookmark-item[container] > .toolbarbutton-menu-dropmarker {
display: -moz-box !important;
}
.bookmark-item[container] > .toolbarbutton-icon {
display: none !important;
}
.bookmarks-toolbar-customize {
display: none;
max-width: 15em !important;
@ -768,6 +777,21 @@ toolbar[iconsize="small"] #paste-button[disabled="true"] {
visibility: collapse;
}
#urlbar-search-splitter {
-moz-appearance: none;
width: 8px;
-moz-margin-start: -4px;
}
/*XXX The first two selectors are there because adjacent selectors aren't
working reliably (bug 229915). */
#search-container + #urlbar-container > #urlbar ,
#urlbar-container + #search-container > #searchbar > .searchbar-textbox ,
#urlbar-search-splitter + #urlbar-container > #urlbar ,
#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox {
-moz-margin-start: 0;
}
#wrapper-urlbar-container #urlbar {
-moz-user-input: disabled;
cursor: -moz-grab;

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

@ -95,7 +95,7 @@
color: -moz-FieldText;
}
#editBMPanel_namePicker[droppable="false"] > .menulist-dropmarker {
#editBMPanel_namePicker[droppable="false"] > .menulist-editable-box {
/* Normal editable menulists set this to "menulist-textfield". */
-moz-appearance: none;
padding: 2px 2px 3px 4px;

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

@ -64,11 +64,13 @@ richlistitem {
.actionsMenu .menulist-icon {
-moz-margin-end: 1px;
height: 16px;
width: 16px;
}
.actionsMenu > menupopup > menuitem > .menu-iconic-left {
-moz-padding-start: 0;
-moz-padding-end: 4px;
-moz-padding-end: 4px !important;
}
.actionsMenu > menupopup > menuitem {

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

@ -864,6 +864,21 @@ toolbar[iconsize="small"] #paste-button:hover:active {
background: url("chrome://browser/skin/Secure-background.gif") #FFFED8 repeat-x;
}
#urlbar-search-splitter {
min-width: 8px;
-moz-margin-start: -4px;
background: transparent;
}
/*XXX The first two selectors are there because adjacent selectors aren't
working reliably (bug 229915). */
#search-container + #urlbar-container > #urlbar ,
#urlbar-container + #search-container > #searchbar > .searchbar-textbox ,
#urlbar-search-splitter + #urlbar-container > #urlbar ,
#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox {
-moz-margin-start: 0;
}
#wrapper-urlbar-container #urlbar {
-moz-user-input: disabled;
cursor: -moz-grab;

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

@ -854,6 +854,22 @@ toolbar[iconsize="small"] #paste-button:not([disabled="true"]):hover:active {
visibility: collapse;
}
#urlbar-search-splitter {
min-width: 8px;
-moz-margin-start: -4px;
border: none;
background: transparent;
}
/*XXX The first two selectors are there because adjacent selectors aren't
working reliably (bug 229915). */
#search-container + #urlbar-container > #urlbar ,
#urlbar-container + #search-container > #searchbar > .searchbar-textbox ,
#urlbar-search-splitter + #urlbar-container > #urlbar ,
#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox {
-moz-margin-start: 0;
}
#wrapper-urlbar-container #urlbar {
-moz-user-input: disabled;
cursor: -moz-grab;
@ -1097,39 +1113,36 @@ toolbar[mode="text"] #navigator-throbber[busy="true"] {
/* Tabs */
.tabbrowser-tab {
-moz-appearance: none;
height: 22px;
background: url("chrome://browser/skin/tabbrowser/tab-bkgnd.png") repeat-x;
margin: 3px 0px 4px;
padding: 0px 0px 1px;
padding: 0px 1px 1px 0px;
border: 2px solid;
border-right-width: 1px;
border-bottom: none;
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 2px;
-moz-border-top-colors: #b5b3a8 #e8e6dc;
-moz-border-right-colors: #c1bfb3 #e8e6dc;
-moz-border-left-colors: #c1bfb3 #e8e6dc;
-moz-border-top-colors: ThreeDShadow rgba(255,255,255,.3);
-moz-border-right-colors: rgba(0,0,0,.1);
-moz-border-left-colors: ThreeDShadow rgba(255,255,255,.3);
}
.tabbrowser-tab:hover,
.tabbrowser-tab[selected="true"] {
border: 1px solid;
border-bottom: none;
border-width: 1px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-moz-border-top-colors: #9a9890;
-moz-border-right-colors: #aaa89f;
-moz-border-left-colors: #aaa89f;
-moz-border-top-colors: ThreeDShadow;
-moz-border-right-colors: ThreeDShadow;
-moz-border-left-colors: ThreeDShadow;
}
.tabbrowser-tab:not([selected="true"]):hover {
height: 23px;
margin: 2px 0px 4px;
padding: 2px 1px 1px;
background: url("chrome://browser/skin/tabbrowser/tab-active-bkgnd.png") repeat-x;
}
.tabbrowser-tab[selected="true"] {
height: 24px;
margin: 2px 0px 3px;
padding: 1px;
background: -moz-dialog url("chrome://browser/skin/tabbrowser/tab-active-bkgnd.png") repeat-x;
@ -1225,204 +1238,111 @@ tabpanels {
outline: none !important;
}
/* Tab scrollbox arrow buttons */
/* Tab scrollbox arrow and all-tabs buttons */
.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down {
.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-alltabs-button {
-moz-appearance: none;
width: 18px;
margin: 3px 0px 4px;
padding: 0px;
border: 2px solid;
border-right-width: 1px;
border-bottom: none;
-moz-border-top-colors: #b5b3a8 #e8e6dc;
-moz-border-right-colors: #c1bfb3 #e8e6dc;
-moz-border-left-colors: #c1bfb3 #e8e6dc;
-moz-border-top-colors: ThreeDShadow rgba(255,255,255,.3);
-moz-border-right-colors: ThreeDShadow;
-moz-border-left-colors: ThreeDShadow rgba(255,255,255,.3);
background: url("chrome://browser/skin/tabbrowser/tab-bkgnd.png");
background-repeat: repeat-x;
-moz-image-region: rect(0, 11px, 14px, 0);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover,
.tabs-alltabs-button:hover {
border-top-width: 1px;
padding-top: 1px;
-moz-border-top-colors: ThreeDShadow;
-moz-border-right-colors: ThreeDShadow;
-moz-border-left-colors: ThreeDShadow transparent;
background: url("chrome://browser/skin/tabbrowser/tab-active-bkgnd.png");
background-repeat: repeat-x;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover {
border: 1px solid;
border-bottom: none;
-moz-border-top-colors: #9a9890;
-moz-border-right-colors: #aaa89f;
-moz-border-left-colors: #aaa89f;
background: url("chrome://browser/skin/tabbrowser/tab-active-bkgnd.png");
background-repeat: repeat-x;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up {
border-left: none;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
-moz-image-region: rect(0, 11px, 14px, 0);
-moz-border-radius-topright: 2px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"] {
border-left: 2px solid;
border-right: none;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 0px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"] {
-moz-border-radius-topright: 4px;
-moz-image-region: rect(0, 33px, 14px, 22px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"][disabled="true"] {
-moz-border-radius-topright: 0px;
-moz-border-radius-topleft: 4px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover {
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 0px;
border-left: none;
-moz-image-region: rect(0, 22px, 14px, 11px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"]:not([disabled="true"]):hover {
-moz-border-radius-topright: 0px;
-moz-border-radius-topleft: 4px;
border-left: 1px solid;
border-right: none;
}
.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 {
border-right: none;
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 0px;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
-moz-image-region: rect(0, 11px, 14px, 0);
}
.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"] {
border-left: none;
border-right: 2px solid;
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 2px;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"],
.tabbrowser-arrowscrollbox > .scrollbutton-down[disabled="true"] {
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 0px;
-moz-image-region: rect(0, 33px, 14px, 22px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"][disabled="true"] {
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 4px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover {
-moz-padding-start: 1px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 0px;
border-right: none;
-moz-image-region: rect(0, 22px, 14px, 11px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"]:not([disabled="true"]):hover {
border-left: none;
border-right: 1px solid;
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 4px;
opacity: .4;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover:active,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover:active {
-moz-image-region: rect(0, 44px, 14px, 33px);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up {
border-left-style: none;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
-moz-border-radius-topright: 2px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"] {
border-left-style: solid;
border-right-style: none;
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 0px;
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
}
.tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon {
margin: 6px 0px 0px 0px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-alltabs-button {
border-right-style: none;
-moz-border-radius-topleft: 2px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-down {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
}
.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"],
.tabs-container > stack[chromedir="rtl"] > .tabs-alltabs-button {
border-left-style: none;
border-right-style: solid;
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 2px;
}
.tabbrowser-arrowscrollbox > .scrollbutton-down[chromedir="rtl"] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
}
.tabbrowser-arrowscrollbox > .scrollbutton-down > .toolbarbutton-icon {
margin-top: 6px;
}
/* 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;
-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-text,
.tabs-alltabs-button > .toolbarbutton-icon {
display: none;
}
.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");
margin-top: 3px;
margin-bottom: 1px;
}
.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;
@ -1478,11 +1398,14 @@ stack[chromedir="rtl"] > hbox > .tabs-alltabs-box-animate {
background-repeat: repeat-x;
border-left: 1px solid threedshadow;
border-top: 1px solid threedshadow;
-moz-border-radius-topleft: 2px;
}
.tabs-container > .tabs-closebutton[chromedir="rtl"] {
border-left: none;
border-right: 1px solid threedshadow;
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 2px;
}
#sidebar-box .tabs-closebutton {

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

@ -59,12 +59,8 @@ classic.jar:
skin/classic/browser/preferences/plugin.png (preferences/plugin.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
skin/classic/browser/preferences/applications.css (preferences/applications.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/alltabs-box-overflow-start-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png)
skin/classic/browser/tabbrowser/tab-arrow-end.png (tabbrowser/tab-arrow-end.png)
skin/classic/browser/tabbrowser/tab-arrow-start.png (tabbrowser/tab-arrow-start.png)
skin/classic/browser/tabbrowser/tabbrowser-tabs-bkgnd.png (tabbrowser/tabbrowser-tabs-bkgnd.png)

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

@ -95,7 +95,7 @@
color: -moz-FieldText;
}
#editBMPanel_namePicker[droppable="false"] > .menulist-dropmarker {
#editBMPanel_namePicker[droppable="false"] > .menulist-editable-box {
/* Normal editable menulists set this to "menulist-textfield". */
-moz-appearance: none;
padding: 2px 2px 3px 4px;

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

До

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

После

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

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

@ -56,6 +56,7 @@ endif
include $(topsrcdir)/config/rules.mk
ifdef ENABLE_TESTS
# Install bloaturls.txt file for tinderbox bloat test.
libs:: bloaturls.txt
$(INSTALL) $< $(DIST)/bin
@ -65,3 +66,4 @@ libs:: bloaturls.txt
# autocycling of URLs.
libs:: bloatcycle.html
$(INSTALL) $< $(DIST)/bin/res
endif

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

@ -426,7 +426,7 @@ private:
nsresult
CheckPropertyAccessImpl(PRUint32 aAction,
nsIXPCNativeCallContext* aCallContext,
nsAXPCNativeCallContext* aCallContext,
JSContext* cx, JSObject* aJSObject,
nsISupports* aObj, nsIURI* aTargetURI,
nsIClassInfo* aClassInfo,

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

@ -46,7 +46,6 @@
#include "nsMemory.h"
#include "nsIUUIDGenerator.h"
#include "nsID.h"
#include "prmem.h" // For PF_Free, 'cause nsID::ToString sucks like that
#include "nsNetUtil.h"
#include "nsIClassInfoImpl.h"
#include "nsNetCID.h"
@ -105,10 +104,10 @@ nsNullPrincipal::Init()
rv = uuidgen->GenerateUUIDInPlace(&id);
NS_ENSURE_SUCCESS(rv, rv);
char* chars = id.ToString();
NS_ENSURE_TRUE(chars, NS_ERROR_OUT_OF_MEMORY);
char chars[NSID_LENGTH];
id.ToProvidedString(chars);
PRUint32 suffixLen = strlen(chars);
PRUint32 suffixLen = NSID_LENGTH - 1;
PRUint32 prefixLen = NS_ARRAY_LENGTH(NS_NULLPRINCIPAL_PREFIX) - 1;
// Use an nsCString so we only do the allocation once here and then share
@ -118,8 +117,6 @@ nsNullPrincipal::Init()
str.Append(NS_NULLPRINCIPAL_PREFIX);
str.Append(chars);
PR_Free(chars);
if (str.Length() != prefixLen + suffixLen) {
NS_WARNING("Out of memory allocating null-principal URI");

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

@ -726,7 +726,7 @@ nsScriptSecurityManager::CheckSameOriginPrincipal(nsIPrincipal* aSourcePrincipal
nsresult
nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
nsIXPCNativeCallContext* aCallContext,
nsAXPCNativeCallContext* aCallContext,
JSContext* cx, JSObject* aJSObject,
nsISupports* aObj, nsIURI* aTargetURI,
nsIClassInfo* aClassInfo,
@ -795,7 +795,8 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
#ifdef DEBUG_CAPS_CheckPropertyAccessImpl
printf("sameOrigin ");
#endif
nsCOMPtr<nsIPrincipal> objectPrincipal;
nsCOMPtr<nsIPrincipal> principalHolder;
nsIPrincipal *objectPrincipal;
if(aJSObject)
{
objectPrincipal = doGetObjectPrincipal(cx, aJSObject);
@ -805,8 +806,10 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
else if(aTargetURI)
{
if (NS_FAILED(GetCodebasePrincipal(
aTargetURI, getter_AddRefs(objectPrincipal))))
aTargetURI, getter_AddRefs(principalHolder))))
return NS_ERROR_FAILURE;
objectPrincipal = principalHolder;
}
else
{
@ -842,7 +845,7 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
if (NS_SUCCEEDED(rv) && classInfoData.IsContentNode())
{
// No access to anonymous content from the web! (bug 164086)
nsCOMPtr<nsIContent> content(do_QueryInterface(aObj));
nsIContent *content = static_cast<nsIContent*>(aObj);
NS_ASSERTION(content, "classinfo had CONTENT_NODE set but node did not"
"implement nsIContent! Fasten your seat belt.");
if (content->IsNativeAnonymous()) {
@ -939,8 +942,8 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
if (sXPConnect)
{
nsCOMPtr<nsIXPCNativeCallContext> xpcCallContext;
sXPConnect->GetCurrentNativeCallContext(getter_AddRefs(xpcCallContext));
nsAXPCNativeCallContext *xpcCallContext = nsnull;
sXPConnect->GetCurrentNativeCallContext(&xpcCallContext);
if (xpcCallContext)
xpcCallContext->SetExceptionWasThrown(PR_TRUE);
}
@ -1545,8 +1548,8 @@ nsScriptSecurityManager::ReportError(JSContext* cx, const nsAString& messageTag,
// Tell XPConnect that an exception was thrown, if appropriate
if (sXPConnect)
{
nsCOMPtr<nsIXPCNativeCallContext> xpcCallContext;
sXPConnect->GetCurrentNativeCallContext(getter_AddRefs(xpcCallContext));
nsAXPCNativeCallContext* xpcCallContext = nsnull;
sXPConnect->GetCurrentNativeCallContext(&xpcCallContext);
if (xpcCallContext)
xpcCallContext->SetExceptionWasThrown(PR_TRUE);
}
@ -3072,8 +3075,8 @@ nsScriptSecurityManager::CanCreateInstance(JSContext *cx,
{
//-- Access denied, report an error
nsCAutoString errorMsg("Permission denied to create instance of class. CID=");
nsXPIDLCString cidStr;
cidStr += aCID.ToString();
char cidStr[NSID_LENGTH];
aCID.ToProvidedString(cidStr);
errorMsg.Append(cidStr);
SetPendingException(cx, errorMsg.get());
@ -3103,8 +3106,8 @@ nsScriptSecurityManager::CanGetService(JSContext *cx,
{
//-- Access denied, report an error
nsCAutoString errorMsg("Permission denied to get service. CID=");
nsXPIDLCString cidStr;
cidStr += aCID.ToString();
char cidStr[NSID_LENGTH];
aCID.ToProvidedString(cidStr);
errorMsg.Append(cidStr);
SetPendingException(cx, errorMsg.get());
@ -3123,7 +3126,7 @@ nsScriptSecurityManager::CanGetService(JSContext *cx,
NS_IMETHODIMP
nsScriptSecurityManager::CanAccess(PRUint32 aAction,
nsIXPCNativeCallContext* aCallContext,
nsAXPCNativeCallContext* aCallContext,
JSContext* cx,
JSObject* aJSObject,
nsISupports* aObj,

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

@ -1,6 +1,6 @@
#!/usr/bin/python
NSPR_CO_TAG = 'NSPR_HEAD_20071218'
NSPR_CO_TAG = 'NSPR_HEAD_20080113'
NSS_CO_TAG = 'NSS_3_12_ALPHA_2B'
NSPR_DIRS = ('nsprpub',)

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

@ -105,6 +105,15 @@ ifdef HOST_PROGRAM
$(INSTALL) $(HOST_PROGRAM) $(DIST)/bin
endif
# Generate a new buildid every time we "export" in config... that's only
# supposed to be once per-build!
export::
ifdef MOZ_BUILD_DATE
printf "%s" $(MOZ_BUILD_DATE) > buildid
else
$(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
endif
ifdef WRAP_SYSTEM_INCLUDES
export::
if test ! -d system_wrappers; then mkdir system_wrappers; fi

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

@ -101,6 +101,7 @@ MOZ_JSDEBUGGER = @MOZ_JSDEBUGGER@
MOZ_PERF_METRICS = @MOZ_PERF_METRICS@
MOZ_LEAKY = @MOZ_LEAKY@
MOZ_JPROF = @MOZ_JPROF@
MOZ_SHARK = @MOZ_SHARK@
MOZ_XPCTOOLS = @MOZ_XPCTOOLS@
ENABLE_EAZEL_PROFILER=@ENABLE_EAZEL_PROFILER@
EAZEL_PROFILER_CFLAGS=@EAZEL_PROFILER_CFLAGS@

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

@ -1087,6 +1087,19 @@ ifdef NO_LD_ARCHIVE_FLAGS
ifdef SHARED_LIBRARY_LIBS
@rm -f $(SUB_SHLOBJS)
@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
ifeq ($(OS_ARCH),Darwin)
@echo Making symlinks to the original object files in the archive libraries $(SHARED_LIBRARY_LIBS)
@for lib in $(SHARED_LIBRARY_LIBS); do \
libdir=`echo $$lib|sed -e 's,/[^/]*\.a,,'`; \
ofiles=`$(AR_LIST) $${lib}`; \
for ofile in $$ofiles; do \
if [ -f $$libdir/$$ofile ]; then \
rm -f $$ofile; \
ln -s $$libdir/$$ofile $$ofile; \
fi; \
done; \
done
endif
endif # SHARED_LIBRARY_LIBS
endif # NO_LD_ARCHIVE_FLAGS
ifdef DTRACE_LIB_DEPENDENT
@ -1122,17 +1135,6 @@ endif # EMBED_MANIFEST_AT
endif # MSVC with manifest tool
endif # WINNT && !GCC
ifeq ($(OS_ARCH),Darwin)
@for lib in $(SHARED_LIBRARY_LIBS); do \
libdir=`echo $$lib|sed -e 's,/[^/]*\.a,,'`; \
ofiles=`$(AR_LIST) $${lib}`; \
for ofile in $$ofiles; do \
if [ -f $$libdir/$$ofile ]; then \
rm -f $$ofile; \
ln -s $$libdir/$$ofile $$ofile; \
fi; \
done; \
done
@touch $(SHARED_LIBRARY)
else # non-Darwin
@rm -f $(SUB_SHLOBJS)
endif # Darwin

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

@ -618,7 +618,6 @@ size_t.h
someincludefile.h
Sound.h
sqlite3.h
sqlite3file.h
ssdef.h
sslerr.h
ssl.h

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

@ -36,8 +36,6 @@
ifndef INCLUDED_VERSION_MK
INCLUDED_VERSION_MK=1
# Windows gmake build:
# Build default .rc file if $(RESFILE) isn't defined.
# TODO:
@ -78,18 +76,10 @@ GARBAGE += $(RESFILE) $(RCFILE)
#dummy target so $(RCFILE) doesn't become the default =P
all::
$(RCFILE): $(RCINCLUDE)
$(RCFILE): $(RCINCLUDE) $(topsrcdir)/config/version_win.pl
$(PERL) $(topsrcdir)/config/version_win.pl $(_RC_STRING)
endif # RESFILE
endif # Windows
ifdef VERSION_TMPL
GARBAGE += $(VERSION_TMPL)
export::
$(PERL) $(topsrcdir)/config/milestone.pl --topsrcdir $(topsrcdir) --objdir . --srcdir $(srcdir) --template $(VERSION_TMPL)
endif
endif

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

@ -43,14 +43,27 @@ push(@INC, "$dir");
require "Moz/Milestone.pm";
use Getopt::Long;
use Getopt::Std;
use POSIX;
# Calculate the number of days since Jan. 1, 2000 from a buildid string
sub daysFromBuildID
{
my ($buildid,) = @_;
my ($y, $m, $d, $h) = ($buildid =~ /^(\d{4})(\d{2})(\d{2})(\d{2})$/);
$d || die("Unrecognized buildid string.");
my $secondstodays = 60 * 60 * 24;
return (POSIX::mktime(00, 00, 00, $d, $m, $y - 1900) -
POSIX::mktime(00, 00, 00, 01, 01, 100)) / $secondstodays;
}
#Creates version resource file
#Paramaters are passed on the command line:
#Example: -PBI=blah -DEBUG=1
#Example: -MODNAME nsToolkitCompsModule -DEBUG=1
# PBI - your private build information (if not a milestone or nightly)
# DEBUG - Mozilla's global debug variable - tells if its debug version
# OFFICIAL - tells Mozilla is building a milestone or nightly
# MSTONE - tells which milestone is being built;
@ -90,10 +103,9 @@ sub getNextEntry
return undef;
}
my ($quiet,$privateinfo,$objdir,$debug,$official,$milestone,$module,$binary,$depth,$rcinclude,$bits,$srcdir);
my ($quiet,$objdir,$debug,$official,$milestone,$buildid,$module,$binary,$depth,$rcinclude,$bits,$srcdir,$fileversion,$productversion);
GetOptions( "QUIET" => \$quiet,
"PBI=s" => \$privateinfo,
"DEBUG=s" => \$debug,
"OFFICIAL=s" => \$official,
"MSTONE=s" => \$milestone,
@ -106,7 +118,6 @@ GetOptions( "QUIET" => \$quiet,
"RCINCLUDE=s" => \$rcinclude,
"OBJDIR=s" => \$objdir,
"BITS=s" => \$bits);
if (!defined($privateinfo)) {$privateinfo="";}
if (!defined($debug)) {$debug="";}
if (!defined($official)) {$official="";}
if (!defined($milestone)) {$milestone="";}
@ -121,7 +132,7 @@ if (!defined($topsrcdir)) {$topsrcdir=".";}
if (!defined($bits)) {$bits="";}
my $mfversion = "Personal";
my $mpversion = "Personal";
my $fileflags = "VS_FF_PRIVATEBUILD";
my @fileflags = ("0");
my $comment="";
my $description="";
if (!defined($module))
@ -130,14 +141,13 @@ if (!defined($module))
($module) = split(/\./,$module);
}
my $productversion = "0,0,0,0";
my $fileversion = $productversion;
my $fileos = "VOS__WINDOWS32";
if ($bits eq "16") { $fileos="VOS__WINDOWS16"; }
my $bufferstr=" ";
my $MILESTONE_FILE = "$topsrcdir/config/milestone.txt";
my $BUILDID_FILE = "$depth/config/buildid";
#Read module.ver file
#Version file overrides for WIN32:
@ -201,50 +211,47 @@ $milestone =~ s/^\s*(.*)\s*$/$1/;
$description =~ s/^\s*(.*)\s*$/$1/;
$module =~ s/^\s*(.*)\s*$/$1/;
$depth =~ s/^\s*(.*)\s*$/$1/;
$privateinfo =~ s/^\s*(.*)\s*$/$1/;
$binary =~ s/^\s*(.*)\s*$/$1/;
$displayname =~ s/^\s*(.*)\s*$/$1/;
open(BUILDID, "<", $BUILDID_FILE) || die("Couldn't open buildid file: $BUILDID_FILE");
$buildid = <BUILDID>;
$buildid =~ s/\s*$//;
close BUILDID;
my $daycount = daysFromBuildID($buildid);
if ($milestone eq "") {
$milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
}
$mfversion = $mpversion = $milestone;
if ($debug eq "1")
{
$fileflags .= " | VS_FF_DEBUG";
push @fileflags, "VS_FF_DEBUG";
$mpversion .= " Debug";
$mfversion .= " Debug";
}
if ($official eq "1") {
#its an official build
$privateinfo = "";
$fileflags = "VS_FF_PRERELEASE";
if ($debug eq "1") {
$fileflags = "VS_FF_PRERELEASE | VS_FF_DEBUG";
}
# Try to grab milestone.
# I'd love to put this in the makefiles rather than here,
# since I could run it once per build rather than once per
# dll/program, but I can't seem to get backticks working
# properly in the makefiles =P
if ($milestone eq "") {
$milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
}
if ($milestone ne "" && $milestone !~ /\+$/) {
#its a milestone build
$mpversion = $milestone;
$fileflags = "0";
my @mstone = split(/\./,$milestone);
$mstone[1] =~s/\D*$//g;
$productversion="$mstone[0],$mstone[1],0,0";
}
$mfversion = $mpversion = "$milestone";
if ($official ne "1") {
push @fileflags, "VS_FF_PRIVATEBUILD";
}
if ($milestone =~ /[a-z]/) {
push @fileflags, "VS_FF_PRERELEASE";
}
my @mstone = split(/\./,$milestone);
$mstone[1] =~s/\D.*$//;
if (!$mstone[2]) {
$mstone[2] = "0";
}
else {
$mstone[2] =~s/\D.*$//;
}
$fileversion = $productversion="$mstone[0],$mstone[1],$mstone[2],$daycount";
my $copyright = "License: MPL 1.1/GPL 2.0/LGPL 2.1";
my $company = "Mozilla Foundation";
my $trademarks = "Mozilla";
@ -257,7 +264,7 @@ if (defined($override_fileversion)){$fileversion=$override_fileversion;}
if (defined($override_mfversion)){$mfversion=$override_mfversion;}
if (defined($override_company)){$company=$override_company;}
if (defined($override_module)){$override_module =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $module=$override_module;}
if (defined($override_copyright)){$override_copyright =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $copyright=$override_company;}
if (defined($override_copyright)){$override_copyright =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $copyright=$override_copyright;}
if (defined($override_trademarks)){$override_trademarks =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $trademarks=$override_trademarks;}
if (defined($override_filename)){$binary=$override_filename;}
if (defined($override_productname)){$override_productname =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $productname=$override_productname;}
@ -370,6 +377,8 @@ if (open(RCINCLUDE, "<$rcinclude"))
}
my $fileflags = join(' | ', @fileflags);
print RCFILE qq{
@ -379,6 +388,7 @@ print RCFILE qq{
//
1 VERSIONINFO
FILEVERSION $fileversion
PRODUCTVERSION $productversion
FILEFLAGSMASK 0x3fL
FILEFLAGS $fileflags
@ -399,14 +409,8 @@ BEGIN
VALUE "InternalName", "$module"
VALUE "LegalTrademarks", "$trademarks"
VALUE "OriginalFilename", "$binary"
};
if ($official ne "1") {
print RCFILE qq{
VALUE "PrivateBuild", "$privateinfo"
};
}
print RCFILE qq{
VALUE "ProductName", "$productname"
VALUE "BuildID", "$buildid"
END
END
BLOCK "VarFileInfo"

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

@ -1256,7 +1256,11 @@ if test "$GNU_CC"; then
# -Wbad-function-cast - warns when casting a function to a new return type
# -Wconversion - complained when char's or short's were used a function args
# -Wshadow - removed because it generates more noise than help --pete
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith -Wcast-align"
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith"
if test "$CPU_ARCH" != "ia64"; then
# only use -Wcast-align for non-ia64, it's noisy on that platform
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wcast-align"
fi
dnl Turn pedantic on but disable the warnings for long long
_PEDANTIC=1
@ -1281,7 +1285,11 @@ fi
if test "$GNU_CXX"; then
# Turn on GNU specific features
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
if test "$CPU_ARCH" != "ia64"; then
# only use -Wcast-align for non-ia64, it's noisy on that platform
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wcast-align"
fi
_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/mozilla-config.h'
_USE_CPP_INCLUDE_FLAG=1
@ -6095,6 +6103,16 @@ if test -n "$MOZ_JPROF"; then
AC_DEFINE(MOZ_JPROF)
fi
dnl ========================================================
dnl shark
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(shark,
[ --enable-shark Enable shark remote profiling (needs CHUD framework)],
MOZ_SHARK=1,
MOZ_SHARK= )
if test -n "$MOZ_SHARK"; then
AC_DEFINE(MOZ_SHARK)
fi
dnl ========================================================
dnl = Enable stripping of libs & executables
@ -7423,6 +7441,7 @@ AC_SUBST(GC_LEAK_DETECTOR)
AC_SUBST(MOZ_LOG_REFCNT)
AC_SUBST(MOZ_LEAKY)
AC_SUBST(MOZ_JPROF)
AC_SUBST(MOZ_SHARK)
AC_SUBST(MOZ_XPCTOOLS)
AC_SUBST(MOZ_JSLOADER)
AC_SUBST(MOZ_USE_NATIVE_UCONV)

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

@ -53,6 +53,10 @@ ifdef MOZ_XTF
DIRS += xtf
endif
ifdef MOZ_MATHML
DIRS += mathml
endif
DIRS += events
ifdef ENABLE_TESTS

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

@ -1152,6 +1152,21 @@ public:
nsNativeKeyEvent* aNativeEvent,
PRBool aGetCharCode);
/**
* Get the application manifest URI for this context. The manifest URI
* is specified in the manifest= attribute of the root element of the
* toplevel window.
*
* @param aWindow The context to check.
* @param aURI The manifest URI.
*/
static void GetOfflineAppManifest(nsIDOMWindow *aWindow, nsIURI **aURI);
/**
* Check whether an application should be allowed to use offline APIs.
*/
static PRBool OfflineAppAllowed(nsIURI *aURI);
private:
static PRBool InitializeEventTable();
@ -1223,7 +1238,6 @@ private:
static PRBool sInitialized;
};
#define NS_HOLD_JS_OBJECTS(obj, clazz) \
nsContentUtils::HoldJSObjects(NS_CYCLE_COLLECTION_UPCAST(obj, clazz), \
&NS_CYCLE_COLLECTION_NAME(clazz))

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

@ -275,7 +275,7 @@ public:
CopyASCIItoUTF16(mContentLanguage, aContentLanguage);
}
// The state BidiEnabled should persist across multiple views
// The states BidiEnabled and MathMLEnabled should persist across multiple views
// (screen, print) of the same document.
/**
@ -297,6 +297,19 @@ public:
{
mBidiEnabled = aBidiEnabled;
}
/**
* Check if the document contains (or has contained) any MathML elements.
*/
PRBool GetMathMLEnabled() const
{
return mMathMLEnabled;
}
void SetMathMLEnabled()
{
mMathMLEnabled = PR_TRUE;
}
/**
* Ask this document whether it's the initial document in its window.
@ -965,6 +978,8 @@ protected:
// True if BIDI is enabled.
PRPackedBool mBidiEnabled;
// True if a MathML element has ever been owned by this document.
PRPackedBool mMathMLEnabled;
// True if this document is the initial document for a window. This should
// basically be true only for documents that exist in newly-opened windows or

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

@ -180,7 +180,9 @@ public:
eDOCUMENT_FRAGMENT = 1 << 11,
/** data nodes (comments, PIs, text). Nodes of this type always
returns a non-null value for nsIContent::GetText() */
eDATA_NODE = 1 << 12
eDATA_NODE = 1 << 12,
/** nsMathMLElement */
eMATHML = 1 << 13
};
/**

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

@ -136,6 +136,7 @@ CPPSRCS = \
nsImageLoadingContent.cpp \
nsLineBreaker.cpp \
nsLoadListenerProxy.cpp \
nsMappedAttributeElement.cpp \
nsMappedAttributes.cpp \
nsNameSpaceManager.cpp \
nsNoDataProtocolContentPolicy.cpp \

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

@ -42,7 +42,7 @@
*/
#include "nsAttrAndChildArray.h"
#include "nsGenericHTMLElement.h"
#include "nsMappedAttributeElement.h"
#include "prmem.h"
#include "prbit.h"
#include "nsString.h"
@ -561,7 +561,7 @@ nsAttrAndChildArray::IndexOfAttr(nsIAtom* aLocalName, PRInt32 aNamespaceID) cons
nsresult
nsAttrAndChildArray::SetAndTakeMappedAttr(nsIAtom* aLocalName,
nsAttrValue& aValue,
nsGenericHTMLElement* aContent,
nsMappedAttributeElement* aContent,
nsHTMLStyleSheet* aSheet)
{
nsRefPtr<nsMappedAttributes> mapped;
@ -651,7 +651,7 @@ nsAttrAndChildArray::MappedAttrCount() const
}
nsresult
nsAttrAndChildArray::GetModifiableMapped(nsGenericHTMLElement* aContent,
nsAttrAndChildArray::GetModifiableMapped(nsMappedAttributeElement* aContent,
nsHTMLStyleSheet* aSheet,
PRBool aWillAddAttr,
nsMappedAttributes** aModifiable)

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

@ -53,7 +53,7 @@ class nsIContent;
class nsMappedAttributes;
class nsHTMLStyleSheet;
class nsRuleWalker;
class nsGenericHTMLElement;
class nsMappedAttributeElement;
#define ATTRCHILD_ARRAY_GROWSIZE 8
#define ATTRCHILD_ARRAY_LINEAR_THRESHOLD 32
@ -120,7 +120,7 @@ public:
PRInt32 IndexOfAttr(nsIAtom* aLocalName, PRInt32 aNamespaceID = kNameSpaceID_None) const;
nsresult SetAndTakeMappedAttr(nsIAtom* aLocalName, nsAttrValue& aValue,
nsGenericHTMLElement* aContent,
nsMappedAttributeElement* aContent,
nsHTMLStyleSheet* aSheet);
nsresult SetMappedAttrStyleSheet(nsHTMLStyleSheet* aSheet);
void WalkMappedAttributeStyleRules(nsRuleWalker* aRuleWalker);
@ -134,7 +134,7 @@ private:
PRUint32 NonMappedAttrCount() const;
PRUint32 MappedAttrCount() const;
nsresult GetModifiableMapped(nsGenericHTMLElement* aContent,
nsresult GetModifiableMapped(nsMappedAttributeElement* aContent,
nsHTMLStyleSheet* aSheet,
PRBool aWillAddAttr,
nsMappedAttributes** aModifiable);

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

@ -70,10 +70,8 @@
#include "nsIPrincipal.h"
#include "nsIScriptGlobalObject.h"
#include "nsNetCID.h"
#include "nsICache.h"
#include "nsICacheService.h"
#include "nsICacheSession.h"
#include "nsIOfflineCacheUpdate.h"
#include "nsIScriptSecurityManager.h"
#include "nsIDOMLoadStatus.h"
#include "nsICookieService.h"
#include "nsIPrompt.h"
@ -94,6 +92,7 @@
#include "nsIDOMNode.h"
#include "nsThreadUtils.h"
#include "nsPresShellIterator.h"
#include "nsPIDOMWindow.h"
PRLogModuleInfo* gContentSinkLogModuleInfo;
@ -684,11 +683,6 @@ nsContentSink::ProcessLink(nsIContent* aElement,
PrefetchHref(aHref, aElement, hasPrefetch);
}
// fetch href into the offline cache if relation is "offline-resource"
if (linkTypes.IndexOf(NS_LITERAL_STRING("offline-resource")) != -1) {
AddOfflineResource(aHref, aElement);
}
// is it a stylesheet link?
if (linkTypes.IndexOf(NS_LITERAL_STRING("stylesheet")) == -1) {
return NS_OK;
@ -820,64 +814,62 @@ nsContentSink::PrefetchHref(const nsAString &aHref,
}
}
nsresult
nsContentSink::AddOfflineResource(const nsAString &aHref, nsIContent *aSource)
void
nsContentSink::ProcessOfflineManifest(nsIContent *aElement)
{
PRBool match;
nsresult rv;
// Check for a manifest= attribute.
nsAutoString manifestSpec;
aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::manifest, manifestSpec);
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(mDocumentURI);
if (!innerURI)
return NS_ERROR_FAILURE;
if (!mHaveOfflineResources) {
mHaveOfflineResources = PR_TRUE;
// only let http and https urls add offline resources
nsresult rv = innerURI->SchemeIs("http", &match);
NS_ENSURE_SUCCESS(rv, rv);
if (!match) {
rv = innerURI->SchemeIs("https", &match);
NS_ENSURE_SUCCESS(rv, rv);
if (!match)
return NS_OK;
}
// create updater
mOfflineCacheUpdate =
do_CreateInstance(NS_OFFLINECACHEUPDATE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString ownerDomain;
rv = innerURI->GetHostPort(ownerDomain);
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString ownerSpec;
rv = mDocumentURI->GetSpec(ownerSpec);
NS_ENSURE_SUCCESS(rv, rv);
rv = mOfflineCacheUpdate->Init(PR_FALSE, ownerDomain,
ownerSpec, mDocumentURI);
NS_ENSURE_SUCCESS(rv, rv);
// Kick off this update when the document is done loading
nsCOMPtr<nsIDOMDocument> doc = do_QueryInterface(mDocument);
mOfflineCacheUpdate->ScheduleOnDocumentStop(doc);
if (manifestSpec.IsEmpty() ||
manifestSpec.FindChar('#') != kNotFound) {
return;
}
if (!mOfflineCacheUpdate) return NS_OK;
// We only care about manifests in toplevel windows.
nsCOMPtr<nsPIDOMWindow> pwindow =
do_QueryInterface(mDocument->GetScriptGlobalObject());
if (!pwindow) {
return;
}
const nsACString &charset = mDocument->GetDocumentCharacterSet();
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), aHref,
charset.IsEmpty() ? nsnull : PromiseFlatCString(charset).get(),
mDocumentBaseURI);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMWindow> window =
do_QueryInterface(pwindow->GetOuterWindow());
if (!window) {
return;
}
nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aSource);
nsCOMPtr<nsIDOMWindow> parent;
window->GetParent(getter_AddRefs(parent));
if (parent.get() != window.get()) {
return;
}
return mOfflineCacheUpdate->AddURI(uri, domNode);
// Only update if the document has permission to use offline APIs.
if (!nsContentUtils::OfflineAppAllowed(mDocumentURI)) {
return;
}
nsCOMPtr<nsIURI> manifestURI;
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(manifestURI),
manifestSpec, mDocument,
mDocumentURI);
if (!manifestURI) {
return;
}
// Documents must list a manifest from the same origin
nsresult rv = nsContentUtils::GetSecurityManager()->
CheckSameOriginURI(manifestURI, mDocumentURI, PR_TRUE);
if (NS_FAILED(rv)) {
return;
}
// Start the update
nsCOMPtr<nsIDOMDocument> domdoc = do_QueryInterface(mDocument);
nsCOMPtr<nsIOfflineCacheUpdateService> updateService =
do_GetService(NS_OFFLINECACHEUPDATESERVICE_CONTRACTID);
updateService->ScheduleOnDocumentStop(manifestURI, mDocumentURI, domdoc);
}
void

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

@ -75,7 +75,6 @@ class nsIContent;
class nsIViewManager;
class nsNodeInfoManager;
class nsScriptLoader;
class nsIOfflineCacheUpdate;
#ifdef NS_DEBUG
@ -169,7 +168,7 @@ protected:
void PrefetchHref(const nsAString &aHref, nsIContent *aSource,
PRBool aExplicit);
nsresult AddOfflineResource(const nsAString &aHref, nsIContent *aSource);
void ProcessOfflineManifest(nsIContent *aElement);
void ScrollToRef();
nsresult RefreshIfEnabled(nsIViewManager* vm);
@ -260,9 +259,6 @@ protected:
// Do we notify based on time?
PRPackedBool mNotifyOnTimer;
// For saving <link rel="offline-resource"> links
nsCOMPtr<nsIOfflineCacheUpdate> mOfflineCacheUpdate;
// Have we already called BeginUpdate for this set of content changes?
PRUint8 mBeganUpdate : 1;
PRUint8 mLayoutStarted : 1;
@ -275,8 +271,6 @@ protected:
PRUint8 mChangeScrollPosWhenScrollingToRef : 1;
// If true, we deferred starting layout until sheets load
PRUint8 mDeferredLayoutStart : 1;
// true if an <link rel="offline-resource"> nodes have been encountered.
PRUint8 mHaveOfflineResources : 1;
// If true, we deferred notifications until sheets load
PRUint8 mDeferredFlushTags : 1;

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

@ -145,6 +145,7 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID);
#include "nsIDOMNSUIEvent.h"
#include "nsIDOMNSEvent.h"
#include "nsIPrivateDOMEvent.h"
#include "nsIPermissionManager.h"
#ifdef IBMBIDI
#include "nsIBidiKeyboard.h"
@ -675,6 +676,82 @@ nsContentUtils::IsPunctuationMark(PRUnichar aChar)
return CCMAP_HAS_CHAR(gPuncCharsCCMap, aChar);
}
/* static */
void
nsContentUtils::GetOfflineAppManifest(nsIDOMWindow *aWindow, nsIURI **aURI)
{
nsCOMPtr<nsIDOMWindow> top;
aWindow->GetTop(getter_AddRefs(top));
if (!top) {
return;
}
nsCOMPtr<nsIDOMDocument> topDOMDocument;
top->GetDocument(getter_AddRefs(topDOMDocument));
nsCOMPtr<nsIDocument> topDoc = do_QueryInterface(topDOMDocument);
if (!topDoc) {
return;
}
nsCOMPtr<nsIContent> docElement = topDoc->GetRootContent();
if (!docElement) {
return;
}
nsAutoString manifestSpec;
docElement->GetAttr(kNameSpaceID_None, nsGkAtoms::manifest, manifestSpec);
// Manifest URIs can't have fragment identifiers.
if (manifestSpec.IsEmpty() ||
manifestSpec.FindChar('#') != kNotFound) {
return;
}
nsContentUtils::NewURIWithDocumentCharset(aURI, manifestSpec,
topDoc, topDoc->GetBaseURI());
}
/* static */
PRBool
nsContentUtils::OfflineAppAllowed(nsIURI *aURI)
{
nsCOMPtr<nsIURI> innerURI = NS_GetInnermostURI(aURI);
if (!innerURI)
return PR_FALSE;
// only http and https applications can use offline APIs.
PRBool match;
nsresult rv = innerURI->SchemeIs("http", &match);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
if (!match) {
rv = innerURI->SchemeIs("https", &match);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
if (!match) {
return PR_FALSE;
}
}
nsCOMPtr<nsIPermissionManager> permissionManager =
do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
if (!permissionManager) {
return PR_FALSE;
}
PRUint32 perm;
permissionManager->TestExactPermission(innerURI, "offline-app", &perm);
if (perm == nsIPermissionManager::UNKNOWN_ACTION) {
return GetBoolPref("offline-apps.allow_by_default");
}
if (perm == nsIPermissionManager::DENY_ACTION) {
return PR_FALSE;
}
return PR_TRUE;
}
// static
void
nsContentUtils::Shutdown()
@ -2669,8 +2746,8 @@ nsContentUtils::NotifyXPCIfExceptionPending(JSContext* aCx)
return;
}
nsCOMPtr<nsIXPCNativeCallContext> nccx;
XPConnect()->GetCurrentNativeCallContext(getter_AddRefs(nccx));
nsAXPCNativeCallContext *nccx = nsnull;
XPConnect()->GetCurrentNativeCallContext(&nccx);
if (nccx) {
// Check to make sure that the JSContext that nccx will mess with is the
// same as the JSContext we've set an exception on. If they're not the

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

@ -490,10 +490,10 @@ nsDOMParser::Init()
{
AttemptedInitMarker marker(&mAttemptedInit);
nsCOMPtr<nsIXPCNativeCallContext> ncc;
nsAXPCNativeCallContext *ncc = nsnull;
nsresult rv = nsContentUtils::XPConnect()->
GetCurrentNativeCallContext(getter_AddRefs(ncc));
GetCurrentNativeCallContext(&ncc);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(ncc, NS_ERROR_UNEXPECTED);

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

@ -719,16 +719,16 @@ nsNSElementTearoff::GetElementsByClassName(const nsAString& aClasses,
static nsPoint
GetOffsetFromInitialContainingBlock(nsIFrame* aFrame)
{
nsIFrame* rootFrame = aFrame->PresContext()->FrameManager()->GetRootFrame();
nsPoint pt(0,0);
for (nsIFrame* p = aFrame; p != rootFrame; p = p->GetParent()) {
// coordinates of elements inside a foreignobject are relative to the top-left
// of the nearest foreignobject
if (p->IsFrameOfType(nsIFrame::eSVGForeignObject) && p != aFrame)
return pt;
pt += p->GetPosition();
}
return pt;
nsIFrame* refFrame = aFrame->GetParent();
if (!refFrame)
return nsPoint(0, 0);
// get the nearest enclosing SVG foreign object frame or the root frame
while (refFrame->GetParent() &&
!refFrame->IsFrameOfType(nsIFrame::eSVGForeignObject))
refFrame = refFrame->GetParent();
return aFrame->GetOffsetTo(refFrame);
}
static double

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

@ -476,6 +476,7 @@ GK_ATOM(lowest, "lowest")
GK_ATOM(lowsrc, "lowsrc")
GK_ATOM(ltr, "ltr")
GK_ATOM(map, "map")
GK_ATOM(manifest, "manifest")
GK_ATOM(marginheight, "marginheight")
GK_ATOM(marginwidth, "marginwidth")
GK_ATOM(marquee, "marquee")

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

@ -0,0 +1,98 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set tw=80 expandtab softtabstop=2 ts=2 sw=2: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mats Palmgren <mats.palmgren@bredband.net>
* Daniel Kraft <d@domob.eu>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsMappedAttributeElement.h"
#include "nsIDocument.h"
nsresult
nsMappedAttributeElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers)
{
nsresult rv = nsMappedAttributeElementBase::BindToTree(aDocument, aParent,
aBindingParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
// If we're in a document now, let our mapped attrs know what their new
// sheet is.
nsHTMLStyleSheet* sheet = aDocument->GetAttributeStyleSheet();
if (sheet) {
mAttrsAndChildren.SetMappedAttrStyleSheet(sheet);
}
}
return rv;
}
nsresult
nsMappedAttributeElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
{
mAttrsAndChildren.WalkMappedAttributeStyleRules(aRuleWalker);
return NS_OK;
}
PRBool
nsMappedAttributeElement::SetMappedAttribute(nsIDocument* aDocument,
nsIAtom* aName,
nsAttrValue& aValue,
nsresult* aRetval)
{
NS_PRECONDITION(aDocument == GetCurrentDoc(), "Unexpected document");
nsHTMLStyleSheet* sheet = aDocument ?
aDocument->GetAttributeStyleSheet() : nsnull;
*aRetval = mAttrsAndChildren.SetAndTakeMappedAttr(aName, aValue,
this, sheet);
return PR_TRUE;
}
nsMapRuleToAttributesFunc
nsMappedAttributeElement::GetAttributeMappingFunction() const
{
return &MapNoAttributesInto;
}
void
nsMappedAttributeElement::MapNoAttributesInto(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
}

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

@ -0,0 +1,84 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set tw=80 expandtab softtabstop=2 ts=2 sw=2: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Daniel Kraft <d@domob.eu>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/**
* nsMappedAttributeElement is the base for elements supporting style mapped
* attributes via nsMappedAttributes (HTML and MathML).
*/
#ifndef NS_MAPPEDATTRIBUTEELEMENT_H_
#define NS_MAPPEDATTRIBUTEELEMENT_H_
#include "nsStyledElement.h"
class nsMappedAttributes;
struct nsRuleData;
typedef void (*nsMapRuleToAttributesFunc)(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
typedef nsStyledElement nsMappedAttributeElementBase;
class nsMappedAttributeElement : public nsMappedAttributeElementBase
{
protected:
nsMappedAttributeElement(nsINodeInfo *aNodeInfo)
: nsMappedAttributeElementBase(aNodeInfo)
{}
public:
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers);
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
static void MapNoAttributesInto(const nsMappedAttributes* aAttributes,
nsRuleData* aRuleData);
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
virtual PRBool SetMappedAttribute(nsIDocument* aDocument,
nsIAtom* aName,
nsAttrValue& aValue,
nsresult* aRetval);
};
#endif // NS_MAPPEDATTRIBUTEELEMENT_H_

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

@ -45,7 +45,7 @@
#define nsMappedAttributes_h___
#include "nsAttrAndChildArray.h"
#include "nsGenericHTMLElement.h"
#include "nsMappedAttributeElement.h"
#include "nsIStyleRule.h"
class nsIAtom;

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

@ -628,9 +628,9 @@ nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
context->SetProcessingScriptTag(oldProcessingScriptTag);
if (stid == nsIProgrammingLanguage::JAVASCRIPT) {
nsCOMPtr<nsIXPCNativeCallContext> ncc;
nsAXPCNativeCallContext *ncc = nsnull;
nsContentUtils::XPConnect()->
GetCurrentNativeCallContext(getter_AddRefs(ncc));
GetCurrentNativeCallContext(&ncc);
if (ncc) {
NS_ASSERTION(!::JS_IsExceptionPending(cx),

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

@ -1373,10 +1373,10 @@ nsXMLHttpRequest::Open(const nsACString& method, const nsACString& url)
PRBool async = PR_TRUE;
nsAutoString user, password;
nsCOMPtr<nsIXPCNativeCallContext> cc;
nsAXPCNativeCallContext *cc = nsnull;
nsIXPConnect *xpc = nsContentUtils::XPConnect();
if (xpc) {
rv = xpc->GetCurrentNativeCallContext(getter_AddRefs(cc));
rv = xpc->GetCurrentNativeCallContext(&cc);
}
if (NS_SUCCEEDED(rv) && cc) {

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

@ -56,6 +56,7 @@ _TEST_FILES = test_bug5141.html \
test_bug308484.html \
test_bug311681.xml \
test_bug322317.html \
test_bug330925.xhtml \
test_bug337631.html \
test_bug338541.xhtml \
test_bug338679.html \

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

@ -0,0 +1,74 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=330925
-->
<head>
<title>Test for Bug 330925</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<style type="text/css">
#t {
-moz-binding: url(#randomxbl);
}
</style>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="randomxbl" inheritstyle="false">
<content>
xbl textnode1
<div>
xbl textnode2
<children xmlns="http://www.mozilla.org/xbl"/>
</div>
</content>
</binding>
</bindings>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=330925">Mozilla Bug 330925</a>
<p id="display">
<div id="t" />
</p>
<pre id="test">
<script class="testbody" type="text/javascript">
<![CDATA[
/** Test for Bug 330925 **/
// We have to wait until onload because XBL doesn't bind immediately.
SimpleTest.waitForExplicitFinish();
addLoadEvent(init);
function init()
{
var t = document.getElementById("t");
is(document.getBindingParent(document.getAnonymousNodes(t)[0]),
t,
"Wrong binding parent for anonymous node");
is(document.getBindingParent(document.getAnonymousNodes(t)[1].childNodes[0]),
t,
"Wrong binding parent for child of anonymous node");
is(document.getBindingParent(t),
null,
"Non-anonymous node should not have a binding parent");
is(document.getBindingParent(document.documentElement),
null,
"Document element should not have a binding parent");
SimpleTest.finish();
}
]]>
</script>
</pre>
</body>
</html>

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

@ -1853,9 +1853,9 @@ nsCanvasRenderingContext2D::DrawImage()
{
nsresult rv;
nsCOMPtr<nsIXPCNativeCallContext> ncc;
nsAXPCNativeCallContext *ncc = nsnull;
rv = nsContentUtils::XPConnect()->
GetCurrentNativeCallContext(getter_AddRefs(ncc));
GetCurrentNativeCallContext(&ncc);
NS_ENSURE_SUCCESS(rv, rv);
if (!ncc)
@ -2379,9 +2379,9 @@ nsCanvasRenderingContext2D::GetImageData()
return NS_ERROR_DOM_SECURITY_ERR;
}
nsCOMPtr<nsIXPCNativeCallContext> ncc;
nsAXPCNativeCallContext *ncc = nsnull;
nsresult rv = nsContentUtils::XPConnect()->
GetCurrentNativeCallContext(getter_AddRefs(ncc));
GetCurrentNativeCallContext(&ncc);
NS_ENSURE_SUCCESS(rv, rv);
if (!ncc)
@ -2504,9 +2504,9 @@ nsCanvasRenderingContext2D::PutImageData()
{
nsresult rv;
nsCOMPtr<nsIXPCNativeCallContext> ncc;
nsAXPCNativeCallContext *ncc = nsnull;
rv = nsContentUtils::XPConnect()->
GetCurrentNativeCallContext(getter_AddRefs(ncc));
GetCurrentNativeCallContext(&ncc);
NS_ENSURE_SUCCESS(rv, rv);
if (!ncc)

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

@ -215,5 +215,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIEventStateManager, NS_IEVENTSTATEMANAGER_IID)
// Content is of a type that gecko can't handle
#define NS_EVENT_STATE_TYPE_UNSUPPORTED \
0x00400000
#ifdef MOZ_MATHML
#define NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL 0x00800000
#endif
#endif // nsIEventStateManager_h__

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

@ -1051,7 +1051,6 @@ nsFSTextPlain::GetEncodedSubmission(nsIURI* aURI,
mimeStream->SetAddContentLength(PR_TRUE);
mimeStream->SetData(bodyStream);
CallQueryInterface(mimeStream, aPostDataStream);
NS_ADDREF(*aPostDataStream);
}
return rv;

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

@ -1146,13 +1146,6 @@ nsGenericHTMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
htmlDocument->ChangeContentEditableCount(this, +1);
}
}
// If we're in a document now, let our mapped attrs know what their new
// sheet is.
nsHTMLStyleSheet* sheet = aDocument->GetAttributeStyleSheet();
if (sheet) {
mAttrsAndChildren.SetMappedAttrStyleSheet(sheet);
}
}
return rv;
@ -1435,13 +1428,6 @@ nsGenericHTMLElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
aNotify);
}
nsresult
nsGenericHTMLElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
{
mAttrsAndChildren.WalkMappedAttributeStyleRules(aRuleWalker);
return NS_OK;
}
already_AddRefed<nsIURI>
nsGenericHTMLElement::GetBaseURI() const
{
@ -1540,22 +1526,6 @@ nsGenericHTMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
return FindAttributeDependence(aAttribute, map, NS_ARRAY_LENGTH(map));
}
PRBool
nsGenericHTMLElement::SetMappedAttribute(nsIDocument* aDocument,
nsIAtom* aName,
nsAttrValue& aValue,
nsresult* aRetval)
{
NS_PRECONDITION(aDocument == GetCurrentDoc(), "Unexpected document");
nsHTMLStyleSheet* sheet = aDocument ?
aDocument->GetAttributeStyleSheet() : nsnull;
*aRetval = mAttrsAndChildren.SetAndTakeMappedAttr(aName, aValue,
this, sheet);
return PR_TRUE;
}
nsMapRuleToAttributesFunc
nsGenericHTMLElement::GetAttributeMappingFunction() const
{

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