Bug 839318: context-menu should overflow based on the number of visible menu items.
(cherry picked from commit 83b1d8fc326829d71a23c06ed4e0a51b0c72502c)