| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 } | 388 } |
| 389 | 389 |
| 390 void HTMLInputElement::handleBlurEvent() | 390 void HTMLInputElement::handleBlurEvent() |
| 391 { | 391 { |
| 392 m_inputType->disableSecureTextInput(); | 392 m_inputType->disableSecureTextInput(); |
| 393 m_inputTypeView->handleBlurEvent(); | 393 m_inputTypeView->handleBlurEvent(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void HTMLInputElement::setType(const AtomicString& type) | 396 void HTMLInputElement::setType(const AtomicString& type) |
| 397 { | 397 { |
| 398 // FIXME: This should just call setAttribute. No reason to handle the empty
string specially. | 398 setAttribute(typeAttr, type); |
| 399 // We should write a test case to show that setting to the empty string does
not remove the | |
| 400 // attribute in other browsers and then fix this. Note that setting to null
*does* remove | |
| 401 // the attribute and setAttribute implements that. | |
| 402 if (type.isEmpty()) | |
| 403 removeAttribute(typeAttr); | |
| 404 else | |
| 405 setAttribute(typeAttr, type); | |
| 406 } | 399 } |
| 407 | 400 |
| 408 void HTMLInputElement::updateType() | 401 void HTMLInputElement::updateType() |
| 409 { | 402 { |
| 410 const AtomicString& newTypeName = InputType::normalizeTypeName(fastGetAttrib
ute(typeAttr)); | 403 const AtomicString& newTypeName = InputType::normalizeTypeName(fastGetAttrib
ute(typeAttr)); |
| 411 bool hadType = m_hasType; | 404 bool hadType = m_hasType; |
| 412 m_hasType = true; | 405 m_hasType = true; |
| 413 if (m_inputType->formControlType() == newTypeName) | 406 if (m_inputType->formControlType() == newTypeName) |
| 414 return; | 407 return; |
| 415 | 408 |
| (...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 } | 1865 } |
| 1873 | 1866 |
| 1874 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1867 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1875 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1868 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1876 { | 1869 { |
| 1877 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1870 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1878 } | 1871 } |
| 1879 #endif | 1872 #endif |
| 1880 | 1873 |
| 1881 } // namespace | 1874 } // namespace |
| OLD | NEW |