From 3e8b78d4b944a09a2f667bc8fee907438cc0330a Mon Sep 17 00:00:00 2001 From: "ben%bengoodger.com" Date: Sun, 16 May 2004 18:16:49 +0000 Subject: [PATCH] bring across trunk changs (EM, etc) git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@156441 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/Makefile.in | 3 + mozilla/allmakefiles.sh | 5 +- .../Resources/English.lproj/InfoPlist.strings | Bin 292 -> 274 bytes mozilla/browser/app/profile/Makefile.in | 2 +- mozilla/browser/app/profile/bookmarks.html | 6 +- mozilla/browser/app/profile/firefox.js | 40 +- mozilla/browser/app/splash.rc | 10 +- .../browser/base/content/browser-menubar.inc | 7 + mozilla/browser/base/content/browser-sets.inc | 11 +- mozilla/browser/base/content/browser.css | 7 +- mozilla/browser/base/content/browser.js | 11 +- mozilla/browser/base/content/browser.xul | 1 + .../browser/base/content/contentAreaUtils.js | 8 +- mozilla/browser/base/locale/region.properties | 7 +- mozilla/browser/base/skin/jar.mn | 1 + mozilla/browser/base/skin/mac/jar.mn | 2 +- .../bookmarks/content/addBookmark.js | 4 +- .../bookmarks/content/addBookmark2.js | 9 +- .../components/bookmarks/content/bookmarks.js | 8 +- .../bookmarks/public/nsIBookmarksService.idl | 8 +- .../src/nsBookmarkProtocolHandler.js | 2 +- .../bookmarks/src/nsBookmarksService.cpp | 41 +- .../migration/src/nsIEProfileMigrator.cpp | 5 +- .../migration/src/nsOperaProfileMigrator.cpp | 2 + .../prefwindow/content/pref-advanced.js | 354 +-- .../prefwindow/content/pref-advanced.xul | 162 +- .../prefwindow/locale/pref-advanced.dtd | 16 + .../shell/src/nsWindowsShellService.cpp | 6 + mozilla/browser/extensions/Makefile.in | 2 + .../browser/installer/unix/packages-static | 4 +- mozilla/browser/installer/windows/browser.jst | 5 + .../browser/installer/windows/packages-static | 8 + mozilla/chrome/src/nsChromeRegistry.cpp | 165 +- .../content/base/public/nsIChromeRegistry.idl | 59 +- .../branding/firefox/Makefile.in | 41 +- .../other-licenses/branding/firefox/about.png | Bin 42959 -> 0 bytes .../branding/firefox/aboutCredits.png | Bin 16826 -> 0 bytes .../branding/firefox/aboutFooter.png | Bin 764 -> 0 bytes .../branding/firefox/alert-exclam.png | Bin 7549 -> 0 bytes .../branding/firefox/firefox-os2.ico | Bin 7824 -> 16 bytes mozilla/themes/Makefile.in | 44 +- mozilla/toolkit/content/widgets/expander.xml | 2 +- .../toolkit/content/widgets/tabbrowser.xml | 30 +- mozilla/toolkit/mozapps/Makefile.in | 2 +- .../mozapps/extensions/content/about.js | 14 +- .../mozapps/extensions/content/extensions.css | 55 +- .../mozapps/extensions/content/extensions.js | 462 ++- .../mozapps/extensions/content/extensions.xml | 333 +- .../mozapps/extensions/content/extensions.xul | 211 +- .../mozapps/extensions/content/update.js | 55 +- .../mozapps/extensions/content/update.xul | 9 +- .../mozapps/extensions/locale/extensions.dtd | 19 + .../extensions/locale/extensions.properties | 21 +- .../mozapps/extensions/locale/update.dtd | 2 +- .../extensions/public/nsIExtensionManager.idl | 53 +- .../extensions/service/VersionCheck.java | 72 +- .../mozapps/extensions/skin/extensions.css | 65 +- .../extensions/src/nsExtensionManager.js.in | 2803 +++++++++++++++-- mozilla/toolkit/mozapps/jar.mn | 105 +- .../mozapps/shared/content/richview.xml | 11 +- .../xpinstall/content/xpinstallConfirm.css | 7 + .../xpinstall/content/xpinstallConfirm.xul | 2 +- mozilla/toolkit/skin/win/contents.rdf | 8 +- mozilla/toolkit/xre/nsNativeAppSupportWin.cpp | 2 - mozilla/xpfe/Makefile.in | 53 +- mozilla/xpfe/components/Makefile.in | 76 +- mozilla/xpfe/components/build/Makefile.in | 70 +- mozilla/xpfe/components/build/nsModule.cpp | 36 +- mozilla/xpinstall/Makefile.in | 58 +- 69 files changed, 4633 insertions(+), 1069 deletions(-) delete mode 100644 mozilla/other-licenses/branding/firefox/about.png delete mode 100644 mozilla/other-licenses/branding/firefox/aboutCredits.png delete mode 100644 mozilla/other-licenses/branding/firefox/aboutFooter.png delete mode 100644 mozilla/other-licenses/branding/firefox/alert-exclam.png diff --git a/mozilla/Makefile.in b/mozilla/Makefile.in index 618a441460a..b21c2e3494c 100644 --- a/mozilla/Makefile.in +++ b/mozilla/Makefile.in @@ -325,6 +325,9 @@ endif # MOZ_COMPONENTLIB ifdef MOZ_PHOENIX tier_99_dirs += browser xpfe/bootstrap/init.d +ifdef MOZ_USE_OFFICIAL_BRANDING +tier_99_dirs += other-licenses/branding/firefox/content +endif endif ifdef MOZ_THUNDERBIRD diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh index c148ddfe5d2..12bb9f202b3 100755 --- a/mozilla/allmakefiles.sh +++ b/mozilla/allmakefiles.sh @@ -849,7 +849,10 @@ extensions/typeaheadfind/Makefile if [ "$MOZ_USE_OFFICIAL_BRANDING" ]; then if [ "$MOZ_PHOENIX" ]; then - MAKEFILES_firefox_branding="other-licenses/branding/firefox/Makefile" + MAKEFILES_firefox_branding=" + other-licenses/branding/firefox/Makefile + other-licenses/branding/firefox/content/Makefile + " fi if [ "$MOZ_THUNDERBIRD" ]; then MAKEFILES_thunderbird_branding="other-licenses/branding/thunderbird/Makefile" diff --git a/mozilla/browser/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings b/mozilla/browser/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings index c33486cd4d63b9f9e913228f124cf8bc9078f6d9..de14414e5d95e1457d1ed1df510d14608a83cf07 100644 GIT binary patch delta 29 kcmZ3&G>K_KEw39xCPNWJDnlAWK10RCIq8fhlUW!Q0C~s@~ delta 75 zcmbQlw1jCwt-LQoK0_5lCPNMoCNd~6xB=Nk45->z diff --git a/mozilla/browser/app/profile/Makefile.in b/mozilla/browser/app/profile/Makefile.in index ac2801f8042..27efe0e625d 100644 --- a/mozilla/browser/app/profile/Makefile.in +++ b/mozilla/browser/app/profile/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = chrome +DIRS = chrome extensions include $(topsrcdir)/config/rules.mk diff --git a/mozilla/browser/app/profile/bookmarks.html b/mozilla/browser/app/profile/bookmarks.html index 478abd7c235..749da8bec72 100644 --- a/mozilla/browser/app/profile/bookmarks.html +++ b/mozilla/browser/app/profile/bookmarks.html @@ -36,13 +36,13 @@ Do Not Edit! -->

Using Firefox Quick Searches
Learn how to create and use Firefox custom keywords and quick searches -
Google Quicksearch +
Google Quicksearch
Type "google <search term>" in the addressbar to perform a Google search -
I'm Feeling Lucky Quicksearch +
I'm Feeling Lucky Quicksearch
Type "goto <term>" in the addressbar to visit Google's top listing for that term
Dictionary.com Quicksearch
Type "dict <word>" in the addressbar to perform a dictionary look-up -
Stock Symbol Quicksearch +
Stock Symbol Quicksearch
Type "quot <symbol>" in the addressbar to perform a stock symbol look-up


diff --git a/mozilla/browser/app/profile/firefox.js b/mozilla/browser/app/profile/firefox.js index 48b3c666a05..e1b8a67cb89 100644 --- a/mozilla/browser/app/profile/firefox.js +++ b/mozilla/browser/app/profile/firefox.js @@ -44,11 +44,45 @@ pref("general.startup.browser", true); pref("browser.chromeURL","chrome://browser/content/"); pref("browser.hiddenWindowChromeURL", "chrome://browser/content/hiddenWindow.xul"); pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul"); -pref("xpinstall.dialog.progress", "chrome://mozapps/content/downloads/downloads.xul"); -pref("xpinstall.dialog.progress.type", "Download:Manager"); +pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul?type=themes"); +pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul?type=extensions"); +pref("xpinstall.dialog.progress.type.skin", "Extension:Manager-themes"); +pref("xpinstall.dialog.progress.type.chrome", "Extension:Manager-extensions"); + +// This is this application's unique identifier used by the Extension System to identify +// this application as an extension target, and by the SmartUpdate system to identify +// this application to the Update server. +pref("app.id", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"); +pref("app.version", +#expand __APP_VERSION__ +); + +pref("update.app.enabled", true); +pref("update.app.url", "chrome://mozapps/locale/update/update.properties"); +pref("update.app.updateVersion", ""); +pref("update.app.updateDescription", ""); +pref("update.app.updateURL", ""); +pref("update.extensions.enabled", true); +pref("update.extensions.wsdl", "chrome://mozapps/locale/extensions/extensions.properties"); +pref("extensions.getMoreExtensionsURL", "chrome://mozapps/locale/extensions/extensions.properties"); +pref("extensions.getMoreThemesURL", "chrome://mozapps/locale/extensions/extensions.properties"); +// Automatically download and install updates to themes and extensions. +pref("update.extensions.autoUpdate", false); + +pref("update.interval", 604800000); // every 7 days +pref("update.lastUpdateDate", 0); // UTC offset when last update was performed. + +// These prefs relate to the number and severity of updates available. This is a +// cache that the browser notification mechanism uses to determine if it should show +// status bar UI if updates are detected and the app is shut down before installing +// them. +// 0 = low (extension/theme updates), 1 = medium (app minor version), 2 = high (major version) +pref("update.severity", 0); +// The number of extension/theme/etc updates available +pref("update.extensions.count", 0); pref("keyword.enabled", true); -pref("keyword.URL", "http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q="); +pref("keyword.URL", "http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&sourceid=mozilla-search&q="); pref("general.useragent.locale", "chrome://global/locale/intl.properties"); pref("general.useragent.contentlocale", "chrome://browser-region/locale/region.properties"); diff --git a/mozilla/browser/app/splash.rc b/mozilla/browser/app/splash.rc index cbd0d97648b..391d62d80bc 100644 --- a/mozilla/browser/app/splash.rc +++ b/mozilla/browser/app/splash.rc @@ -41,9 +41,9 @@ 1 24 "firefox.exe.manifest" -IDI_APPICON ICON "firefox.ico" -IDI_DOCUMENT ICON "document.ico" -IDI_APPLICATION ICON "firefox.ico" +IDI_APPICON ICON FIREFOX_ICO +IDI_DOCUMENT ICON DOCUMENT_ICO +IDI_APPLICATION ICON FIREFOX_ICO STRINGTABLE DISCARDABLE BEGIN @@ -51,8 +51,8 @@ BEGIN ID_DDE_APPLICATION_NAME, "Firefox Debug" IDS_STARTMENU_APPNAME, "Firefox Debug" #else - ID_DDE_APPLICATION_NAME, "Firefox" - IDS_STARTMENU_APPNAME, "Firefox" + ID_DDE_APPLICATION_NAME, "Firefox Debug" + IDS_STARTMENU_APPNAME, "Firefox Debug" #endif END diff --git a/mozilla/browser/base/content/browser-menubar.inc b/mozilla/browser/base/content/browser-menubar.inc index 4b7b53deb43..96bdae7a48f 100644 --- a/mozilla/browser/base/content/browser-menubar.inc +++ b/mozilla/browser/base/content/browser-menubar.inc @@ -296,8 +296,15 @@ + + + + - + + + + #ifdef XP_MACOSX @@ -174,12 +177,12 @@ modifiers="alt"/> #ifdef XP_UNIX #ifndef XP_MACOSX - + #else - + #endif #else - + #endif diff --git a/mozilla/browser/base/content/browser.css b/mozilla/browser/base/content/browser.css index c6946f7e1b6..5418858e5dd 100644 --- a/mozilla/browser/base/content/browser.css +++ b/mozilla/browser/base/content/browser.css @@ -10,4 +10,9 @@ toolbar[printpreview="true"] { #search-proxy-button { -moz-binding: url("chrome://browser/content/search.xml#searchBarDropMarker"); -} \ No newline at end of file +} + +#statusbar-updates { + -moz-binding: url("chrome://mozapps/content/update/updates.xml#updateStatusbarNotification"); +} + diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 4781059f4a0..05afb8c5425 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -4466,13 +4466,12 @@ function BrowserOpenExtensions(aOpenMode) var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); - var lastEM = wm.getMostRecentWindow(EMTYPE); - var needToOpen = true; - var windows = wm.getEnumerator(EMTYPE); + var windowType = EMTYPE + "-" + aOpenMode; + var windows = wm.getEnumerator(windowType); while (windows.hasMoreElements()) { var theEM = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindowInternal); - if (theEM.gWindowType == aOpenMode) { + if (theEM.document.documentElement.getAttribute("windowtype") == windowType) { theEM.focus(); needToOpen = false; break; @@ -4480,9 +4479,9 @@ function BrowserOpenExtensions(aOpenMode) } if (needToOpen) { - const EMURL = "chrome://mozapps/content/extensions/extensions.xul"; + const EMURL = "chrome://mozapps/content/extensions/extensions.xul?type=" + aOpenMode; const EMFEATURES = "chrome,dialog=no,resizable"; - window.openDialog(EMURL, "", EMFEATURES, aOpenMode); + window.openDialog(EMURL, "", EMFEATURES); } } diff --git a/mozilla/browser/base/content/browser.xul b/mozilla/browser/base/content/browser.xul index 90b111b5014..fbd5debd610 100644 --- a/mozilla/browser/base/content/browser.xul +++ b/mozilla/browser/base/content/browser.xul @@ -414,6 +414,7 @@ + diff --git a/mozilla/browser/base/content/contentAreaUtils.js b/mozilla/browser/base/content/contentAreaUtils.js index 6b3c162b4e9..1854c41ae92 100644 --- a/mozilla/browser/base/content/contentAreaUtils.js +++ b/mozilla/browser/base/content/contentAreaUtils.js @@ -3,7 +3,7 @@ * area. **/ -function openNewTabWith(href, linkNode, event, securityCheck) +function openNewTabWith(href, linkNode, event, securityCheck, postData) { if (securityCheck) urlSecurityCheck(href, document); @@ -33,7 +33,7 @@ function openNewTabWith(href, linkNode, event, securityCheck) // open link in new tab var browser = top.document.getElementById("content"); - var theTab = browser.addTab(href, getReferrer(document), originCharset); + var theTab = browser.addTab(href, getReferrer(document), originCharset, postData); if (!loadInBackground) browser.selectedTab = theTab; @@ -41,7 +41,7 @@ function openNewTabWith(href, linkNode, event, securityCheck) markLinkVisited(href, linkNode); } -function openNewWindowWith(href, linkNode, securityCheck) +function openNewWindowWith(href, linkNode, securityCheck, postData) { if (securityCheck) urlSecurityCheck(href, document); @@ -55,7 +55,7 @@ function openNewWindowWith(href, linkNode, securityCheck) charsetArg = "charset=" + window._content.document.characterSet; var referrer = getReferrer(document); - window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", href, charsetArg, referrer); + window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", href, charsetArg, referrer, postData); if (linkNode) markLinkVisited(href, linkNode); diff --git a/mozilla/browser/base/locale/region.properties b/mozilla/browser/base/locale/region.properties index 7bd9c02f3ad..71a38e25e0b 100644 --- a/mozilla/browser/base/locale/region.properties +++ b/mozilla/browser/base/locale/region.properties @@ -13,16 +13,13 @@ otherSearchURL=http://home.netscape.com/bookmark/6_0/tsearch.html # firefox.js browser.startup.homepage=http://www.mozilla.org/products/firefox/start/ browser.throbber.url=http://www.mozilla.org/products/firefox/start/ -browser.search.defaulturl=http://www.google.com/search?lr=&ie=UTF-8&oe=UTF-8&q= - -wallet.Server=http://www.mozilla.org/wallet/tables/ -wallet.Samples=http://www.mozilla.org/wallet/samples/ +browser.search.defaulturl=http://www.google.com/search?lr=&sourceid=mozilla-search&ie=UTF-8&oe=UTF-8&q= #config.js startup.homepage_override_url=http://www.mozilla.org/products/firefox/start/ # search-panel.properties -defaultSearchURL=http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q= +defaultSearchURL=http://www.google.com/search?hl=en&sourceid=mozilla-search&lr=&ie=UTF-8&oe=UTF-8&q= browser.search.defaultenginename=Google # update notifications: new update page diff --git a/mozilla/browser/base/skin/jar.mn b/mozilla/browser/base/skin/jar.mn index 5ab715511d9..dd690801b01 100644 --- a/mozilla/browser/base/skin/jar.mn +++ b/mozilla/browser/base/skin/jar.mn @@ -19,3 +19,4 @@ classic.jar: skin/classic/browser/Throbber-small.gif skin/classic/browser/Toolbar-small.png skin/classic/browser/Toolbar.png + icon.png diff --git a/mozilla/browser/base/skin/mac/jar.mn b/mozilla/browser/base/skin/mac/jar.mn index dc981787a34..c6a6ba11101 100644 --- a/mozilla/browser/base/skin/mac/jar.mn +++ b/mozilla/browser/base/skin/mac/jar.mn @@ -33,4 +33,4 @@ classic.jar: skin/classic/browser/downloads/downloadmanager.css (downloads/downloadmanager.css) skin/classic/browser/pref/Options.png (pref/Options.png) skin/classic/browser/pref/pref.css (pref/pref.css) - + icon.png diff --git a/mozilla/browser/components/bookmarks/content/addBookmark.js b/mozilla/browser/components/bookmarks/content/addBookmark.js index 1d16019e710..f70596ce456 100644 --- a/mozilla/browser/components/bookmarks/content/addBookmark.js +++ b/mozilla/browser/components/bookmarks/content/addBookmark.js @@ -250,11 +250,11 @@ function onOK() for (var i = 0; i < groups.length; ++i) { url = getNormalizedURL(groups[i].url); BMDS.createBookmarkInContainer(groups[i].name, url, null, null, - groups[i].charset, rSource, -1); + groups[i].charset, null, rSource, -1); } } else { url = getNormalizedURL(gFld_URL.value); - rSource = BMDS.createBookmark(gFld_Name.value, url, null, null, gBookmarkCharset, false); + rSource = BMDS.createBookmark(gFld_Name.value, url, null, null, gBookmarkCharset, false, ""); if (window.arguments.length > 4 && window.arguments[4] == "newBookmark") { window.arguments[5].newBookmark = rSource; } diff --git a/mozilla/browser/components/bookmarks/content/addBookmark2.js b/mozilla/browser/components/bookmarks/content/addBookmark2.js index 0f6312e8219..4db887f9224 100644 --- a/mozilla/browser/components/bookmarks/content/addBookmark2.js +++ b/mozilla/browser/components/bookmarks/content/addBookmark2.js @@ -78,6 +78,9 @@ * visible. * window.arguments[8]: Whether or not a keyword is required to add * the bookmark. + * window.arguments[9]: PostData to be saved with this bookmark, + * in the format a string of name=value pairs + * separated by CRLFs. */ var gSelectedFolder; @@ -91,6 +94,7 @@ var gGroup; var gKeywordRequired; var gSuggestedKeyword; var gRequiredFields = []; +var gPostData; # on windows, sizeToContent is buggy (see bug 227951), we''ll use resizeTo # instead and cache the bookmarks tree view size. @@ -121,6 +125,7 @@ function Startup() onFieldInput(); gSelectedFolder = RDF.GetResource(gMenulist.selectedItem.id); gExpander.setAttribute("tooltiptext", gExpander.getAttribute("tooltiptextdown")); + gPostData = window.arguments[9]; # read the persisted attribute. If it is not present, set a default height. WSucks = parseInt(gBookmarksTree.getAttribute("height")); @@ -165,11 +170,11 @@ function onOK() for (var i = 0; i < groups.length; ++i) { url = getNormalizedURL(groups[i].url); BMDS.createBookmarkInContainer(groups[i].name, url, gKeyword.value, null, - groups[i].charset, rSource, -1); + groups[i].charset, gPostData, rSource, -1); } } else { url = getNormalizedURL(window.arguments[1]); - rSource = BMDS.createBookmark(gName.value, url, gKeyword.value, null, window.arguments[3]); + rSource = BMDS.createBookmark(gName.value, url, gKeyword.value, null, window.arguments[3], gPostData); } var selection = BookmarksUtils.getSelectionFromResource(rSource); diff --git a/mozilla/browser/components/bookmarks/content/bookmarks.js b/mozilla/browser/components/bookmarks/content/bookmarks.js index 34278ee40d1..e58960995bb 100644 --- a/mozilla/browser/components/bookmarks/content/bookmarks.js +++ b/mozilla/browser/components/bookmarks/content/bookmarks.js @@ -480,7 +480,7 @@ var BookmarksCommand = { items = data.substring(0, ix != -1 ? ix : data.length); name = data.substring(ix); // XXX: we should infer the best charset - BookmarksUtils.createBookmark(null, items, null, name); + BookmarksUtils.createBookmark(null, items, null, name, null); items = [items]; break; default: @@ -644,7 +644,7 @@ var BookmarksCommand = { createNewBookmark: function (aTarget) { var name = BookmarksUtils.getLocaleString("ile_newbookmark"); - var resource = BMSVC.createBookmark(name, "", "", "", ""); + var resource = BMSVC.createBookmark(name, "", "", "", "", null); this.createNewResource(resource, aTarget, "newbookmark"); }, @@ -1295,7 +1295,7 @@ var BookmarksUtils = { break; case "text/x-moz-url": case "text/unicode": - rSource = BookmarksUtils.createBookmark(null, uri, null, extra); + rSource = BookmarksUtils.createBookmark(null, uri, null, extra, null); parent = null; break; } @@ -1347,7 +1347,7 @@ var BookmarksUtils = { if (fw) aCharSet = fw.document.characterSet; } - return BMSVC.createBookmark(aName, aURL, null, null, aCharSet); + return BMSVC.createBookmark(aName, aURL, null, null, aCharSet, null); }, flushDataSource: function () diff --git a/mozilla/browser/components/bookmarks/public/nsIBookmarksService.idl b/mozilla/browser/components/bookmarks/public/nsIBookmarksService.idl index 963fc220016..45cdf8f53fc 100644 --- a/mozilla/browser/components/bookmarks/public/nsIBookmarksService.idl +++ b/mozilla/browser/components/bookmarks/public/nsIBookmarksService.idl @@ -65,12 +65,14 @@ interface nsIBookmarksService : nsISupports in wstring aURL, in wstring aShortcutURL, in wstring aDescription, - in wstring aDocCharSet); + in wstring aDocCharSet, + in wstring aPostData); nsIRDFResource createBookmarkInContainer(in wstring aName, in wstring aURL, in wstring aShortcutURL, in wstring aDescription, - in wstring aDocCharSet, + in wstring aDocCharSet, + in wstring aPostData, in nsIRDFResource aFolder, in long aIndex); @@ -88,7 +90,7 @@ interface nsIBookmarksService : nsISupports void updateLastVisitedDate(in string aURL, in wstring docCharset); - string resolveKeyword(in wstring aName); + string resolveKeyword(in wstring aName, out wstring aPostData); void importSystemBookmarks(in nsIRDFResource aParentFolder); diff --git a/mozilla/browser/components/bookmarks/src/nsBookmarkProtocolHandler.js b/mozilla/browser/components/bookmarks/src/nsBookmarkProtocolHandler.js index e6d9a6af709..4123f3c05ab 100644 --- a/mozilla/browser/components/bookmarks/src/nsBookmarkProtocolHandler.js +++ b/mozilla/browser/components/bookmarks/src/nsBookmarkProtocolHandler.js @@ -207,7 +207,7 @@ nsBookmarkContentHandler.prototype = { var root = rdf.GetResource("NC:BookmarksRoot"); // Append this bookmark to the end. var bmRes = bms.createBookmarkInContainer(bookmark.name, bookmark.url, bookmark.keyword, - bookmark.description, bookmark.charset, root, -1); + bookmark.description, bookmark.charset, root, -1, ""); dump("*** bookmark =" + bookmark.toSource() + "\n"); var ds = bms.QueryInterface(Components.interfaces.nsIRDFDataSource); if (bookmark.webpanel == "true") { diff --git a/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp index cb484b3d75a..bb933a770f2 100644 --- a/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp +++ b/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp @@ -107,6 +107,7 @@ nsIRDFResource *kNC_BookmarksToolbarFolder; nsIRDFResource *kNC_ShortcutURL; nsIRDFResource *kNC_URL; nsIRDFResource *kNC_WebPanel; +nsIRDFResource *kNC_PostData; nsIRDFResource *kRDF_type; nsIRDFResource *kRDF_nextVal; nsIRDFResource *kWEB_LastModifiedDate; @@ -232,6 +233,8 @@ bm_AddRefGlobals() &kNC_URL); gRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "WebPanel"), &kNC_WebPanel); + gRDF->GetResource(NS_LITERAL_CSTRING(NC_NAMESPACE_URI "PostData"), + &kNC_PostData); gRDF->GetResource(NS_LITERAL_CSTRING(RDF_NAMESPACE_URI "type"), &kRDF_type); gRDF->GetResource(NS_LITERAL_CSTRING(RDF_NAMESPACE_URI "nextVal"), @@ -329,6 +332,7 @@ bm_ReleaseGlobals() NS_IF_RELEASE(kNC_ShortcutURL); NS_IF_RELEASE(kNC_URL); NS_IF_RELEASE(kNC_WebPanel); + NS_IF_RELEASE(kNC_PostData); NS_IF_RELEASE(kRDF_type); NS_IF_RELEASE(kRDF_nextVal); NS_IF_RELEASE(kWEB_LastModifiedDate); @@ -549,6 +553,7 @@ static const char kLastCharsetEquals[] = "LAST_CHARSET=\""; static const char kShortcutURLEquals[] = "SHORTCUTURL=\""; static const char kIconEquals[] = "ICON=\""; static const char kWebPanelEquals[] = "WEB_PANEL=\""; +static const char kPostDataEquals[] = "POST_DATA=\""; static const char kScheduleEquals[] = "SCHEDULE=\""; static const char kLastPingEquals[] = "LAST_PING=\""; static const char kPingETagEquals[] = "PING_ETAG=\""; @@ -1036,6 +1041,7 @@ BookmarkParser::gBookmarkFieldTable[] = { kShortcutURLEquals, NC_NAMESPACE_URI "ShortcutURL", nsnull, BookmarkParser::ParseLiteral, nsnull }, { kIconEquals, NC_NAMESPACE_URI "Icon", nsnull, BookmarkParser::ParseLiteral, nsnull }, { kWebPanelEquals, NC_NAMESPACE_URI "WebPanel", nsnull, BookmarkParser::ParseLiteral, nsnull }, + { kPostDataEquals, NC_NAMESPACE_URI "PostData", nsnull, BookmarkParser::ParseLiteral, nsnull }, { kLastCharsetEquals, WEB_NAMESPACE_URI "LastCharset", nsnull, BookmarkParser::ParseLiteral, nsnull }, { kScheduleEquals, WEB_NAMESPACE_URI "Schedule", nsnull, BookmarkParser::ParseLiteral, nsnull }, { kLastPingEquals, WEB_NAMESPACE_URI "LastPingDate", nsnull, BookmarkParser::ParseDate, nsnull }, @@ -2519,6 +2525,7 @@ nsBookmarksService::CreateBookmark(const PRUnichar* aName, const PRUnichar* aShortcutURL, const PRUnichar* aDescription, const PRUnichar* aDocCharSet, + const PRUnichar* aPostData, nsIRDFResource** aResult) { // Resource: Bookmark ID @@ -2606,6 +2613,17 @@ nsBookmarksService::CreateBookmark(const PRUnichar* aName, return rv; } + // Literal: PostData associated with this bookmark (used for smart keywords) + if (aPostData && *aPostData) { + nsCOMPtr postDataLiteral; + rv = gRDF->GetLiteral(aPostData, getter_AddRefs(postDataLiteral)); + if (NS_FAILED(rv)) + return rv; + rv = mInner->Assert(bookmarkResource, kNC_PostData, postDataLiteral, PR_TRUE); + if (NS_FAILED(rv)) + return rv; + } + *aResult = bookmarkResource; NS_ADDREF(*aResult); @@ -2618,11 +2636,12 @@ nsBookmarksService::CreateBookmarkInContainer(const PRUnichar* aName, const PRUnichar* aShortcutURL, const PRUnichar* aDescription, const PRUnichar* aDocCharSet, + const PRUnichar* aPostData, nsIRDFResource* aParentFolder, PRInt32 aIndex, nsIRDFResource** aResult) { - nsresult rv = CreateBookmark(aName, aURL, aShortcutURL, aDescription, aDocCharSet, aResult); + nsresult rv = CreateBookmark(aName, aURL, aShortcutURL, aDescription, aDocCharSet, aPostData, aResult); if (NS_SUCCEEDED(rv)) rv = InsertResource(*aResult, aParentFolder, aIndex); return rv; @@ -3070,7 +3089,7 @@ nsBookmarksService::UpdateBookmarkLastModifiedDate(nsIRDFResource *aSource) } NS_IMETHODIMP -nsBookmarksService::ResolveKeyword(const PRUnichar *aUserInput, char **aShortcutURL) +nsBookmarksService::ResolveKeyword(const PRUnichar *aUserInput, PRUnichar** aPostData, char **aShortcutURL) { NS_PRECONDITION(aUserInput != nsnull, "null ptr"); if (! aUserInput) @@ -3097,6 +3116,19 @@ nsBookmarksService::ResolveKeyword(const PRUnichar *aUserInput, char **aShortcut return rv; if (source) { + // Get postData + nsCOMPtr node; + GetTarget(source, kNC_PostData, PR_TRUE, getter_AddRefs(node)); + if (node) { + nsCOMPtr postData(do_QueryInterface(node)); + + const PRUnichar* postDataVal = nsnull; + postData->GetValueConst(&postDataVal); + + nsDependentString postDataStr(postDataVal); + *aPostData = ToNewUnicode(postDataStr); + } + nsAutoString url; rv = GetURLFromResource(source, url); if (NS_FAILED(rv)) @@ -4686,6 +4718,10 @@ nsBookmarksService::WriteBookmarksContainer(nsIRDFDataSource *ds, // output kNC_WebPanel rv |= WriteBookmarkProperties(ds, strm, child, kNC_WebPanel, kWebPanelEquals, PR_FALSE); + + // output kNC_PostData + rv |= WriteBookmarkProperties(ds, strm, child, kNC_PostData, + kPostDataEquals, PR_FALSE); // output SCHEDULE rv |= WriteBookmarkProperties(ds, strm, child, kWEB_Schedule, kScheduleEquals, PR_FALSE); @@ -4979,6 +5015,7 @@ nsBookmarksService::CanAccept(nsIRDFResource* aSource, (aProperty == kNC_ShortcutURL) || (aProperty == kNC_URL) || (aProperty == kNC_WebPanel) || + (aProperty == kNC_PostData) || (aProperty == kWEB_LastModifiedDate) || (aProperty == kWEB_LastVisitDate) || (aProperty == kNC_BookmarkAddDate) || diff --git a/mozilla/browser/components/migration/src/nsIEProfileMigrator.cpp b/mozilla/browser/components/migration/src/nsIEProfileMigrator.cpp index e49cfaad990..4fb8eff53ef 100644 --- a/mozilla/browser/components/migration/src/nsIEProfileMigrator.cpp +++ b/mozilla/browser/components/migration/src/nsIEProfileMigrator.cpp @@ -1160,7 +1160,8 @@ nsIEProfileMigrator::CopySmartKeywords(nsIRDFResource* aParentFolder) NS_ConvertASCIItoUTF16(url).get(), keyword.get(), keywordDesc.get(), - NS_LITERAL_STRING("").get(), + nsnull, + nsnull, keywordsFolder, -1, getter_AddRefs(bookmark)); @@ -1287,6 +1288,7 @@ nsIEProfileMigrator::ParseFavoritesFolder(nsIFile* aDirectory, nsnull, nsnull, nsnull, + nsnull, aParentResource, -1, getter_AddRefs(bookmark)); @@ -1357,6 +1359,7 @@ nsIEProfileMigrator::ParseFavoritesFolder(nsIFile* aDirectory, nsnull, nsnull, nsnull, + nsnull, aParentResource, -1, getter_AddRefs(bookmark)); diff --git a/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp b/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp index 390eec43f86..62e97286d28 100644 --- a/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp +++ b/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp @@ -1127,6 +1127,7 @@ nsOperaProfileMigrator::CopySmartKeywords(nsIBookmarksService* aBMS, NS_ConvertUTF8toUTF16(keyword).get(), keywordDesc.get(), nsnull, + nsnull, keywordsFolder, -1, getter_AddRefs(itemRes)); @@ -1281,6 +1282,7 @@ nsOperaProfileMigrator::ParseBookmarksFolder(nsILineInputStream* aStream, keyword.get(), description.get(), nsnull, + nsnull, onToolbar ? aToolbar : aParent, -1, getter_AddRefs(itemRes)); diff --git a/mozilla/browser/components/prefwindow/content/pref-advanced.js b/mozilla/browser/components/prefwindow/content/pref-advanced.js index 9fc8bd2aa7a..569b71ea185 100644 --- a/mozilla/browser/components/prefwindow/content/pref-advanced.js +++ b/mozilla/browser/components/prefwindow/content/pref-advanced.js @@ -1,177 +1,177 @@ -# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is . -# -# The Initial Developer of the Original Code is . -# Portions created by the Initial Developer are Copyright (C) 2004 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -#define PROVISIONAL_SECURITY_UI - -var _elementIDs = ["moveSystemCaret", "hideTabBar", - "loadInBackground", "useAutoScrolling", - "useSmoothScrolling", "enableAutoImageResizing", - "useSSL2", "useSSL3", "useTLS1", "useTypeAheadFind", - "linksOnlyTypeAheadFind", -#ifdef PROVISIONAL_SECURITY_UI - "certSelection", "securityOCSPEnabled", "serviceURL", "signingCA", -#endif - "enableSoftwareInstall", "enableSmartUpdate", - "enableExtensionUpdate", "enableAutoInstall"]; - -#ifdef PROVISIONAL_SECURITY_UI -const nsIX509CertDB = Components.interfaces.nsIX509CertDB; -const nsX509CertDB = "@mozilla.org/security/x509certdb;1"; -const nsIOCSPResponder = Components.interfaces.nsIOCSPResponder; -const nsISupportsArray = Components.interfaces.nsISupportsArray; - -var certdb; -var ocspResponders; -#endif -function Startup() { - updatePrefs(); -#ifdef PROVISIONAL_SECURITY_UI - var ocspEntry; - var i; - - certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB); - ocspResponders = certdb.getOCSPResponders(); - - var signersMenu = document.getElementById("signingCA"); - var signersURL = document.getElementById("serviceURL"); - for (i=0; i - +