diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-27 09:05:25 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-27 09:05:25 +0200 |
commit | fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5 (patch) | |
tree | 7b0e57d393cb08a895973cab2d2072cb2b93a77f /modules | |
parent | 580084e9e1d0355c96a54a9641df6c1fee894948 (diff) | |
parent | e3508f55bed8a463d298021633dbc7d079c9d764 (diff) | |
download | UXP-fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5.tar UXP-fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5.tar.gz UXP-fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5.tar.lz UXP-fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5.tar.xz UXP-fbaab39c94a047f2a0b0bfbe6cf24a790cd7e8b5.zip |
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'modules')
-rw-r--r-- | modules/libmar/src/mar.h | 1 | ||||
-rw-r--r-- | modules/libmar/src/mar_read.c | 22 | ||||
-rw-r--r-- | modules/libpref/init/all.js | 3 |
3 files changed, 21 insertions, 5 deletions
diff --git a/modules/libmar/src/mar.h b/modules/libmar/src/mar.h index 98b454d94..776daf648 100644 --- a/modules/libmar/src/mar.h +++ b/modules/libmar/src/mar.h @@ -48,6 +48,7 @@ typedef struct MarItem_ { struct MarFile_ { FILE *fp; MarItem *item_table[TABLESIZE]; + int item_table_is_valid; }; typedef struct MarFile_ MarFile; diff --git a/modules/libmar/src/mar_read.c b/modules/libmar/src/mar_read.c index 17744cdfc..378eaea88 100644 --- a/modules/libmar/src/mar_read.c +++ b/modules/libmar/src/mar_read.c @@ -114,6 +114,7 @@ static int mar_read_index(MarFile *mar) { uint32_t offset_to_index, size_of_index; /* verify MAR ID */ + fseek(mar->fp, 0, SEEK_SET); if (fread(id, MAR_ID_SIZE, 1, mar->fp) != 1) return -1; if (memcmp(id, MAR_ID, MAR_ID_SIZE) != 0) @@ -160,11 +161,8 @@ static MarFile *mar_fpopen(FILE *fp) } mar->fp = fp; + mar->item_table_is_valid = 0; memset(mar->item_table, 0, sizeof(mar->item_table)); - if (mar_read_index(mar)) { - mar_close(mar); - return NULL; - } return mar; } @@ -490,6 +488,14 @@ const MarItem *mar_find_item(MarFile *mar, const char *name) { uint32_t hash; const MarItem *item; + if (!mar->item_table_is_valid) { + if (mar_read_index(mar)) { + return NULL; + } else { + mar->item_table_is_valid = 1; + } + } + hash = mar_hash_name(name); item = mar->item_table[hash]; @@ -503,6 +509,14 @@ int mar_enum_items(MarFile *mar, MarItemCallback callback, void *closure) { MarItem *item; int i; + if (!mar->item_table_is_valid) { + if (mar_read_index(mar)) { + return -1; + } else { + mar->item_table_is_valid = 1; + } + } + for (i = 0; i < TABLESIZE; ++i) { item = mar->item_table[i]; while (item) { diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 1eee30210..a4834e3ec 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -731,7 +731,7 @@ pref("gfx.perf-warnings.enabled", false); pref("gfx.color_management.mode", 2); pref("gfx.color_management.display_profile", ""); pref("gfx.color_management.rendering_intent", 0); -pref("gfx.color_management.enablev4", false); +pref("gfx.color_management.enablev4", true); pref("gfx.downloadable_fonts.enabled", true); pref("gfx.downloadable_fonts.fallback_delay", 3000); @@ -908,6 +908,7 @@ pref("findbar.highlightAll", false); pref("findbar.modalHighlight", false); pref("findbar.entireword", false); pref("findbar.iteratorTimeout", 100); +pref("findbar.termPerTab", false); // use Mac OS X Appearance panel text smoothing setting when rendering text, disabled by default pref("gfx.use_text_smoothing_setting", false); |