Chromium Code Reviews| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 return constUnwrap<HTMLInputElement>()->checked(); | 183 return constUnwrap<HTMLInputElement>()->checked(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 bool WebInputElement::isMultiple() const | 186 bool WebInputElement::isMultiple() const |
| 187 { | 187 { |
| 188 return constUnwrap<HTMLInputElement>()->multiple(); | 188 return constUnwrap<HTMLInputElement>()->multiple(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 WebNodeCollection WebInputElement::dataListOptions() const | 191 WebNodeCollection WebInputElement::dataListOptions() const |
| 192 { | 192 { |
| 193 #if ENABLE(DATALIST_ELEMENT) | |
| 194 HTMLDataListElement* dataList = static_cast<HTMLDataListElement*>(constUnwra p<HTMLInputElement>()->list()); | 193 HTMLDataListElement* dataList = static_cast<HTMLDataListElement*>(constUnwra p<HTMLInputElement>()->list()); |
|
tkent
2013/05/20 21:32:11
This function should refer to the runtime flag.
| |
| 195 if (dataList) | 194 if (dataList) |
| 196 return WebNodeCollection(dataList->options()); | 195 return WebNodeCollection(dataList->options()); |
| 197 #endif | |
| 198 return WebNodeCollection(); | |
| 199 } | 196 } |
| 200 | 197 |
| 201 WebString WebInputElement::localizeValue(const WebString& proposedValue) const | 198 WebString WebInputElement::localizeValue(const WebString& proposedValue) const |
| 202 { | 199 { |
| 203 return constUnwrap<HTMLInputElement>()->localizeValue(proposedValue); | 200 return constUnwrap<HTMLInputElement>()->localizeValue(proposedValue); |
| 204 } | 201 } |
| 205 | 202 |
| 206 bool WebInputElement::isSpeechInputEnabled() const | 203 bool WebInputElement::isSpeechInputEnabled() const |
| 207 { | 204 { |
| 208 #if ENABLE(INPUT_SPEECH) | 205 #if ENABLE(INPUT_SPEECH) |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 | 273 |
| 277 WebInputElement* toWebInputElement(WebElement* webElement) | 274 WebInputElement* toWebInputElement(WebElement* webElement) |
| 278 { | 275 { |
| 279 HTMLInputElement* inputElement = webElement->unwrap<Element>()->toInputEleme nt(); | 276 HTMLInputElement* inputElement = webElement->unwrap<Element>()->toInputEleme nt(); |
| 280 if (!inputElement) | 277 if (!inputElement) |
| 281 return 0; | 278 return 0; |
| 282 | 279 |
| 283 return static_cast<WebInputElement*>(webElement); | 280 return static_cast<WebInputElement*>(webElement); |
| 284 } | 281 } |
| 285 } // namespace WebKit | 282 } // namespace WebKit |
| OLD | NEW |