diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 2d7c99c914c0..feaee86ca5fd 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -14778,7 +14778,7 @@ void Document::GetWireframeWithoutFlushing(bool aIncludeNodes, } bool drawImage = false; bool drawColor = false; - if (auto* bgStyle = nsCSSRendering::FindBackground(frame)) { + if (const auto* bgStyle = nsCSSRendering::FindBackground(frame)) { const nscolor color = nsCSSRendering::DetermineBackgroundColor( pc, bgStyle, frame, drawImage, drawColor); if (drawImage && diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index 86a3f5a70b63..d0f5c752648f 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -5462,7 +5462,7 @@ PresShell::CanvasBackground PresShell::ComputeCanvasBackground() const { return {GetDefaultBackgroundColorToDraw(), false}; } - ComputedStyle* bgStyle = + const ComputedStyle* bgStyle = nsCSSRendering::FindRootFrameBackground(rootStyleFrame); // XXX We should really be passing the canvasframe, not the root element // style frame but we don't have access to the canvasframe here. It isn't diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 33e7c565445c..02631b34a882 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -237,7 +237,7 @@ static nscolor GetBackplateColor(nsIFrame* aFrame) { // colors with the non-native theme, and native system colors should also // match the native theme), then we're alright and we should compute an // appropriate backplate color. - auto* style = frame->Style(); + const auto* style = frame->Style(); if (style->StyleBackground()->IsTransparent(style)) { continue; } diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 43b6371dabc3..e7d7d14b6b2f 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -3104,7 +3104,7 @@ AppendedBackgroundType nsDisplayBackgroundImage::AppendBackgroundItemsToTop( const nsRect& aBackgroundOriginRect, nsIFrame* aSecondaryReferenceFrame, Maybe* aAutoBuildingDisplayList) { - ComputedStyle* bgSC = aComputedStyle; + const ComputedStyle* bgSC = aComputedStyle; const nsStyleBackground* bg = nullptr; nsRect bgRect = aBackgroundRect; nsRect bgOriginRect = bgRect;