зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1482825 - Only prevent dispatching mouse-move events targeted at a slider frame to web content, if the scrollbar is being dragged. r=smaug
Otherwise, if the mouse is just moving over the scrollbar, mouse-move events are dispatched to web content. Differential Revision: https://phabricator.services.mozilla.com/D4800 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fa4326d0f2
Коммит
08a635ccc8
|
@ -1196,7 +1196,7 @@ nsSliderFrame::DragThumb(bool aGrabMouseEvents)
|
|||
}
|
||||
|
||||
bool
|
||||
nsSliderFrame::isDraggingThumb()
|
||||
nsSliderFrame::isDraggingThumb() const
|
||||
{
|
||||
return (nsIPresShell::GetCapturingContent() == GetContent());
|
||||
}
|
||||
|
@ -1567,7 +1567,8 @@ nsSliderFrame::OnlySystemGroupDispatch(EventMessage aMessage) const
|
|||
// If we are in a native anonymous subtree, do not dispatch mouse-move events
|
||||
// targeted at this slider frame to web content. This matches the behaviour
|
||||
// of other browsers.
|
||||
return aMessage == eMouseMove && GetContent()->IsInNativeAnonymousSubtree();
|
||||
return aMessage == eMouseMove && isDraggingThumb() &&
|
||||
GetContent()->IsInNativeAnonymousSubtree();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsSliderMediator,
|
||||
|
|
|
@ -162,7 +162,7 @@ private:
|
|||
void DragThumb(bool aGrabMouseEvents);
|
||||
void AddListener();
|
||||
void RemoveListener();
|
||||
bool isDraggingThumb();
|
||||
bool isDraggingThumb() const;
|
||||
|
||||
void SuppressDisplayport();
|
||||
void UnsuppressDisplayport();
|
||||
|
|
Загрузка…
Ссылка в новой задаче