Chromium Code Reviews| 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1752 // FIXME: Remove type check. | 1753 // FIXME: Remove type check. |
| 1753 if (type() != InputTypeNames::radio) | 1754 if (type() != InputTypeNames::radio) |
| 1754 return nullptr; | 1755 return nullptr; |
| 1755 if (HTMLFormElement* formElement = form()) | 1756 if (HTMLFormElement* formElement = form()) |
| 1756 return &formElement->radioButtonGroupScope(); | 1757 return &formElement->radioButtonGroupScope(); |
| 1757 if (inDocument()) | 1758 if (inDocument()) |
| 1758 return &document().formController().radioButtonGroupScope(); | 1759 return &document().formController().radioButtonGroupScope(); |
| 1759 return nullptr; | 1760 return nullptr; |
| 1760 } | 1761 } |
| 1761 | 1762 |
| 1763 void HTMLInputElement::needUpdatePositionOfRadioGroup() const | |
| 1764 { | |
| 1765 RadioButtonGroupScope* scope = radioButtonGroupScope(); | |
| 1766 if (!scope) | |
| 1767 return; | |
| 1768 scope->needUpdatePositionGroup(this); | |
|
keishi
2016/02/16 02:22:46
Only update if accessibilty is enabled?
je_julie(Not used)
2016/02/16 05:19:03
So far, there is no module which needs radio butto
| |
| 1769 } | |
| 1770 | |
| 1771 unsigned HTMLInputElement::positionInRadioGroup() const | |
| 1772 { | |
| 1773 RadioButtonGroupScope* scope = radioButtonGroupScope(); | |
| 1774 if (!scope) | |
| 1775 return 0; | |
| 1776 scope->updateGroupPosition(this); | |
| 1777 return m_positonInRadio; | |
| 1778 } | |
| 1779 | |
| 1780 unsigned HTMLInputElement::sizeOfRadioGroup() const | |
| 1781 { | |
| 1782 RadioButtonGroupScope* scope = radioButtonGroupScope(); | |
| 1783 if (!scope) | |
| 1784 return 0; | |
| 1785 return scope->sizeOfGroup(this); | |
| 1786 } | |
| 1787 | |
| 1762 inline void HTMLInputElement::addToRadioButtonGroup() | 1788 inline void HTMLInputElement::addToRadioButtonGroup() |
| 1763 { | 1789 { |
| 1764 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) | 1790 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) |
| 1765 scope->addButton(this); | 1791 scope->addButton(this); |
| 1766 } | 1792 } |
| 1767 | 1793 |
| 1768 inline void HTMLInputElement::removeFromRadioButtonGroup() | 1794 inline void HTMLInputElement::removeFromRadioButtonGroup() |
| 1769 { | 1795 { |
| 1770 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) | 1796 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) |
| 1771 scope->removeButton(this); | 1797 scope->removeButton(this); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1931 void HTMLInputElement::ensurePrimaryContent() | 1957 void HTMLInputElement::ensurePrimaryContent() |
| 1932 { | 1958 { |
| 1933 m_inputTypeView->ensurePrimaryContent(); | 1959 m_inputTypeView->ensurePrimaryContent(); |
| 1934 } | 1960 } |
| 1935 | 1961 |
| 1936 bool HTMLInputElement::hasFallbackContent() const | 1962 bool HTMLInputElement::hasFallbackContent() const |
| 1937 { | 1963 { |
| 1938 return m_inputTypeView->hasFallbackContent(); | 1964 return m_inputTypeView->hasFallbackContent(); |
| 1939 } | 1965 } |
| 1940 } // namespace blink | 1966 } // namespace blink |
| OLD | NEW |