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

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, 5 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
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 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 setValue(newValue); 1694 setValue(newValue);
1695 } 1695 }
1696 1696
1697 String HTMLInputElement::defaultToolTip() const 1697 String HTMLInputElement::defaultToolTip() const
1698 { 1698 {
1699 return m_inputType->defaultToolTip(); 1699 return m_inputType->defaultToolTip();
1700 } 1700 }
1701 1701
1702 bool HTMLInputElement::shouldAppearIndeterminate() const 1702 bool HTMLInputElement::shouldAppearIndeterminate() const
1703 { 1703 {
1704 return m_inputType->supportsIndeterminateAppearance() && indeterminate(); 1704 return m_inputType->shouldAppearIndeterminate();
1705 } 1705 }
1706 1706
1707 bool HTMLInputElement::isInRequiredRadioButtonGroup() 1707 bool HTMLInputElement::isInRequiredRadioButtonGroup()
1708 { 1708 {
1709 ASSERT(isRadioButton()); 1709 ASSERT(isRadioButton());
1710 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) 1710 if (RadioButtonGroupScope* scope = radioButtonGroupScope())
1711 return scope->isInRequiredGroup(this); 1711 return scope->isInRequiredGroup(this);
1712 return false; 1712 return false;
1713 } 1713 }
1714 1714
1715 HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup() const 1715 HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup()
1716 { 1716 {
1717 if (checked())
1718 return this;
tkent 2014/07/15 01:31:50 This changes a behavior. For example, - the input
keishi 2014/07/15 03:05:30 I think this is correct and the current behavior i
1717 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) 1719 if (RadioButtonGroupScope* scope = radioButtonGroupScope())
1718 return scope->checkedButtonForGroup(name()); 1720 return scope->checkedButtonForGroup(name());
1719 return 0; 1721 return 0;
1720 } 1722 }
1721 1723
1722 RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const 1724 RadioButtonGroupScope* HTMLInputElement::radioButtonGroupScope() const
1723 { 1725 {
1724 if (!isRadioButton()) 1726 if (!isRadioButton())
1725 return 0; 1727 return 0;
1726 if (HTMLFormElement* formElement = form()) 1728 if (HTMLFormElement* formElement = form())
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1881 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1880 } 1882 }
1881 #endif 1883 #endif
1882 1884
1883 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue) 1885 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue)
1884 { 1886 {
1885 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ; 1887 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ;
1886 } 1888 }
1887 1889
1888 } // namespace 1890 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698