gecko-dev/image
Kris Maglione 5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
..
build Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
decoders Bug 1402888 - Remove nsIInputStreamPump::Init() offset and limit params, r=smaug 2017-09-26 07:21:44 +02:00
encoders Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm) 2017-06-14 14:44:04 -07:00
test Bug 1406278: Part 2b - Use subject principal as triggering principal in <img> "src" attribute. r=bz 2017-10-02 20:28:32 -07:00
AnimationSurfaceProvider.cpp Bug 1389479 - Part 3. AnimationSurfaceProvider no longer needs to always dispatch to free its RasterImage. r=tnikkel 2017-08-15 15:02:14 -04:00
AnimationSurfaceProvider.h Bug 1341624 - Include shared handle totals in memory reports for images. r=tnikkel 2017-02-22 09:30:22 -05:00
BMPHeaders.h
ClippedImage.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
ClippedImage.h Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange 2017-01-03 13:53:22 +08:00
CopyOnWrite.h
DecodePool.cpp Backed out changeset 759a43ebc6bf (bug 1405541) for asserting in devtools/client/performance/test/browser_perf-console-record-03.js on Windows 7. r=backout 2017-10-11 13:15:26 +02:00
DecodePool.h Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange. 2017-06-22 17:08:53 +10:00
DecodedSurfaceProvider.cpp Bug 1370412 - Part 8b. Add ImageSurfaceCache::Prune to discard surfaces which are not needed in factor of 2 mode. r=tnikkel 2017-09-05 07:58:46 -04:00
DecodedSurfaceProvider.h
Decoder.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
Decoder.h Bug 1315554 - Part 3. Expose Decoder::IsValidICOResource for all decoders. r=tnikkel 2017-07-22 07:50:31 -04:00
DecoderFactory.cpp Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel 2017-09-05 07:58:45 -04:00
DecoderFactory.h Bug 1315554 - Part 8. Allow DecoderFactory::CreateDecoderForICOResource to create metadata decoders. r=tnikkel 2017-07-22 07:50:32 -04:00
DecoderFlags.h Bug 1370412 - Part 8a. Add "substitutable" flag to ISurfaceProvider state to indicate when the caller won't accept substitutes. r=tnikkel 2017-09-05 07:58:45 -04:00
Downscaler.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
Downscaler.h Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
DownscalingFilter.h Bug 1375842 - increase SIMD padding for convolution filter to 31 bytes. r=jrmuizel 2017-07-07 13:32:05 -04:00
DrawResult.h Bug 1351440 - Part 1. Implement imgDrawingParams. r=jwatt 2017-05-18 22:03:36 +02:00
DynamicImage.cpp Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
DynamicImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
FrameAnimator.cpp Bug 1370412 - Part 9. Add factor of 2 state to the SurfaceCache memory reports. r=tnikkel 2017-09-05 07:58:46 -04:00
FrameAnimator.h Bug 1388733 - Ensure animations resume when the image surfaces are discarded while still decoding. r=tnikkel 2017-08-09 22:26:55 -04:00
FrameTimeout.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
FrozenImage.cpp Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange 2017-01-03 13:53:22 +08:00
FrozenImage.h Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange 2017-01-03 13:53:22 +08:00
ICOFileHeaders.h
IDecodingTask.cpp Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
IDecodingTask.h Bug 1359833 - Part 2. IDecodingTask should use the event target from ProgressTracker for main thread runnables. r=tnikkel 2017-07-19 14:15:11 -04:00
IProgressObserver.h Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
ISurfaceProvider.h Bug 1341624 - Include shared handle totals in memory reports for images. r=tnikkel 2017-02-22 09:30:22 -05:00
Image.cpp Bug 1382662 - ImageResource::SendOnUnlockedDraw should dispatch using ProgressTracker::GetEventTarget. r=tnikkel 2017-08-14 20:24:55 -04:00
Image.h Bug 1370412 - Part 9. Add factor of 2 state to the SurfaceCache memory reports. r=tnikkel 2017-09-05 07:58:46 -04:00
ImageCacheKey.cpp Bug 1377158 - (Part 2) Add the info of StyloEnabled() to hash function to make reftests of styloVsGecko get the correct caches. r=heycam 2017-07-24 11:51:20 +08:00
ImageCacheKey.h Bug 1377158 - (Part 2) Add the info of StyloEnabled() to hash function to make reftests of styloVsGecko get the correct caches. r=heycam 2017-07-24 11:51:20 +08:00
ImageFactory.cpp Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
ImageFactory.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
ImageLogging.h
ImageMetadata.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
ImageOps.cpp Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
ImageOps.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
ImageRegion.h Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel 2017-07-05 11:22:00 -04:00
ImageURL.h Bug 1378046 - Make ImageCacheKey::Hash() return PLDHashNumber; r=aosmond 2017-07-04 11:09:03 -04:00
ImageWrapper.cpp Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
ImageWrapper.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
LookupResult.h Bug 1370412 - Part 2. Give image::LookupResult an optional preferred size to decode at when the surface is not found. r=tnikkel 2017-09-05 07:58:45 -04:00
MultipartImage.cpp
MultipartImage.h
Orientation.h
OrientedImage.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
OrientedImage.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
PlaybackType.h
ProgressTracker.cpp Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
ProgressTracker.h Bug 1359833 - Part 1. ProgressTracker should select an event target from observers and expose to callers. r=tnikkel 2017-07-19 14:15:11 -04:00
RasterImage.cpp Bug 1382783 - Retarget non-HTTP image URIs (chrome, blob) to the image IO thread if not an SVG. r=tnikkel 2017-09-25 11:44:49 -04:00
RasterImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
SVGDocumentWrapper.cpp Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
SVGDocumentWrapper.h Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky 2017-01-05 15:31:56 +08:00
SVGDrawingParameters.h Bug 1360511 - Move SVGDrawingParameters to a header file to allow it to be shared. r=longsonr 2017-04-18 12:46:19 +01:00
ScriptedNotificationObserver.cpp Bug 1359833 - Part 8. ScriptedNotificationObserver should use nsAutoScriptBlocker when issuing notifications. r=tnikkel 2017-07-19 14:15:12 -04:00
ScriptedNotificationObserver.h
ShutdownTracker.cpp
ShutdownTracker.h
SourceBuffer.cpp Bug 1383404 - Part 2. When SourceBuffer::ExpectLength creates the initial buffer, it should not round up. r=tnikkel 2017-08-01 06:59:11 -04:00
SourceBuffer.h Bug 1383404 - Part 3. SourceBuffer::mChunks should be an AutoTArray instead of FallibleTArray. r=tnikkel 2017-08-01 06:59:11 -04:00
StreamingLexer.h Bug 1399079 - Fix StreamingLexer::Clone assert to handle SourceBuffer insertion failures. r=tnikkel 2017-09-13 07:26:04 -04:00
SurfaceCache.cpp Bug 1401524 - Ensure SurfaceCache state coherency whenever we perform an operation that may discard surfaces. r=tnikkel 2017-09-21 16:56:38 -04:00
SurfaceCache.h Bug 1370412 - Part 8b. Add ImageSurfaceCache::Prune to discard surfaces which are not needed in factor of 2 mode. r=tnikkel 2017-09-05 07:58:46 -04:00
SurfaceCacheUtils.cpp
SurfaceCacheUtils.h
SurfaceFilters.h Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
SurfaceFlags.h
SurfacePipe.cpp Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in image/*. r=aosmond 2017-08-14 08:29:56 -04:00
SurfacePipe.h Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel 2017-08-09 06:54:55 -04:00
SurfacePipeFactory.h
VectorImage.cpp Bug 1405785, part 2 - Document and rename nsSVGRenderingObserver::DoUpdate to OnRenderingChange. r=longsonr 2017-09-15 10:01:34 +01:00
VectorImage.h Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
imgFrame.cpp Bug 1391430 - Force heap allocated surfaces for image decoding to use an unaligned stride. r=tnikkel 2017-08-31 06:38:55 -04:00
imgFrame.h Backed out changeset 619b5b27ce87 (bug 1343499) for CLOSED TREE build bustage r=backout 2017-03-22 11:04:30 -04:00
imgICache.idl Bug 1352408. Restore imgICache::RemoveEntry. r=ehsan 2017-04-11 03:14:09 -05:00
imgIContainer.idl Bug 1370412 - Part 0. Add imgIContainer::GetNativeSizesLength to determine a ceiling on the maximum number of expected, unique surfaces. r=tnikkel 2017-09-05 07:58:44 -04:00
imgIContainerDebug.idl
imgIEncoder.idl
imgILoader.idl
imgINotificationObserver.idl
imgIOnloadBlocker.idl
imgIRequest.idl Bug 1357318 - remember previous priority boost request in imgRequest. r=tnikkel 2017-03-22 19:52:15 +08:00
imgIScriptedNotificationObserver.idl
imgITools.idl Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel 2017-08-06 10:54:14 +09:00
imgLoader.cpp Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
imgLoader.h Bug 1247843 - Part 3: Set request context ID to the http channel created in imgLoader::LoadImage. r=baku 2017-09-20 20:09:00 -04:00
imgRequest.cpp Bug 1406278: Part 2a - Rename LoadingPrincipal to TriggeringPrincipal in imgLoader. r=bz 2017-10-02 20:38:30 -07:00
imgRequest.h Bug 1406278: Part 2a - Rename LoadingPrincipal to TriggeringPrincipal in imgLoader. r=bz 2017-10-02 20:38:30 -07:00
imgRequestProxy.cpp Bug 1382658 - imgRequestProxy::DoRemoveFromLoadGroup and imgCancelRunnable should be dispatched on labelled group if possible. r=tnikkel 2017-08-15 07:14:51 -04:00
imgRequestProxy.h Bug 1382658 - imgRequestProxy::DoRemoveFromLoadGroup and imgCancelRunnable should be dispatched on labelled group if possible. r=tnikkel 2017-08-15 07:14:51 -04:00
imgTools.cpp Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel 2017-08-06 10:54:14 +09:00
imgTools.h
moz.build Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr 2017-08-30 14:14:46 +01:00
nsIIconURI.idl