mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 930855 Replace WidgetEvent::Is*EventDerivedClass() with WidgetEvent::As*Event() r=smaug
This commit is contained in:
parent
e5981d5541
commit
33786fae4e
@ -135,7 +135,7 @@ RoundDown(double aDouble)
|
||||
static inline bool
|
||||
IsMouseEventReal(WidgetEvent* aEvent)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aEvent->IsMouseDerivedEvent(), "Not a mouse event");
|
||||
NS_ABORT_IF_FALSE(aEvent->AsMouseEvent(), "Not a mouse event");
|
||||
// Return true if not synthesized.
|
||||
return aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal;
|
||||
}
|
||||
|
@ -690,14 +690,6 @@ public:
|
||||
#undef NS_EVENT_CLASS
|
||||
#undef NS_ROOT_EVENT_CLASS
|
||||
|
||||
/**
|
||||
* Returns true if the event is WidgetInputEvent or inherits it.
|
||||
*/
|
||||
bool IsInputDerivedEvent() const;
|
||||
/**
|
||||
* Returns true if the event is WidgetMouseEvent or inherits it.
|
||||
*/
|
||||
bool IsMouseDerivedEvent() const;
|
||||
/**
|
||||
* Returns true if the event is a query content event.
|
||||
*/
|
||||
|
@ -42,18 +42,6 @@ WidgetEvent::As##aName() const \
|
||||
* Event struct type checking methods.
|
||||
******************************************************************************/
|
||||
|
||||
bool
|
||||
WidgetEvent::IsInputDerivedEvent() const
|
||||
{
|
||||
return AsInputEvent() != nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
WidgetEvent::IsMouseDerivedEvent() const
|
||||
{
|
||||
return AsMouseEvent() != nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
WidgetEvent::IsQueryContentEvent() const
|
||||
{
|
||||
|
@ -1209,7 +1209,7 @@ MetroWidget::DispatchWindowEvent(WidgetGUIEvent* aEvent)
|
||||
NS_IMETHODIMP
|
||||
MetroWidget::DispatchEvent(WidgetGUIEvent* event, nsEventStatus & aStatus)
|
||||
{
|
||||
if (event->IsInputDerivedEvent()) {
|
||||
if (event->AsInputEvent()) {
|
||||
UserActivity();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user