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

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

Issue 99743004: Merge 163945 "Fix assertion failure in FormAssociatedElement::fo..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1700/
Patch Set: Created 6 years, 11 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 | « no previous file | 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return element->findFormAncestor(); 117 return element->findFormAncestor();
118 118
119 return currentAssociatedForm; 119 return currentAssociatedForm;
120 } 120 }
121 121
122 void FormAssociatedElement::formRemovedFromTree(const Node* formRoot) 122 void FormAssociatedElement::formRemovedFromTree(const Node* formRoot)
123 { 123 {
124 ASSERT(m_form); 124 ASSERT(m_form);
125 if (toHTMLElement(this)->highestAncestor() == formRoot) 125 if (toHTMLElement(this)->highestAncestor() == formRoot)
126 return; 126 return;
127 RefPtr<HTMLElement> protector(toHTMLElement(this));
128 setForm(0); 127 setForm(0);
129 } 128 }
130 129
131 void FormAssociatedElement::setForm(HTMLFormElement* newForm) 130 void FormAssociatedElement::setForm(HTMLFormElement* newForm)
132 { 131 {
133 if (m_form == newForm) 132 if (m_form == newForm)
134 return; 133 return;
135 willChangeForm(); 134 willChangeForm();
136 if (m_form) 135 if (m_form)
137 m_form->removeFormElement(this); 136 m_form->removeFormElement(this);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 , m_element(element) 298 , m_element(element)
300 { 299 {
301 } 300 }
302 301
303 void FormAttributeTargetObserver::idTargetChanged() 302 void FormAttributeTargetObserver::idTargetChanged()
304 { 303 {
305 m_element->formAttributeTargetChanged(); 304 m_element->formAttributeTargetChanged();
306 } 305 }
307 306
308 } // namespace Webcore 307 } // namespace Webcore
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLFormElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698