| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 WebString WebFormControlElement::formControlType() const | 61 WebString WebFormControlElement::formControlType() const |
| 62 { | 62 { |
| 63 return constUnwrap<HTMLFormControlElement>()->type(); | 63 return constUnwrap<HTMLFormControlElement>()->type(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void WebFormControlElement::dispatchFormControlChangeEvent() | 66 void WebFormControlElement::dispatchFormControlChangeEvent() |
| 67 { | 67 { |
| 68 unwrap<HTMLFormControlElement>()->dispatchFormControlChangeEvent(); | 68 unwrap<HTMLFormControlElement>()->dispatchFormControlChangeEvent(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void WebFormControlElement::dispatchFormControlInputEvent() |
| 72 { |
| 73 unwrap<HTMLFormControlElement>()->dispatchFormControlInputEvent(); |
| 74 } |
| 75 |
| 71 bool WebFormControlElement::isAutofilled() const | 76 bool WebFormControlElement::isAutofilled() const |
| 72 { | 77 { |
| 73 return constUnwrap<HTMLFormControlElement>()->isAutofilled(); | 78 return constUnwrap<HTMLFormControlElement>()->isAutofilled(); |
| 74 } | 79 } |
| 75 | 80 |
| 76 void WebFormControlElement::setAutofilled(bool autofilled) | 81 void WebFormControlElement::setAutofilled(bool autofilled) |
| 77 { | 82 { |
| 78 unwrap<HTMLFormControlElement>()->setAutofilled(autofilled); | 83 unwrap<HTMLFormControlElement>()->setAutofilled(autofilled); |
| 79 } | 84 } |
| 80 | 85 |
| 81 WebString WebFormControlElement::nameForAutofill() const | 86 WebString WebFormControlElement::nameForAutofill() const |
| 82 { | 87 { |
| 83 return constUnwrap<HTMLFormControlElement>()->nameForAutofill(); | 88 return constUnwrap<HTMLFormControlElement>()->nameForAutofill(); |
| 84 } | 89 } |
| 85 | 90 |
| 86 bool WebFormControlElement::autoComplete() const | 91 bool WebFormControlElement::autoComplete() const |
| 87 { | 92 { |
| 88 if (isHTMLInputElement(*m_private)) | 93 if (isHTMLInputElement(*m_private)) |
| 89 return constUnwrap<HTMLInputElement>()->shouldAutocomplete(); | 94 return constUnwrap<HTMLInputElement>()->shouldAutocomplete(); |
| 90 if (isHTMLTextAreaElement(*m_private)) | 95 if (isHTMLTextAreaElement(*m_private)) |
| 91 return constUnwrap<HTMLTextAreaElement>()->shouldAutocomplete(); | 96 return constUnwrap<HTMLTextAreaElement>()->shouldAutocomplete(); |
| 92 return false; | 97 return false; |
| 93 } | 98 } |
| 94 | 99 |
| 95 void WebFormControlElement::setValue(const WebString& value, bool sendChangeEven
t) | 100 void WebFormControlElement::setValue(const WebString& value, bool sendEvents) |
| 96 { | 101 { |
| 97 if (isHTMLInputElement(*m_private)) | 102 if (isHTMLInputElement(*m_private)) |
| 98 unwrap<HTMLInputElement>()->setValue(value, sendChangeEvent ? DispatchCh
angeEvent : DispatchNoEvent); | 103 unwrap<HTMLInputElement>()->setValue(value, sendEvents ? DispatchInputAn
dChangeEvent : DispatchNoEvent); |
| 99 if (isHTMLTextAreaElement(*m_private)) | 104 if (isHTMLTextAreaElement(*m_private)) |
| 100 unwrap<HTMLTextAreaElement>()->setValue(value); | 105 unwrap<HTMLTextAreaElement>()->setValue(value); |
| 101 if (isHTMLSelectElement(*m_private)) | 106 if (isHTMLSelectElement(*m_private)) |
| 102 unwrap<HTMLSelectElement>()->setValue(value); | 107 unwrap<HTMLSelectElement>()->setValue(value); |
| 103 } | 108 } |
| 104 | 109 |
| 105 WebString WebFormControlElement::value() const | 110 WebString WebFormControlElement::value() const |
| 106 { | 111 { |
| 107 if (isHTMLInputElement(*m_private)) | 112 if (isHTMLInputElement(*m_private)) |
| 108 return constUnwrap<HTMLInputElement>()->value(); | 113 return constUnwrap<HTMLInputElement>()->value(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 m_private = elem; | 198 m_private = elem; |
| 194 return *this; | 199 return *this; |
| 195 } | 200 } |
| 196 | 201 |
| 197 WebFormControlElement::operator PassRefPtr<HTMLFormControlElement>() const | 202 WebFormControlElement::operator PassRefPtr<HTMLFormControlElement>() const |
| 198 { | 203 { |
| 199 return toHTMLFormControlElement(m_private.get()); | 204 return toHTMLFormControlElement(m_private.get()); |
| 200 } | 205 } |
| 201 | 206 |
| 202 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |