Bug 1771564 - Constify ComputedStyle usage in nsComputedDOMStyle. r=dholbert

None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.

Doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D147555
This commit is contained in:
Emilio Cobos Álvarez
2022-05-28 01:04:24 +00:00
parent ae643b70f3
commit e48bb99524
30 changed files with 102 additions and 97 deletions

View File

@@ -2740,7 +2740,7 @@ static nscoord GetNormalLineHeight(nsFontMetrics* aFontMetrics) {
return normalLineHeight;
}
static inline nscoord ComputeLineHeight(ComputedStyle* aComputedStyle,
static inline nscoord ComputeLineHeight(const ComputedStyle* aComputedStyle,
nsPresContext* aPresContext,
nscoord aBlockBSize,
float aFontSizeInflation) {
@@ -2800,7 +2800,7 @@ void ReflowInput::SetLineHeight(nscoord aLineHeight) {
/* static */
nscoord ReflowInput::CalcLineHeight(nsIContent* aContent,
ComputedStyle* aComputedStyle,
const ComputedStyle* aComputedStyle,
nsPresContext* aPresContext,
nscoord aBlockBSize,
float aFontSizeInflation) {