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

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: Fixed 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..54ef63aa97eab936a21f955d5b529129214a076e 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,6 +117,7 @@ public:
// For use in the implementation of HTMLOptionElement.
void optionSelectionStateChanged(HTMLOptionElement*, bool optionIsSelected);
+ void optionRemoved(HTMLOptionElement*);
bool anonymousIndexedSetter(unsigned, PassRefPtrWillBeRawPtr<HTMLOptionElement>, ExceptionState&);
void updateListOnRenderer();
@@ -145,6 +150,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 +195,9 @@ 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 bool areAuthorShadowsAllowed() const OVERRIDE { return false; }

Powered by Google App Engine
This is Rietveld 408576698