Changeset 185825 in webkit
- Timestamp:
- Jun 22, 2015, 5:42:33 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/gtk/WebKitContextMenuClient.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r185824 r185825 1 2015-06-22 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r182303): [GTK] Context menu API is broken since r182303 4 https://bugs.webkit.org/show_bug.cgi?id=146202 5 6 Reviewed by Žan Doberšek. 7 8 The problem is that ContextMenuclient API changed in r182303, but 9 we didn't notice it either, and the default handler for 10 getContextMenuFromProposedMenu was executed. An override keyword 11 would have caught this. 12 13 * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Build a Vector of 14 WebContextMenuItemData as expected by our API, and add add 15 override keyword to ensure this doesn't happen again. 16 1 17 2015-06-22 Zan Dobersek <zdobersek@igalia.com> 2 18 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp
r182310 r185825 22 22 23 23 #include "APIContextMenuClient.h" 24 #include "WebContextMenuItem.h" 24 25 #include "WebKitWebViewBasePrivate.h" 25 26 #include "WebKitWebViewPrivate.h" … … 35 36 36 37 private: 37 bool getContextMenuFromProposedMenu(WebPageProxy&, const Vector< WebContextMenuItemData>& proposedMenu, Vector<WebContextMenuItemData>&, const WebHitTestResult::Data& hitTestResultData, API::Object* userData)38 bool getContextMenuFromProposedMenu(WebPageProxy&, const Vector<RefPtr<WebContextMenuItem>>& proposedMenu, Vector<RefPtr<WebContextMenuItem>>&, const WebHitTestResult::Data& hitTestResultData, API::Object* userData) override 38 39 { 39 40 GRefPtr<GVariant> variant; … … 43 44 variant = adoptGRef(g_variant_parse(nullptr, userDataString.data(), userDataString.data() + userDataString.length(), nullptr, nullptr)); 44 45 } 45 webkitWebViewPopulateContextMenu(m_webView, proposedMenu, hitTestResultData, variant.get()); 46 47 Vector<WebContextMenuItemData> menuItems; 48 menuItems.reserveInitialCapacity(proposedMenu.size()); 49 for (auto& item : proposedMenu) 50 menuItems.uncheckedAppend(*item->data()); 51 webkitWebViewPopulateContextMenu(m_webView, menuItems, hitTestResultData, variant.get()); 46 52 return true; 47 53 }
Note:
See TracChangeset
for help on using the changeset viewer.