Commit Graph

67 Commits

Author SHA1 Message Date
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Marco Bonardo
ce7e8d741d Bug 1500138 - Remove browser.urlbar.matchBehavior and some unused Address Bar behaviors. r=adw
Remove browser.urlbar.matchBehavior pref. Remove code for BEGINNING behaviors, and stop referencing MATCH_BOUNDARY_ANYWHERE from our code.

Differential Revision: https://phabricator.services.mozilla.com/D9806
2018-10-25 23:23:36 +00:00
Marco Bonardo
16cd544a4f Bug 1500108 - Remove the history.onlyTyped preference and behavior from the Address Bar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D9512
2018-10-24 13:01:42 +00:00
Marco Bonardo
054b2b3fbf Bug 1500053 - Fix missed optimization in autocomplete_match helpers. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D9316
2018-10-20 10:03:42 +00:00
Lina Cambridge
8168ebbb48 Bug 1472963 - Add a totalSyncChanges counter and use it in the bookmarks mirror. r=mak
This patch:

* Exposes a global Sync change counter on `nsINavBookmarksService`.
  This is similar to SQLite's `total_changes()`, but just for changes
  to bookmarks that affect Sync, and accounts for changes from multiple
  threads and connections.
* Adds a SQL function to bump the counter, and extends the
  `moz_bookmarks` triggers to call it.
* Moves merging outside the transaction in the bookmarks mirror, and
  checks that the counters match before applying.

Differential Revision: https://phabricator.services.mozilla.com/D2004
2018-07-13 15:03:40 +00:00
Marco Bonardo
2857abf7de Bug 1464443 - Add a LIMIT to ORDER BY queries in Places. r=standard8
MozReview-Commit-ID: 8VrmgEFd1Za
2018-05-25 17:35:51 +02:00
Marco Bonardo
67caf9a39c Bug 1463132 - New autofill threshold doesn't work well with redirects. r=adw
MozReview-Commit-ID: 9DqCWA2nGnz
2018-05-23 16:49:06 +02:00
Drew Willcoxon
975278327e Bug 1461753 - Add places.sqlite migration for calculating initial frecency stats. r=mak
MozReview-Commit-ID: F7fZiVkLXxW
2018-05-18 22:50:54 -07:00
Drew Willcoxon
7f75804cdb Bug 1239708: Improve awesomebar autofill. Part 4: Frecency stats. r=mak
MozReview-Commit-ID: GD8rglOocBn
2018-05-14 11:27:11 -07:00
Drew Willcoxon
2956900b67 Bug 1239708: Improve awesomebar autofill. Part 1: Core follow-ons. r=mak
MozReview-Commit-ID: 1mfqU6mOyR9
2018-05-14 11:21:47 -07:00
Chris Peterson
5d6b16ea3b Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L
2018-04-28 12:50:58 -07:00
Kit Cambridge
91266ba6f5 Bug 1293445 - 1 - Add a get_query_param SQL function. r=mak
MozReview-Commit-ID: 12r5GyhoYgi
2018-04-03 14:23:09 +02:00
Marco Bonardo
076d488966 Bug 1447929 - Fix a few interface/concrete smart pointers in Places. r=standard8
MozReview-Commit-ID: IEoPxZseoyw
2018-03-22 11:17:58 +01:00
Kit Cambridge
13d9ab0323 Bug 1412142 - Expose PlacesUtils.history.hashURL. r=mak
This patch exposes the Places `hash()` SQL function to JS.

MozReview-Commit-ID: C4Zj4FyMZpq
2017-08-16 16:01:40 -07:00
Kit Cambridge
36c12ac0b0 Bug 1380606 - Add an IS_VALID_GUID() SQL function to Places. r=mak
This exposes `IsValidGUID` to SQL, matching `GENERATE_GUID()` and
making it easier to SELECT rows with invalid GUIDs.

MozReview-Commit-ID: Dspm8A59P5L
2017-10-05 11:32:49 -07:00
Marco Bonardo
c3a2401529 Bug 1399879 - The Places hash SQL function is expensive on large urls. r=adw
This patch limits the amount of chars we hash and avoids some string copies.

MozReview-Commit-ID: AAcLtTzrYlb
2017-09-18 10:31:20 +02:00
Chris Peterson
90bcd3c611 Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: B5Y8KyExPQ8
2017-09-06 15:00:31 -07:00
Simon Lindholm
b9440a31ba Bug 1387780 - Optimize string searching in MatchAutoCompleteFunction. r=adw, r=emk 2017-08-20 17:21:00 -04:00
Simon Lindholm
79bcb3d96d Bug 1387780 - Avoid memory allocations when calling MatchAutoCompleteFunction. r=adw, r=froydnj 2017-08-20 17:19:00 -04:00
Paolo Amadini
4182e1c784 Bug 1364050 - Part 5 - Update obsolete references in code comments. r=mak
MozReview-Commit-ID: 9EUn7vcSfe3
2017-05-05 13:11:49 +01:00
Marco Bonardo
fbfba8faf2 Bug 977177 - Move favicons to a separate store. r=adw
This patch moves favicons blobs to a separate database names favicons.sqlite.
The dabatase is then ATTACHED to the main Places connection, so that its tables
can be used as if they were all part of the same database.
The favicons.database contains 3 tables:
  1. moz_pages_w_icons
     This is the way to join with moz_places, through page_url_hash and page_url.
     We are not using the place id to avoid possible mismatches between places.sqlite
     and favicons.sqlite. This way the database is "portable" and reusable even
     if places.sqlite changes.
  2. moz_icons
     Contains icons payloads, each payload can either be an SVG or a PNG. These
     are the only stored formats, any other format is rescaled and converted to
     PNG. ICO files are split into single frames and stored as multiple PNGs.
     SVG are distinguishable through width == UINT16_MAX
     In future the table will also contain mask-icon color for SVG and average
     color for PNGs.
     The fixed_icon_url_hash is "fixed" to allow quickly fetch root icons, that
     means icons like "domain/favicon.ico" that can also be reused for any page
     under that domain.
  3. moz_icons_to_pages
     This is the relation table between icons and pages.
     Each page can have multiple icons, each icon can be used by multiple pages.
     There is a FOREIGN_KEY constraint between this (child) table and icons
     or pages (parents), so that it's not possible to insert non-existing ids
     in this table, and if an entry is removed from a parent table, the relation
     will be automatically removed from here.
     Note though that removing from the relation table won't remove from the
     parent tables.
Since the relations are now many-many, it's no more possible to simply join
places with the icons table and obtain a single icon, thus it's suggested that
consumers go through the "page-icon" protocol.
The migration process from the old favicons table is async and interruptible,
it will be restarted along with the favicons service until the temp preference
places.favicons.convertPayloads is set to true.


MozReview-Commit-ID: CUCoL9smRyt
2016-11-14 16:22:46 +01:00
Mark Banner
ad6ad043eb Bug 737836 - Improve frecency handling for multiple redirect sequences, and add a test. r=mak
MozReview-Commit-ID: ImJMF5KDvtz
2017-01-18 14:12:58 +00:00
Mark Banner
903e536db0 Bug 737836 - Don't rely on past visits for frecency calcuations for redirects. r=mak
MozReview-Commit-ID: GfgZSInN9Lv
2017-01-18 14:09:09 +00:00
Kit Cambridge
d56e34a294 Bug 1303405 - Ensure RemoveFolderTransaction::UndoTransaction passes the reinserted GUID to observers. r=mak
MozReview-Commit-ID: 5HpDKEmsjRW
2016-09-16 13:22:47 -07:00
Simon Lindholm
f3fa4629a7 Bug 1287277 - Silly micro-optimization. r=mak 2016-07-14 14:10:20 +02:00
Simon Lindholm
e03a524577 Bug 1287277 - Avoid unnecessary string copies in MatchAutoCompleteFunction::fixupURISpec. r=mak 2016-07-14 01:25:46 +02:00
Simon Lindholm
a4b4ee9617 Bug 1287277 - Use AsSharedUTF8String in MatchAutoCompleteFunction. r=mak 2016-07-14 01:26:38 +02:00
Marco Bonardo
8c84a82cf7 Bug 889561 - Reduce the size of places.sqlite by removing the url unique index from moz_places. r=adw
MozReview-Commit-ID: 2kxaXnUYIwT
2016-06-29 14:47:36 +02:00
Carsten "Tomcat" Book
7817a7f352 Backed out changeset ceff61c9fc5a (bug 889561) for frequent testfailures on pgo in /bookmarks/test_ 2016-06-29 13:54:51 +02:00
Marco Bonardo
81cc21d652 Bug 889561 - Reduce the size of places.sqlite by removing the url unique index from moz_places. r=adw
MozReview-Commit-ID: 2kxaXnUYIwT
2016-06-20 13:22:10 +02:00
Marco Bonardo
58865a2fc2 Bug 1209027 - Reduce queries load on visits addition. r=adw
MozReview-Commit-ID: AvW7WB2LXZE
2016-05-31 15:19:16 +02:00
Marco Bonardo
c1bfd3aba5 Bug 1261386 - Avoid history flooding from repeated reloads. r=adw
MozReview-Commit-ID: FhU8nOoNUHb
2016-05-26 17:49:40 +02:00
Marco Bonardo
5f2d11614f Bug 907001 - Location bar is slow with long text runs.r=adw
MozReview-Commit-ID: KIfaGfsm26x
2016-04-28 13:59:24 +02:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Andrew McCreight
222ce9e7f0 Bug 1210517 - Create nsVariant directly rather than via do_CreateInstance(). r=froydnj
The goal here is to leave creation stuff mostly for JS, so we can
convert it entirely over to a non-threadsafe cycle-collected version
without breaking any existing C++ users.

I didn't do this for a remaining use in nsGlobalWindow.h to avoid
including nsVariant.h all over the place.
2015-10-07 08:17:42 -07:00
Marco Bonardo
e9b7d8be2d Bug 1180375 - Avoid the url prediction query in UnifiedComplete. r=adw 2015-07-07 23:12:22 +02:00
Nathan Froyd
023e3d5c3f Bug 1153267 - part 1 - use smart-pointer .forget() instead of NS_ADDREF+assign; r=ehsan 2015-03-31 10:03:49 -04:00
Alex Bardas
52e7d249a3 Bug 530209 - Improve search suggestions ui for locationbar prefs. r=mak 2014-11-12 08:16:00 -05:00
Manu Jain
52a2c0f414 Bug 1065925 - Remove code for expiring Places telemetry probes. r=mak 2014-09-30 08:54:00 +02:00
Benoit Jacob
029e0e533d Bug 1028588 - Fix dangerous public destructors in toolkit/ - r=ehsan 2014-06-23 18:40:02 -04:00
Birunthan Mohanathas
eeb9aaaa94 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Drew Willcoxon
5a25763248 Bug 911307 - Reflect changes to top sites immediately in about:newtab (part 1, Places patch). r=mak 2014-03-28 23:30:04 -07:00
Phil Ringnalda
304bd1a718 Backed out 2 changesets (bug 911307) for frequent timeouts in browser_newtab_perwindow_private_browsing.js
Backed out changeset 70638b7c97f1 (bug 911307)
Backed out changeset 3951f7e82b4c (bug 911307)
2014-03-29 12:13:11 -07:00
Drew Willcoxon
4d07122113 Bug 911307 - Reflect changes to top sites immediately in about:newtab (part 1, Places patch). r=mak 2014-03-28 23:30:04 -07:00
Ehsan Akhgari
860f2c1f29 Bug 969757 - Remove the dead code in our tree which pretends to support OS/2; r=roc,mcmanus,gps,jorendorf,bsmedberg sr=bsmedberg 2014-02-10 17:57:01 -05:00
Joshua Cranmer
4c1f2d0784 Bug 884061 - Part 3v: Use NS_DECL_THREADSAFE_ISUPPORTS in toolkit/, r=Mossop 2013-07-18 21:24:15 -05:00
Josh Matthews
1e7b568eaf Bug 780533 - Add GUIDs to download manager entries, and a faux-async retrieval by GUID. r=paolo
Bug 780533 - Add GUIDs to download manager entries, and a faux-async retrieval by GUID. r=paolo
* * *
Bug 780533 - Interdiff
2012-08-05 23:20:19 -04:00
Jacek Szpot
09f9b9a1c3 Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Jacek Szpot
417ad3e375 Bug 800106: replace some NS_ALWAYS_INLINEs with MOZ_ALWAYS_INLINEs; r=ehsan 2012-10-23 13:31:22 +02:00
Ehsan Akhgari
f9abed15a8 Backout changeset 788a51ef6221 (bug 800106) because of Windows XP Kraken regression 2012-10-22 16:44:09 -04:00