Bug 995519. Enable overlay scrollbars on root scrollframes in root content documents. r=roc
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 15 Jul 2014 00:09:24 -0500
changeset 195441 95f31fa01c7a0068a96766e63f608880cfd7e0bf
parent 195440 7e2f74a8740ce8fbd3cea878795351ae71d0eef9
child 195442 dd2018a5f894c967702595dbaed6c4d17503bbc7
push id27182
push useremorley@mozilla.com
push dateTue, 22 Jul 2014 16:21:27 +0000
treeherdermozilla-central@fe7c119a55e2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs995519
milestone34.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 995519. Enable overlay scrollbars on root scrollframes in root content documents. r=roc
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2431,21 +2431,16 @@ ScrollFrameHelper::BuildDisplayList(nsDi
   if (aBuilder->GetIgnoreScrollFrame() == mOuter || IsIgnoringViewportClipping()) {
 
     // If we are a root scroll frame that has a display port we want to add
     // scrollbars, they will be children of the scrollable layer, but they get
     // adjusted by the APZC automatically.
     bool addScrollBars = mIsRoot &&
       nsLayoutUtils::GetDisplayPort(mOuter->GetContent()) &&
       !aBuilder->IsForEventDelivery();
-    // For now, don't add them for display root documents, cause we've never
-    // had them there.
-    if (aBuilder->RootReferenceFrame()->PresContext() == mOuter->PresContext()) {
-      addScrollBars = false;
-    }
 
     if (addScrollBars) {
       // Add classic scrollbars.
       AppendScrollPartsTo(aBuilder, aDirtyRect, aLists, createLayersForScrollbars,
                           false);
     }
 
     // Don't clip the scrolled child, and don't paint scrollbars/scrollcorner.