| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 return constUnwrap<HTMLSelectElement>()->value(); | 112 return constUnwrap<HTMLSelectElement>()->value(); |
| 113 return WebString(); | 113 return WebString(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void WebFormControlElement::setSuggestedValue(const WebString& value) | 116 void WebFormControlElement::setSuggestedValue(const WebString& value) |
| 117 { | 117 { |
| 118 if (isHTMLInputElement(*m_private)) | 118 if (isHTMLInputElement(*m_private)) |
| 119 unwrap<HTMLInputElement>()->setSuggestedValue(value); | 119 unwrap<HTMLInputElement>()->setSuggestedValue(value); |
| 120 if (isHTMLTextAreaElement(*m_private)) | 120 if (isHTMLTextAreaElement(*m_private)) |
| 121 unwrap<HTMLTextAreaElement>()->setSuggestedValue(value); | 121 unwrap<HTMLTextAreaElement>()->setSuggestedValue(value); |
| 122 if (isHTMLSelectElement(*m_private)) |
| 123 unwrap<HTMLSelectElement>()->setSuggestedValue(value); |
| 122 } | 124 } |
| 123 | 125 |
| 124 WebString WebFormControlElement::suggestedValue() const | 126 WebString WebFormControlElement::suggestedValue() const |
| 125 { | 127 { |
| 126 if (isHTMLInputElement(*m_private)) | 128 if (isHTMLInputElement(*m_private)) |
| 127 return constUnwrap<HTMLInputElement>()->suggestedValue(); | 129 return constUnwrap<HTMLInputElement>()->suggestedValue(); |
| 128 if (isHTMLTextAreaElement(*m_private)) | 130 if (isHTMLTextAreaElement(*m_private)) |
| 129 return constUnwrap<HTMLTextAreaElement>()->suggestedValue(); | 131 return constUnwrap<HTMLTextAreaElement>()->suggestedValue(); |
| 132 if (isHTMLSelectElement(*m_private)) |
| 133 return constUnwrap<HTMLSelectElement>()->suggestedValue(); |
| 130 return WebString(); | 134 return WebString(); |
| 131 } | 135 } |
| 132 | 136 |
| 133 WebString WebFormControlElement::editingValue() const | 137 WebString WebFormControlElement::editingValue() const |
| 134 { | 138 { |
| 135 if (isHTMLInputElement(*m_private)) | 139 if (isHTMLInputElement(*m_private)) |
| 136 return constUnwrap<HTMLInputElement>()->innerTextValue(); | 140 return constUnwrap<HTMLInputElement>()->innerTextValue(); |
| 137 if (isHTMLTextAreaElement(*m_private)) | 141 if (isHTMLTextAreaElement(*m_private)) |
| 138 return constUnwrap<HTMLTextAreaElement>()->innerTextValue(); | 142 return constUnwrap<HTMLTextAreaElement>()->innerTextValue(); |
| 139 return WebString(); | 143 return WebString(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 m_private = elem; | 193 m_private = elem; |
| 190 return *this; | 194 return *this; |
| 191 } | 195 } |
| 192 | 196 |
| 193 WebFormControlElement::operator PassRefPtr<HTMLFormControlElement>() const | 197 WebFormControlElement::operator PassRefPtr<HTMLFormControlElement>() const |
| 194 { | 198 { |
| 195 return toHTMLFormControlElement(m_private.get()); | 199 return toHTMLFormControlElement(m_private.get()); |
| 196 } | 200 } |
| 197 | 201 |
| 198 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |