OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 bool lastChangeWasUserEdit() const; | 83 bool lastChangeWasUserEdit() const; |
84 void setInnerTextValue(const String&); | 84 void setInnerTextValue(const String&); |
85 String innerTextValue() const; | 85 String innerTextValue() const; |
86 | 86 |
87 String directionForFormData() const; | 87 String directionForFormData() const; |
88 | 88 |
89 void setTextAsOfLastFormControlChangeEvent(const String& text) { m_textAsOfL
astFormControlChangeEvent = text; } | 89 void setTextAsOfLastFormControlChangeEvent(const String& text) { m_textAsOfL
astFormControlChangeEvent = text; } |
90 | 90 |
91 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 91 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
92 | 92 |
| 93 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; |
| 94 |
93 protected: | 95 protected: |
94 HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement*
); | 96 HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement*
); |
95 bool isPlaceholderEmpty() const; | 97 bool isPlaceholderEmpty() const; |
96 virtual void updatePlaceholderText() = 0; | 98 virtual void updatePlaceholderText() = 0; |
97 | 99 |
98 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 100 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
99 | 101 |
100 void cacheSelection(int start, int end, TextFieldSelectionDirection directio
n) | 102 void cacheSelection(int start, int end, TextFieldSelectionDirection directio
n) |
101 { | 103 { |
102 m_cachedSelectionStart = start; | 104 m_cachedSelectionStart = start; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 int m_cachedSelectionStart; | 142 int m_cachedSelectionStart; |
141 int m_cachedSelectionEnd; | 143 int m_cachedSelectionEnd; |
142 TextFieldSelectionDirection m_cachedSelectionDirection; | 144 TextFieldSelectionDirection m_cachedSelectionDirection; |
143 }; | 145 }; |
144 | 146 |
145 inline bool isHTMLTextFormControlElement(const Node* node) | 147 inline bool isHTMLTextFormControlElement(const Node* node) |
146 { | 148 { |
147 return node->isElementNode() && toElement(node)->isTextFormControl(); | 149 return node->isElementNode() && toElement(node)->isTextFormControl(); |
148 } | 150 } |
149 | 151 |
150 inline HTMLTextFormControlElement* toHTMLTextFormControlElement(Node* node) | 152 inline Result<HTMLTextFormControlElement> toHTMLTextFormControlElement(Node* nod
e) |
151 { | 153 { |
152 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextFormControlElement(node)
); | 154 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextFormControlElement(node)
); |
153 return static_cast<HTMLTextFormControlElement*>(node); | 155 return Handle<HTMLTextFormControlElement>(static_cast<HTMLTextFormControlEle
ment*>(node)); |
154 } | 156 } |
155 | 157 |
156 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); | 158 Result<HTMLTextFormControlElement> enclosingTextFormControl(const Position&); |
157 | 159 |
158 } // namespace | 160 } // namespace |
159 | 161 |
160 #endif | 162 #endif |
OLD | NEW |