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

Side by Side Diff: Source/WebCore/css/SelectorChecker.cpp

Issue 10477022: Merge 118891 - REGRESSION(r111497): The "option" element doesn't match CSS pseudo class :enabled (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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 | « no previous file | 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 if (m_strictParsing || context.isSubSelector || (selector->hasTag() && !element->hasTagName(aTag)) || element->isLink()) { 1036 if (m_strictParsing || context.isSubSelector || (selector->hasTag() && !element->hasTagName(aTag)) || element->isLink()) {
1037 if (context.elementStyle) 1037 if (context.elementStyle)
1038 context.elementStyle->setAffectedByActiveRules(true); 1038 context.elementStyle->setAffectedByActiveRules(true);
1039 else if (element->renderStyle()) 1039 else if (element->renderStyle())
1040 element->renderStyle()->setAffectedByActiveRules(true); 1040 element->renderStyle()->setAffectedByActiveRules(true);
1041 if (element->active() || InspectorInstrumentation::forcePseudoSt ate(element, CSSSelector::PseudoActive)) 1041 if (element->active() || InspectorInstrumentation::forcePseudoSt ate(element, CSSSelector::PseudoActive))
1042 return true; 1042 return true;
1043 } 1043 }
1044 break; 1044 break;
1045 case CSSSelector::PseudoEnabled: 1045 case CSSSelector::PseudoEnabled:
1046 if (element && (element->isFormControlElement() || element->hasTagN ame(optgroupTag))) 1046 if (element && (element->isFormControlElement() || element->hasTagNa me(optionTag) || element->hasTagName(optgroupTag)))
1047 return element->isEnabledFormControl(); 1047 return element->isEnabledFormControl();
1048 break; 1048 break;
1049 case CSSSelector::PseudoFullPageMedia: 1049 case CSSSelector::PseudoFullPageMedia:
1050 return element && element->document() && element->document()->isMedi aDocument(); 1050 return element && element->document() && element->document()->isMedi aDocument();
1051 break; 1051 break;
1052 case CSSSelector::PseudoDefault: 1052 case CSSSelector::PseudoDefault:
1053 return element && element->isDefaultButtonForForm(); 1053 return element && element->isDefaultButtonForForm();
1054 case CSSSelector::PseudoDisabled: 1054 case CSSSelector::PseudoDisabled:
1055 if (element && (element->isFormControlElement() || element->hasTagNa me(optionTag) || element->hasTagName(optgroupTag))) 1055 if (element && (element->isFormControlElement() || element->hasTagNa me(optionTag) || element->hasTagName(optgroupTag)))
1056 return !element->isEnabledFormControl(); 1056 return !element->isEnabledFormControl();
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 ASSERT(scopeSelector->m_match == CSSSelector::Class || scopeSelector->m_ match == CSSSelector::Id); 1376 ASSERT(scopeSelector->m_match == CSSSelector::Class || scopeSelector->m_ match == CSSSelector::Id);
1377 if (scopeSelector->m_match == CSSSelector::Id) 1377 if (scopeSelector->m_match == CSSSelector::Id)
1378 idScopes.add(scopeSelector->value().impl()); 1378 idScopes.add(scopeSelector->value().impl());
1379 else 1379 else
1380 classScopes.add(scopeSelector->value().impl()); 1380 classScopes.add(scopeSelector->value().impl());
1381 } 1381 }
1382 return true; 1382 return true;
1383 } 1383 }
1384 1384
1385 } 1385 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698