mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
Bug 1774879
part 3: Add 'const' to local var ComputedStyle pointers that we pass to DetermineBackgroundColor and IsTransparent (which now accept const). r=emilio
This patch does not affect behavior; it's just a const-correctness fix. Differential Revision: https://phabricator.services.mozilla.com/D149676
This commit is contained in:
parent
b99919ed77
commit
92b1de01bb
@ -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 &&
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -3104,7 +3104,7 @@ AppendedBackgroundType nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||
const nsRect& aBackgroundOriginRect, nsIFrame* aSecondaryReferenceFrame,
|
||||
Maybe<nsDisplayListBuilder::AutoBuildingDisplayList>*
|
||||
aAutoBuildingDisplayList) {
|
||||
ComputedStyle* bgSC = aComputedStyle;
|
||||
const ComputedStyle* bgSC = aComputedStyle;
|
||||
const nsStyleBackground* bg = nullptr;
|
||||
nsRect bgRect = aBackgroundRect;
|
||||
nsRect bgOriginRect = bgRect;
|
||||
|
Loading…
Reference in New Issue
Block a user