Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / HTMLSelectElement.h
index 05bf512..68f6d4e 100644 (file)
 #ifndef HTMLSelectElement_h
 #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"
 #include "wtf/Vector.h"
 
-namespace WebCore {
+namespace blink {
 
+class AutoscrollController;
 class ExceptionState;
 class HTMLOptionElement;
+class MouseEvent;
 
 class HTMLSelectElement FINAL : public HTMLFormControlElementWithState, public TypeAheadDataSource {
 public:
@@ -98,6 +100,7 @@ public:
     Element* item(unsigned index);
 
     void scrollToSelection();
+    void scrollTo(int listIndex);
 
     void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true);
 
@@ -114,10 +117,14 @@ public:
 
     // For use in the implementation of HTMLOptionElement.
     void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
+    void optionRemoved(const HTMLOptionElement&);
     bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionElement>, ExceptionState&);
 
     void updateListOnRenderer();
 
+    HTMLOptionElement* spatialNavigationFocusedOption();
+    void handleMouseRelease();
+
     virtual void trace(Visitor*) OVERRIDE;
 
 protected:
@@ -146,6 +153,7 @@ private:
 
     virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
     virtual bool appendFormData(FormDataList&, bool) OVERRIDE;
+    virtual void didAddUserAgentShadowRoot(ShadowRoot&) OVERRIDE;
 
     virtual void defaultEventHandler(Event*) OVERRIDE;
 
@@ -175,7 +183,9 @@ private:
     int lastSelectedListIndex() const;
     void updateSelectedState(int listIndex, bool multi, bool shift);
     void menuListDefaultEventHandler(Event*);
-    bool platformHandleKeydownEvent(KeyboardEvent*);
+    void handlePopupOpenKeyboardEvent(Event*);
+    bool shouldOpenPopupForKeyDownEvent(KeyboardEvent*);
+    bool shouldOpenPopupForKeyPressEvent(KeyboardEvent*);
     void listBoxDefaultEventHandler(Event*);
     void setOptionsChangedOnRenderer();
     size_t searchOptionsForValue(const String&, size_t listIndexStart, size_t listIndexEnd) const;
@@ -190,8 +200,11 @@ private:
     int firstSelectableListIndex() const;
     int lastSelectableListIndex() const;
     int nextSelectableListIndexPageAway(int startIndex, SkipDirection) const;
+    int listIndexForEventTargetOption(const Event&);
+    int listIndexForOption(const HTMLOptionElement&);
+    AutoscrollController* autoscrollController() const;
 
-    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
+    virtual void childrenChanged(const ChildrenChange&) OVERRIDE;
     virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
     virtual void finishParsingChildren() OVERRIDE;