mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset cb8973818578 (bug 976605)
This commit is contained in:
parent
4a76853977
commit
6fca18d657
@ -779,6 +779,7 @@ APZCTreeManager::HandOffFling(AsyncPanZoomController* aPrev, ScreenPoint aVeloci
|
||||
next->TakeOverFling(transformedVelocity);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
APZCTreeManager::FlushRepaintsForOverscrollHandoffChain()
|
||||
{
|
||||
@ -795,30 +796,6 @@ APZCTreeManager::FlushRepaintsForOverscrollHandoffChain()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
APZCTreeManager::CanBePanned(AsyncPanZoomController* aApzc)
|
||||
{
|
||||
MonitorAutoLock lock(mTreeLock); // to access mOverscrollHandoffChain
|
||||
|
||||
// Find |aApzc| in the handoff chain.
|
||||
uint32_t i;
|
||||
for (i = 0; i < mOverscrollHandoffChain.length(); ++i) {
|
||||
if (mOverscrollHandoffChain[i] == aApzc) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// See whether any APZC in the handoff chain starting from |aApzc|
|
||||
// has room to be panned.
|
||||
for (uint32_t j = i; j < mOverscrollHandoffChain.length(); ++j) {
|
||||
if (mOverscrollHandoffChain[j]->IsPannable()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
APZCTreeManager::HitTestAPZC(const ScreenIntPoint& aPoint)
|
||||
{
|
||||
|
@ -271,13 +271,6 @@ public:
|
||||
|
||||
bool FlushRepaintsForOverscrollHandoffChain();
|
||||
|
||||
/**
|
||||
* Determine whether |aApzc|, or any APZC along its overscroll handoff chain,
|
||||
* has room to be panned.
|
||||
* Expects the overscroll handoff chain to already be built.
|
||||
*/
|
||||
bool CanBePanned(AsyncPanZoomController* aApzc);
|
||||
|
||||
protected:
|
||||
// Protected destructor, to discourage deletion outside of Release():
|
||||
virtual ~APZCTreeManager();
|
||||
|
@ -616,18 +616,11 @@ nsEventStatus AsyncPanZoomController::OnTouchStart(const MultiTouchInput& aEvent
|
||||
case FLING:
|
||||
CancelAnimation();
|
||||
// Fall through.
|
||||
case NOTHING: {
|
||||
case NOTHING:
|
||||
mX.StartTouch(point.x);
|
||||
mY.StartTouch(point.y);
|
||||
APZCTreeManager* treeManagerLocal = mTreeManager;
|
||||
if (treeManagerLocal) {
|
||||
bool touchCanBePan = treeManagerLocal->CanBePanned(this);
|
||||
mGeckoContentController->NotifyAPZStateChange(
|
||||
GetGuid(), APZStateChange::StartTouch, touchCanBePan);
|
||||
}
|
||||
SetState(TOUCHING);
|
||||
break;
|
||||
}
|
||||
case TOUCHING:
|
||||
case PANNING:
|
||||
case PANNING_LOCKED_X:
|
||||
@ -1453,11 +1446,6 @@ void AsyncPanZoomController::FlushRepaintForOverscrollHandoff() {
|
||||
UpdateSharedCompositorFrameMetrics();
|
||||
}
|
||||
|
||||
bool AsyncPanZoomController::IsPannable() const {
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
return mX.HasRoomToPan() || mY.HasRoomToPan();
|
||||
}
|
||||
|
||||
void AsyncPanZoomController::RequestContentRepaint() {
|
||||
RequestContentRepaint(mFrameMetrics);
|
||||
}
|
||||
@ -2006,10 +1994,10 @@ void AsyncPanZoomController::SetState(PanZoomState aNewState) {
|
||||
if (mGeckoContentController) {
|
||||
if (!IsTransformingState(oldState) && IsTransformingState(aNewState)) {
|
||||
mGeckoContentController->NotifyAPZStateChange(
|
||||
GetGuid(), APZStateChange::TransformBegin);
|
||||
GetGuid(), APZStateChange::TransformBegin);
|
||||
} else if (IsTransformingState(oldState) && !IsTransformingState(aNewState)) {
|
||||
mGeckoContentController->NotifyAPZStateChange(
|
||||
GetGuid(), APZStateChange::TransformEnd);
|
||||
GetGuid(), APZStateChange::TransformEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,11 +332,6 @@ public:
|
||||
mTestAsyncScrollOffset = aPoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this APZC has room to be panned (in any direction).
|
||||
*/
|
||||
bool IsPannable() const;
|
||||
|
||||
protected:
|
||||
// Protected destructor, to discourage deletion outside of Release():
|
||||
~AsyncPanZoomController();
|
||||
|
@ -244,12 +244,6 @@ bool Axis::ScaleWillOverscrollBothSides(float aScale) {
|
||||
return GetRectLength(metrics.mScrollableRect) < GetRectLength(cssCompositionBounds);
|
||||
}
|
||||
|
||||
bool Axis::HasRoomToPan() const {
|
||||
return GetOrigin() > GetPageStart()
|
||||
|| GetCompositionEnd() < GetPageEnd();
|
||||
}
|
||||
|
||||
|
||||
AxisX::AxisX(AsyncPanZoomController* aAsyncPanZoomController)
|
||||
: Axis(aAsyncPanZoomController)
|
||||
{
|
||||
|
@ -170,11 +170,6 @@ public:
|
||||
*/
|
||||
bool ScaleWillOverscrollBothSides(float aScale);
|
||||
|
||||
/**
|
||||
* Returns whether there is room to pan on this axis in either direction.
|
||||
*/
|
||||
bool HasRoomToPan() const;
|
||||
|
||||
float GetOrigin() const;
|
||||
float GetCompositionLength() const;
|
||||
float GetPageStart() const;
|
||||
|
@ -122,11 +122,6 @@ public:
|
||||
* APZ finished modifying the view.
|
||||
*/
|
||||
TransformEnd,
|
||||
/**
|
||||
* APZ started a touch.
|
||||
* |aArg| is 1 if touch can be a pan, 0 otherwise.
|
||||
*/
|
||||
StartTouch,
|
||||
APZStateChangeSentinel
|
||||
MOZ_END_NESTED_ENUM_CLASS(APZStateChange)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user