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

Side by Side Diff: Source/core/html/HTMLFormElement.cpp

Issue 616443002: Implement :valid and :invalid pseudoclass for <form> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix the problem with shared element style 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) 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 #if ENABLE(OILPAN) 102 #if ENABLE(OILPAN)
103 visitor->trace(m_pastNamesMap); 103 visitor->trace(m_pastNamesMap);
104 visitor->trace(m_radioButtonGroupScope); 104 visitor->trace(m_radioButtonGroupScope);
105 visitor->trace(m_associatedElements); 105 visitor->trace(m_associatedElements);
106 visitor->trace(m_imageElements); 106 visitor->trace(m_imageElements);
107 visitor->trace(m_pendingAutocompleteEventsQueue); 107 visitor->trace(m_pendingAutocompleteEventsQueue);
108 #endif 108 #endif
109 HTMLElement::trace(visitor); 109 HTMLElement::trace(visitor);
110 } 110 }
111 111
112 bool HTMLFormElement::willValidate() const
113 {
114 return true;
115 }
116
117 bool HTMLFormElement::isValidElement()
118 {
119 return checkValidity();
120 }
121
112 bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style) 122 bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
113 { 123 {
114 if (!m_wasDemoted) 124 if (!m_wasDemoted)
115 return HTMLElement::rendererIsNeeded(style); 125 return HTMLElement::rendererIsNeeded(style);
116 126
117 ContainerNode* node = parentNode(); 127 ContainerNode* node = parentNode();
118 if (!node || !node->renderer()) 128 if (!node || !node->renderer())
119 return HTMLElement::rendererIsNeeded(style); 129 return HTMLElement::rendererIsNeeded(style);
120 RenderObject* parentRenderer = node->renderer(); 130 RenderObject* parentRenderer = node->renderer();
121 // FIXME: Shouldn't we also check for table caption (see |formIsTablePart| b elow). 131 // FIXME: Shouldn't we also check for table caption (see |formIsTablePart| b elow).
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 } 854 }
845 855
846 void HTMLFormElement::setDemoted(bool demoted) 856 void HTMLFormElement::setDemoted(bool demoted)
847 { 857 {
848 if (demoted) 858 if (demoted)
849 UseCounter::count(document(), UseCounter::DemotedFormElement); 859 UseCounter::count(document(), UseCounter::DemotedFormElement);
850 m_wasDemoted = demoted; 860 m_wasDemoted = demoted;
851 } 861 }
852 862
853 } // namespace 863 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698