[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

bweinstein at apple.com bweinstein at apple.com
Wed Dec 22 17:59:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 0e0c02b059a57f7b491f32bb8e11fe00a1449006
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 3 22:36:04 2010 +0000

    WebContextMenuClient::fixMenuReceivedFromOldSafari is no longer needed on Windows
    https://bugs.webkit.org/show_bug.cgi?id=50486
    
    Reviewed by Brady Eidson.
    
    Remove the static fixMenuReceivedFromOldSafari and isPreInspectElementTagSafari methods
    from WebContextMenuClient. There were there for when WebKit had the Inspect Element context menu
    item, but Safari didn't support it. We don't support that old Safari, so that code can go.
    
    * WebCoreSupport/WebContextMenuClient.cpp:
    (WebContextMenuClient::getCustomMenuFromDefaultItems):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73305 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 69f6af1..b45062a 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-03  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Brady Eidson.
+
+        WebContextMenuClient::fixMenuReceivedFromOldSafari is no longer needed on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=50486
+        
+        Remove the static fixMenuReceivedFromOldSafari and isPreInspectElementTagSafari methods 
+        from WebContextMenuClient. There were there for when WebKit had the Inspect Element context menu
+        item, but Safari didn't support it. We don't support that old Safari, so that code can go.
+
+        * WebCoreSupport/WebContextMenuClient.cpp:
+        (WebContextMenuClient::getCustomMenuFromDefaultItems):
+
 2010-12-02  John Knottenbelt  <jknotten at chromium.org>
 
         Reviewed by Steve Block.
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
index 24178f2..ede44e2 100644
--- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
@@ -54,44 +54,6 @@ void WebContextMenuClient::contextMenuDestroyed()
     delete this;
 }
 
-static bool isPreInspectElementTagSafari(IWebUIDelegate* uiDelegate)
-{
-    if (!uiDelegate)
-        return false;
-
-    TCHAR modulePath[MAX_PATH];
-    DWORD length = ::GetModuleFileName(0, modulePath, WTF_ARRAY_LENGTH(modulePath));
-    if (!length)
-        return false;
-
-    return String(modulePath, length).endsWith("Safari.exe", false);
-}
-
-static HMENU fixMenuReceivedFromOldSafari(IWebUIDelegate* uiDelegate, ContextMenu* originalMenu, HMENU menuFromClient)
-{
-    ASSERT_ARG(originalMenu, originalMenu);
-    if (!isPreInspectElementTagSafari(uiDelegate))
-        return menuFromClient;
-
-    int count = ::GetMenuItemCount(originalMenu->platformDescription());
-    if (count < 1)
-        return menuFromClient;
-
-    if (::GetMenuItemID(originalMenu->platformDescription(), count - 1) != WebMenuItemTagInspectElement)
-        return menuFromClient;
-
-    count = ::GetMenuItemCount(menuFromClient);
-    if (count < 1)
-        return menuFromClient;
-
-    if (::GetMenuItemID(menuFromClient, count - 1) == WebMenuItemTagInspectElement)
-        return menuFromClient;
-
-    originalMenu->setPlatformDescription(menuFromClient);
-    originalMenu->addInspectElementItem();
-    return originalMenu->platformDescription();
-}
-
 HMENU WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu)
 {
     COMPtr<IWebUIDelegate> uiDelegate;
@@ -106,7 +68,7 @@ HMENU WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu)
     // FIXME: We need to decide whether to do the default before calling this delegate method
     if (FAILED(uiDelegate->contextMenuItemsForElement(m_webView, propertyBag.get(), (OLE_HANDLE)(ULONG64)menu->platformDescription(), (OLE_HANDLE*)&newMenu)))
         return menu->platformDescription();
-    return fixMenuReceivedFromOldSafari(uiDelegate.get(), menu, newMenu);
+    return newMenu;
 }
 
 void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const ContextMenu* parentMenu)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list