| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void WebInputElement::setPlaceholder(const WebString& value) | 135 void WebInputElement::setPlaceholder(const WebString& value) |
| 136 { | 136 { |
| 137 unwrap<HTMLInputElement>()->setAttribute(HTMLNames::placeholderAttr, value); | 137 unwrap<HTMLInputElement>()->setAttribute(HTMLNames::placeholderAttr, value); |
| 138 } | 138 } |
| 139 | 139 |
| 140 WebString WebInputElement::placeholder() const | 140 WebString WebInputElement::placeholder() const |
| 141 { | 141 { |
| 142 return constUnwrap<HTMLInputElement>()->fastGetAttribute(HTMLNames::placehol
derAttr); | 142 return constUnwrap<HTMLInputElement>()->fastGetAttribute(HTMLNames::placehol
derAttr); |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool WebInputElement::isAutofilled() const | |
| 146 { | |
| 147 return constUnwrap<HTMLInputElement>()->isAutofilled(); | |
| 148 } | |
| 149 | |
| 150 void WebInputElement::setAutofilled(bool autofilled) | |
| 151 { | |
| 152 unwrap<HTMLInputElement>()->setAutofilled(autofilled); | |
| 153 } | |
| 154 | |
| 155 void WebInputElement::setSelectionRange(int start, int end) | 145 void WebInputElement::setSelectionRange(int start, int end) |
| 156 { | 146 { |
| 157 unwrap<HTMLInputElement>()->setSelectionRange(start, end); | 147 unwrap<HTMLInputElement>()->setSelectionRange(start, end); |
| 158 } | 148 } |
| 159 | 149 |
| 160 int WebInputElement::selectionStart() const | 150 int WebInputElement::selectionStart() const |
| 161 { | 151 { |
| 162 return constUnwrap<HTMLInputElement>()->selectionStart(); | 152 return constUnwrap<HTMLInputElement>()->selectionStart(); |
| 163 } | 153 } |
| 164 | 154 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 271 } |
| 282 | 272 |
| 283 WebInputElement* toWebInputElement(WebElement* webElement) | 273 WebInputElement* toWebInputElement(WebElement* webElement) |
| 284 { | 274 { |
| 285 if (!webElement->unwrap<Element>()->hasTagName(HTMLNames::inputTag)) | 275 if (!webElement->unwrap<Element>()->hasTagName(HTMLNames::inputTag)) |
| 286 return 0; | 276 return 0; |
| 287 | 277 |
| 288 return static_cast<WebInputElement*>(webElement); | 278 return static_cast<WebInputElement*>(webElement); |
| 289 } | 279 } |
| 290 } // namespace WebKit | 280 } // namespace WebKit |
| OLD | NEW |