Changeset 73305 in webkit
- Timestamp:
- Dec 3, 2010 2:36:04 PM (13 years ago)
- Location:
- trunk/WebKit/win
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/win/ChangeLog
r73163 r73305 1 2010-12-03 Brian Weinstein <bweinstein@apple.com> 2 3 Reviewed by Brady Eidson. 4 5 WebContextMenuClient::fixMenuReceivedFromOldSafari is no longer needed on Windows 6 https://bugs.webkit.org/show_bug.cgi?id=50486 7 8 Remove the static fixMenuReceivedFromOldSafari and isPreInspectElementTagSafari methods 9 from WebContextMenuClient. There were there for when WebKit had the Inspect Element context menu 10 item, but Safari didn't support it. We don't support that old Safari, so that code can go. 11 12 * WebCoreSupport/WebContextMenuClient.cpp: 13 (WebContextMenuClient::getCustomMenuFromDefaultItems): 14 1 15 2010-12-02 John Knottenbelt <jknotten@chromium.org> 2 16 -
trunk/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
r70460 r73305 55 55 } 56 56 57 static bool isPreInspectElementTagSafari(IWebUIDelegate* uiDelegate)58 {59 if (!uiDelegate)60 return false;61 62 TCHAR modulePath[MAX_PATH];63 DWORD length = ::GetModuleFileName(0, modulePath, WTF_ARRAY_LENGTH(modulePath));64 if (!length)65 return false;66 67 return String(modulePath, length).endsWith("Safari.exe", false);68 }69 70 static HMENU fixMenuReceivedFromOldSafari(IWebUIDelegate* uiDelegate, ContextMenu* originalMenu, HMENU menuFromClient)71 {72 ASSERT_ARG(originalMenu, originalMenu);73 if (!isPreInspectElementTagSafari(uiDelegate))74 return menuFromClient;75 76 int count = ::GetMenuItemCount(originalMenu->platformDescription());77 if (count < 1)78 return menuFromClient;79 80 if (::GetMenuItemID(originalMenu->platformDescription(), count - 1) != WebMenuItemTagInspectElement)81 return menuFromClient;82 83 count = ::GetMenuItemCount(menuFromClient);84 if (count < 1)85 return menuFromClient;86 87 if (::GetMenuItemID(menuFromClient, count - 1) == WebMenuItemTagInspectElement)88 return menuFromClient;89 90 originalMenu->setPlatformDescription(menuFromClient);91 originalMenu->addInspectElementItem();92 return originalMenu->platformDescription();93 }94 95 57 HMENU WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu) 96 58 { … … 107 69 if (FAILED(uiDelegate->contextMenuItemsForElement(m_webView, propertyBag.get(), (OLE_HANDLE)(ULONG64)menu->platformDescription(), (OLE_HANDLE*)&newMenu))) 108 70 return menu->platformDescription(); 109 return fixMenuReceivedFromOldSafari(uiDelegate.get(), menu, newMenu);71 return newMenu; 110 72 } 111 73
Note: See TracChangeset
for help on using the changeset viewer.