diff options
Diffstat (limited to 'WebCore/platform/mac/ContextMenuMac.mm')
-rw-r--r-- | WebCore/platform/mac/ContextMenuMac.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebCore/platform/mac/ContextMenuMac.mm b/WebCore/platform/mac/ContextMenuMac.mm index c427e3c..7c91028 100644 --- a/WebCore/platform/mac/ContextMenuMac.mm +++ b/WebCore/platform/mac/ContextMenuMac.mm @@ -166,6 +166,18 @@ Vector<ContextMenuItem> contextMenuItemVector(PlatformMenuDescription menu) return items; } +PlatformMenuDescription platformMenuDescription(Vector<ContextMenuItem>& menuItemVector) +{ + PlatformMenuDescription platformMenu = [[NSMutableArray alloc] initWithCapacity:menuItemVector.size()]; + for (unsigned i = 0; i < menuItemVector.size(); ++i) { + PlatformMenuItemDescription platformItem = menuItemVector[i].releasePlatformDescription(); + [platformMenu addObject:platformItem]; + [platformItem release]; + } + + return [platformMenu autorelease]; +} + } // namespace WebCore #endif // ENABLE(CONTEXT_MENUS) |