OLD | NEW |
---|---|
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 19 matching lines...) Expand all Loading... | |
30 | 30 |
31 #ifndef WebInputElement_h | 31 #ifndef WebInputElement_h |
32 #define WebInputElement_h | 32 #define WebInputElement_h |
33 | 33 |
34 #include "WebFormControlElement.h" | 34 #include "WebFormControlElement.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class HTMLInputElement; | 38 class HTMLInputElement; |
39 class WebElementCollection; | 39 class WebElementCollection; |
40 class WebOptionElement; | |
40 | 41 |
41 // Provides readonly access to some properties of a DOM input element node. | 42 // Provides readonly access to some properties of a DOM input element node. |
42 class WebInputElement final : public WebFormControlElement { | 43 class WebInputElement final : public WebFormControlElement { |
43 public: | 44 public: |
44 WebInputElement() : WebFormControlElement() { } | 45 WebInputElement() : WebFormControlElement() { } |
45 WebInputElement(const WebInputElement& element) : WebFormControlElement(elem ent) { } | 46 WebInputElement(const WebInputElement& element) : WebFormControlElement(elem ent) { } |
46 | 47 |
47 WebInputElement& operator=(const WebInputElement& element) | 48 WebInputElement& operator=(const WebInputElement& element) |
48 { | 49 { |
49 WebFormControlElement::assign(element); | 50 WebFormControlElement::assign(element); |
(...skipping 19 matching lines...) Expand all Loading... | |
69 BLINK_EXPORT int size() const; | 70 BLINK_EXPORT int size() const; |
70 BLINK_EXPORT void setChecked(bool, bool sendEvents = false); | 71 BLINK_EXPORT void setChecked(bool, bool sendEvents = false); |
71 // Sets the value inside the text field without being sanitized. Can't be | 72 // Sets the value inside the text field without being sanitized. Can't be |
72 // used if a renderer doesn't exist or on a non text field type. Caret will | 73 // used if a renderer doesn't exist or on a non text field type. Caret will |
73 // be moved to the end. | 74 // be moved to the end. |
74 BLINK_EXPORT void setEditingValue(const WebString&); | 75 BLINK_EXPORT void setEditingValue(const WebString&); |
75 BLINK_EXPORT bool isValidValue(const WebString&) const; | 76 BLINK_EXPORT bool isValidValue(const WebString&) const; |
76 BLINK_EXPORT bool isChecked() const; | 77 BLINK_EXPORT bool isChecked() const; |
77 BLINK_EXPORT bool isMultiple() const; | 78 BLINK_EXPORT bool isMultiple() const; |
78 | 79 |
79 BLINK_EXPORT WebElementCollection dataListOptions() const; | 80 // Associated <datalsit> options which match to the current INPUT value. |
vabr (Chromium)
2016/07/26 12:05:03
typo: datalsit -> datalist
| |
81 BLINK_EXPORT WebVector<WebOptionElement> filteredDataListOptions() const; | |
80 | 82 |
81 // Return the localized value for this input type. | 83 // Return the localized value for this input type. |
82 BLINK_EXPORT WebString localizeValue(const WebString&) const; | 84 BLINK_EXPORT WebString localizeValue(const WebString&) const; |
83 | 85 |
84 // Exposes the default value of the maxLength attribute. | 86 // Exposes the default value of the maxLength attribute. |
85 BLINK_EXPORT static int defaultMaxLength(); | 87 BLINK_EXPORT static int defaultMaxLength(); |
86 | 88 |
87 // If true, forces the text of the element to be visible. | 89 // If true, forces the text of the element to be visible. |
88 BLINK_EXPORT void setShouldRevealPassword(bool value); | 90 BLINK_EXPORT void setShouldRevealPassword(bool value); |
89 | 91 |
(...skipping 10 matching lines...) Expand all Loading... | |
100 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*); | 102 BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*); |
101 // This returns 0 if the specified WebElement is not a WebInputElement. | 103 // This returns 0 if the specified WebElement is not a WebInputElement. |
102 inline const WebInputElement* toWebInputElement(const WebElement* element) | 104 inline const WebInputElement* toWebInputElement(const WebElement* element) |
103 { | 105 { |
104 return toWebInputElement(const_cast<WebElement*>(element)); | 106 return toWebInputElement(const_cast<WebElement*>(element)); |
105 } | 107 } |
106 | 108 |
107 } // namespace blink | 109 } // namespace blink |
108 | 110 |
109 #endif | 111 #endif |
OLD | NEW |