Changeset 64829 in webkit
- Timestamp:
- Aug 6, 2010 4:15:40 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 deleted
- 11 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64828 r64829 1 2010-08-06 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Move Qt's popup menu implementation from WebCore to WebKit layer 6 https://bugs.webkit.org/show_bug.cgi?id=43427 7 8 After PopupMenu changes in bug 42592 class QtAbstractWebPopup became unecessary and 9 there is no need to keep any Qt specific code for popup menus in WebCore/platform/qt. 10 11 PopupMenuQt has been moved from WebCore/platform/qt to WebKit/qt/WebCoreSupport and 12 assumed the responsibilities of QtAbstractWebPopup. SearchPopupMenuQt has been moved 13 to WebKit/qt/WebCoreSupport as well. 14 15 All classes that previously inherited from QtAbstractWebPopup now inherit from 16 QWebSelectMethod and QtPlatformPlugin's method createSelectInputMethod now returns an 17 instance of class QWebSelectMethod instead of QtAbstractWebPopup. 18 19 * WebCore.pro: 20 * platform/qt/PopupMenuQt.cpp: Removed. 21 * platform/qt/PopupMenuQt.h: Removed. 22 * platform/qt/QtAbstractWebPopup.cpp: Removed. 23 * platform/qt/QtAbstractWebPopup.h: Removed. 24 * platform/qt/SearchPopupMenuQt.cpp: Removed. 25 * platform/qt/SearchPopupMenuQt.h: Removed. 26 1 27 2010-08-05 Marcus Bulach <bulach@chromium.org> 2 28 -
trunk/WebCore/WebCore.pro
r64828 r64829 1714 1714 platform/qt/ClipboardQt.h \ 1715 1715 platform/qt/QWebPageClient.h \ 1716 platform/qt/QtAbstractWebPopup.h \1717 1716 platform/qt/QtStyleOptionWebComboBox.h \ 1718 1717 platform/qt/RenderThemeQt.h \ … … 2151 2150 $$PWD/../WebKit/qt/WebCoreSupport/PageClientQt.h \ 2152 2151 $$PWD/../WebKit/qt/WebCoreSupport/QtPlatformPlugin.h \ 2152 $$PWD/../WebKit/qt/WebCoreSupport/PopupMenuQt.h \ 2153 $$PWD/../WebKit/qt/WebCoreSupport/SearchPopupMenuQt.h \ 2153 2154 $$PWD/platform/network/qt/DnsPrefetchHelper.h 2154 2155 … … 2213 2214 platform/qt/PlatformTouchEventQt.cpp \ 2214 2215 platform/qt/PlatformTouchPointQt.cpp \ 2215 platform/qt/PopupMenuQt.cpp \2216 platform/qt/QtAbstractWebPopup.cpp \2217 2216 platform/qt/RenderThemeQt.cpp \ 2218 2217 platform/qt/ScrollbarQt.cpp \ 2219 2218 platform/qt/ScrollbarThemeQt.cpp \ 2220 2219 platform/qt/ScrollViewQt.cpp \ 2221 platform/qt/SearchPopupMenuQt.cpp \2222 2220 platform/qt/SharedTimerQt.cpp \ 2223 2221 platform/qt/SoundQt.cpp \ … … 2241 2239 ../WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \ 2242 2240 ../WebKit/qt/WebCoreSupport/PageClientQt.cpp \ 2241 ../WebKit/qt/WebCoreSupport/PopupMenuQt.cpp \ 2243 2242 ../WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp \ 2243 ../WebKit/qt/WebCoreSupport/SearchPopupMenuQt.cpp \ 2244 2244 ../WebKit/qt/Api/qwebframe.cpp \ 2245 2245 ../WebKit/qt/Api/qgraphicswebview.cpp \ -
trunk/WebKit/qt/ChangeLog
r64825 r64829 1 2010-08-06 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Move Qt's popup menu implementation from WebCore to WebKit layer 6 https://bugs.webkit.org/show_bug.cgi?id=43427 7 8 After PopupMenu changes in bug 42592 class QtAbstractWebPopup became unecessary and 9 there is no need to keep any Qt specific code for popup menus in WebCore/platform/qt. 10 11 PopupMenuQt has been moved from WebCore/platform/qt to WebKit/qt/WebCoreSupport and 12 assumed the responsibilities of QtAbstractWebPopup. SearchPopupMenuQt has been moved 13 to WebKit/qt/WebCoreSupport as well. 14 15 All classes that previously inherited from QtAbstractWebPopup now inherit from 16 QWebSelectMethod and QtPlatformPlugin's method createSelectInputMethod now returns an 17 instance of class QWebSelectMethod instead of QtAbstractWebPopup. 18 19 * WebCoreSupport/ChromeClientQt.cpp: 20 (WebCore::ChromeClientQt::createSelectPopup): 21 (WebCore::ChromeClientQt::createPopupMenu): 22 (WebCore::ChromeClientQt::createSearchPopupMenu): 23 * WebCoreSupport/ChromeClientQt.h: 24 * WebCoreSupport/PopupMenuQt.cpp: Added. 25 (SelectData::SelectData): 26 (SelectData::itemText): 27 (SelectData::itemToolTip): 28 (SelectData::itemIsEnabled): 29 (SelectData::itemCount): 30 (SelectData::itemIsSelected): 31 (SelectData::multiple): 32 (SelectData::itemType): 33 (WebCore::PopupMenuQt::PopupMenuQt): 34 (WebCore::PopupMenuQt::~PopupMenuQt): 35 (WebCore::PopupMenuQt::disconnectClient): 36 (WebCore::PopupMenuQt::show): 37 (WebCore::PopupMenuQt::didHide): 38 (WebCore::PopupMenuQt::hide): 39 (WebCore::PopupMenuQt::updateFromElement): 40 (WebCore::PopupMenuQt::selectItem): 41 * WebCoreSupport/PopupMenuQt.h: Added. 42 * WebCoreSupport/QtFallbackWebPopup.cpp: 43 (WebCore::QtFallbackWebPopupCombo::hidePopup): 44 (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): 45 (WebCore::QtFallbackWebPopup::show): 46 (WebCore::QtFallbackWebPopup::populate): 47 (WebCore::QtFallbackWebPopup::activeChanged): 48 (WebCore::QtFallbackWebPopup::pageClient): 49 * WebCoreSupport/QtFallbackWebPopup.h: 50 (WebCore::QtFallbackWebPopup::setGeometry): 51 (WebCore::QtFallbackWebPopup::geometry): 52 (WebCore::QtFallbackWebPopup::setFont): 53 (WebCore::QtFallbackWebPopup::font): 54 * WebCoreSupport/QtMaemoWebPopup.cpp: 55 (WebCore::Maemo5Popup::populateList): 56 (WebCore::QtMaemoWebPopup::QtMaemoWebPopup): 57 (WebCore::QtMaemoWebPopup::createSingleSelectionPopup): 58 (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup): 59 (WebCore::QtMaemoWebPopup::createPopup): 60 (WebCore::QtMaemoWebPopup::show): 61 (WebCore::QtMaemoWebPopup::popupClosed): 62 (WebCore::QtMaemoWebPopup::itemClicked): 63 (WebCore::Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup): 64 (WebCore::Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup): 65 * WebCoreSupport/QtMaemoWebPopup.h: 66 (WebCore::Maemo5Popup::Maemo5Popup): 67 * WebCoreSupport/QtPlatformPlugin.cpp: 68 (WebCore::QtPlatformPlugin::createSelectInputMethod): 69 * WebCoreSupport/QtPlatformPlugin.h: 70 * WebCoreSupport/SearchPopupMenuQt.cpp: Added. 71 (WebCore::SearchPopupMenuQt::SearchPopupMenuQt): 72 (WebCore::SearchPopupMenuQt::popupMenu): 73 (WebCore::SearchPopupMenuQt::saveRecentSearches): 74 (WebCore::SearchPopupMenuQt::loadRecentSearches): 75 (WebCore::SearchPopupMenuQt::enabled): 76 * WebCoreSupport/SearchPopupMenuQt.h: Added. 77 1 78 2010-08-06 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 79 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r64825 r64829 592 592 #endif 593 593 594 Q tAbstractWebPopup* ChromeClientQt::createSelectPopup()595 { 596 Q tAbstractWebPopup* result = m_platformPlugin.createSelectInputMethod();594 QWebSelectMethod* ChromeClientQt::createSelectPopup() const 595 { 596 QWebSelectMethod* result = m_platformPlugin.createSelectInputMethod(); 597 597 if (result) 598 598 return result; … … 601 601 return new QtMaemoWebPopup; 602 602 #elif !defined(QT_NO_COMBOBOX) 603 return new QtFallbackWebPopup ;603 return new QtFallbackWebPopup(this); 604 604 #else 605 605 return 0; … … 634 634 PassRefPtr<PopupMenu> ChromeClientQt::createPopupMenu(PopupMenuClient* client) const 635 635 { 636 return adoptRef(new PopupMenuQt(client ));636 return adoptRef(new PopupMenuQt(client, this)); 637 637 } 638 638 639 639 PassRefPtr<SearchPopupMenu> ChromeClientQt::createSearchPopupMenu(PopupMenuClient* client) const 640 640 { 641 return adoptRef(new SearchPopupMenuQt(c lient));641 return adoptRef(new SearchPopupMenuQt(createPopupMenu(client))); 642 642 } 643 643 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r64513 r64829 175 175 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const; 176 176 177 Q tAbstractWebPopup* createSelectPopup();177 QWebSelectMethod* createSelectPopup() const; 178 178 179 179 virtual void didReceiveViewportArguments(Frame*, const ViewportArguments&) const; … … 189 189 QEventLoop* m_eventLoop; 190 190 191 QtPlatformPlugin m_platformPlugin;191 mutable QtPlatformPlugin m_platformPlugin; 192 192 }; 193 193 } -
trunk/WebKit/qt/WebCoreSupport/PopupMenuQt.h
r64828 r64829 22 22 23 23 #include "PopupMenu.h" 24 #include <QObject> 25 26 class QWebSelectData; 27 class QWebSelectMethod; 24 28 25 29 namespace WebCore { 26 30 31 class ChromeClientQt; 27 32 class FrameView; 28 class QtAbstractWebPopup;29 class Scrollbar;30 33 class PopupMenuClient; 31 34 32 class PopupMenuQt : public PopupMenu { 35 class PopupMenuQt : public QObject, public PopupMenu { 36 Q_OBJECT 33 37 public: 34 PopupMenuQt(PopupMenuClient* );38 PopupMenuQt(PopupMenuClient*, const ChromeClientQt*); 35 39 ~PopupMenuQt(); 36 40 … … 40 44 virtual void disconnectClient(); 41 45 46 private slots: 47 void didHide(); 48 void selectItem(int index, bool ctrl, bool shift); 49 42 50 private: 43 51 PopupMenuClient* m_popupClient; 44 QtAbstractWebPopup* m_popup; 52 QWebSelectMethod* m_popup; 53 QWebSelectData* m_selectData; 54 const ChromeClientQt* m_chromeClient; 45 55 }; 46 56 -
trunk/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
r62251 r64829 24 24 #ifndef QT_NO_COMBOBOX 25 25 26 #include "HostWindow.h" 27 #include "PopupMenuClient.h" 26 #include "ChromeClientQt.h" 28 27 #include "QWebPageClient.h" 29 28 #include "qgraphicswebview.h" … … 80 79 81 80 m_ownerPopup.m_popupVisible = false; 82 m_ownerPopup.popupDidHide();81 emit m_ownerPopup.didHide(); 83 82 m_ownerPopup.destroyPopup(); 84 83 } … … 98 97 // QtFallbackWebPopup 99 98 100 QtFallbackWebPopup::QtFallbackWebPopup() 101 : QtAbstractWebPopup() 102 , m_popupVisible(false) 99 QtFallbackWebPopup::QtFallbackWebPopup(const ChromeClientQt* chromeClient) 100 : m_popupVisible(false) 103 101 , m_combo(0) 102 , m_chromeClient(chromeClient) 104 103 { 105 104 } … … 110 109 } 111 110 112 void QtFallbackWebPopup::show( )111 void QtFallbackWebPopup::show(const QWebSelectData& data) 113 112 { 114 113 if (!pageClient()) … … 124 123 SLOT(activeChanged(int)), Qt::QueuedConnection); 125 124 126 populate(); 127 m_combo->setCurrentIndex(currentIndex()); 125 populate(data); 128 126 129 127 QRect rect = geometry(); … … 213 211 } 214 212 215 void QtFallbackWebPopup::populate( )213 void QtFallbackWebPopup::populate(const QWebSelectData& data) 216 214 { 217 215 QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_combo->model()); … … 221 219 m_combo->setFont(font()); 222 220 #endif 223 for (int i = 0; i < itemCount(); ++i) { 224 switch (itemType(i)) { 225 case Separator: 221 222 int currentIndex = -1; 223 for (int i = 0; i < data.itemCount(); ++i) { 224 switch (data.itemType(i)) { 225 case QWebSelectData::Separator: 226 226 m_combo->insertSeparator(i); 227 227 break; 228 case Group:229 m_combo->insertItem(i, itemText(i));228 case QWebSelectData::Group: 229 m_combo->insertItem(i, data.itemText(i)); 230 230 model->item(i)->setEnabled(false); 231 231 break; 232 case Option: 233 m_combo->insertItem(i, itemText(i)); 234 model->item(i)->setEnabled(itemIsEnabled(i)); 232 case QWebSelectData::Option: 233 m_combo->insertItem(i, data.itemText(i)); 234 model->item(i)->setEnabled(data.itemIsEnabled(i)); 235 if (data.itemIsSelected(i)) 236 currentIndex = i; 235 237 break; 236 238 } 237 239 } 240 241 if (currentIndex >= 0) 242 m_combo->setCurrentIndex(currentIndex); 238 243 } 239 244 … … 243 248 return; 244 249 245 valueChanged(index); 250 emit selectItem(index, false, false); 251 } 252 253 QWebPageClient* QtFallbackWebPopup::pageClient() const 254 { 255 return m_chromeClient->platformPageClient(); 246 256 } 247 257 -
trunk/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
r62251 r64829 21 21 #define QtFallbackWebPopup_h 22 22 23 #include "QtAbstractWebPopup.h" 23 #include "Platform.h" 24 #include "qwebkitplatformplugin.h" 25 24 26 #include <QComboBox> 25 27 … … 30 32 QT_END_NAMESPACE 31 33 34 class QWebPageClient; 35 32 36 namespace WebCore { 33 37 38 class ChromeClientQt; 34 39 class QtFallbackWebPopupCombo; 35 40 36 class QtFallbackWebPopup : public Q Object, public QtAbstractWebPopup{41 class QtFallbackWebPopup : public QWebSelectMethod { 37 42 Q_OBJECT 38 43 public: 39 QtFallbackWebPopup( );44 QtFallbackWebPopup(const ChromeClientQt*); 40 45 ~QtFallbackWebPopup(); 41 46 42 virtual void show( );47 virtual void show(const QWebSelectData&); 43 48 virtual void hide(); 44 49 45 50 void destroyPopup(); 51 52 void setGeometry(const QRect& rect) { m_geometry = rect; } 53 QRect geometry() const { return m_geometry; } 54 55 void setFont(const QFont& font) { m_font = font; } 56 QFont font() const { return m_font; } 46 57 47 58 private slots: … … 52 63 bool m_popupVisible; 53 64 QtFallbackWebPopupCombo* m_combo; 65 const ChromeClientQt* m_chromeClient; 66 QRect m_geometry; 67 QFont m_font; 54 68 55 void populate(); 69 QWebPageClient* pageClient() const; 70 71 void populate(const QWebSelectData&); 56 72 #if ENABLE(SYMBIAN_DIALOG_PROVIDERS) 57 73 void showS60BrowserDialog(); -
trunk/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
r56929 r64829 42 42 QListWidgetItem* listItem; 43 43 for (int i = 0; i < m_data.itemCount(); ++i) { 44 if (m_data.itemType(i) == Q tAbstractWebPopup::Option) {44 if (m_data.itemType(i) == QWebSelectData::Option) { 45 45 listItem = new QListWidgetItem(m_data.itemText(i)); 46 46 m_list->addItem(listItem); 47 47 listItem->setSelected(m_data.itemIsSelected(i)); 48 } else if (m_data.itemType(i) == Q tAbstractWebPopup::Group) {48 } else if (m_data.itemType(i) == QWebSelectData::Group) { 49 49 listItem = new QListWidgetItem(m_data.itemText(i)); 50 50 m_list->addItem(listItem); … … 63 63 64 64 QtMaemoWebPopup::QtMaemoWebPopup() 65 : QtAbstractWebPopup() 66 , m_popup(0) 65 : m_popup(0) 67 66 { 68 67 } … … 74 73 } 75 74 76 Maemo5Popup* QtMaemoWebPopup::createSingleSelectionPopup( )77 { 78 return new Maemo5SingleSelectionPopup( *this);79 } 80 81 Maemo5Popup* QtMaemoWebPopup::createMultipleSelectionPopup( )82 { 83 return new Maemo5MultipleSelectionPopup( *this);84 } 85 86 Maemo5Popup* QtMaemoWebPopup::createPopup( )87 { 88 Maemo5Popup* result = multiple() ? createMultipleSelectionPopup() : createSingleSelectionPopup();75 Maemo5Popup* QtMaemoWebPopup::createSingleSelectionPopup(const QWebSelectData& data) 76 { 77 return new Maemo5SingleSelectionPopup(data); 78 } 79 80 Maemo5Popup* QtMaemoWebPopup::createMultipleSelectionPopup(const QWebSelectData& data) 81 { 82 return new Maemo5MultipleSelectionPopup(data); 83 } 84 85 Maemo5Popup* QtMaemoWebPopup::createPopup(const QWebSelectData& data) 86 { 87 Maemo5Popup* result = data.multiple() ? createMultipleSelectionPopup(data) : createSingleSelectionPopup(data); 89 88 connect(result, SIGNAL(finished(int)), this, SLOT(popupClosed())); 90 89 connect(result, SIGNAL(itemClicked(int)), this, SLOT(itemClicked(int))); … … 92 91 } 93 92 94 void QtMaemoWebPopup::show( )95 { 96 if ( !pageClient() ||m_popup)93 void QtMaemoWebPopup::show(const QWebSelectData& data) 94 { 95 if (m_popup) 97 96 return; 98 97 99 m_popup = createPopup( );98 m_popup = createPopup(data); 100 99 m_popup->show(); 101 100 } … … 116 115 m_popup->deleteLater(); 117 116 m_popup = 0; 118 popupDidHide();117 emit didHide(); 119 118 } 120 119 121 120 void QtMaemoWebPopup::itemClicked(int idx) 122 121 { 123 selectItem(idx, true, false);124 } 125 126 Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup( QtAbstractWebPopup& data)122 emit selectItem(idx, true, false); 123 } 124 125 Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup(const QWebSelectData& data) 127 126 : Maemo5Popup(data) 128 127 { … … 171 170 }; 172 171 173 Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup( QtAbstractWebPopup& data)172 Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup(const QWebSelectData& data) 174 173 : Maemo5Popup(data) 175 174 { -
trunk/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
r56929 r64829 21 21 #define QtMaemoWebPopup_h 22 22 23 #include " QtAbstractWebPopup.h"23 #include "qwebkitplatformplugin.h" 24 24 25 25 #include <QDialog> … … 34 34 Q_OBJECT 35 35 public: 36 Maemo5Popup( QtAbstractWebPopup& data) : m_data(data) {}36 Maemo5Popup(const QWebSelectData& data) : m_data(data) {} 37 37 38 38 signals: … … 45 45 void populateList(); 46 46 47 QtAbstractWebPopup& m_data;47 const QWebSelectData& m_data; 48 48 QListWidget* m_list; 49 49 }; 50 50 51 51 52 class QtMaemoWebPopup : public Q Object, public QtAbstractWebPopup{52 class QtMaemoWebPopup : public QWebSelectMethod { 53 53 Q_OBJECT 54 54 public: … … 56 56 ~QtMaemoWebPopup(); 57 57 58 virtual void show( );58 virtual void show(const QWebSelectData& data); 59 59 virtual void hide(); 60 60 … … 66 66 Maemo5Popup* m_popup; 67 67 68 Maemo5Popup* createPopup( );69 Maemo5Popup* createSingleSelectionPopup( );70 Maemo5Popup* createMultipleSelectionPopup( );68 Maemo5Popup* createPopup(const QWebSelectData& data); 69 Maemo5Popup* createSingleSelectionPopup(const QWebSelectData& data); 70 Maemo5Popup* createMultipleSelectionPopup(const QWebSelectData& data); 71 71 }; 72 72 … … 75 75 Q_OBJECT 76 76 public: 77 Maemo5SingleSelectionPopup( QtAbstractWebPopup& data);77 Maemo5SingleSelectionPopup(const QWebSelectData& data); 78 78 }; 79 79 … … 82 82 Q_OBJECT 83 83 public: 84 Maemo5MultipleSelectionPopup( QtAbstractWebPopup& data);84 Maemo5MultipleSelectionPopup(const QWebSelectData& data); 85 85 }; 86 86 -
trunk/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
r61487 r64829 29 29 30 30 namespace WebCore { 31 32 class SelectData : public QWebSelectData {33 public:34 SelectData(QtAbstractWebPopup* data) : d(data) {}35 36 virtual ItemType itemType(int) const;37 virtual QString itemText(int index) const { return d->itemText(index); }38 virtual QString itemToolTip(int index) const { return d->itemToolTip(index); }39 virtual bool itemIsEnabled(int index) const { return d->itemIsEnabled(index); }40 virtual int itemCount() const { return d->itemCount(); }41 virtual bool itemIsSelected(int index) const { return d->itemIsSelected(index); }42 virtual bool multiple() const { return d->multiple(); }43 44 private:45 QtAbstractWebPopup* d;46 };47 48 QWebSelectData::ItemType SelectData::itemType(int index) const49 {50 switch (d->itemType(index)) {51 case QtAbstractWebPopup::Separator: return Separator;52 case QtAbstractWebPopup::Group: return Group;53 default: return Option;54 }55 }56 57 SelectInputMethodWrapper::SelectInputMethodWrapper(QWebSelectMethod* plugin)58 : m_plugin(plugin)59 , m_selectData(0)60 {61 m_plugin->setParent(this);62 connect(m_plugin, SIGNAL(didHide()), this, SLOT(didHide()));63 connect(m_plugin, SIGNAL(selectItem(int, bool, bool)), this, SLOT(selectItem(int, bool, bool)));64 }65 66 SelectInputMethodWrapper::~SelectInputMethodWrapper()67 {68 delete m_selectData;69 }70 71 void SelectInputMethodWrapper::show()72 {73 if (m_selectData)74 delete m_selectData;75 m_selectData = new SelectData(this);76 m_plugin->show(*m_selectData);77 }78 79 void SelectInputMethodWrapper::hide()80 {81 m_plugin->hide();82 }83 84 void SelectInputMethodWrapper::selectItem(int index, bool allowMultiplySelections, bool shift)85 {86 QtAbstractWebPopup::selectItem(index, allowMultiplySelections, shift);87 }88 89 void SelectInputMethodWrapper::didHide()90 {91 QtAbstractWebPopup::popupDidHide();92 }93 94 // QtPlatformPlugin95 31 96 32 bool QtPlatformPlugin::load(const QString& file) … … 153 89 } 154 90 155 Q tAbstractWebPopup* QtPlatformPlugin::createSelectInputMethod()91 QWebSelectMethod* QtPlatformPlugin::createSelectInputMethod() 156 92 { 157 93 QWebKitPlatformPlugin* p = plugin(); 158 if (!p) 159 return 0; 160 161 QWebSelectMethod* selector = p->createSelectInputMethod(); 162 if (!selector) 163 return 0; 164 165 return new SelectInputMethodWrapper(selector); 94 return p ? p->createSelectInputMethod() : 0; 166 95 } 167 96 -
trunk/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
r61487 r64829 22 22 #define QtPlatformPlugin_h 23 23 24 #include "QtAbstractWebPopup.h"25 #include <QObject>26 24 #include <QPluginLoader> 27 25 … … 33 31 namespace WebCore { 34 32 35 class SelectInputMethodWrapper : public QObject, public QtAbstractWebPopup {36 Q_OBJECT37 public:38 SelectInputMethodWrapper(QWebSelectMethod* plugin);39 ~SelectInputMethodWrapper();40 41 virtual void show();42 virtual void hide();43 44 private Q_SLOTS:45 void selectItem(int index, bool allowMultiplySelections, bool shift);46 void didHide();47 48 private:49 QWebSelectMethod* m_plugin;50 QWebSelectData* m_selectData;51 };52 53 33 class QtPlatformPlugin { 54 34 public: … … 56 36 ~QtPlatformPlugin(); 57 37 58 Q tAbstractWebPopup* createSelectInputMethod();38 QWebSelectMethod* createSelectInputMethod(); 59 39 QWebNotificationPresenter* createNotificationPresenter(); 60 40 -
trunk/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.cpp
r64828 r64829 24 24 namespace WebCore { 25 25 26 SearchPopupMenuQt::SearchPopupMenuQt(P opupMenuClient* client)27 : m_popup( adoptRef(new PopupMenuQt(client)))26 SearchPopupMenuQt::SearchPopupMenuQt(PassRefPtr<PopupMenu> popup) 27 : m_popup(popup) 28 28 { 29 29 } -
trunk/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.h
r64828 r64829 22 22 #define SearchPopupMenuQt_h 23 23 24 #include "PopupMenuQt.h"25 24 #include "SearchPopupMenu.h" 26 25 … … 29 28 class SearchPopupMenuQt : public SearchPopupMenu { 30 29 public: 31 SearchPopupMenuQt(P opupMenuClient*);30 SearchPopupMenuQt(PassRefPtr<PopupMenu> popup); 32 31 33 32 virtual PopupMenu* popupMenu(); … … 37 36 38 37 private: 39 RefPtr<PopupMenu Qt> m_popup;38 RefPtr<PopupMenu> m_popup; 40 39 }; 41 40
Note: See TracChangeset
for help on using the changeset viewer.