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

Side by Side Diff: Source/core/css/resolver/SharedStyleFinder.cpp

Issue 616443002: Implement :valid and :invalid pseudoclass for <form> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 if (candidate.isDefaultButtonForForm() != element().isDefaultButtonForForm() ) 78 if (candidate.isDefaultButtonForForm() != element().isDefaultButtonForForm() )
79 return false; 79 return false;
80 80
81 if (document().containsValidityStyleRules()) { 81 if (document().containsValidityStyleRules()) {
82 bool willValidate = candidate.willValidate(); 82 bool willValidate = candidate.willValidate();
83 83
84 if (willValidate != element().willValidate()) 84 if (willValidate != element().willValidate())
85 return false; 85 return false;
86 86
87 if (willValidate && (candidate.isValidFormControlElement() != element(). isValidFormControlElement())) 87 if (willValidate && (candidate.isValidElement() != element().isValidElem ent()))
88 return false; 88 return false;
89 89
90 if (candidate.isInRange() != element().isInRange()) 90 if (candidate.isInRange() != element().isInRange())
91 return false; 91 return false;
92 92
93 if (candidate.isOutOfRange() != element().isOutOfRange()) 93 if (candidate.isOutOfRange() != element().isOutOfRange())
94 return false; 94 return false;
95 } 95 }
96 96
97 return true; 97 return true;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // Tracking child index requires unique style for each node. This may get se t by the sibling rule match above. 336 // Tracking child index requires unique style for each node. This may get se t by the sibling rule match above.
337 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) { 337 if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) {
338 INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByPare nt); 338 INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByPare nt);
339 return 0; 339 return 0;
340 } 340 }
341 341
342 return shareElement->renderStyle(); 342 return shareElement->renderStyle();
343 } 343 }
344 344
345 } 345 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698