Bug 814435 - Always layerize overlay scrollbars on B2G. r=tn
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 09 Dec 2013 22:14:54 -0500
changeset 159660 4c81aaa4763e9df29f704ddcd8c29b4d6e661d13
parent 159659 9eb611dbbe97309a4ea9bc5da1f9c0a2cadad229
child 159661 75178cf263ae1fb9836095c72c8dfbbf64fec523
push id25809
push userryanvm@gmail.com
push dateTue, 10 Dec 2013 20:38:57 +0000
treeherdermozilla-central@ece822a8cc7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs814435
milestone29.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 814435 - Always layerize overlay scrollbars on B2G. r=tn
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2434,16 +2434,22 @@ ScrollFrameHelper::BuildDisplayList(nsDi
     // metadata about this scroll box to the compositor process.
     nsDisplayScrollInfoLayer* layerItem = new (aBuilder) nsDisplayScrollInfoLayer(
       aBuilder, mScrolledFrame, mOuter);
     scrolledContent.BorderBackground()->AppendNewToBottom(layerItem);
   }
   scrolledContent.MoveTo(aLists);
 
   // Now display overlay scrollbars and the resizer, if we have one.
+#ifdef MOZ_WIDGET_GONK
+  // TODO: only layerize the overlay scrollbars if this scrollframe can be
+  // panned asynchronously. For now just always layerize on B2G because.
+  // that's where we want the layerized scrollbars
+  createLayersForScrollbars = true;
+#endif
   AppendScrollPartsTo(aBuilder, aDirtyRect, aLists, createLayersForScrollbars,
                       true);
 }
 
 bool
 ScrollFrameHelper::IsRectNearlyVisible(const nsRect& aRect) const
 {
   // Use the right rect depending on if a display port is set.