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

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: gixed slow select-max-length.html 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 77049422066b0de12d13e1d720a00d4609979270..2b820096f8c391c0dcb49e26ea6e3ac021db45d9 100644
--- a/Source/core/html/HTMLSelectElement.h
+++ b/Source/core/html/HTMLSelectElement.h
@@ -26,6 +26,7 @@
#ifndef HTMLSelectElement_h
#define HTMLSelectElement_h
+#include "core/html/HTMLContentElement.h"
#include "core/html/HTMLFormControlElementWithState.h"
#include "core/html/HTMLOptionsCollection.h"
#include "core/html/forms/TypeAhead.h"
@@ -33,8 +34,10 @@
namespace WebCore {
+class AutoscrollController;
class ExceptionState;
class HTMLOptionElement;
+class MouseEvent;
class HTMLSelectElement FINAL : public HTMLFormControlElementWithState, public TypeAheadDataSource {
public:
@@ -97,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);
@@ -113,9 +117,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;
@@ -145,6 +151,7 @@ private:
virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) OVERRIDE;
+ virtual void didAddUserAgentShadowRoot(ShadowRoot&) OVERRIDE;
virtual void defaultEventHandler(Event*) OVERRIDE;
@@ -189,6 +196,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; }
@@ -213,6 +224,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