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

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

Issue 23847003: Add toHTMLFieldSetElement and toHTMLLegendElement, and use them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLLegendElement.h » ('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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 Apple Inc. All r ights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 HTMLFormControlsCollection::~HTMLFormControlsCollection() 50 HTMLFormControlsCollection::~HTMLFormControlsCollection()
51 { 51 {
52 } 52 }
53 53
54 const Vector<FormAssociatedElement*>& HTMLFormControlsCollection::formControlEle ments() const 54 const Vector<FormAssociatedElement*>& HTMLFormControlsCollection::formControlEle ments() const
55 { 55 {
56 ASSERT(ownerNode()); 56 ASSERT(ownerNode());
57 ASSERT(ownerNode()->hasTagName(formTag) || ownerNode()->hasTagName(fieldsetT ag)); 57 ASSERT(ownerNode()->hasTagName(formTag) || ownerNode()->hasTagName(fieldsetT ag));
58 if (ownerNode()->hasTagName(formTag)) 58 if (ownerNode()->hasTagName(formTag))
59 return toHTMLFormElement(ownerNode())->associatedElements(); 59 return toHTMLFormElement(ownerNode())->associatedElements();
60 return static_cast<HTMLFieldSetElement*>(ownerNode())->associatedElements(); 60 return toHTMLFieldSetElement(ownerNode())->associatedElements();
61 } 61 }
62 62
63 const Vector<HTMLImageElement*>& HTMLFormControlsCollection::formImageElements() const 63 const Vector<HTMLImageElement*>& HTMLFormControlsCollection::formImageElements() const
64 { 64 {
65 ASSERT(ownerNode()); 65 ASSERT(ownerNode());
66 return toHTMLFormElement(ownerNode())->imageElements(); 66 return toHTMLFormElement(ownerNode())->imageElements();
67 } 67 }
68 68
69 Element* HTMLFormControlsCollection::virtualItemAfter(unsigned& offset, Element* previousItem) const 69 Element* HTMLFormControlsCollection::virtualItemAfter(unsigned& offset, Element* previousItem) const
70 { 70 {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 returnValue1Enabled = true; 171 returnValue1Enabled = true;
172 returnValue1 = namedItems.at(0); 172 returnValue1 = namedItems.at(0);
173 return; 173 return;
174 } 174 }
175 175
176 returnValue0Enabled = true; 176 returnValue0Enabled = true;
177 returnValue0 = this->ownerNode()->radioNodeList(name); 177 returnValue0 = this->ownerNode()->radioNodeList(name);
178 } 178 }
179 179
180 } 180 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLLegendElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698