Bug 1340415 - Ensure main-thread and async autoscrolling do not happen at the same time. r=kats
The two happening at the same time can lead to the APZ autoscroll being
cancelled due to APZ receiving a main-thread scroll offset update.
To achieve this:
- The content process assumes APZ is handling the autoscroll until
told otherwise.
- If the parent process knows APZ won't handle an autoscroll, it
tells the content process via its response to the Autoscroll:Start
message. This covers all cases where APZ doesn't handle the
autoscroll, except the case where APZCTreeManager itself rejects
the autoscroll and it lives in the compositor process rather than
the parent process.
- If APZCTreeManager rejects an autoscroll and it lives in the
compositor process, it sends an 'autoscroll-rejected-by-apz' message
to the content process.
MozReview-Commit-ID: L62v4COai6W
This commit is contained in:
@@ -1930,13 +1930,13 @@ nsBaseWidget::StartAsyncScrollbarDrag(const AsyncDragMetrics& aDragMetrics)
|
||||
aDragMetrics));
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
nsBaseWidget::StartAsyncAutoscroll(const ScreenPoint& aAnchorLocation,
|
||||
const ScrollableLayerGuid& aGuid)
|
||||
{
|
||||
MOZ_ASSERT(XRE_IsParentProcess() && AsyncPanZoomEnabled());
|
||||
|
||||
mAPZC->StartAutoscroll(aGuid, aAnchorLocation);
|
||||
return mAPZC->StartAutoscroll(aGuid, aAnchorLocation);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user