(Split off from bug 22784) On Mac OS, when a pop-up menu control has focus, pressing an arrow key or the spacebar should pop up the menu. On other platforms, the arrow keys will just change the currently selected item without popping it up. WebCore's SelectElement.cpp configures what behavior to use by defining a constant ARROW_KEYS_POP_UP_MENU. This constant is currently set to true if PLATFORM(MAC) is enabled. Unfortunately, in the Mac build of Chromium this flag is always false, because other code in WebCore assumes that if it's on, AppKit is available (which is not true inside a Chromium renderer process.) So that means Mac Chromium gets the wrong key behavior for pop-ups. I've fixed this by changing the definition of ARROW_KEYS_POP_UP_MENU from #if PLATFORM(MAC) to #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN)) which is a bit of a hack, but the best we can do given that there isn't currently a 'Mac platform but not necessarily AppKit' flag. (See 22784 for the discussion that led to using this particular test.)
Created attachment 33092 [details] patch for ARROW_KEYS_POP_MENU It's the feel-good, focused patch of the summer! The critics are raving: "If you had a patch and a bug just for the define change for ARROW_KEYS_POP_MENU. I'd r+ it right now." --David Levin, from comment in 22784
Assign to levin for landing.
Committed as http://trac.webkit.org/changeset/46185