Changeset 56285 in webkit
- Timestamp:
- Mar 19, 2010 5:08:32 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56284 r56285 1 2010-03-19 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Antti Koivisto. 4 5 Multiselect Popup - PopupMenuClient extension 6 https://bugs.webkit.org/show_bug.cgi?id=36178 7 8 PopupMenuClient class is the interface used by combobox popup implementations. 9 It needs to be extended to handle <select multiple> needs. 10 11 A new interface named ListPopupMenuClient that inherits from PopupMenuClient was created. 12 The use of this new class instead of adding methods to PopupMenuClient avoids changes 13 in other non related implementations of PopupMenuClient. 14 15 RenderMenuList has changed to inherit ListPopupMenuClient instead of PopupMenuClient 16 and to have the new methods implemented. 17 18 * platform/PopupMenuClient.h: 19 * rendering/RenderMenuList.cpp: 20 (WebCore::RenderMenuList::listBoxSelectItem): 21 (WebCore::RenderMenuList::multiple): 22 * rendering/RenderMenuList.h: 23 1 24 2010-03-19 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/WebCore/platform/PopupMenuClient.h
r55425 r56285 1 1 /* 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 3 * Copyright (C) 2006 Apple Computer, Inc. 3 4 * … … 65 66 }; 66 67 68 #if ENABLE(NO_LISTBOX_RENDERING) 69 class ListPopupMenuClient : public PopupMenuClient { 70 public: 71 virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true) = 0; 72 virtual bool multiple() = 0; 73 }; 74 #endif 75 76 67 77 } 68 78 -
trunk/WebCore/rendering/RenderMenuList.cpp
r55425 r56285 2 2 * This file is part of the select element renderer in WebCore. 3 3 * 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) … … 310 311 } 311 312 313 #if ENABLE(NO_LISTBOX_RENDERING) 314 void RenderMenuList::listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow) 315 { 316 SelectElement* select = toSelectElement(static_cast<Element*>(node())); 317 select->listBoxSelectItem(select->listToOptionIndex(listIndex), allowMultiplySelections, shift, fireOnChangeNow); 318 } 319 320 bool RenderMenuList::multiple() 321 { 322 SelectElement* select = toSelectElement(static_cast<Element*>(node())); 323 return select->multiple(); 324 } 325 #endif 326 312 327 void RenderMenuList::didSetSelectedIndex() 313 328 { -
trunk/WebCore/rendering/RenderMenuList.h
r55425 r56285 2 2 * This file is part of the select element renderer in WebCore. 3 3 * 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 6 * … … 38 39 class RenderText; 39 40 41 #if ENABLE(NO_LISTBOX_RENDERING) 42 class RenderMenuList : public RenderFlexibleBox, private ListPopupMenuClient { 43 #else 40 44 class RenderMenuList : public RenderFlexibleBox, private PopupMenuClient { 45 #endif 46 41 47 public: 42 48 RenderMenuList(Element*); … … 98 104 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize); 99 105 106 #if ENABLE(NO_LISTBOX_RENDERING) 107 virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true); 108 virtual bool multiple(); 109 #endif 110 100 111 virtual bool hasLineIfEmpty() const { return true; } 101 112
Note: See TracChangeset
for help on using the changeset viewer.