mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Don't use APZ for selection carets on Desktop. (bug 1141855, r=kats)
This commit is contained in:
parent
20bb991890
commit
b106231552
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user