зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1291373 - [geckoview] part 3, Remove MOZ_ANDROID_APZ r=botond,snorp
This commit is contained in:
Родитель
d81ee14d7e
Коммит
9a3fae864f
|
@ -1768,7 +1768,7 @@ APZCTreeManager::FindRootContentOrRootApzc() const
|
|||
|
||||
// Note: this is intended to find the same "root" that would be found
|
||||
// by AsyncCompositionManager::ApplyAsyncContentTransformToTree inside
|
||||
// the MOZ_ANDROID_APZ block. That is, it should find the RCD node if there
|
||||
// the MOZ_WIDGET_ANDROID block. That is, it should find the RCD node if there
|
||||
// is one, or the root APZC if there is not.
|
||||
// Since BreadthFirstSearch is a pre-order search, we first do a search for
|
||||
// the RCD, and then if we don't find one, we do a search for the root APZC.
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
#include "SharedMemoryBasic.h" // for SharedMemoryBasic
|
||||
#include "ScrollSnap.h" // for ScrollSnapUtils
|
||||
#include "WheelScrollAnimation.h"
|
||||
#if defined(MOZ_ANDROID_APZ)
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
#include "AndroidAPZ.h"
|
||||
#endif // defined(MOZ_ANDROID_APZ)
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
#define ENABLE_APZC_LOGGING 0
|
||||
// #define ENABLE_APZC_LOGGING 1
|
||||
|
@ -105,7 +105,7 @@ typedef mozilla::gfx::Matrix4x4 Matrix4x4;
|
|||
using mozilla::gfx::PointTyped;
|
||||
|
||||
// Choose between platform-specific implementations.
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
typedef WidgetOverscrollEffect OverscrollEffect;
|
||||
typedef AndroidSpecificState PlatformSpecificState;
|
||||
typedef AndroidFlingAnimation FlingAnimation;
|
||||
|
|
|
@ -567,7 +567,7 @@ GetRootDocumentElementFor(nsIWidget* aWidget)
|
|||
static nsIFrame*
|
||||
UpdateRootFrameForTouchTargetDocument(nsIFrame* aRootFrame)
|
||||
{
|
||||
#if defined(MOZ_ANDROID_APZ)
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
// Re-target so that the hit test is performed relative to the frame for the
|
||||
// Root Content Document instead of the Root Document which are different in
|
||||
// Android. See bug 1229752 comment 16 for an explanation of why this is necessary.
|
||||
|
|
|
@ -454,7 +454,7 @@ APZEventState::ProcessClusterHit()
|
|||
{
|
||||
// If we hit a cluster of links then we shouldn't activate any of them,
|
||||
// as we will be showing the zoomed view. (This is only called on Fennec).
|
||||
#ifndef MOZ_ANDROID_APZ
|
||||
#ifndef MOZ_WIDGET_ANDROID
|
||||
MOZ_ASSERT(false);
|
||||
#endif
|
||||
mActiveElementManager->ClearActivation();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "mozilla/layers/APZThreadUtils.h"
|
||||
|
||||
#include "mozilla/layers/Compositor.h"
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
#endif
|
||||
|
||||
|
@ -57,7 +57,7 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed<Runnable> aTask)
|
|||
{
|
||||
RefPtr<Runnable> task = aTask;
|
||||
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// This is needed while nsWindow::ConfigureAPZControllerThread is not propper
|
||||
// implemented.
|
||||
if (AndroidBridge::IsJavaUiThread()) {
|
||||
|
@ -83,7 +83,7 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed<Runnable> aTask)
|
|||
/*static*/ bool
|
||||
APZThreadUtils::IsControllerThread()
|
||||
{
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
return AndroidBridge::IsJavaUiThread();
|
||||
#else
|
||||
return sControllerThread == MessageLoop::current();
|
||||
|
|
|
@ -1187,21 +1187,6 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
|
|||
// first, and see if we should just abort this paint. Aborting is usually
|
||||
// caused by there being an incoming, more relevant paint.
|
||||
AsyncTransform viewTransform;
|
||||
#if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_ANDROID_APZ)
|
||||
FrameMetrics contentMetrics = scrollAncestor.Metrics();
|
||||
bool abortPaint = false;
|
||||
// On Android, only the primary scrollable layer is async-scrolled, and the only one
|
||||
// that the Java-side code can provide details about. If we're tiling some other layer
|
||||
// then we already have all the information we need about it.
|
||||
if (contentMetrics.GetScrollId() == mManager->GetRootScrollableLayerId()) {
|
||||
FrameMetrics compositorMetrics = contentMetrics;
|
||||
// The ProgressiveUpdateCallback updates the compositorMetrics
|
||||
abortPaint = mManager->ProgressiveUpdateCallback(!staleRegion.Contains(aInvalidRegion),
|
||||
compositorMetrics,
|
||||
!drawingLowPrecision);
|
||||
viewTransform = ComputeViewTransform(contentMetrics, compositorMetrics);
|
||||
}
|
||||
#else
|
||||
MOZ_ASSERT(mSharedFrameMetricsHelper);
|
||||
|
||||
bool abortPaint =
|
||||
|
@ -1210,7 +1195,6 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
|
|||
!staleRegion.Contains(aInvalidRegion),
|
||||
drawingLowPrecision,
|
||||
viewTransform);
|
||||
#endif
|
||||
|
||||
TILING_LOG("TILING %p: Progressive update view transform %s zoom %f abort %d\n",
|
||||
mPaintedLayer, ToString(viewTransform.mTranslation).c_str(), viewTransform.mScale.scale, abortPaint);
|
||||
|
|
|
@ -793,7 +793,7 @@ ExpandRootClipRect(Layer* aLayer, const ScreenMargin& aFixedLayerMargins)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
static void
|
||||
MoveScrollbarForLayerMargin(Layer* aRoot, FrameMetrics::ViewID aRootScrollId,
|
||||
const ScreenMargin& aFixedLayerMargins)
|
||||
|
@ -930,7 +930,7 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer,
|
|||
const ScrollMetadata& scrollMetadata = layer->GetScrollMetadata(i);
|
||||
const FrameMetrics& metrics = scrollMetadata.GetMetrics();
|
||||
|
||||
#if defined(MOZ_ANDROID_APZ)
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
// If we find a metrics which is the root content doc, use that. If not, use
|
||||
// the root layer. Since this function recurses on children first we should
|
||||
// only end up using the root layer if the entire tree was devoid of a
|
||||
|
@ -1506,7 +1506,7 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame,
|
|||
// in Gecko and partially in Java.
|
||||
bool foundRoot = false;
|
||||
if (ApplyAsyncContentTransformToTree(root, &foundRoot)) {
|
||||
#if defined(MOZ_ANDROID_APZ)
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
MOZ_ASSERT(foundRoot);
|
||||
if (foundRoot && mFixedLayerMargins != ScreenMargin()) {
|
||||
MoveScrollbarForLayerMargin(root, mRootScrollableId, mFixedLayerMargins);
|
||||
|
|
|
@ -246,7 +246,7 @@ private:
|
|||
|
||||
TimeStamp mPreviousFrameTimeStamp;
|
||||
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// The following two fields are only needed on Fennec with C++ APZ, because
|
||||
// then we need to reposition the gecko scrollbar to deal with the
|
||||
// dynamic toolbar shifting content around.
|
||||
|
|
|
@ -90,7 +90,7 @@ RemoteContentController::HandleTap(TapType aTapType,
|
|||
void
|
||||
RemoteContentController::PostDelayedTask(already_AddRefed<Runnable> aTask, int aDelayMs)
|
||||
{
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
AndroidBridge::Bridge()->PostTaskToUiThread(Move(aTask), aDelayMs);
|
||||
#else
|
||||
(MessageLoop::current() ? MessageLoop::current() : mUILoop)->
|
||||
|
|
|
@ -260,7 +260,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|||
'ipc/ShadowLayerUtilsGralloc.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ANDROID_APZ']:
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
UNIFIED_SOURCES += [
|
||||
'apz/src/AndroidAPZ.cpp',
|
||||
]
|
||||
|
|
|
@ -2348,7 +2348,7 @@ gfxPlatform::AsyncPanZoomEnabled()
|
|||
return false;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
return true;
|
||||
#else
|
||||
return gfxPrefs::AsyncPanZoomEnabledDoNotUseDirectly();
|
||||
|
|
|
@ -1846,9 +1846,7 @@ already_AddRefed<LayerManager> nsDisplayList::PaintRoot(nsDisplayListBuilder* aB
|
|||
// The only case we don't want to do this is in non-APZ fennec, where
|
||||
// we want the root xul document to get a null scroll id so that the root
|
||||
// content document gets the first non-null scroll id.
|
||||
#if !defined(MOZ_WIDGET_ANDROID) || defined(MOZ_ANDROID_APZ)
|
||||
content = document->GetDocumentElement();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -891,11 +891,7 @@ nsLayoutUtils::AsyncPanZoomEnabled(nsIFrame* aFrame)
|
|||
|
||||
float
|
||||
nsLayoutUtils::GetCurrentAPZResolutionScale(nsIPresShell* aShell) {
|
||||
#if !defined(MOZ_WIDGET_ANDROID) || defined(MOZ_ANDROID_APZ)
|
||||
return aShell ? aShell->GetCumulativeNonRootScaleResolution() : 1.0;
|
||||
#else
|
||||
return 1.0f;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Return the maximum displayport size, based on the LayerManager's maximum
|
||||
|
@ -3476,7 +3472,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
}
|
||||
}
|
||||
}
|
||||
#if !defined(MOZ_WIDGET_ANDROID) || defined(MOZ_ANDROID_APZ)
|
||||
else if (presShell->GetDocument() && presShell->GetDocument()->IsRootDisplayDocument()
|
||||
&& !presShell->GetRootScrollFrame()) {
|
||||
// In cases where the root document is a XUL document, we want to take
|
||||
|
@ -3487,7 +3482,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||
id = nsLayoutUtils::FindOrCreateIDFor(element);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(&builder, id);
|
||||
|
||||
|
@ -8479,7 +8473,6 @@ nsLayoutUtils::CalculateScrollableRectForFrame(nsIScrollableFrame* aScrollableFr
|
|||
// provide the special behaviour, this code will cause it to break. We can remove
|
||||
// the ifndef once Fennec switches over to APZ or if we add the special handling
|
||||
// to Fennec
|
||||
#if !defined(MOZ_WIDGET_ANDROID) || defined(MOZ_ANDROID_APZ)
|
||||
nsPoint scrollPosition = aScrollableFrame->GetScrollPosition();
|
||||
if (aScrollableFrame->GetScrollbarStyles().mVertical == NS_STYLE_OVERFLOW_HIDDEN) {
|
||||
contentBounds.y = scrollPosition.y;
|
||||
|
@ -8489,7 +8482,6 @@ nsLayoutUtils::CalculateScrollableRectForFrame(nsIScrollableFrame* aScrollableFr
|
|||
contentBounds.x = scrollPosition.x;
|
||||
contentBounds.width = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
contentBounds.width += aScrollableFrame->GetScrollPortRect().width;
|
||||
contentBounds.height += aScrollableFrame->GetScrollPortRect().height;
|
||||
|
|
|
@ -793,14 +793,7 @@ PresShell::PresShell()
|
|||
mIsActive = true;
|
||||
mIsHidden = false;
|
||||
// FIXME/bug 735029: find a better solution to this problem
|
||||
#if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_ANDROID_APZ)
|
||||
// The java pan/zoom code uses this to mean approximately "request a
|
||||
// reset of pan/zoom state" which doesn't necessarily correspond
|
||||
// with the first paint of content.
|
||||
mIsFirstPaint = false;
|
||||
#else
|
||||
mIsFirstPaint = true;
|
||||
#endif
|
||||
mPresShellId = sNextPresShellId++;
|
||||
mFrozen = false;
|
||||
mRenderFlags = 0;
|
||||
|
|
|
@ -3578,13 +3578,6 @@ ScrollFrameHelper::ComputeScrollMetadata(Layer* aLayer,
|
|||
|
||||
bool isRootContent = mIsRoot && mOuter->PresContext()->IsRootContentDocument();
|
||||
bool thisScrollFrameUsesAsyncScrolling = nsLayoutUtils::UsesAsyncScrolling(mOuter);
|
||||
#if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_ANDROID_APZ)
|
||||
// Android without apzc (aka the java pan zoom code) only uses async scrolling
|
||||
// for the root scroll frame of the root content document.
|
||||
if (!isRootContent) {
|
||||
thisScrollFrameUsesAsyncScrolling = false;
|
||||
}
|
||||
#endif
|
||||
if (!thisScrollFrameUsesAsyncScrolling) {
|
||||
if (parentLayerClip) {
|
||||
// If APZ is not enabled, we still need the displayport to be clipped
|
||||
|
|
|
@ -54,7 +54,7 @@ pref("browser.viewport.desktopWidth", 980);
|
|||
// the value is divided by 1000 and clamped to hard-coded min/max scale values.
|
||||
pref("browser.viewport.defaultZoom", -1);
|
||||
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// Show/Hide scrollbars when active/inactive
|
||||
pref("ui.showHideScrollbars", 1);
|
||||
pref("ui.useOverlayScrollbars", 1);
|
||||
|
@ -561,10 +561,6 @@ pref("ui.dragThresholdY", 25);
|
|||
pref("layers.acceleration.disabled", false);
|
||||
pref("layers.async-video.enabled", true);
|
||||
|
||||
#ifndef MOZ_ANDROID_APZ
|
||||
pref("layers.async-pan-zoom.enabled", false);
|
||||
#endif
|
||||
|
||||
pref("apz.content_response_timeout", 600);
|
||||
pref("apz.allow_immediate_handoff", false);
|
||||
pref("apz.touch_start_tolerance", "0.06");
|
||||
|
|
|
@ -1523,17 +1523,6 @@ var BrowserApp = {
|
|||
if (formHelperMode == kFormHelperModeDisabled)
|
||||
return;
|
||||
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
let focused = this.getFocusedInput(aBrowser);
|
||||
if (focused) {
|
||||
let shouldZoom = Services.prefs.getBoolPref("formhelper.autozoom");
|
||||
if (formHelperMode == kFormHelperModeDynamic && this.isTablet)
|
||||
shouldZoom = false;
|
||||
// ZoomHelper.zoomToElement will handle not sending any message if this input is already mostly filling the screen
|
||||
ZoomHelper.zoomToElement(focused, -1, false,
|
||||
aAllowZoom && shouldZoom && !ViewportHandler.isViewportSpecified(aBrowser.contentWindow));
|
||||
}
|
||||
} else {
|
||||
let dwu = aBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
if (!dwu) {
|
||||
return;
|
||||
|
@ -1574,7 +1563,6 @@ var BrowserApp = {
|
|||
dwu.zoomToFocusedInput();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
|
||||
getUALocalePref: function () {
|
||||
|
@ -3801,43 +3789,11 @@ Tab.prototype = {
|
|||
},
|
||||
|
||||
setViewport: function(aViewport) {
|
||||
if (AppConstants.MOZ_ANDROID_APZ) {
|
||||
// This should already be getting short-circuited out in GeckoLayerClient,
|
||||
// but this is an extra safety precaution
|
||||
return;
|
||||
}
|
||||
|
||||
// Transform coordinates based on zoom
|
||||
let x = aViewport.x / aViewport.zoom;
|
||||
let y = aViewport.y / aViewport.zoom;
|
||||
|
||||
this.setScrollClampingSize(aViewport.zoom);
|
||||
|
||||
let win = this.browser.contentWindow;
|
||||
win.scrollTo(x, y);
|
||||
this.saveSessionZoom(aViewport.zoom);
|
||||
|
||||
this.userScrollPos.x = win.scrollX;
|
||||
this.userScrollPos.y = win.scrollY;
|
||||
this.setResolution(aViewport.zoom, false);
|
||||
|
||||
if (aViewport.displayPort)
|
||||
this.setDisplayPort(aViewport.displayPort);
|
||||
},
|
||||
|
||||
setResolution: function(aZoom, aForce) {
|
||||
if (AppConstants.MOZ_ANDROID_APZ) {
|
||||
return;
|
||||
}
|
||||
// Set zoom level
|
||||
if (aForce || !fuzzyEquals(aZoom, this._zoom)) {
|
||||
this._zoom = aZoom;
|
||||
if (BrowserApp.selectedTab == this) {
|
||||
let cwu = this.browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
this._drawZoom = aZoom;
|
||||
cwu.setResolutionAndScaleTo(aZoom / window.devicePixelRatio);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getViewport: function() {
|
||||
|
@ -3902,13 +3858,7 @@ Tab.prototype = {
|
|||
},
|
||||
|
||||
sendViewportUpdate: function(aPageSizeUpdate) {
|
||||
if (AppConstants.MOZ_ANDROID_APZ) {
|
||||
return;
|
||||
}
|
||||
let viewport = this.getViewport();
|
||||
let displayPort = Services.androidBridge.getDisplayPort(aPageSizeUpdate, BrowserApp.isBrowserContentDocumentDisplayed(), this.id, viewport);
|
||||
if (displayPort != null)
|
||||
this.setDisplayPort(displayPort);
|
||||
},
|
||||
|
||||
// These constants are used to prioritize high quality metadata over low quality data, so that
|
||||
|
@ -4696,15 +4646,7 @@ var BrowserEventHandler = {
|
|||
Services.obs.addObserver(this, "Gesture:SingleTap", false);
|
||||
Services.obs.addObserver(this, "Gesture:ClickInZoomedView", false);
|
||||
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
Services.obs.addObserver(this, "Gesture:CancelTouch", false);
|
||||
Services.obs.addObserver(this, "Gesture:DoubleTap", false);
|
||||
Services.obs.addObserver(this, "Gesture:Scroll", false);
|
||||
Services.obs.addObserver(this, "dom-touch-listener-added", false);
|
||||
BrowserApp.deck.addEventListener("touchstart", this, true);
|
||||
} else {
|
||||
BrowserApp.deck.addEventListener("touchend", this, true);
|
||||
}
|
||||
|
||||
BrowserApp.deck.addEventListener("DOMUpdatePageReport", PopupBlockerObserver.onUpdatePageReport, false);
|
||||
BrowserApp.deck.addEventListener("MozMouseHittest", this, true);
|
||||
|
@ -4928,21 +4870,8 @@ var BrowserEventHandler = {
|
|||
if (this._clickInZoomedView != true) {
|
||||
this._closeZoomedView();
|
||||
}
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
// The _highlightElement was chosen after fluffing the touch events
|
||||
// that led to this SingleTap, so by fluffing the mouse events, they
|
||||
// should find the same target since we fluff them again below.
|
||||
this._sendMouseEvent("mousemove", x, y);
|
||||
this._sendMouseEvent("mousedown", x, y);
|
||||
this._sendMouseEvent("mouseup", x, y);
|
||||
}
|
||||
}
|
||||
this._clickInZoomedView = false;
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
// scrollToFocusedInput does its own checks to find out if an element should be zoomed into
|
||||
BrowserApp.scrollToFocusedInput(BrowserApp.selectedBrowser);
|
||||
}
|
||||
|
||||
this._cancelTapHighlight();
|
||||
break;
|
||||
}
|
||||
|
@ -5016,9 +4945,6 @@ var BrowserEventHandler = {
|
|||
_highlightElement: null,
|
||||
|
||||
_doTapHighlight: function _doTapHighlight(aElement) {
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
DOMUtils.setContentState(aElement, kStateActive);
|
||||
}
|
||||
this._highlightElement = aElement;
|
||||
},
|
||||
|
||||
|
@ -5026,15 +4952,6 @@ var BrowserEventHandler = {
|
|||
if (!this._highlightElement)
|
||||
return;
|
||||
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
// If the active element is in a sub-frame, we need to make that frame's document
|
||||
// active to remove the element's active state.
|
||||
if (this._highlightElement.ownerDocument != BrowserApp.selectedBrowser.contentWindow.document)
|
||||
DOMUtils.setContentState(this._highlightElement.ownerDocument.documentElement, kStateActive);
|
||||
|
||||
DOMUtils.setContentState(BrowserApp.selectedBrowser.contentWindow.document.documentElement, kStateActive);
|
||||
}
|
||||
|
||||
this._highlightElement = null;
|
||||
},
|
||||
|
||||
|
@ -5987,10 +5904,6 @@ var ViewportHandler = {
|
|||
let scrollChange = JSON.parse(aData);
|
||||
let windowUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
windowUtils.setNextPaintSyncId(scrollChange.id);
|
||||
if (!AppConstants.MOZ_ANDROID_APZ) {
|
||||
let win = BrowserApp.selectedTab.browser.contentWindow;
|
||||
win.scrollBy(scrollChange.x, scrollChange.y);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -55,14 +55,6 @@ option(env='MOZ_ANDROID_ACTIVITY_STREAM',
|
|||
set_config('MOZ_ANDROID_ACTIVITY_STREAM',
|
||||
depends_if('MOZ_ANDROID_ACTIVITY_STREAM')(lambda _: True))
|
||||
|
||||
option('--disable-android-apz', env='MOZ_ANDROID_APZ',
|
||||
help='Disable the C++ async pan/zoom code and use the Java version instead')
|
||||
|
||||
android_apz = depends_if('--disable-android-apz')(lambda _: True)
|
||||
|
||||
set_config('MOZ_ANDROID_APZ', android_apz)
|
||||
set_define('MOZ_ANDROID_APZ', android_apz)
|
||||
|
||||
option(env='MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
|
||||
help='Build and package the install bouncer APK',
|
||||
default=True)
|
||||
|
|
|
@ -23,11 +23,7 @@ chrome.jar:
|
|||
skin/aboutSupport.css (aboutSupport.css)
|
||||
skin/browser.css (browser.css)
|
||||
skin/content.css (content.css)
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
skin/scrollbar.css (scrollbar-apz.css)
|
||||
#else
|
||||
skin/scrollbar.css (scrollbar-nonapz.css)
|
||||
#endif
|
||||
skin/config.css (config.css)
|
||||
skin/defines.css (defines.css)
|
||||
skin/touchcontrols.css (touchcontrols.css)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@namespace url("http://www.w3.org/1999/xhtml");
|
||||
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
html xul|scrollbar {
|
||||
display: none;
|
||||
}
|
|
@ -3870,16 +3870,9 @@ pref("print.print_paper_size", 0);
|
|||
// around the content of the page for Print Preview only
|
||||
pref("print.print_extra_margin", 0); // twips
|
||||
|
||||
// CSSOM-View scroll-behavior smooth scrolling and scroll snap requires the C++ APZC
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
pref("layout.css.scroll-behavior.enabled", true);
|
||||
pref("layout.css.scroll-behavior.property-enabled", true);
|
||||
pref("layout.css.scroll-snap.enabled", true);
|
||||
#else
|
||||
pref("layout.css.scroll-behavior.enabled", false);
|
||||
pref("layout.css.scroll-behavior.property-enabled", false);
|
||||
pref("layout.css.scroll-snap.enabled", false);
|
||||
#endif
|
||||
|
||||
/* PostScript print module prefs */
|
||||
// pref("print.postscript.enabled", true);
|
||||
|
|
|
@ -317,12 +317,6 @@ this.AppConstants = Object.freeze({
|
|||
MOZ_B2G_VERSION: @MOZ_B2G_VERSION@,
|
||||
MOZ_B2G_OS_NAME: @MOZ_B2G_OS_NAME@,
|
||||
|
||||
MOZ_ANDROID_APZ:
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@",
|
||||
|
||||
// URL to the hg revision this was built from (e.g.
|
||||
|
|
|
@ -1033,14 +1033,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
MOZ_ASSERT(aNPZC);
|
||||
auto npzc = NativePanZoomController::LocalRef(
|
||||
jni::GetGeckoThreadEnv(),
|
||||
NativePanZoomController::Ref::From(aNPZC));
|
||||
NPZCSupport::AttachNative(
|
||||
npzc, mozilla::MakeUnique<NPZCSupport>(&window, npzc));
|
||||
#endif
|
||||
|
||||
layerClient->OnGeckoReady();
|
||||
}
|
||||
|
@ -3686,30 +3684,7 @@ nsWindow::UpdateZoomConstraints(const uint32_t& aPresShellId,
|
|||
const FrameMetrics::ViewID& aViewId,
|
||||
const mozilla::Maybe<ZoomConstraints>& aConstraints)
|
||||
{
|
||||
#ifdef MOZ_ANDROID_APZ
|
||||
nsBaseWidget::UpdateZoomConstraints(aPresShellId, aViewId, aConstraints);
|
||||
#else
|
||||
if (!aConstraints) {
|
||||
// This is intended to "clear" previously stored constraints but in our
|
||||
// case we don't need to bother since they'll get GC'd from browser.js
|
||||
return;
|
||||
}
|
||||
nsIContent* content = nsLayoutUtils::FindContentFor(aViewId);
|
||||
nsIDocument* doc = content ? content->GetComposedDoc() : nullptr;
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIObserverService> obsServ = mozilla::services::GetObserverService();
|
||||
nsPrintfCString json("{ \"allowZoom\": %s,"
|
||||
" \"allowDoubleTapZoom\": %s,"
|
||||
" \"minZoom\": %f,"
|
||||
" \"maxZoom\": %f }",
|
||||
aConstraints->mAllowZoom ? "true" : "false",
|
||||
aConstraints->mAllowDoubleTapZoom ? "true" : "false",
|
||||
aConstraints->mMinZoom.scale, aConstraints->mMaxZoom.scale);
|
||||
obsServ->NotifyObservers(doc, "zoom-constraints-updated",
|
||||
NS_ConvertASCIItoUTF16(json.get()).get());
|
||||
#endif
|
||||
}
|
||||
|
||||
CompositorBridgeParent*
|
||||
|
|
Загрузка…
Ссылка в новой задаче