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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 // Need to remove form association while this is still an HTMLInputElement | 157 // Need to remove form association while this is still an HTMLInputElement |
158 // so that virtual functions are called correctly. | 158 // so that virtual functions are called correctly. |
159 setForm(0); | 159 setForm(0); |
160 // setForm(0) may register this to a document-level radio button group. | 160 // setForm(0) may register this to a document-level radio button group. |
161 // We should unregister it to avoid accessing a deleted object. | 161 // We should unregister it to avoid accessing a deleted object. |
162 if (isRadioButton()) | 162 if (isRadioButton()) |
163 document()->formController()->checkedRadioButtons().removeButton(this); | 163 document()->formController()->checkedRadioButtons().removeButton(this); |
164 #if ENABLE(TOUCH_EVENTS) | 164 #if ENABLE(TOUCH_EVENTS) |
165 if (m_hasTouchEventHandler) | 165 if (m_hasTouchEventHandler) |
166 document()->didRemoveTouchEventHandler(this); | 166 document()->didRemoveTouchEventHandler(); |
167 #endif | 167 #endif |
168 } | 168 } |
169 | 169 |
170 const AtomicString& HTMLInputElement::name() const | 170 const AtomicString& HTMLInputElement::name() const |
171 { | 171 { |
172 return m_name.isNull() ? emptyAtom : m_name; | 172 return m_name.isNull() ? emptyAtom : m_name; |
173 } | 173 } |
174 | 174 |
175 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState
(const FormControlState& state) | 175 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState
(const FormControlState& state) |
176 { | 176 { |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 bool didRespectHeightAndWidth = m_inputType->shouldRespectHeightAndWidthAttr
ibutes(); | 482 bool didRespectHeightAndWidth = m_inputType->shouldRespectHeightAndWidthAttr
ibutes(); |
483 | 483 |
484 m_inputType->destroyShadowSubtree(); | 484 m_inputType->destroyShadowSubtree(); |
485 m_inputType = newType.release(); | 485 m_inputType = newType.release(); |
486 m_inputType->createShadowSubtree(); | 486 m_inputType->createShadowSubtree(); |
487 | 487 |
488 #if ENABLE(TOUCH_EVENTS) | 488 #if ENABLE(TOUCH_EVENTS) |
489 bool hasTouchEventHandler = m_inputType->hasTouchEventHandler(); | 489 bool hasTouchEventHandler = m_inputType->hasTouchEventHandler(); |
490 if (hasTouchEventHandler != m_hasTouchEventHandler) { | 490 if (hasTouchEventHandler != m_hasTouchEventHandler) { |
491 if (hasTouchEventHandler) | 491 if (hasTouchEventHandler) |
492 document()->didAddTouchEventHandler(this); | 492 document()->didAddTouchEventHandler(); |
493 else | 493 else |
494 document()->didRemoveTouchEventHandler(this); | 494 document()->didRemoveTouchEventHandler(); |
495 m_hasTouchEventHandler = hasTouchEventHandler; | 495 m_hasTouchEventHandler = hasTouchEventHandler; |
496 } | 496 } |
497 #endif | 497 #endif |
498 | 498 |
499 setNeedsWillValidateCheck(); | 499 setNeedsWillValidateCheck(); |
500 | 500 |
501 bool willStoreValue = m_inputType->storesValueSeparateFromAttribute(); | 501 bool willStoreValue = m_inputType->storesValueSeparateFromAttribute(); |
502 | 502 |
503 if (didStoreValue && !willStoreValue && hasDirtyValue()) { | 503 if (didStoreValue && !willStoreValue && hasDirtyValue()) { |
504 setAttribute(valueAttr, m_valueIfDirty); | 504 setAttribute(valueAttr, m_valueIfDirty); |
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 info.addMember(m_name); | 1921 info.addMember(m_name); |
1922 info.addMember(m_valueIfDirty); | 1922 info.addMember(m_valueIfDirty); |
1923 info.addMember(m_suggestedValue); | 1923 info.addMember(m_suggestedValue); |
1924 info.addMember(m_inputType); | 1924 info.addMember(m_inputType); |
1925 #if ENABLE(DATALIST_ELEMENT) | 1925 #if ENABLE(DATALIST_ELEMENT) |
1926 info.addMember(m_listAttributeTargetObserver); | 1926 info.addMember(m_listAttributeTargetObserver); |
1927 #endif | 1927 #endif |
1928 } | 1928 } |
1929 | 1929 |
1930 } // namespace | 1930 } // namespace |
OLD | NEW |