Bug 1432490: followup: Fix mac-only bustage on a CLOSED TREE. r=me

MozReview-Commit-ID: TNquyPQhkL
This commit is contained in:
Emilio Cobos Álvarez 2018-02-25 02:42:36 +01:00
parent 7dffe29d8f
commit 3eb90874c6
2 changed files with 2 additions and 4 deletions

View File

@ -691,8 +691,7 @@ nsComputedDOMStyle::DoGetStyleContextNoFlush(Element* aElement,
// set. Using the pres shell from the content also means that any // set. Using the pres shell from the content also means that any
// content that's actually *in* a document will get the style from the // content that's actually *in* a document will get the style from the
// correct document. // correct document.
nsIPresShell *presShell = nsIPresShell* presShell = nsContentUtils::GetPresShellForContent(aElement);
nsContentUtils::GetPresShellForContent(aElement);
bool inDocWithShell = true; bool inDocWithShell = true;
if (!presShell) { if (!presShell) {
inDocWithShell = false; inDocWithShell = false;

View File

@ -155,8 +155,7 @@ nsMenuItemIconX::GetIconURI(nsIURI** aIconURI)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
sc = nsComputedDOMStyle::GetStyleContext(mContent->AsElement(), nullptr, sc = nsComputedDOMStyle::GetStyleContext(mContent->AsElement(), nullptr);
document->GetShell());
if (!sc) { if (!sc) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }