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

Side by Side Diff: public/web/WebInputElement.h

Issue 375313002: Expose isEmailField() for input element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | « Source/web/WebInputElement.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) 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 WebFormControlElement::assign(element); 52 WebFormControlElement::assign(element);
53 return *this; 53 return *this;
54 } 54 }
55 void assign(const WebInputElement& element) { WebFormControlElement::ass ign(element); } 55 void assign(const WebInputElement& element) { WebFormControlElement::ass ign(element); }
56 56
57 // This returns true for all of textfield-looking types such as text, 57 // This returns true for all of textfield-looking types such as text,
58 // password, search, email, url, and number. 58 // password, search, email, url, and number.
59 BLINK_EXPORT bool isTextField() const; 59 BLINK_EXPORT bool isTextField() const;
60 // This returns true only for type=text. 60 // This returns true only for type=text.
61 BLINK_EXPORT bool isText() const; 61 BLINK_EXPORT bool isText() const;
62 BLINK_EXPORT bool isEmailField() const;
62 BLINK_EXPORT bool isPasswordField() const; 63 BLINK_EXPORT bool isPasswordField() const;
63 BLINK_EXPORT bool isImageButton() const; 64 BLINK_EXPORT bool isImageButton() const;
64 BLINK_EXPORT bool isRadioButton() const; 65 BLINK_EXPORT bool isRadioButton() const;
65 BLINK_EXPORT bool isCheckbox() const; 66 BLINK_EXPORT bool isCheckbox() const;
66 BLINK_EXPORT int maxLength() const; 67 BLINK_EXPORT int maxLength() const;
67 BLINK_EXPORT void setActivatedSubmit(bool); 68 BLINK_EXPORT void setActivatedSubmit(bool);
68 BLINK_EXPORT int size() const; 69 BLINK_EXPORT int size() const;
69 BLINK_EXPORT void setChecked(bool, bool sendEvents = false); 70 BLINK_EXPORT void setChecked(bool, bool sendEvents = false);
70 // Sets the value inside the text field without being sanitized. 71 // Sets the value inside the text field without being sanitized.
71 // Can't be used if a renderer doesn't exist or on a non text field type . 72 // Can't be used if a renderer doesn't exist or on a non text field type .
(...skipping 24 matching lines...) Expand all
96 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*); 97 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*);
97 98
98 inline const WebInputElement* toWebInputElement(const WebElement* element) 99 inline const WebInputElement* toWebInputElement(const WebElement* element)
99 { 100 {
100 return toWebInputElement(const_cast<WebElement*>(element)); 101 return toWebInputElement(const_cast<WebElement*>(element));
101 } 102 }
102 103
103 } // namespace blink 104 } // namespace blink
104 105
105 #endif 106 #endif
OLDNEW
« no previous file with comments | « Source/web/WebInputElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698