mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 07:17:30 +09:00
Issue #2030 - (chore) refactor event dispatch functions
Based on selected bits of M-C 1461708: - EventStateManager::CheckForAndDispatchClick() to early-return style - split EventStateManager::CheckForAndDispatchClick() into: EventCausesClickEvents, PostHandleMouseUp, DispatchClickEvents - Move implementation of UIEvent::GetRangeParent() and UIEvent::RangeOffset() to nsLayoutUtils
This commit is contained in:
parent
6d6d149b6f
commit
4d310562d9
5 changed files with 292 additions and 97 deletions
|
|
@ -728,6 +728,21 @@ public:
|
|||
nsPresContext* aPresContext,
|
||||
const mozilla::WidgetEvent* aEvent);
|
||||
|
||||
/**
|
||||
* Get container and offset if aEvent collapses Selection.
|
||||
* @param aPresShell The PresShell handling aEvent.
|
||||
* @param aEvent The event having coordinates where you want to
|
||||
* collapse Selection.
|
||||
* @param aContainer Returns the container node at the point.
|
||||
* Set nullptr if you don't need this.
|
||||
* @param aOffset Returns offset in the container node at the point.
|
||||
* Set nullptr if you don't need this.
|
||||
*/
|
||||
static void GetContainerAndOffsetAtEvent(nsIPresShell* aPresShell,
|
||||
const mozilla::WidgetEvent* aEvent,
|
||||
nsIContent** aContainer,
|
||||
int32_t* aOffset);
|
||||
|
||||
/**
|
||||
* Translate from widget coordinates to the view's coordinates
|
||||
* @param aPresContext the PresContext for the view
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue