Backed out changeset de19c60e56bd

This commit is contained in:
David Anderson 2015-03-11 12:28:28 -07:00
parent 27005afac7
commit 20bb991890
2 changed files with 8 additions and 10 deletions

View File

@ -77,7 +77,7 @@ SelectionCarets::SelectionCarets(nsIPresShell* aPresShell)
, mActiveTouchId(-1)
, mCaretCenterToDownPointOffsetY(0)
, mDragMode(NONE)
, mUseAsyncPanZoom(false)
, mAsyncPanZoomEnabled(false)
, mInAsyncPanZoomGesture(false)
, mEndCaretVisible(false)
, mStartCaretVisible(false)
@ -113,10 +113,8 @@ SelectionCarets::Init()
return;
}
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)
docShell->GetAsyncPanZoomEnabled(&mUseAsyncPanZoom);
mUseAsyncPanZoom = mUseAsyncPanZoom && gfxPrefs::AsyncPanZoomEnabled();
#endif
docShell->GetAsyncPanZoomEnabled(&mAsyncPanZoomEnabled);
mAsyncPanZoomEnabled = mAsyncPanZoomEnabled && gfxPrefs::AsyncPanZoomEnabled();
docShell->AddWeakReflowObserver(this);
docShell->AddWeakScrollObserver(this);
@ -1191,7 +1189,7 @@ void
SelectionCarets::ScrollPositionChanged()
{
if (mVisible) {
if (!mUseAsyncPanZoom) {
if (!mAsyncPanZoomEnabled) {
SetVisibility(false);
//TODO: handling scrolling for selection bubble when APZ is off
@ -1216,7 +1214,7 @@ SelectionCarets::ScrollPositionChanged()
void
SelectionCarets::LaunchLongTapDetector()
{
if (mUseAsyncPanZoom) {
if (mAsyncPanZoomEnabled) {
return;
}
@ -1238,7 +1236,7 @@ SelectionCarets::LaunchLongTapDetector()
void
SelectionCarets::CancelLongTapDetector()
{
if (mUseAsyncPanZoom) {
if (mAsyncPanZoomEnabled) {
return;
}

View File

@ -258,8 +258,8 @@ private:
DragMode mDragMode;
// True if async-pan-zoom should be used for selection carets.
bool mUseAsyncPanZoom;
// True if AsyncPanZoom is enabled
bool mAsyncPanZoomEnabled;
// True if AsyncPanZoom is started
bool mInAsyncPanZoomGesture;