Closed Bug 518542 Opened 15 years ago Closed 15 years ago

Two-finger scrolling does not work on Snow Leopard

Categories

(Firefox :: General, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: joelr, Assigned: jaas)

References

Details

Attachments

(1 file, 1 obsolete file)

Works fine in the 32-bit build.
That's because Josh has just ifdef'd out all the scrolling code.
Blocks: 513777
Josh, what's the problem with scrolling?
I forgot to file this bug when I landed the patch. See our implementation of:

-(void)scrollWheel:(NSEvent*)theEvent forAxis:(enum nsMouseScrollEvent::nsMouseScrollFlags)inAxis

which right now is at:

http://mxr.mozilla.org/mozilla-central/source/widget/src/cocoa/nsChildView.mm#3546

It uses APIs that are not available to 64-bit applications.
Which APIs are that? Anything other than the Carbon plugin events?
I don't remember, whoever ends up working on this will have to look at the code.
Assignee: nobody → joelr
Is inheriting from NSScrollView an option here: 

http://mxr.mozilla.org/mozilla-central/source/widget/src/cocoa/nsChildView.h#118

We could then piggyback on the standard Cocoa scrolling APIs:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/Scrolling.html#//apple_ref/doc/uid/TP40003463-SW3

It may be possible to do this without NSScrollView but I need to run some tests.
No, that's not an option. One reason is that not all Gecko scrollboxes have their own NSView; another reason is that we need to send mouse wheel events so that websites can process them and do other things than scrolling (e.g. zooming on Google Maps).
It seems that the only option is to piggyback on mouse dragging:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html

If not all scrollboxes have their their own NSView then either we'll need to work with the parent NSView or we are screwed.
What do you mean with mouse dragging? Two finger scrolling works via the NSResponder method -(void)scrollWheel:(NSEvent*)theEvent that josh pointed to. We don't need an NSScrollView to receive those events.
Attachment #402716 - Flags: review?(mstange)
Attachment #402716 - Flags: review?(mstange) → review?(joshmoz)
Attached patch fix v1.1Splinter Review
There were some other things bothering me here. I fixed them in this patch and I filed bug 519100 about providing scroll wheel events to Cocoa NPAPI plugins.
Assignee: joelr → joshmoz
Attachment #402716 - Attachment is obsolete: true
Attachment #403097 - Flags: review?
Attachment #402716 - Flags: review?(joshmoz)
Attachment #403097 - Flags: review? → review?(joelr)
Attachment #403097 - Flags: review?(joelr) → review+
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/48ed3509beaf
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: