Changeset 64513 in webkit
- Timestamp:
- Aug 2, 2010 5:39:44 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 68 edited
- 20 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64506 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 Classes PopupMenu and SearchPopupMenu have been made pure virtual. 9 10 * platform/PopupMenu.h: 11 (WebCore::PopupMenu::~PopupMenu): 12 * platform/SearchPopupMenu.h: 13 (WebCore::SearchPopupMenu::~SearchPopupMenu): 14 15 Classes RenderMenuList and RenderTexyControlSingleLine have been changed to use 16 the new pure virtual PopupMenu and SearchPopupMenu. 17 18 * rendering/RenderMenuList.cpp: 19 (WebCore::RenderMenuList::adjustInnerStyle): 20 (WebCore::RenderMenuList::showPopup): 21 * rendering/RenderMenuList.h: 22 * rendering/RenderTextControlSingleLine.cpp: 23 (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): 24 (WebCore::RenderTextControlSingleLine::addSearchResult): 25 (WebCore::RenderTextControlSingleLine::showPopup): 26 (WebCore::RenderTextControlSingleLine::hidePopup): 27 (WebCore::RenderTextControlSingleLine::updateFromElement): 28 (WebCore::RenderTextControlSingleLine::valueChanged): 29 * rendering/RenderTextControlSingleLine.h: 30 31 Chrome and ChromeClient were made responsible for providing instances of classes 32 PopupMenu and SearchPopupMenu to its users. 33 34 * loader/EmptyClients.h: 35 (WebCore::EmptyPopupMenu::show): 36 (WebCore::EmptyPopupMenu::hide): 37 (WebCore::EmptyPopupMenu::updateFromElement): 38 (WebCore::EmptyPopupMenu::disconnectClient): 39 (WebCore::EmptySearchPopupMenu::popupMenu): 40 (WebCore::EmptySearchPopupMenu::saveRecentSearches): 41 (WebCore::EmptySearchPopupMenu::loadRecentSearches): 42 (WebCore::EmptySearchPopupMenu::enabled): 43 (WebCore::EmptyChromeClient::selectItemWritingDirectionIsNatural): 44 (WebCore::EmptyChromeClient::createPopupMenu): 45 (WebCore::EmptyChromeClient::createSearchPopupMenu): 46 * page/Chrome.cpp: 47 (WebCore::Chrome::selectItemWritingDirectionIsNatural): 48 (WebCore::Chrome::createPopupMenu): 49 (WebCore::Chrome::createSearchPopupMenu): 50 * page/Chrome.h: 51 * page/ChromeClient.h: 52 53 Original contents of files PopupMenu.h and SearchPopupMenu.h have been splited 54 in several files, two for each platform (PopupMenuXXX.h and SearchPopupMenuXXX.h). 55 Each of new the files contain the concrete classes that inherit form PopupMenu or 56 SearchPopupMenu and are specific for the corresponding platform. 57 58 brew: 59 60 * platform/brew/PopupMenuBrew.cpp: 61 (WebCore::PopupMenuBrew::PopupMenuBrew): 62 (WebCore::PopupMenuBrew::~PopupMenuBrew): 63 (WebCore::PopupMenuBrew::disconnectClient): 64 (WebCore::PopupMenuBrew::show): 65 (WebCore::PopupMenuBrew::hide): 66 (WebCore::PopupMenuBrew::updateFromElement): 67 * platform/brew/PopupMenuBrew.h: Added. 68 (WebCore::PopupMenuBrew::client): 69 * platform/brew/SearchPopupMenuBrew.cpp: 70 (WebCore::SearchPopupMenuBrew::saveRecentSearches): 71 (WebCore::SearchPopupMenuBrew::loadRecentSearches): 72 (WebCore::SearchPopupMenuBrew::SearchPopupMenuBrew): 73 (WebCore::SearchPopupMenuBrew::enabled): 74 (WebCore::SearchPopupMenuBrew::popupMenu): 75 * platform/brew/SearchPopupMenuBrew.h: Added. 76 77 chromium: 78 79 * WebCore.gypi: 80 * platform/chromium/PopupMenuChromium.cpp: 81 (WebCore::PopupMenuChromium::PopupMenuChromium): 82 (WebCore::PopupMenuChromium::~PopupMenuChromium): 83 (WebCore::PopupMenuChromium::show): 84 (WebCore::PopupMenuChromium::hide): 85 (WebCore::PopupMenuChromium::updateFromElement): 86 (WebCore::PopupMenuChromium::disconnectClient): 87 * platform/chromium/PopupMenuChromium.h: 88 (WebCore::PopupMenuChromium::client): 89 * platform/chromium/SearchPopupMenuChromium.cpp: 90 (WebCore::SearchPopupMenuChromium::SearchPopupMenuChromium): 91 (WebCore::SearchPopupMenuChromium::popupMenu): 92 (WebCore::SearchPopupMenuChromium::enabled): 93 (WebCore::SearchPopupMenuChromium::saveRecentSearches): 94 (WebCore::SearchPopupMenuChromium::loadRecentSearches): 95 * platform/chromium/SearchPopupMenuChromium.h: Added. 96 97 efl: 98 99 * platform/efl/PopupMenuEfl.cpp: 100 (WebCore::PopupMenuEfl::PopupMenuEfl): 101 (WebCore::PopupMenuEfl::~PopupMenuEfl): 102 (WebCore::PopupMenuEfl::show): 103 (WebCore::PopupMenuEfl::hide): 104 (WebCore::PopupMenuEfl::updateFromElement): 105 (WebCore::PopupMenuEfl::disconnectClient): 106 * platform/efl/PopupMenuEfl.h: Added. 107 (WebCore::PopupMenuEfl::client): 108 * platform/efl/SearchPopupMenuEfl.cpp: 109 (WebCore::SearchPopupMenuEfl::SearchPopupMenuEfl): 110 (WebCore::SearchPopupMenuEfl::popupMenu): 111 (WebCore::SearchPopupMenuEfl::saveRecentSearches): 112 (WebCore::SearchPopupMenuEfl::loadRecentSearches): 113 (WebCore::SearchPopupMenuEfl::enabled): 114 * platform/efl/SearchPopupMenuEfl.h: Added. 115 116 gtk: 117 118 * GNUmakefile.am: 119 * platform/gtk/PopupMenuGtk.cpp: 120 (WebCore::PopupMenuGtk::PopupMenuGtk): 121 (WebCore::PopupMenuGtk::~PopupMenuGtk): 122 (WebCore::PopupMenuGtk::show): 123 (WebCore::PopupMenuGtk::hide): 124 (WebCore::PopupMenuGtk::updateFromElement): 125 (WebCore::PopupMenuGtk::disconnectClient): 126 (WebCore::PopupMenuGtk::menuItemActivated): 127 (WebCore::PopupMenuGtk::menuUnmapped): 128 (WebCore::PopupMenuGtk::menuPositionFunction): 129 (WebCore::PopupMenuGtk::menuRemoveItem): 130 * platform/gtk/PopupMenuGtk.h: Added. 131 (WebCore::PopupMenuGtk::client): 132 * platform/gtk/SearchPopupMenuGtk.cpp: 133 (WebCore::SearchPopupMenuGtk::SearchPopupMenuGtk): 134 (WebCore::SearchPopupMenuGtk::popupMenu): 135 (WebCore::SearchPopupMenuGtk::saveRecentSearches): 136 (WebCore::SearchPopupMenuGtk::loadRecentSearches): 137 (WebCore::SearchPopupMenuGtk::enabled): 138 * platform/gtk/SearchPopupMenuGtk.h: Added. 139 140 haiku: 141 142 * platform/haiku/PopupMenuHaiku.cpp: 143 (WebCore::HaikuPopup::HaikuPopup): 144 (WebCore::HaikuPopup::~HaikuPopup): 145 (WebCore::PopupMenuHaiku::PopupMenuHaiku): 146 (WebCore::PopupMenuHaiku::~PopupMenuHaiku): 147 (WebCore::PopupMenuHaiku::disconnectClient): 148 (WebCore::PopupMenuHaiku::show): 149 (WebCore::PopupMenuHaiku::hide): 150 (WebCore::PopupMenuHaiku::updateFromElement): 151 * platform/haiku/PopupMenuHaiku.h: Added. 152 (WebCore::PopupMenuHaiku::disconnectClient): 153 (WebCore::PopupMenuHaiku::client): 154 * platform/haiku/SearchPopupMenuHaiku.cpp: 155 (WebCore::SearchPopupMenuHaiku::SearchPopupMenuHaiku): 156 (WebCore::SearchPopupMenuHaiku::saveRecentSearches): 157 (WebCore::SearchPopupMenuHaiku::loadRecentSearches): 158 (WebCore::SearchPopupMenuHaiku::enabled): 159 (WebCore::SearchPopupMenuHaiku::popupMenu): 160 * platform/haiku/SearchPopupMenuHaiku.h: Added. 161 162 mac: 163 164 * WebCore.exp.in: 165 * WebCore.xcodeproj/project.pbxproj: 166 * platform/mac/PopupMenuMac.h: Added. 167 (WebCore::PopupMenuMac::disconnectClient): 168 (WebCore::PopupMenuMac::client): 169 * platform/mac/PopupMenuMac.mm: 170 (WebCore::PopupMenuMac::PopupMenuMac): 171 (WebCore::PopupMenuMac::~PopupMenuMac): 172 (WebCore::PopupMenuMac::clear): 173 (WebCore::PopupMenuMac::populate): 174 (WebCore::PopupMenuMac::show): 175 (WebCore::PopupMenuMac::hide): 176 (WebCore::PopupMenuMac::updateFromElement): 177 (WebCore::PopupMenuMac::itemWritingDirectionIsNatural): 178 * platform/mac/SearchPopupMenuMac.h: Added. 179 * platform/mac/SearchPopupMenuMac.mm: 180 (WebCore::SearchPopupMenuMac::SearchPopupMenuMac): 181 (WebCore::SearchPopupMenuMac::popupMenu): 182 (WebCore::SearchPopupMenuMac::enabled): 183 (WebCore::SearchPopupMenuMac::saveRecentSearches): 184 (WebCore::SearchPopupMenuMac::loadRecentSearches): 185 186 qt: 187 188 * WebCore.pro: 189 * platform/qt/PopupMenuQt.cpp: 190 (WebCore::PopupMenuQt::PopupMenuQt): 191 (WebCore::PopupMenuQt::~PopupMenuQt): 192 (WebCore::PopupMenuQt::disconnectClient): 193 (WebCore::PopupMenuQt::show): 194 (WebCore::PopupMenuQt::hide): 195 (WebCore::PopupMenuQt::updateFromElement): 196 * platform/qt/PopupMenuQt.h: Added. 197 * platform/qt/QtAbstractWebPopup.h: 198 * platform/qt/SearchPopupMenuQt.cpp: 199 (WebCore::SearchPopupMenuQt::SearchPopupMenuQt): 200 (WebCore::SearchPopupMenuQt::popupMenu): 201 (WebCore::SearchPopupMenuQt::saveRecentSearches): 202 (WebCore::SearchPopupMenuQt::loadRecentSearches): 203 (WebCore::SearchPopupMenuQt::enabled): 204 * platform/qt/SearchPopupMenuQt.h: Added. 205 206 win: 207 208 * WebCore.vcproj/WebCore.vcproj: 209 * platform/win/PopupMenuWin.cpp: 210 (WebCore::PopupMenuWin::PopupMenuWin): 211 (WebCore::PopupMenuWin::~PopupMenuWin): 212 (WebCore::PopupMenuWin::disconnectClient): 213 (WebCore::PopupMenuWin::popupClassName): 214 (WebCore::PopupMenuWin::show): 215 (WebCore::PopupMenuWin::hide): 216 (WebCore::PopupMenuWin::calculatePositionAndSize): 217 (WebCore::PopupMenuWin::setFocusedIndex): 218 (WebCore::PopupMenuWin::visibleItems): 219 (WebCore::PopupMenuWin::listIndexAtPoint): 220 (WebCore::PopupMenuWin::focusedIndex): 221 (WebCore::PopupMenuWin::focusFirst): 222 (WebCore::PopupMenuWin::focusLast): 223 (WebCore::PopupMenuWin::down): 224 (WebCore::PopupMenuWin::up): 225 (WebCore::PopupMenuWin::invalidateItem): 226 (WebCore::PopupMenuWin::clientRect): 227 (WebCore::PopupMenuWin::incrementWheelDelta): 228 (WebCore::PopupMenuWin::reduceWheelDelta): 229 (WebCore::PopupMenuWin::scrollToRevealSelection): 230 (WebCore::PopupMenuWin::updateFromElement): 231 (WebCore::PopupMenuWin::paint): 232 (WebCore::PopupMenuWin::valueChanged): 233 (WebCore::PopupMenuWin::invalidateScrollbarRect): 234 (WebCore::PopupMenuWin::registerClass): 235 (WebCore::PopupMenuWin::PopupMenuWndProc): 236 (WebCore::PopupMenuWin::wndProc): 237 * platform/win/PopupMenuWin.h: Added. 238 (WebCore::PopupMenuWin::client): 239 (WebCore::PopupMenuWin::scrollbar): 240 (WebCore::PopupMenuWin::itemHeight): 241 (WebCore::PopupMenuWin::windowRect): 242 (WebCore::PopupMenuWin::popupHandle): 243 (WebCore::PopupMenuWin::setWasClicked): 244 (WebCore::PopupMenuWin::wasClicked): 245 (WebCore::PopupMenuWin::setScrollOffset): 246 (WebCore::PopupMenuWin::scrollOffset): 247 (WebCore::PopupMenuWin::wheelDelta): 248 (WebCore::PopupMenuWin::scrollbarCapturingMouse): 249 (WebCore::PopupMenuWin::setScrollbarCapturingMouse): 250 * platform/win/SearchPopupMenuWin.cpp: 251 (WebCore::SearchPopupMenuWin::SearchPopupMenuWin): 252 (WebCore::SearchPopupMenuWin::popupMenu): 253 (WebCore::SearchPopupMenuWin::enabled): 254 (WebCore::SearchPopupMenuWin::saveRecentSearches): 255 (WebCore::SearchPopupMenuWin::loadRecentSearches): 256 * platform/win/SearchPopupMenuWin.h: Added. 257 258 wx: 259 260 * platform/wx/PopupMenuWx.cpp: 261 (WebCore::PopupMenuWx::PopupMenuWx): 262 (WebCore::PopupMenuWx::~PopupMenuWx): 263 (WebCore::PopupMenuWx::disconnectClient): 264 (WebCore::PopupMenuWx::show): 265 (WebCore::PopupMenuWx::OnMenuItemSelected): 266 (WebCore::PopupMenuWx::hide): 267 (WebCore::PopupMenuWx::updateFromElement): 268 * platform/wx/PopupMenuWx.h: Added. 269 (WebCore::PopupMenuWx::client): 270 * platform/wx/SearchPopupMenuWx.cpp: 271 (WebCore::SearchPopupMenuWx::SearchPopupMenuWx): 272 (WebCore::SearchPopupMenuWx::saveRecentSearches): 273 (WebCore::SearchPopupMenuWx::loadRecentSearches): 274 (WebCore::SearchPopupMenuWx::enabled): 275 (WebCore::SearchPopupMenuWx::popupMenu): 276 * platform/wx/SearchPopupMenuWx.h: Added. 277 278 279 1 280 2010-08-02 Martin Robinson <mrobinson@igalia.com> 2 281 -
trunk/WebCore/GNUmakefile.am
r64506 r64513 2477 2477 WebCore/platform/gtk/PlatformScreenGtk.cpp \ 2478 2478 WebCore/platform/gtk/PopupMenuGtk.cpp \ 2479 WebCore/platform/gtk/PopupMenuGtk.h \ 2479 2480 WebCore/platform/gtk/RenderThemeGtk.cpp \ 2480 2481 WebCore/platform/gtk/RenderThemeGtk.h \ … … 2485 2486 WebCore/platform/gtk/ScrollViewGtk.cpp \ 2486 2487 WebCore/platform/gtk/SearchPopupMenuGtk.cpp \ 2488 WebCore/platform/gtk/SearchPopupMenuGtk.h \ 2487 2489 WebCore/platform/gtk/SharedBufferGtk.cpp \ 2488 2490 WebCore/platform/gtk/SharedTimerGtk.cpp \ -
trunk/WebCore/WebCore.exp.in
r64504 r64513 251 251 __ZN7WebCore12IconDatabase5closeEv 252 252 __ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE 253 __ZN7WebCore12PopupMenuMacC1EPNS_15PopupMenuClientE 253 254 __ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci 254 255 __ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE … … 413 414 __ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionE 414 415 __ZN7WebCore18pluginScriptObjectEPN3JSC9ExecStateEPNS_13JSHTMLElementE 416 __ZN7WebCore18SearchPopupMenuMacC1EPNS_15PopupMenuClientE 415 417 __ZN7WebCore19AnimationController16resumeAnimationsEPNS_8DocumentE 416 418 __ZN7WebCore19AnimationController17suspendAnimationsEPNS_8DocumentE -
trunk/WebCore/WebCore.gypi
r64471 r64513 2137 2137 'platform/chromium/ScrollbarThemeChromiumWin.cpp', 2138 2138 'platform/chromium/SearchPopupMenuChromium.cpp', 2139 'platform/chromium/SearchPopupMenuChromium.h', 2139 2140 'platform/chromium/SharedTimerChromium.cpp', 2140 2141 'platform/chromium/SoundChromiumPosix.cpp', … … 2629 2630 'platform/mac/PlatformMouseEventMac.mm', 2630 2631 'platform/mac/PlatformScreenMac.mm', 2632 'platform/mac/PopupMenuMac.h', 2631 2633 'platform/mac/PopupMenuMac.mm', 2632 2634 'platform/mac/PurgeableBufferMac.cpp', … … 2636 2638 'platform/mac/ScrollbarThemeMac.h', 2637 2639 'platform/mac/ScrollbarThemeMac.mm', 2640 'platform/mac/SearchPopupMenuMac.h', 2638 2641 'platform/mac/SearchPopupMenuMac.mm', 2639 2642 'platform/mac/SharedBufferMac.mm', … … 2786 2789 'platform/qt/PlatformScreenQt.cpp', 2787 2790 'platform/qt/PopupMenuQt.cpp', 2791 'platform/qt/PopupMenuQt.h', 2788 2792 'platform/qt/QWebPopup.cpp', 2789 2793 'platform/qt/QWebPopup.h', … … 2796 2800 'platform/qt/ScrollbarThemeQt.h', 2797 2801 'platform/qt/SearchPopupMenuQt.cpp', 2802 'platform/qt/SearchPopupMenuQt.h', 2798 2803 'platform/qt/SharedBufferQt.cpp', 2799 2804 'platform/qt/SharedTimerQt.cpp', -
trunk/WebCore/WebCore.pro
r64471 r64513 1712 1712 platform/PlatformTouchEvent.h \ 1713 1713 platform/PlatformTouchPoint.h \ 1714 platform/PopupMenu.h \ 1714 1715 platform/qt/ClipboardQt.h \ 1715 1716 platform/qt/QWebPageClient.h \ … … 1721 1722 platform/ScrollbarThemeComposite.h \ 1722 1723 platform/ScrollView.h \ 1724 platform/SearchPopupMenu.h \ 1723 1725 platform/SharedBuffer.h \ 1724 1726 platform/sql/SQLiteDatabase.h \ … … 3299 3301 ../WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h \ 3300 3302 ../WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h \ 3303 ../WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.h \ 3304 ../WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.h \ 3301 3305 ../WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h \ 3302 3306 ../WebKit2/WebProcess/WebPage/DrawingArea.h \ … … 3371 3375 ../WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp \ 3372 3376 ../WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp \ 3377 ../WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.cpp \ 3378 ../WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp \ 3373 3379 ../WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp \ 3374 3380 ../WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r64476 r64513 23849 23849 </File> 23850 23850 <File 23851 RelativePath="..\platform\win\PopupMenuWin.h" 23852 > 23853 </File> 23854 <File 23851 23855 RelativePath="..\platform\win\ScrollbarThemeSafari.cpp" 23852 23856 > … … 23866 23870 <File 23867 23871 RelativePath="..\platform\win\SearchPopupMenuWin.cpp" 23872 > 23873 </File> 23874 <File 23875 RelativePath="..\platform\win\SearchPopupMenuWin.h" 23868 23876 > 23869 23877 </File> -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r64471 r64513 43 43 065AD4F60B0C2EDA005A2B1D /* ContextMenuController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */; }; 44 44 065AD4F70B0C2EDA005A2B1D /* ContextMenuController.h in Headers */ = {isa = PBXBuildFile; fileRef = 065AD4F40B0C2EDA005A2B1D /* ContextMenuController.h */; settings = {ATTRIBUTES = (Private, ); }; }; 45 0668E18B0ADD9624004128E0 /* PopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 0668E1890ADD9624004128E0 /* PopupMenu.h */; };45 0668E18B0ADD9624004128E0 /* PopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 0668E1890ADD9624004128E0 /* PopupMenu.h */; settings = {ATTRIBUTES = (Private, ); }; }; 46 46 0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */; }; 47 47 066C772B0AB603B700238CC4 /* FileChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772A0AB603B700238CC4 /* FileChooser.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3605 3605 AB67D1A8097F3AE300F9392E /* RenderTextControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB67D1A6097F3AE300F9392E /* RenderTextControl.cpp */; }; 3606 3606 AB67D1A9097F3AE300F9392E /* RenderTextControl.h in Headers */ = {isa = PBXBuildFile; fileRef = AB67D1A7097F3AE300F9392E /* RenderTextControl.h */; }; 3607 AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = AB7170880B3118080017123E /* SearchPopupMenu.h */; };3607 AB7170890B3118080017123E /* SearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = AB7170880B3118080017123E /* SearchPopupMenu.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3608 3608 AB7170A00B31193B0017123E /* SearchPopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB71709F0B31193B0017123E /* SearchPopupMenuMac.mm */; }; 3609 3609 ABAF22080C03B1C700B0BCF0 /* ChromeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABAF22070C03B1C700B0BCF0 /* ChromeMac.mm */; }; 3610 3610 ABB5419E0ACDDFE4002820EB /* RenderListBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABB5419C0ACDDFE4002820EB /* RenderListBox.cpp */; }; 3611 3611 ABB5419F0ACDDFE4002820EB /* RenderListBox.h in Headers */ = {isa = PBXBuildFile; fileRef = ABB5419D0ACDDFE4002820EB /* RenderListBox.h */; }; 3612 ABC128770B33AA6D00C693D5 /* PopupMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = ABC128760B33AA6D00C693D5 /* PopupMenuClient.h */; };3612 ABC128770B33AA6D00C693D5 /* PopupMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = ABC128760B33AA6D00C693D5 /* PopupMenuClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3613 3613 ABDDFE790A5C6E7000A3E11D /* RenderMenuList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABDDFE730A5C6E6F00A3E11D /* RenderMenuList.cpp */; }; 3614 3614 ABDDFE7A0A5C6E7000A3E11D /* RenderMenuList.h in Headers */ = {isa = PBXBuildFile; fileRef = ABDDFE740A5C6E7000A3E11D /* RenderMenuList.h */; }; … … 5031 5031 D23CA55F0AB0EAB6005108A5 /* JSRangeException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */; }; 5032 5032 D23CA56C0AB0EB8D005108A5 /* RangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = D23CA56B0AB0EB8D005108A5 /* RangeException.h */; }; 5033 D39D006D11F8E308006041F2 /* PopupMenuMac.h in Headers */ = {isa = PBXBuildFile; fileRef = D39D006C11F8E308006041F2 /* PopupMenuMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5034 D39D009D11F907E6006041F2 /* SearchPopupMenuMac.h in Headers */ = {isa = PBXBuildFile; fileRef = D39D009C11F907E6006041F2 /* SearchPopupMenuMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5033 5035 D8B6152F1032495100C8554A /* Cookie.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6152E1032495100C8554A /* Cookie.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5034 5036 DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */; }; … … 10753 10755 D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSRangeException.cpp; sourceTree = "<group>"; }; 10754 10756 D23CA56B0AB0EB8D005108A5 /* RangeException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RangeException.h; sourceTree = "<group>"; }; 10757 D39D006C11F8E308006041F2 /* PopupMenuMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopupMenuMac.h; sourceTree = "<group>"; }; 10758 D39D009C11F907E6006041F2 /* SearchPopupMenuMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchPopupMenuMac.h; sourceTree = "<group>"; }; 10755 10759 D8B6152E1032495100C8554A /* Cookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cookie.h; sourceTree = "<group>"; }; 10756 10760 DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndentOutdentCommand.cpp; sourceTree = "<group>"; }; … … 12329 12333 935C476F09AC4D7300A6AAB4 /* PlatformMouseEventMac.mm */, 12330 12334 BC94D1070C274F88006BC617 /* PlatformScreenMac.mm */, 12335 D39D006C11F8E308006041F2 /* PopupMenuMac.h */, 12331 12336 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */, 12332 12337 E4D687760ED7AE3D006EA978 /* PurgeableBufferMac.cpp */, 12333 12338 447D69010FA626810015CCB1 /* RuntimeApplicationChecks.h */, 12334 12339 447D69020FA626810015CCB1 /* RuntimeApplicationChecks.mm */, 12340 D39D009C11F907E6006041F2 /* SearchPopupMenuMac.h */, 12335 12341 1CE24F960D7CAF0E007E04C2 /* SchedulePairMac.mm */, 12336 12342 BCAA90C20A7EBA60008B1229 /* Scrollbar.cpp */, … … 19989 19995 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */, 19990 19996 CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, 19997 D39D006D11F8E308006041F2 /* PopupMenuMac.h in Headers */, 19998 D39D009D11F907E6006041F2 /* SearchPopupMenuMac.h in Headers */, 19991 19999 ); 19992 20000 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/loader/EmptyClients.h
r64462 r64513 2 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) 3 3 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 40 41 #include "InspectorClient.h" 41 42 #include "PluginHalterClient.h" 43 #include "PopupMenu.h" 42 44 #include "ResourceError.h" 45 #include "SearchPopupMenu.h" 43 46 44 47 #if USE(GLES2_RENDERING) … … 61 64 namespace WebCore { 62 65 66 class EmptyPopupMenu : public PopupMenu { 67 public: 68 virtual void show(const IntRect&, FrameView*, int) {} 69 virtual void hide() {} 70 virtual void updateFromElement() {} 71 virtual void disconnectClient() {} 72 }; 73 74 class EmptySearchPopupMenu : public SearchPopupMenu { 75 public: 76 virtual PopupMenu* popupMenu() { return m_popup.get(); } 77 virtual void saveRecentSearches(const AtomicString&, const Vector<String>&) {} 78 virtual void loadRecentSearches(const AtomicString&, Vector<String>&) {} 79 virtual bool enabled() { return false; } 80 81 private: 82 RefPtr<EmptyPopupMenu> m_popup; 83 }; 84 63 85 class EmptyChromeClient : public ChromeClient { 64 86 public: … … 112 134 virtual bool runJavaScriptPrompt(Frame*, const String&, const String&, String&) { return false; } 113 135 virtual bool shouldInterruptJavaScript() { return false; } 136 137 virtual bool selectItemWritingDirectionIsNatural() { return false; } 138 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const { return adoptRef(new EmptyPopupMenu()); } 139 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const { return adoptRef(new EmptySearchPopupMenu()); } 114 140 115 141 virtual void setStatusbarText(const String&) { } -
trunk/WebCore/page/Chrome.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 483 483 } 484 484 485 bool Chrome::selectItemWritingDirectionIsNatural() 486 { 487 return m_client->selectItemWritingDirectionIsNatural(); 488 } 489 490 PassRefPtr<PopupMenu> Chrome::createPopupMenu(PopupMenuClient* client) const 491 { 492 return m_client->createPopupMenu(client); 493 } 494 495 PassRefPtr<SearchPopupMenu> Chrome::createSearchPopupMenu(PopupMenuClient* client) const 496 { 497 return m_client->createSearchPopupMenu(client); 498 } 485 499 486 500 } // namespace WebCore -
trunk/WebCore/page/Chrome.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 25 26 #include "FocusDirection.h" 26 27 #include "HostWindow.h" 28 #include "PopupMenu.h" 29 #include "SearchPopupMenu.h" 27 30 #include <wtf/Forward.h> 28 31 #include <wtf/RefPtr.h> … … 45 48 class Node; 46 49 class Page; 50 class PopupMenuClient; 47 51 class String; 48 52 #if ENABLE(NOTIFICATIONS) … … 145 149 #endif 146 150 151 bool selectItemWritingDirectionIsNatural(); 152 PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; 153 PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; 154 147 155 private: 148 156 Page* m_page; -
trunk/WebCore/page/ChromeClient.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple, Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 27 28 #include "HTMLParserQuirks.h" 28 29 #include "HostWindow.h" 30 #include "PopupMenu.h" 31 #include "PopupMenuClient.h" 29 32 #include "ScrollTypes.h" 33 #include "SearchPopupMenu.h" 30 34 #include <wtf/Forward.h> 31 35 #include <wtf/PassOwnPtr.h> … … 55 59 class Page; 56 60 class SecurityOrigin; 61 class PopupMenuClient; 57 62 class String; 58 63 class Widget; … … 263 268 #endif 264 269 270 virtual bool selectItemWritingDirectionIsNatural() = 0; 271 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const = 0; 272 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const = 0; 273 265 274 protected: 266 275 virtual ~ChromeClient() { } -
trunk/WebCore/platform/PopupMenu.h
r64462 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 22 22 #define PopupMenu_h 23 23 24 #include "IntRect.h"25 #include "PopupMenuClient.h"26 #include <wtf/PassRefPtr.h>27 24 #include <wtf/RefCounted.h> 28 29 #if PLATFORM(MAC)30 #include <wtf/RetainPtr.h>31 #ifdef __OBJC__32 @class NSPopUpButtonCell;33 #else34 class NSPopUpButtonCell;35 #endif36 #elif PLATFORM(WIN)37 #include "Scrollbar.h"38 #include "ScrollbarClient.h"39 #include <wtf/RefPtr.h>40 typedef struct HWND__* HWND;41 typedef struct HDC__* HDC;42 typedef struct HBITMAP__* HBITMAP;43 #elif PLATFORM(QT)44 namespace WebCore {45 class QtAbstractWebPopup;46 }47 #elif PLATFORM(GTK)48 typedef struct _GtkMenu GtkMenu;49 typedef struct _GtkMenuItem GtkMenuItem;50 typedef struct _GtkWidget GtkWidget;51 #include "GRefPtrGtk.h"52 #include <wtf/HashMap.h>53 #include <glib.h>54 #elif PLATFORM(WX)55 #ifdef __WXMSW__56 #include <wx/msw/winundef.h>57 #endif58 class wxMenu;59 #include <wx/defs.h>60 #include <wx/event.h>61 #elif PLATFORM(CHROMIUM)62 #include "PopupMenuPrivate.h"63 #elif PLATFORM(HAIKU)64 namespace WebCore {65 class PopupMenuHaiku;66 }67 #endif68 25 69 26 namespace WebCore { 70 27 71 28 class FrameView; 72 class Scrollbar;29 class IntRect; 73 30 74 class PopupMenu : public RefCounted<PopupMenu> 75 #if PLATFORM(WIN) 76 , private ScrollbarClient 77 #endif 78 #if PLATFORM(WX) 79 , public wxEvtHandler 80 #endif 81 { 31 class PopupMenu : public RefCounted<PopupMenu> { 82 32 public: 83 static PassRefPtr<PopupMenu> create(PopupMenuClient* client) { return adoptRef(new PopupMenu(client)); } 84 ~PopupMenu(); 85 86 void disconnectClient() { m_popupClient = 0; } 87 88 void show(const IntRect&, FrameView*, int index); 89 void hide(); 90 91 void updateFromElement(); 92 93 PopupMenuClient* client() const { return m_popupClient; } 94 95 static bool itemWritingDirectionIsNatural(); 96 97 #if PLATFORM(WIN) 98 Scrollbar* scrollbar() const { return m_scrollbar.get(); } 99 100 static LPCTSTR popupClassName(); 101 102 bool up(unsigned lines = 1); 103 bool down(unsigned lines = 1); 104 105 int itemHeight() const { return m_itemHeight; } 106 const IntRect& windowRect() const { return m_windowRect; } 107 IntRect clientRect() const; 108 109 int visibleItems() const; 110 111 int listIndexAtPoint(const IntPoint&) const; 112 113 bool setFocusedIndex(int index, bool hotTracking = false); 114 int focusedIndex() const; 115 void focusFirst(); 116 void focusLast(); 117 118 void paint(const IntRect& damageRect, HDC = 0); 119 120 HWND popupHandle() const { return m_popup; } 121 122 void setWasClicked(bool b = true) { m_wasClicked = b; } 123 bool wasClicked() const { return m_wasClicked; } 124 125 void setScrollOffset(int offset) { m_scrollOffset = offset; } 126 int scrollOffset() const { return m_scrollOffset; } 127 128 bool scrollToRevealSelection(); 129 130 void incrementWheelDelta(int delta); 131 void reduceWheelDelta(int delta); 132 int wheelDelta() const { return m_wheelDelta; } 133 134 bool scrollbarCapturingMouse() const { return m_scrollbarCapturingMouse; } 135 void setScrollbarCapturingMouse(bool b) { m_scrollbarCapturingMouse = b; } 136 #endif 137 138 protected: 139 PopupMenu(PopupMenuClient*); 140 141 private: 142 PopupMenuClient* m_popupClient; 143 144 #if PLATFORM(MAC) 145 void clear(); 146 void populate(); 147 148 RetainPtr<NSPopUpButtonCell> m_popup; 149 #elif PLATFORM(QT) 150 QtAbstractWebPopup* m_popup; 151 #elif PLATFORM(WIN) 152 // ScrollBarClient 153 virtual void valueChanged(Scrollbar*); 154 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); 155 virtual bool isActive() const { return true; } 156 virtual bool scrollbarCornerPresent() const { return false; } 157 158 void calculatePositionAndSize(const IntRect&, FrameView*); 159 void invalidateItem(int index); 160 161 static LRESULT CALLBACK PopupMenuWndProc(HWND, UINT, WPARAM, LPARAM); 162 LRESULT wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 163 static void registerClass(); 164 165 RefPtr<Scrollbar> m_scrollbar; 166 HWND m_popup; 167 HDC m_DC; 168 HBITMAP m_bmp; 169 bool m_wasClicked; 170 IntRect m_windowRect; 171 int m_itemHeight; 172 int m_scrollOffset; 173 int m_wheelDelta; 174 int m_focusedIndex; 175 bool m_scrollbarCapturingMouse; 176 bool m_showPopup; 177 #elif PLATFORM(GTK) 178 IntPoint m_menuPosition; 179 GRefPtr<GtkMenu> m_popup; 180 HashMap<GtkWidget*, int> m_indexMap; 181 static void menuItemActivated(GtkMenuItem* item, PopupMenu*); 182 static void menuUnmapped(GtkWidget*, PopupMenu*); 183 static void menuPositionFunction(GtkMenu*, gint*, gint*, gboolean*, PopupMenu*); 184 static void menuRemoveItem(GtkWidget*, PopupMenu*); 185 #elif PLATFORM(EFL) || PLATFORM(BREWMP) 186 FrameView* m_view; 187 #elif PLATFORM(WX) 188 wxMenu* m_menu; 189 void OnMenuItemSelected(wxCommandEvent&); 190 #elif PLATFORM(CHROMIUM) 191 PopupMenuPrivate p; 192 #elif PLATFORM(HAIKU) 193 PopupMenuHaiku* m_menu; 194 #endif 195 33 virtual ~PopupMenu() {} 34 virtual void show(const IntRect&, FrameView*, int index) = 0; 35 virtual void hide() = 0; 36 virtual void updateFromElement() = 0; 37 virtual void disconnectClient() = 0; 196 38 }; 197 39 198 40 } 199 41 200 #endif 42 #endif // PopupMenu_h -
trunk/WebCore/platform/SearchPopupMenu.h
r64462 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 24 24 #include "PopupMenu.h" 25 25 #include <wtf/Vector.h> 26 #include <wtf/text/WTFString.h> 26 27 27 28 namespace WebCore { … … 29 30 class AtomicString; 30 31 31 class SearchPopupMenu : public PopupMenu{32 class SearchPopupMenu : public RefCounted<SearchPopupMenu> { 32 33 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 34 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 37 38 bool enabled(); 39 40 private: 41 SearchPopupMenu(PopupMenuClient*); 34 virtual ~SearchPopupMenu() {} 35 virtual PopupMenu* popupMenu() = 0; 36 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) = 0; 37 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) = 0; 38 virtual bool enabled() = 0; 42 39 }; 43 40 44 41 } 45 42 46 #endif 43 #endif // SearchPopupMenu_h -
trunk/WebCore/platform/brew/PopupMenuBrew.cpp
r64462 r64513 5 5 * Copyright (C) 2009-2010 Samsung Electronics 6 6 * Copyright (C) 2010 Company 100, Inc. 7 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 7 8 * 8 9 * This library is free software; you can redistribute it and/or … … 24 25 25 26 #include "config.h" 26 #include "PopupMenu .h"27 #include "PopupMenuBrew.h" 27 28 28 29 #include "Chrome.h" … … 33 34 namespace WebCore { 34 35 35 PopupMenu ::PopupMenu(PopupMenuClient* menuList)36 PopupMenuBrew::PopupMenuBrew(PopupMenuClient* menuList) 36 37 : m_popupClient(menuList) 37 38 , m_view(0) … … 39 40 } 40 41 41 PopupMenu ::~PopupMenu()42 PopupMenuBrew::~PopupMenuBrew() 42 43 { 43 44 // Tell client to destroy data related to this popup since this object is … … 46 47 } 47 48 48 void PopupMenu::show(const IntRect& rect, FrameView* view, int index) 49 void PopupMenuBrew::disconnectClient() 50 { 51 m_popupClient = 0; 52 } 53 54 void PopupMenuBrew::show(const IntRect& rect, FrameView* view, int index) 49 55 { 50 56 ASSERT(m_popupClient); … … 56 62 } 57 63 58 void PopupMenu ::hide()64 void PopupMenuBrew::hide() 59 65 { 60 66 ASSERT(m_view); … … 65 71 } 66 72 67 void PopupMenu ::updateFromElement()73 void PopupMenuBrew::updateFromElement() 68 74 { 69 75 client()->setTextFromItem(client()->selectedIndex()); 70 76 } 71 77 72 bool PopupMenu::itemWritingDirectionIsNatural() 73 { 74 return true; 75 } 78 // This code must be moved to the concrete brew ChromeClient that is not in repository. 79 // I kept this code commented out here to prevent loosing the information of what 80 // must be the return value for brew. 81 82 // bool PopupMenuBrew::itemWritingDirectionIsNatural() 83 // { 84 // return true; 85 // } 76 86 77 87 } // namespace WebCore -
trunk/WebCore/platform/brew/PopupMenuBrew.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 *19 18 */ 20 19 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h20 #ifndef PopupMenuBrew_h 21 #define PopupMenuBrew_h 23 22 23 #include "IntRect.h" 24 24 #include "PopupMenu.h" 25 #include <wtf/Vector.h> 25 #include "PopupMenuClient.h" 26 #include <wtf/PassRefPtr.h> 27 #include <wtf/RefCounted.h> 26 28 27 29 namespace WebCore { 28 30 29 class AtomicString; 31 class FrameView; 32 class Scrollbar; 30 33 31 class SearchPopupMenu: public PopupMenu {34 class PopupMenuBrew : public PopupMenu { 32 35 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 36 PopupMenuBrew(PopupMenuClient*); 37 ~PopupMenuBrew(); 34 38 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 39 virtual void show(const IntRect&, FrameView*, int index); 40 virtual void hide(); 41 virtual void updateFromElement(); 42 virtual void disconnectClient(); 37 43 38 bool enabled();39 40 44 private: 41 SearchPopupMenu(PopupMenuClient*); 45 PopupMenuClient* client() const { return m_popupClient; } 46 47 PopupMenuClient* m_popupClient; 48 FrameView* m_view; 42 49 }; 43 50 44 51 } 45 52 46 #endif 53 #endif // PopupMenuBrew_h -
trunk/WebCore/platform/brew/SearchPopupMenuBrew.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2010 Company 100, Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 25 26 26 27 #include "config.h" 27 #include "SearchPopupMenu .h"28 #include "SearchPopupMenuBrew.h" 28 29 29 30 namespace WebCore { 30 31 31 32 // Save the past searches stored in 'searchItems' to a database associated with 'name' 32 void SearchPopupMenu ::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)33 void SearchPopupMenuBrew::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) 33 34 { 34 35 } 35 36 36 37 // Load past searches associated with 'name' from the database to 'searchItems' 37 void SearchPopupMenu ::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)38 void SearchPopupMenuBrew::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) 38 39 { 39 40 } 40 41 41 42 // Create a search popup menu - not sure what else we have to do here 42 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)43 : PopupMenu(client)43 SearchPopupMenuBrew::SearchPopupMenuBrew(PopupMenuClient* client) 44 : m_popup(adoptRef(new PopupMenuBrew(client))) 44 45 { 45 46 } 46 47 47 bool SearchPopupMenu ::enabled()48 bool SearchPopupMenuBrew::enabled() 48 49 { 49 50 return false; 50 51 } 51 52 53 PopupMenu* SearchPopupMenuBrew::popupMenu() 54 { 55 return m_popup.get(); 56 } 57 52 58 } // namespace WebCore -
trunk/WebCore/platform/brew/SearchPopupMenuBrew.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuBrew_h 22 #define SearchPopupMenuBrew_h 23 24 #include "PopupMenuBrew.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuBrew : public SearchPopupMenu { 30 public: 31 SearchPopupMenuBrew(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuBrew> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuBrew_h -
trunk/WebCore/platform/chromium/PopupMenuChromium.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 49 50 #include "PlatformScreen.h" 50 51 #include "PlatformWheelEvent.h" 51 #include "PopupMenu.h"52 52 #include "RenderTheme.h" 53 53 #include "ScrollbarTheme.h" … … 1341 1341 1342 1342 /////////////////////////////////////////////////////////////////////////////// 1343 // PopupMenu implementation1343 // PopupMenuChromium implementation 1344 1344 // 1345 1345 // Note: you cannot add methods to this class, since it is defined above the … … 1347 1347 // popup widgets, use |popupWindow| above. 1348 1348 1349 PopupMenu ::PopupMenu(PopupMenuClient* client)1349 PopupMenuChromium::PopupMenuChromium(PopupMenuClient* client) 1350 1350 : m_popupClient(client) 1351 1351 { 1352 1352 } 1353 1353 1354 PopupMenu ::~PopupMenu()1355 { 1356 // When the PopupMenu is destroyed, the client could already have been1354 PopupMenuChromium::~PopupMenuChromium() 1355 { 1356 // When the PopupMenuChromium is destroyed, the client could already have been 1357 1357 // deleted. 1358 1358 if (p.popup) … … 1365 1365 // Windows and Linux Chromium let our WebKit port handle the display, while 1366 1366 // another process manages the popup window and input handling. 1367 void PopupMenu ::show(const IntRect& r, FrameView* v, int index)1367 void PopupMenuChromium::show(const IntRect& r, FrameView* v, int index) 1368 1368 { 1369 1369 if (!p.popup) … … 1376 1376 } 1377 1377 1378 void PopupMenu ::hide()1378 void PopupMenuChromium::hide() 1379 1379 { 1380 1380 if (p.popup) … … 1382 1382 } 1383 1383 1384 void PopupMenu ::updateFromElement()1384 void PopupMenuChromium::updateFromElement() 1385 1385 { 1386 1386 p.popup->listBox()->updateFromElement(); 1387 1387 } 1388 1388 1389 bool PopupMenu::itemWritingDirectionIsNatural() 1390 { 1391 return false; 1389 1390 void PopupMenuChromium::disconnectClient() 1391 { 1392 m_popupClient = 0; 1392 1393 } 1393 1394 -
trunk/WebCore/platform/chromium/PopupMenuChromium.h
r64462 r64513 37 37 #include "FramelessScrollView.h" 38 38 #include "IntRect.h" 39 #include "PopupMenu.h" 40 #include "PopupMenuPrivate.h" 39 41 40 42 namespace WebCore { … … 202 204 }; 203 205 206 class PopupMenuChromium : public PopupMenu { 207 public: 208 PopupMenuChromium(PopupMenuClient*); 209 ~PopupMenuChromium(); 210 211 virtual void show(const IntRect&, FrameView*, int index); 212 virtual void hide(); 213 virtual void updateFromElement(); 214 virtual void disconnectClient(); 215 216 private: 217 PopupMenuClient* client() const { return m_popupClient; } 218 219 PopupMenuClient* m_popupClient; 220 PopupMenuPrivate p; 221 }; 222 204 223 } // namespace WebCore 205 224 -
trunk/WebCore/platform/chromium/SearchPopupMenuChromium.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 30 31 31 32 #include "config.h" 32 #include "SearchPopupMenu .h"33 #include "SearchPopupMenuChromium.h" 33 34 34 35 #include "AtomicString.h" … … 37 38 namespace WebCore { 38 39 39 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)40 : PopupMenu(client)40 SearchPopupMenuChromium::SearchPopupMenuChromium(PopupMenuClient* client) 41 : m_popup(adoptRef(new PopupMenuChromium(client))) 41 42 { 42 43 } 43 44 44 bool SearchPopupMenu::enabled() 45 PopupMenu* SearchPopupMenuChromium::popupMenu() 46 { 47 return m_popup.get(); 48 } 49 50 bool SearchPopupMenuChromium::enabled() 45 51 { 46 52 return false; 47 53 } 48 54 49 void SearchPopupMenu ::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)55 void SearchPopupMenuChromium::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) 50 56 { 51 57 notImplemented(); 52 58 } 53 59 54 void SearchPopupMenu ::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)60 void SearchPopupMenuChromium::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) 55 61 { 56 62 notImplemented(); -
trunk/WebCore/platform/chromium/SearchPopupMenuChromium.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuChromium_h 22 #define SearchPopupMenuChromium_h 23 24 #include "PopupMenuChromium.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuChromium : public SearchPopupMenu { 30 public: 31 SearchPopupMenuChromium(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuChromium> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuChromium_h -
trunk/WebCore/platform/efl/PopupMenuEfl.cpp
r64462 r64513 4 4 * Copyright (C) 2009-2010 ProFUSION embedded systems 5 5 * Copyright (C) 2009-2010 Samsung Electronics 6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 6 7 * 7 8 * This library is free software; you can redistribute it and/or … … 23 24 24 25 #include "config.h" 25 #include "PopupMenu .h"26 #include "PopupMenuEfl.h" 26 27 27 28 #include "Chrome.h" … … 29 30 #include "FrameView.h" 30 31 #include "NotImplemented.h" 32 #include "PopupMenuClient.h" 31 33 32 34 namespace WebCore { 33 35 34 PopupMenu ::PopupMenu(PopupMenuClient* client)36 PopupMenuEfl::PopupMenuEfl(PopupMenuClient* client) 35 37 : m_popupClient(client) 36 38 , m_view(0) … … 38 40 } 39 41 40 PopupMenu ::~PopupMenu()42 PopupMenuEfl::~PopupMenuEfl() 41 43 { 42 44 // Tell client to destroy data related to this popup since this object is … … 45 47 } 46 48 47 void PopupMenu ::show(const IntRect& rect, FrameView* view, int index)49 void PopupMenuEfl::show(const IntRect& rect, FrameView* view, int index) 48 50 { 49 51 ASSERT(m_popupClient); … … 55 57 } 56 58 57 void PopupMenu ::hide()59 void PopupMenuEfl::hide() 58 60 { 59 61 ASSERT(m_view); … … 64 66 } 65 67 66 void PopupMenu ::updateFromElement()68 void PopupMenuEfl::updateFromElement() 67 69 { 68 70 client()->setTextFromItem(client()->selectedIndex()); 69 71 } 70 72 71 bool PopupMenu::itemWritingDirectionIsNatural()73 void PopupMenuEfl::disconnectClient() 72 74 { 73 return true;75 m_popupClient = 0; 74 76 } 75 77 -
trunk/WebCore/platform/efl/PopupMenuEfl.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 *19 18 */ 20 19 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h20 #ifndef PopupMenuEfl_h 21 #define PopupMenuEfl_h 23 22 23 #include "IntRect.h" 24 24 #include "PopupMenu.h" 25 #include <wtf/Vector.h> 25 #include <wtf/PassRefPtr.h> 26 #include <wtf/RefCounted.h> 26 27 27 28 namespace WebCore { 28 29 29 class AtomicString; 30 class FrameView; 31 class Scrollbar; 32 class PopupMenuClient; 30 33 31 class SearchPopupMenu: public PopupMenu {34 class PopupMenuEfl : public PopupMenu { 32 35 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 36 PopupMenuEfl(PopupMenuClient*); 37 ~PopupMenuEfl(); 34 38 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 39 virtual void show(const IntRect&, FrameView*, int index); 40 virtual void hide(); 41 virtual void updateFromElement(); 42 virtual void disconnectClient(); 37 43 38 bool enabled();39 40 44 private: 41 SearchPopupMenu(PopupMenuClient*); 45 PopupMenuClient* client() const { return m_popupClient; } 46 47 PopupMenuClient* m_popupClient; 48 FrameView* m_view; 42 49 }; 43 50 44 51 } 45 52 46 #endif 53 #endif // PopupMenuEfl_h -
trunk/WebCore/platform/efl/SearchPopupMenuEfl.cpp
r64462 r64513 3 3 * Copyright (C) 2009-2010 ProFUSION embedded systems 4 4 * Copyright (C) 2009-2010 Samsung Electronics 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 20 21 21 22 #include "config.h" 22 #include "SearchPopupMenu .h"23 #include "SearchPopupMenuEfl.h" 23 24 24 25 #include "NotImplemented.h" … … 26 27 namespace WebCore { 27 28 28 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)29 : PopupMenu(client)29 SearchPopupMenuEfl::SearchPopupMenuEfl(PopupMenuClient* client) 30 : m_popup(adoptRef(new PopupMenuEfl(client))) 30 31 { 31 32 notImplemented(); 32 33 } 33 34 34 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 35 PopupMenu* SearchPopupMenuEfl::popupMenu() 36 { 37 return m_popup.get(); 38 } 39 40 void SearchPopupMenuEfl::saveRecentSearches(const AtomicString&, const Vector<String>&) 35 41 { 36 42 notImplemented(); 37 43 } 38 44 39 void SearchPopupMenu ::loadRecentSearches(const AtomicString&, Vector<String>&)45 void SearchPopupMenuEfl::loadRecentSearches(const AtomicString&, Vector<String>&) 40 46 { 41 47 notImplemented(); 42 48 } 43 49 44 bool SearchPopupMenu ::enabled()50 bool SearchPopupMenuEfl::enabled() 45 51 { 46 52 notImplemented(); -
trunk/WebCore/platform/efl/SearchPopupMenuEfl.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuEfl_h 22 #define SearchPopupMenuEfl_h 23 24 #include "PopupMenuEfl.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuEfl : public SearchPopupMenu { 30 public: 31 SearchPopupMenuEfl(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuEfl> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuEfl_h -
trunk/WebCore/platform/gtk/PopupMenuGtk.cpp
r64462 r64513 5 5 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 6 6 * Copyright (C) 2008 Collabora Ltd. 7 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 7 8 * 8 9 * This library is free software; you can redistribute it and/or … … 24 25 25 26 #include "config.h" 26 #include "PopupMenu .h"27 #include "PopupMenuGtk.h" 27 28 28 29 #include "FrameView.h" … … 35 36 namespace WebCore { 36 37 37 PopupMenu ::PopupMenu(PopupMenuClient* client)38 PopupMenuGtk::PopupMenuGtk(PopupMenuClient* client) 38 39 : m_popupClient(client) 39 40 { 40 41 } 41 42 42 PopupMenu ::~PopupMenu()43 PopupMenuGtk::~PopupMenuGtk() 43 44 { 44 45 if (m_popup) { … … 48 49 } 49 50 50 void PopupMenu ::show(const IntRect& rect, FrameView* view, int index)51 void PopupMenuGtk::show(const IntRect& rect, FrameView* view, int index) 51 52 { 52 53 ASSERT(client()); … … 111 112 } 112 113 113 void PopupMenu ::hide()114 void PopupMenuGtk::hide() 114 115 { 115 116 ASSERT(m_popup); … … 117 118 } 118 119 119 void PopupMenu ::updateFromElement()120 void PopupMenuGtk::updateFromElement() 120 121 { 121 122 client()->setTextFromItem(client()->selectedIndex()); 122 123 } 123 124 124 bool PopupMenu::itemWritingDirectionIsNatural()125 void PopupMenuGtk::disconnectClient() 125 126 { 126 return true;127 m_popupClient = 0; 127 128 } 128 129 129 void PopupMenu ::menuItemActivated(GtkMenuItem* item, PopupMenu* that)130 void PopupMenuGtk::menuItemActivated(GtkMenuItem* item, PopupMenuGtk* that) 130 131 { 131 132 ASSERT(that->client()); … … 134 135 } 135 136 136 void PopupMenu ::menuUnmapped(GtkWidget*, PopupMenu* that)137 void PopupMenuGtk::menuUnmapped(GtkWidget*, PopupMenuGtk* that) 137 138 { 138 139 ASSERT(that->client()); … … 140 141 } 141 142 142 void PopupMenu ::menuPositionFunction(GtkMenu*, gint* x, gint* y, gboolean* pushIn, PopupMenu* that)143 void PopupMenuGtk::menuPositionFunction(GtkMenu*, gint* x, gint* y, gboolean* pushIn, PopupMenuGtk* that) 143 144 { 144 145 *x = that->m_menuPosition.x(); … … 147 148 } 148 149 149 void PopupMenu ::menuRemoveItem(GtkWidget* widget, PopupMenu* that)150 void PopupMenuGtk::menuRemoveItem(GtkWidget* widget, PopupMenuGtk* that) 150 151 { 151 152 ASSERT(that->m_popup); -
trunk/WebCore/platform/gtk/SearchPopupMenuGtk.cpp
r64462 r64513 1 1 /* 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * 2 4 * This library is free software; you can redistribute it and/or 3 5 * modify it under the terms of the GNU Lesser General Public … … 16 18 17 19 #include "config.h" 18 #include "SearchPopupMenu .h"20 #include "SearchPopupMenuGtk.h" 19 21 20 22 #include "NotImplemented.h" … … 22 24 namespace WebCore { 23 25 24 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)25 : PopupMenu(client)26 SearchPopupMenuGtk::SearchPopupMenuGtk(PopupMenuClient* client) 27 : m_popup(adoptRef(new PopupMenuGtk(client))) 26 28 { 27 29 notImplemented(); 28 30 } 29 31 30 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 32 PopupMenu* SearchPopupMenuGtk::popupMenu() 33 { 34 return m_popup.get(); 35 } 36 37 void SearchPopupMenuGtk::saveRecentSearches(const AtomicString&, const Vector<String>&) 31 38 { 32 39 notImplemented(); 33 40 } 34 41 35 void SearchPopupMenu ::loadRecentSearches(const AtomicString&, Vector<String>&)42 void SearchPopupMenuGtk::loadRecentSearches(const AtomicString&, Vector<String>&) 36 43 { 37 44 notImplemented(); 38 45 } 39 46 40 bool SearchPopupMenu ::enabled()47 bool SearchPopupMenuGtk::enabled() 41 48 { 42 49 notImplemented(); -
trunk/WebCore/platform/gtk/SearchPopupMenuGtk.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuGtk_h 22 #define SearchPopupMenuGtk_h 23 24 #include "PopupMenuGtk.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuGtk : public SearchPopupMenu { 30 public: 31 SearchPopupMenuGtk(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuGtk> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuGtk_h -
trunk/WebCore/platform/haiku/PopupMenuHaiku.cpp
r64462 r64513 3 3 * 4 4 * Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de> 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 22 23 23 24 #include "config.h" 24 #include "PopupMenu .h"25 #include "PopupMenuHaiku.h" 25 26 26 27 #include "FrameView.h" … … 73 74 }; 74 75 75 class PopupMenuHaiku: public BPopUpMenu {76 class HaikuPopup : public BPopUpMenu { 76 77 public: 77 PopupMenuHaiku(PopupMenuClient* popupClient)78 HaikuPopup(PopupMenuClient* popupClient) 78 79 : BPopUpMenu("WebCore Popup", true, false) 79 80 , m_popupClient(popupClient) … … 87 88 } 88 89 89 virtual ~ PopupMenuHaiku()90 virtual ~HaikuPopup() 90 91 { 91 92 if (be_app->Lock()) { … … 154 155 }; 155 156 156 PopupMenu ::PopupMenu(PopupMenuClient* client)157 PopupMenuHaiku::PopupMenuHaiku(PopupMenuClient* client) 157 158 : m_popupClient(client) 158 , m_menu(new PopupMenuHaiku(client))159 , m_menu(new HaikuPopup(client)) 159 160 { 160 161 // We don't need additional references to the client, since we completely … … 162 163 } 163 164 164 PopupMenu ::~PopupMenu()165 PopupMenuHaiku::~PopupMenuHaiku() 165 166 { 166 167 delete m_menu; 167 168 } 168 169 169 void PopupMenu::show(const IntRect& rect, FrameView* view, int index) 170 void PopupMenuHaiku::disconnectClient() 171 { 172 m_popupClient = 0; 173 } 174 175 void PopupMenuHaiku::show(const IntRect& rect, FrameView* view, int index) 170 176 { 171 177 // The menu will update itself from the PopupMenuClient before showing. … … 173 179 } 174 180 175 void PopupMenu ::hide()181 void PopupMenuHaiku::hide() 176 182 { 177 183 m_menu->hide(); 178 184 } 179 185 180 void PopupMenu ::updateFromElement()186 void PopupMenuHaiku::updateFromElement() 181 187 { 182 188 client()->setTextFromItem(m_popupClient->selectedIndex()); 183 189 } 184 190 185 bool PopupMenu::itemWritingDirectionIsNatural()186 {187 return false;188 }189 190 191 } // namespace WebCore 191 192 -
trunk/WebCore/platform/haiku/PopupMenuHaiku.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 19 19 */ 20 20 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h21 #ifndef PopupMenuHaiku_h 22 #define PopupMenuHaiku_h 23 23 24 #include "IntRect.h" 24 25 #include "PopupMenu.h" 25 #include <wtf/Vector.h> 26 #include "PopupMenuClient.h" 27 #include <wtf/PassRefPtr.h> 28 #include <wtf/RefCounted.h> 26 29 27 30 namespace WebCore { 28 31 29 class AtomicString; 32 class FrameView; 33 class HaikuPopup; 34 class Scrollbar; 30 35 31 class SearchPopupMenu : public PopupMenu {36 class PopupMenuHaiku : public PopupMenu { 32 37 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 38 PopupMenuHaiku(PopupMenuClient*); 39 ~PopupMenuHaiku(); 34 40 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 41 virtual void show(const IntRect&, FrameView*, int index); 42 virtual void hide(); 43 virtual void updateFromElement(); 44 virtual void disconnectClient(); 37 45 38 bool enabled();39 40 46 private: 41 SearchPopupMenu(PopupMenuClient*); 47 PopupMenuClient* client() const { return m_popupClient; } 48 49 PopupMenuClient* m_popupClient; 50 HaikuPopup* m_menu; 42 51 }; 43 52 44 53 } 45 54 46 #endif 55 #endif // PopupMenuHaiku_h -
trunk/WebCore/platform/haiku/SearchPopupMenuHaiku.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 19 20 20 21 #include "config.h" 21 #include "SearchPopupMenu .h"22 #include "SearchPopupMenuHaiku.h" 22 23 23 24 #include "AtomicString.h" … … 27 28 namespace WebCore { 28 29 29 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)30 : PopupMenu(client)30 SearchPopupMenuHaiku::SearchPopupMenuHaiku(PopupMenuClient* client) 31 : m_popup(adoptRef(new PopupMenuHaiku(client))) 31 32 { 32 33 } 33 34 34 void SearchPopupMenu ::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)35 void SearchPopupMenuHaiku::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) 35 36 { 36 37 notImplemented(); 37 38 } 38 39 39 void SearchPopupMenu ::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)40 void SearchPopupMenuHaiku::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) 40 41 { 41 42 notImplemented(); 42 43 } 43 44 44 bool SearchPopupMenu ::enabled()45 bool SearchPopupMenuHaiku::enabled() 45 46 { 46 47 notImplemented(); … … 48 49 } 49 50 51 PopupMenu* SearchPopupMenuHaiku::popupMenu() 52 { 53 return m_popup.get(); 54 } 55 50 56 } // namespace WebCore 51 57 -
trunk/WebCore/platform/haiku/SearchPopupMenuHaiku.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuHaiku_h 22 #define SearchPopupMenuHaiku_h 23 24 #include "PopupMenuHaiku.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuHaiku : public SearchPopupMenu { 30 public: 31 SearchPopupMenuHaiku(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuHaiku> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuHaiku_h -
trunk/WebCore/platform/mac/PopupMenuMac.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 *19 18 */ 20 19 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h20 #ifndef PopupMenuMac_h 21 #define PopupMenuMac_h 23 22 23 #include "IntRect.h" 24 24 #include "PopupMenu.h" 25 #include <wtf/Vector.h> 25 #include <wtf/PassRefPtr.h> 26 #include <wtf/RefCounted.h> 27 #include <wtf/RetainPtr.h> 28 29 class NSPopUpButtonCell; 26 30 27 31 namespace WebCore { 28 32 29 class AtomicString; 33 class PopupMenuClient; 34 class FrameView; 35 class Scrollbar; 30 36 31 class SearchPopupMenu: public PopupMenu {37 class PopupMenuMac : public PopupMenu { 32 38 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 39 PopupMenuMac(PopupMenuClient*); 40 ~PopupMenuMac(); 34 41 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 42 virtual void show(const IntRect&, FrameView*, int index); 43 virtual void hide(); 44 virtual void updateFromElement(); 45 virtual void disconnectClient(); 37 46 38 bool enabled();39 40 47 private: 41 SearchPopupMenu(PopupMenuClient*); 48 void clear(); 49 void populate(); 50 PopupMenuClient* client() const { return m_popupClient; } 51 52 PopupMenuClient* m_popupClient; 53 RetainPtr<NSPopUpButtonCell> m_popup; 42 54 }; 43 55 44 56 } 45 57 46 #endif 58 #endif // PopupMenuMac_h -
trunk/WebCore/platform/mac/PopupMenuMac.mm
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 19 20 20 21 #import "config.h" 21 #import "PopupMenu .h"22 #import "PopupMenuMac.h" 22 23 23 24 #import "AXObjectCache.h" … … 32 33 #import "HTMLSelectElement.h" 33 34 #import "Page.h" 35 #import "PopupMenuClient.h" 34 36 #import "SimpleFontData.h" 35 37 #import "WebCoreSystemInterface.h" … … 39 41 using namespace HTMLNames; 40 42 41 PopupMenu ::PopupMenu(PopupMenuClient* client)43 PopupMenuMac::PopupMenuMac(PopupMenuClient* client) 42 44 : m_popupClient(client) 43 45 { 44 46 } 45 47 46 PopupMenu ::~PopupMenu()48 PopupMenuMac::~PopupMenuMac() 47 49 { 48 50 if (m_popup) … … 50 52 } 51 53 52 void PopupMenu ::clear()54 void PopupMenuMac::clear() 53 55 { 54 56 if (m_popup) … … 56 58 } 57 59 58 void PopupMenu ::populate()60 void PopupMenuMac::populate() 59 61 { 60 62 if (m_popup) … … 115 117 } 116 118 117 void PopupMenu ::show(const IntRect& r, FrameView* v, int index)119 void PopupMenuMac::show(const IntRect& r, FrameView* v, int index) 118 120 { 119 121 populate(); … … 163 165 NSEvent* event = [frame->eventHandler()->currentNSEvent() retain]; 164 166 165 RefPtr<PopupMenu > protector(this);167 RefPtr<PopupMenuMac> protector(this); 166 168 167 169 RetainPtr<NSView> dummyView(AdoptNS, [[NSView alloc] initWithFrame:r]); … … 195 197 } 196 198 197 void PopupMenu ::hide()199 void PopupMenuMac::hide() 198 200 { 199 201 [m_popup.get() dismissPopUp]; 200 202 } 201 203 202 void PopupMenu ::updateFromElement()203 { 204 } 205 206 bool PopupMenu::itemWritingDirectionIsNatural()207 { 208 return true;209 } 210 211 } 204 void PopupMenuMac::updateFromElement() 205 { 206 } 207 208 void PopupMenuMac::disconnectClient() 209 { 210 m_popupClient = 0; 211 } 212 213 } -
trunk/WebCore/platform/mac/SearchPopupMenuMac.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuMac_h 22 #define SearchPopupMenuMac_h 23 24 #include "PopupMenuMac.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuMac : public SearchPopupMenu { 30 public: 31 SearchPopupMenuMac(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuMac> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuMac_h -
trunk/WebCore/platform/mac/SearchPopupMenuMac.mm
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 19 20 20 21 #import "config.h" 21 #import "SearchPopupMenu .h"22 #import "SearchPopupMenuMac.h" 22 23 23 24 #import "AtomicString.h" … … 25 26 namespace WebCore { 26 27 27 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)28 : PopupMenu(client)28 SearchPopupMenuMac::SearchPopupMenuMac(PopupMenuClient* client) 29 : m_popup(adoptRef(new PopupMenuMac(client))) 29 30 { 30 31 } … … 35 36 } 36 37 37 bool SearchPopupMenu::enabled() 38 PopupMenu* SearchPopupMenuMac::popupMenu() 39 { 40 return m_popup.get(); 41 } 42 43 bool SearchPopupMenuMac::enabled() 38 44 { 39 45 return true; 40 46 } 41 47 42 void SearchPopupMenu ::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)48 void SearchPopupMenuMac::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) 43 49 { 44 50 if (name.isEmpty()) … … 57 63 } 58 64 59 void SearchPopupMenu ::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)65 void SearchPopupMenuMac::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) 60 66 { 61 67 if (name.isEmpty()) -
trunk/WebCore/platform/qt/PopupMenuQt.cpp
r64462 r64513 25 25 26 26 #include "config.h" 27 #include "PopupMenu .h"27 #include "PopupMenuQt.h" 28 28 29 29 #include "Chrome.h" … … 36 36 namespace WebCore { 37 37 38 PopupMenu ::PopupMenu(PopupMenuClient* client)38 PopupMenuQt::PopupMenuQt(PopupMenuClient* client) 39 39 : m_popupClient(client) 40 40 , m_popup(0) … … 42 42 } 43 43 44 PopupMenu ::~PopupMenu()44 PopupMenuQt::~PopupMenuQt() 45 45 { 46 46 delete m_popup; 47 47 } 48 48 49 void PopupMenu::show(const IntRect& rect, FrameView* view, int index) 49 50 void PopupMenuQt::disconnectClient() 51 { 52 m_popupClient = 0; 53 } 54 55 void PopupMenuQt::show(const IntRect& rect, FrameView* view, int index) 50 56 { 51 57 ChromeClientQt* chromeClient = static_cast<ChromeClientQt*>( … … 68 74 } 69 75 70 void PopupMenu ::hide()76 void PopupMenuQt::hide() 71 77 { 72 78 m_popup->hide(); 73 79 } 74 80 75 void PopupMenu ::updateFromElement()81 void PopupMenuQt::updateFromElement() 76 82 { 77 client()->setTextFromItem(m_popupClient->selectedIndex()); 78 } 79 80 bool PopupMenu::itemWritingDirectionIsNatural() 81 { 82 return false; 83 m_popupClient->setTextFromItem(m_popupClient->selectedIndex()); 83 84 } 84 85 -
trunk/WebCore/platform/qt/PopupMenuQt.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 *19 18 */ 20 19 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h20 #ifndef PopupMenuQt_h 21 #define PopupMenuQt_h 23 22 24 23 #include "PopupMenu.h" 25 #include <wtf/Vector.h>26 24 27 25 namespace WebCore { 28 26 29 class AtomicString; 27 class FrameView; 28 class QtAbstractWebPopup; 29 class Scrollbar; 30 class PopupMenuClient; 30 31 31 class SearchPopupMenu: public PopupMenu {32 class PopupMenuQt : public PopupMenu { 32 33 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 34 PopupMenuQt(PopupMenuClient*); 35 ~PopupMenuQt(); 34 36 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 37 virtual void show(const IntRect&, FrameView*, int index); 38 virtual void hide(); 39 virtual void updateFromElement(); 40 virtual void disconnectClient(); 37 41 38 bool enabled();39 40 42 private: 41 SearchPopupMenu(PopupMenuClient*); 43 PopupMenuClient* m_popupClient; 44 QtAbstractWebPopup* m_popup; 42 45 }; 43 46 44 47 } 45 48 46 #endif 49 #endif // PopupMenuQt_h -
trunk/WebCore/platform/qt/QtAbstractWebPopup.h
r64462 r64513 64 64 65 65 private: 66 friend class PopupMenu ;66 friend class PopupMenuQt; 67 67 PopupMenuClient* m_popupClient; 68 68 QWebPageClient* m_pageClient; -
trunk/WebCore/platform/qt/SearchPopupMenuQt.cpp
r64462 r64513 1 1 /* 2 2 * Copyright C 2006 Zack Rusin <zack@kde.org> 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 19 20 20 21 #include "config.h" 21 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h" 22 #include "SearchPopupMenuQt.h" 24 23 25 24 namespace WebCore { 26 25 27 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)28 : PopupMenu(client)26 SearchPopupMenuQt::SearchPopupMenuQt(PopupMenuClient* client) 27 : m_popup(adoptRef(new PopupMenuQt(client))) 29 28 { 30 29 } 31 30 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 31 PopupMenu* SearchPopupMenuQt::popupMenu() 32 { 33 return m_popup.get(); 34 } 35 36 void SearchPopupMenuQt::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 37 { 34 38 } 35 39 36 void SearchPopupMenu ::loadRecentSearches(const AtomicString&, Vector<String>&)40 void SearchPopupMenuQt::loadRecentSearches(const AtomicString&, Vector<String>&) 37 41 { 38 42 } 39 43 40 bool SearchPopupMenu ::enabled()44 bool SearchPopupMenuQt::enabled() 41 45 { 42 46 return true; -
trunk/WebCore/platform/qt/SearchPopupMenuQt.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuQt_h 22 #define SearchPopupMenuQt_h 23 24 #include "PopupMenuQt.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuQt : public SearchPopupMenu { 30 public: 31 SearchPopupMenuQt(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuQt> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuQt_h -
trunk/WebCore/platform/win/PopupMenuWin.cpp
r64462 r64513 2 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2007-2009 Torch Mobile Inc. 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 21 22 22 23 #include "config.h" 23 #include "PopupMenu .h"24 #include "PopupMenuWin.h" 24 25 25 26 #include "BitmapInfo.h" … … 87 88 } 88 89 89 PopupMenu ::PopupMenu(PopupMenuClient* client)90 PopupMenuWin::PopupMenuWin(PopupMenuClient* client) 90 91 : m_popupClient(client) 91 92 , m_scrollbar(0) … … 103 104 } 104 105 105 PopupMenu ::~PopupMenu()106 PopupMenuWin::~PopupMenuWin() 106 107 { 107 108 if (m_bmp) … … 115 116 } 116 117 117 LPCTSTR PopupMenu::popupClassName() 118 void PopupMenuWin::disconnectClient() 119 { 120 m_popupClient = 0; 121 } 122 123 LPCTSTR PopupMenuWin::popupClassName() 118 124 { 119 125 return kPopupWindowClassName; 120 126 } 121 127 122 void PopupMenu ::show(const IntRect& r, FrameView* view, int index)128 void PopupMenuWin::show(const IntRect& r, FrameView* view, int index) 123 129 { 124 130 calculatePositionAndSize(r, view); … … 268 274 } 269 275 270 void PopupMenu ::hide()276 void PopupMenuWin::hide() 271 277 { 272 278 if (!m_showPopup) … … 284 290 } 285 291 286 void PopupMenu ::calculatePositionAndSize(const IntRect& r, FrameView* v)292 void PopupMenuWin::calculatePositionAndSize(const IntRect& r, FrameView* v) 287 293 { 288 294 // r is in absolute document coordinates, but we want to be in screen coordinates … … 374 380 } 375 381 376 bool PopupMenu ::setFocusedIndex(int i, bool hotTracking)382 bool PopupMenuWin::setFocusedIndex(int i, bool hotTracking) 377 383 { 378 384 if (i < 0 || i >= client()->listSize() || i == focusedIndex()) … … 396 402 } 397 403 398 int PopupMenu ::visibleItems() const404 int PopupMenuWin::visibleItems() const 399 405 { 400 406 return clientRect().height() / m_itemHeight; 401 407 } 402 408 403 int PopupMenu ::listIndexAtPoint(const IntPoint& point) const409 int PopupMenuWin::listIndexAtPoint(const IntPoint& point) const 404 410 { 405 411 return m_scrollOffset + point.y() / m_itemHeight; 406 412 } 407 413 408 int PopupMenu ::focusedIndex() const414 int PopupMenuWin::focusedIndex() const 409 415 { 410 416 return m_focusedIndex; 411 417 } 412 418 413 void PopupMenu ::focusFirst()419 void PopupMenuWin::focusFirst() 414 420 { 415 421 if (!client()) … … 425 431 } 426 432 427 void PopupMenu ::focusLast()433 void PopupMenuWin::focusLast() 428 434 { 429 435 if (!client()) … … 439 445 } 440 446 441 bool PopupMenu ::down(unsigned lines)447 bool PopupMenuWin::down(unsigned lines) 442 448 { 443 449 if (!client()) … … 458 464 } 459 465 460 bool PopupMenu ::up(unsigned lines)466 bool PopupMenuWin::up(unsigned lines) 461 467 { 462 468 if (!client()) … … 477 483 } 478 484 479 void PopupMenu ::invalidateItem(int index)485 void PopupMenuWin::invalidateItem(int index) 480 486 { 481 487 if (!m_popup) … … 492 498 } 493 499 494 IntRect PopupMenu ::clientRect() const500 IntRect PopupMenuWin::clientRect() const 495 501 { 496 502 IntRect clientRect = m_windowRect; … … 500 506 } 501 507 502 void PopupMenu ::incrementWheelDelta(int delta)508 void PopupMenuWin::incrementWheelDelta(int delta) 503 509 { 504 510 m_wheelDelta += delta; 505 511 } 506 512 507 void PopupMenu ::reduceWheelDelta(int delta)513 void PopupMenuWin::reduceWheelDelta(int delta) 508 514 { 509 515 ASSERT(delta >= 0); … … 518 524 } 519 525 520 bool PopupMenu ::scrollToRevealSelection()526 bool PopupMenuWin::scrollToRevealSelection() 521 527 { 522 528 if (!m_scrollbar) … … 538 544 } 539 545 540 void PopupMenu ::updateFromElement()546 void PopupMenuWin::updateFromElement() 541 547 { 542 548 if (!m_popup) … … 550 556 } 551 557 552 bool PopupMenu::itemWritingDirectionIsNatural()553 {554 return true;555 }556 557 558 const int separatorPadding = 4; 558 559 const int separatorHeight = 1; 559 void PopupMenu ::paint(const IntRect& damageRect, HDC hdc)560 void PopupMenuWin::paint(const IntRect& damageRect, HDC hdc) 560 561 { 561 562 if (!m_popup) … … 664 665 } 665 666 666 void PopupMenu ::valueChanged(Scrollbar* scrollBar)667 void PopupMenuWin::valueChanged(Scrollbar* scrollBar) 667 668 { 668 669 ASSERT(m_scrollbar); … … 700 701 } 701 702 702 void PopupMenu ::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)703 void PopupMenuWin::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect) 703 704 { 704 705 IntRect scrollRect = rect; … … 708 709 } 709 710 710 void PopupMenu ::registerClass()711 void PopupMenuWin::registerClass() 711 712 { 712 713 static bool haveRegisteredWindowClass = false; … … 744 745 745 746 746 LRESULT CALLBACK PopupMenu ::PopupMenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)747 LRESULT CALLBACK PopupMenuWin::PopupMenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 747 748 { 748 749 #if OS(WINCE) … … 752 753 #endif 753 754 754 if (PopupMenu * popup = reinterpret_cast<PopupMenu*>(longPtr))755 if (PopupMenuWin* popup = reinterpret_cast<PopupMenuWin*>(longPtr)) 755 756 return popup->wndProc(hWnd, message, wParam, lParam); 756 757 … … 772 773 const int smoothScrollAnimationDuration = 5000; 773 774 774 LRESULT PopupMenu ::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)775 LRESULT PopupMenuWin::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 775 776 { 776 777 LRESULT lResult = 0; -
trunk/WebCore/platform/win/PopupMenuWin.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 *19 18 */ 20 19 21 #ifndef PopupMenu _h22 #define PopupMenu _h20 #ifndef PopupMenuWin_h 21 #define PopupMenuWin_h 23 22 24 23 #include "IntRect.h" 24 #include "PopupMenu.h" 25 25 #include "PopupMenuClient.h" 26 #include "Scrollbar.h" 27 #include "ScrollbarClient.h" 26 28 #include <wtf/PassRefPtr.h> 27 29 #include <wtf/RefCounted.h> 30 #include <wtf/RefPtr.h> 28 31 29 #if PLATFORM(MAC)30 #include <wtf/RetainPtr.h>31 #ifdef __OBJC__32 @class NSPopUpButtonCell;33 #else34 class NSPopUpButtonCell;35 #endif36 #elif PLATFORM(WIN)37 #include "Scrollbar.h"38 #include "ScrollbarClient.h"39 #include <wtf/RefPtr.h>40 32 typedef struct HWND__* HWND; 41 33 typedef struct HDC__* HDC; 42 34 typedef struct HBITMAP__* HBITMAP; 43 #elif PLATFORM(QT)44 namespace WebCore {45 class QtAbstractWebPopup;46 }47 #elif PLATFORM(GTK)48 typedef struct _GtkMenu GtkMenu;49 typedef struct _GtkMenuItem GtkMenuItem;50 typedef struct _GtkWidget GtkWidget;51 #include "GRefPtrGtk.h"52 #include <wtf/HashMap.h>53 #include <glib.h>54 #elif PLATFORM(WX)55 #ifdef __WXMSW__56 #include <wx/msw/winundef.h>57 #endif58 class wxMenu;59 #include <wx/defs.h>60 #include <wx/event.h>61 #elif PLATFORM(CHROMIUM)62 #include "PopupMenuPrivate.h"63 #elif PLATFORM(HAIKU)64 namespace WebCore {65 class PopupMenuHaiku;66 }67 #endif68 35 69 36 namespace WebCore { … … 72 39 class Scrollbar; 73 40 74 class PopupMenu : public RefCounted<PopupMenu> 75 #if PLATFORM(WIN) 76 , private ScrollbarClient 77 #endif 78 #if PLATFORM(WX) 79 , public wxEvtHandler 80 #endif 81 { 41 class PopupMenuWin : public PopupMenu, private ScrollbarClient { 82 42 public: 83 static PassRefPtr<PopupMenu> create(PopupMenuClient* client) { return adoptRef(new PopupMenu(client)); } 84 ~PopupMenu(); 85 86 void disconnectClient() { m_popupClient = 0; } 43 PopupMenuWin(PopupMenuClient*); 44 ~PopupMenuWin(); 87 45 88 void show(const IntRect&, FrameView*, int index); 89 void hide(); 46 virtual void show(const IntRect&, FrameView*, int index); 47 virtual void hide(); 48 virtual void updateFromElement(); 49 virtual void disconnectClient(); 90 50 91 void updateFromElement(); 92 51 static LPCTSTR popupClassName(); 52 53 private: 93 54 PopupMenuClient* client() const { return m_popupClient; } 94 55 95 static bool itemWritingDirectionIsNatural();96 97 #if PLATFORM(WIN)98 56 Scrollbar* scrollbar() const { return m_scrollbar.get(); } 99 100 static LPCTSTR popupClassName();101 57 102 58 bool up(unsigned lines = 1); … … 134 90 bool scrollbarCapturingMouse() const { return m_scrollbarCapturingMouse; } 135 91 void setScrollbarCapturingMouse(bool b) { m_scrollbarCapturingMouse = b; } 136 #endif137 92 138 protected:139 PopupMenu(PopupMenuClient*);140 141 private:142 PopupMenuClient* m_popupClient;143 144 #if PLATFORM(MAC)145 void clear();146 void populate();147 148 RetainPtr<NSPopUpButtonCell> m_popup;149 #elif PLATFORM(QT)150 QtAbstractWebPopup* m_popup;151 #elif PLATFORM(WIN)152 93 // ScrollBarClient 153 94 virtual void valueChanged(Scrollbar*); … … 163 104 static void registerClass(); 164 105 106 PopupMenuClient* m_popupClient; 165 107 RefPtr<Scrollbar> m_scrollbar; 166 108 HWND m_popup; … … 175 117 bool m_scrollbarCapturingMouse; 176 118 bool m_showPopup; 177 #elif PLATFORM(GTK)178 IntPoint m_menuPosition;179 GRefPtr<GtkMenu> m_popup;180 HashMap<GtkWidget*, int> m_indexMap;181 static void menuItemActivated(GtkMenuItem* item, PopupMenu*);182 static void menuUnmapped(GtkWidget*, PopupMenu*);183 static void menuPositionFunction(GtkMenu*, gint*, gint*, gboolean*, PopupMenu*);184 static void menuRemoveItem(GtkWidget*, PopupMenu*);185 #elif PLATFORM(EFL) || PLATFORM(BREWMP)186 FrameView* m_view;187 #elif PLATFORM(WX)188 wxMenu* m_menu;189 void OnMenuItemSelected(wxCommandEvent&);190 #elif PLATFORM(CHROMIUM)191 PopupMenuPrivate p;192 #elif PLATFORM(HAIKU)193 PopupMenuHaiku* m_menu;194 #endif195 196 119 }; 197 120 198 121 } 199 122 200 #endif 123 #endif // PopupMenuWin_h -
trunk/WebCore/platform/win/SearchPopupMenuWin.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007 Apple Inc. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 19 20 20 21 #include "config.h" 21 #include "SearchPopupMenu .h"22 #include "SearchPopupMenuWin.h" 22 23 23 24 #include "AtomicString.h" … … 26 27 namespace WebCore { 27 28 28 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)29 : PopupMenu(client)29 SearchPopupMenuWin::SearchPopupMenuWin(PopupMenuClient* client) 30 : m_popup(adoptRef(new PopupMenuWin(client))) 30 31 { 31 32 } 32 33 33 bool SearchPopupMenu::enabled() 34 PopupMenu* SearchPopupMenuWin::popupMenu() 35 { 36 return m_popup.get(); 37 } 38 39 bool SearchPopupMenuWin::enabled() 34 40 { 35 41 return true; … … 42 48 } 43 49 44 void SearchPopupMenu ::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)50 void SearchPopupMenuWin::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) 45 51 { 46 52 if (name.isEmpty()) … … 62 68 } 63 69 64 void SearchPopupMenu ::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)70 void SearchPopupMenuWin::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) 65 71 { 66 72 if (name.isEmpty()) -
trunk/WebCore/platform/win/SearchPopupMenuWin.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuWin_h 22 #define SearchPopupMenuWin_h 23 24 #include "PopupMenuWin.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuWin : public SearchPopupMenu { 30 public: 31 SearchPopupMenuWin(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuWin> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuWin_h -
trunk/WebCore/platform/wx/PopupMenuWx.cpp
r64462 r64513 3 3 * 4 4 * Copyright (C) 2008 Apple Computer, Inc. 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 22 23 23 24 #include "config.h" 24 #include "PopupMenu .h"25 #include "PopupMenuWx.h" 25 26 26 27 #include "Frame.h" … … 42 43 namespace WebCore { 43 44 44 PopupMenu ::PopupMenu(PopupMenuClient* client)45 PopupMenuWx::PopupMenuWx(PopupMenuClient* client) 45 46 : m_popupClient(client) 46 47 , m_menu(NULL) … … 48 49 } 49 50 50 PopupMenu ::~PopupMenu()51 PopupMenuWx::~PopupMenuWx() 51 52 { 52 53 delete m_menu; 53 54 } 54 55 55 void PopupMenu::show(const IntRect& r, FrameView* v, int index) 56 void PopupMenuWx::disconnectClient() 57 { 58 m_popupClient = 0; 59 } 60 61 void PopupMenuWx::show(const IntRect& r, FrameView* v, int index) 56 62 { 57 63 // just delete and recreate … … 79 85 } 80 86 } 81 nativeWin->Connect(s_menuStartId, s_menuStartId + (size-1), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(PopupMenu ::OnMenuItemSelected), NULL, this);87 nativeWin->Connect(s_menuStartId, s_menuStartId + (size-1), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(PopupMenuWx::OnMenuItemSelected), 0, this); 82 88 nativeWin->PopupMenu(m_menu, r.x() - v->scrollX(), r.y() - v->scrollY()); 83 nativeWin->Disconnect(s_menuStartId, s_menuStartId + (size-1), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(PopupMenu ::OnMenuItemSelected), NULL, this);89 nativeWin->Disconnect(s_menuStartId, s_menuStartId + (size-1), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(PopupMenuWx::OnMenuItemSelected), 0, this); 84 90 } 85 91 } 86 92 87 void PopupMenu ::OnMenuItemSelected(wxCommandEvent& event)93 void PopupMenuWx::OnMenuItemSelected(wxCommandEvent& event) 88 94 { 89 95 if (client()) { … … 94 100 } 95 101 96 void PopupMenu ::hide()102 void PopupMenuWx::hide() 97 103 { 98 104 // we don't need to do anything here, the native control only exists during the time … … 100 106 } 101 107 102 void PopupMenu ::updateFromElement()108 void PopupMenuWx::updateFromElement() 103 109 { 104 110 client()->setTextFromItem(m_popupClient->selectedIndex()); 105 111 } 106 112 107 bool PopupMenu::itemWritingDirectionIsNatural()108 {109 return false;110 113 } 111 112 } -
trunk/WebCore/platform/wx/PopupMenuWx.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 19 19 */ 20 20 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h21 #ifndef PopupMenuWx_h 22 #define PopupMenuWx_h 23 23 24 #include "IntRect.h" 24 25 #include "PopupMenu.h" 25 #include <wtf/Vector.h> 26 #include "PopupMenuClient.h" 27 #include <wtf/PassRefPtr.h> 28 #include <wtf/RefCounted.h> 29 30 #ifdef __WXMSW__ 31 #include <wx/msw/winundef.h> 32 #endif 33 class wxMenu; 34 #include <wx/defs.h> 35 #include <wx/event.h> 26 36 27 37 namespace WebCore { 28 38 29 class AtomicString; 39 class FrameView; 40 class Scrollbar; 30 41 31 class SearchPopupMenu : public PopupMenu{42 class PopupMenuWx : public PopupMenu, public wxEvtHandler { 32 43 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 44 PopupMenuWx(PopupMenuClient*); 45 ~PopupMenuWx(); 34 46 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 47 virtual void show(const IntRect&, FrameView*, int index); 48 virtual void hide(); 49 virtual void updateFromElement(); 50 virtual void disconnectClient(); 37 51 38 bool enabled();39 40 52 private: 41 SearchPopupMenu(PopupMenuClient*); 53 void OnMenuItemSelected(wxCommandEvent&); 54 PopupMenuClient* client() const { return m_popupClient; } 55 56 PopupMenuClient* m_popupClient; 57 wxMenu* m_menu; 42 58 }; 43 59 44 60 } 45 61 46 #endif 62 #endif // PopupMenuWx_h -
trunk/WebCore/platform/wx/SearchPopupMenuWx.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 25 26 26 27 #include "config.h" 27 #include "SearchPopupMenu .h"28 #include "SearchPopupMenuWx.h" 28 29 29 30 #include "NotImplemented.h" … … 31 32 namespace WebCore { 32 33 33 SearchPopupMenu ::SearchPopupMenu(PopupMenuClient* client)34 : PopupMenu(client)34 SearchPopupMenuWx::SearchPopupMenuWx(PopupMenuClient* client) 35 : m_popup(adoptRef(new PopupMenuWx(client))) 35 36 { 36 37 notImplemented(); 37 38 } 38 39 39 void SearchPopupMenu ::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems)40 void SearchPopupMenuWx::saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems) 40 41 { 41 42 notImplemented(); 42 43 } 43 44 44 void SearchPopupMenu ::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems)45 void SearchPopupMenuWx::loadRecentSearches(const AtomicString& name, Vector<String>& searchItems) 45 46 { 46 47 notImplemented(); 47 48 } 48 49 49 bool SearchPopupMenu ::enabled()50 bool SearchPopupMenuWx::enabled() 50 51 { 51 52 return true; 52 53 } 53 54 55 PopupMenu* SearchPopupMenuWx::popupMenu() 56 { 57 return m_popup.get(); 54 58 } 55 59 60 } 61 -
trunk/WebCore/platform/wx/SearchPopupMenuWx.h
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h" 21 #ifndef SearchPopupMenuWx_h 22 #define SearchPopupMenuWx_h 23 24 #include "PopupMenuWx.h" 21 25 #include "SearchPopupMenu.h" 22 23 #include "AtomicString.h"24 26 25 27 namespace WebCore { 26 28 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 29 { 29 class SearchPopupMenuWx : public SearchPopupMenu { 30 public: 31 SearchPopupMenuWx(PopupMenuClient*); 32 33 virtual PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 35 virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 36 virtual bool enabled(); 37 38 private: 39 RefPtr<PopupMenuWx> m_popup; 40 }; 41 30 42 } 31 43 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 33 { 34 } 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 37 { 38 } 39 40 bool SearchPopupMenu::enabled() 41 { 42 return true; 43 } 44 45 } 44 #endif // SearchPopupMenuWx_h -
trunk/WebCore/rendering/RenderMenuList.cpp
r64462 r64513 27 27 28 28 #include "AXObjectCache.h" 29 #include "Chrome.h" 29 30 #include "CSSStyleSelector.h" 30 31 #include "Frame.h" … … 89 90 m_innerBlock->style()->setPaddingTop(Length(theme()->popupInternalPaddingTop(style()), Fixed)); 90 91 m_innerBlock->style()->setPaddingBottom(Length(theme()->popupInternalPaddingBottom(style()), Fixed)); 91 92 if ( PopupMenu::itemWritingDirectionIsNatural()) {92 93 if (document()->page()->chrome()->selectItemWritingDirectionIsNatural()) { 93 94 // Items in the popup will not respect the CSS text-align and direction properties, 94 95 // so we must adjust our own style to match. … … 279 280 createInnerBlock(); 280 281 if (!m_popup) 281 m_popup = PopupMenu::create(this);282 m_popup = document()->page()->chrome()->createPopupMenu(this); 282 283 SelectElement* select = toSelectElement(static_cast<Element*>(node())); 283 284 m_popupIsVisible = true; -
trunk/WebCore/rendering/RenderMenuList.h
r64462 r64513 25 25 #define RenderMenuList_h 26 26 27 #include "PopupMenu.h" 27 28 #include "PopupMenuClient.h" 28 29 #include "RenderFlexibleBox.h" … … 36 37 namespace WebCore { 37 38 38 class PopupMenu;39 39 class RenderText; 40 40 -
trunk/WebCore/rendering/RenderTextControlSingleLine.cpp
r64462 r64513 3 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 4 4 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 6 * 6 7 * This library is free software; you can redistribute it and/or … … 24 25 #include "RenderTextControlSingleLine.h" 25 26 27 #include "Chrome.h" 26 28 #include "CSSStyleSelector.h" 27 29 #include "Event.h" … … 39 41 #include "RenderScrollbar.h" 40 42 #include "RenderTheme.h" 41 #include "SearchPopupMenu.h"42 43 #include "SelectionController.h" 43 44 #include "Settings.h" … … 63 64 { 64 65 if (m_searchPopup) { 65 m_searchPopup-> disconnectClient();66 m_searchPopup->popupMenu()->disconnectClient(); 66 67 m_searchPopup = 0; 67 68 } … … 108 109 const AtomicString& name = autosaveName(); 109 110 if (!m_searchPopup) 110 m_searchPopup = SearchPopupMenu::create(this);111 m_searchPopup = document()->page()->chrome()->createSearchPopupMenu(this); 111 112 112 113 m_searchPopup->saveRecentSearches(name, m_recentSearches); … … 126 127 127 128 if (!m_searchPopup) 128 m_searchPopup = SearchPopupMenu::create(this);129 m_searchPopup = document()->page()->chrome()->createSearchPopupMenu(this); 129 130 130 131 if (!m_searchPopup->enabled()) … … 146 147 } 147 148 148 m_searchPopup-> show(absoluteBoundingBoxRect(true), document()->view(), -1);149 m_searchPopup->popupMenu()->show(absoluteBoundingBoxRect(true), document()->view(), -1); 149 150 } 150 151 … … 153 154 ASSERT(node()->isHTMLElement()); 154 155 if (m_searchPopup) 155 m_searchPopup-> hide();156 m_searchPopup->popupMenu()->hide(); 156 157 } 157 158 … … 686 687 687 688 if (m_searchPopupIsVisible) 688 m_searchPopup-> updateFromElement();689 m_searchPopup->popupMenu()->updateFromElement(); 689 690 } 690 691 … … 884 885 if (!name.isEmpty()) { 885 886 if (!m_searchPopup) 886 m_searchPopup = SearchPopupMenu::create(this);887 m_searchPopup = document()->page()->chrome()->createSearchPopupMenu(this); 887 888 m_searchPopup->saveRecentSearches(name, m_recentSearches); 888 889 } -
trunk/WebCore/rendering/RenderTextControlSingleLine.h
r64462 r64513 2 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 25 26 #include "PopupMenuClient.h" 26 27 #include "RenderTextControl.h" 28 #include "SearchPopupMenu.h" 27 29 #include "Timer.h" 28 30 … … 33 35 class SearchFieldCancelButtonElement; 34 36 class SearchFieldResultsButtonElement; 35 class SearchPopupMenu;36 37 class SpinButtonElement; 37 38 class TextControlInnerElement; -
trunk/WebKit/chromium/ChangeLog
r64463 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * src/ChromeClientImpl.cpp: 13 (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): 14 (WebKit::ChromeClientImpl::createPopupMenu): 15 (WebKit::ChromeClientImpl::createSearchPopupMenu): 16 * src/ChromeClientImpl.h: 17 1 18 2010-08-02 Kent Tamura <tkent@chromium.org> 2 19 -
trunk/WebKit/chromium/src/ChromeClientImpl.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 56 57 #include "Page.h" 57 58 #include "PopupMenuChromium.h" 59 #include "SearchPopupMenuChromium.h" 58 60 #include "ScriptController.h" 59 61 #include "SecurityOrigin.h" … … 774 776 } 775 777 778 bool ChromeClientImpl::selectItemWritingDirectionIsNatural() 779 { 780 return false; 781 } 782 783 PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const 784 { 785 return adoptRef(new PopupMenuChromium(client)); 786 } 787 788 PassRefPtr<SearchPopupMenu> ChromeClientImpl::createSearchPopupMenu(PopupMenuClient* client) const 789 { 790 return adoptRef(new SearchPopupMenuChromium(client)); 791 } 792 776 793 } // namespace WebKit -
trunk/WebKit/chromium/src/ChromeClientImpl.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 33 34 34 35 #include "ChromeClientChromium.h" 36 #include "PopupMenu.h" 37 #include "SearchPopupMenu.h" 35 38 36 39 namespace WebCore { … … 39 42 class HTMLParserQuirks; 40 43 class PopupContainer; 44 class PopupMenuClient; 41 45 class SecurityOrigin; 42 46 struct WindowFeatures; … … 169 173 void setCursorForPlugin(const WebCursorInfo& cursor); 170 174 175 virtual bool selectItemWritingDirectionIsNatural(); 176 virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; 177 virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; 178 171 179 private: 172 180 void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); -
trunk/WebKit/chromium/tests/PopupMenuTest.cpp
r64462 r64513 181 181 m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient, 0)); 182 182 m_webView->initializeMainFrame(&m_webFrameClient); 183 m_popupMenu = PopupMenu::create(&m_popupMenuClient);183 m_popupMenu = adoptRef(new PopupMenuChromium(&m_popupMenuClient)); 184 184 } 185 185 -
trunk/WebKit/efl/ChangeLog
r64462 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebCoreSupport/ChromeClientEfl.cpp: 13 (WebCore::ChromeClientEfl::selectItemWritingDirectionIsNatural): 14 (WebCore::ChromeClientEfl::createPopupMenu): 15 (WebCore::ChromeClientEfl::createSearchPopupMenu): 16 * WebCoreSupport/ChromeClientEfl.h: 17 1 18 2010-08-02 Jeremy Orlow <jorlow@chromium.org> 2 19 -
trunk/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
r64462 r64513 6 6 * Copyright (C) 2009-2010 ProFUSION embedded systems 7 7 * Copyright (C) 2009-2010 Samsung Electronics 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 8 9 * 9 10 * All rights reserved. … … 49 50 #include "PlatformString.h" 50 51 #include "SecurityOrigin.h" 52 #include "PopupMenuEfl.h" 53 #include "SearchPopupMenuEfl.h" 51 54 #include "ViewportArguments.h" 52 55 #include "WindowFeatures.h" … … 520 523 } 521 524 522 } 525 bool ChromeClientEfl::selectItemWritingDirectionIsNatural() 526 { 527 return true; 528 } 529 530 PassRefPtr<PopupMenu> ChromeClientEfl::createPopupMenu(PopupMenuClient* client) const 531 { 532 return adoptRef(new PopupMenuEfl(client)); 533 } 534 535 PassRefPtr<SearchPopupMenu> ChromeClientEfl::createSearchPopupMenu(PopupMenuClient* client) const 536 { 537 return adoptRef(new SearchPopupMenuEfl(client)); 538 } 539 540 } -
trunk/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
r64462 r64513 4 4 * Copyright (C) 2009-2010 ProFUSION embedded systems 5 5 * Copyright (C) 2009-2010 Samsung Electronics 6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 6 7 * 7 8 * This library is free software; you can redistribute it and/or … … 139 140 virtual void didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const; 140 141 142 virtual bool selectItemWritingDirectionIsNatural(); 143 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; 144 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; 145 141 146 Evas_Object* m_view; 142 147 KURL m_hoveredLinkURL; -
trunk/WebKit/gtk/ChangeLog
r64496 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebCoreSupport/ChromeClientGtk.cpp: 13 (WebKit::ChromeClient::selectItemWritingDirectionIsNatural): 14 (WebKit::ChromeClient::createPopupMenu): 15 (WebKit::ChromeClient::createSearchPopupMenu): 16 * WebCoreSupport/ChromeClientGtk.h: 17 1 18 2010-08-02 Martin Robinson <mrobinson@igalia.com> 2 19 -
trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
r64462 r64513 5 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 6 6 * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org> 7 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 7 8 * 8 9 * This library is free software; you can redistribute it and/or … … 35 36 #include "KURL.h" 36 37 #include "PlatformString.h" 38 #include "PopupMenuClient.h" 39 #include "PopupMenuGtk.h" 40 #include "SearchPopupMenuGtk.h" 37 41 #include "SecurityOrigin.h" 38 42 #include "webkitgeolocationpolicydecision.h" … … 623 627 } 624 628 625 } 629 bool ChromeClient::selectItemWritingDirectionIsNatural() 630 { 631 return true; 632 } 633 634 PassRefPtr<WebCore::PopupMenu> ChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const 635 { 636 return adoptRef(new PopupMenuGtk(client)); 637 } 638 639 PassRefPtr<WebCore::SearchPopupMenu> ChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const 640 { 641 return adoptRef(new SearchPopupMenuGtk(client)); 642 } 643 644 } -
trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2007 Holger Hans Peter Freyther 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 23 24 #include "ChromeClient.h" 24 25 #include "KURL.h" 26 #include "PopupMenu.h" 27 #include "SearchPopupMenu.h" 25 28 26 29 typedef struct _WebKitWebView WebKitWebView; 30 31 namespace WebCore { 32 class PopupMenuClient; 33 } 27 34 28 35 namespace WebKit { … … 124 131 virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*); 125 132 133 virtual bool selectItemWritingDirectionIsNatural(); 134 virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; 135 virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; 136 126 137 private: 127 138 WebKitWebView* m_webView; -
trunk/WebKit/haiku/ChangeLog
r64462 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebCoreSupport/ChromeClientHaiku.cpp: 13 (WebCore::ChromeClientHaiku::selectItemWritingDirectionIsNatural): 14 (WebCore::ChromeClientHaiku::createPopupMenu): 15 (WebCore::ChromeClientHaiku::createSearchPopupMenu): 16 * WebCoreSupport/ChromeClientHaiku.h: 17 1 18 2010-08-02 Jeremy Orlow <jorlow@chromium.org> 2 19 -
trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
r64462 r64513 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 4 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved. 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 6 * 6 7 * … … 37 38 #include "PlatformString.h" 38 39 #include "SecurityOrigin.h" 40 #include "PopupMenuHaiku.h" 41 #include "SearchPopupMenuHaiku.h" 39 42 40 43 #include <Alert.h> … … 387 390 } 388 391 392 bool ChromeClientHaiku::selectItemWritingDirectionIsNatural() 393 { 394 return false; 395 } 396 397 PassRefPtr<PopupMenu> ChromeClientHaiku::createPopupMenu(PopupMenuClient* client) const 398 { 399 return adoptRef(new PopupMenuHaiku(client)); 400 } 401 402 PassRefPtr<SearchPopupMenu> ChromeClientHaiku::createSearchPopupMenu(PopupMenuClient* client) const 403 { 404 return adoptRef(new SearchPopupMenuHaiku(client)); 405 } 406 389 407 } // namespace WebCore 390 408 -
trunk/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
r64462 r64513 2 2 * Copyright (C) 2006 Zack Rusin <zack@kde.org> 3 3 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved. 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * 5 6 * … … 129 130 void exceededDatabaseQuota(Frame*, const String& databaseName); 130 131 132 virtual bool selectItemWritingDirectionIsNatural(); 133 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; 134 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; 135 131 136 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 132 137 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); -
trunk/WebKit/mac/ChangeLog
r64462 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebCoreSupport/WebChromeClient.h: 13 * WebCoreSupport/WebChromeClient.mm: 14 (WebChromeClient::selectItemWritingDirectionIsNatural): 15 (WebChromeClient::createPopupMenu): 16 (WebChromeClient::createSearchPopupMenu): 17 1 18 2010-08-02 Jeremy Orlow <jorlow@chromium.org> 2 19 -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 169 169 virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { } 170 170 171 virtual bool selectItemWritingDirectionIsNatural(); 172 virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; 173 virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; 174 171 175 private: 172 176 WebView *m_webView; -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 65 65 #import <WebCore/PlatformScreen.h> 66 66 #import <WebCore/PlatformString.h> 67 #import <WebCore/PopupMenuMac.h> 67 68 #import <WebCore/ResourceRequest.h> 69 #import <WebCore/SearchPopupMenuMac.h> 68 70 #import <WebCore/Widget.h> 69 71 #import <WebCore/WindowFeatures.h> 70 72 #import <wtf/PassRefPtr.h> 71 73 #import <wtf/Vector.h> 74 75 72 76 73 77 #if USE(ACCELERATED_COMPOSITING) … … 738 742 } 739 743 744 bool WebChromeClient::selectItemWritingDirectionIsNatural() 745 { 746 return true; 747 } 748 749 PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const 750 { 751 return adoptRef(new PopupMenuMac(client)); 752 } 753 754 PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const 755 { 756 return adoptRef(new SearchPopupMenuMac(client)); 757 } 758 740 759 #if USE(ACCELERATED_COMPOSITING) 741 760 -
trunk/WebKit/qt/ChangeLog
r64462 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebCoreSupport/ChromeClientQt.cpp: 13 (WebCore::ChromeClientQt::selectItemWritingDirectionIsNatural): 14 (WebCore::ChromeClientQt::createPopupMenu): 15 (WebCore::ChromeClientQt::createSearchPopupMenu): 16 * WebCoreSupport/ChromeClientQt.h: 17 1 18 2010-08-02 Jeremy Orlow <jorlow@chromium.org> 2 19 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r64462 r64513 2 2 * Copyright (C) 2006 Zack Rusin <zack@kde.org> 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * 5 6 * All rights reserved. … … 46 47 #include "NotificationPresenterClientQt.h" 47 48 #include "PageClientQt.h" 49 #include "PopupMenuQt.h" 48 50 #if defined(Q_WS_MAEMO_5) 49 51 #include "QtMaemoWebPopup.h" … … 53 55 #include "QWebPageClient.h" 54 56 #include "ScrollbarTheme.h" 57 #include "SearchPopupMenuQt.h" 55 58 #include "SecurityOrigin.h" 56 59 #include "ViewportArguments.h" … … 623 626 } 624 627 628 bool ChromeClientQt::selectItemWritingDirectionIsNatural() 629 { 630 return false; 631 } 632 633 PassRefPtr<PopupMenu> ChromeClientQt::createPopupMenu(PopupMenuClient* client) const 634 { 635 return adoptRef(new PopupMenuQt(client)); 636 } 637 638 PassRefPtr<SearchPopupMenu> ChromeClientQt::createSearchPopupMenu(PopupMenuClient* client) const 639 { 640 return adoptRef(new SearchPopupMenuQt(client)); 641 } 642 625 643 } // namespace WebCore -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006 Zack Rusin <zack@kde.org> 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * All rights reserved. … … 170 171 virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } 171 172 173 virtual bool selectItemWritingDirectionIsNatural(); 174 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; 175 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; 176 172 177 QtAbstractWebPopup* createSelectPopup(); 173 178 -
trunk/WebKit/win/ChangeLog
r64500 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebCoreSupport/WebChromeClient.cpp: 13 (WebChromeClient::selectItemWritingDirectionIsNatural): 14 (WebChromeClient::createPopupMenu): 15 (WebChromeClient::createSearchPopupMenu): 16 * WebCoreSupport/WebChromeClient.h: 17 1 18 2010-08-02 Jon Honeycutt <jhoneycutt@apple.com> 2 19 -
trunk/WebKit/win/WebCoreSupport/WebChromeClient.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 57 58 #include <WebCore/Page.h> 58 59 #include <WebCore/SecurityOrigin.h> 60 #include <WebCore/PopupMenuWin.h> 61 #include <WebCore/SearchPopupMenuWin.h> 59 62 #include <WebCore/WindowFeatures.h> 60 63 #pragma warning(pop) … … 875 878 #endif 876 879 880 bool WebChromeClient::selectItemWritingDirectionIsNatural() 881 { 882 return true; 883 } 884 885 PassRefPtr<PopupMenu> WebChromeClient::createPopupMenu(PopupMenuClient* client) const 886 { 887 return adoptRef(new PopupMenuWin(client)); 888 } 889 890 PassRefPtr<SearchPopupMenu> WebChromeClient::createSearchPopupMenu(PopupMenuClient* client) const 891 { 892 return adoptRef(new SearchPopupMenuWin(client)); 893 } 894 -
trunk/WebKit/win/WebCoreSupport/WebChromeClient.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 167 168 #endif 168 169 170 virtual bool selectItemWritingDirectionIsNatural(); 171 virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; 172 virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; 173 169 174 private: 170 175 COMPtr<IWebUIDelegate> uiDelegate(); -
trunk/WebKit/win/WebView.cpp
r64462 r64513 111 111 #include <WebCore/PluginView.h> 112 112 #include <WebCore/PopupMenu.h> 113 #include <WebCore/PopupMenuWin.h> 113 114 #include <WebCore/ProgressTracker.h> 114 115 #include <WebCore/RenderLayer.h> … … 1614 1615 1615 1616 // Make sure truncation won't affect the comparison. 1616 ASSERT(ARRAYSIZE(className) > _tcslen(PopupMenu ::popupClassName()));1617 1618 if (GetClassName(focusedWindow, className, ARRAYSIZE(className)) && !_tcscmp(className, PopupMenu ::popupClassName())) {1617 ASSERT(ARRAYSIZE(className) > _tcslen(PopupMenuWin::popupClassName())); 1618 1619 if (GetClassName(focusedWindow, className, ARRAYSIZE(className)) && !_tcscmp(className, PopupMenuWin::popupClassName())) { 1619 1620 // We don't let the WebView scroll here for two reasons - 1) To match Firefox behavior, 2) If we do scroll, we lose the 1620 1621 // focus ring around the select menu. -
trunk/WebKit/wx/ChangeLog
r64462 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 9 instances, concrete classes that inherit from ChromeClient needed to be changed to 10 implement the new methods. 11 12 * WebKitSupport/ChromeClientWx.cpp: 13 (WebCore::ChromeClientWx::selectItemWritingDirectionIsNatural): 14 (WebCore::ChromeClientWx::createPopupMenu): 15 (WebCore::ChromeClientWx::createSearchPopupMenu): 16 * WebKitSupport/ChromeClientWx.h: 17 1 18 2010-08-02 Jeremy Orlow <jorlow@chromium.org> 2 19 -
trunk/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * All rights reserved. … … 40 41 #include "PlatformString.h" 41 42 #include "SecurityOrigin.h" 43 #include "PopupMenuWx.h" 44 #include "SearchPopupMenuWx.h" 42 45 #include "WindowFeatures.h" 43 46 … … 465 468 } 466 469 467 } 470 bool ChromeClientWx::selectItemWritingDirectionIsNatural() 471 { 472 return false; 473 } 474 475 PassRefPtr<PopupMenu> ChromeClientWx::createPopupMenu(PopupMenuClient* client) const 476 { 477 return adoptRef(new PopupMenuWx(client)); 478 } 479 480 PassRefPtr<SearchPopupMenu> ChromeClientWx::createSearchPopupMenu(PopupMenuClient* client) const 481 { 482 return adoptRef(new SearchPopupMenuWx(client)); 483 } 484 485 } -
trunk/WebKit/wx/WebKitSupport/ChromeClientWx.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * All rights reserved. … … 143 144 virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } 144 145 146 virtual bool selectItemWritingDirectionIsNatural(); 147 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const; 148 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; 149 145 150 private: 146 151 wxWebView* m_webView; -
trunk/WebKit2/ChangeLog
r64504 r64513 1 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Darin Fisher. 4 5 PopupMenu refactoring in preparation to WebKit2 6 https://bugs.webkit.org/show_bug.cgi?id=42592 7 8 Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and 9 SearchPopupMenu respectively. At this point they are just empty implementations. 10 11 * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added. 12 (WebKit::WebPopupMenu::WebPopupMenu): 13 (WebKit::WebPopupMenu::~WebPopupMenu): 14 (WebKit::WebPopupMenu::disconnectClient): 15 (WebKit::WebPopupMenu::show): 16 (WebKit::WebPopupMenu::hide): 17 (WebKit::WebPopupMenu::updateFromElement): 18 * WebProcess/WebCoreSupport/WebPopupMenu.h: Added. 19 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added. 20 (WebKit::WebSearchPopupMenu::WebSearchPopupMenu): 21 (WebKit::WebSearchPopupMenu::popupMenu): 22 (WebKit::WebSearchPopupMenu::saveRecentSearches): 23 (WebKit::WebSearchPopupMenu::loadRecentSearches): 24 (WebKit::WebSearchPopupMenu::enabled): 25 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added. 26 27 As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu 28 instances, concrete classes that inherit from ChromeClient needed to be changed to 29 implement the new methods. 30 31 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 32 (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): 33 (WebKit::WebChromeClient::createPopupMenu): 34 (WebKit::WebChromeClient::createSearchPopupMenu): 35 * WebProcess/WebCoreSupport/WebChromeClient.h: 36 37 build issues: 38 39 * WebKit2.xcodeproj/project.pbxproj: 40 * win/WebKit2.vcproj: 41 1 42 2010-08-02 Anders Carlsson <andersca@apple.com> 2 43 -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r64462 r64513 267 267 BCF69FA91176D1CB00471A52 /* WKNavigationData.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF69FA71176D1CB00471A52 /* WKNavigationData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 268 268 BCF69FAA1176D1CB00471A52 /* WKNavigationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */; }; 269 D3B9484611FF4B6500032B39 /* WebPopupMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */; }; 270 D3B9484711FF4B6500032B39 /* WebPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484311FF4B6500032B39 /* WebPopupMenu.h */; }; 271 D3B9484811FF4B6500032B39 /* WebSearchPopupMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3B9484411FF4B6500032B39 /* WebSearchPopupMenu.cpp */; }; 272 D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */; }; 269 273 E1EE53E311F8CFC000CCBEE4 /* InjectedBundlePageEditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */; }; 270 274 E1EE53E711F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */; }; … … 567 571 BCF69FA71176D1CB00471A52 /* WKNavigationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationData.h; sourceTree = "<group>"; }; 568 572 BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNavigationData.cpp; sourceTree = "<group>"; }; 573 D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPopupMenu.cpp; sourceTree = "<group>"; }; 574 D3B9484311FF4B6500032B39 /* WebPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPopupMenu.h; sourceTree = "<group>"; }; 575 D3B9484411FF4B6500032B39 /* WebSearchPopupMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSearchPopupMenu.cpp; sourceTree = "<group>"; }; 576 D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSearchPopupMenu.h; sourceTree = "<group>"; }; 569 577 E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageEditorClient.h; sourceTree = "<group>"; }; 570 578 E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageEditorClient.cpp; sourceTree = "<group>"; }; … … 861 869 1A3E736011CC2659007BD539 /* WebPlatformStrategies.cpp */, 862 870 1A3E735F11CC2659007BD539 /* WebPlatformStrategies.h */, 871 D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */, 872 D3B9484311FF4B6500032B39 /* WebPopupMenu.h */, 873 D3B9484411FF4B6500032B39 /* WebSearchPopupMenu.cpp */, 874 D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */, 863 875 ); 864 876 path = WebCoreSupport; … … 1326 1338 BCB28CC0120233D9007D99BC /* InjectedBundleMessageKinds.h in Headers */, 1327 1339 BCCB75C61203A1CE00222D1B /* WebContextMessageKinds.h in Headers */, 1340 D3B9484711FF4B6500032B39 /* WebPopupMenu.h in Headers */, 1341 D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */, 1328 1342 ); 1329 1343 runOnlyForDeploymentPostprocessing = 0; … … 1527 1541 1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */, 1528 1542 BCDB85831200EC57007254BE /* WKType.cpp in Sources */, 1543 D3B9484611FF4B6500032B39 /* WebPopupMenu.cpp in Sources */, 1544 D3B9484811FF4B6500032B39 /* WebSearchPopupMenu.cpp in Sources */, 1529 1545 ); 1530 1546 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r64485 r64513 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 35 36 #include "WebPage.h" 36 37 #include "WebPageProxyMessageKinds.h" 38 #include "WebPopupMenu.h" 37 39 #include "WebPreferencesStore.h" 38 40 #include "WebProcess.h" 39 41 #include "WebProcessProxyMessageKinds.h" 42 #include "WebSearchPopupMenu.h" 40 43 #include <WebCore/FileChooser.h> 41 44 #include <WebCore/Frame.h> … … 491 494 } 492 495 496 bool WebChromeClient::selectItemWritingDirectionIsNatural() 497 { 498 return true; 499 } 500 501 PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const 502 { 503 return adoptRef(new WebPopupMenu(client)); 504 } 505 506 PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const 507 { 508 return adoptRef(new WebSearchPopupMenu(client)); 509 } 510 493 511 PassOwnPtr<HTMLParserQuirks> WebChromeClient::createHTMLParserQuirks() 494 512 { -
trunk/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r64462 r64513 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 164 165 virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks(); 165 166 167 virtual bool selectItemWritingDirectionIsNatural(); 168 virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; 169 virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; 170 166 171 #if USE(ACCELERATED_COMPOSITING) 167 172 virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*); -
trunk/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.cpp
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 20 #include "WebPopupMenu.h" 19 21 20 #include "config.h"21 #include "SearchPopupMenu.h"22 #include <WebCore/FrameView.h> 23 #include <WebCore/PopupMenuClient.h> 22 24 23 #include "AtomicString.h" 25 namespace WebKit { 24 26 25 namespace WebCore { 26 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client) 28 : PopupMenu(client) 27 WebPopupMenu::WebPopupMenu(WebCore::PopupMenuClient* client) 28 : m_popupClient(client) 29 29 { 30 30 } 31 31 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&)32 WebPopupMenu::~WebPopupMenu() 33 33 { 34 34 } 35 35 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&) 36 37 void WebPopupMenu::disconnectClient() 38 { 39 m_popupClient = 0; 40 } 41 42 void WebPopupMenu::show(const WebCore::IntRect& rect, WebCore::FrameView* view, int index) 43 { 44 45 } 46 47 void WebPopupMenu::hide() 37 48 { 38 49 } 39 50 40 bool SearchPopupMenu::enabled()51 void WebPopupMenu::updateFromElement() 41 52 { 42 return true;43 53 } 44 54 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 19 19 */ 20 20 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h21 #ifndef WebPopupMenu_h 22 #define WebPopupMenu_h 23 23 24 #include "PopupMenu.h" 25 #include <wtf/Vector.h> 24 #include <WebCore/PopupMenu.h> 26 25 27 26 namespace WebCore { 27 class PopupMenuClient; 28 } 28 29 29 class AtomicString; 30 namespace WebKit { 30 31 31 class SearchPopupMenu : publicPopupMenu {32 class WebPopupMenu : public WebCore::PopupMenu { 32 33 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 34 WebPopupMenu(WebCore::PopupMenuClient*); 35 ~WebPopupMenu(); 34 36 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems); 36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems); 37 virtual void show(const WebCore::IntRect&, WebCore::FrameView*, int index); 38 virtual void hide(); 39 virtual void updateFromElement(); 40 virtual void disconnectClient(); 37 41 38 bool enabled();39 40 42 private: 41 SearchPopupMenu(PopupMenuClient*);43 WebCore::PopupMenuClient* m_popupClient; 42 44 }; 43 45 44 46 } 45 47 46 #endif 48 #endif // WebPopupMenu_h -
trunk/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
r64509 r64513 1 1 /* 2 * Copyright C 2006 Zack Rusin <zack@kde.org>2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 16 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 17 * Boston, MA 02110-1301, USA. 18 * 18 19 */ 19 20 20 #include "config.h"21 #include "SearchPopupMenu.h"22 21 23 #include " AtomicString.h"22 #include "WebSearchPopupMenu.h" 24 23 25 namespace Web Core{24 namespace WebKit { 26 25 27 SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client)28 : PopupMenu(client)26 WebSearchPopupMenu::WebSearchPopupMenu(WebCore::PopupMenuClient* client) 27 : m_popup(adoptRef(new WebPopupMenu(client))) 29 28 { 30 29 } 31 30 32 void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&) 31 WebCore::PopupMenu* WebSearchPopupMenu::popupMenu() 32 { 33 return m_popup.get(); 34 } 35 36 void WebSearchPopupMenu::saveRecentSearches(const WebCore::AtomicString&, const Vector<WebCore::String>&) 33 37 { 34 38 } 35 39 36 void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&)40 void WebSearchPopupMenu::loadRecentSearches(const WebCore::AtomicString&, Vector<WebCore::String>&) 37 41 { 38 42 } 39 43 40 bool SearchPopupMenu::enabled()44 bool WebSearchPopupMenu::enabled() 41 45 { 42 return true;46 return false; 43 47 } 44 48 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebSearchPopupMenu.h
r64509 r64513 1 1 /* 2 * Copyright (C) 20 06, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 19 19 */ 20 20 21 #ifndef SearchPopupMenu_h22 #define SearchPopupMenu_h21 #ifndef WebSearchPopupMenu_h 22 #define WebSearchPopupMenu_h 23 23 24 #include "PopupMenu.h"25 #include <wtf/Vector.h>24 #include <WebCore/SearchPopupMenu.h> 25 #include "WebPopupMenu.h" 26 26 27 namespace Web Core{27 namespace WebKit { 28 28 29 class AtomicString; 29 class WebSearchPopupMenu : public WebCore::SearchPopupMenu { 30 public: 31 WebSearchPopupMenu(WebCore::PopupMenuClient*); 30 32 31 class SearchPopupMenu : public PopupMenu { 32 public: 33 static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return adoptRef(new SearchPopupMenu(client)); } 33 virtual WebCore::PopupMenu* popupMenu(); 34 virtual void saveRecentSearches(const WebCore::AtomicString& name, const Vector<WebCore::String>& searchItems); 35 virtual void loadRecentSearches(const WebCore::AtomicString& name, Vector<WebCore::String>& searchItems); 36 virtual bool enabled(); 34 37 35 void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems);36 void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems);37 38 bool enabled();39 40 38 private: 41 SearchPopupMenu(PopupMenuClient*);39 RefPtr<WebPopupMenu> m_popup; 42 40 }; 43 41 44 42 } 45 43 46 #endif 44 #endif // WebSearchPopupMenu_h -
trunk/WebKit2/win/WebKit2.vcproj
r64462 r64513 584 584 > 585 585 </File> 586 <File 587 RelativePath="..\WebProcess\WebCoreSupport\WebPopupMenu.cpp" 588 > 589 </File> 590 <File 591 RelativePath="..\WebProcess\WebCoreSupport\WebPopupMenu.h" 592 > 593 </File> 594 <File 595 RelativePath="..\WebProcess\WebCoreSupport\WebSearchPopupMenu.cpp" 596 > 597 </File> 598 <File 599 RelativePath="..\WebProcess\WebCoreSupport\WebSearchPopupMenu.h" 600 > 601 </File> 586 602 <Filter 587 603 Name="win"
Note: See TracChangeset
for help on using the changeset viewer.