зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1774879
part 4: Use const ComputedStyle* arg in nsCSSRendering::PaintStyleImageLayerWithSC, and update several callsites now that they can pass const variables. r=emilio
This patch doesn't change behavior; it's just a const-correctness fix. Thanks to previous patches in this series, PaintStyleImageLayerWithSC's arg can become const, so let's make that change and opportunistically make the same change to the variables that callers pass in, where possible. Differential Revision: https://phabricator.services.mozilla.com/D149677
This commit is contained in:
Родитель
92b1de01bb
Коммит
fc3b960a74
|
@ -1796,7 +1796,7 @@ ImgDrawResult nsCSSRendering::PaintStyleImageLayer(const PaintBGParams& aParams,
|
|||
MOZ_ASSERT(aParams.frame,
|
||||
"Frame is expected to be provided to PaintStyleImageLayer");
|
||||
|
||||
ComputedStyle* sc = FindBackground(aParams.frame);
|
||||
const ComputedStyle* sc = FindBackground(aParams.frame);
|
||||
if (!sc) {
|
||||
// We don't want to bail out if moz-appearance is set on a root
|
||||
// node. If it has a parent content node, bail because it's not
|
||||
|
@ -2387,7 +2387,7 @@ static CompositionOp DetermineCompositionOp(
|
|||
|
||||
ImgDrawResult nsCSSRendering::PaintStyleImageLayerWithSC(
|
||||
const PaintBGParams& aParams, gfxContext& aRenderingCtx,
|
||||
ComputedStyle* aBackgroundSC, const nsStyleBorder& aBorder) {
|
||||
const ComputedStyle* aBackgroundSC, const nsStyleBorder& aBorder) {
|
||||
MOZ_ASSERT(aParams.frame,
|
||||
"Frame is expected to be provided to PaintStyleImageLayerWithSC");
|
||||
|
||||
|
|
|
@ -503,7 +503,8 @@ struct nsCSSRendering {
|
|||
*/
|
||||
static ImgDrawResult PaintStyleImageLayerWithSC(
|
||||
const PaintBGParams& aParams, gfxContext& aRenderingCtx,
|
||||
mozilla::ComputedStyle* mBackgroundSC, const nsStyleBorder& aBorder);
|
||||
const mozilla::ComputedStyle* aBackgroundSC,
|
||||
const nsStyleBorder& aBorder);
|
||||
|
||||
static bool CanBuildWebRenderDisplayItemsForStyleImageLayer(
|
||||
WebRenderLayerManager* aManager, nsPresContext& aPresCtx,
|
||||
|
|
|
@ -491,7 +491,7 @@ using PaintFramesParams = SVGIntegrationUtils::PaintFramesParams;
|
|||
*/
|
||||
static bool PaintMaskSurface(const PaintFramesParams& aParams,
|
||||
DrawTarget* aMaskDT, float aOpacity,
|
||||
ComputedStyle* aSC,
|
||||
const ComputedStyle* aSC,
|
||||
const nsTArray<SVGMaskFrame*>& aMaskFrames,
|
||||
const nsPoint& aOffsetToUserSpace) {
|
||||
MOZ_ASSERT(aMaskFrames.Length() > 0);
|
||||
|
@ -568,7 +568,7 @@ struct MaskPaintResult {
|
|||
};
|
||||
|
||||
static MaskPaintResult CreateAndPaintMaskSurface(
|
||||
const PaintFramesParams& aParams, float aOpacity, ComputedStyle* aSC,
|
||||
const PaintFramesParams& aParams, float aOpacity, const ComputedStyle* aSC,
|
||||
const nsTArray<SVGMaskFrame*>& aMaskFrames,
|
||||
const nsPoint& aOffsetToUserSpace) {
|
||||
const nsStyleSVGReset* svgReset = aSC->StyleSVGReset();
|
||||
|
|
Загрузка…
Ссылка в новой задаче