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)
|
, mActiveTouchId(-1)
|
||||||
, mCaretCenterToDownPointOffsetY(0)
|
, mCaretCenterToDownPointOffsetY(0)
|
||||||
, mDragMode(NONE)
|
, mDragMode(NONE)
|
||||||
, mAsyncPanZoomEnabled(false)
|
, mUseAsyncPanZoom(false)
|
||||||
, mInAsyncPanZoomGesture(false)
|
, mInAsyncPanZoomGesture(false)
|
||||||
, mEndCaretVisible(false)
|
, mEndCaretVisible(false)
|
||||||
, mStartCaretVisible(false)
|
, mStartCaretVisible(false)
|
||||||
@ -113,8 +113,9 @@ SelectionCarets::Init()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
docShell->GetAsyncPanZoomEnabled(&mAsyncPanZoomEnabled);
|
#if defined(MOZ_WIDGET_GONK)
|
||||||
mAsyncPanZoomEnabled = mAsyncPanZoomEnabled && gfxPrefs::AsyncPanZoomEnabled();
|
mUseAsyncPanZoom = gfxPrefs::AsyncPanZoomEnabled();
|
||||||
|
#endif
|
||||||
|
|
||||||
docShell->AddWeakReflowObserver(this);
|
docShell->AddWeakReflowObserver(this);
|
||||||
docShell->AddWeakScrollObserver(this);
|
docShell->AddWeakScrollObserver(this);
|
||||||
@ -1189,7 +1190,7 @@ void
|
|||||||
SelectionCarets::ScrollPositionChanged()
|
SelectionCarets::ScrollPositionChanged()
|
||||||
{
|
{
|
||||||
if (mVisible) {
|
if (mVisible) {
|
||||||
if (!mAsyncPanZoomEnabled) {
|
if (!mUseAsyncPanZoom) {
|
||||||
SetVisibility(false);
|
SetVisibility(false);
|
||||||
//TODO: handling scrolling for selection bubble when APZ is off
|
//TODO: handling scrolling for selection bubble when APZ is off
|
||||||
|
|
||||||
@ -1214,7 +1215,7 @@ SelectionCarets::ScrollPositionChanged()
|
|||||||
void
|
void
|
||||||
SelectionCarets::LaunchLongTapDetector()
|
SelectionCarets::LaunchLongTapDetector()
|
||||||
{
|
{
|
||||||
if (mAsyncPanZoomEnabled) {
|
if (mUseAsyncPanZoom) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1236,7 +1237,7 @@ SelectionCarets::LaunchLongTapDetector()
|
|||||||
void
|
void
|
||||||
SelectionCarets::CancelLongTapDetector()
|
SelectionCarets::CancelLongTapDetector()
|
||||||
{
|
{
|
||||||
if (mAsyncPanZoomEnabled) {
|
if (mUseAsyncPanZoom) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,8 +258,8 @@ private:
|
|||||||
|
|
||||||
DragMode mDragMode;
|
DragMode mDragMode;
|
||||||
|
|
||||||
// True if AsyncPanZoom is enabled
|
// True if async-pan-zoom should be used for selection carets.
|
||||||
bool mAsyncPanZoomEnabled;
|
bool mUseAsyncPanZoom;
|
||||||
// True if AsyncPanZoom is started
|
// True if AsyncPanZoom is started
|
||||||
bool mInAsyncPanZoomGesture;
|
bool mInAsyncPanZoomGesture;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user