Changeset 85759 in webkit


Ignore:
Timestamp:
May 4, 2011 10:47:45 AM (13 years ago)
Author:
jcivelli@chromium.org
Message:

2011-05-04 Jay Civelli <jcivelli@chromium.org>

Reviewed by Ojan Vafai.

Send the char events to the select popup if one is showing to fix
a bug were pressing a letter would not select the matching option.
https://bugs.webkit.org/show_bug.cgi?id=47769

  • src/WebViewImpl.cpp: (WebKit::WebViewImpl::keyEvent): (WebKit::WebViewImpl::charEvent):
  • src/WebViewImpl.h:
Location:
trunk/Source/WebKit/chromium
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r85720 r85759  
     12011-05-04  Jay Civelli  <jcivelli@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Send the char events to the select popup if one is showing to fix
     6        a bug were pressing a letter would not select the matching option.
     7        https://bugs.webkit.org/show_bug.cgi?id=47769
     8
     9        * src/WebViewImpl.cpp:
     10        (WebKit::WebViewImpl::keyEvent):
     11        (WebKit::WebViewImpl::charEvent):
     12        * src/WebViewImpl.h:
     13
    1142011-05-03  Justin Novosad  <junov@chromium.org>
    215
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r85717 r85759  
    597597    m_suppressNextKeypressEvent = false;
    598598
    599     // Give any select popup a chance at consuming the key event.
    600     if (selectPopupHandleKeyEvent(event))
    601         return true;
     599    // If there is a select popup, it should be the one processing the event,
     600    // not the page.
     601    if (m_selectPopup)
     602        return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
    602603
    603604    // Give Autocomplete a chance to consume the key events it is interested in.
     
    643644
    644645    return keyEventDefault(event);
    645 }
    646 
    647 bool WebViewImpl::selectPopupHandleKeyEvent(const WebKeyboardEvent& event)
    648 {
    649     if (!m_selectPopup)
    650         return false;
    651 
    652     return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
    653646}
    654647
     
    715708    bool suppress = m_suppressNextKeypressEvent;
    716709    m_suppressNextKeypressEvent = false;
     710
     711    // If there is a select popup, it should be the one processing the event,
     712    // not the page.
     713    if (m_selectPopup)
     714        return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event));
    717715
    718716    Frame* frame = focusedWebCoreFrame();
  • trunk/Source/WebKit/chromium/src/WebViewImpl.h

    r85241 r85759  
    384384    bool keyEventDefault(const WebKeyboardEvent&);
    385385
    386     // Returns true if the select popup has consumed the event.
    387     bool selectPopupHandleKeyEvent(const WebKeyboardEvent&);
    388 
    389386    // Returns true if the autocomple has consumed the event.
    390387    bool autocompleteHandleKeyEvent(const WebKeyboardEvent&);
Note: See TracChangeset for help on using the changeset viewer.