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

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

Issue 1914933003: output should not match to :enabled or :disabled pseudo classes. (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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (select && select->usesMenuList()) 113 if (select && select->usesMenuList())
114 return false; 114 return false;
115 return HTMLElement::supportsFocus(); 115 return HTMLElement::supportsFocus();
116 } 116 }
117 117
118 bool HTMLOptionElement::matchesDefaultPseudoClass() const 118 bool HTMLOptionElement::matchesDefaultPseudoClass() const
119 { 119 {
120 return fastHasAttribute(selectedAttr); 120 return fastHasAttribute(selectedAttr);
121 } 121 }
122 122
123 bool HTMLOptionElement::matchesEnabledPseudoClass() const
124 {
125 return !isDisabledFormControl();
126 }
127
123 String HTMLOptionElement::displayLabel() const 128 String HTMLOptionElement::displayLabel() const
124 { 129 {
125 Document& document = this->document(); 130 Document& document = this->document();
126 String text; 131 String text;
127 132
128 // WinIE does not use the label attribute, so as a quirk, we ignore it. 133 // WinIE does not use the label attribute, so as a quirk, we ignore it.
129 if (!document.inQuirksMode()) 134 if (!document.inQuirksMode())
130 text = fastGetAttribute(labelAttr); 135 text = fastGetAttribute(labelAttr);
131 136
132 // FIXME: The following treats an element with the label attribute set to 137 // FIXME: The following treats an element with the label attribute set to
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ASSERT(parent); 472 ASSERT(parent);
468 if (isHTMLOptGroupElement(*parent)) { 473 if (isHTMLOptGroupElement(*parent)) {
469 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle(); 474 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle();
470 return !parentStyle || parentStyle->display() == NONE; 475 return !parentStyle || parentStyle->display() == NONE;
471 } 476 }
472 } 477 }
473 return m_style->display() == NONE; 478 return m_style->display() == NONE;
474 } 479 }
475 480
476 } // namespace blink 481 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLOptionElement.h ('k') | third_party/WebKit/Source/core/html/HTMLOutputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698