Bug 1355752 - Remove B2G code from nsGfxScrollFrame.cpp. draft
authorAstley Chen <aschen@mozilla.com>
Thu, 20 Apr 2017 13:16:43 +0800
changeset 565628 edf65f122681c00e7d9294fd9d8fa73711c2fd5f
parent 565627 83b0ccee102dde2dcb01ed62efb620f094cc5e1a
child 565629 bb18747a1817a45822195fabf8ebf6d62a4ba9f3
push id54927
push useraschen@mozilla.com
push dateThu, 20 Apr 2017 05:17:46 +0000
bugs1355752
milestone55.0a1
Bug 1355752 - Remove B2G code from nsGfxScrollFrame.cpp. 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.