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

Side by Side Diff: Source/core/dom/Attr.cpp

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another build fix. 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
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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved.
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 attr->createTextChild(); 68 attr->createTextChild();
69 return attr.release(); 69 return attr.release();
70 } 70 }
71 71
72 Attr::~Attr() 72 Attr::~Attr()
73 { 73 {
74 } 74 }
75 75
76 void Attr::createTextChild() 76 void Attr::createTextChild()
77 { 77 {
78 #if !ENABLE(OILPAN)
78 ASSERT(refCount()); 79 ASSERT(refCount());
80 #endif
79 if (!value().isEmpty()) { 81 if (!value().isEmpty()) {
80 RefPtr<Text> textNode = document().createTextNode(value().string()); 82 RefPtr<Text> textNode = document().createTextNode(value().string());
81 83
82 // This does everything appendChild() would do in this situation (assumi ng m_ignoreChildrenChanged was set), 84 // This does everything appendChild() would do in this situation (assumi ng m_ignoreChildrenChanged was set),
83 // but much more efficiently. 85 // but much more efficiently.
84 textNode->setParentOrShadowHostNode(this); 86 textNode->setParentOrShadowHostNode(this);
85 treeScope().adoptIfNeeded(*textNode); 87 treeScope().adoptIfNeeded(*textNode);
86 setFirstChild(textNode.get()); 88 setFirstChild(textNode.get());
87 setLastChild(textNode.get()); 89 setLastChild(textNode.get());
88 } 90 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 199 }
198 200
199 void Attr::attachToElement(Element* element) 201 void Attr::attachToElement(Element* element)
200 { 202 {
201 ASSERT(!m_element); 203 ASSERT(!m_element);
202 m_element = element; 204 m_element = element;
203 m_standaloneValue = nullAtom; 205 m_standaloneValue = nullAtom;
204 } 206 }
205 207
206 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698