Closed Bug 1142380 Opened 10 years ago Closed 9 years ago

Make touch working in b2g if APZ is disabled

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kershaw, Assigned: kats)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files, 2 obsolete files)

Please take a look at bug 1124087 comment #6. In order to test nested-oop iframe in b2g, we need to make touch working if APZ is disabled.
kats, Could you please provide a patch as you mentioned at bug 1124087 comment #6? Thanks.
Flags: needinfo?(bugmail.mozilla)
Whiteboard: [gfx-noted]
Attached patch Make B2G work without APZ (obsolete) — Splinter Review
This should do the job. I don't want to land this patch but you can apply it locally and work with it as needed. I hope to make some changes to the code in the next few days so that B2G will work with APZ disabled without having to apply this. I'm not sure exactly when I'll get around to it though.
Flags: needinfo?(bugmail.mozilla)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2) > Created attachment 8577264 [details] [diff] [review] > Make B2G work without APZ > > This should do the job. I don't want to land this patch but you can apply it > locally and work with it as needed. I hope to make some changes to the code > in the next few days so that B2G will work with APZ disabled without having > to apply this. I'm not sure exactly when I'll get around to it though. Thanks. It works on my flame.
I've had some patches to fix this sitting in my local repo for a while now, and even if we don't care about B2G with APZ disabled the cleanup bits are worth landing, I think.
Assignee: nobody → bugmail.mozilla
Attachment #8577264 - Attachment is obsolete: true
Attachment #8614832 - Flags: review?(botond)
I don't know if we actually want to land this part.
Comment on attachment 8614832 [details] [diff] [review] Part 1 - Cleanup some widget code Review of attachment 8614832 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/gonk/nsWindow.cpp @@ +214,5 @@ > > + if (gFocusedWindow) { > + gFocusedWindow->DispatchAPZAwareEvent(aInput); > + NS_DispatchToMainThread(NS_NewRunnableFunction([=]() { > + gFocusedWindow->UserActivity(); We're moving the UserActivity() call from before ProcessUntransformedAPZEvent() to after. We're also creating a second task for it. Is this desirable? ::: widget/nsBaseWidget.cpp @@ +1098,5 @@ > return status; > } > > +// This is a version of DispatchAPZAwareEvent intended for use on > +// platforms where the main thread is NOT the APZ controller thread. Please move this comment into the header, and add a comment to the other overload that says it's meant for platforms where the two threads are the same.
Comment on attachment 8614833 [details] [diff] [review] Part 2 - Avoid a crash from passing garbage over IPC Review of attachment 8614833 [details] [diff] [review]: ----------------------------------------------------------------- Out of curiosity, how does the garbage cause crashes?
Attachment #8614833 - Flags: review?(botond) → review+
(In reply to Botond Ballo [:botond] from comment #8) > > + if (gFocusedWindow) { > > + gFocusedWindow->DispatchAPZAwareEvent(aInput); > > + NS_DispatchToMainThread(NS_NewRunnableFunction([=]() { > > + gFocusedWindow->UserActivity(); > > We're moving the UserActivity() call from before > ProcessUntransformedAPZEvent() to after. We're also creating a second task > for it. > > Is this desirable? I can move the UserActivity() call up to before, and probably make a static task that we reuse. That reduces the overhead to an extra pointer in the task queue, which I don't think is so bad. > ::: widget/nsBaseWidget.cpp > @@ +1098,5 @@ > > return status; > > } > > > > +// This is a version of DispatchAPZAwareEvent intended for use on > > +// platforms where the main thread is NOT the APZ controller thread. > > Please move this comment into the header, and add a comment to the other > overload that says it's meant for platforms where the two threads are the > same. Ok, I can do that. (In reply to Botond Ballo [:botond] from comment #9) > > Out of curiosity, how does the garbage cause crashes? Apparently there's some IPC code that checks for valid values or something. It's the first time I've encountered it, but I got a crash with a message like this: [Child 2579] ###!!! ABORT: IPDL error [PBrowserChild]: \"Error deserializing 'nsEventStatus'\". abort()ing as a result.: file /home/kats/zspace/B2G-flame-kk/gecko/ipc/glue/ProtocolUtils.cpp, line 327") at /home/kats/zspace/B2G-flame-kk/gecko/memory/mozalloc/mozalloc_abort.cpp:33
(Further up the stack the error was coming from this code in the auto-generated PBrowserChild.cpp: if ((!(Read((&(aApzResponse)), (&(msg__)), (&(iter__)))))) { FatalError("Error deserializing 'nsEventStatus'"); return MsgValueError; }
Ah - ContiguousEnumSerializer returns false from Read() if the enum value is not within the range of valid values. Very nice!
Comment on attachment 8614832 [details] [diff] [review] Part 1 - Cleanup some widget code Dropping this review for now, there might be additional cleanup that we can do as discussed on IRC (e.g. merging DispatchInputEvent with DispatchAPZAwareEvent) but it's low-priority.
Attachment #8614832 - Flags: review?(botond)
Comment on attachment 8614833 [details] [diff] [review] Part 2 - Avoid a crash from passing garbage over IPC Moved this patch to bug 1173719 and landed it.
Attachment #8614833 - Attachment is obsolete: true
I don't think we want to support B2G without APZ. The cleanup patch here isn't sufficiently useful to warrant spending more time on it right now. If we touch that code again in the future we can clean it up then.
Status: NEW → RESOLVED
Closed: 9 years ago
Component: Graphics → Widget: Gonk
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: