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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (isHTMLInputElement(*m_private)) | 155 if (isHTMLInputElement(*m_private)) |
156 return constUnwrap<HTMLInputElement>()->innerEditorValue(); | 156 return constUnwrap<HTMLInputElement>()->innerEditorValue(); |
157 if (isHTMLTextAreaElement(*m_private)) | 157 if (isHTMLTextAreaElement(*m_private)) |
158 return constUnwrap<HTMLTextAreaElement>()->innerEditorValue(); | 158 return constUnwrap<HTMLTextAreaElement>()->innerEditorValue(); |
159 return WebString(); | 159 return WebString(); |
160 } | 160 } |
161 | 161 |
162 void WebFormControlElement::setSelectionRange(int start, int end) | 162 void WebFormControlElement::setSelectionRange(int start, int end) |
163 { | 163 { |
164 if (isHTMLInputElement(*m_private)) | 164 if (isHTMLInputElement(*m_private)) |
165 unwrap<HTMLInputElement>()->setSelectionRange(start, end, SelectionHasNo
Direction, NotDispatchSelectEvent); | 165 unwrap<HTMLInputElement>()->setSelectionRange(start, end); |
166 else if (isHTMLTextAreaElement(*m_private)) | 166 else if (isHTMLTextAreaElement(*m_private)) |
167 unwrap<HTMLTextAreaElement>()->setSelectionRange(start, end, SelectionHa
sNoDirection, NotDispatchSelectEvent); | 167 unwrap<HTMLTextAreaElement>()->setSelectionRange(start, end); |
168 } | 168 } |
169 | 169 |
170 int WebFormControlElement::selectionStart() const | 170 int WebFormControlElement::selectionStart() const |
171 { | 171 { |
172 if (isHTMLInputElement(*m_private)) | 172 if (isHTMLInputElement(*m_private)) |
173 return constUnwrap<HTMLInputElement>()->selectionStart(); | 173 return constUnwrap<HTMLInputElement>()->selectionStart(); |
174 if (isHTMLTextAreaElement(*m_private)) | 174 if (isHTMLTextAreaElement(*m_private)) |
175 return constUnwrap<HTMLTextAreaElement>()->selectionStart(); | 175 return constUnwrap<HTMLTextAreaElement>()->selectionStart(); |
176 return 0; | 176 return 0; |
177 } | 177 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 m_private = elem; | 221 m_private = elem; |
222 return *this; | 222 return *this; |
223 } | 223 } |
224 | 224 |
225 WebFormControlElement::operator HTMLFormControlElement*() const | 225 WebFormControlElement::operator HTMLFormControlElement*() const |
226 { | 226 { |
227 return toHTMLFormControlElement(m_private.get()); | 227 return toHTMLFormControlElement(m_private.get()); |
228 } | 228 } |
229 | 229 |
230 } // namespace blink | 230 } // namespace blink |
OLD | NEW |