diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-10 23:09:26 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 14:47:16 +0200 |
commit | ddaee7c1be914cc28a28cbe27e5922215b3b2e6f (patch) | |
tree | cb8930a9ba1ed0ef574b7c2be9035b1a51201902 /toolkit | |
parent | c030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff) | |
download | uxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz |
Issue #1830 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/components/moz.build | 3 | ||||
-rw-r--r-- | toolkit/components/places/nsNavHistory.cpp | 29 | ||||
-rw-r--r-- | toolkit/components/places/nsNavHistory.h | 4 |
3 files changed, 5 insertions, 31 deletions
diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index ba695a3c21..1770c8aa67 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -75,8 +75,7 @@ if CONFIG['BUILD_CTYPES']: if CONFIG['MOZ_FEEDS']: DIRS += ['feeds'] -if CONFIG['MOZ_XUL']: - DIRS += ['autocomplete', 'satchel'] +DIRS += ['autocomplete', 'satchel'] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: DIRS += ['filepicker'] diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp index bdd39b28e1..cf4edc6331 100644 --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -38,10 +38,8 @@ #include "mozilla/Preferences.h" #include <algorithm> -#ifdef MOZ_XUL #include "nsIAutoCompleteInput.h" #include "nsIAutoCompletePopup.h" -#endif using namespace mozilla; using namespace mozilla::places; @@ -126,9 +124,7 @@ using namespace mozilla::places; #define RECENT_EVENTS_INITIAL_CACHE_LENGTH 64 // Observed topics. -#ifdef MOZ_XUL #define TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING "autocomplete-will-enter-text" -#endif #define TOPIC_IDLE_DAILY "idle-daily" #define TOPIC_PREF_CHANGED "nsPref:changed" #define TOPIC_PROFILE_TEARDOWN "profile-change-teardown" @@ -319,9 +315,7 @@ nsNavHistory::Init() if (obsSvc) { (void)obsSvc->AddObserver(this, TOPIC_PLACES_CONNECTION_CLOSED, true); (void)obsSvc->AddObserver(this, TOPIC_IDLE_DAILY, true); -#ifdef MOZ_XUL (void)obsSvc->AddObserver(this, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING, true); -#endif } // Don't add code that can fail here! Do it up above, before we add our @@ -2997,17 +2991,12 @@ nsNavHistory::Observe(nsISupports *aSubject, const char *aTopic, // These notifications are used by tests to simulate a Places shutdown. // They should just be forwarded to the Database handle. mDB->Observe(aSubject, aTopic, aData); - } - - else if (strcmp(aTopic, TOPIC_PLACES_CONNECTION_CLOSED) == 0) { + } else if (strcmp(aTopic, TOPIC_PLACES_CONNECTION_CLOSED) == 0) { // Don't even try to notify observers from this point on, the category // cache would init services that could try to use our APIs. mCanNotify = false; mObservers.Clear(); - } - -#ifdef MOZ_XUL - else if (strcmp(aTopic, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING) == 0) { + } else if (strcmp(aTopic, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING) == 0) { nsCOMPtr<nsIAutoCompleteInput> input = do_QueryInterface(aSubject); if (!input) return NS_OK; @@ -3045,14 +3034,9 @@ nsNavHistory::Observe(nsISupports *aSubject, const char *aTopic, rv = AutoCompleteFeedback(selectedIndex, controller); NS_ENSURE_SUCCESS(rv, rv); - } - -#endif - else if (strcmp(aTopic, TOPIC_PREF_CHANGED) == 0) { + } else if (strcmp(aTopic, TOPIC_PREF_CHANGED) == 0) { LoadPrefs(); - } - - else if (strcmp(aTopic, TOPIC_IDLE_DAILY) == 0) { + } else if (strcmp(aTopic, TOPIC_IDLE_DAILY) == 0) { (void)DecayFrecency(); } @@ -4426,8 +4410,6 @@ nsNavHistory::FixInvalidFrecencies() } -#ifdef MOZ_XUL - nsresult nsNavHistory::AutoCompleteFeedback(int32_t aIndex, nsIAutoCompleteController *aController) @@ -4465,9 +4447,6 @@ nsNavHistory::AutoCompleteFeedback(int32_t aIndex, return NS_OK; } -#endif - - nsICollation * nsNavHistory::GetCollation() { diff --git a/toolkit/components/places/nsNavHistory.h b/toolkit/components/places/nsNavHistory.h index ed5272ce01..c6e1133ff0 100644 --- a/toolkit/components/places/nsNavHistory.h +++ b/toolkit/components/places/nsNavHistory.h @@ -44,10 +44,8 @@ // If you typed it more than this time ago, it's not recent. #define RECENT_EVENT_THRESHOLD PRTime((int64_t)15 * 60 * PR_USEC_PER_SEC) -#ifdef MOZ_XUL // Fired after autocomplete feedback has been updated. #define TOPIC_AUTOCOMPLETE_FEEDBACK_UPDATED "places-autocomplete-feedback-updated" -#endif // Fired after frecency has been updated. #define TOPIC_FRECENCY_UPDATED "places-frecency-updated" @@ -591,10 +589,8 @@ protected: const nsACString& url); void ExpireNonrecentEvents(RecentEventHash* hashTable); -#ifdef MOZ_XUL nsresult AutoCompleteFeedback(int32_t aIndex, nsIAutoCompleteController *aController); -#endif // Whether history is enabled or not. // Will mimic value of the places.history.enabled preference. |