Bug 1478069: Trivial frame constructor cleanup. r=TYLin

Using references helps to see when stuff can and cannot be null.

I removed useless aTag / aNamespaceId arguments which are useless now that XBL
can't override them (bug 1450617), so FindXULData is the only one that keeps
them alive.

Also, I took the liberty of renaming a few fooComputedStyle variables to just
fooStyle, and clarify naming in some pseudo-element-related functions to say
originating element (the spec term) and avoid confusing it with the generated
_moz_generated_content_before / _moz_generated_content_after element.

Note that this is a partial state, more stuff will come in the future.

Differential Revision: https://phabricator.services.mozilla.com/D2326

MozReview-Commit-ID: 39B30doREUH
This commit is contained in:
Emilio Cobos Álvarez
2018-07-24 18:15:01 +02:00
parent ff37eaa9b7
commit ef46e516eb
16 changed files with 367 additions and 375 deletions

View File

@@ -575,7 +575,7 @@ nsButtonFrameRenderer::ReResolveStyles(nsPresContext* aPresContext)
// get styles assigned to -moz-focus-inner (ie dotted border on Windows)
mInnerFocusStyle =
styleSet->ProbePseudoElementStyle(mFrame->GetContent()->AsElement(),
styleSet->ProbePseudoElementStyle(*mFrame->GetContent()->AsElement(),
CSSPseudoElementType::mozFocusInner,
context);
}