Skip to content
  • fsamuel@chromium.org's avatar
    Towards making PopupMenuClient more testable · aa54be8f
    fsamuel@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=69631
    
    Reviewed by Simon Fraser.
    
    Source/WebCore:
    
    Added some functions to window.internals to allow testing of parts of PopupMenuClient.
    
    Test: fast/dom/popup-menu-client-test.html
    
    * platform/PopupMenuClient.h:
    * rendering/RenderMenuList.cpp:
    (WebCore::RenderMenuList::showPopup):
    (WebCore::RenderMenuList::boundingBoxRect):
    * rendering/RenderMenuList.h:
    (WebCore::RenderMenuList::RenderMenuList::isPopupMenuClient):
    * rendering/RenderObject.h:
    (WebCore::RenderObject::isPopupMenuClient):
    * rendering/RenderTextControlSingleLine.cpp:
    (WebCore::RenderTextControlSingleLine::showPopup):
    (WebCore::RenderTextControlSingleLine::boundingBoxRect):
    * rendering/RenderTextControlSingleLine.h:
    (WebCore::RenderTextControlSingleLine::isPopupMenuClient):
    * testing/Internals.cpp:
    (WebCore::Internals::toPopupMenuClient):
    (WebCore::Internals::popupClientPaddingLeft):
    (WebCore::Internals::popupClientPaddingRight):
    (WebCore::Internals::popupClientBoundingBoxRect):
    * testing/Internals.h:
    * testing/Internals.idl:
    
    Source/WebKit/chromium:
    
    * src/AutofillPopupMenuClient.cpp:
    (WebKit::AutofillPopupMenuClient::boundingBoxRect):
    * src/AutofillPopupMenuClient.h:
    * src/WebViewImpl.cpp:
    (WebKit::WebViewImpl::applyAutofillSuggestions):
    
    LayoutTests:
    
    * fast/dom/popup-menu-client-test-expected.txt: Added.
    * fast/dom/popup-menu-client-test.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    aa54be8f