Changeset 52685 in webkit


Ignore:
Timestamp:
Dec 31, 2009 12:03:23 PM (14 years ago)
Author:
christian@webkit.org
Message:

2009-12-31 Christian Dywan <christian@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):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52684 r52685  
     12009-12-31  Christian Dywan  <christian@twotoasts.de>
     2
     3        Reviewed by Gustavo Noronha Silva.
     4
     5        [GTK] context menu overriding API is very limited
     6        https://bugs.webkit.org/show_bug.cgi?id=27546
     7
     8        Only show font menu items in rich text areas in the GTK+ port.
     9
     10        * platform/ContextMenu.cpp:
     11        (WebCore::ContextMenu::populate):
     12
    1132009-12-31  Christian Dywan  <christian@twotoasts.de>
    214
  • trunk/WebCore/platform/ContextMenu.cpp

    r52684 r52685  
    495495            appendItem(transformationsMenuItem);
    496496#endif
    497             ContextMenuItem  FontMenuItem(SubmenuType, ContextMenuItemTagFontMenu,
    498                 contextMenuItemTagFontMenu());
    499             createAndAppendFontSubMenu(m_hitTestResult, FontMenuItem);
    500             appendItem(FontMenuItem);
     497#if PLATFORM(GTK)
     498            bool shouldShowFontMenu = frame->editor()->canEditRichly();
     499#else
     500            bool shouldShowFontMenu = true;
     501#endif
     502            if (shouldShowFontMenu) {
     503                ContextMenuItem FontMenuItem(SubmenuType, ContextMenuItemTagFontMenu,
     504                    contextMenuItemTagFontMenu());
     505                createAndAppendFontSubMenu(m_hitTestResult, FontMenuItem);
     506                appendItem(FontMenuItem);
     507            }
    501508#if PLATFORM(MAC)
    502509            ContextMenuItem SpeechMenuItem(SubmenuType, ContextMenuItemTagSpeechMenu, contextMenuItemTagSpeechMenu());
Note: See TracChangeset for help on using the changeset viewer.