Fix ContextMenu allocation in the Qt port.
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2007 13:09:15 +0000 (13:09 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2007 13:09:15 +0000 (13:09 +0000)
commit5903b1e513bceaaf2063f2b1d748c74936863189
treea34dd16f0bdaa97967710a590429adf229b1acab
parent199d4606b9216db03b777b492b4d020cf90f5ff6
Fix ContextMenu allocation in the Qt port.

Store all items and submenus value based in ContextMenu and ContextMenuItem.
That fixes the crashes when the context menu was populated with sub-menus because
of the use of temporary ContextMenu objects like this:

ContextMenu subMenu(...);
subMenu.appendItem(...);
subMenu.appendItem(...);

subMenuItem.setSubMenu(&subMenu); // temporary pointer, need to _copy_ contents

Signed-off-by: Holger
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/platform/ContextMenu.h
WebCore/platform/ContextMenuItem.h
WebCore/platform/PlatformMenuDescription.h
WebCore/platform/qt/ContextMenuItemQt.cpp
WebCore/platform/qt/ContextMenuQt.cpp
WebKit/qt/Api/qwebpage.cpp
WebKit/qt/Api/qwebpage_p.h
WebKit/qt/ChangeLog