зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1669673 - Part 1: setPointerCapture shoult not make a draggable element to be undraggable; r=smaug
See https://w3c.github.io/pointerevents/#the-pointercancel-event. Differential Revision: https://phabricator.services.mozilla.com/D93294
This commit is contained in:
Родитель
4590354bf7
Коммит
fd2c481654
|
@ -122,10 +122,6 @@ void PointerEventHandler::UpdateActivePointerState(WidgetMouseEvent* aEvent) {
|
|||
void PointerEventHandler::SetPointerCaptureById(uint32_t aPointerId,
|
||||
Element* aElement) {
|
||||
MOZ_ASSERT(aElement);
|
||||
if (MouseEvent_Binding::MOZ_SOURCE_MOUSE == GetPointerType(aPointerId)) {
|
||||
PresShell::SetCapturingContent(aElement, CaptureFlags::PreventDragStart);
|
||||
}
|
||||
|
||||
PointerCaptureInfo* pointerCaptureInfo = GetPointerCaptureInfo(aPointerId);
|
||||
if (pointerCaptureInfo) {
|
||||
pointerCaptureInfo->mPendingElement = aElement;
|
||||
|
@ -146,10 +142,6 @@ PointerCaptureInfo* PointerEventHandler::GetPointerCaptureInfo(
|
|||
void PointerEventHandler::ReleasePointerCaptureById(uint32_t aPointerId) {
|
||||
PointerCaptureInfo* pointerCaptureInfo = GetPointerCaptureInfo(aPointerId);
|
||||
if (pointerCaptureInfo && pointerCaptureInfo->mPendingElement) {
|
||||
if (MouseEvent_Binding::MOZ_SOURCE_MOUSE == GetPointerType(aPointerId)) {
|
||||
// XXX Why do we need CaptureFlags::PreventDragStart here?
|
||||
PresShell::SetCapturingContent(nullptr, CaptureFlags::PreventDragStart);
|
||||
}
|
||||
pointerCaptureInfo->mPendingElement = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче