summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/TextControlInnerElements.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/TextControlInnerElements.h')
-rw-r--r--WebCore/rendering/TextControlInnerElements.h51
1 files changed, 36 insertions, 15 deletions
diff --git a/WebCore/rendering/TextControlInnerElements.h b/WebCore/rendering/TextControlInnerElements.h
index f59ac96..ed1887e 100644
--- a/WebCore/rendering/TextControlInnerElements.h
+++ b/WebCore/rendering/TextControlInnerElements.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,55 +34,76 @@ class String;
class TextControlInnerElement : public HTMLDivElement {
public:
+ static PassRefPtr<TextControlInnerElement> create(Node* shadowParent);
+
+ void attachInnerElement(Node*, PassRefPtr<RenderStyle>, RenderArena*);
+
+protected:
TextControlInnerElement(Document*, Node* shadowParent = 0);
-
+
+private:
virtual bool isMouseFocusable() const { return false; }
virtual bool isShadowNode() const { return m_shadowParent; }
virtual Node* shadowParentNode() { return m_shadowParent; }
void setShadowParentNode(Node* node) { m_shadowParent = node; }
- void attachInnerElement(Node*, PassRefPtr<RenderStyle>, RenderArena*);
-
-private:
+
Node* m_shadowParent;
};
class TextControlInnerTextElement : public TextControlInnerElement {
public:
+ static PassRefPtr<TextControlInnerTextElement> create(Document*, Node* shadowParent);
+
+ virtual void defaultEventHandler(Event*);
+
+private:
TextControlInnerTextElement(Document*, Node* shadowParent);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- virtual void defaultEventHandler(Event*);
};
class SearchFieldResultsButtonElement : public TextControlInnerElement {
public:
- SearchFieldResultsButtonElement(Document*);
+ static PassRefPtr<SearchFieldResultsButtonElement> create(Document*);
+
virtual void defaultEventHandler(Event*);
+
+private:
+ SearchFieldResultsButtonElement(Document*);
};
class SearchFieldCancelButtonElement : public TextControlInnerElement {
public:
- SearchFieldCancelButtonElement(Document*);
+ static PassRefPtr<SearchFieldCancelButtonElement> create(Document*);
+
virtual void defaultEventHandler(Event*);
- virtual void detach();
+
private:
+ SearchFieldCancelButtonElement(Document*);
+
+ virtual void detach();
+
bool m_capturing;
};
class SpinButtonElement : public TextControlInnerElement {
public:
- SpinButtonElement(Document*, Node*);
- virtual bool isSpinButtonElement() const { return true; }
- virtual bool isEnabledFormControl() { return static_cast<Element*>(shadowAncestorNode())->isEnabledFormControl(); }
- virtual void defaultEventHandler(Event*);
+ static PassRefPtr<SpinButtonElement> create(Node*);
+ // FIXME: "Spin button on up button" is not a phrase with a single clear meaning.
+ // Need a name for this that makes it clearer.
bool onUpButton() const { return m_onUpButton; }
- static const AtomicString& spinButtonNodeName();
private:
+ SpinButtonElement(Node*);
+
+ virtual bool isSpinButtonElement() const { return true; }
+ virtual bool isEnabledFormControl() { return static_cast<Element*>(shadowAncestorNode())->isEnabledFormControl(); }
+ virtual void defaultEventHandler(Event*);
+
bool m_capturing;
bool m_onUpButton;
};
-} //namespace
+} // namespace
#endif