Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2000 Dirk Mueller (mueller@kde.org) 5 * (C) 2000 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 27 matching lines...) Expand all
38 class AutoscrollController; 38 class AutoscrollController;
39 class ExceptionState; 39 class ExceptionState;
40 class HTMLOptionElement; 40 class HTMLOptionElement;
41 class HTMLOptionElementOrHTMLOptGroupElement; 41 class HTMLOptionElementOrHTMLOptGroupElement;
42 class HTMLElementOrLong; 42 class HTMLElementOrLong;
43 class PopupMenu; 43 class PopupMenu;
44 44
45 class CORE_EXPORT HTMLSelectElement final : public HTMLFormControlElementWithSta te, private TypeAheadDataSource { 45 class CORE_EXPORT HTMLSelectElement final : public HTMLFormControlElementWithSta te, private TypeAheadDataSource {
46 DEFINE_WRAPPERTYPEINFO(); 46 DEFINE_WRAPPERTYPEINFO();
47 public: 47 public:
48 static PassRefPtrWillBeRawPtr<HTMLSelectElement> create(Document&); 48 static RawPtr<HTMLSelectElement> create(Document&);
49 static PassRefPtrWillBeRawPtr<HTMLSelectElement> create(Document&, HTMLFormE lement*); 49 static RawPtr<HTMLSelectElement> create(Document&, HTMLFormElement*);
50 ~HTMLSelectElement() override; 50 ~HTMLSelectElement() override;
51 51
52 int selectedIndex() const; 52 int selectedIndex() const;
53 void setSelectedIndex(int); 53 void setSelectedIndex(int);
54 int suggestedIndex() const; 54 int suggestedIndex() const;
55 void setSuggestedIndex(int); 55 void setSuggestedIndex(int);
56 56
57 void optionSelectedByUser(int index, bool dispatchChangeEvent, bool allowMul tipleSelection = false); 57 void optionSelectedByUser(int index, bool dispatchChangeEvent, bool allowMul tipleSelection = false);
58 58
59 // For ValidityState 59 // For ValidityState
(...skipping 15 matching lines...) Expand all
75 void add(const HTMLOptionElementOrHTMLOptGroupElement&, const HTMLElementOrL ong&, ExceptionState&); 75 void add(const HTMLOptionElementOrHTMLOptGroupElement&, const HTMLElementOrL ong&, ExceptionState&);
76 76
77 using Node::remove; 77 using Node::remove;
78 void remove(int index); 78 void remove(int index);
79 79
80 String value() const; 80 String value() const;
81 void setValue(const String&, bool sendEvents = false); 81 void setValue(const String&, bool sendEvents = false);
82 String suggestedValue() const; 82 String suggestedValue() const;
83 void setSuggestedValue(const String&); 83 void setSuggestedValue(const String&);
84 84
85 PassRefPtrWillBeRawPtr<HTMLOptionsCollection> options(); 85 RawPtr<HTMLOptionsCollection> options();
86 PassRefPtrWillBeRawPtr<HTMLCollection> selectedOptions(); 86 RawPtr<HTMLCollection> selectedOptions();
87 87
88 void optionElementChildrenChanged(); 88 void optionElementChildrenChanged();
89 89
90 void setRecalcListItems(); 90 void setRecalcListItems();
91 void invalidateSelectedItems(); 91 void invalidateSelectedItems();
92 void updateListItemSelectedStates(); 92 void updateListItemSelectedStates();
93 93
94 using ListItems = WillBeHeapVector<RawPtrWillBeMember<HTMLElement>>; 94 using ListItems = HeapVector<Member<HTMLElement>>;
95 const ListItems& listItems() const; 95 const ListItems& listItems() const;
96 96
97 void accessKeyAction(bool sendMouseEvents) override; 97 void accessKeyAction(bool sendMouseEvents) override;
98 void accessKeySetSelectedIndex(int); 98 void accessKeySetSelectedIndex(int);
99 99
100 void setOption(unsigned index, HTMLOptionElement*, ExceptionState&); 100 void setOption(unsigned index, HTMLOptionElement*, ExceptionState&);
101 101
102 Element* namedItem(const AtomicString& name); 102 Element* namedItem(const AtomicString& name);
103 HTMLOptionElement* item(unsigned index); 103 HTMLOptionElement* item(unsigned index);
104 104
105 void scrollToSelection(); 105 void scrollToSelection();
106 void scrollToIndex(int listIndex); 106 void scrollToIndex(int listIndex);
107 107
108 void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shi ft, bool fireOnChangeNow = true); 108 void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shi ft, bool fireOnChangeNow = true);
109 109
110 bool canSelectAll() const; 110 bool canSelectAll() const;
111 void selectAll(); 111 void selectAll();
112 int listToOptionIndex(int listIndex) const; 112 int listToOptionIndex(int listIndex) const;
113 void listBoxOnChange(); 113 void listBoxOnChange();
114 int optionToListIndex(int optionIndex) const; 114 int optionToListIndex(int optionIndex) const;
115 int activeSelectionEndListIndex() const; 115 int activeSelectionEndListIndex() const;
116 void setActiveSelectionAnchorIndex(int); 116 void setActiveSelectionAnchorIndex(int);
117 void setActiveSelectionEndIndex(int); 117 void setActiveSelectionEndIndex(int);
118 118
119 // For use in the implementation of HTMLOptionElement. 119 // For use in the implementation of HTMLOptionElement.
120 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected); 120 void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
121 void optionInserted(const HTMLOptionElement&, bool optionIsSelected); 121 void optionInserted(const HTMLOptionElement&, bool optionIsSelected);
122 void optionRemoved(const HTMLOptionElement&); 122 void optionRemoved(const HTMLOptionElement&);
123 bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionEleme nt>, ExceptionState&); 123 bool anonymousIndexedSetter(unsigned, RawPtr<HTMLOptionElement>, ExceptionSt ate&);
124 124
125 void updateListOnLayoutObject(); 125 void updateListOnLayoutObject();
126 126
127 HTMLOptionElement* spatialNavigationFocusedOption(); 127 HTMLOptionElement* spatialNavigationFocusedOption();
128 void handleMouseRelease(); 128 void handleMouseRelease();
129 129
130 int listIndexForOption(const HTMLOptionElement&); 130 int listIndexForOption(const HTMLOptionElement&);
131 131
132 // Helper functions for popup menu implementations. 132 // Helper functions for popup menu implementations.
133 String itemText(const Element&) const; 133 String itemText(const Element&) const;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 int optionCount() const override; 248 int optionCount() const override;
249 String optionAtIndex(int index) const override; 249 String optionAtIndex(int index) const override;
250 250
251 // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and 251 // m_listItems contains HTMLOptionElement, HTMLOptGroupElement, and
252 // HTMLHRElement objects. 252 // HTMLHRElement objects.
253 mutable ListItems m_listItems; 253 mutable ListItems m_listItems;
254 Vector<bool> m_lastOnChangeSelection; 254 Vector<bool> m_lastOnChangeSelection;
255 Vector<bool> m_cachedStateForActiveSelection; 255 Vector<bool> m_cachedStateForActiveSelection;
256 TypeAhead m_typeAhead; 256 TypeAhead m_typeAhead;
257 unsigned m_size; 257 unsigned m_size;
258 RefPtrWillBeMember<HTMLOptionElement> m_lastOnChangeOption; 258 Member<HTMLOptionElement> m_lastOnChangeOption;
259 int m_activeSelectionAnchorIndex; 259 int m_activeSelectionAnchorIndex;
260 int m_activeSelectionEndIndex; 260 int m_activeSelectionEndIndex;
261 RefPtrWillBeMember<HTMLOptionElement> m_optionToScrollTo; 261 Member<HTMLOptionElement> m_optionToScrollTo;
262 bool m_multiple; 262 bool m_multiple;
263 bool m_activeSelectionState; 263 bool m_activeSelectionState;
264 mutable bool m_shouldRecalcListItems; 264 mutable bool m_shouldRecalcListItems;
265 int m_suggestedIndex; 265 int m_suggestedIndex;
266 bool m_isAutofilledByPreview; 266 bool m_isAutofilledByPreview;
267 267
268 RefPtrWillBeMember<PopupMenu> m_popup; 268 Member<PopupMenu> m_popup;
269 int m_indexToSelectOnCancel; 269 int m_indexToSelectOnCancel;
270 bool m_popupIsVisible; 270 bool m_popupIsVisible;
271 }; 271 };
272 272
273 } // namespace blink 273 } // namespace blink
274 274
275 #endif // HTMLSelectElement_h 275 #endif // HTMLSelectElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698