Bug 1204535 - Collapse redundant conditional block. r=tn
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 15 Sep 2015 16:09:35 -0400
changeset 295275 c12eaa3668eab1c07c2b5a2d00dcc15bb02271ab
parent 295274 03c1c7c1e1442b23808383431166eccfca92330d
child 295276 c60510f350b18105795c213502e78640ae2e3a64
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1204535
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1204535 - Collapse redundant conditional block. r=tn
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2876,34 +2876,26 @@ ScrollFrameHelper::BuildDisplayList(nsDi
   bool usingDisplayport = false;
   if (aBuilder->IsPaintingToWindow()) {
     bool wasUsingDisplayPort = nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), nullptr);
 
     if (mIsRoot && gfxPrefs::LayoutUseContainersForRootFrames()) {
       // For a root frame in a container, just get the value of the existing
       // display port if any.
       usingDisplayport = nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &displayPort);
-    } else if (mIsRoot) {
+    } else {
       // Override the value of the display port base rect, and possibly create a
       // display port if there isn't one already.
       nsRect displayportBase = dirtyRect;
       if (mIsRoot && mOuter->PresContext()->IsRootContentDocument()) {
         displayportBase =
           nsRect(nsPoint(0, 0), nsLayoutUtils::CalculateCompositionSizeForFrame(mOuter));
       }
       usingDisplayport = nsLayoutUtils::GetOrMaybeCreateDisplayPort(
             *aBuilder, mOuter, displayportBase, &displayPort);
-    } else {
-      // For a non-root scroll frame, override the value of the display port
-      // base rect, and possibly create a display port if there isn't one
-      // already. For root scroll frame, nsLayoutUtils::PaintFrame or
-      // nsSubDocumentFrame::BuildDisplayList takes care of this.
-      nsRect displayportBase = dirtyRect;
-      usingDisplayport = nsLayoutUtils::GetOrMaybeCreateDisplayPort(
-          *aBuilder, mOuter, displayportBase, &displayPort);
     }
 
     // Override the dirty rectangle if the displayport has been set.
     if (usingDisplayport) {
       dirtyRect = displayPort;
 
       // The cached animated geometry root for the display builder is out of
       // date if we just introduced a new animated geometry root.