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

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

Issue 283663006: Oilpan: Prepare moving HTMLTemplateElement to oipan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Changed back to pointer 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/HTMLTemplateElement.h ('k') | no next file » | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 using namespace HTMLNames; 40 using namespace HTMLNames;
41 41
42 inline HTMLTemplateElement::HTMLTemplateElement(Document& document) 42 inline HTMLTemplateElement::HTMLTemplateElement(Document& document)
43 : HTMLElement(templateTag, document) 43 : HTMLElement(templateTag, document)
44 { 44 {
45 ScriptWrappable::init(this); 45 ScriptWrappable::init(this);
46 } 46 }
47 47
48 HTMLTemplateElement::~HTMLTemplateElement() 48 HTMLTemplateElement::~HTMLTemplateElement()
49 { 49 {
50 #if !ENABLE(OILPAN)
50 if (m_content) 51 if (m_content)
51 m_content->clearHost(); 52 m_content->clearHost();
53 #endif
52 } 54 }
53 55
54 PassRefPtrWillBeRawPtr<HTMLTemplateElement> HTMLTemplateElement::create(Document & document) 56 PassRefPtrWillBeRawPtr<HTMLTemplateElement> HTMLTemplateElement::create(Document & document)
55 { 57 {
56 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTemplateElement(docu ment)); 58 return adoptRefWillBeRefCountedGarbageCollected(new HTMLTemplateElement(docu ment));
57 } 59 }
58 60
59 DocumentFragment* HTMLTemplateElement::content() const 61 DocumentFragment* HTMLTemplateElement::content() const
60 { 62 {
61 if (!m_content) 63 if (!m_content)
(...skipping 14 matching lines...) Expand all
76 } 78 }
77 79
78 void HTMLTemplateElement::didMoveToNewDocument(Document& oldDocument) 80 void HTMLTemplateElement::didMoveToNewDocument(Document& oldDocument)
79 { 81 {
80 HTMLElement::didMoveToNewDocument(oldDocument); 82 HTMLElement::didMoveToNewDocument(oldDocument);
81 if (!m_content) 83 if (!m_content)
82 return; 84 return;
83 document().ensureTemplateDocument().adoptIfNeeded(*m_content); 85 document().ensureTemplateDocument().adoptIfNeeded(*m_content);
84 } 86 }
85 87
88 void HTMLTemplateElement::trace(Visitor* visitor)
89 {
90 visitor->trace(m_content);
91 HTMLElement::trace(visitor);
92 }
93
86 } // namespace WebCore 94 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTemplateElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698