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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // this, even when just clicking in the text field. | 97 // this, even when just clicking in the text field. |
98 const int HTMLInputElement::maximumLength = 524288; | 98 const int HTMLInputElement::maximumLength = 524288; |
99 const int defaultSize = 20; | 99 const int defaultSize = 20; |
100 const int maxSavedResults = 256; | 100 const int maxSavedResults = 256; |
101 | 101 |
102 HTMLInputElement::HTMLInputElement(Document& document, HTMLFormElement* form, bo
ol createdByParser) | 102 HTMLInputElement::HTMLInputElement(Document& document, HTMLFormElement* form, bo
ol createdByParser) |
103 : HTMLTextFormControlElement(inputTag, document, form) | 103 : HTMLTextFormControlElement(inputTag, document, form) |
104 , m_size(defaultSize) | 104 , m_size(defaultSize) |
105 , m_maxLength(maximumLength) | 105 , m_maxLength(maximumLength) |
106 , m_minLength(0) | 106 , m_minLength(0) |
| 107 , m_positonInRadio(0) |
107 , m_maxResults(-1) | 108 , m_maxResults(-1) |
108 , m_isChecked(false) | 109 , m_isChecked(false) |
109 , m_reflectsCheckedAttribute(true) | 110 , m_reflectsCheckedAttribute(true) |
110 , m_isIndeterminate(false) | 111 , m_isIndeterminate(false) |
111 , m_isActivatedSubmit(false) | 112 , m_isActivatedSubmit(false) |
112 , m_autocomplete(Uninitialized) | 113 , m_autocomplete(Uninitialized) |
113 , m_hasNonEmptyList(false) | 114 , m_hasNonEmptyList(false) |
114 , m_stateRestored(false) | 115 , m_stateRestored(false) |
115 , m_parsingInProgress(createdByParser) | 116 , m_parsingInProgress(createdByParser) |
116 , m_valueAttributeWasUpdatedAfterParsing(false) | 117 , m_valueAttributeWasUpdatedAfterParsing(false) |
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1742 // FIXME: Remove type check. | 1743 // FIXME: Remove type check. |
1743 if (type() != InputTypeNames::radio) | 1744 if (type() != InputTypeNames::radio) |
1744 return nullptr; | 1745 return nullptr; |
1745 if (HTMLFormElement* formElement = form()) | 1746 if (HTMLFormElement* formElement = form()) |
1746 return &formElement->radioButtonGroupScope(); | 1747 return &formElement->radioButtonGroupScope(); |
1747 if (inDocument()) | 1748 if (inDocument()) |
1748 return &document().formController().radioButtonGroupScope(); | 1749 return &document().formController().radioButtonGroupScope(); |
1749 return nullptr; | 1750 return nullptr; |
1750 } | 1751 } |
1751 | 1752 |
| 1753 unsigned HTMLInputElement::positionInRadioGroup() |
| 1754 { |
| 1755 RadioButtonGroupScope* scope = radioButtonGroupScope(); |
| 1756 if (!scope) |
| 1757 return 0; |
| 1758 scope->updateGroupPosition(this); |
| 1759 return m_positonInRadio; |
| 1760 } |
| 1761 |
| 1762 unsigned HTMLInputElement::sizeOfRadioGroup() |
| 1763 { |
| 1764 RadioButtonGroupScope* scope = radioButtonGroupScope(); |
| 1765 if (!scope) |
| 1766 return 0; |
| 1767 return scope->sizeOfGroup(this); |
| 1768 } |
| 1769 |
1752 inline void HTMLInputElement::addToRadioButtonGroup() | 1770 inline void HTMLInputElement::addToRadioButtonGroup() |
1753 { | 1771 { |
1754 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) | 1772 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) |
1755 scope->addButton(this); | 1773 scope->addButton(this); |
1756 } | 1774 } |
1757 | 1775 |
1758 inline void HTMLInputElement::removeFromRadioButtonGroup() | 1776 inline void HTMLInputElement::removeFromRadioButtonGroup() |
1759 { | 1777 { |
1760 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) | 1778 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) |
1761 scope->removeButton(this); | 1779 scope->removeButton(this); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 void HTMLInputElement::ensurePrimaryContent() | 1939 void HTMLInputElement::ensurePrimaryContent() |
1922 { | 1940 { |
1923 m_inputTypeView->ensurePrimaryContent(); | 1941 m_inputTypeView->ensurePrimaryContent(); |
1924 } | 1942 } |
1925 | 1943 |
1926 bool HTMLInputElement::hasFallbackContent() const | 1944 bool HTMLInputElement::hasFallbackContent() const |
1927 { | 1945 { |
1928 return m_inputTypeView->hasFallbackContent(); | 1946 return m_inputTypeView->hasFallbackContent(); |
1929 } | 1947 } |
1930 } // namespace blink | 1948 } // namespace blink |
OLD | NEW |