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

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

Issue 1956453004: Explicitly set checkbox state should not be influenced by defaultState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/checkbox/checkbox-checked-state-affected-by-default-state.html ('k') | no next file » | 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 } 892 }
893 893
894 bool HTMLInputElement::checked() const 894 bool HTMLInputElement::checked() const
895 { 895 {
896 m_inputType->readingChecked(); 896 m_inputType->readingChecked();
897 return m_isChecked; 897 return m_isChecked;
898 } 898 }
899 899
900 void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB ehavior) 900 void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB ehavior)
901 { 901 {
902 m_reflectsCheckedAttribute = false;
902 if (checked() == nowChecked) 903 if (checked() == nowChecked)
903 return; 904 return;
904 905
905 m_reflectsCheckedAttribute = false;
906 m_isChecked = nowChecked; 906 m_isChecked = nowChecked;
907 907
908 if (RadioButtonGroupScope* scope = radioButtonGroupScope()) 908 if (RadioButtonGroupScope* scope = radioButtonGroupScope())
909 scope->updateCheckedState(this); 909 scope->updateCheckedState(this);
910 if (layoutObject()) 910 if (layoutObject())
911 LayoutTheme::theme().controlStateChanged(*layoutObject(), CheckedControl State); 911 LayoutTheme::theme().controlStateChanged(*layoutObject(), CheckedControl State);
912 912
913 setNeedsValidityCheck(); 913 setNeedsValidityCheck();
914 914
915 // Ideally we'd do this from the layout tree (matching 915 // Ideally we'd do this from the layout tree (matching
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 void HTMLInputElement::ensurePrimaryContent() 1917 void HTMLInputElement::ensurePrimaryContent()
1918 { 1918 {
1919 m_inputTypeView->ensurePrimaryContent(); 1919 m_inputTypeView->ensurePrimaryContent();
1920 } 1920 }
1921 1921
1922 bool HTMLInputElement::hasFallbackContent() const 1922 bool HTMLInputElement::hasFallbackContent() const
1923 { 1923 {
1924 return m_inputTypeView->hasFallbackContent(); 1924 return m_inputTypeView->hasFallbackContent();
1925 } 1925 }
1926 } // namespace blink 1926 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/checkbox/checkbox-checked-state-affected-by-default-state.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698