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

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

Issue 26622007: Move isAutofilled and setAutofilled from HTMLInputElement to HTMLFormControlElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update messaging in test. Created 7 years, 2 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
« no previous file with comments | « LayoutTests/fast/forms/reset-autofilled-expected.txt ('k') | Source/core/css/html.css » ('j') | 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, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 ASSERT(selector->selectorList()); 608 ASSERT(selector->selectorList());
609 for (subContext.selector = selector->selectorList()->first(); su bContext.selector; subContext.selector = CSSSelectorList::next(subContext.select or)) { 609 for (subContext.selector = selector->selectorList()->first(); su bContext.selector; subContext.selector = CSSSelectorList::next(subContext.select or)) {
610 if (match(subContext, ignoreDynamicPseudo, siblingTraversalS trategy) == SelectorMatches) 610 if (match(subContext, ignoreDynamicPseudo, siblingTraversalS trategy) == SelectorMatches)
611 return true; 611 return true;
612 } 612 }
613 } 613 }
614 break; 614 break;
615 case CSSSelector::PseudoAutofill: 615 case CSSSelector::PseudoAutofill:
616 if (!element || !element->isFormControlElement()) 616 if (!element || !element->isFormControlElement())
617 break; 617 break;
618 if (element->hasTagName(inputTag)) 618 return toHTMLFormControlElement(element)->isAutofilled();
619 return toHTMLInputElement(element)->isAutofilled();
620 break;
621 case CSSSelector::PseudoAnyLink: 619 case CSSSelector::PseudoAnyLink:
622 case CSSSelector::PseudoLink: 620 case CSSSelector::PseudoLink:
623 // :visited and :link matches are separated later when applying the style. Here both classes match all links... 621 // :visited and :link matches are separated later when applying the style. Here both classes match all links...
624 return element->isLink(); 622 return element->isLink();
625 case CSSSelector::PseudoVisited: 623 case CSSSelector::PseudoVisited:
626 // ...except if :visited matching is disabled for ancestor/sibling m atching. 624 // ...except if :visited matching is disabled for ancestor/sibling m atching.
627 return element->isLink() && context.visitedMatchType == VisitedMatch Enabled; 625 return element->isLink() && context.visitedMatchType == VisitedMatch Enabled;
628 case CSSSelector::PseudoDrag: 626 case CSSSelector::PseudoDrag:
629 if (m_mode == ResolvingStyle) { 627 if (m_mode == ResolvingStyle) {
630 if (context.elementStyle) 628 if (context.elementStyle)
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 return element->focused() && isFrameFocused(element); 984 return element->focused() && isFrameFocused(element);
987 } 985 }
988 986
989 template 987 template
990 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const DOMSiblingTraversalStrategy&) const; 988 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const DOMSiblingTraversalStrategy&) const;
991 989
992 template 990 template
993 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const ShadowDOMSiblingTraversalStrategy&) const; 991 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const ShadowDOMSiblingTraversalStrategy&) const;
994 992
995 } 993 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/reset-autofilled-expected.txt ('k') | Source/core/css/html.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698