<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:mcatanzaro@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <span class="fn">Michael Catanzaro</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType"
href="https://bugs.webkit.org/show_bug.cgi?id=151513">bug 151513</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>mcatanzaro@igalia.com
</td>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType"
href="https://bugs.webkit.org/show_bug.cgi?id=151513#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType"
href="https://bugs.webkit.org/show_bug.cgi?id=151513">bug 151513</a>
from <span class="vcard"><a class="email" href="mailto:mcatanzaro@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
<pre>The problem is that the WebContextMenuItemGtk::WebContextMenuItemGtk(const WebContextMenuItemData& data) always fails if data is of type ContextMenuItemType::SubmenuType, because it chains up to the wrong WebContextMenuItemData constructor. There's no way to determine the right constructor to chain up to, so I added a new one accepting a WebContextMenuItemData and switched WebContextMenuItemGtk::WebContextMenuItemGtk(const WebContextMenuItemData& data) to use it instead:
WebContextMenuItemData::WebContextMenuItemData(const WebContextMenuItemData& data)
: m_type(data.m_type)
, m_action(data.m_action)
, m_title(data.m_title)
{
if (m_type == WebCore::SubmenuType)
m_submenu = data.submenu();
m_enabled = data.m_enabled;
m_checked = data.m_checked;
}
That fixed the crash, but resulted in a submenu that is completely empty, which isn't good. Also, the GTK+ API test TestContextMenu is still crashing on the same assertion. This requires further investigation.
Also possibly problematic is the fact that our API allows removing a submenu (by passing NULL to webkit_context_menu_item_set_submenu) while leaving it with SubmenuType.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>