Reviewed by Adele.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Oct 2006 23:02:08 +0000 (23:02 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Oct 2006 23:02:08 +0000 (23:02 +0000)
commitfa79834d284cdb15649e7ea2566c95058b64ee96
tree21320a3b8b601190ce9f8d9062f71a3f9f85feb0
parenta5c7a464cde2ea235401938410aee1ce5ee2a879
    Reviewed by Adele.

        Move popup menu code out of rendering/ and into platform/.
        RenderPopupMenu becomes PopupMenu, the
        RenderPopupMenuMac/RenderPopupMenuWin subclasses and all the associated
        virtual methods go away, RenderTheme gets to stop worrying about popup
        menus, PopupMenu becomes ref-counted, and everyone becomes happy.

        * WebCore.vcproj/WebCore/WebCore.vcproj: Move files within project.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * html/HTMLSelectElement.cpp: Remove unnecessary #include.
        * platform/PopupMenu.cpp: Moved from rendering/RenderPopupMenu.cpp.
        Also renamed showPopup()/hidePopup() to show()/hide() to disambiguate
        from RenderMenuList::showPopup/hidePopup.
        (WebCore::PopupMenu::create): New static creation method to hand back a
        PassRefPtr<PopupMenu>.
        (WebCore::PopupMenu::addItems): This platform-independent method should
        be called by PopupMenu::populate when the platform-specific
        implementation is ready to receive the menu items. Fixed an ASSERT
        while I was at it.
        * platform/PopupMenu.h: Moved from rendering/RenderPopupMenu.h. No more
        need for virtual methods.
        (WebCore::PopupMenu::wasClicked):
        (WebCore::PopupMenu::setWasClicked):
        (WebCore::PopupMenu::popupHandle):
        * platform/mac/PopupMenuMac.mm: Moved from
        rendering/RenderPopupMenuMac.mm. Much renaming ensues.
        (WebCore::PopupMenu::PopupMenu):
        (WebCore::PopupMenu::~PopupMenu):
        (WebCore::PopupMenu::clear):
        (WebCore::PopupMenu::populate):
        (WebCore::PopupMenu::show):
        (WebCore::PopupMenu::hide):
        (WebCore::PopupMenu::addSeparator):
        (WebCore::PopupMenu::addGroupLabel): Since we don't have our own
        RenderStyle anymore, just pick up the style from our RenderMenuList.
        (WebCore::PopupMenu::addOption): Ditto.
        * platform/win/TemporaryLinkStubs.cpp: Rename-fest.
        (PopupMenu::PopupMenu):
        (PopupMenu::~PopupMenu):
        (PopupMenu::clear):
        (PopupMenu::populate):
        (PopupMenu::show):
        (PopupMenu::hide):
        (PopupMenu::addSeparator):
        (PopupMenu::addGroupLabel):
        (PopupMenu::addOption):
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::~RenderMenuList):
        (WebCore::RenderMenuList::showPopup): Use nice new simple
        PopupMenu::create to make the popup.
        (WebCore::RenderMenuList::hidePopup):
        * rendering/RenderMenuList.h: Hold a RefPtr<PopupMenu> instead of a
        RenderPopupMenu*.
        (WebCore::RenderMenuList::popup):
        * rendering/RenderPopupMenu.cpp: Removed.
        * rendering/RenderPopupMenu.h: Removed.
        * rendering/RenderPopupMenuMac.h: Removed.
        * rendering/RenderPopupMenuMac.mm: Removed.
        * rendering/RenderPopupMenuWin.h: Removed.
        * rendering/RenderTheme.cpp: Get rid of createPopupMenu() method.
        * rendering/RenderTheme.h: Ditto.
        * rendering/RenderThemeMac.h: Ditto.
        * rendering/RenderThemeMac.mm: Ditto.
        * rendering/RenderThemeWin.cpp: Ditto.
        * rendering/RenderThemeWin.h: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/html/HTMLSelectElement.cpp
WebCore/platform/PopupMenu.cpp [moved from WebCore/rendering/RenderPopupMenu.cpp with 87% similarity]
WebCore/platform/PopupMenu.h [new file with mode: 0644]
WebCore/platform/mac/PopupMenuMac.mm [moved from WebCore/rendering/RenderPopupMenuMac.mm with 86% similarity]
WebCore/platform/win/TemporaryLinkStubs.cpp
WebCore/rendering/RenderMenuList.cpp
WebCore/rendering/RenderMenuList.h
WebCore/rendering/RenderPopupMenu.h [deleted file]
WebCore/rendering/RenderPopupMenuMac.h [deleted file]
WebCore/rendering/RenderPopupMenuWin.h [deleted file]
WebCore/rendering/RenderTheme.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.h
WebCore/rendering/RenderThemeMac.mm
WebCore/rendering/RenderThemeWin.cpp
WebCore/rendering/RenderThemeWin.h