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

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

Issue 1768913002: Dynamic updation of checked and selected attributes should reflect correct :default status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 9 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/Source/core/html/HTMLInputElement.cpp ('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 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } else if (name == disabledAttr) { 209 } else if (name == disabledAttr) {
210 if (oldValue.isNull() != value.isNull()) { 210 if (oldValue.isNull() != value.isNull()) {
211 pseudoStateChanged(CSSSelector::PseudoDisabled); 211 pseudoStateChanged(CSSSelector::PseudoDisabled);
212 pseudoStateChanged(CSSSelector::PseudoEnabled); 212 pseudoStateChanged(CSSSelector::PseudoEnabled);
213 if (layoutObject()) 213 if (layoutObject())
214 LayoutTheme::theme().controlStateChanged(*layoutObject(), Enable dControlState); 214 LayoutTheme::theme().controlStateChanged(*layoutObject(), Enable dControlState);
215 } 215 }
216 } else if (name == selectedAttr) { 216 } else if (name == selectedAttr) {
217 if (oldValue.isNull() != value.isNull() && !m_isDirty) 217 if (oldValue.isNull() != value.isNull() && !m_isDirty)
218 setSelected(!value.isNull()); 218 setSelected(!value.isNull());
219 pseudoStateChanged(CSSSelector::PseudoDefault);
219 } else if (name == labelAttr) { 220 } else if (name == labelAttr) {
220 updateLabel(); 221 updateLabel();
221 } else { 222 } else {
222 HTMLElement::parseAttribute(name, oldValue, value); 223 HTMLElement::parseAttribute(name, oldValue, value);
223 } 224 }
224 } 225 }
225 226
226 String HTMLOptionElement::value() const 227 String HTMLOptionElement::value() const
227 { 228 {
228 const AtomicString& value = fastGetAttribute(valueAttr); 229 const AtomicString& value = fastGetAttribute(valueAttr);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 ASSERT(parent); 481 ASSERT(parent);
481 if (isHTMLOptGroupElement(*parent)) { 482 if (isHTMLOptGroupElement(*parent)) {
482 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle(); 483 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle();
483 return !parentStyle || parentStyle->display() == NONE; 484 return !parentStyle || parentStyle->display() == NONE;
484 } 485 }
485 } 486 }
486 return m_style->display() == NONE; 487 return m_style->display() == NONE;
487 } 488 }
488 489
489 } // namespace blink 490 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698