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

Side by Side Diff: Source/web/WebInputElement.cpp

Issue 225853005: Add support for setting password value gated on user's gesture in a page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/web/WebViewImpl.cpp » ('j') | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 WebElement WebInputElement::passwordGeneratorButtonElement() const 190 WebElement WebInputElement::passwordGeneratorButtonElement() const
191 { 191 {
192 return WebElement(constUnwrap<HTMLInputElement>()->passwordGeneratorButtonEl ement()); 192 return WebElement(constUnwrap<HTMLInputElement>()->passwordGeneratorButtonEl ement());
193 } 193 }
194 194
195 void WebInputElement::setShouldRevealPassword(bool value) 195 void WebInputElement::setShouldRevealPassword(bool value)
196 { 196 {
197 unwrap<HTMLInputElement>()->setShouldRevealPassword(value); 197 unwrap<HTMLInputElement>()->setShouldRevealPassword(value);
198 } 198 }
199 199
200 void WebInputElement::setValueAfterUserGesture(const WebString& value)
201 {
202 unwrap<HTMLInputElement>()->setValueAfterUserGesture(value);
203 }
204
200 WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) 205 WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
201 : WebFormControlElement(elem) 206 : WebFormControlElement(elem)
202 { 207 {
203 } 208 }
204 209
205 WebInputElement& WebInputElement::operator=(const PassRefPtr<HTMLInputElement>& elem) 210 WebInputElement& WebInputElement::operator=(const PassRefPtr<HTMLInputElement>& elem)
206 { 211 {
207 m_private = elem; 212 m_private = elem;
208 return *this; 213 return *this;
209 } 214 }
210 215
211 WebInputElement::operator PassRefPtr<HTMLInputElement>() const 216 WebInputElement::operator PassRefPtr<HTMLInputElement>() const
212 { 217 {
213 return toHTMLInputElement(m_private.get()); 218 return toHTMLInputElement(m_private.get());
214 } 219 }
215 220
216 WebInputElement* toWebInputElement(WebElement* webElement) 221 WebInputElement* toWebInputElement(WebElement* webElement)
217 { 222 {
218 if (!isHTMLInputElement(*webElement->unwrap<Element>())) 223 if (!isHTMLInputElement(*webElement->unwrap<Element>()))
219 return 0; 224 return 0;
220 225
221 return static_cast<WebInputElement*>(webElement); 226 return static_cast<WebInputElement*>(webElement);
222 } 227 }
223 } // namespace blink 228 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698