diff options
author | Leon Clarke <leonclarke@google.com> | 2010-06-03 14:33:32 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-06-08 12:24:51 +0100 |
commit | 5af96e2c7b73ebc627c6894727826a7576d31758 (patch) | |
tree | f9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebCore/rendering/TextControlInnerElements.h | |
parent | 8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff) | |
download | external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2 |
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebCore/rendering/TextControlInnerElements.h')
-rw-r--r-- | WebCore/rendering/TextControlInnerElements.h | 51 |
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 |