Hi, in contextMenuItemVector, menuItemVector.append(ContextMenuItem(GTK_MENU_ITEM(widget))); creates a ContextMenuItem, and pass it to Vector::append(const U& val) which then creates a new object with new T(val) which just copies the ContextMenuItem object so, it's possible to just pass GTK_MENU_ITEM(widget), and only one ContextMenuItem object will be created. The same pattern is also present in KeyBindingTranslator::addPendingEditorCommand
Created attachment 146904 [details] patch proposal
Comment on attachment 146904 [details] patch proposal Clearing flags on attachment: 146904 Committed r123821: <http://trac.webkit.org/changeset/123821>
All reviewed patches have been landed. Closing bug.