From 48b9fd1d391eb08bd5806fc59916dc030eab0235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 31 Jul 2018 14:36:39 +0200 Subject: [PATCH] Bug 1479528: Make the ShouldSuppressFrameIn* functions take references. r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D2562 MozReview-Commit-ID: 8lcn1XW4aik --- layout/base/nsCSSFrameConstructor.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 00b798007162..fda89aeded77 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -5432,7 +5432,7 @@ nsCSSFrameConstructor::AddFrameConstructionItems(nsFrameConstructorState& aState // XXXbz it's not clear how this should best work with XBL. static bool ShouldSuppressFrameInSelect(const nsIContent* aParent, - const nsIContent* aChild) + const nsIContent& aChild) { if (!aParent || !aParent->IsAnyOfHTMLElements(nsGkAtoms::select, nsGkAtoms::optgroup)) { @@ -5443,23 +5443,23 @@ ShouldSuppressFrameInSelect(const nsIContent* aParent, // // We can't be regular NAC, since display: contents has no frame to generate // them off. - if (aChild->GetParent() != aParent) { + if (aChild.GetParent() != aParent) { return true; } // Option is always fine. - if (aChild->IsHTMLElement(nsGkAtoms::option)) { + if (aChild.IsHTMLElement(nsGkAtoms::option)) { return false; } // is OK in