OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 { | 76 { |
77 return constUnwrap<HTMLFormControlElement>()->nameForAutofill(); | 77 return constUnwrap<HTMLFormControlElement>()->nameForAutofill(); |
78 } | 78 } |
79 | 79 |
80 bool WebFormControlElement::autoComplete() const | 80 bool WebFormControlElement::autoComplete() const |
81 { | 81 { |
82 if (isHTMLInputElement(*m_private)) | 82 if (isHTMLInputElement(*m_private)) |
83 return constUnwrap<HTMLInputElement>()->shouldAutocomplete(); | 83 return constUnwrap<HTMLInputElement>()->shouldAutocomplete(); |
84 if (isHTMLTextAreaElement(*m_private)) | 84 if (isHTMLTextAreaElement(*m_private)) |
85 return constUnwrap<HTMLTextAreaElement>()->shouldAutocomplete(); | 85 return constUnwrap<HTMLTextAreaElement>()->shouldAutocomplete(); |
| 86 if (isHTMLSelectElement(*m_private)) |
| 87 return constUnwrap<HTMLSelectElement>()->shouldAutocomplete(); |
86 return false; | 88 return false; |
87 } | 89 } |
88 | 90 |
89 void WebFormControlElement::setValue(const WebString& value, bool sendEvents) | 91 void WebFormControlElement::setValue(const WebString& value, bool sendEvents) |
90 { | 92 { |
91 if (isHTMLInputElement(*m_private)) | 93 if (isHTMLInputElement(*m_private)) |
92 unwrap<HTMLInputElement>()->setValue(value, sendEvents ? DispatchInputAn
dChangeEvent : DispatchNoEvent); | 94 unwrap<HTMLInputElement>()->setValue(value, sendEvents ? DispatchInputAn
dChangeEvent : DispatchNoEvent); |
93 else if (isHTMLTextAreaElement(*m_private)) | 95 else if (isHTMLTextAreaElement(*m_private)) |
94 unwrap<HTMLTextAreaElement>()->setValue(value, sendEvents ? DispatchInpu
tAndChangeEvent : DispatchNoEvent); | 96 unwrap<HTMLTextAreaElement>()->setValue(value, sendEvents ? DispatchInpu
tAndChangeEvent : DispatchNoEvent); |
95 else if (isHTMLSelectElement(*m_private)) | 97 else if (isHTMLSelectElement(*m_private)) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 m_private = elem; | 189 m_private = elem; |
188 return *this; | 190 return *this; |
189 } | 191 } |
190 | 192 |
191 WebFormControlElement::operator PassRefPtrWillBeRawPtr<HTMLFormControlElement>()
const | 193 WebFormControlElement::operator PassRefPtrWillBeRawPtr<HTMLFormControlElement>()
const |
192 { | 194 { |
193 return toHTMLFormControlElement(m_private.get()); | 195 return toHTMLFormControlElement(m_private.get()); |
194 } | 196 } |
195 | 197 |
196 } // namespace blink | 198 } // namespace blink |
OLD | NEW |