Changeset 62193 in webkit
- Timestamp:
- Jun 30, 2010 11:49:33 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/ChangeLog
r62171 r62193 1 2010-06-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Make sure we catch closed QComboBox popups. 6 https://bugs.webkit.org/show_bug.cgi?id=39019 7 8 The way it works currently is using the QComboBox::show/hidePopup 9 virtual method to catch popup requests in the middle. There is 10 some cases however that the popup widget gets closed without 11 going through the hidePopup method. 12 13 This patch adds an event filter to the popup's view to know when 14 it gets closed and calls hidePopup to call our handling code. 15 This may get hidePopup called twice but this shouldn't have any 16 effect. 17 18 * WebCoreSupport/QtFallbackWebPopup.cpp: 19 (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo): 20 (WebCore::QtFallbackWebPopupCombo::eventFilter): 21 * WebCoreSupport/QtFallbackWebPopup.h: 22 1 23 2010-06-30 Simon Hausmann <simon.hausmann@nokia.com> 2 24 -
trunk/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
r61935 r62193 48 48 : m_ownerPopup(ownerPopup) 49 49 { 50 // Install an event filter on the view inside the combo box popup to make sure we know 51 // when the popup got closed. E.g. QComboBox::hidePopup() won't be called when the popup 52 // is closed by a mouse wheel event outside its window. 53 view()->installEventFilter(this); 50 54 } 51 55 … … 80 84 m_ownerPopup.m_popupVisible = false; 81 85 m_ownerPopup.popupDidHide(); 86 } 87 88 bool QtFallbackWebPopupCombo::eventFilter(QObject* watched, QEvent* event) 89 { 90 Q_ASSERT(watched == view()); 91 92 if (event->type() == QEvent::Show && !m_ownerPopup.m_popupVisible) 93 showPopup(); 94 else if (event->type() == QEvent::Hide && m_ownerPopup.m_popupVisible) 95 hidePopup(); 96 97 return false; 82 98 } 83 99 -
trunk/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
r59614 r62193 63 63 virtual void showPopup(); 64 64 virtual void hidePopup(); 65 virtual bool eventFilter(QObject* watched, QEvent* event); 65 66 66 67 private:
Note: See TracChangeset
for help on using the changeset viewer.