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

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

Issue 278803002: Oilpan: Prepare to move IdTargetObserver and IdTargetObserverRegistry to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: apply comments 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/dom/TreeScope.cpp ('k') | Source/core/html/HTMLInputElement.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 18 matching lines...) Expand all
29 #include "core/dom/IdTargetObserver.h" 29 #include "core/dom/IdTargetObserver.h"
30 #include "core/html/HTMLFormControlElement.h" 30 #include "core/html/HTMLFormControlElement.h"
31 #include "core/html/HTMLFormElement.h" 31 #include "core/html/HTMLFormElement.h"
32 #include "core/html/HTMLObjectElement.h" 32 #include "core/html/HTMLObjectElement.h"
33 #include "core/html/ValidityState.h" 33 #include "core/html/ValidityState.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 using namespace HTMLNames; 37 using namespace HTMLNames;
38 38
39 // FIXME: Oilpan: IdTargetObserver should be on-heap. 39 class FormAttributeTargetObserver : public IdTargetObserver {
40 class FormAttributeTargetObserver : public NoBaseWillBeGarbageCollectedFinalized <FormAttributeTargetObserver>, public IdTargetObserver {
41 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 40 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
42 public: 41 public:
43 static PassOwnPtrWillBeRawPtr<FormAttributeTargetObserver> create(const Atom icString& id, FormAssociatedElement*); 42 static PassOwnPtrWillBeRawPtr<FormAttributeTargetObserver> create(const Atom icString& id, FormAssociatedElement*);
44 void trace(Visitor* visitor) { visitor->trace(m_element); } 43 virtual void trace(Visitor*) OVERRIDE;
45 virtual void idTargetChanged() OVERRIDE; 44 virtual void idTargetChanged() OVERRIDE;
46 45
47 private: 46 private:
48 FormAttributeTargetObserver(const AtomicString& id, FormAssociatedElement*); 47 FormAttributeTargetObserver(const AtomicString& id, FormAssociatedElement*);
49 48
50 RawPtrWillBeMember<FormAssociatedElement> m_element; 49 RawPtrWillBeMember<FormAssociatedElement> m_element;
51 }; 50 };
52 51
53 FormAssociatedElement::FormAssociatedElement() 52 FormAssociatedElement::FormAssociatedElement()
54 : m_formWasSetByParser(false) 53 : m_formWasSetByParser(false)
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 { 330 {
332 return adoptPtrWillBeNoop(new FormAttributeTargetObserver(id, element)); 331 return adoptPtrWillBeNoop(new FormAttributeTargetObserver(id, element));
333 } 332 }
334 333
335 FormAttributeTargetObserver::FormAttributeTargetObserver(const AtomicString& id, FormAssociatedElement* element) 334 FormAttributeTargetObserver::FormAttributeTargetObserver(const AtomicString& id, FormAssociatedElement* element)
336 : IdTargetObserver(toHTMLElement(element)->treeScope().idTargetObserverRegis try(), id) 335 : IdTargetObserver(toHTMLElement(element)->treeScope().idTargetObserverRegis try(), id)
337 , m_element(element) 336 , m_element(element)
338 { 337 {
339 } 338 }
340 339
340 void FormAttributeTargetObserver::trace(Visitor* visitor)
341 {
342 visitor->trace(m_element);
343 IdTargetObserver::trace(visitor);
344 }
345
341 void FormAttributeTargetObserver::idTargetChanged() 346 void FormAttributeTargetObserver::idTargetChanged()
342 { 347 {
343 m_element->formAttributeTargetChanged(); 348 m_element->formAttributeTargetChanged();
344 } 349 }
345 350
346 } // namespace Webcore 351 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698