Bug 1367765 - Propagate the mHandledByAPZ flag when dispatching a touch event to the DOM. r=rhunt
This ensures that, if the touch event is over a scrollbar thumb and
makes it into nsSliderFrame::StartAPZDrag(), nsSliderFrame knows
that the event went through APZ and that therefore APZ will handle
the drag.
MozReview-Commit-ID: 92wAc1l9Pqz
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -8458,16 +8458,17 @@ PresShell::DispatchTouchEventToDOM(Widge
}
content = capturingContent;
}
// copy the event
WidgetTouchEvent newEvent(touchEvent->IsTrusted(),
touchEvent->mMessage, touchEvent->mWidget);
newEvent.AssignTouchEventData(*touchEvent, false);
newEvent.mTarget = targetPtr;
+ newEvent.mFlags.mHandledByAPZ = touchEvent->mFlags.mHandledByAPZ;
RefPtr<PresShell> contentPresShell;
if (doc == mDocument) {
contentPresShell = static_cast<PresShell*>(doc->GetShell());
if (contentPresShell) {
//XXXsmaug huge hack. Pushing possibly capturing content,
// even though event target is something else.
contentPresShell->PushCurrentEventInfo(