Issue #1053 - Part 2a: Remove android from /layout (partial)

This removes android code from base, build, forms, generic, inspector, style,
printing, tools and xul.
This commit is contained in:
Moonchild 2020-12-26 10:16:55 +00:00 committed by roytam1
commit 7167c960d0
43 changed files with 56 additions and 540 deletions

View file

@ -1266,21 +1266,6 @@ ScrollFrameHelper::HandleScrollbarStyleSwitching()
}
}
#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();
}
return aContent ? nsContentUtils::IsFocusedContent(aContent) : false;
}
#endif
void
ScrollFrameHelper::SetScrollableByAPZ(bool aScrollable)
{
@ -1315,12 +1300,8 @@ ScrollFrameHelper::WantAsyncScroll() const
bool isHScrollable = (scrollRange.width >= oneDevPixel) &&
(styles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN);
#if defined(MOZ_WIDGET_ANDROID)
// Mobile platforms need focus to scroll.
bool canScrollWithoutScrollbars = IsFocused(mOuter->GetContent());
#else
// Desktop platforms don't need focus to scroll.
bool canScrollWithoutScrollbars = true;
#endif
// The check for scroll bars was added in bug 825692 to prevent layerization
// of text inputs for performance reasons.