Towards making PopupMenuClient more testable
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Oct 2011 00:19:29 +0000 (00:19 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Oct 2011 00:19:29 +0000 (00:19 +0000)
commit78400ddae6ace7cb76eb4cce5881dfa91d959693
tree0d6521f3b8596c536f86c765600bfa4a0a6710db
parent05ef68714f28b7d8dd5d7a66054dba69de62238d
Towards making PopupMenuClient more testable
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: https://svn.webkit.org/repository/webkit/trunk@97202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/popup-menu-client-test-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/popup-menu-client-test.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/PopupMenuClient.h
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMenuList.h
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp
Source/WebKit/chromium/src/AutofillPopupMenuClient.h
Source/WebKit/chromium/src/WebViewImpl.cpp