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

Unified Diff: Source/core/html/HTMLSelectElement.h

Issue 347773002: Implement select listbox using shadow DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLSelectElement.h
diff --git a/Source/core/html/HTMLSelectElement.h b/Source/core/html/HTMLSelectElement.h
index 05bf5124376038c009fdb602f0ba343805403525..e0a0d53612c2008859b3ba1c2aee85b879d2180d 100644
--- a/Source/core/html/HTMLSelectElement.h
+++ b/Source/core/html/HTMLSelectElement.h
@@ -27,6 +27,7 @@
#define HTMLSelectElement_h
#include "core/events/Event.h"
+#include "core/html/HTMLContentElement.h"
#include "core/html/HTMLFormControlElementWithState.h"
#include "core/html/HTMLOptionsCollection.h"
#include "core/html/forms/TypeAhead.h"
@@ -34,8 +35,10 @@
namespace WebCore {
+class AutoscrollController;
class ExceptionState;
class HTMLOptionElement;
+class MouseEvent;
class HTMLSelectElement FINAL : public HTMLFormControlElementWithState, public TypeAheadDataSource {
public:
@@ -98,6 +101,7 @@ public:
Element* item(unsigned index);
void scrollToSelection();
+ void scrollTo(int listIndex);
void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true);
@@ -114,9 +118,11 @@ public:
// For use in the implementation of HTMLOptionElement.
void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
+ void optionRemoved(HTMLOptionElement*);
bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionElement>, ExceptionState&);
void updateListOnRenderer();
+ void updateView();
virtual void trace(Visitor*) OVERRIDE;
@@ -146,6 +152,7 @@ private:
virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) OVERRIDE;
+ virtual void didAddUserAgentShadowRoot(ShadowRoot&) OVERRIDE;
virtual void defaultEventHandler(Event*) OVERRIDE;
@@ -190,6 +197,10 @@ private:
int firstSelectableListIndex() const;
int lastSelectableListIndex() const;
int nextSelectableListIndexPageAway(int startIndex, SkipDirection) const;
+ int listIndexForMouseEvent(const MouseEvent&);
+ int listIndexForEvent(const Event&);
+ int listIndexForNode(const Node&);
+ AutoscrollController* autoscrollController() const;
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
@@ -214,6 +225,7 @@ private:
bool m_activeSelectionState;
mutable bool m_shouldRecalcListItems;
int m_suggestedIndex;
+ bool m_capturing;
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698