Refactoring of PopupMenuChromium
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 18:36:37 +0000 (18:36 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 18:36:37 +0000 (18:36 +0000)
commitbb78b5a9b2a65146bc6668feed894a057567e921
treef2fcf6862e1ef2c19d81a309926ab386f241713c
parente9cec08e55313d0e7e2b36f9c7d4ad0a9fcd8b4a
Refactoring of PopupMenuChromium
https://bugs.webkit.org/show_bug.cgi?id=66009

Reviewed by Darin Fisher.

Source/WebCore:

Split PopupMenuChromium into three sets of files: PopupMenuChromium.{h|cpp}, PopupContainer.{h|cpp}, and PopupLisBox.{h|cpp}
for readability and maintainability.

No new tests as no functionality has changed.

* WebCore.gypi:
* platform/chromium/PopupContainer.cpp: Added.
(WebCore::constructRelativeMouseEvent):
(WebCore::constructRelativeWheelEvent):
(WebCore::PopupContainer::create):
(WebCore::PopupContainer::PopupContainer):
(WebCore::PopupContainer::~PopupContainer):
(WebCore::PopupContainer::layoutAndCalculateWidgetRect):
(WebCore::PopupContainer::showPopup):
(WebCore::PopupContainer::hidePopup):
(WebCore::PopupContainer::notifyPopupHidden):
(WebCore::PopupContainer::layoutAndGetRTLOffset):
(WebCore::PopupContainer::handleMouseDownEvent):
(WebCore::PopupContainer::handleMouseMoveEvent):
(WebCore::PopupContainer::handleMouseReleaseEvent):
(WebCore::PopupContainer::handleWheelEvent):
(WebCore::PopupContainer::handleTouchEvent):
(WebCore::PopupContainer::handleGestureEvent):
(WebCore::PopupContainer::handleKeyEvent):
(WebCore::PopupContainer::hide):
(WebCore::PopupContainer::paint):
(WebCore::PopupContainer::paintBorder):
(WebCore::PopupContainer::isInterestedInEventForKey):
(WebCore::PopupContainer::chromeClientChromium):
(WebCore::PopupContainer::showInRect):
(WebCore::PopupContainer::refresh):
(WebCore::PopupContainer::isRTL):
(WebCore::PopupContainer::selectedIndex):
(WebCore::PopupContainer::menuItemHeight):
(WebCore::PopupContainer::menuItemFontSize):
(WebCore::PopupContainer::menuStyle):
(WebCore::popupData):
(WebCore::PopupContainer::getSelectedItemToolTip):
* platform/chromium/PopupContainer.h: Added.
(WebCore::PopupContainer::listBox):
(WebCore::PopupContainer::popupType):
* platform/chromium/PopupListBox.cpp: Added.
(WebCore::PopupListBox::PopupListBox):
(WebCore::PopupListBox::handleMouseDownEvent):
(WebCore::PopupListBox::handleMouseMoveEvent):
(WebCore::PopupListBox::handleMouseReleaseEvent):
(WebCore::PopupListBox::handleWheelEvent):
(WebCore::PopupListBox::isInterestedInEventForKey):
(WebCore::PopupListBox::handleTouchEvent):
(WebCore::PopupListBox::handleGestureEvent):
(WebCore::isCharacterTypeEvent):
(WebCore::PopupListBox::handleKeyEvent):
(WebCore::PopupListBox::hostWindow):
(WebCore::stripLeadingWhiteSpace):
(WebCore::PopupListBox::typeAheadFind):
(WebCore::PopupListBox::paint):
(WebCore::PopupListBox::paintRow):
(WebCore::PopupListBox::getRowFont):
(WebCore::PopupListBox::abandon):
(WebCore::PopupListBox::pointToRowIndex):
(WebCore::PopupListBox::acceptIndex):
(WebCore::PopupListBox::selectIndex):
(WebCore::PopupListBox::setOriginalIndex):
(WebCore::PopupListBox::getRowHeight):
(WebCore::PopupListBox::getRowBounds):
(WebCore::PopupListBox::invalidateRow):
(WebCore::PopupListBox::scrollToRevealRow):
(WebCore::PopupListBox::isSelectableItem):
(WebCore::PopupListBox::clearSelection):
(WebCore::PopupListBox::selectNextRow):
(WebCore::PopupListBox::selectPreviousRow):
(WebCore::PopupListBox::adjustSelectedIndex):
(WebCore::PopupListBox::hidePopup):
(WebCore::PopupListBox::updateFromElement):
(WebCore::PopupListBox::setMaxWidthAndLayout):
(WebCore::PopupListBox::layout):
(WebCore::PopupListBox::clear):
(WebCore::PopupListBox::isPointInBounds):
* platform/chromium/PopupListBox.h: Added.
(WebCore::PopupItem::PopupItem):
(WebCore::PopupListBox::create):
(WebCore::PopupListBox::selectedIndex):
(WebCore::PopupListBox::numItems):
(WebCore::PopupListBox::setBaseWidth):
(WebCore::PopupListBox::setMaxHeight):
(WebCore::PopupListBox::setMaxWidth):
(WebCore::PopupListBox::disconnectClient):
(WebCore::PopupListBox::items):
(WebCore::PopupListBox::~PopupListBox):
(WebCore::PopupListBox::scrollToRevealSelection):
* platform/chromium/PopupMenuChromium.cpp:
* platform/chromium/PopupMenuChromium.h:

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
* src/WebPopupMenuImpl.cpp:
* src/WebViewImpl.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/chromium/PopupContainer.cpp [new file with mode: 0644]
Source/WebCore/platform/chromium/PopupContainer.h [new file with mode: 0644]
Source/WebCore/platform/chromium/PopupListBox.cpp [new file with mode: 0644]
Source/WebCore/platform/chromium/PopupListBox.h [new file with mode: 0644]
Source/WebCore/platform/chromium/PopupMenuChromium.cpp
Source/WebCore/platform/chromium/PopupMenuChromium.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp