Make storage form history use Mork if available
This commit is contained in:
brettw%gmail.com 2006-05-30 22:36:16 +00:00
Родитель c372e44071
Коммит 479ce9f7f6
2 изменённых файлов: 8 добавлений и 14 удалений

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

@ -67,6 +67,8 @@ REQUIRES = \
unicharutil \
intl \
pref \
storage \
morkreader \
windowwatcher \
toolkitcomps \
$(NULL)
@ -74,18 +76,12 @@ REQUIRES = \
CPPSRCS = nsFormFillController.cpp \
$(NULL)
ifdef MOZ_STORAGE
REQUIRES += storage
ifdef MOZ_PLACES
CPPSRCS += nsStorageFormHistory.cpp
ifdef MOZ_MORKREADER
REQUIRES += morkreader
endif
else # MOZ_STORAGE
ifdef MOZ_MORK
else
REQUIRES += mork
CPPSRCS += nsFormHistory.cpp
endif
endif # MOZ_STORAGE
LOCAL_INCLUDES = \
-I$(srcdir)/../../passwordmgr/base \

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

@ -39,10 +39,10 @@
#include "nsFormFillController.h"
#ifdef MOZ_STORAGE
#ifdef MOZ_PLACES
#include "nsStorageFormHistory.h"
#include "nsIAutoCompleteSimpleResult.h"
#elif defined(MOZ_MORK)
#else
#include "nsFormHistory.h"
#include "nsIAutoCompleteResultTypes.h"
#endif
@ -466,14 +466,12 @@ nsFormFillController::StartSearch(const nsAString &aSearchString, const nsAStrin
{
nsCOMPtr<nsIAutoCompleteResult> result;
#ifdef MOZ_STORAGE
#ifdef MOZ_PLACES
// This assumes that FormHistory uses nsIAutoCompleteSimpleResult,
// while PasswordManager does not.
nsCOMPtr<nsIAutoCompleteSimpleResult> historyResult;
#elif defined(MOZ_MORK)
nsCOMPtr<nsIAutoCompleteMdbResult2> historyResult;
#else
#error either mozstorage or mork must be compiled
nsCOMPtr<nsIAutoCompleteMdbResult2> historyResult;
#endif
historyResult = do_QueryInterface(aPreviousResult);