Trevor, thanks for posting your patch. It's good that it was only a
few lines to enable your use case.
I'm not inclined to incorporate these changes for two reasons. First,
as you point out, there are hit testing issues in general with OpenGL
applications on OS X. Apps using Cocoa and Core Graphics won't receive
mouse events when a transparent portion of the top-level window is
hit, but apps using OpenGL do receive those mouse events. This is a
longstanding problem with the window server on OS X and I don't
foresee the behavior changing. It's potentially a security issue in
the context of the web, because untrusted content could make the
window completely transparent, but still receive mouse clicks and
keyboard events. The window server prohibits this for pure Cocoa
applications -- I think the rule is that the app doesn't receive a
mouse event if the pixel it drew underneath the mouse pointer is less
than 10% opaque.
Second, the changes to
compositing_iosurface_mac.mm aren't gated on
whether the view is transparent. In ordinary Chromium we would not
want to pay any potential performance penalty from making the OpenGL
context transparent.
If maintaining these diffs in your own tree is a significant burden,
let me know and maybe we can figure out a way to upstream them.
-Ken