From 4a59db2f704fb4d89fbbdced2ff83cd1d35cf479 Mon Sep 17 00:00:00 2001 From: "sspitzer%mozilla.org" Date: Tue, 6 Nov 2007 08:43:55 +0000 Subject: [PATCH] backing out my fix for bug #399664, due to 2% Ts regression (see bug #402668 for details) git-svn-id: svn://10.0.0.236/trunk@238575 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/app/profile/firefox.js | 1 - mozilla/browser/base/content/browser.css | 4 - mozilla/browser/base/content/browser.xul | 10 +- .../browser/base/content/urlbarBindings.xml | 64 +- .../themes/pinstripe/browser/browser.css | 22 +- .../themes/winstripe/browser/browser.css | 20 +- .../public/nsIAutoCompleteController.idl | 6 +- .../public/nsIAutoCompleteInput.idl | 8 +- .../src/nsAutoCompleteController.cpp | 9 +- .../components/places/src/nsNavHistory.cpp | 12 +- .../satchel/src/nsFormFillController.cpp | 13 + .../toolkit/content/widgets/autocomplete.xml | 689 ++++-------------- mozilla/toolkit/content/xul.css | 12 - .../themes/pinstripe/global/autocomplete.css | 63 -- .../themes/winstripe/global/autocomplete.css | 63 -- 15 files changed, 198 insertions(+), 798 deletions(-) diff --git a/mozilla/browser/app/profile/firefox.js b/mozilla/browser/app/profile/firefox.js index 7e660afbd88..94c3d402f7d 100644 --- a/mozilla/browser/app/profile/firefox.js +++ b/mozilla/browser/app/profile/firefox.js @@ -200,7 +200,6 @@ pref("browser.urlbar.doubleClickSelectsAll", false); #endif pref("browser.urlbar.autoFill", false); pref("browser.urlbar.matchOnlyTyped", false); -pref("browser.urlbar.maxResults", 50); pref("browser.download.useDownloadDir", true); pref("browser.download.folderList", 0); diff --git a/mozilla/browser/base/content/browser.css b/mozilla/browser/base/content/browser.css index b204a9feeaf..ed16a4032b4 100644 --- a/mozilla/browser/base/content/browser.css +++ b/mozilla/browser/base/content/browser.css @@ -11,10 +11,6 @@ searchbar { -moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-result-popup"); } -#PopupAutoCompleteRichResult { - -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"); diff --git a/mozilla/browser/base/content/browser.xul b/mozilla/browser/base/content/browser.xul index 15cb2feaa5b..117dbedeaf3 100644 --- a/mozilla/browser/base/content/browser.xul +++ b/mozilla/browser/base/content/browser.xul @@ -99,12 +99,8 @@ onclick="checkForMiddleClick(this, event);"/> - - - - @@ -254,10 +250,12 @@ - - - - - - - 0 - - - - - - - - - - - - + ]]> diff --git a/mozilla/browser/themes/pinstripe/browser/browser.css b/mozilla/browser/themes/pinstripe/browser/browser.css index 9af20a3af55..211fb132857 100755 --- a/mozilla/browser/themes/pinstripe/browser/browser.css +++ b/mozilla/browser/themes/pinstripe/browser/browser.css @@ -869,12 +869,6 @@ toolbar[iconsize="small"] #paste-button:hover:active { display: none; } -/* Keep the URL bar LTR */ - -#PopupAutoCompleteRichResult { - direction: ltr !important; -} - /* ----- PAGE PROXY ICON ----- */ #page-proxy-deck, @@ -920,15 +914,19 @@ statusbarpanel#statusbar-display { height: 16px; } -.ac-result-type-tag { - list-style-image: url("chrome://browser/skin/places/tag.png"); - width: 16px; +#treecolAutoCompleteImage { + max-width : 36px; +} + +.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteImage) { + list-style-image: url("chrome://browser/skin/places/pageStarred.png"); + width: 16px; height: 16px; } -.ac-result-type-bookmark { - list-style-image: url("chrome://browser/skin/places/pageStarred.png"); - width: 16px; +.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) { + list-style-image: url("chrome://browser/skin/places/tag.png"); + width: 16px; height: 16px; } diff --git a/mozilla/browser/themes/winstripe/browser/browser.css b/mozilla/browser/themes/winstripe/browser/browser.css index 97e2c51d3f2..4e8f2beec8b 100644 --- a/mozilla/browser/themes/winstripe/browser/browser.css +++ b/mozilla/browser/themes/winstripe/browser/browser.css @@ -905,10 +905,6 @@ toolbar[iconsize="small"] #paste-button:not([disabled="true"]):hover:active { direction: ltr; } -#PopupAutoCompleteRichResult { - direction: ltr !important; -} - /* ::::: page proxy icon ::::: */ #page-proxy-deck, @@ -953,15 +949,19 @@ statusbarpanel#statusbar-display { height: 16px; } -.ac-result-type-tag { - list-style-image: url("chrome://browser/skin/places/tag.png"); - width: 16px; +#treecolAutoCompleteImage { + max-width : 36px; +} + +.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteImage) { + list-style-image: url("chrome://browser/skin/places/pageStarred.png"); + width: 16px; height: 16px; } -.ac-result-type-bookmark { - list-style-image: url("chrome://browser/skin/places/pageStarred.png"); - width: 16px; +.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) { + list-style-image: url("chrome://browser/skin/places/tag.png"); + width: 16px; height: 16px; } diff --git a/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteController.idl b/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteController.idl index 6a68ece1ad1..dabf7259867 100644 --- a/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteController.idl +++ b/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteController.idl @@ -41,7 +41,7 @@ interface nsIAutoCompleteInput; -[scriptable, uuid(b8883380-8cb3-444b-b929-0872b1cb7e73)] +[scriptable, uuid(bb4d04f6-997b-437a-9216-7a3dbbd848d0)] interface nsIAutoCompleteController : nsISupports { /* @@ -148,7 +148,7 @@ interface nsIAutoCompleteController : nsISupports AString getImageAt(in long index); /* - * Get / set the current search string. Note, setting will not start searching + * Set the current search string, but don't start searching */ - attribute AString searchString; + void setSearchString(in AString aSearchString); }; diff --git a/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteInput.idl b/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteInput.idl index 1b986f7d155..97ba504b63c 100644 --- a/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteInput.idl +++ b/mozilla/toolkit/components/autocomplete/public/nsIAutoCompleteInput.idl @@ -40,7 +40,7 @@ interface nsIAutoCompletePopup; -[scriptable, uuid(916aa9a0-e049-4ef9-a6dc-ff2f9f0f210b)] +[scriptable, uuid(8a5918dc-89ba-4bd0-934c-90e9c21568b8)] interface nsIAutoCompleteInput : nsISupports { /* @@ -98,6 +98,12 @@ interface nsIAutoCompleteInput : nsISupports */ attribute boolean showCommentColumn; + /* + * Option to show a third column in the popup which contains + * an additional image for each autocomplete result + */ + attribute boolean showImageColumn; + /* * Number of milliseconds after a keystroke before a search begins */ diff --git a/mozilla/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp b/mozilla/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp index 75a7d828da4..a1836ae5328 100644 --- a/mozilla/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp +++ b/mozilla/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp @@ -628,17 +628,10 @@ NS_IMETHODIMP nsAutoCompleteController::SetSearchString(const nsAString &aSearchString) { mSearchString = aSearchString; + return NS_OK; } -NS_IMETHODIMP -nsAutoCompleteController::GetSearchString(nsAString &aSearchString) -{ - aSearchString = mSearchString; - return NS_OK; -} - - //////////////////////////////////////////////////////////////////////// //// nsIAutoCompleteObserver diff --git a/mozilla/toolkit/components/places/src/nsNavHistory.cpp b/mozilla/toolkit/components/places/src/nsNavHistory.cpp index 563d1c16790..3a837e3773c 100644 --- a/mozilla/toolkit/components/places/src/nsNavHistory.cpp +++ b/mozilla/toolkit/components/places/src/nsNavHistory.cpp @@ -118,12 +118,12 @@ // should not normally be required. #define DEFAULT_DB_CACHE_PERCENTAGE 6 -// We set the default database page size to be larger. sqlite's default is 1K. -// This gives good performance when many small parts of the file have to be -// loaded for each statement. Because we try to keep large chunks of the file -// in memory, a larger page size should give better I/O performance. 32K is -// sqlite's default max page size. -#define DEFAULT_DB_PAGE_SIZE 4096 +// We set the default database page size to be larger. sqlite's default is 1K. +// This gives good performance when many small parts of the file have to be +// loaded for each statement. Because we try to keep large chunks of the file +// in memory, a larger page size should give better I/O performance. 32K is +// sqlite's default max page size. +#define DEFAULT_DB_PAGE_SIZE 4096 // the value of mLastNow expires every 3 seconds #define HISTORY_EXPIRE_NOW_TIMEOUT (3 * PR_MSEC_PER_SEC) diff --git a/mozilla/toolkit/components/satchel/src/nsFormFillController.cpp b/mozilla/toolkit/components/satchel/src/nsFormFillController.cpp index eb4d6a55694..5af5d2f134d 100644 --- a/mozilla/toolkit/components/satchel/src/nsFormFillController.cpp +++ b/mozilla/toolkit/components/satchel/src/nsFormFillController.cpp @@ -313,6 +313,19 @@ nsFormFillController::SetMaxRows(PRUint32 aMaxRows) return NS_OK; } +NS_IMETHODIMP +nsFormFillController::GetShowImageColumn(PRBool *aShowImageColumn) +{ + *aShowImageColumn = PR_FALSE; + return NS_OK; +} + +NS_IMETHODIMP nsFormFillController::SetShowImageColumn(PRBool aShowImageColumn) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + + NS_IMETHODIMP nsFormFillController::GetShowCommentColumn(PRBool *aShowCommentColumn) { diff --git a/mozilla/toolkit/content/widgets/autocomplete.xml b/mozilla/toolkit/content/widgets/autocomplete.xml index 736208e01a5..5d38813693d 100644 --- a/mozilla/toolkit/content/widgets/autocomplete.xml +++ b/mozilla/toolkit/content/widgets/autocomplete.xml @@ -67,7 +67,7 @@ - + @@ -81,7 +81,7 @@ false null false - + document.getAnonymousElementByAttribute(this, "anonid", "input"); @@ -120,7 +120,7 @@ popup.mInput = this; popup; ]]> - + + + @@ -165,10 +169,10 @@ - - 14 - + 14 + + onget="return true;" /> - + @@ -350,7 +354,7 @@ this.mController.startSearch(""); ]]> - + - - + - + - + @@ -529,51 +532,24 @@ + + + null + false + false + false - - false + - - - - - + - - - - - - + - - - - - - + @@ -590,32 +566,8 @@ ]]> - - - - - + @@ -625,8 +577,9 @@ this.mInput = aInput; this.view = aInput.controller.QueryInterface(Components.interfaces.nsITreeView); this.invalidate(); - + this.showCommentColumn = this.mInput.showCommentColumn; + this.showImageColumn = this.mInput.showImageColumn; document.popupNode = null; @@ -640,6 +593,17 @@ ]]> + + + + - - - - - - null - false - - - - - - - - - - - - - - - @@ -734,13 +667,89 @@ -1 - - - + ]]> + + + + + + + + + + + + + + + + + + + + + + + + @@ -772,6 +781,7 @@ controller.handleEnter(); ]]> + @@ -799,401 +809,6 @@ - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - 100 ? width : 100); - // invalidate() depends on the width attribute - this.invalidate(); - - this.openPopup(aElement, "after_start", 0, 0, false, false); - this.popupBoxObject.setConsumeRollupEvent(this.mInput.consumeRollupEvent); - } - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - document.getAnonymousElementByAttribute(this, "anonid", "richlistbox"); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = (aDescriptionElement.boxObject.x + aDescriptionElement.boxObject.width)) - aEllipsis.value = ""; - else - aEllipsis.value = "\u2026"; - ]]> - - - - - - - - - - - - - - - - - @@ -1203,53 +818,11 @@ - - - Date.now() - - - - - - - - 30) { - var item = event.target; - - while (item && item.localName != "richlistitem") - item = item.parentNode; - - if (!item) - return; - - var rc = this.getIndexOfItem(item); - if (rc != this.selectedIndex) - this.selectedIndex = rc; - - this.mLastMoveTime = Date.now(); - } - ]]> - - - - - Date.now() + new Date() - + @@ -1260,11 +833,11 @@ ]]> 30) { + if (new Date() - this.mLastMoveTime > 30) { var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY); if (rc != this.parentNode.currentIndex) this.parentNode.view.selection.select(rc); - this.mLastMoveTime = Date.now(); + this.mLastMoveTime = new Date(); } ]]> @@ -1288,7 +861,7 @@ ]]> - + richlistitem[selected="true"] { - background-color: Highlight; - color: HighlightText; -} - -.autocomplete-richlistitem { - overflow: hidden; - padding: 1px 0px 1px 2px; -} - -.ac-site-icon { - width: 16px; - height: 16px; -} - -.ac-type-icon { - width: 16px; - height: 16px; -} - -.ac-ellipsis-before { - margin: 2px -2px 0px 2px !important; - padding: 0; - min-width: 1.1em; -} - -.ac-ellipsis-between { - margin: 2px 0px 0px 0px !important; - -moz-padding-end: 8px; - min-width: 2em; -} - -.ac-ellipsis-after { - margin: 2px 0px 0px 0px !important; - padding: 0; - min-width: 1.1em ; -} - -.ac-normal-text { - margin: 2px 0px 0px 0px !important; - padding: 0; -} - -.ac-emphasize-text { - margin: 0 !important; - padding: 0; - font-weight: bold; -} - -.ac-title, .ac-url { - overflow: hidden; -} - /* ::::: textboxes inside toolbarpaletteitems ::::: */ toolbarpaletteitem > toolbaritem > textbox > hbox > hbox > html|*.textbox-input { diff --git a/mozilla/toolkit/themes/winstripe/global/autocomplete.css b/mozilla/toolkit/themes/winstripe/global/autocomplete.css index f06d8df0792..a94dddada2a 100644 --- a/mozilla/toolkit/themes/winstripe/global/autocomplete.css +++ b/mozilla/toolkit/themes/winstripe/global/autocomplete.css @@ -168,7 +168,6 @@ textbox[chromedir="rtl"] .autocomplete-history-dropmarker { /* ::::: autocomplete popups ::::: */ panel[type="autocomplete"], -panel[type="autocomplete-richlistbox"], .autocomplete-history-popup { -moz-appearance: none; border-width: 1px; @@ -211,68 +210,6 @@ treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) { color: HighlightText !important; } -/* ::::: richlistbox autocomplete ::::: */ - -.autocomplete-richlistbox { - -moz-appearance: none !important; - margin: 0; - border: none !important; - background-color: transparent !important; -} - -.autocomplete-richlistbox > richlistitem[selected="true"] { - background-color: Highlight; - color: HighlightText; -} - -.autocomplete-richlistitem { - overflow: hidden; - padding: 1px 0px 1px 2px; -} - -.ac-site-icon { - width: 16px; - height: 16px; -} - -.ac-type-icon { - width: 16px; - height: 16px; -} - -.ac-ellipsis-before { - margin: 2px -2px 0px 2px !important; - padding: 0; - min-width: 1em; -} - -.ac-ellipsis-between { - margin: 2px 0px 0px 0px !important; - -moz-padding-end: 8px; - min-width: 2em; -} - -.ac-ellipsis-after { - margin: 2px 0px 0px 0px !important; - padding: 0; - min-width: 1em; -} - -.ac-normal-text { - margin: 2px 0px 0px 0px !important; - padding: 0; -} - -.ac-emphasize-text { - margin: 0 !important; - padding: 0; - font-weight: bold; -} - -.ac-title, .ac-url { - overflow: hidden; -} - /* ::::: textboxes inside toolbarpaletteitems ::::: */ toolbarpaletteitem > toolbaritem > textbox > hbox > hbox > html|*.textbox-input {