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

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

Issue 182053002: Have Node::highestAncestor() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload Created 6 years, 9 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/FormAssociatedElement.h ('k') | Source/core/html/HTMLFormElement.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 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (newFormCandidate && newFormCandidate->hasTagName(formTag)) 113 if (newFormCandidate && newFormCandidate->hasTagName(formTag))
114 newForm = toHTMLFormElement(newFormCandidate); 114 newForm = toHTMLFormElement(newFormCandidate);
115 return newForm; 115 return newForm;
116 } 116 }
117 // 4. Otherwise, if the form-associated element in question has an ancestor 117 // 4. Otherwise, if the form-associated element in question has an ancestor
118 // form element, then associate the form-associated element with the nearest 118 // form element, then associate the form-associated element with the nearest
119 // such ancestor form element. 119 // such ancestor form element.
120 return element->findFormAncestor(); 120 return element->findFormAncestor();
121 } 121 }
122 122
123 void FormAssociatedElement::formRemovedFromTree(const Node* formRoot) 123 void FormAssociatedElement::formRemovedFromTree(const Node& formRoot)
124 { 124 {
125 ASSERT(m_form); 125 ASSERT(m_form);
126 if (toHTMLElement(this)->highestAncestor() == formRoot) 126 if (toHTMLElement(this)->highestAncestor() == formRoot)
127 return; 127 return;
128 resetFormOwner(); 128 resetFormOwner();
129 } 129 }
130 130
131 void FormAssociatedElement::associateByParser(HTMLFormElement* form) 131 void FormAssociatedElement::associateByParser(HTMLFormElement* form)
132 { 132 {
133 if (form && form->inDocument()) { 133 if (form && form->inDocument()) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 , m_element(element) 316 , m_element(element)
317 { 317 {
318 } 318 }
319 319
320 void FormAttributeTargetObserver::idTargetChanged() 320 void FormAttributeTargetObserver::idTargetChanged()
321 { 321 {
322 m_element->formAttributeTargetChanged(); 322 m_element->formAttributeTargetChanged();
323 } 323 }
324 324
325 } // namespace Webcore 325 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/html/FormAssociatedElement.h ('k') | Source/core/html/HTMLFormElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698