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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 HTMLInputElement::~HTMLInputElement() | 161 HTMLInputElement::~HTMLInputElement() |
162 { | 162 { |
163 // Need to remove form association while this is still an HTMLInputElement | 163 // Need to remove form association while this is still an HTMLInputElement |
164 // so that virtual functions are called correctly. | 164 // so that virtual functions are called correctly. |
165 setForm(0); | 165 setForm(0); |
166 // setForm(0) may register this to a document-level radio button group. | 166 // setForm(0) may register this to a document-level radio button group. |
167 // We should unregister it to avoid accessing a deleted object. | 167 // We should unregister it to avoid accessing a deleted object. |
168 if (isRadioButton()) | 168 if (isRadioButton()) |
169 document().formController()->radioButtonGroupScope().removeButton(this); | 169 document().formController().radioButtonGroupScope().removeButton(this); |
170 if (m_hasTouchEventHandler) | 170 if (m_hasTouchEventHandler) |
171 document().didRemoveTouchEventHandler(this); | 171 document().didRemoveTouchEventHandler(this); |
172 } | 172 } |
173 | 173 |
174 const AtomicString& HTMLInputElement::name() const | 174 const AtomicString& HTMLInputElement::name() const |
175 { | 175 { |
176 return m_name.isNull() ? emptyAtom : m_name; | 176 return m_name.isNull() ? emptyAtom : m_name; |
177 } | 177 } |
178 | 178 |
179 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState
(const FormControlState& state) | 179 Vector<FileChooserFileInfo> HTMLInputElement::filesFromFileInputFormControlState
(const FormControlState& state) |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 ASSERT(!inDocument()); | 1426 ASSERT(!inDocument()); |
1427 resetListAttributeTargetObserver(); | 1427 resetListAttributeTargetObserver(); |
1428 } | 1428 } |
1429 | 1429 |
1430 void HTMLInputElement::didMoveToNewDocument(Document& oldDocument) | 1430 void HTMLInputElement::didMoveToNewDocument(Document& oldDocument) |
1431 { | 1431 { |
1432 if (hasImageLoader()) | 1432 if (hasImageLoader()) |
1433 imageLoader()->elementDidMoveToNewDocument(); | 1433 imageLoader()->elementDidMoveToNewDocument(); |
1434 | 1434 |
1435 if (isRadioButton()) | 1435 if (isRadioButton()) |
1436 oldDocument.formController()->radioButtonGroupScope().removeButton(this)
; | 1436 oldDocument.formController().radioButtonGroupScope().removeButton(this); |
1437 if (m_hasTouchEventHandler) | 1437 if (m_hasTouchEventHandler) |
1438 oldDocument.didRemoveTouchEventHandler(this); | 1438 oldDocument.didRemoveTouchEventHandler(this); |
1439 | 1439 |
1440 if (m_hasTouchEventHandler) | 1440 if (m_hasTouchEventHandler) |
1441 document().didAddTouchEventHandler(this); | 1441 document().didAddTouchEventHandler(this); |
1442 | 1442 |
1443 HTMLTextFormControlElement::didMoveToNewDocument(oldDocument); | 1443 HTMLTextFormControlElement::didMoveToNewDocument(oldDocument); |
1444 } | 1444 } |
1445 | 1445 |
1446 void HTMLInputElement::removeAllEventListeners() | 1446 void HTMLInputElement::removeAllEventListeners() |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1719 return 0; | 1719 return 0; |
1720 } | 1720 } |
1721 | 1721 |
1722 RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const | 1722 RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const |
1723 { | 1723 { |
1724 if (!isRadioButton()) | 1724 if (!isRadioButton()) |
1725 return 0; | 1725 return 0; |
1726 if (HTMLFormElement* formElement = form()) | 1726 if (HTMLFormElement* formElement = form()) |
1727 return &formElement->radioButtonGroupScope(); | 1727 return &formElement->radioButtonGroupScope(); |
1728 if (inDocument()) | 1728 if (inDocument()) |
1729 return &document().formController()->radioButtonGroupScope(); | 1729 return &document().formController().radioButtonGroupScope(); |
1730 return 0; | 1730 return 0; |
1731 } | 1731 } |
1732 | 1732 |
1733 inline void HTMLInputElement::addToRadioButtonGroup() | 1733 inline void HTMLInputElement::addToRadioButtonGroup() |
1734 { | 1734 { |
1735 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) | 1735 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) |
1736 scope->addButton(this); | 1736 scope->addButton(this); |
1737 } | 1737 } |
1738 | 1738 |
1739 inline void HTMLInputElement::removeFromRadioButtonGroup() | 1739 inline void HTMLInputElement::removeFromRadioButtonGroup() |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 } | 1868 } |
1869 | 1869 |
1870 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1870 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
1871 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1871 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
1872 { | 1872 { |
1873 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1873 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
1874 } | 1874 } |
1875 #endif | 1875 #endif |
1876 | 1876 |
1877 } // namespace | 1877 } // namespace |
OLD | NEW |