Changeset 121932 in webkit


Ignore:
Timestamp:
Jul 5, 2012 6:24:38 PM (12 years ago)
Author:
andersca@apple.com
Message:

Type-ahead doesn't work in options inside optgroups
https://bugs.webkit.org/show_bug.cgi?id=90647
<rdar://problem/5604894>

Reviewed by Dan Bernstein.

Set the title of the menu item to a string that doesn't contain any leading or trailing whitespace.

Source/WebCore:

  • platform/mac/PopupMenuMac.mm:

(WebCore::PopupMenuMac::populate):

Source/WebKit2:

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::populate):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121930 r121932  
     12012-07-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Type-ahead doesn't work in options inside optgroups
     4        https://bugs.webkit.org/show_bug.cgi?id=90647
     5        <rdar://problem/5604894>
     6
     7        Reviewed by Dan Bernstein.
     8
     9        Set the title of the menu item to a string that doesn't contain any leading or trailing whitespace.
     10
     11        * platform/mac/PopupMenuMac.mm:
     12        (WebCore::PopupMenuMac::populate):
     13
    1142012-07-05  Hayato Ito  <hayato@chromium.org>
    215
  • trunk/Source/WebCore/platform/mac/PopupMenuMac.mm

    r121575 r121932  
    120120            NSMenuItem *menuItem = [m_popup.get() lastItem];
    121121            [menuItem setAttributedTitle:string];
     122            // We set the title as well as the attributed title here. The attributed title will be displayed in the menu,
     123            // but typeahead will use the non-attributed string that doesn't contain any leading or trailing whitespace.
     124            [menuItem setTitle:[[string string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
    122125            [menuItem setEnabled:client()->itemIsEnabled(i)];
    123126            [menuItem setToolTip:client()->itemToolTip(i)];
  • trunk/Source/WebKit2/ChangeLog

    r121919 r121932  
     12012-07-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Type-ahead doesn't work in options inside optgroups
     4        https://bugs.webkit.org/show_bug.cgi?id=90647
     5        <rdar://problem/5604894>
     6
     7        Reviewed by Dan Bernstein.
     8
     9        Set the title of the menu item to a string that doesn't contain any leading or trailing whitespace.
     10
     11        * UIProcess/mac/WebPopupMenuProxyMac.mm:
     12        (WebKit::WebPopupMenuProxyMac::populate):
     13
    1142012-07-05  Christophe Dumez  <christophe.dumez@intel.com>
    215
  • trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm

    r117703 r121932  
    8888
    8989            [menuItem setAttributedTitle:string.get()];
     90            // We set the title as well as the attributed title here. The attributed title will be displayed in the menu,
     91            // but typeahead will use the non-attributed string that doesn't contain any leading or trailing whitespace.
     92            [menuItem setTitle:[[string.get() string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
    9093            [menuItem setEnabled:items[i].m_isEnabled];
    9194            [menuItem setToolTip:nsStringFromWebCoreString(items[i].m_toolTip)];
Note: See TracChangeset for help on using the changeset viewer.