Bug 836176 - Part 4: drop a useless null check

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-06-04 18:21:52 +00:00
parent 21b355d11c
commit 127b9e6503

View File

@ -5331,7 +5331,7 @@ nsIFrame* ScrollFrameHelper::GetFrameForDir() const {
Element* root = document->GetRootElement();
// But for HTML and XHTML we want the body element.
if (document && document->IsHTMLOrXHTML()) {
if (document->IsHTMLOrXHTML()) {
Element* bodyElement = document->GetBodyElement();
if (bodyElement) {
root = bodyElement; // we can trust the document to hold on to it