Bug 1315874 - Tweak some line wrapping in DoGetStyleContextNoFlush; r=heycam
In ensuring that this method does *not* re-use the existing style context if
aStyleType != eAll, I found it easy to miss this check in the multi-condition if
statement due to the way some, but not all, of the conditions are on one line.
I think this would be a little easier to read if this multi-line condition used
one line per condition.
MozReview-Commit-ID: 4UOAGhAndIV
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -592,17 +592,19 @@ nsComputedDOMStyle::DoGetStyleContextNoF
presShell = aPresShell;
if (!presShell)
return nullptr;
}
// XXX the !aElement->IsHTMLElement(nsGkAtoms::area)
// check is needed due to bug 135040 (to avoid using
// mPrimaryFrame). Remove it once that's fixed.
- if (!aPseudo && aStyleType == eAll && inDocWithShell &&
+ if (!aPseudo &&
+ aStyleType == eAll &&
+ inDocWithShell &&
!aElement->IsHTMLElement(nsGkAtoms::area)) {
nsIFrame* frame = nsLayoutUtils::GetStyleFrame(aElement);
if (frame) {
nsStyleContext* result = frame->StyleContext();
// Don't use the style context if it was influenced by
// pseudo-elements, since then it's not the primary style
// for this element.
if (!result->HasPseudoElementData()) {