Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: Source/core/html/HTMLInputElement.cpp

Issue 394433002: Add :indeterminate pseudo class support for radio button input (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/CheckboxInputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 setValue(newValue); 1697 setValue(newValue);
1698 } 1698 }
1699 1699
1700 String HTMLInputElement::defaultToolTip() const 1700 String HTMLInputElement::defaultToolTip() const
1701 { 1701 {
1702 return m_inputType->defaultToolTip(); 1702 return m_inputType->defaultToolTip();
1703 } 1703 }
1704 1704
1705 bool HTMLInputElement::shouldAppearIndeterminate() const 1705 bool HTMLInputElement::shouldAppearIndeterminate() const
1706 { 1706 {
1707 return m_inputType->supportsIndeterminateAppearance() && indeterminate(); 1707 return m_inputType->shouldAppearIndeterminate();
1708 } 1708 }
1709 1709
1710 bool HTMLInputElement::isInRequiredRadioButtonGroup() 1710 bool HTMLInputElement::isInRequiredRadioButtonGroup()
1711 { 1711 {
1712 ASSERT(isRadioButton()); 1712 ASSERT(isRadioButton());
1713 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) 1713 if (RadioButtonGroupScope* scope = radioButtonGroupScope())
1714 return scope->isInRequiredGroup(this); 1714 return scope->isInRequiredGroup(this);
1715 return false; 1715 return false;
1716 } 1716 }
1717 1717
1718 HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup() const 1718 HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup()
1719 { 1719 {
1720 if (checked())
1721 return this;
1720 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) 1722 if (RadioButtonGroupScope* scope = radioButtonGroupScope())
1721 return scope->checkedButtonForGroup(name()); 1723 return scope->checkedButtonForGroup(name());
1722 return 0; 1724 return 0;
1723 } 1725 }
1724 1726
1725 RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const 1727 RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const
1726 { 1728 {
1727 if (!isRadioButton()) 1729 if (!isRadioButton())
1728 return 0; 1730 return 0;
1729 if (HTMLFormElement* formElement = form()) 1731 if (HTMLFormElement* formElement = form())
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 { 1894 {
1893 listAttributeTargetChanged(); 1895 listAttributeTargetChanged();
1894 } 1896 }
1895 1897
1896 AXObject* HTMLInputElement::popupRootAXObject() 1898 AXObject* HTMLInputElement::popupRootAXObject()
1897 { 1899 {
1898 return m_inputTypeView->popupRootAXObject(); 1900 return m_inputTypeView->popupRootAXObject();
1899 } 1901 }
1900 1902
1901 } // namespace 1903 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/CheckboxInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698