Граф коммитов

82 Коммитов

Автор SHA1 Сообщение Дата
Tim Huang 756cf900c9 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug
--HG--
extra : rebase_source : 22149fd540fd02119afe9fe5c9a815d01cf959c1
2017-02-07 11:49:34 +08:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Thomas Nguyen 0aaea58b69 Bug 1304623 - Create a pref to control the default referrer policy - part 3. r=bkelly
MozReview-Commit-ID: 1A6IHPeNYBQ
2017-01-05 11:29:56 +08:00
Yoshi Huang 2ceecc22f5 Bug 1324115 - Part 2: replace the callers to use C++ helper. r=smaug 2016-12-21 14:59:21 +08:00
Andi-Bogdan Postelnicu ec3eda24ad Bug 1318000 - Use C++11's override and remove virtual where applicable in image/. r=jrmuizel
MozReview-Commit-ID: B0ZIwPnhAIT

--HG--
extra : rebase_source : c1b9408efe2efb301784ef58489d4cb6e0e0d7b1
2016-11-16 17:41:47 +02:00
Andi-Bogdan Postelnicu 0cfd234e69 Bug 1318000 - Replace default bodies of special member functions with = default; in image/. r=jrmuizel
MozReview-Commit-ID: FYzbhclEgyD

--HG--
extra : rebase_source : f9d737670d8c6b963e6c3aff74d8e907b2af45f5
2016-11-16 17:39:43 +02:00
Andi-Bogdan Postelnicu e1f33061ed Bug 1318000 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in image/. r=jrmuizel
MozReview-Commit-ID: DpS7zsWD75j

--HG--
extra : rebase_source : a7f0d1fd49a2d8084d4da6631d466e01df0c8e5e
2016-11-16 17:39:05 +02:00
Ehsan Akhgari 75d4b96af8 Bug 1306800 - Remove support for app theming; r=myk,baku 2016-10-13 13:23:03 -04:00
Tim Huang aeffcdcbe2 Bug 1277803 - Part 3 : Make the image library uses the correct originAttributes and triggering principal when opening a image channel for favicon loading. r=tnikkel 2016-10-13 15:43:57 +08:00
Wes Kocher 2142de26c1 Backed out 8 changesets (bug 1277803) for browser-chrome test failures a=backout
Backed out changeset 477890efdb88 (bug 1277803)
Backed out changeset 49da326bfe68 (bug 1277803)
Backed out changeset 2d17a40a9077 (bug 1277803)
Backed out changeset b1cb0a195ca1 (bug 1277803)
Backed out changeset c7d82459d152 (bug 1277803)
Backed out changeset 3be9a06248af (bug 1277803)
Backed out changeset 8d119ca96999 (bug 1277803)
Backed out changeset be767a6f7ecd (bug 1277803)
2016-10-12 14:26:00 -07:00
Tim Huang 91878c9769 Bug 1277803 - Part 3 : Make the image library uses the correct originAttributes and triggering principal when opening a image channel for favicon loading. r=tnikkel 2016-10-12 17:32:06 +08:00
Andrew Osmond 31ad519348 Bug 1275464 - Part 1. Unregister from handling image memory reports when shutting down. r=njn 2016-09-19 13:29:59 -04:00
James Andreou a47ce92ac2 Bug 1282124 - Remove nsILoadInfo.usePrivateBrowsing and the SEC_FORCE_PRIVATE_BROWSING flag; r=smaug,jryans 2016-09-27 16:56:44 -04:00
Kate McKinley c57d400961 Bug 1246540 - HSTS Priming Proof of Concept. r=ckerschb, r=mayhemer, r=jld, r=smaug, r=dkeeler, r=jmaher, p=ally
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.

MozReview-Commit-ID: ES1JruCtDdX

--HG--
extra : rebase_source : 2ac6c93c49f2862fc0b9e595eb0598cd1ea4bedf
2016-09-27 11:27:00 -04:00
Nicholas Nethercote 3ac8aee67f Bug 1297300 - Add missing checks to GetSpec() calls in image/. r=tnikkel. 2016-08-29 15:34:32 +10:00
Nicholas Nethercote 742fc7eb48 Bug 1297961 (part 1) - Introduce nsURI::GetSpecOrDefault(). r=hurley.
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:

  nsAutoCString spec;
  uri->GetSpec(spec);
  printf("uri: %s", spec.get());

to be changed to this:

  printf("uri: %s", uri->GetSpecOrDefault().get());

This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.

I will fold this into part 1 before landing.

--HG--
extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc
2016-08-26 16:02:31 +10:00
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Seth Fowler 1f92f3a7b9 Bug 1293472 (Part 3) - Store animated images in the surface cache as a sequence of frames, rather than each frame getting its own cache entry. r=dholbert,edwin,njn 2016-08-18 15:42:48 -07:00
Jonathan Hao ea61afe035 Bug 1270680 - Part 1: Double-key the image cache by origin attribute. r=jdm 2016-08-04 20:22:00 +02:00
Yoshi Huang a520e75a4d Bug 1264231 - Part 3: remove loadInfo work-around. r=sicking 2016-08-05 19:44:57 +08:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Daniel Holbert 3996555d1a Bug 1282670, part 3: Make several imagelib .cpp files #inclue their corresponding .h file as their very first #include, per Gecko convention. r=seth
(In some cases, I've left "ImageLogging.h" being included before the corresponding .h file, because I ran across a warning comment saying that it needs to be included before any IPDL-generated files & anything that includes prlog.h; and it seems possible that Foo.cpp's corresponding Foo.h file could include such headers now or in the future.)

MozReview-Commit-ID: HPvUVj8YuKc
2016-06-30 10:27:03 -07:00
Daniel Holbert 17deb8bb7c Bug 1282670, part 2: Remove unnecessary/redundant string-related #include & "using" declarations in imagelib. r=seth
MozReview-Commit-ID: 1hgnUosiOFU
2016-06-30 10:25:35 -07:00
Christoph Kerschbaumer 19ac7d31c1 Bug 1274170 - Remove unnecessary includes of nsCorsListenerProxy. r=jkingston
--HG--
extra : rebase_source : 488864e497a7e6c127a98e05efd17d1d0580e000
2016-06-21 12:54:03 +02:00
Thomas Nguyen 4b7ad0e2c5 Bug 1223838 - Fix wrong policy associated with empty string. r=fkiefer,hsivonen
MozReview-Commit-ID: 7kFH39cegmH
2016-05-30 15:17:45 +08:00
Jonathan Hao a1a0a9bd7d Bug 1280006 - Backout "Bug 1270680 - Part 1: Double-key the image cache by origin attribute." r=tanvi
This reverts commit bb0482fe09fbfad9be89384ec5cb8b6518187379.
2016-06-14 12:43:21 +01:00
Jonathan Hao e255200c24 Bug 1280006 - Backout "Bug 1270680 - Part 3 - Get origin attributes from loadInfo in LoadImageWithChannel()." r=tanvi
This reverts commit 8ef7edb6a790df9128558e6eb520701f4fc600a0.
2016-06-14 12:43:14 +01:00
Blake Kaplan e6e116bff5 Bug 1274516 - Add a helper to iterate over all ContentParents and use it to clear the image cache in both the parent and child processes. r=billm r=seth 2016-06-10 16:00:22 -07:00
Jonathan Hao 61e05c234f Bug 1270680 - Part 3 - Get origin attributes from loadInfo in LoadImageWithChannel(). r=tanvi 2016-06-02 20:50:00 +02:00
Jonathan Hao b7c57a3da1 Bug 1270680 - Part 1: Double-key the image cache by origin attribute. r=jdm,seth 2016-06-01 23:07:00 +02:00
Jonathan Watt de83a13903 Bug 1275266 - Rename imgLoader::Singleton and imgLoader::PBSingleton to something less misleading, and document them. r=tnikkel 2016-05-19 13:31:15 +01:00
Jonathan Watt 887122b9b7 Bug 1275229 - Stop using do_CreateInstance("@mozilla.org/image/loader;1") to create gecko internal imgLoader instances. r=tikkel 2016-05-19 13:31:15 +01:00
Jonathan Watt e1ac9527d2 Bug 1274881 - Get rid of imgLoader::GetInstance. r=tnikkel 2016-05-18 10:19:19 +01:00
Christoph Kerschbaumer 0e1d963860 Bug 1206961 - Use channel->AsyncOpen2() in image/imgLoader.cpp; removing security checks from the callsite reveals that we have to pass the accurate contentPolicyType to ValidateEntry (r=seth,bz) 2016-04-27 19:40:56 +02:00
Kris Maglione 9788ff57c1 Bug 1261231: Fix shutdown leak in imgLoader::GetInstance. r=gabor
MozReview-Commit-ID: K3kQrva1mG7

--HG--
extra : rebase_source : 846b62a772ce7f1adbad1e834a3f8a98496d8f77
2016-03-31 16:26:38 -07:00
Dragana Damjanovic 645513565f Bug 1125916 - Fix code that miss proper flags and originAttributes in LoadInfo. Also fix some tests. r=sicking, r=jduell
--HG--
extra : rebase_source : 2a08f0208496671439ce62a576b5f8a728bbdf3c
extra : amend_source : 30412ab68cc0ee4469a88e41b6ce81c908a26535
extra : histedit_source : 1faae352f7fbf7c4c7a9e1e571ca395c853a1334
2016-04-13 15:34:36 +02:00
Christoph Kerschbaumer 563d5a0864 Bug 1256999 - Use nsIDocument for ImageCacheKey. r=bz r=seth 2016-04-11 11:00:03 +02:00
Christoph Kerschbaumer 52a7f283b3 Bug 1256999 - Pass the right context to new channels for image loads. r=bz r=seth 2016-04-11 10:58:03 +02:00
Timothy Nikkel 6aeb6d5d05 Bug 1260247. In chaos mode randomly decide to start a new image load even if the image is in the image cache when allowed by spec. r=seth
If the image load is from the same document that cached the image we are required to use the cached version. Otherwise we should be free to ignore the cached version.
2016-04-02 13:53:12 -05:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
sajitk 32ccc4c2b0 Bug 1219474 - Replace PRLogModuleInfo w/ LazyLogModule in the 'image/' directory. r=seth
--HG--
extra : rebase_source : 1ce8c7a9d4ff2610506584e9f58ab9d9a6e92e06
2015-11-16 18:21:00 +01:00
Nathan Froyd 2d8bae8e40 Bug 1217571 - fix the imagelib cache to work in e10s; r=seth
nsICachingChannel isn't available in the child process; we have to use
nsICacheInfoChannel instead.
2015-11-12 15:09:52 -05:00
Sotaro Ikeda a835d4a1cf Bug 1186796 - Replace nsBaseHashtable::EnumerateRead() calls in image/ with iterators r=njn 2015-11-10 23:07:09 -08:00
Sotaro Ikeda 7246d92be6 Bug 1187149 - Replace nsBaseHashtable::Enumerate() calls in image/ with iterators r=njn 2015-11-10 21:30:02 -08:00
Ehsan Akhgari e5b08c2286 Bug 1202085 - Part 6: Clear the entries in the image cache belonging to a controlled document when it gets destroyed; r=seth 2015-10-30 16:03:13 -04:00
Ehsan Akhgari 3c9fd0e9e1 Bug 1202085 - Part 4: Add an ID for controlled document to the image cache key; r=seth
This ID will be null for non-controlled documents and also for image cache
entries for which a document is not available, and it will be the numerical
value of the document pointer for controlled documents.

This effectively makes sure that a controlled document doesn't share its
image cache entries with anything else.
2015-10-30 16:03:11 -04:00
Ehsan Akhgari 91329749b1 Bug 1202085 - Part 2: Add an optional document argument to imgICache::FindEntryProperties(); r=seth 2015-10-30 16:03:09 -04:00
Ehsan Akhgari 01fcc28c38 Bug 1202085 - Part 1: Remove imgICache::RemoveEntry(); r=seth 2015-10-30 16:03:08 -04:00