Bug 1355752 - Remove B2G code from nsGfxScrollFrame.cpp. r=kats
authorAstley Chen <aschen@mozilla.com>
Thu, 20 Apr 2017 13:16:43 +0800
changeset 354017 a1c51bf7ec8a9484d654b81db4b76fa0c58778cc
parent 354016 16028292e2f1bd0754cc8d25c813815ec285ad3e
child 354018 7d77113f3841602c615a7c99376ee51d7675427e
push id31685
push userkwierso@gmail.com
push dateThu, 20 Apr 2017 21:45:29 +0000
treeherdermozilla-central@5e3dc7e1288a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1355752
milestone55.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 1355752 - Remove B2G code from nsGfxScrollFrame.cpp. r=kats MozReview-Commit-ID: 6ePwT9UWJIJ
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1263,17 +1263,17 @@ ScrollFrameHelper::HandleScrollbarStyleS
   }
   else if (!mScrollbarActivity &&
            LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) != 0) {
     mScrollbarActivity = new ScrollbarActivity(do_QueryFrame(mOuter));
     mOuter->PresContext()->ThemeChanged();
   }
 }
 
-#if defined(MOZ_B2G) || defined(MOZ_WIDGET_ANDROID)
+#if defined(MOZ_WIDGET_ANDROID)
 static bool IsFocused(nsIContent* aContent)
 {
   // Some content elements, like the GetContent() of a scroll frame
   // for a text input field, are inside anonymous subtrees, but the focus
   // manager always reports a non-anonymous element as the focused one, so
   // walk up the tree until we reach a non-anonymous element.
   while (aContent && aContent->IsInAnonymousSubtree()) {
     aContent = aContent->GetParent();
@@ -1312,17 +1312,17 @@ ScrollFrameHelper::WantAsyncScroll() con
   ScrollbarStyles styles = GetScrollbarStylesFromFrame();
   nscoord oneDevPixel = GetScrolledFrame()->PresContext()->AppUnitsPerDevPixel();
   nsRect scrollRange = GetScrollRange();
   bool isVScrollable = (scrollRange.height >= oneDevPixel) &&
                        (styles.mVertical != NS_STYLE_OVERFLOW_HIDDEN);
   bool isHScrollable = (scrollRange.width >= oneDevPixel) &&
                        (styles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN);
 
-#if defined(MOZ_B2G) || defined(MOZ_WIDGET_ANDROID)
+#if defined(MOZ_WIDGET_ANDROID)
   // Mobile platforms need focus to scroll.
   bool canScrollWithoutScrollbars = IsFocused(mOuter->GetContent());
 #else
   bool canScrollWithoutScrollbars = true;
 #endif
 
   // The check for scroll bars was added in bug 825692 to prevent layerization
   // of text inputs for performance reasons.