diff options
author | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
commit | 5f1ab04193ad0130ca8204aadaceae083aca9881 (patch) | |
tree | 5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/dom/InputElement.h | |
parent | 194315e5a908cc8ed67d597010544803eef1ac59 (diff) | |
download | external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2 |
Get WebKit r44544.
Diffstat (limited to 'WebCore/dom/InputElement.h')
-rw-r--r-- | WebCore/dom/InputElement.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/WebCore/dom/InputElement.h b/WebCore/dom/InputElement.h index 40c972f..7ad3cbd 100644 --- a/WebCore/dom/InputElement.h +++ b/WebCore/dom/InputElement.h @@ -50,7 +50,9 @@ public: virtual int size() const = 0; virtual String value() const = 0; virtual void setValue(const String&) = 0; - virtual String placeholderValue() const = 0; + + virtual String placeholder() const = 0; + virtual void setPlaceholder(const String&) = 0; virtual String constrainValue(const String&) const = 0; virtual void setValueFromRenderer(const String&) = 0; @@ -62,32 +64,26 @@ public: static const int s_defaultSize; protected: - InputElement() { } - - static void dispatchFocusEvent(InputElementData&, Document*); - static void dispatchBlurEvent(InputElementData&, Document*); - static void updatePlaceholderVisibility(InputElementData&, Document*, bool placeholderValueChanged = false); - static void updateFocusAppearance(InputElementData&, Document*, bool restorePreviousSelection); - static void updateSelectionRange(InputElementData&, int start, int end); - static void aboutToUnload(InputElementData&, Document*); - static void setValueFromRenderer(InputElementData&, Document*, const String&); - static String constrainValue(const InputElementData&, const String& proposedValue, int maxLength); - static void handleBeforeTextInsertedEvent(InputElementData&, Document*, Event*); - static void parseSizeAttribute(InputElementData&, MappedAttribute*); - static void parseMaxLengthAttribute(InputElementData&, MappedAttribute*); - static void updateValueIfNeeded(InputElementData&); - static void notifyFormStateChanged(InputElementData&, Document*); + static void dispatchFocusEvent(InputElementData&, InputElement*, Element*); + static void dispatchBlurEvent(InputElementData&, InputElement*, Element*); + static void updatePlaceholderVisibility(InputElementData&, InputElement*, Element*, bool placeholderValueChanged = false); + static void updateFocusAppearance(InputElementData&, InputElement*, Element*, bool restorePreviousSelection); + static void updateSelectionRange(InputElement*, Element*, int start, int end); + static void aboutToUnload(InputElement*, Element*); + static void setValueFromRenderer(InputElementData&, InputElement*, Element*, const String&); + static String constrainValue(const InputElement*, const String& proposedValue, int maxLength); + static void handleBeforeTextInsertedEvent(InputElementData&, InputElement*, Document*, Event*); + static void parseSizeAttribute(InputElementData&, Element*, MappedAttribute*); + static void parseMaxLengthAttribute(InputElementData&, InputElement*, Element*, MappedAttribute*); + static void updateValueIfNeeded(InputElementData&, InputElement*); + static void notifyFormStateChanged(Element*); }; // HTML/WMLInputElement hold this struct as member variable // and pass it to the static helper functions in InputElement class InputElementData { public: - InputElementData(InputElement*, Element*); - ~InputElementData(); - - InputElement* inputElement() const { return m_inputElement; } - Element* element() const { return m_element; } + InputElementData(); bool placeholderShouldBeVisible() const { return m_placeholderShouldBeVisible; } void setPlaceholderShouldBeVisible(bool visible) { m_placeholderShouldBeVisible = visible; } @@ -111,8 +107,6 @@ public: void setCachedSelectionEnd(int value) { m_cachedSelectionEnd = value; } private: - InputElement* m_inputElement; - Element* m_element; bool m_placeholderShouldBeVisible; AtomicString m_name; String m_value; |