| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "WebInputElement.h" | 32 #include "WebInputElement.h" |
| 33 | 33 |
| 34 #include "HTMLNames.h" | 34 #include "HTMLNames.h" |
| 35 #include "RuntimeEnabledFeatures.h" | 35 #include "RuntimeEnabledFeatures.h" |
| 36 #include "WebNodeCollection.h" | 36 #include "WebElementCollection.h" |
| 37 #include "core/dom/shadow/ElementShadow.h" | 37 #include "core/dom/shadow/ElementShadow.h" |
| 38 #include "core/dom/shadow/ShadowRoot.h" | 38 #include "core/dom/shadow/ShadowRoot.h" |
| 39 #include "core/html/HTMLDataListElement.h" | 39 #include "core/html/HTMLDataListElement.h" |
| 40 #include "core/html/HTMLInputElement.h" | 40 #include "core/html/HTMLInputElement.h" |
| 41 #include "core/html/shadow/ShadowElementNames.h" | 41 #include "core/html/shadow/ShadowElementNames.h" |
| 42 #include "core/html/shadow/TextControlInnerElements.h" | 42 #include "core/html/shadow/TextControlInnerElements.h" |
| 43 #include "public/platform/WebString.h" | 43 #include "public/platform/WebString.h" |
| 44 #include "wtf/PassRefPtr.h" | 44 #include "wtf/PassRefPtr.h" |
| 45 | 45 |
| 46 using namespace WebCore; | 46 using namespace WebCore; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 bool WebInputElement::isChecked() const | 160 bool WebInputElement::isChecked() const |
| 161 { | 161 { |
| 162 return constUnwrap<HTMLInputElement>()->checked(); | 162 return constUnwrap<HTMLInputElement>()->checked(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool WebInputElement::isMultiple() const | 165 bool WebInputElement::isMultiple() const |
| 166 { | 166 { |
| 167 return constUnwrap<HTMLInputElement>()->multiple(); | 167 return constUnwrap<HTMLInputElement>()->multiple(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 WebNodeCollection WebInputElement::dataListOptions() const | 170 WebElementCollection WebInputElement::dataListOptions() const |
| 171 { | 171 { |
| 172 if (RuntimeEnabledFeatures::dataListElementEnabled()) { | 172 if (RuntimeEnabledFeatures::dataListElementEnabled()) { |
| 173 if (HTMLDataListElement* dataList = toHTMLDataListElement(constUnwrap<HT
MLInputElement>()->list())) | 173 if (HTMLDataListElement* dataList = toHTMLDataListElement(constUnwrap<HT
MLInputElement>()->list())) |
| 174 return WebNodeCollection(dataList->options()); | 174 return WebElementCollection(dataList->options()); |
| 175 } | 175 } |
| 176 return WebNodeCollection(); | 176 return WebElementCollection(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 WebString WebInputElement::localizeValue(const WebString& proposedValue) const | 179 WebString WebInputElement::localizeValue(const WebString& proposedValue) const |
| 180 { | 180 { |
| 181 return constUnwrap<HTMLInputElement>()->localizeValue(proposedValue); | 181 return constUnwrap<HTMLInputElement>()->localizeValue(proposedValue); |
| 182 } | 182 } |
| 183 | 183 |
| 184 bool WebInputElement::isSpeechInputEnabled() const | 184 bool WebInputElement::isSpeechInputEnabled() const |
| 185 { | 185 { |
| 186 #if ENABLE(INPUT_SPEECH) | 186 #if ENABLE(INPUT_SPEECH) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 266 } |
| 267 | 267 |
| 268 WebInputElement* toWebInputElement(WebElement* webElement) | 268 WebInputElement* toWebInputElement(WebElement* webElement) |
| 269 { | 269 { |
| 270 if (!webElement->unwrap<Element>()->hasTagName(HTMLNames::inputTag)) | 270 if (!webElement->unwrap<Element>()->hasTagName(HTMLNames::inputTag)) |
| 271 return 0; | 271 return 0; |
| 272 | 272 |
| 273 return static_cast<WebInputElement*>(webElement); | 273 return static_cast<WebInputElement*>(webElement); |
| 274 } | 274 } |
| 275 } // namespace blink | 275 } // namespace blink |
| OLD | NEW |