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

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

Issue 271533009: Oilpan: Prepare to move FormAssociatedElement to Oilpan heap, part 1. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove using Created 6 years, 7 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/HTMLFormControlElement.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 FormAssociatedElement::FormAssociatedElement() 51 FormAssociatedElement::FormAssociatedElement()
52 : m_formWasSetByParser(false) 52 : m_formWasSetByParser(false)
53 { 53 {
54 } 54 }
55 55
56 FormAssociatedElement::~FormAssociatedElement() 56 FormAssociatedElement::~FormAssociatedElement()
57 { 57 {
58 // We can't call setForm here because it contains virtual calls. 58 // We can't call setForm here because it contains virtual calls.
59 } 59 }
60 60
61 void FormAssociatedElement::trace(Visitor* visitor)
62 {
63 visitor->trace(m_form);
64 visitor->trace(m_validityState);
65 }
66
61 ValidityState* FormAssociatedElement::validity() 67 ValidityState* FormAssociatedElement::validity()
62 { 68 {
63 if (!m_validityState) 69 if (!m_validityState)
64 m_validityState = ValidityState::create(this); 70 m_validityState = ValidityState::create(this);
65 71
66 return m_validityState.get(); 72 return m_validityState.get();
67 } 73 }
68 74
69 void FormAssociatedElement::didMoveToNewDocument(Document& oldDocument) 75 void FormAssociatedElement::didMoveToNewDocument(Document& oldDocument)
70 { 76 {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 141 }
136 142
137 void FormAssociatedElement::setForm(HTMLFormElement* newForm) 143 void FormAssociatedElement::setForm(HTMLFormElement* newForm)
138 { 144 {
139 if (m_form.get() == newForm) 145 if (m_form.get() == newForm)
140 return; 146 return;
141 willChangeForm(); 147 willChangeForm();
142 if (m_form) 148 if (m_form)
143 m_form->disassociate(*this); 149 m_form->disassociate(*this);
144 if (newForm) { 150 if (newForm) {
151 #if ENABLE(OILPAN)
152 m_form = newForm;
153 #else
145 m_form = newForm->createWeakPtr(); 154 m_form = newForm->createWeakPtr();
155 #endif
146 m_form->associate(*this); 156 m_form->associate(*this);
147 } else { 157 } else {
158 #if ENABLE(OILPAN)
159 m_form = nullptr;
160 #else
148 m_form = WeakPtr<HTMLFormElement>(); 161 m_form = WeakPtr<HTMLFormElement>();
162 #endif
149 } 163 }
150 didChangeForm(); 164 didChangeForm();
151 } 165 }
152 166
153 void FormAssociatedElement::willChangeForm() 167 void FormAssociatedElement::willChangeForm()
154 { 168 {
155 } 169 }
156 170
157 void FormAssociatedElement::didChangeForm() 171 void FormAssociatedElement::didChangeForm()
158 { 172 {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 , m_element(element) 334 , m_element(element)
321 { 335 {
322 } 336 }
323 337
324 void FormAttributeTargetObserver::idTargetChanged() 338 void FormAttributeTargetObserver::idTargetChanged()
325 { 339 {
326 m_element->formAttributeTargetChanged(); 340 m_element->formAttributeTargetChanged();
327 } 341 }
328 342
329 } // namespace Webcore 343 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/html/FormAssociatedElement.h ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698