Changeset 61487 in webkit
- Timestamp:
- Jun 19, 2010 7:19:32 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r61486 r61487 1 2010-06-19 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Platform plugin's multi-select does not take OptGroup into account 6 https://bugs.webkit.org/show_bug.cgi?id=40718 7 8 In multi-select elements, optgroup elements are counted in the index calculation, 9 but in single-select they are not. Keep the same logic even when NO_LISTBOX_RENDERING 10 is enabled. 11 Added tests to the existing manual test, as testing this requires a special build, in which 12 NO_LISTBOX_RENDERING is enabled. 13 14 * html/HTMLSelectElement.cpp: 15 (WebCore::HTMLSelectElement::listBoxSelectItem): 16 * manual-tests/no-listbox-rendering.html: 17 * rendering/RenderMenuList.cpp: 18 (WebCore::RenderMenuList::listBoxSelectItem): 19 1 20 2010-06-19 Thomas Van Lenten <thomasvl@chromium.org> 2 21 -
trunk/WebCore/html/HTMLSelectElement.cpp
r61293 r61487 108 108 { 109 109 if (!multiple()) 110 setSelectedIndexByUser(list Index, true, fireOnChangeNow);110 setSelectedIndexByUser(listToOptionIndex(listIndex), true, fireOnChangeNow); 111 111 else { 112 112 updateSelectedState(m_data, this, listIndex, allowMultiplySelections, shift); -
trunk/WebCore/manual-tests/no-listbox-rendering.html
r57714 r61487 23 23 </tr> 24 24 <tr> 25 <td> 26 <select multiple> 27 <optgroup label="1"></optgroup> 28 <option>11</option> 29 <option>12</option> 30 <option>13</option> 31 <option>14</option> 32 <optgroup label="2"></optgroup> 33 <option>21</option> 34 <option>22</option> 35 <option>23</option> 36 <option>24</option> 37 </select> 38 </td> 39 <td>combobox in previos cell should handle optgroup correctly.</td> 40 </tr> 41 <tr> 42 <td> 43 <select> 44 <optgroup label="1"></optgroup> 45 <option>11</option> 46 <option>12</option> 47 <option>13</option> 48 <option>14</option> 49 <optgroup label="2"></optgroup> 50 <option>21</option> 51 <option>22</option> 52 <option>23</option> 53 <option>24</option> 54 </select> 55 </td> 56 <td>combobox in previos cell should handle optgroup correctly.</td> 57 </tr> 58 <tr> 25 59 <td><input type="reset"</td> 26 60 <td>after pressing this button all the combo boxes should go back to the state discribed above.</td> -
trunk/WebCore/rendering/RenderMenuList.cpp
r59956 r61487 315 315 { 316 316 SelectElement* select = toSelectElement(static_cast<Element*>(node())); 317 select->listBoxSelectItem( select->listToOptionIndex(listIndex), allowMultiplySelections, shift, fireOnChangeNow);317 select->listBoxSelectItem(listIndex, allowMultiplySelections, shift, fireOnChangeNow); 318 318 } 319 319 -
trunk/WebKit/qt/Api/qwebkitplatformplugin.h
r61121 r61487 32 32 { 33 33 public: 34 inline~QWebSelectData() {}34 virtual ~QWebSelectData() {} 35 35 36 36 enum ItemType { Option, Group, Separator }; … … 49 49 Q_OBJECT 50 50 public: 51 inline~QWebSelectMethod() {}51 virtual ~QWebSelectMethod() {} 52 52 53 53 virtual void show(const QWebSelectData&) = 0; … … 62 62 { 63 63 public: 64 virtual ~QWebNotificationData() {} 65 64 66 virtual const QString title() const = 0; 65 67 virtual const QString message() const = 0; -
trunk/WebKit/qt/ChangeLog
r61480 r61487 1 2010-06-19 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Platform plugin's multi-select does not take OptGroup into account 6 https://bugs.webkit.org/show_bug.cgi?id=40718 7 8 Make sure that SelectData is valid throughout the lifetime of the dialog. 9 This is mostly important for the Orbt based plugin. 10 Added virtual desctructors where they were missing. 11 12 * Api/qwebkitplatformplugin.h: 13 (QWebSelectData::~QWebSelectData): 14 (QWebSelectMethod::~QWebSelectMethod): 15 (QWebNotificationData::~QWebNotificationData): 16 * WebCoreSupport/QtPlatformPlugin.cpp: 17 (WebCore::SelectInputMethodWrapper::SelectInputMethodWrapper): 18 (WebCore::SelectInputMethodWrapper::~SelectInputMethodWrapper): 19 (WebCore::SelectInputMethodWrapper::show): 20 * WebCoreSupport/QtPlatformPlugin.h: 21 * examples/platformplugin/WebPlugin.cpp: 22 * examples/platformplugin/qwebkitplatformplugin.h: 23 (QWebSelectData::~QWebSelectData): 24 (QWebSelectMethod::~QWebSelectMethod): 25 (QWebNotificationData::~QWebNotificationData): 26 1 27 2010-06-19 No'am Rosenthal <noam.rosenthal@nokia.com> 2 28 -
trunk/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
r61121 r61487 57 57 SelectInputMethodWrapper::SelectInputMethodWrapper(QWebSelectMethod* plugin) 58 58 : m_plugin(plugin) 59 , m_selectData(0) 59 60 { 60 61 m_plugin->setParent(this); … … 63 64 } 64 65 66 SelectInputMethodWrapper::~SelectInputMethodWrapper() 67 { 68 delete m_selectData; 69 } 70 65 71 void SelectInputMethodWrapper::show() 66 72 { 67 SelectData data(this); 68 m_plugin->show(data); 73 if (m_selectData) 74 delete m_selectData; 75 m_selectData = new SelectData(this); 76 m_plugin->show(*m_selectData); 69 77 } 70 78 -
trunk/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
r61121 r61487 29 29 class QWebKitPlatformPlugin; 30 30 class QWebNotificationPresenter; 31 class QWebSelectData; 31 32 32 33 namespace WebCore { … … 36 37 public: 37 38 SelectInputMethodWrapper(QWebSelectMethod* plugin); 39 ~SelectInputMethodWrapper(); 38 40 39 41 virtual void show(); … … 46 48 private: 47 49 QWebSelectMethod* m_plugin; 50 QWebSelectData* m_selectData; 48 51 }; 49 52 -
trunk/WebKit/qt/examples/platformplugin/WebPlugin.cpp
r61121 r61487 222 222 } 223 223 224 Q_EXPORT_PLUGIN2( qwebselectim, WebPlugin)224 Q_EXPORT_PLUGIN2(platformplugin, WebPlugin) -
trunk/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
r61121 r61487 32 32 { 33 33 public: 34 inline~QWebSelectData() {}34 virtual ~QWebSelectData() {} 35 35 36 36 enum ItemType { Option, Group, Separator }; … … 49 49 Q_OBJECT 50 50 public: 51 inline~QWebSelectMethod() {}51 virtual ~QWebSelectMethod() {} 52 52 53 53 virtual void show(const QWebSelectData&) = 0; … … 62 62 { 63 63 public: 64 virtual ~QWebNotificationData() {} 65 64 66 virtual const QString title() const = 0; 65 67 virtual const QString message() const = 0;
Note: See TracChangeset
for help on using the changeset viewer.