Closed Bug 1156315 Opened 9 years ago Closed 9 years ago

nsChildView needs to call DispatchInputEvent in more places to get better APZ behavior

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(1 file)

At the moment we're not letting APZ know about mouse move events so it doesn't reset the wheel transaction properly.
Attached patch patch (deleted) — Splinter Review
There are more places I could convert, but I'm too lazy to do it at the moment.
Attachment #8595549 - Flags: review?(dvander)
Comment on attachment 8595549 [details] [diff] [review]
patch

Review of attachment 8595549 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with comment fixed

::: widget/cocoa/nsChildView.mm
@@ +4492,5 @@
>    else
>      geckoEvent.button = WidgetMouseEvent::eLeftButton;
>  
>    // This might destroy our widget (and null out mGeckoChild).
> +  bool defaultPrevented = mGeckoChild->DispatchInputEvent(&geckoEvent);

here, and...

@@ +5452,5 @@
>  
>    WidgetMouseEvent geckoEvent(true, NS_MOUSE_ACTIVATE, mGeckoChild,
>                                WidgetMouseEvent::eReal);
>    [self convertCocoaMouseEvent:aEvent toGeckoEvent:&geckoEvent];
> +  return !mGeckoChild->DispatchInputEvent(&geckoEvent);

Here, nsBaseWidget::DispatchInputEvent returns nsEventStatus not boolean. So you need a ConvertStatus unless there's a wrapper I missed.
Attachment #8595549 - Flags: review?(dvander) → review+
Huh, don't know how I missed that. Thanks!
Blassey mentioned on IRC that he enabled APZ on mac and was intermittently seeing the tab list scroll while the mouse pointer was in the content area and he scrolled with the trackpad. I suspect this patch might fix the behaviour by more properly untransforming events to take into account the async transform. I hope.
Yes, this patch should fix that.
https://hg.mozilla.org/mozilla-central/rev/80518fa5c0d6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: