| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 const AtomicString& newTypeName = InputType::normalizeTypeName(fastGetAttrib
ute(typeAttr)); | 448 const AtomicString& newTypeName = InputType::normalizeTypeName(fastGetAttrib
ute(typeAttr)); |
| 449 m_inputType = InputType::create(*this, newTypeName); | 449 m_inputType = InputType::create(*this, newTypeName); |
| 450 m_inputTypeView = m_inputType; | 450 m_inputTypeView = m_inputType; |
| 451 ensureUserAgentShadowRoot(); | 451 ensureUserAgentShadowRoot(); |
| 452 | 452 |
| 453 updateTouchEventHandlerRegistry(); | 453 updateTouchEventHandlerRegistry(); |
| 454 | 454 |
| 455 setNeedsWillValidateCheck(); | 455 setNeedsWillValidateCheck(); |
| 456 | 456 |
| 457 m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).string()); | 457 m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).getString()); |
| 458 | 458 |
| 459 m_inputTypeView->updateView(); | 459 m_inputTypeView->updateView(); |
| 460 setTextAsOfLastFormControlChangeEvent(value()); | 460 setTextAsOfLastFormControlChangeEvent(value()); |
| 461 setChangedSinceLastFormControlChangeEvent(false); | 461 setChangedSinceLastFormControlChangeEvent(false); |
| 462 } | 462 } |
| 463 | 463 |
| 464 void HTMLInputElement::updateType() | 464 void HTMLInputElement::updateType() |
| 465 { | 465 { |
| 466 ASSERT(m_inputType); | 466 ASSERT(m_inputType); |
| 467 ASSERT(m_inputTypeView); | 467 ASSERT(m_inputTypeView); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 496 if (didStoreValue && !willStoreValue && hasDirtyValue()) { | 496 if (didStoreValue && !willStoreValue && hasDirtyValue()) { |
| 497 setAttribute(valueAttr, AtomicString(m_valueIfDirty)); | 497 setAttribute(valueAttr, AtomicString(m_valueIfDirty)); |
| 498 m_valueIfDirty = String(); | 498 m_valueIfDirty = String(); |
| 499 } | 499 } |
| 500 if (!didStoreValue && willStoreValue) { | 500 if (!didStoreValue && willStoreValue) { |
| 501 AtomicString valueString = fastGetAttribute(valueAttr); | 501 AtomicString valueString = fastGetAttribute(valueAttr); |
| 502 m_inputType->warnIfValueIsInvalid(valueString); | 502 m_inputType->warnIfValueIsInvalid(valueString); |
| 503 m_valueIfDirty = sanitizeValue(valueString); | 503 m_valueIfDirty = sanitizeValue(valueString); |
| 504 } else { | 504 } else { |
| 505 if (!hasDirtyValue()) | 505 if (!hasDirtyValue()) |
| 506 m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).string
()); | 506 m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).getStr
ing()); |
| 507 updateValueIfNeeded(); | 507 updateValueIfNeeded(); |
| 508 } | 508 } |
| 509 | 509 |
| 510 m_needsToUpdateViewValue = true; | 510 m_needsToUpdateViewValue = true; |
| 511 m_inputTypeView->updateView(); | 511 m_inputTypeView->updateView(); |
| 512 | 512 |
| 513 if (didRespectHeightAndWidth != m_inputType->shouldRespectHeightAndWidthAttr
ibutes()) { | 513 if (didRespectHeightAndWidth != m_inputType->shouldRespectHeightAndWidthAttr
ibutes()) { |
| 514 ASSERT(elementData()); | 514 ASSERT(elementData()); |
| 515 AttributeCollection attributes = attributesWithoutUpdate(); | 515 AttributeCollection attributes = attributesWithoutUpdate(); |
| 516 if (const Attribute* height = attributes.find(heightAttr)) | 516 if (const Attribute* height = attributes.find(heightAttr)) |
| (...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 void HTMLInputElement::ensurePrimaryContent() | 1945 void HTMLInputElement::ensurePrimaryContent() |
| 1946 { | 1946 { |
| 1947 m_inputTypeView->ensurePrimaryContent(); | 1947 m_inputTypeView->ensurePrimaryContent(); |
| 1948 } | 1948 } |
| 1949 | 1949 |
| 1950 bool HTMLInputElement::hasFallbackContent() const | 1950 bool HTMLInputElement::hasFallbackContent() const |
| 1951 { | 1951 { |
| 1952 return m_inputTypeView->hasFallbackContent(); | 1952 return m_inputTypeView->hasFallbackContent(); |
| 1953 } | 1953 } |
| 1954 } // namespace blink | 1954 } // namespace blink |
| OLD | NEW |