Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/Source/web/WebFormControlElement.cpp

Issue 2268893008: Remove NeedToDispatchSelectEvent argument of HTMLTextFormControlElement::setSelectedRange(). (Closed)
Patch Set: Remove NeedToDispatchSelectEvent argument of HTMLTextFormControlElement::setSelectedRange(). Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698