Don't use APZ for selection carets on Desktop. (bug 1141855, r=kats)

This commit is contained in:
dvander@alliedmods.net 2015-03-11 12:29:06 -07:00
parent 20bb991890
commit b106231552
2 changed files with 9 additions and 8 deletions

View File

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

View File

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