Bug 1699031: Switch to use wrapper-API GetCrossDocParentFrameInProcess() in ImageLoader.cpp. r=tnikkel

This patch doesn't change behavior; it's just switching us between two
functions that do the same thing. (One is literally a trivial wrapper for the
other.)

We're using the new "InProcess" version of this API as a way of annotating
callsites that have been vetted as behaving properly in out-of-process iframes.

The code here, InvalidateImages, is walking up an invalidated image's
ancestor-chain, to invalidate any rendering observers of those ancestors. It's
OK that this walk will stop at the process boundary, because we don't support
rendering observers for cross-origin out-of-process content anyway.

Differential Revision: https://phabricator.services.mozilla.com/D108739
This commit is contained in:
Daniel Holbert
2021-03-17 16:11:17 +00:00
parent b75b9aa050
commit ea42d20aa7

View File

@@ -568,7 +568,7 @@ static void InvalidateImages(nsIFrame* aFrame, imgIRequest* aRequest,
nsIFrame* f = aFrame;
while (f && !f->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
SVGObserverUtils::InvalidateDirectRenderingObservers(f);
f = nsLayoutUtils::GetCrossDocParentFrame(f);
f = nsLayoutUtils::GetCrossDocParentFrameInProcess(f);
}
}