[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

christian at webkit.org christian at webkit.org
Thu Apr 8 00:52:43 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 27db8148a84dbf62bf2dbc9669aa0e266f1e128a
Author: christian at webkit.org <christian at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 31 20:03:23 2009 +0000

    2009-12-31  Christian Dywan  <christian at twotoasts.de>
    
            Reviewed by Gustavo Noronha Silva.
    
            [GTK] context menu overriding API is very limited
            https://bugs.webkit.org/show_bug.cgi?id=27546
    
            Only show font menu items in rich text areas in the GTK+ port.
    
            * platform/ContextMenu.cpp:
            (WebCore::ContextMenu::populate):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52685 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 50d1e14..bd1bf2b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -5,6 +5,18 @@
         [GTK] context menu overriding API is very limited
         https://bugs.webkit.org/show_bug.cgi?id=27546
 
+        Only show font menu items in rich text areas in the GTK+ port.
+
+        * platform/ContextMenu.cpp:
+        (WebCore::ContextMenu::populate):
+
+2009-12-31  Christian Dywan  <christian at twotoasts.de>
+
+        Reviewed by Gustavo Noronha Silva.
+
+        [GTK] context menu overriding API is very limited
+        https://bugs.webkit.org/show_bug.cgi?id=27546
+
         Don't show spell checking menu items in text areas in the GTK+ port.
 
         * platform/ContextMenu.cpp:
diff --git a/WebCore/platform/ContextMenu.cpp b/WebCore/platform/ContextMenu.cpp
index dba2825..236279e 100644
--- a/WebCore/platform/ContextMenu.cpp
+++ b/WebCore/platform/ContextMenu.cpp
@@ -494,10 +494,17 @@ void ContextMenu::populate()
             createAndAppendTransformationsSubMenu(m_hitTestResult, transformationsMenuItem);
             appendItem(transformationsMenuItem);
 #endif
-            ContextMenuItem  FontMenuItem(SubmenuType, ContextMenuItemTagFontMenu, 
-                contextMenuItemTagFontMenu());
-            createAndAppendFontSubMenu(m_hitTestResult, FontMenuItem);
-            appendItem(FontMenuItem);
+#if PLATFORM(GTK)
+            bool shouldShowFontMenu = frame->editor()->canEditRichly();
+#else
+            bool shouldShowFontMenu = true;
+#endif
+            if (shouldShowFontMenu) {
+                ContextMenuItem FontMenuItem(SubmenuType, ContextMenuItemTagFontMenu, 
+                    contextMenuItemTagFontMenu());
+                createAndAppendFontSubMenu(m_hitTestResult, FontMenuItem);
+                appendItem(FontMenuItem);
+            }
 #if PLATFORM(MAC)
             ContextMenuItem SpeechMenuItem(SubmenuType, ContextMenuItemTagSpeechMenu, contextMenuItemTagSpeechMenu());
             createAndAppendSpeechSubMenu(m_hitTestResult, SpeechMenuItem);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list