Bug 1355752 - Remove B2G code from nsGfxScrollFrame.cpp.
MozReview-Commit-ID: 6ePwT9UWJIJ
--- 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.