Right clicking in an input field to display the context menu causes an ASSERT when creating the sub menu and setting the menu as the parent of the sub-menu in WebContextMenuProxyQt::createContextMenu.
QWidget is statically cast to QObject before calling setParent on it. QObject::setParent asserts if the object is a QWidget.
Created attachment 110554 [details] Patch
Patch attached. Not sure why it was being explcitly cast to QObject. I see that the setParent of QWidget does additional things than QObject. Please review and provide your feedback.
Comment on attachment 110554 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=110554&action=review > Source/WebKit2/UIProcess/qt/WebContextMenuProxyQt.cpp:115 > - static_cast<QObject*>(subMenu.get())->setParent(menu.get()); > + subMenu->setParent(menu.get()); Could you explain (for example in the changelog or whereever appropriate) why your patch fixes the assert? Please also mention what assert exactly :)
Argh, I should've read the bug report first, I see that the comments explain it :)
Created attachment 111429 [details] Patch with ChangeLog update (Can't think of why I didn't do it earlier :) )
Comment on attachment 111429 [details] Patch with ChangeLog update (Can't think of why I didn't do it earlier :) ) Clearing flags on attachment: 111429 Committed r97760: <http://trac.webkit.org/changeset/97760>
All reviewed patches have been landed. Closing bug.