| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 int WebInputElement::defaultMaxLength() | 136 int WebInputElement::defaultMaxLength() |
| 137 { | 137 { |
| 138 return HTMLInputElement::maximumLength; | 138 return HTMLInputElement::maximumLength; |
| 139 } | 139 } |
| 140 | 140 |
| 141 void WebInputElement::setShouldRevealPassword(bool value) | 141 void WebInputElement::setShouldRevealPassword(bool value) |
| 142 { | 142 { |
| 143 unwrap<HTMLInputElement>()->setShouldRevealPassword(value); | 143 unwrap<HTMLInputElement>()->setShouldRevealPassword(value); |
| 144 } | 144 } |
| 145 | 145 |
| 146 WebInputElement::WebInputElement(const PassRefPtrWillBeRawPtr<HTMLInputElement>&
elem) | 146 WebInputElement::WebInputElement(const RawPtr<HTMLInputElement>& elem) |
| 147 : WebFormControlElement(elem) | 147 : WebFormControlElement(elem) |
| 148 { | 148 { |
| 149 } | 149 } |
| 150 | 150 |
| 151 DEFINE_WEB_NODE_TYPE_CASTS(WebInputElement, isHTMLInputElement(constUnwrap<Node>
())); | 151 DEFINE_WEB_NODE_TYPE_CASTS(WebInputElement, isHTMLInputElement(constUnwrap<Node>
())); |
| 152 | 152 |
| 153 WebInputElement& WebInputElement::operator=(const PassRefPtrWillBeRawPtr<HTMLInp
utElement>& elem) | 153 WebInputElement& WebInputElement::operator=(const RawPtr<HTMLInputElement>& elem
) |
| 154 { | 154 { |
| 155 m_private = elem; | 155 m_private = elem; |
| 156 return *this; | 156 return *this; |
| 157 } | 157 } |
| 158 | 158 |
| 159 WebInputElement::operator PassRefPtrWillBeRawPtr<HTMLInputElement>() const | 159 WebInputElement::operator RawPtr<HTMLInputElement>() const |
| 160 { | 160 { |
| 161 return toHTMLInputElement(m_private.get()); | 161 return toHTMLInputElement(m_private.get()); |
| 162 } | 162 } |
| 163 | 163 |
| 164 WebInputElement* toWebInputElement(WebElement* webElement) | 164 WebInputElement* toWebInputElement(WebElement* webElement) |
| 165 { | 165 { |
| 166 if (!isHTMLInputElement(*webElement->unwrap<Element>())) | 166 if (!isHTMLInputElement(*webElement->unwrap<Element>())) |
| 167 return 0; | 167 return 0; |
| 168 | 168 |
| 169 return static_cast<WebInputElement*>(webElement); | 169 return static_cast<WebInputElement*>(webElement); |
| 170 } | 170 } |
| 171 } // namespace blink | 171 } // namespace blink |
| OLD | NEW |